Revert "Handle breaking changes in leak_tracker." (#132223)

Reverts flutter/flutter#131998

Reverting for https://github.com/flutter/flutter/issues/132222
This commit is contained in:
Zachary Anderson 2023-08-09 08:14:39 -07:00 committed by GitHub
parent d78b3ac0af
commit f4c25bbb35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
112 changed files with 896 additions and 1138 deletions

View File

@ -15,8 +15,8 @@ dependencies:
platform: 3.1.0 platform: 3.1.0
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -26,6 +26,7 @@ dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -72,4 +73,4 @@ flutter:
assets: assets:
- icon/test.png - icon/test.png
# PUBSPEC CHECKSUM: ab27 # PUBSPEC CHECKSUM: 90e3

View File

@ -44,13 +44,14 @@ dev_dependencies:
integration_test: integration_test:
sdk: flutter sdk: flutter
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -83,4 +84,4 @@ flutter:
- packages/flutter_gallery_assets/people/square/ali.png - packages/flutter_gallery_assets/people/square/ali.png
- packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
# PUBSPEC CHECKSUM: 3c00 # PUBSPEC CHECKSUM: 50bc

View File

@ -47,12 +47,13 @@ dev_dependencies:
integration_test: integration_test:
sdk: flutter sdk: flutter
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -210,4 +211,4 @@ flutter:
fonts: fonts:
- asset: packages/flutter_gallery_assets/fonts/GalleryIcons.ttf - asset: packages/flutter_gallery_assets/fonts/GalleryIcons.ttf
# PUBSPEC CHECKSUM: 3c00 # PUBSPEC CHECKSUM: 50bc

View File

@ -15,8 +15,8 @@ dependencies:
test: 1.24.5 test: 1.24.5
flutter_gallery_assets: 1.0.2 flutter_gallery_assets: 1.0.2
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -26,6 +26,7 @@ dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -137,4 +138,4 @@ flutter:
- packages/flutter_gallery_assets/people/square/stella.png - packages/flutter_gallery_assets/people/square/stella.png
- packages/flutter_gallery_assets/people/square/trevor.png - packages/flutter_gallery_assets/people/square/trevor.png
# PUBSPEC CHECKSUM: 9677 # PUBSPEC CHECKSUM: 8334

View File

@ -16,8 +16,8 @@ dependencies:
path: ../microbenchmarks path: ../microbenchmarks
cupertino_icons: 1.0.5 cupertino_icons: 1.0.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -27,6 +27,7 @@ dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
flutter_gallery_assets: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" flutter_gallery_assets: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -74,4 +75,4 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: 4862 # PUBSPEC CHECKSUM: 071f

View File

@ -42,13 +42,14 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -81,4 +82,4 @@ flutter:
- packages/flutter_gallery_assets/people/square/ali.png - packages/flutter_gallery_assets/people/square/ali.png
- packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
# PUBSPEC CHECKSUM: 3c00 # PUBSPEC CHECKSUM: 50bc

View File

@ -42,13 +42,14 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -81,4 +82,4 @@ flutter:
- packages/flutter_gallery_assets/people/square/ali.png - packages/flutter_gallery_assets/people/square/ali.png
- packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
# PUBSPEC CHECKSUM: 3c00 # PUBSPEC CHECKSUM: 50bc

View File

@ -34,13 +34,14 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -76,4 +77,4 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: 7c22 # PUBSPEC CHECKSUM: d5de

View File

@ -19,8 +19,8 @@ dependencies:
test: 1.24.5 test: 1.24.5
_discoveryapis_commons: 1.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _discoveryapis_commons: 1.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
archive: 3.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" archive: 3.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -29,6 +29,7 @@ dependencies:
collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
gcloud: 0.8.10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" gcloud: 0.8.10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -74,4 +75,4 @@ dependencies:
dev_dependencies: dev_dependencies:
test_api: 0.6.1 test_api: 0.6.1
# PUBSPEC CHECKSUM: 3f75 # PUBSPEC CHECKSUM: 5232

View File

@ -33,11 +33,12 @@ dev_dependencies:
test: 1.24.5 test: 1.24.5
test_api: 0.6.1 test_api: 0.6.1
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -65,4 +66,4 @@ dev_dependencies:
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: ab03 # PUBSPEC CHECKSUM: 98bf

View File

@ -20,12 +20,13 @@ dependencies:
dev_dependencies: dev_dependencies:
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_parser: 4.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_parser: 4.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -55,4 +56,4 @@ dev_dependencies:
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 4e50 # PUBSPEC CHECKSUM: 3e0d

View File

@ -51,10 +51,11 @@ dependencies:
dev_dependencies: dev_dependencies:
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -72,4 +73,4 @@ dev_dependencies:
watcher: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
web_socket_channel: 2.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 2.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 42e2 # PUBSPEC CHECKSUM: 069f

View File

@ -13,8 +13,8 @@ dependencies:
pub_semver: 2.1.4 pub_semver: 2.1.4
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -24,6 +24,7 @@ dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -66,4 +67,4 @@ dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: 8520 # PUBSPEC CHECKSUM: a7dc

View File

@ -56,13 +56,14 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -92,4 +93,4 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: de87 # PUBSPEC CHECKSUM: 7544

View File

@ -37,13 +37,14 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -80,4 +81,4 @@ flutter:
assets: assets:
- customassets/flutter_logo.png - customassets/flutter_logo.png
# PUBSPEC CHECKSUM: db65 # PUBSPEC CHECKSUM: 2d22

View File

@ -11,8 +11,8 @@ dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -21,6 +21,7 @@ dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -65,4 +66,4 @@ dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: 8fa8 # PUBSPEC CHECKSUM: 3265

View File

@ -13,8 +13,8 @@ dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -23,6 +23,7 @@ dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -74,4 +75,4 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: db65 # PUBSPEC CHECKSUM: 2d22

View File

@ -62,14 +62,15 @@ dev_dependencies:
integration_test: integration_test:
sdk: flutter sdk: flutter
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -276,4 +277,4 @@ flutter:
- asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf - asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf
- asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf - asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf
# PUBSPEC CHECKSUM: e14b # PUBSPEC CHECKSUM: 2d08

View File

@ -14,7 +14,7 @@ dependencies:
camera_android: 0.10.8+5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" camera_android: 0.10.8+5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
camera_avfoundation: 0.9.13+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" camera_avfoundation: 0.9.13+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
camera_platform_interface: 2.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" camera_platform_interface: 2.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
camera_web: 0.3.2+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" camera_web: 0.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
cross_file: 0.3.3+4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" cross_file: 0.3.3+4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -39,4 +39,4 @@ dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: b503 # PUBSPEC CHECKSUM: f4a6

View File

@ -54,13 +54,14 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -90,4 +91,4 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: de87 # PUBSPEC CHECKSUM: 7544

View File

@ -37,13 +37,14 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -77,4 +78,4 @@ flutter:
# the material Icons class. # the material Icons class.
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: db65 # PUBSPEC CHECKSUM: 2d22

View File

@ -11,8 +11,8 @@ dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -21,6 +21,7 @@ dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -65,4 +66,4 @@ dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: 8fa8 # PUBSPEC CHECKSUM: 3265

View File

@ -13,8 +13,8 @@ dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -23,6 +23,7 @@ dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -76,4 +77,4 @@ flutter:
assets: assets:
- assets/foo.png - assets/foo.png
# PUBSPEC CHECKSUM: db65 # PUBSPEC CHECKSUM: 2d22

View File

@ -51,12 +51,13 @@ dev_dependencies:
http: 0.13.6 http: 0.13.6
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -84,4 +85,4 @@ dev_dependencies:
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 0a4a # PUBSPEC CHECKSUM: 9207

View File

@ -11,8 +11,8 @@ dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -21,6 +21,7 @@ dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -62,4 +63,4 @@ dependencies:
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 8fa8 # PUBSPEC CHECKSUM: 3265

View File

@ -12,14 +12,15 @@ dev_dependencies:
path: 1.8.3 path: 1.8.3
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -55,4 +56,4 @@ dev_dependencies:
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 4e50 # PUBSPEC CHECKSUM: 3e0d

View File

@ -23,12 +23,13 @@ dev_dependencies:
test: 1.24.5 test: 1.24.5
test_api: 0.6.1 test_api: 0.6.1
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -57,4 +58,4 @@ dev_dependencies:
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 6047 # PUBSPEC CHECKSUM: 2004

View File

@ -29,11 +29,12 @@ dev_dependencies:
test: 1.24.5 test: 1.24.5
test_api: 0.6.1 test_api: 0.6.1
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -61,4 +62,4 @@ dev_dependencies:
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 1361 # PUBSPEC CHECKSUM: b61e

View File

@ -33,8 +33,8 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -42,6 +42,7 @@ dev_dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -85,4 +86,4 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: b614 # PUBSPEC CHECKSUM: a4d0

View File

@ -21,8 +21,8 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -30,6 +30,7 @@ dev_dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -68,4 +69,4 @@ dev_dependencies:
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: db65 # PUBSPEC CHECKSUM: 2d22

View File

@ -21,8 +21,8 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -30,6 +30,7 @@ dev_dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -71,4 +72,4 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: db65 # PUBSPEC CHECKSUM: 2d22

View File

@ -21,8 +21,8 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -30,6 +30,7 @@ dev_dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -71,4 +72,4 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
# PUBSPEC CHECKSUM: db65 # PUBSPEC CHECKSUM: 2d22

View File

@ -19,8 +19,8 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: 1.24.5 test: 1.24.5
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -28,6 +28,7 @@ dev_dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -64,4 +65,4 @@ dev_dependencies:
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 8520 # PUBSPEC CHECKSUM: a7dc

View File

@ -22,11 +22,11 @@ dev_dependencies:
flutter_goldens: flutter_goldens:
sdk: flutter sdk: flutter
fake_async: 1.3.1 fake_async: 1.3.1
leak_tracker: 9.0.3 leak_tracker: 8.0.3
leak_tracker_testing: 1.0.3 leak_tracker_testing: 1.0.2
_fe_analyzer_shared: 63.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" _fe_analyzer_shared: 62.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 6.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -34,6 +34,7 @@ dev_dependencies:
convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart_internal: 0.2.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@ -73,4 +74,4 @@ dev_dependencies:
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 8b3a # PUBSPEC CHECKSUM: 10f4

View File

@ -12,6 +12,7 @@ import 'dart:ui' as ui;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
void main() { void main() {
/* /*
@ -19,7 +20,7 @@ void main() {
* because [matchesGoldenFile] does not use Skia Gold in its native package. * because [matchesGoldenFile] does not use Skia Gold in its native package.
*/ */
testWidgets('correctly records frames using collate', (WidgetTester tester) async { testWidgetsWithLeakTracking('correctly records frames using collate', (WidgetTester tester) async {
final AnimationSheetBuilder builder = AnimationSheetBuilder(frameSize: _DecuplePixels.size); final AnimationSheetBuilder builder = AnimationSheetBuilder(frameSize: _DecuplePixels.size);
await tester.pumpFrames( await tester.pumpFrames(
@ -56,7 +57,7 @@ void main() {
image.dispose(); image.dispose();
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/56001 }, skip: isBrowser); // https://github.com/flutter/flutter/issues/56001
testWidgets('use allLayers to record out-of-subtree contents', (WidgetTester tester) async { testWidgetsWithLeakTracking('use allLayers to record out-of-subtree contents', (WidgetTester tester) async {
final AnimationSheetBuilder builder = AnimationSheetBuilder( final AnimationSheetBuilder builder = AnimationSheetBuilder(
frameSize: const Size(8, 2), frameSize: const Size(8, 2),
allLayers: true, allLayers: true,

View File

@ -80,7 +80,7 @@ void main() {
// Currently skipped due to daily flake: https://github.com/flutter/flutter/issues/87588 // Currently skipped due to daily flake: https://github.com/flutter/flutter/issues/87588
}, skip: true); // Typically skip: isBrowser https://github.com/flutter/flutter/issues/42767 }, skip: true); // Typically skip: isBrowser https://github.com/flutter/flutter/issues/42767
testWidgets('Should show event indicator for pointer events with setSurfaceSize', (WidgetTester tester) async { testWidgetsWithLeakTracking('Should show event indicator for pointer events with setSurfaceSize', (WidgetTester tester) async {
final AnimationSheetBuilder animationSheet = AnimationSheetBuilder(frameSize: const Size(200, 200), allLayers: true); final AnimationSheetBuilder animationSheet = AnimationSheetBuilder(frameSize: const Size(200, 200), allLayers: true);
final List<Offset> taps = <Offset>[]; final List<Offset> taps = <Offset>[];
Widget target({bool recording = true}) => Container( Widget target({bool recording = true}) => Container(

View File

@ -23,7 +23,7 @@ Future<void> testExecutable(FutureOr<void> Function() testMain) {
// receive the event. // receive the event.
WidgetController.hitTestWarningShouldBeFatal = true; WidgetController.hitTestWarningShouldBeFatal = true;
LeakTracking.warnForUnsupportedPlatforms = false; LeakTrackerGlobalSettings.warnForNonSupportedPlatforms = false;
// Enable golden file testing using Skia Gold. // Enable golden file testing using Skia Gold.
return flutter_goldens.testExecutable(testMain); return flutter_goldens.testExecutable(testMain);

View File

@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// TODO(polina-c): start referencing this code in leak_tracker_flutter
// https://github.com/dart-lang/leak_tracker/issues/52
import 'dart:core'; import 'dart:core';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
@ -13,84 +10,41 @@ import 'package:leak_tracker/leak_tracker.dart';
import 'package:leak_tracker_testing/leak_tracker_testing.dart'; import 'package:leak_tracker_testing/leak_tracker_testing.dart';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
export 'package:leak_tracker/leak_tracker.dart' show LeakDiagnosticConfig; export 'package:leak_tracker/leak_tracker.dart' show LeakDiagnosticConfig, LeakTrackingTestConfig;
/// Set of objects, that does not hold the objects from garbage collection.
void _flutterEventToLeakTracker(ObjectEvent event) {
return LeakTracking.dispatchObjectEvent(event.toMap());
}
void _setUpTestingWithLeakTracking() {
_printPlatformWarningIfNeeded();
if (!_isPlatformSupported) {
return;
}
LeakTracking.phase = const PhaseSettings.paused();
LeakTracking.start(config: LeakTrackingConfig.passive());
MemoryAllocations.instance.addListener(_flutterEventToLeakTracker);
}
bool _stopConfiguringTearDown = false;
/// Sets [tearDownAll] to tear down leak tracking if it is started.
/// ///
/// [configureOnce] is true tear down will be created just once, /// The objects are referenced by hash codes and can duplicate with low probability.
/// not for every test. @visibleForTesting
/// Multiple [tearDownAll] is needed to handle test groups that have class WeakSet {
/// own [tearDownAll]. final Set<String> _objectCodes = <String>{};
void configureLeakTrackingTearDown({
LeaksCallback? onLeaks,
bool configureOnce = false,
}) {
if (_isPlatformSupported && !_stopConfiguringTearDown) {
tearDownAll(() async {
if (LeakTracking.isStarted) {
await _tearDownTestingWithLeakTracking(onLeaks);
}
});
}
if (configureOnce) {
_stopConfiguringTearDown = true;
}
}
Future<void> _tearDownTestingWithLeakTracking(LeaksCallback? onLeaks) async { String _toCode(int hashCode, String type) => '$type-$hashCode';
if (!LeakTracking.isStarted) {
return; void add(Object object) {
} _objectCodes.add(_toCode(identityHashCode(object), object.runtimeType.toString()));
if (!_isPlatformSupported) {
return;
} }
MemoryAllocations.instance.removeListener(_flutterEventToLeakTracker); void addByCode(int hashCode, String type) {
await forceGC(fullGcCycles: 3); _objectCodes.add(_toCode(hashCode, type));
final Leaks leaks = await LeakTracking.collectLeaks();
LeakTracking.stop();
if (leaks.total == 0) {
return;
} }
if (onLeaks == null) {
expect(leaks, isLeakFree); bool contains(int hashCode, String type) {
} else { final bool result = _objectCodes.contains(_toCode(hashCode, type));
onLeaks(leaks); return result;
} }
} }
/// Wrapper for [testWidgets] with memory leak tracking. /// Wrapper for [testWidgets] with memory leak tracking.
/// ///
/// The test will fail if instrumented objects in [callback] are /// The method will fail if instrumented objects in [callback] are
/// garbage collected without being disposed or not garbage /// garbage collected without being disposed.
/// collected soon after disposal.
///
/// [testExecutableWithLeakTracking] must be invoked
/// for this test run.
/// ///
/// More about leak tracking: /// More about leak tracking:
/// https://github.com/dart-lang/leak_tracker. /// https://github.com/dart-lang/leak_tracker.
///
/// See https://github.com/flutter/devtools/issues/3951 for plans
/// on leak tracking.
@isTest @isTest
void testWidgetsWithLeakTracking( void testWidgetsWithLeakTracking(
String description, String description,
@ -100,32 +54,19 @@ void testWidgetsWithLeakTracking(
bool semanticsEnabled = true, bool semanticsEnabled = true,
TestVariant<Object?> variant = const DefaultTestVariant(), TestVariant<Object?> variant = const DefaultTestVariant(),
dynamic tags, dynamic tags,
LeakTrackingTestConfig leakTrackingTestConfig = LeakTrackingTestConfig leakTrackingTestConfig = const LeakTrackingTestConfig(),
const LeakTrackingTestConfig(),
}) { }) {
configureLeakTrackingTearDown(); Future<void> wrappedCallback(WidgetTester tester) async {
await _withFlutterLeakTracking(
final PhaseSettings phase = PhaseSettings( () async => callback(tester),
name: description, tester,
leakDiagnosticConfig: leakTrackingTestConfig.leakDiagnosticConfig, leakTrackingTestConfig,
notGCedAllowList: leakTrackingTestConfig.notGCedAllowList, );
notDisposedAllowList: leakTrackingTestConfig.notDisposedAllowList,
allowAllNotDisposed: leakTrackingTestConfig.allowAllNotDisposed,
allowAllNotGCed: leakTrackingTestConfig.allowAllNotGCed,
);
Future<void> wrappedCallBack(WidgetTester tester) async {
if (!LeakTracking.isStarted) {
_setUpTestingWithLeakTracking();
}
LeakTracking.phase = phase;
await callback(tester);
LeakTracking.phase = const PhaseSettings.paused();
} }
testWidgets( testWidgets(
description, description,
wrappedCallBack, wrappedCallback,
skip: skip, skip: skip,
timeout: timeout, timeout: timeout,
semanticsEnabled: semanticsEnabled, semanticsEnabled: semanticsEnabled,
@ -134,92 +75,132 @@ void testWidgetsWithLeakTracking(
); );
} }
bool _notSupportedWarningPrinted = false; bool _webWarningPrinted = false;
bool get _isPlatformSupported => !kIsWeb;
void _printPlatformWarningIfNeeded() { /// Runs [callback] with leak tracking.
///
/// Wrapper for [withLeakTracking] with Flutter specific functionality.
///
/// The method will fail if wrapped code contains memory leaks.
///
/// See details in documentation for `withLeakTracking` at
/// https://github.com/dart-lang/leak_tracker/blob/main/lib/src/leak_tracking/orchestration.dart
///
/// The Flutter related enhancements are:
/// 1. Listens to [MemoryAllocations] events.
/// 2. Uses `tester.runAsync` for leak detection if [tester] is provided.
///
/// Pass [config] to troubleshoot or exempt leaks. See [LeakTrackingTestConfig]
/// for details.
Future<void> _withFlutterLeakTracking(
DartAsyncCallback callback,
WidgetTester tester,
LeakTrackingTestConfig config,
) async {
// Leak tracker does not work for web platform.
if (kIsWeb) { if (kIsWeb) {
final bool shouldPrintWarning = !_notSupportedWarningPrinted && final bool shouldPrintWarning = !_webWarningPrinted && LeakTrackerGlobalSettings.warnForNonSupportedPlatforms;
LeakTracking.warnForUnsupportedPlatforms;
if (shouldPrintWarning) { if (shouldPrintWarning) {
_notSupportedWarningPrinted = true; _webWarningPrinted = true;
debugPrint( debugPrint('Leak tracking is not supported on web platform.\nTo turn off this message, set `LeakTrackingTestConfig.warnForNonSupportedPlatforms` to false.');
'Leak tracking is not supported on web platform.\nTo turn off this message, set `LeakTracking.warnForNotSupportedPlatforms` to false.',
);
} }
await callback();
return; return;
} }
assert(_isPlatformSupported);
void flutterEventToLeakTracker(ObjectEvent event) {
return dispatchObjectEvent(event.toMap());
}
return TestAsyncUtils.guard<void>(() async {
MemoryAllocations.instance.addListener(flutterEventToLeakTracker);
Future<void> asyncCodeRunner(DartAsyncCallback action) async => tester.runAsync(action);
try {
Leaks leaks = await withLeakTracking(
callback,
asyncCodeRunner: asyncCodeRunner,
leakDiagnosticConfig: config.leakDiagnosticConfig,
shouldThrowOnLeaks: false,
);
leaks = LeakCleaner(config).clean(leaks);
if (leaks.total > 0) {
config.onLeaks?.call(leaks);
if (config.failTestOnLeaks) {
expect(leaks, isLeakFree);
}
}
} finally {
MemoryAllocations.instance.removeListener(flutterEventToLeakTracker);
}
});
} }
/// Configuration for leak tracking in unit tests. /// Cleans leaks that are allowed by [config].
/// @visibleForTesting
/// Customized configuration is needed only for test debugging, class LeakCleaner {
/// not for regular test runs. LeakCleaner(this.config);
class LeakTrackingTestConfig {
/// Creates a new instance of [LeakTrackingTestConfig].
const LeakTrackingTestConfig({
this.leakDiagnosticConfig = const LeakDiagnosticConfig(),
this.notGCedAllowList = const <String, int>{},
this.notDisposedAllowList = const <String, int>{},
this.allowAllNotDisposed = false,
this.allowAllNotGCed = false,
});
/// Creates a new instance of [LeakTrackingTestConfig] for debugging leaks. final LeakTrackingTestConfig config;
///
/// This configuration will collect stack traces on start and disposal,
/// and retaining path for notGCed objects.
LeakTrackingTestConfig.debug({
this.leakDiagnosticConfig = const LeakDiagnosticConfig(
collectStackTraceOnStart: true,
collectStackTraceOnDisposal: true,
collectRetainingPathForNotGCed: true,
),
this.notGCedAllowList = const <String, int>{},
this.notDisposedAllowList = const <String, int>{},
this.allowAllNotDisposed = false,
this.allowAllNotGCed = false,
});
/// Creates a new instance of [LeakTrackingTestConfig] to collect retaining path. static Map<(String, LeakType), int> _countByClassAndType(Leaks leaks) {
/// final Map<(String, LeakType), int> result = <(String, LeakType), int>{};
/// This configuration will not collect stack traces,
/// and will collect retaining path for notGCed objects.
LeakTrackingTestConfig.retainingPath({
this.leakDiagnosticConfig = const LeakDiagnosticConfig(
collectRetainingPathForNotGCed: true,
),
this.notGCedAllowList = const <String, int>{},
this.notDisposedAllowList = const <String, int>{},
this.allowAllNotDisposed = false,
this.allowAllNotGCed = false,
});
/// Classes that are allowed to be not garbage collected after disposal. for (final MapEntry<LeakType, List<LeakReport>> entry in leaks.byType.entries) {
/// for (final LeakReport leak in entry.value) {
/// Maps name of the class, as returned by `object.runtimeType.toString()`, final (String, LeakType) classAndType = (leak.type, entry.key);
/// to the number of instances of the class that are allowed to be not GCed. result[classAndType] = (result[classAndType] ?? 0) + 1;
/// }
/// If number of instances is [null], any number of instances is allowed. }
final Map<String, int?> notGCedAllowList; return result;
}
/// Classes that are allowed to be garbage collected without being disposed. Leaks clean(Leaks leaks) {
/// final Map<(String, LeakType), int> countByClassAndType = _countByClassAndType(leaks);
/// Maps name of the class, as returned by `object.runtimeType.toString()`,
/// to the number of instances of the class that are allowed to be not disposed.
///
/// If number of instances is [null], any number of instances is allowed.
final Map<String, int?> notDisposedAllowList;
/// If true, all notDisposed leaks will be allowed. final Leaks result = Leaks(<LeakType, List<LeakReport>>{
final bool allowAllNotDisposed; for (final LeakType leakType in leaks.byType.keys)
leakType: leaks.byType[leakType]!.where((LeakReport leak) => _shouldReportLeak(leakType, leak, countByClassAndType)).toList()
});
return result;
}
/// If true, all notGCed leaks will be allowed. /// Returns true if [leak] should be reported as failure.
final bool allowAllNotGCed; bool _shouldReportLeak(LeakType leakType, LeakReport leak, Map<(String, LeakType), int> countByClassAndType) {
switch (leakType) {
case LeakType.notDisposed:
if (config.allowAllNotDisposed) {
return false;
}
case LeakType.notGCed:
case LeakType.gcedLate:
if (config.allowAllNotGCed) {
return false;
}
}
/// When to collect stack trace information. final String leakingClass = leak.type;
/// final (String, LeakType) classAndType = (leakingClass, leakType);
/// Knowing call stack may help to troubleshoot memory leaks.
/// Customize this parameter to collect stack traces when needed. bool isAllowedForClass(Map<String, int?> allowList) {
final LeakDiagnosticConfig leakDiagnosticConfig; if (!allowList.containsKey(leakingClass)) {
return false;
}
final int? allowedCount = allowList[leakingClass];
if (allowedCount == null) {
return true;
}
return allowedCount >= countByClassAndType[classAndType]!;
}
switch (leakType) {
case LeakType.notDisposed:
return !isAllowedForClass(config.notDisposedAllowList);
case LeakType.notGCed:
case LeakType.gcedLate:
return !isAllowedForClass(config.notGCedAllowList);
}
}
} }

View File

@ -0,0 +1,235 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker/leak_tracker.dart';
import 'package:leak_tracker_testing/leak_tracker_testing.dart';
import 'leak_tracking.dart';
final String _leakTrackedClassName = '$_LeakTrackedClass';
Leaks _leaksOfAllTypes() => Leaks(<LeakType, List<LeakReport>> {
LeakType.notDisposed: <LeakReport>[LeakReport(code: 1, context: <String, dynamic>{}, type:'myNotDisposedClass', trackedClass: 'myTrackedClass')],
LeakType.notGCed: <LeakReport>[LeakReport(code: 2, context: <String, dynamic>{}, type:'myNotGCedClass', trackedClass: 'myTrackedClass')],
LeakType.gcedLate: <LeakReport>[LeakReport(code: 3, context: <String, dynamic>{}, type:'myGCedLateClass', trackedClass: 'myTrackedClass')],
});
Future<void> main() async {
test('Trivial $LeakCleaner returns all leaks.', () {
final LeakCleaner leakCleaner = LeakCleaner(const LeakTrackingTestConfig());
final Leaks leaks = _leaksOfAllTypes();
final int leakTotal = leaks.total;
final Leaks cleanedLeaks = leakCleaner.clean(leaks);
expect(leaks.total, leakTotal);
expect(cleanedLeaks.total, 3);
});
test('$LeakCleaner catches extra leaks', () {
Leaks leaks = _leaksOfAllTypes();
final LeakReport leak = leaks.notDisposed.first;
leaks.notDisposed.add(leak);
final LeakTrackingTestConfig config = LeakTrackingTestConfig(
notDisposedAllowList: <String, int?>{leak.type: 1},
);
leaks = LeakCleaner(config).clean(leaks);
expect(leaks.notDisposed, hasLength(2));
});
group('Leak tracking works for non-web, and', () {
testWidgetsWithLeakTracking(
'respects all allow lists',
(WidgetTester tester) async {
await tester.pumpWidget(_StatelessLeakingWidget());
},
leakTrackingTestConfig: LeakTrackingTestConfig(
notDisposedAllowList: <String, int?>{_leakTrackedClassName: null},
notGCedAllowList: <String, int?>{_leakTrackedClassName: null},
),
);
testWidgetsWithLeakTracking(
'respects allowAllNotDisposed',
(WidgetTester tester) async {
// ignore: avoid_redundant_argument_values, for readability.
await tester.pumpWidget(_StatelessLeakingWidget(notDisposed: true, notGCed: false));
},
leakTrackingTestConfig: const LeakTrackingTestConfig(
allowAllNotDisposed: true,
),
);
testWidgetsWithLeakTracking(
'respects allowAllNotGCed',
(WidgetTester tester) async {
// ignore: avoid_redundant_argument_values, for readability.
await tester.pumpWidget(_StatelessLeakingWidget(notDisposed: false, notGCed: true));
},
leakTrackingTestConfig: const LeakTrackingTestConfig(
allowAllNotGCed: true,
),
);
testWidgetsWithLeakTracking(
'respects count in allow lists',
(WidgetTester tester) async {
await tester.pumpWidget(_StatelessLeakingWidget());
},
leakTrackingTestConfig: LeakTrackingTestConfig(
notDisposedAllowList: <String, int?>{_leakTrackedClassName: 1},
notGCedAllowList: <String, int?>{_leakTrackedClassName: 1},
),
);
group('fails if number or leaks is more than allowed', () {
// This test cannot run inside other tests because test nesting is forbidden.
// So, `expect` happens outside the tests, in `tearDown`.
late Leaks leaks;
testWidgetsWithLeakTracking(
'for $_StatelessLeakingWidget',
(WidgetTester tester) async {
await tester.pumpWidget(_StatelessLeakingWidget());
await tester.pumpWidget(_StatelessLeakingWidget());
},
leakTrackingTestConfig: LeakTrackingTestConfig(
onLeaks: (Leaks theLeaks) {
leaks = theLeaks;
},
failTestOnLeaks: false,
notDisposedAllowList: <String, int?>{_leakTrackedClassName: 1},
),
);
tearDown(() => _verifyLeaks(leaks, expectedNotDisposed: 2, expectedNotGCed: 2, shouldContainDebugInfo: false));
});
group('respects notGCed allow lists', () {
// These tests cannot run inside other tests because test nesting is forbidden.
// So, `expect` happens outside the tests, in `tearDown`.
late Leaks leaks;
testWidgetsWithLeakTracking(
'when $_StatelessLeakingWidget leaks',
(WidgetTester tester) async {
await tester.pumpWidget(_StatelessLeakingWidget());
},
leakTrackingTestConfig: LeakTrackingTestConfig(
onLeaks: (Leaks theLeaks) {
leaks = theLeaks;
},
failTestOnLeaks: false,
notGCedAllowList: <String, int?>{_leakTrackedClassName: null},
),
);
tearDown(() => _verifyLeaks(leaks, expectedNotDisposed: 1, shouldContainDebugInfo: false));
});
group('catches that', () {
// These test cannot run inside other tests because test nesting is forbidden.
// So, `expect` happens outside the tests, in `tearDown`.
late Leaks leaks;
testWidgetsWithLeakTracking(
'$_StatelessLeakingWidget leaks',
(WidgetTester tester) async {
await tester.pumpWidget(_StatelessLeakingWidget());
},
leakTrackingTestConfig: LeakTrackingTestConfig(
onLeaks: (Leaks theLeaks) {
leaks = theLeaks;
},
failTestOnLeaks: false,
),
);
tearDown(() => _verifyLeaks(leaks, expectedNotDisposed: 1, expectedNotGCed: 1, shouldContainDebugInfo: false));
});
},
skip: isBrowser); // [intended] Leak detection is off for web.
testWidgetsWithLeakTracking('Leak tracking is no-op for web', (WidgetTester tester) async {
await tester.pumpWidget(_StatelessLeakingWidget());
},
skip: !isBrowser); // [intended] Leaks detection is off for web.
}
/// Verifies [leaks] contains expected number of leaks for [_LeakTrackedClass].
void _verifyLeaks(
Leaks leaks, {
int expectedNotDisposed = 0,
int expectedNotGCed = 0,
required bool shouldContainDebugInfo,
}) {
const String linkToLeakTracker = 'https://github.com/dart-lang/leak_tracker';
expect(
() => expect(leaks, isLeakFree),
throwsA(
predicate((Object? e) {
return e is TestFailure && e.toString().contains(linkToLeakTracker);
}),
),
);
_verifyLeakList(leaks.notDisposed, expectedNotDisposed, shouldContainDebugInfo);
_verifyLeakList(leaks.notGCed, expectedNotGCed, shouldContainDebugInfo);
}
void _verifyLeakList(List<LeakReport> list, int expectedCount, bool shouldContainDebugInfo){
expect(list.length, expectedCount);
for (final LeakReport leak in list) {
if (shouldContainDebugInfo) {
expect(leak.context, isNotEmpty);
} else {
expect(leak.context ?? <String, dynamic>{}, isEmpty);
}
expect(leak.trackedClass, contains(_LeakTrackedClass.library));
expect(leak.trackedClass, contains(_leakTrackedClassName));
}
}
/// Storage to keep disposed objects, to generate not-gced leaks.
final List<_LeakTrackedClass> _notGcedStorage = <_LeakTrackedClass>[];
class _StatelessLeakingWidget extends StatelessWidget {
_StatelessLeakingWidget({bool notDisposed = true, bool notGCed = true}) {
if (notDisposed) {
// ignore: unused_local_variable, the variable is used to create non disposed leak
final _LeakTrackedClass notDisposed = _LeakTrackedClass();
}
if (notGCed) {
_notGcedStorage.add(_LeakTrackedClass()..dispose());
}
}
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}
class _LeakTrackedClass {
_LeakTrackedClass() {
dispatchObjectCreated(
library: library,
className: '$_LeakTrackedClass',
object: this,
);
}
static const String library = 'package:my_package/lib/src/my_lib.dart';
void dispose() {
dispatchObjectDisposed(object: this);
}
}

View File

@ -1,4 +0,0 @@
Code in this folder is copied from leak_tracker.
TODO(polina-c): start referencing this code in leak_tracker_flutter
https://github.com/dart-lang/leak_tracker/issues/52

View File

@ -1,8 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const String test1TrackingOnNoLeaks = 'test1, tracking-on, no leaks';
const String test2TrackingOffLeaks = 'test2, tracking-off, leaks';
const String test3TrackingOnLeaks = 'test3, tracking-on, leaks';
const String test4TrackingOnWithStackTrace = 'test4, tracking-on, with stack trace';

View File

@ -1,132 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker/leak_tracker.dart';
import 'package:leak_tracker_testing/leak_tracker_testing.dart';
import '../../leak_tracking.dart';
import '../leaking_widget.dart';
import 'constants.dart';
/// Test configuration for each test library in this directory.
///
/// See https://api.flutter.dev/flutter/flutter_test/flutter_test-library.html.
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
bool leaksDetected = false;
// This tear down should be set before leak tracking tear down in
// order to happen after it and verify that leaks are found.
tearDownAll(() async {
if (!kIsWeb) {
expect(leaksDetected, true, reason: 'leaks should be detected');
}
});
configureLeakTrackingTearDown(
configureOnce: true,
onLeaks: (Leaks leaks) {
expect(leaks.total, greaterThan(0));
leaksDetected = true;
try {
expect(leaks, isLeakFree);
} catch (e) {
if (e is! TestFailure) {
rethrow;
}
expect(e.message, isNot(contains(test1TrackingOnNoLeaks)));
expect(e.message, isNot(contains(test2TrackingOffLeaks)));
expect(e.message, contains('test: $test3TrackingOnLeaks'));
expect(e.message, contains('test: $test4TrackingOnWithStackTrace'));
}
_verifyLeaks(
leaks,
test3TrackingOnLeaks,
notDisposed: 1,
notGCed: 1,
shouldContainDebugInfo: false,
);
_verifyLeaks(
leaks,
test4TrackingOnWithStackTrace,
notDisposed: 1,
notGCed: 1,
shouldContainDebugInfo: true,
);
},
);
setUpAll(() {
LeakTracking.warnForUnsupportedPlatforms = false;
});
await testMain();
}
/// Verifies [allLeaks] contains expected number of leaks for the test [testName].
///
/// [notDisposed] and [notGCed] set number for expected leaks by leak type.
void _verifyLeaks(
Leaks allLeaks,
String testName, {
int notDisposed = 0,
int notGCed = 0,
required bool shouldContainDebugInfo,
}) {
const String linkToLeakTracker = 'https://github.com/dart-lang/leak_tracker';
final Leaks leaks = Leaks(
allLeaks.byType.map(
(LeakType key, List<LeakReport> value) =>
MapEntry<LeakType, List<LeakReport>>(key, value.where((LeakReport leak) => leak.phase == testName).toList()),
),
);
if (notDisposed + notGCed > 0) {
expect(
() => expect(leaks, isLeakFree),
throwsA(
predicate((Object? e) {
return e is TestFailure && e.toString().contains(linkToLeakTracker);
}),
),
);
} else {
expect(leaks, isLeakFree);
}
_verifyLeakList(
leaks.notDisposed,
notDisposed,
shouldContainDebugInfo,
);
_verifyLeakList(
leaks.notGCed,
notGCed,
shouldContainDebugInfo,
);
}
void _verifyLeakList(
List<LeakReport> list,
int expectedCount,
bool shouldContainDebugInfo,
) {
expect(list.length, expectedCount);
for (final LeakReport leak in list) {
if (shouldContainDebugInfo) {
expect(leak.context, isNotEmpty);
} else {
expect(leak.context ?? <String, dynamic>{}, isEmpty);
}
expect(leak.trackedClass, contains(LeakTrackedClass.library));
expect(leak.trackedClass, contains('$LeakTrackedClass'));
}
}

View File

@ -1,57 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/src/foundation/constants.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker/leak_tracker.dart';
import '../../leak_tracking.dart';
import '../leaking_widget.dart';
const String test1TrackingOnNoLeaks = 'test1, tracking-on, no leaks';
const String test2TrackingOffLeaks = 'test2, tracking-off, leaks';
const String test3TrackingOnLeaks = 'test3, tracking-on, leaks';
const String test4TrackingOnWithStackTrace = 'test4, tracking-on, with stack trace';
bool get _isTrackingOn => !LeakTracking.phase.isPaused && LeakTracking.isStarted;
/// For these tests `expect` for found leaks happens in flutter_test_config.dart.
void main() {
group('group', () {
testWidgetsWithLeakTracking(test1TrackingOnNoLeaks, (WidgetTester widgetTester) async {
expect(_isTrackingOn, true);
expect(LeakTracking.phase.name, test1TrackingOnNoLeaks);
await widgetTester.pumpWidget(Container());
});
testWidgets(test2TrackingOffLeaks, (WidgetTester widgetTester) async {
expect(LeakTracking.phase.name, null);
expect(_isTrackingOn, false);
await widgetTester.pumpWidget(StatelessLeakingWidget());
});
},
skip: kIsWeb); // [intended] Leak tracking is off for web.
testWidgetsWithLeakTracking(test3TrackingOnLeaks, (WidgetTester widgetTester) async {
expect(_isTrackingOn, true);
expect(LeakTracking.phase.name, test3TrackingOnLeaks);
await widgetTester.pumpWidget(StatelessLeakingWidget());
},
skip: kIsWeb); // [intended] Leak tracking is off for web.
testWidgetsWithLeakTracking(
test4TrackingOnWithStackTrace,
(WidgetTester widgetTester) async {
expect(_isTrackingOn, true);
expect(LeakTracking.phase.name, test4TrackingOnWithStackTrace);
await widgetTester.pumpWidget(StatelessLeakingWidget());
},
leakTrackingTestConfig: const LeakTrackingTestConfig(
leakDiagnosticConfig: LeakDiagnosticConfig(
collectStackTraceOnStart: true,
),
),
skip: kIsWeb); // [intended] Leak tracking is off for web.
}

View File

@ -1,49 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/widgets.dart';
import 'package:leak_tracker/leak_tracker.dart';
class LeakTrackedClass {
LeakTrackedClass() {
LeakTracking.dispatchObjectCreated(
library: library,
className: '$LeakTrackedClass',
object: this,
);
}
static const String library = 'package:my_package/lib/src/my_lib.dart';
void dispose() {
LeakTracking.dispatchObjectDisposed(object: this);
}
}
final List<LeakTrackedClass> _notGcedStorage = <LeakTrackedClass>[];
class StatelessLeakingWidget extends StatelessWidget {
StatelessLeakingWidget({
super.key,
this.notGCed = true,
this.notDisposed = true,
}) {
if (notGCed) {
_notGcedStorage.add(LeakTrackedClass()..dispose());
}
if (notDisposed) {
// ignore: unused_local_variable
final LeakTrackedClass notDisposedObject = LeakTrackedClass();
}
}
final bool notGCed;
final bool notDisposed;
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}

View File

@ -1,51 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker/leak_tracker.dart';
import '../leak_tracking.dart';
import 'leaking_widget.dart';
const String _test0TrackingOffLeaks = 'test0, tracking-off';
const String _test1TrackingOn = 'test1, tracking-on';
const String _test2TrackingOffLeaks = 'test2, tracking-off';
const String _test3TrackingOn = 'test3, tracking-on';
bool get _isTrackingOn => !LeakTracking.phase.isPaused && LeakTracking.isStarted;
/// Tests with default leak tracking configuration.
///
/// This set of tests verifies that if `testWidgetsWithLeakTracking` is used at least once,
/// leak tracking is configured as expected, and is noop for `testWidgets`.
void main() {
group('groups are handled', () {
testWidgets(_test0TrackingOffLeaks, (WidgetTester widgetTester) async {
// Flutter test engine may change test order.
expect(_isTrackingOn, false);
expect(LeakTracking.phase.name, null);
await widgetTester.pumpWidget(StatelessLeakingWidget());
});
testWidgetsWithLeakTracking(_test1TrackingOn, (WidgetTester widgetTester) async {
expect(_isTrackingOn, true);
expect(LeakTracking.phase.name, _test1TrackingOn);
});
testWidgets(_test2TrackingOffLeaks, (WidgetTester widgetTester) async {
expect(_isTrackingOn, false);
expect(LeakTracking.phase.name, null);
await widgetTester.pumpWidget(StatelessLeakingWidget());
});
},
skip: kIsWeb); // [intended] Leak tracking is off for web.
testWidgetsWithLeakTracking(_test3TrackingOn, (WidgetTester widgetTester) async {
expect(_isTrackingOn, true);
expect(LeakTracking.phase.name, _test3TrackingOn);
expect(LeakTracking.phase.isPaused, false);
},
skip: kIsWeb); // [intended] Leak tracking is off for web.
}

View File

@ -1,21 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker/leak_tracker.dart';
import 'leaking_widget.dart';
void main() {
testWidgets(
'Leak tracking is not started without `testWidgetsWithLeakTracking`',
(WidgetTester widgetTester) async {
expect(LeakTracking.isStarted, false);
expect(LeakTracking.phase.name, null);
await widgetTester.pumpWidget(StatelessLeakingWidget());
},
skip: kIsWeb); // [intended] Leak tracking is off for web.
}

View File

@ -12,7 +12,7 @@ import '../foundation/leak_tracking.dart';
void main() { void main() {
group('Horizontal', () { group('Horizontal', () {
testWidgets('gets local coordinates', (WidgetTester tester) async { testWidgetsWithLeakTracking('gets local coordinates', (WidgetTester tester) async {
int dragCancelCount = 0; int dragCancelCount = 0;
final List<DragDownDetails> downDetails = <DragDownDetails>[]; final List<DragDownDetails> downDetails = <DragDownDetails>[];
final List<DragEndDetails> endDetails = <DragEndDetails>[]; final List<DragEndDetails> endDetails = <DragEndDetails>[];

View File

@ -5,8 +5,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
void main() { void main() {
testWidgets('gets local coordinates', (WidgetTester tester) async { testWidgetsWithLeakTracking('gets local coordinates', (WidgetTester tester) async {
final List<ScaleStartDetails> startDetails = <ScaleStartDetails>[]; final List<ScaleStartDetails> startDetails = <ScaleStartDetails>[];
final List<ScaleUpdateDetails> updateDetails = <ScaleUpdateDetails>[]; final List<ScaleUpdateDetails> updateDetails = <ScaleUpdateDetails>[];

View File

@ -58,7 +58,7 @@ void main() {
expect(find.text('View licenses'), findsOneWidget); expect(find.text('View licenses'), findsOneWidget);
}); });
testWidgets('Material2 - AboutListTile control test', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material2 - AboutListTile control test', (WidgetTester tester) async {
const FlutterLogo logo = FlutterLogo(); const FlutterLogo logo = FlutterLogo();
await tester.pumpWidget( await tester.pumpWidget(
@ -141,7 +141,7 @@ void main() {
expect(find.text('Pirate license'), findsOneWidget); expect(find.text('Pirate license'), findsOneWidget);
}); });
testWidgets('Material3 - AboutListTile control test', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - AboutListTile control test', (WidgetTester tester) async {
const FlutterLogo logo = FlutterLogo(); const FlutterLogo logo = FlutterLogo();
await tester.pumpWidget( await tester.pumpWidget(
@ -1477,7 +1477,7 @@ void main() {
expect(find.text('Exception: Injected failure'), findsOneWidget); expect(find.text('Exception: Injected failure'), findsOneWidget);
}); });
testWidgets('Material2 - LicensePage master view layout position - ltr', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material2 - LicensePage master view layout position - ltr', (WidgetTester tester) async {
const TextDirection textDirection = TextDirection.ltr; const TextDirection textDirection = TextDirection.ltr;
const Size defaultSize = Size(800.0, 600.0); const Size defaultSize = Size(800.0, 600.0);
const Size wideSize = Size(1200.0, 600.0); const Size wideSize = Size(1200.0, 600.0);
@ -1542,7 +1542,7 @@ void main() {
expect(tester.getCenter(find.byType(ListView)), const Offset(160, 356)); expect(tester.getCenter(find.byType(ListView)), const Offset(160, 356));
}); });
testWidgets('Material3 - LicensePage master view layout position - ltr', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - LicensePage master view layout position - ltr', (WidgetTester tester) async {
const TextDirection textDirection = TextDirection.ltr; const TextDirection textDirection = TextDirection.ltr;
const Size defaultSize = Size(800.0, 600.0); const Size defaultSize = Size(800.0, 600.0);
const Size wideSize = Size(1200.0, 600.0); const Size wideSize = Size(1200.0, 600.0);
@ -1607,7 +1607,7 @@ void main() {
expect(tester.getCenter(find.byType(ListView)), const Offset(160, 356)); expect(tester.getCenter(find.byType(ListView)), const Offset(160, 356));
}); });
testWidgets('Material2 - LicensePage master view layout position - rtl', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material2 - LicensePage master view layout position - rtl', (WidgetTester tester) async {
const TextDirection textDirection = TextDirection.rtl; const TextDirection textDirection = TextDirection.rtl;
const Size defaultSize = Size(800.0, 600.0); const Size defaultSize = Size(800.0, 600.0);
const Size wideSize = Size(1200.0, 600.0); const Size wideSize = Size(1200.0, 600.0);
@ -1672,7 +1672,7 @@ void main() {
expect(tester.getCenter(find.byType(ListView)), const Offset(1040.0, 356.0)); expect(tester.getCenter(find.byType(ListView)), const Offset(1040.0, 356.0));
}); });
testWidgets('Material3 - LicensePage master view layout position - rtl', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - LicensePage master view layout position - rtl', (WidgetTester tester) async {
const TextDirection textDirection = TextDirection.rtl; const TextDirection textDirection = TextDirection.rtl;
const Size defaultSize = Size(800.0, 600.0); const Size defaultSize = Size(800.0, 600.0);
const Size wideSize = Size(1200.0, 600.0); const Size wideSize = Size(1200.0, 600.0);
@ -1737,7 +1737,7 @@ void main() {
expect(tester.getCenter(find.byType(ListView)), const Offset(1040.0, 356.0)); expect(tester.getCenter(find.byType(ListView)), const Offset(1040.0, 356.0));
}); });
testWidgets('License page title in lateral UI does not use AppBarTheme.foregroundColor', (WidgetTester tester) async { testWidgetsWithLeakTracking('License page title in lateral UI does not use AppBarTheme.foregroundColor', (WidgetTester tester) async {
// This is a regression test for https://github.com/flutter/flutter/issues/108991 // This is a regression test for https://github.com/flutter/flutter/issues/108991
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
appBarTheme: const AppBarTheme(foregroundColor: Color(0xFFFFFFFF)), appBarTheme: const AppBarTheme(foregroundColor: Color(0xFFFFFFFF)),

View File

@ -112,7 +112,7 @@ void main() {
expect(find.byKey(key), findsOneWidget); expect(find.byKey(key), findsOneWidget);
}); });
testWidgets('Can build from EditableTextState', (WidgetTester tester) async { testWidgetsWithLeakTracking('Can build from EditableTextState', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
@ -233,7 +233,7 @@ void main() {
); );
group('buttonItems', () { group('buttonItems', () {
testWidgets('getEditableTextButtonItems builds the correct button items per-platform', (WidgetTester tester) async { testWidgetsWithLeakTracking('getEditableTextButtonItems builds the correct button items per-platform', (WidgetTester tester) async {
// Fill the clipboard so that the Paste option is available in the text // Fill the clipboard so that the Paste option is available in the text
// selection menu. // selection menu.
await Clipboard.setData(const ClipboardData(text: 'Clipboard data')); await Clipboard.setData(const ClipboardData(text: 'Clipboard data'));
@ -328,7 +328,7 @@ void main() {
skip: kIsWeb, // [intended] skip: kIsWeb, // [intended]
); );
testWidgets('getAdaptiveButtons builds the correct button widgets per-platform', (WidgetTester tester) async { testWidgetsWithLeakTracking('getAdaptiveButtons builds the correct button widgets per-platform', (WidgetTester tester) async {
const String buttonText = 'Click me'; const String buttonText = 'Click me';
await tester.pumpWidget( await tester.pumpWidget(

View File

@ -171,7 +171,7 @@ void main() {
expect(material.clipBehavior, clipBehavior); expect(material.clipBehavior, clipBehavior);
}); });
testWidgets('Modal bottom sheet-specific parameters are used for modal bottom sheets', (WidgetTester tester) async { testWidgetsWithLeakTracking('Modal bottom sheet-specific parameters are used for modal bottom sheets', (WidgetTester tester) async {
const double modalElevation = 5.0; const double modalElevation = 5.0;
const double persistentElevation = 7.0; const double persistentElevation = 7.0;
const Color modalBackgroundColor = Colors.yellow; const Color modalBackgroundColor = Colors.yellow;
@ -250,7 +250,7 @@ void main() {
expect(material.color, null); expect(material.color, null);
}); });
testWidgets('Modal bottom sheets respond to theme changes', (WidgetTester tester) async { testWidgetsWithLeakTracking('Modal bottom sheets respond to theme changes', (WidgetTester tester) async {
const double lightElevation = 5.0; const double lightElevation = 5.0;
const double darkElevation = 3.0; const double darkElevation = 3.0;
const Color lightBackgroundColor = Colors.green; const Color lightBackgroundColor = Colors.green;

View File

@ -341,7 +341,7 @@ void main() {
group('layoutBehavior', () { group('layoutBehavior', () {
testWidgets('ButtonBar has a min height of 52 when using ButtonBarLayoutBehavior.constrained', (WidgetTester tester) async { testWidgetsWithLeakTracking('ButtonBar has a min height of 52 when using ButtonBarLayoutBehavior.constrained', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const SingleChildScrollView( const SingleChildScrollView(
child: ListBody( child: ListBody(
@ -364,7 +364,7 @@ void main() {
expect(tester.getBottomRight(buttonBar).dy - tester.getTopRight(buttonBar).dy, 52.0); expect(tester.getBottomRight(buttonBar).dy - tester.getTopRight(buttonBar).dy, 52.0);
}); });
testWidgets('ButtonBar has padding applied when using ButtonBarLayoutBehavior.padded', (WidgetTester tester) async { testWidgetsWithLeakTracking('ButtonBar has padding applied when using ButtonBarLayoutBehavior.padded', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const SingleChildScrollView( const SingleChildScrollView(
child: ListBody( child: ListBody(

View File

@ -496,8 +496,6 @@ void main() {
await tester.pump(); await tester.pump();
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking('CheckboxListTile can be disabled', (WidgetTester tester) async { testWidgetsWithLeakTracking('CheckboxListTile can be disabled', (WidgetTester tester) async {

View File

@ -302,7 +302,7 @@ void main() {
expect(_getCheckboxMaterial(tester), paints..path(color: selectedFillColor)); expect(_getCheckboxMaterial(tester), paints..path(color: selectedFillColor));
}); });
testWidgets('Checkbox theme overlay color resolves in active/pressed states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Checkbox theme overlay color resolves in active/pressed states', (WidgetTester tester) async {
const Color activePressedOverlayColor = Color(0xFF000001); const Color activePressedOverlayColor = Color(0xFF000001);
const Color inactivePressedOverlayColor = Color(0xFF000002); const Color inactivePressedOverlayColor = Color(0xFF000002);

View File

@ -701,7 +701,7 @@ void main() {
expect(calledDelete, isFalse); expect(calledDelete, isFalse);
}); });
testWidgets('Chip elements are ordered horizontally for locale', (WidgetTester tester) async { testWidgetsWithLeakTracking('Chip elements are ordered horizontally for locale', (WidgetTester tester) async {
final UniqueKey iconKey = UniqueKey(); final UniqueKey iconKey = UniqueKey();
final Widget test = Overlay( final Widget test = Overlay(
initialEntries: <OverlayEntry>[ initialEntries: <OverlayEntry>[
@ -877,7 +877,7 @@ void main() {
expect(tester.getSize(find.byKey(keyA)), equals(const Size(20.0, 20.0))); expect(tester.getSize(find.byKey(keyA)), equals(const Size(20.0, 20.0)));
}); });
testWidgets('Chip padding - LTR', (WidgetTester tester) async { testWidgetsWithLeakTracking('Chip padding - LTR', (WidgetTester tester) async {
final GlobalKey keyA = GlobalKey(); final GlobalKey keyA = GlobalKey();
final GlobalKey keyB = GlobalKey(); final GlobalKey keyB = GlobalKey();
await tester.pumpWidget( await tester.pumpWidget(
@ -913,7 +913,7 @@ void main() {
expect(tester.getBottomRight(find.byType(Icon)), const Offset(457.0, 309.0)); expect(tester.getBottomRight(find.byType(Icon)), const Offset(457.0, 309.0));
}); });
testWidgets('Chip padding - RTL', (WidgetTester tester) async { testWidgetsWithLeakTracking('Chip padding - RTL', (WidgetTester tester) async {
final GlobalKey keyA = GlobalKey(); final GlobalKey keyA = GlobalKey();
final GlobalKey keyB = GlobalKey(); final GlobalKey keyB = GlobalKey();
await tester.pumpWidget( await tester.pumpWidget(
@ -2633,7 +2633,7 @@ void main() {
expect(find.byType(InkWell), findsOneWidget); expect(find.byType(InkWell), findsOneWidget);
}); });
testWidgets('Chip uses stateful color for text color in different states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Chip uses stateful color for text color in different states', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
const Color pressedColor = Color(0x00000001); const Color pressedColor = Color(0x00000001);
@ -2721,7 +2721,7 @@ void main() {
expect(textColor(), disabledColor); expect(textColor(), disabledColor);
}); });
testWidgets('Chip uses stateful border side color in different states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Chip uses stateful border side color in different states', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
const Color pressedColor = Color(0x00000001); const Color pressedColor = Color(0x00000001);
@ -2801,7 +2801,7 @@ void main() {
expect(find.byType(RawChip), paints..rrect()..rrect(color: disabledColor)); expect(find.byType(RawChip), paints..rrect()..rrect(color: disabledColor));
}); });
testWidgets('Chip uses stateful border side color from resolveWith', (WidgetTester tester) async { testWidgetsWithLeakTracking('Chip uses stateful border side color from resolveWith', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
const Color pressedColor = Color(0x00000001); const Color pressedColor = Color(0x00000001);
@ -2882,7 +2882,7 @@ void main() {
}); });
testWidgets('Chip uses stateful nullable border side color from resolveWith', (WidgetTester tester) async { testWidgetsWithLeakTracking('Chip uses stateful nullable border side color from resolveWith', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
const Color pressedColor = Color(0x00000001); const Color pressedColor = Color(0x00000001);
@ -2971,7 +2971,7 @@ void main() {
expect(find.byType(RawChip), paints..rrect()..rrect(color: disabledColor)); expect(find.byType(RawChip), paints..rrect()..rrect(color: disabledColor));
}); });
testWidgets('Chip uses stateful shape in different states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Chip uses stateful shape in different states', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
OutlinedBorder? getShape(Set<MaterialState> states) { OutlinedBorder? getShape(Set<MaterialState> states) {
@ -3339,7 +3339,7 @@ void main() {
expect(decoration.shape, shape); expect(decoration.shape, shape);
}); });
testWidgets('Chip highlight color is drawn on top of the backgroundColor', (WidgetTester tester) async { testWidgetsWithLeakTracking('Chip highlight color is drawn on top of the backgroundColor', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(debugLabel: 'RawChip'); final FocusNode focusNode = FocusNode(debugLabel: 'RawChip');
tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional; tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional;
const Color backgroundColor = Color(0xff00ff00); const Color backgroundColor = Color(0xff00ff00);

View File

@ -641,8 +641,6 @@ void main() {
await tester.pumpWidget(chipWidget(enabled: false)); await tester.pumpWidget(chipWidget(enabled: false));
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(textColor(), disabledColor); expect(textColor(), disabledColor);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Chip uses stateful border side from resolveWith pattern', (WidgetTester tester) async { testWidgetsWithLeakTracking('Chip uses stateful border side from resolveWith pattern', (WidgetTester tester) async {

View File

@ -261,7 +261,6 @@ void main() {
// https://github.com/flutter/flutter/issues/130354 // https://github.com/flutter/flutter/issues/130354
leakTrackingTestConfig: const LeakTrackingTestConfig( leakTrackingTestConfig: const LeakTrackingTestConfig(
allowAllNotGCed: true, allowAllNotGCed: true,
allowAllNotDisposed: true,
)); ));
}); });

View File

@ -2338,7 +2338,7 @@ void main() {
}); });
group('AlertDialog.scrollable: ', () { group('AlertDialog.scrollable: ', () {
testWidgets('Title is scrollable', (WidgetTester tester) async { testWidgetsWithLeakTracking('Title is scrollable', (WidgetTester tester) async {
final Key titleKey = UniqueKey(); final Key titleKey = UniqueKey();
final AlertDialog dialog = AlertDialog( final AlertDialog dialog = AlertDialog(
title: Container( title: Container(
@ -2378,7 +2378,7 @@ void main() {
expect(box.localToGlobal(Offset.zero), equals(originalOffset.translate(0.0, -200.0))); expect(box.localToGlobal(Offset.zero), equals(originalOffset.translate(0.0, -200.0)));
}); });
testWidgets('Title and content are scrollable', (WidgetTester tester) async { testWidgetsWithLeakTracking('Title and content are scrollable', (WidgetTester tester) async {
final Key titleKey = UniqueKey(); final Key titleKey = UniqueKey();
final Key contentKey = UniqueKey(); final Key contentKey = UniqueKey();
final AlertDialog dialog = AlertDialog( final AlertDialog dialog = AlertDialog(
@ -2511,7 +2511,7 @@ void main() {
semantics.dispose(); semantics.dispose();
}); });
testWidgets('DialogRoute is state restorable', (WidgetTester tester) async { testWidgetsWithLeakTracking('DialogRoute is state restorable', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const MaterialApp( const MaterialApp(
restorationScopeId: 'app', restorationScopeId: 'app',
@ -2660,9 +2660,6 @@ void main() {
expect(await previousFocus(), true); expect(await previousFocus(), true);
expect(okNode.hasFocus, true); expect(okNode.hasFocus, true);
expect(cancelNode.hasFocus, false); expect(cancelNode.hasFocus, false);
cancelNode.dispose();
okNode.dispose();
}); });
testWidgets('Adaptive AlertDialog shows correct widget on each platform', (WidgetTester tester) async { testWidgets('Adaptive AlertDialog shows correct widget on each platform', (WidgetTester tester) async {
@ -2767,7 +2764,7 @@ void main() {
expect(find.text('Dialog2'), findsOneWidget); expect(find.text('Dialog2'), findsOneWidget);
}); });
testWidgets('Uses open focus traversal when overridden', (WidgetTester tester) async { testWidgetsWithLeakTracking('Uses open focus traversal when overridden', (WidgetTester tester) async {
final FocusNode okNode = FocusNode(); final FocusNode okNode = FocusNode();
final FocusNode cancelNode = FocusNode(); final FocusNode cancelNode = FocusNode();

View File

@ -9,7 +9,7 @@ import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart'; import '../foundation/leak_tracking.dart';
void main() { void main() {
testWidgets('DrawerButton control test', (WidgetTester tester) async { testWidgetsWithLeakTracking('DrawerButton control test', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const MaterialApp( const MaterialApp(
home: Scaffold( home: Scaffold(
@ -171,7 +171,7 @@ void main() {
handle.dispose(); handle.dispose();
}, variant: TargetPlatformVariant.all()); }, variant: TargetPlatformVariant.all());
testWidgets('EndDrawerButton control test', (WidgetTester tester) async { testWidgetsWithLeakTracking('EndDrawerButton control test', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const MaterialApp( const MaterialApp(
home: Scaffold( home: Scaffold(

View File

@ -7,6 +7,8 @@ import 'dart:math' as math;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
const List<String> menuItems = <String>['one', 'two', 'three', 'four']; const List<String> menuItems = <String>['one', 'two', 'three', 'four'];
void onChanged<T>(T _) { } void onChanged<T>(T _) { }
final Type dropdownButtonType = DropdownButton<String>( final Type dropdownButtonType = DropdownButton<String>(
@ -198,7 +200,7 @@ void main() {
expect(hintEmptyLabel, oneValueLabel); expect(hintEmptyLabel, oneValueLabel);
}); });
testWidgets('label position test - show disabledHint: disable', (WidgetTester tester) async { testWidgetsWithLeakTracking('label position test - show disabledHint: disable', (WidgetTester tester) async {
int? value; int? value;
await tester.pumpWidget( await tester.pumpWidget(
@ -236,7 +238,7 @@ void main() {
expect(hintEmptyLabel, const Offset(0.0, 12.0)); expect(hintEmptyLabel, const Offset(0.0, 12.0));
}); });
testWidgets('label position test - show disabledHint: enable + null item', (WidgetTester tester) async { testWidgetsWithLeakTracking('label position test - show disabledHint: enable + null item', (WidgetTester tester) async {
int? value; int? value;
await tester.pumpWidget( await tester.pumpWidget(
@ -261,7 +263,7 @@ void main() {
expect(hintEmptyLabel, const Offset(0.0, 12.0)); expect(hintEmptyLabel, const Offset(0.0, 12.0));
}); });
testWidgets('label position test - show disabledHint: enable + empty item', (WidgetTester tester) async { testWidgetsWithLeakTracking('label position test - show disabledHint: enable + empty item', (WidgetTester tester) async {
int? value; int? value;
await tester.pumpWidget( await tester.pumpWidget(
@ -311,7 +313,7 @@ void main() {
expect(hintEmptyLabel, const Offset(0.0, 12.0)); expect(hintEmptyLabel, const Offset(0.0, 12.0));
}); });
testWidgets('label position test - no hint shown: enable + no selected + disabledHint', (WidgetTester tester) async { testWidgetsWithLeakTracking('label position test - no hint shown: enable + no selected + disabledHint', (WidgetTester tester) async {
int? value; int? value;
await tester.pumpWidget( await tester.pumpWidget(
@ -349,7 +351,7 @@ void main() {
expect(hintEmptyLabel, const Offset(0.0, 24.0)); expect(hintEmptyLabel, const Offset(0.0, 24.0));
}); });
testWidgets('label position test - show selected item: disabled + hint + disabledHint', (WidgetTester tester) async { testWidgetsWithLeakTracking('label position test - show selected item: disabled + hint + disabledHint', (WidgetTester tester) async {
const int value = 1; const int value = 1;
await tester.pumpWidget( await tester.pumpWidget(
@ -389,7 +391,7 @@ void main() {
}); });
// Regression test for https://github.com/flutter/flutter/issues/82910 // Regression test for https://github.com/flutter/flutter/issues/82910
testWidgets('null value test', (WidgetTester tester) async { testWidgetsWithLeakTracking('null value test', (WidgetTester tester) async {
int? value = 1; int? value = 1;
await tester.pumpWidget( await tester.pumpWidget(
@ -490,7 +492,7 @@ void main() {
expect(value, equals('three')); expect(value, equals('three'));
}); });
testWidgets('DropdownButtonFormField arrow icon aligns with the edge of button when expanded', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField arrow icon aligns with the edge of button when expanded', (WidgetTester tester) async {
final Key buttonKey = UniqueKey(); final Key buttonKey = UniqueKey();
// There shouldn't be overflow when expanded although list contains longer items. // There shouldn't be overflow when expanded although list contains longer items.
@ -525,7 +527,7 @@ void main() {
); );
}); });
testWidgets('DropdownButtonFormField with isDense:true aligns selected menu item', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField with isDense:true aligns selected menu item', (WidgetTester tester) async {
final Key buttonKey = UniqueKey(); final Key buttonKey = UniqueKey();
await tester.pumpWidget( await tester.pumpWidget(
@ -565,7 +567,7 @@ void main() {
} }
}); });
testWidgets('DropdownButtonFormField with isDense:true does not clip large scale text', testWidgetsWithLeakTracking('DropdownButtonFormField with isDense:true does not clip large scale text',
(WidgetTester tester) async { (WidgetTester tester) async {
final Key buttonKey = UniqueKey(); final Key buttonKey = UniqueKey();
const String value = 'two'; const String value = 'two';
@ -604,7 +606,7 @@ void main() {
expect(box.size.height, 72.0); expect(box.size.height, 72.0);
}); });
testWidgets('DropdownButtonFormField.isDense is true by default', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField.isDense is true by default', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/46844 // Regression test for https://github.com/flutter/flutter/issues/46844
final Key buttonKey = UniqueKey(); final Key buttonKey = UniqueKey();
const String value = 'two'; const String value = 'two';
@ -635,7 +637,7 @@ void main() {
expect(box.size.height, 48.0); expect(box.size.height, 48.0);
}); });
testWidgets('DropdownButtonFormField - custom text style', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField - custom text style', (WidgetTester tester) async {
const String value = 'foo'; const String value = 'foo';
final UniqueKey itemKey = UniqueKey(); final UniqueKey itemKey = UniqueKey();
@ -673,7 +675,7 @@ void main() {
expect(richText.text.style!.fontSize, 20.0); expect(richText.text.style!.fontSize, 20.0);
}); });
testWidgets('DropdownButtonFormField - disabledHint displays when the items list is empty, when items is null', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField - disabledHint displays when the items list is empty, when items is null', (WidgetTester tester) async {
final Key buttonKey = UniqueKey(); final Key buttonKey = UniqueKey();
Widget build({ List<String>? items }) { Widget build({ List<String>? items }) {
@ -696,7 +698,7 @@ void main() {
expect(find.text('disabled'), findsOneWidget); expect(find.text('disabled'), findsOneWidget);
}); });
testWidgets( testWidgetsWithLeakTracking(
'DropdownButtonFormField - hint displays when the items list is ' 'DropdownButtonFormField - hint displays when the items list is '
'empty, items is null, and disabledHint is null', 'empty, items is null, and disabledHint is null',
(WidgetTester tester) async { (WidgetTester tester) async {
@ -720,7 +722,7 @@ void main() {
}, },
); );
testWidgets('DropdownButtonFormField - disabledHint is null by default', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField - disabledHint is null by default', (WidgetTester tester) async {
final Key buttonKey = UniqueKey(); final Key buttonKey = UniqueKey();
Widget build({ List<String>? items }) { Widget build({ List<String>? items }) {
@ -740,7 +742,7 @@ void main() {
expect(find.text('hint used when disabled'), findsOneWidget); expect(find.text('hint used when disabled'), findsOneWidget);
}); });
testWidgets('DropdownButtonFormField - disabledHint is null by default', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField - disabledHint is null by default', (WidgetTester tester) async {
final Key buttonKey = UniqueKey(); final Key buttonKey = UniqueKey();
Widget build({ List<String>? items }) { Widget build({ List<String>? items }) {
@ -760,7 +762,7 @@ void main() {
expect(find.text('hint used when disabled'), findsOneWidget); expect(find.text('hint used when disabled'), findsOneWidget);
}); });
testWidgets('DropdownButtonFormField - disabledHint displays when onChanged is null', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField - disabledHint displays when onChanged is null', (WidgetTester tester) async {
final Key buttonKey = UniqueKey(); final Key buttonKey = UniqueKey();
Widget build({ List<String>? items, ValueChanged<String?>? onChanged }) { Widget build({ List<String>? items, ValueChanged<String?>? onChanged }) {
@ -778,7 +780,7 @@ void main() {
expect(find.text('disabled'), findsOneWidget); expect(find.text('disabled'), findsOneWidget);
}); });
testWidgets('DropdownButtonFormField - disabled hint should be of same size as enabled hint', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField - disabled hint should be of same size as enabled hint', (WidgetTester tester) async {
final Key buttonKey = UniqueKey(); final Key buttonKey = UniqueKey();
Widget build({ List<String>? items}) { Widget build({ List<String>? items}) {
@ -803,7 +805,7 @@ void main() {
expect(enabledHintBox.size, equals(disabledHintBox.size)); expect(enabledHintBox.size, equals(disabledHintBox.size));
}); });
testWidgets('DropdownButtonFormField - Custom icon size and colors', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField - Custom icon size and colors', (WidgetTester tester) async {
final Key iconKey = UniqueKey(); final Key iconKey = UniqueKey();
final Icon customIcon = Icon(Icons.assessment, key: iconKey); final Icon customIcon = Icon(Icons.assessment, key: iconKey);
@ -836,7 +838,7 @@ void main() {
expect(disabledRichText.text.style!.color, Colors.orange); expect(disabledRichText.text.style!.color, Colors.orange);
}); });
testWidgets('DropdownButtonFormField - default elevation', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField - default elevation', (WidgetTester tester) async {
final Key buttonKey = UniqueKey(); final Key buttonKey = UniqueKey();
debugDisableShadows = false; debugDisableShadows = false;
await tester.pumpWidget(buildFormFrame( await tester.pumpWidget(buildFormFrame(
@ -893,7 +895,7 @@ void main() {
debugDisableShadows = true; debugDisableShadows = true;
}); });
testWidgets('DropdownButtonFormField does not allow duplicate item values', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField does not allow duplicate item values', (WidgetTester tester) async {
final List<DropdownMenuItem<String>> itemsWithDuplicateValues = <String>['a', 'b', 'c', 'c'] final List<DropdownMenuItem<String>> itemsWithDuplicateValues = <String>['a', 'b', 'c', 'c']
.map<DropdownMenuItem<String>>((String value) { .map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>( return DropdownMenuItem<String>(
@ -922,7 +924,7 @@ void main() {
); );
}); });
testWidgets('DropdownButtonFormField value should only appear in one menu item', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField value should only appear in one menu item', (WidgetTester tester) async {
final List<DropdownMenuItem<String>> itemsWithDuplicateValues = <String>['a', 'b', 'c', 'd'] final List<DropdownMenuItem<String>> itemsWithDuplicateValues = <String>['a', 'b', 'c', 'd']
.map<DropdownMenuItem<String>>((String value) { .map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>( return DropdownMenuItem<String>(
@ -1087,7 +1089,7 @@ void main() {
expect(find.text(currentValue), findsOneWidget); expect(find.text(currentValue), findsOneWidget);
}); });
testWidgets('autovalidateMode is passed to super', (WidgetTester tester) async { testWidgetsWithLeakTracking('autovalidateMode is passed to super', (WidgetTester tester) async {
int validateCalled = 0; int validateCalled = 0;
await tester.pumpWidget( await tester.pumpWidget(
@ -1116,7 +1118,7 @@ void main() {
expect(validateCalled, 1); expect(validateCalled, 1);
}); });
testWidgets('DropdownButtonFormField - Custom button alignment', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownButtonFormField - Custom button alignment', (WidgetTester tester) async {
await tester.pumpWidget(buildFormFrame( await tester.pumpWidget(buildFormFrame(
buttonAlignment: AlignmentDirectional.center, buttonAlignment: AlignmentDirectional.center,
items: <String>['one'], items: <String>['one'],

View File

@ -44,7 +44,7 @@ void main() {
expect(description, <String>[]); expect(description, <String>[]);
}); });
testWidgets('With no other configuration, defaults are used', (WidgetTester tester) async { testWidgetsWithLeakTracking('With no other configuration, defaults are used', (WidgetTester tester) async {
final ThemeData themeData = ThemeData(); final ThemeData themeData = ThemeData();
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
@ -101,7 +101,7 @@ void main() {
expect(material.textStyle?.color, themeData.colorScheme.onSurface); expect(material.textStyle?.color, themeData.colorScheme.onSurface);
}); });
testWidgets('ThemeData.dropdownMenuTheme overrides defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('ThemeData.dropdownMenuTheme overrides defaults', (WidgetTester tester) async {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
dropdownMenuTheme: DropdownMenuThemeData( dropdownMenuTheme: DropdownMenuThemeData(
textStyle: TextStyle( textStyle: TextStyle(
@ -180,7 +180,7 @@ void main() {
expect(material.textStyle?.color, theme.colorScheme.onSurface); expect(material.textStyle?.color, theme.colorScheme.onSurface);
}); });
testWidgets('DropdownMenuTheme overrides ThemeData and defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('DropdownMenuTheme overrides ThemeData and defaults', (WidgetTester tester) async {
final DropdownMenuThemeData global = DropdownMenuThemeData( final DropdownMenuThemeData global = DropdownMenuThemeData(
textStyle: TextStyle( textStyle: TextStyle(
color: Colors.orange, color: Colors.orange,
@ -283,7 +283,7 @@ void main() {
expect(material.textStyle?.color, theme.colorScheme.onSurface); expect(material.textStyle?.color, theme.colorScheme.onSurface);
}); });
testWidgets('Widget parameters overrides DropdownMenuTheme, ThemeData and defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('Widget parameters overrides DropdownMenuTheme, ThemeData and defaults', (WidgetTester tester) async {
final DropdownMenuThemeData global = DropdownMenuThemeData( final DropdownMenuThemeData global = DropdownMenuThemeData(
textStyle: TextStyle( textStyle: TextStyle(
color: Colors.orange, color: Colors.orange,

View File

@ -196,7 +196,6 @@ void main() {
await gesture.moveTo(center); await gesture.moveTo(center);
await tester.pumpAndSettle(); await tester.pumpAndSettle();
await expectLater(tester, meetsGuideline(textContrastGuideline)); await expectLater(tester, meetsGuideline(textContrastGuideline));
focusNode.dispose();
}, },
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115 skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
); );
@ -260,8 +259,6 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(elevation(), 1.0); expect(elevation(), 1.0);
expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.12))); expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('ElevatedButton uses stateful color for text color in different states', (WidgetTester tester) async { testWidgetsWithLeakTracking('ElevatedButton uses stateful color for text color in different states', (WidgetTester tester) async {
@ -337,8 +334,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(textColor(), pressedColor); expect(textColor(), pressedColor);
focusNode.dispose();
}); });
@ -415,8 +410,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(iconColor(), pressedColor); expect(iconColor(), pressedColor);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('ElevatedButton onPressed and onLongPress callbacks are correctly called when non-null', (WidgetTester tester) async { testWidgetsWithLeakTracking('ElevatedButton onPressed and onLongPress callbacks are correctly called when non-null', (WidgetTester tester) async {
@ -541,8 +534,6 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(focusNode.hasPrimaryFocus, isFalse); expect(focusNode.hasPrimaryFocus, isFalse);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('disabled and hovered ElevatedButton responds to mouse-exit', (WidgetTester tester) async { testWidgetsWithLeakTracking('disabled and hovered ElevatedButton responds to mouse-exit', (WidgetTester tester) async {
@ -634,8 +625,6 @@ void main() {
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking('When ElevatedButton disable, Can not set ElevatedButton focus.', (WidgetTester tester) async { testWidgetsWithLeakTracking('When ElevatedButton disable, Can not set ElevatedButton focus.', (WidgetTester tester) async {
@ -659,9 +648,6 @@ void main() {
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking('Does ElevatedButton work with hover', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does ElevatedButton work with hover', (WidgetTester tester) async {
@ -717,8 +703,6 @@ void main() {
final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
expect(inkFeatures, paints..rect(color: focusColor)); expect(inkFeatures, paints..rect(color: focusColor));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Does ElevatedButton work with autofocus', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does ElevatedButton work with autofocus', (WidgetTester tester) async {
@ -749,8 +733,6 @@ void main() {
final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
expect(inkFeatures, paints..rect(color: focusColor)); expect(inkFeatures, paints..rect(color: focusColor));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Does ElevatedButton contribute semantics', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does ElevatedButton contribute semantics', (WidgetTester tester) async {
@ -1685,7 +1667,7 @@ void main() {
expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic); expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic);
}); });
testWidgets('ElevatedButton in SelectionArea changes mouse cursor when hovered', (WidgetTester tester) async { testWidgetsWithLeakTracking('ElevatedButton in SelectionArea changes mouse cursor when hovered', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/104595. // Regression test for https://github.com/flutter/flutter/issues/104595.
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: SelectionArea( home: SelectionArea(
@ -1883,15 +1865,15 @@ void main() {
await gesture.removePointer(); await gesture.removePointer();
} }
testWidgets('ElevatedButton statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('ElevatedButton statesController', (WidgetTester tester) async {
testStatesController(null, tester); testStatesController(null, tester);
}); });
testWidgets('ElevatedButton.icon statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('ElevatedButton.icon statesController', (WidgetTester tester) async {
testStatesController(const Icon(Icons.add), tester); testStatesController(const Icon(Icons.add), tester);
}); });
testWidgets('Disabled ElevatedButton statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('Disabled ElevatedButton statesController', (WidgetTester tester) async {
int count = 0; int count = 0;
void valueChanged() { void valueChanged() {
count += 1; count += 1;

View File

@ -340,7 +340,6 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(elevation(), 0.0); expect(elevation(), 0.0);
expect(overlayColor(), paints..rect(color: theme.colorScheme.onPrimary.withOpacity(0.12))); expect(overlayColor(), paints..rect(color: theme.colorScheme.onPrimary.withOpacity(0.12)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('FilledButton.tonal default overlayColor and elevation resolve pressed state', (WidgetTester tester) async { testWidgetsWithLeakTracking('FilledButton.tonal default overlayColor and elevation resolve pressed state', (WidgetTester tester) async {
@ -406,7 +405,6 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(elevation(), 0.0); expect(elevation(), 0.0);
expect(overlayColor(), paints..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.12))); expect(overlayColor(), paints..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.12)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('FilledButton uses stateful color for text color in different states', (WidgetTester tester) async { testWidgetsWithLeakTracking('FilledButton uses stateful color for text color in different states', (WidgetTester tester) async {
@ -482,7 +480,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(textColor(), pressedColor); expect(textColor(), pressedColor);
focusNode.dispose();
}); });
@ -559,7 +556,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(iconColor(), pressedColor); expect(iconColor(), pressedColor);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('FilledButton onPressed and onLongPress callbacks are correctly called when non-null', (WidgetTester tester) async { testWidgetsWithLeakTracking('FilledButton onPressed and onLongPress callbacks are correctly called when non-null', (WidgetTester tester) async {
@ -684,7 +680,6 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(focusNode.hasPrimaryFocus, isFalse); expect(focusNode.hasPrimaryFocus, isFalse);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('disabled and hovered FilledButton responds to mouse-exit', (WidgetTester tester) async { testWidgetsWithLeakTracking('disabled and hovered FilledButton responds to mouse-exit', (WidgetTester tester) async {
@ -776,7 +771,6 @@ void main() {
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking('When FilledButton disable, Can not set FilledButton focus.', (WidgetTester tester) async { testWidgetsWithLeakTracking('When FilledButton disable, Can not set FilledButton focus.', (WidgetTester tester) async {
@ -800,7 +794,6 @@ void main() {
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking('Does FilledButton work with hover', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does FilledButton work with hover', (WidgetTester tester) async {
@ -856,7 +849,6 @@ void main() {
final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
expect(inkFeatures, paints..rect(color: focusColor)); expect(inkFeatures, paints..rect(color: focusColor));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Does FilledButton work with autofocus', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does FilledButton work with autofocus', (WidgetTester tester) async {
@ -887,7 +879,6 @@ void main() {
final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
expect(inkFeatures, paints..rect(color: focusColor)); expect(inkFeatures, paints..rect(color: focusColor));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Does FilledButton contribute semantics', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does FilledButton contribute semantics', (WidgetTester tester) async {
@ -1750,7 +1741,7 @@ void main() {
expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic); expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic);
}); });
testWidgets('FilledButton in SelectionArea changes mouse cursor when hovered', (WidgetTester tester) async { testWidgetsWithLeakTracking('FilledButton in SelectionArea changes mouse cursor when hovered', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/104595. // Regression test for https://github.com/flutter/flutter/issues/104595.
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: SelectionArea( home: SelectionArea(
@ -1946,15 +1937,15 @@ void main() {
await gesture.removePointer(); await gesture.removePointer();
} }
testWidgets('FilledButton statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('FilledButton statesController', (WidgetTester tester) async {
testStatesController(null, tester); testStatesController(null, tester);
}); });
testWidgets('FilledButton.icon statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('FilledButton.icon statesController', (WidgetTester tester) async {
testStatesController(const Icon(Icons.add), tester); testStatesController(const Icon(Icons.add), tester);
}); });
testWidgets('Disabled FilledButton statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('Disabled FilledButton statesController', (WidgetTester tester) async {
int count = 0; int count = 0;
void valueChanged() { void valueChanged() {
count += 1; count += 1;

View File

@ -51,7 +51,7 @@ void main() {
expect(topAfterScroll.dy, equals(0.0)); expect(topAfterScroll.dy, equals(0.0));
}, variant: TargetPlatformVariant.all(excluding: <TargetPlatform>{ TargetPlatform.fuchsia })); }, variant: TargetPlatformVariant.all(excluding: <TargetPlatform>{ TargetPlatform.fuchsia }));
testWidgets('FlexibleSpaceBar collapse mode pin', (WidgetTester tester) async { testWidgetsWithLeakTracking('FlexibleSpaceBar collapse mode pin', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(platform: debugDefaultTargetPlatformOverride), theme: ThemeData(platform: debugDefaultTargetPlatformOverride),
@ -89,7 +89,7 @@ void main() {
expect(topAfterScroll.dy, equals(-100.0)); expect(topAfterScroll.dy, equals(-100.0));
}, variant: TargetPlatformVariant.all(excluding: <TargetPlatform>{ TargetPlatform.fuchsia })); }, variant: TargetPlatformVariant.all(excluding: <TargetPlatform>{ TargetPlatform.fuchsia }));
testWidgets('FlexibleSpaceBar collapse mode parallax', (WidgetTester tester) async { testWidgetsWithLeakTracking('FlexibleSpaceBar collapse mode parallax', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(platform: debugDefaultTargetPlatformOverride), theme: ThemeData(platform: debugDefaultTargetPlatformOverride),

View File

@ -92,7 +92,7 @@ void main() {
); );
}); });
testWidgets('FlexibleSpaceBar stretch mode fadeTitle', (WidgetTester tester) async { testWidgetsWithLeakTracking('FlexibleSpaceBar stretch mode fadeTitle', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
@ -136,7 +136,7 @@ void main() {
expect(opacityWidget.opacity, equals(0.0)); expect(opacityWidget.opacity, equals(0.0));
}); });
testWidgets('FlexibleSpaceBar stretch mode ignored for non-overscroll physics', (WidgetTester tester) async { testWidgetsWithLeakTracking('FlexibleSpaceBar stretch mode ignored for non-overscroll physics', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(

View File

@ -185,7 +185,7 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
}); });
testWidgets('interrupting motion towards the StartTop location.', (WidgetTester tester) async { testWidgetsWithLeakTracking('interrupting motion towards the StartTop location.', (WidgetTester tester) async {
await tester.pumpWidget(_buildFrame(location: FloatingActionButtonLocation.centerFloat, listener: geometryListener)); await tester.pumpWidget(_buildFrame(location: FloatingActionButtonLocation.centerFloat, listener: geometryListener));
setupListener(tester); setupListener(tester);
@ -198,7 +198,7 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
}); });
testWidgets('interrupting entrance to remove the fab.', (WidgetTester tester) async { testWidgetsWithLeakTracking('interrupting entrance to remove the fab.', (WidgetTester tester) async {
await tester.pumpWidget(_buildFrame(fab: null, location: FloatingActionButtonLocation.centerFloat, listener: geometryListener)); await tester.pumpWidget(_buildFrame(fab: null, location: FloatingActionButtonLocation.centerFloat, listener: geometryListener));
setupListener(tester); setupListener(tester);
@ -217,7 +217,7 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
}); });
testWidgets('interrupting entrance of a new fab.', (WidgetTester tester) async { testWidgetsWithLeakTracking('interrupting entrance of a new fab.', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
_buildFrame( _buildFrame(
fab: null, fab: null,

View File

@ -326,7 +326,7 @@ void main() {
expect(tester.widget<PhysicalShape>(find.byType(PhysicalShape)).elevation, 6.0); expect(tester.widget<PhysicalShape>(find.byType(PhysicalShape)).elevation, 6.0);
}); });
testWidgets('Floating Action Button states elevation', (WidgetTester tester) async { testWidgetsWithLeakTracking('Floating Action Button states elevation', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
await tester.pumpWidget( await tester.pumpWidget(
@ -368,8 +368,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(getFABWidget(fabFinder).elevation, 6); expect(getFABWidget(fabFinder).elevation, 6);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('FlatActionButton mini size is configurable by ThemeData.materialTapTargetSize', (WidgetTester tester) async { testWidgetsWithLeakTracking('FlatActionButton mini size is configurable by ThemeData.materialTapTargetSize', (WidgetTester tester) async {
@ -787,7 +785,7 @@ void main() {
}); });
// This test prevents https://github.com/flutter/flutter/issues/20483 // This test prevents https://github.com/flutter/flutter/issues/20483
testWidgets('Floating Action Button clips ink splash and highlight', (WidgetTester tester) async { testWidgetsWithLeakTracking('Floating Action Button clips ink splash and highlight', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
@ -911,8 +909,6 @@ void main() {
tester.renderObject(find.byType(FloatingActionButton)), tester.renderObject(find.byType(FloatingActionButton)),
paintsExactlyCountTimes(#clipPath, 0), paintsExactlyCountTimes(#clipPath, 0),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Can find FloatingActionButton semantics', (WidgetTester tester) async { testWidgetsWithLeakTracking('Can find FloatingActionButton semantics', (WidgetTester tester) async {
@ -1168,7 +1164,7 @@ void main() {
expect(tester.widget<PhysicalShape>(find.byType(PhysicalShape)).elevation, 6.0); expect(tester.widget<PhysicalShape>(find.byType(PhysicalShape)).elevation, 6.0);
}); });
testWidgets('Floating Action Button states elevation', (WidgetTester tester) async { testWidgetsWithLeakTracking('Floating Action Button states elevation', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
await tester.pumpWidget( await tester.pumpWidget(
@ -1210,8 +1206,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(getFABWidget(fabFinder).elevation, 12); expect(getFABWidget(fabFinder).elevation, 12);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('FloatingActionButton.isExtended', (WidgetTester tester) async { testWidgetsWithLeakTracking('FloatingActionButton.isExtended', (WidgetTester tester) async {
@ -1333,7 +1327,7 @@ void main() {
// This test prevents https://github.com/flutter/flutter/issues/20483 // This test prevents https://github.com/flutter/flutter/issues/20483
testWidgets('Floating Action Button clips ink splash and highlight', (WidgetTester tester) async { testWidgetsWithLeakTracking('Floating Action Button clips ink splash and highlight', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(

View File

@ -100,14 +100,13 @@ void main() {
testWidgetsWithLeakTracking('when both iconSize and IconTheme.of(context).size are null, size falls back to 24.0', (WidgetTester tester) async { testWidgetsWithLeakTracking('when both iconSize and IconTheme.of(context).size are null, size falls back to 24.0', (WidgetTester tester) async {
final bool material3 = theme.useMaterial3; final bool material3 = theme.useMaterial3;
final FocusNode focusNode = FocusNode(debugLabel: 'Ink Focus');
await tester.pumpWidget( await tester.pumpWidget(
wrap( wrap(
useMaterial3: material3, useMaterial3: material3,
child: IconTheme( child: IconTheme(
data: const IconThemeData(), data: const IconThemeData(),
child: IconButton( child: IconButton(
focusNode: focusNode, focusNode: FocusNode(debugLabel: 'Ink Focus'),
onPressed: mockOnPressedFunction.handler, onPressed: mockOnPressedFunction.handler,
icon: const Icon(Icons.link), icon: const Icon(Icons.link),
), ),
@ -117,8 +116,6 @@ void main() {
final RenderBox icon = tester.renderObject(find.byType(Icon)); final RenderBox icon = tester.renderObject(find.byType(Icon));
expect(icon.size, const Size(24.0, 24.0)); expect(icon.size, const Size(24.0, 24.0));
focusNode.dispose();
}); });
testWidgets('when null, iconSize is overridden by closest IconTheme', (WidgetTester tester) async { testWidgets('when null, iconSize is overridden by closest IconTheme', (WidgetTester tester) async {
@ -742,8 +739,6 @@ void main() {
); );
await tester.pump(); await tester.pump();
expect(focusNode.hasPrimaryFocus, isFalse); expect(focusNode.hasPrimaryFocus, isFalse);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('IconButton keeps focus when disabled in directional navigation mode.', (WidgetTester tester) async { testWidgetsWithLeakTracking('IconButton keeps focus when disabled in directional navigation mode.', (WidgetTester tester) async {
@ -786,8 +781,6 @@ void main() {
); );
await tester.pump(); await tester.pump();
expect(focusNode.hasPrimaryFocus, isTrue); expect(focusNode.hasPrimaryFocus, isTrue);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking("Disabled IconButton can't be traversed to when disabled.", (WidgetTester tester) async { testWidgetsWithLeakTracking("Disabled IconButton can't be traversed to when disabled.", (WidgetTester tester) async {
@ -824,9 +817,6 @@ void main() {
expect(focusNode1.hasPrimaryFocus, isTrue); expect(focusNode1.hasPrimaryFocus, isTrue);
expect(focusNode2.hasPrimaryFocus, isFalse); expect(focusNode2.hasPrimaryFocus, isFalse);
focusNode1.dispose();
focusNode2.dispose();
}); });
group('feedback', () { group('feedback', () {
@ -1250,8 +1240,6 @@ void main() {
focusNode.requestFocus(); focusNode.requestFocus();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(overlayColor(), paints..rect(color: theme.colorScheme.onSurfaceVariant.withOpacity(0.12))); expect(overlayColor(), paints..rect(color: theme.colorScheme.onSurfaceVariant.withOpacity(0.12)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('IconButton.fill defaults - M3', (WidgetTester tester) async { testWidgetsWithLeakTracking('IconButton.fill defaults - M3', (WidgetTester tester) async {
@ -1391,8 +1379,6 @@ void main() {
focusNode.requestFocus(); focusNode.requestFocus();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(overlayColor(), paints..rect(color: theme.colorScheme.onPrimary.withOpacity(0.12))); expect(overlayColor(), paints..rect(color: theme.colorScheme.onPrimary.withOpacity(0.12)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Toggleable IconButton.fill defaults - M3', (WidgetTester tester) async { testWidgetsWithLeakTracking('Toggleable IconButton.fill defaults - M3', (WidgetTester tester) async {
@ -1647,8 +1633,6 @@ void main() {
focusNode.requestFocus(); focusNode.requestFocus();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(overlayColor(), paints..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.12))); expect(overlayColor(), paints..rect(color: theme.colorScheme.onSecondaryContainer.withOpacity(0.12)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Toggleable IconButton.filledTonal defaults - M3', (WidgetTester tester) async { testWidgetsWithLeakTracking('Toggleable IconButton.filledTonal defaults - M3', (WidgetTester tester) async {
@ -1903,8 +1887,6 @@ void main() {
focusNode.requestFocus(); focusNode.requestFocus();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(overlayColor(), paints..rect(color: theme.colorScheme.onSurfaceVariant.withOpacity(0.08))); expect(overlayColor(), paints..rect(color: theme.colorScheme.onSurfaceVariant.withOpacity(0.08)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Toggleable IconButton.outlined defaults - M3', (WidgetTester tester) async { testWidgetsWithLeakTracking('Toggleable IconButton.outlined defaults - M3', (WidgetTester tester) async {
@ -2065,8 +2047,6 @@ void main() {
await expectLater(tester, meetsGuideline(textContrastGuideline)); await expectLater(tester, meetsGuideline(textContrastGuideline));
await gesture.removePointer(); await gesture.removePointer();
focusNode.dispose();
}, },
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115 skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
); );
@ -2155,8 +2135,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(iconColor(), pressedColor); expect(iconColor(), pressedColor);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Does IconButton contribute semantics - M3', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does IconButton contribute semantics - M3', (WidgetTester tester) async {

View File

@ -271,7 +271,7 @@ void main() {
await gesture.up(); await gesture.up();
}); });
testWidgets('The InkWell widget renders an SelectAction or ActivateAction-induced ink ripple', (WidgetTester tester) async { testWidgetsWithLeakTracking('The InkWell widget renders an SelectAction or ActivateAction-induced ink ripple', (WidgetTester tester) async {
const Color highlightColor = Color(0xAAFF0000); const Color highlightColor = Color(0xAAFF0000);
const Color splashColor = Color(0xB40000FF); const Color splashColor = Color(0xB40000FF);
const BorderRadius borderRadius = BorderRadius.all(Radius.circular(6.0)); const BorderRadius borderRadius = BorderRadius.all(Radius.circular(6.0));
@ -454,7 +454,7 @@ void main() {
})); }));
}); });
testWidgets('The InkWell widget on OverlayPortal does not throw', (WidgetTester tester) async { testWidgetsWithLeakTracking('The InkWell widget on OverlayPortal does not throw', (WidgetTester tester) async {
final OverlayPortalController controller = OverlayPortalController(); final OverlayPortalController controller = OverlayPortalController();
controller.show(); controller.show();
await tester.pumpWidget( await tester.pumpWidget(

View File

@ -250,7 +250,6 @@ void main() {
inkFeatures, inkFeatures,
paints ..rect(rect: const Rect.fromLTRB(350.0, 250.0, 450.0, 350.0), color: const Color(0xff0000ff)), paints ..rect(rect: const Rect.fromLTRB(350.0, 250.0, 450.0, 350.0), color: const Color(0xff0000ff)),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('ink response changes color on focus with overlayColor', (WidgetTester tester) async { testWidgetsWithLeakTracking('ink response changes color on focus with overlayColor', (WidgetTester tester) async {
@ -299,7 +298,6 @@ void main() {
inkFeatures, inkFeatures,
paints..rect(rect: const Rect.fromLTRB(350.0, 250.0, 450.0, 350.0), color: const Color(0xff0000ff)), paints..rect(rect: const Rect.fromLTRB(350.0, 250.0, 450.0, 350.0), color: const Color(0xff0000ff)),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('ink well changes color on pressed with overlayColor', (WidgetTester tester) async { testWidgetsWithLeakTracking('ink well changes color on pressed with overlayColor', (WidgetTester tester) async {
@ -372,7 +370,6 @@ void main() {
final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
expect(inkFeatures, paints..circle(x: 50, y: 50, color: splashColor)); expect(inkFeatures, paints..circle(x: 50, y: 50, color: splashColor));
await gesture.up(); await gesture.up();
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('ink response splashColor matches resolved overlayColor for MaterialState.pressed', (WidgetTester tester) async { testWidgetsWithLeakTracking('ink response splashColor matches resolved overlayColor for MaterialState.pressed', (WidgetTester tester) async {
@ -422,7 +419,6 @@ void main() {
final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
expect(inkFeatures, paints..circle(x: 50, y: 50, color: splashColor)); expect(inkFeatures, paints..circle(x: 50, y: 50, color: splashColor));
await gesture.up(); await gesture.up();
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('ink response uses radius for focus highlight', (WidgetTester tester) async { testWidgetsWithLeakTracking('ink response uses radius for focus highlight', (WidgetTester tester) async {
@ -453,7 +449,6 @@ void main() {
focusNode.requestFocus(); focusNode.requestFocus();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(inkFeatures, paints..circle(radius: 20, color: const Color(0xff0000ff))); expect(inkFeatures, paints..circle(radius: 20, color: const Color(0xff0000ff)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('InkWell uses borderRadius for focus highlight', (WidgetTester tester) async { testWidgetsWithLeakTracking('InkWell uses borderRadius for focus highlight', (WidgetTester tester) async {
@ -490,7 +485,6 @@ void main() {
rrect: RRect.fromLTRBR(350.0, 250.0, 450.0, 350.0, const Radius.circular(10)), rrect: RRect.fromLTRBR(350.0, 250.0, 450.0, 350.0, const Radius.circular(10)),
color: const Color(0xff0000ff), color: const Color(0xff0000ff),
)); ));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('InkWell uses borderRadius for hover highlight', (WidgetTester tester) async { testWidgetsWithLeakTracking('InkWell uses borderRadius for hover highlight', (WidgetTester tester) async {
@ -582,7 +576,6 @@ void main() {
sampleSize: 100, sampleSize: 100,
)), )),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('InkWell customBorder clips for hover highlight', (WidgetTester tester) async { testWidgetsWithLeakTracking('InkWell customBorder clips for hover highlight', (WidgetTester tester) async {
@ -674,7 +667,6 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(inkFeatures, paintsExactlyCountTimes(#drawCircle, 1)); expect(inkFeatures, paintsExactlyCountTimes(#drawCircle, 1));
expect(inkFeatures, paints..circle(radius: 20, color: const Color(0xff0000ff))); expect(inkFeatures, paints..circle(radius: 20, color: const Color(0xff0000ff)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('InkResponse highlightShape can be updated', (WidgetTester tester) async { testWidgetsWithLeakTracking('InkResponse highlightShape can be updated', (WidgetTester tester) async {
@ -716,7 +708,6 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(inkFeatures, paintsExactlyCountTimes(#drawCircle, 0)); expect(inkFeatures, paintsExactlyCountTimes(#drawCircle, 0));
expect(inkFeatures, paintsExactlyCountTimes(#drawRRect, 1)); expect(inkFeatures, paintsExactlyCountTimes(#drawRRect, 1));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('InkWell borderRadius can be updated', (WidgetTester tester) async { testWidgetsWithLeakTracking('InkWell borderRadius can be updated', (WidgetTester tester) async {
@ -762,7 +753,6 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
rrect: RRect.fromLTRBR(350.0, 250.0, 450.0, 350.0, const Radius.circular(30)), rrect: RRect.fromLTRBR(350.0, 250.0, 450.0, 350.0, const Radius.circular(30)),
color: const Color(0xff0000ff), color: const Color(0xff0000ff),
)); ));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('InkWell customBorder can be updated', (WidgetTester tester) async { testWidgetsWithLeakTracking('InkWell customBorder can be updated', (WidgetTester tester) async {
@ -830,7 +820,6 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
sampleSize: 100, sampleSize: 100,
)), )),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('InkWell splash customBorder can be updated', (WidgetTester tester) async { testWidgetsWithLeakTracking('InkWell splash customBorder can be updated', (WidgetTester tester) async {
@ -919,7 +908,6 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
); );
await gesture.up(); await gesture.up();
focusNode.dispose();
}); });
testWidgetsWithLeakTracking("ink response doesn't change color on focus when on touch device", (WidgetTester tester) async { testWidgetsWithLeakTracking("ink response doesn't change color on focus when on touch device", (WidgetTester tester) async {
@ -952,7 +940,6 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
focusNode.requestFocus(); focusNode.requestFocus();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(inkFeatures, paintsExactlyCountTimes(#drawRect, 0)); expect(inkFeatures, paintsExactlyCountTimes(#drawRect, 0));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('InkWell.mouseCursor changes cursor on hover', (WidgetTester tester) async { testWidgetsWithLeakTracking('InkWell.mouseCursor changes cursor on hover', (WidgetTester tester) async {
@ -1042,7 +1029,7 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic); expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic);
}); });
testWidgets('InkResponse containing selectable text changes mouse cursor when hovered', (WidgetTester tester) async { testWidgetsWithLeakTracking('InkResponse containing selectable text changes mouse cursor when hovered', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/104595. // Regression test for https://github.com/flutter/flutter/issues/104595.
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: SelectionArea( home: SelectionArea(
@ -1231,7 +1218,6 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
); );
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(focusNode.hasPrimaryFocus, isFalse); expect(focusNode.hasPrimaryFocus, isFalse);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('ink response accepts focus when disabled in directional navigation mode', (WidgetTester tester) async { testWidgetsWithLeakTracking('ink response accepts focus when disabled in directional navigation mode', (WidgetTester tester) async {
@ -1278,7 +1264,6 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
); );
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(focusNode.hasPrimaryFocus, isTrue); expect(focusNode.hasPrimaryFocus, isTrue);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking("ink response doesn't hover when disabled", (WidgetTester tester) async { testWidgetsWithLeakTracking("ink response doesn't hover when disabled", (WidgetTester tester) async {
@ -1332,7 +1317,6 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(focusNode.hasPrimaryFocus, isFalse); expect(focusNode.hasPrimaryFocus, isFalse);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('When ink wells are nested, only the inner one is triggered by tap splash', (WidgetTester tester) async { testWidgetsWithLeakTracking('When ink wells are nested, only the inner one is triggered by tap splash', (WidgetTester tester) async {
@ -2087,7 +2071,7 @@ testWidgetsWithLeakTracking('InkResponse radius can be updated', (WidgetTester t
expect(inkFeatures, paintsExactlyCountTimes(#drawCircle, 0)); expect(inkFeatures, paintsExactlyCountTimes(#drawCircle, 0));
}); });
testWidgets('InkWell disposes statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('InkWell dispose statesController', (WidgetTester tester) async {
int tapCount = 0; int tapCount = 0;
Widget buildFrame(MaterialStatesController? statesController) { Widget buildFrame(MaterialStatesController? statesController) {
return MaterialApp( return MaterialApp(

View File

@ -241,8 +241,6 @@ void main() {
); );
await tester.pump(); await tester.pump();
expect(focusNode.hasPrimaryFocus, isFalse); expect(focusNode.hasPrimaryFocus, isFalse);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('cannot be traversed to when disabled', (WidgetTester tester) async { testWidgetsWithLeakTracking('cannot be traversed to when disabled', (WidgetTester tester) async {
@ -278,9 +276,6 @@ void main() {
await tester.pump(); await tester.pump();
expect(focusNode1.hasPrimaryFocus, isTrue); expect(focusNode1.hasPrimaryFocus, isTrue);
expect(focusNode2.hasPrimaryFocus, isFalse); expect(focusNode2.hasPrimaryFocus, isFalse);
focusNode1.dispose();
focusNode2.dispose();
}); });
testWidgetsWithLeakTracking('Input chip check mark color is determined by platform brightness when light', (WidgetTester tester) async { testWidgetsWithLeakTracking('Input chip check mark color is determined by platform brightness when light', (WidgetTester tester) async {

View File

@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
import '../widgets/clipboard_utils.dart'; import '../widgets/clipboard_utils.dart';
class TestMaterialLocalizations extends DefaultMaterialLocalizations { class TestMaterialLocalizations extends DefaultMaterialLocalizations {
@ -97,7 +98,7 @@ void main() {
group('InputDatePickerFormField', () { group('InputDatePickerFormField', () {
testWidgets('Initial date is the default', (WidgetTester tester) async { testWidgetsWithLeakTracking('Initial date is the default', (WidgetTester tester) async {
final GlobalKey<FormState> formKey = GlobalKey<FormState>(); final GlobalKey<FormState> formKey = GlobalKey<FormState>();
final DateTime initialDate = DateTime(2016, DateTime.february, 21); final DateTime initialDate = DateTime(2016, DateTime.february, 21);
DateTime? inputDate; DateTime? inputDate;
@ -111,7 +112,7 @@ void main() {
expect(inputDate, equals(initialDate)); expect(inputDate, equals(initialDate));
}); });
testWidgets('Changing initial date is reflected in text value', (WidgetTester tester) async { testWidgetsWithLeakTracking('Changing initial date is reflected in text value', (WidgetTester tester) async {
final DateTime initialDate = DateTime(2016, DateTime.february, 21); final DateTime initialDate = DateTime(2016, DateTime.february, 21);
final DateTime updatedInitialDate = DateTime(2016, DateTime.february, 23); final DateTime updatedInitialDate = DateTime(2016, DateTime.february, 23);
await tester.pumpWidget(inputDatePickerField( await tester.pumpWidget(inputDatePickerField(
@ -126,7 +127,7 @@ void main() {
expect(textFieldController(tester).value.text, equals('02/23/2016')); expect(textFieldController(tester).value.text, equals('02/23/2016'));
}); });
testWidgets('Valid date entry', (WidgetTester tester) async { testWidgetsWithLeakTracking('Valid date entry', (WidgetTester tester) async {
final GlobalKey<FormState> formKey = GlobalKey<FormState>(); final GlobalKey<FormState> formKey = GlobalKey<FormState>();
DateTime? inputDate; DateTime? inputDate;
await tester.pumpWidget(inputDatePickerField( await tester.pumpWidget(inputDatePickerField(
@ -139,7 +140,7 @@ void main() {
expect(inputDate, equals(DateTime(2016, DateTime.february, 21))); expect(inputDate, equals(DateTime(2016, DateTime.february, 21)));
}); });
testWidgets('Invalid text entry shows errorFormat text', (WidgetTester tester) async { testWidgetsWithLeakTracking('Invalid text entry shows errorFormat text', (WidgetTester tester) async {
final GlobalKey<FormState> formKey = GlobalKey<FormState>(); final GlobalKey<FormState> formKey = GlobalKey<FormState>();
DateTime? inputDate; DateTime? inputDate;
await tester.pumpWidget(inputDatePickerField( await tester.pumpWidget(inputDatePickerField(
@ -166,7 +167,7 @@ void main() {
expect(find.text('That is not a date.'), findsOneWidget); expect(find.text('That is not a date.'), findsOneWidget);
}); });
testWidgets('Valid text entry, but date outside first or last date shows bounds shows errorInvalid text', (WidgetTester tester) async { testWidgetsWithLeakTracking('Valid text entry, but date outside first or last date shows bounds shows errorInvalid text', (WidgetTester tester) async {
final GlobalKey<FormState> formKey = GlobalKey<FormState>(); final GlobalKey<FormState> formKey = GlobalKey<FormState>();
DateTime? inputDate; DateTime? inputDate;
await tester.pumpWidget(inputDatePickerField( await tester.pumpWidget(inputDatePickerField(
@ -201,7 +202,7 @@ void main() {
expect(find.text('Not in given range.'), findsOneWidget); expect(find.text('Not in given range.'), findsOneWidget);
}); });
testWidgets('selectableDatePredicate will be used to show errorInvalid if date is not selectable', (WidgetTester tester) async { testWidgetsWithLeakTracking('selectableDatePredicate will be used to show errorInvalid if date is not selectable', (WidgetTester tester) async {
final GlobalKey<FormState> formKey = GlobalKey<FormState>(); final GlobalKey<FormState> formKey = GlobalKey<FormState>();
DateTime? inputDate; DateTime? inputDate;
await tester.pumpWidget(inputDatePickerField( await tester.pumpWidget(inputDatePickerField(
@ -227,7 +228,7 @@ void main() {
expect(find.text('Out of range.'), findsNothing); expect(find.text('Out of range.'), findsNothing);
}); });
testWidgets('Empty field shows hint text when focused', (WidgetTester tester) async { testWidgetsWithLeakTracking('Empty field shows hint text when focused', (WidgetTester tester) async {
await tester.pumpWidget(inputDatePickerField()); await tester.pumpWidget(inputDatePickerField());
// Focus on it // Focus on it
await tester.tap(find.byType(TextField)); await tester.tap(find.byType(TextField));
@ -250,7 +251,7 @@ void main() {
expect(textOpacity(tester, 'Enter some date'), equals(0.0)); expect(textOpacity(tester, 'Enter some date'), equals(0.0));
}); });
testWidgets('Label text', (WidgetTester tester) async { testWidgetsWithLeakTracking('Label text', (WidgetTester tester) async {
await tester.pumpWidget(inputDatePickerField()); await tester.pumpWidget(inputDatePickerField());
// Default label // Default label
expect(find.text('Enter Date'), findsOneWidget); expect(find.text('Enter Date'), findsOneWidget);
@ -262,7 +263,7 @@ void main() {
expect(find.text('Give me a date!'), findsOneWidget); expect(find.text('Give me a date!'), findsOneWidget);
}); });
testWidgets('Semantics', (WidgetTester tester) async { testWidgetsWithLeakTracking('Semantics', (WidgetTester tester) async {
final SemanticsHandle semantics = tester.ensureSemantics(); final SemanticsHandle semantics = tester.ensureSemantics();
// Fill the clipboard so that the Paste option is available in the text // Fill the clipboard so that the Paste option is available in the text
@ -291,7 +292,7 @@ void main() {
semantics.dispose(); semantics.dispose();
}); });
testWidgets('InputDecorationTheme is honored', (WidgetTester tester) async { testWidgetsWithLeakTracking('InputDecorationTheme is honored', (WidgetTester tester) async {
const InputBorder border = InputBorder.none; const InputBorder border = InputBorder.none;
await tester.pumpWidget(inputDatePickerField( await tester.pumpWidget(inputDatePickerField(
theme: ThemeData.from(colorScheme: const ColorScheme.light()).copyWith( theme: ThemeData.from(colorScheme: const ColorScheme.light()).copyWith(
@ -325,7 +326,7 @@ void main() {
expect(containerColor, equals(Colors.transparent)); expect(containerColor, equals(Colors.transparent));
}); });
testWidgets('Date text localization', (WidgetTester tester) async { testWidgetsWithLeakTracking('Date text localization', (WidgetTester tester) async {
final Iterable<LocalizationsDelegate<dynamic>> delegates = <LocalizationsDelegate<dynamic>>[ final Iterable<LocalizationsDelegate<dynamic>> delegates = <LocalizationsDelegate<dynamic>>[
TestMaterialLocalizationsDelegate(), TestMaterialLocalizationsDelegate(),
DefaultWidgetsLocalizations.delegate, DefaultWidgetsLocalizations.delegate,
@ -348,7 +349,7 @@ void main() {
); );
}); });
testWidgets('when an empty date is entered and acceptEmptyDate is true, then errorFormatText is not shown', (WidgetTester tester) async { testWidgetsWithLeakTracking('when an empty date is entered and acceptEmptyDate is true, then errorFormatText is not shown', (WidgetTester tester) async {
final GlobalKey<FormState> formKey = GlobalKey<FormState>(); final GlobalKey<FormState> formKey = GlobalKey<FormState>();
const String errorFormatText = 'That is not a date.'; const String errorFormatText = 'That is not a date.';
await tester.pumpWidget(inputDatePickerField( await tester.pumpWidget(inputDatePickerField(
@ -363,7 +364,7 @@ void main() {
expect(find.text(errorFormatText), findsNothing); expect(find.text(errorFormatText), findsNothing);
}); });
testWidgets('when an empty date is entered and acceptEmptyDate is false, then errorFormatText is shown', (WidgetTester tester) async { testWidgetsWithLeakTracking('when an empty date is entered and acceptEmptyDate is false, then errorFormatText is shown', (WidgetTester tester) async {
final GlobalKey<FormState> formKey = GlobalKey<FormState>(); final GlobalKey<FormState> formKey = GlobalKey<FormState>();
const String errorFormatText = 'That is not a date.'; const String errorFormatText = 'That is not a date.';
await tester.pumpWidget(inputDatePickerField( await tester.pumpWidget(inputDatePickerField(

View File

@ -904,8 +904,6 @@ void main() {
rect: const Rect.fromLTRB(350.0, 250.0, 450.0, 350.0), rect: const Rect.fromLTRB(350.0, 250.0, 450.0, 350.0),
), ),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('ListTile can be hovered and has correct hover color', (WidgetTester tester) async { testWidgetsWithLeakTracking('ListTile can be hovered and has correct hover color', (WidgetTester tester) async {
@ -1236,8 +1234,6 @@ void main() {
await tester.pump(); await tester.pump();
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking('ListTile respects tileColor & selectedTileColor', (WidgetTester tester) async { testWidgetsWithLeakTracking('ListTile respects tileColor & selectedTileColor', (WidgetTester tester) async {

View File

@ -568,7 +568,7 @@ void main() {
expect(find.byType(Material), paints..rect(color: selectedTileColor)); expect(find.byType(Material), paints..rect(color: selectedTileColor));
}); });
testWidgets('ListTile uses ListTileTheme shape in a drawer', (WidgetTester tester) async { testWidgetsWithLeakTracking('ListTile uses ListTileTheme shape in a drawer', (WidgetTester tester) async {
// This is a regression test for https://github.com/flutter/flutter/issues/106303 // This is a regression test for https://github.com/flutter/flutter/issues/106303
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();

View File

@ -9,6 +9,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
void main() { void main() {
final MagnifierController magnifierController = MagnifierController(); final MagnifierController magnifierController = MagnifierController();
const Rect reasonableTextField = Rect.fromLTRB(50, 100, 200, 100); const Rect reasonableTextField = Rect.fromLTRB(50, 100, 200, 100);
@ -110,7 +112,7 @@ void main() {
group('magnifier', () { group('magnifier', () {
group('position', () { group('position', () {
testWidgets( testWidgetsWithLeakTracking(
'should be at gesture position if does not violate any positioning rules', 'should be at gesture position if does not violate any positioning rules',
(WidgetTester tester) async { (WidgetTester tester) async {
final Key textField = UniqueKey(); final Key textField = UniqueKey();
@ -166,7 +168,7 @@ void main() {
); );
}); });
testWidgets( testWidgetsWithLeakTracking(
'should never move outside the right bounds of the editing line', 'should never move outside the right bounds of the editing line',
(WidgetTester tester) async { (WidgetTester tester) async {
const double gestureOutsideLine = 100; const double gestureOutsideLine = 100;
@ -199,7 +201,7 @@ void main() {
lessThanOrEqualTo(reasonableTextField.right)); lessThanOrEqualTo(reasonableTextField.right));
}); });
testWidgets( testWidgetsWithLeakTracking(
'should never move outside the left bounds of the editing line', 'should never move outside the left bounds of the editing line',
(WidgetTester tester) async { (WidgetTester tester) async {
const double gestureOutsideLine = 100; const double gestureOutsideLine = 100;
@ -231,7 +233,7 @@ void main() {
greaterThanOrEqualTo(reasonableTextField.left)); greaterThanOrEqualTo(reasonableTextField.left));
}); });
testWidgets('should position vertically at the center of the line', (WidgetTester tester) async { testWidgetsWithLeakTracking('should position vertically at the center of the line', (WidgetTester tester) async {
await tester.pumpWidget(const MaterialApp( await tester.pumpWidget(const MaterialApp(
home: Placeholder(), home: Placeholder(),
)); ));
@ -254,7 +256,7 @@ void main() {
reasonableTextField.center.dy - basicOffset.dy); reasonableTextField.center.dy - basicOffset.dy);
}); });
testWidgets('should reposition vertically if mashed against the ceiling', testWidgetsWithLeakTracking('should reposition vertically if mashed against the ceiling',
(WidgetTester tester) async { (WidgetTester tester) async {
final Rect topOfScreenTextFieldRect = final Rect topOfScreenTextFieldRect =
Rect.fromPoints(Offset.zero, const Offset(200, 0)); Rect.fromPoints(Offset.zero, const Offset(200, 0));
@ -289,7 +291,7 @@ void main() {
return magnifier.additionalFocalPointOffset; return magnifier.additionalFocalPointOffset;
} }
testWidgets( testWidgetsWithLeakTracking(
'should shift focal point so that the lens sees nothing out of bounds', 'should shift focal point so that the lens sees nothing out of bounds',
(WidgetTester tester) async { (WidgetTester tester) async {
await tester.pumpWidget(const MaterialApp( await tester.pumpWidget(const MaterialApp(
@ -317,7 +319,7 @@ void main() {
lessThan(reasonableTextField.left)); lessThan(reasonableTextField.left));
}); });
testWidgets( testWidgetsWithLeakTracking(
'focal point should shift if mashed against the top to always point to text', 'focal point should shift if mashed against the top to always point to text',
(WidgetTester tester) async { (WidgetTester tester) async {
final Rect topOfScreenTextFieldRect = final Rect topOfScreenTextFieldRect =
@ -354,7 +356,7 @@ void main() {
return animatedPositioned.duration.compareTo(Duration.zero) != 0; return animatedPositioned.duration.compareTo(Duration.zero) != 0;
} }
testWidgets('should not be animated on the initial state', testWidgetsWithLeakTracking('should not be animated on the initial state',
(WidgetTester tester) async { (WidgetTester tester) async {
await tester.pumpWidget(const MaterialApp( await tester.pumpWidget(const MaterialApp(
home: Placeholder(), home: Placeholder(),
@ -379,7 +381,7 @@ void main() {
expect(getIsAnimated(tester), false); expect(getIsAnimated(tester), false);
}); });
testWidgets('should not be animated on horizontal shifts', testWidgetsWithLeakTracking('should not be animated on horizontal shifts',
(WidgetTester tester) async { (WidgetTester tester) async {
await tester.pumpWidget(const MaterialApp( await tester.pumpWidget(const MaterialApp(
home: Placeholder(), home: Placeholder(),
@ -413,7 +415,7 @@ void main() {
expect(getIsAnimated(tester), false); expect(getIsAnimated(tester), false);
}); });
testWidgets('should be animated on vertical shifts', testWidgetsWithLeakTracking('should be animated on vertical shifts',
(WidgetTester tester) async { (WidgetTester tester) async {
const Offset verticalShift = Offset(0, 200); const Offset verticalShift = Offset(0, 200);
@ -449,7 +451,7 @@ void main() {
expect(getIsAnimated(tester), true); expect(getIsAnimated(tester), true);
}); });
testWidgets('should stop being animated when timer is up', testWidgetsWithLeakTracking('should stop being animated when timer is up',
(WidgetTester tester) async { (WidgetTester tester) async {
const Offset verticalShift = Offset(0, 200); const Offset verticalShift = Offset(0, 200);

View File

@ -143,8 +143,6 @@ void main() {
final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
expect(inkFeatures, paints..rect(color: focusColor)); expect(inkFeatures, paints..rect(color: focusColor));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('MaterialButton elevation and colors have proper precedence', (WidgetTester tester) async { testWidgetsWithLeakTracking('MaterialButton elevation and colors have proper precedence', (WidgetTester tester) async {
@ -217,8 +215,6 @@ void main() {
expect(inkFeatures, paints..rect(color: focusColor)..rect(color: highlightColor)); expect(inkFeatures, paints..rect(color: focusColor)..rect(color: highlightColor));
expect(material.elevation, equals(highlightElevation)); expect(material.elevation, equals(highlightElevation));
await gesture2.up(); await gesture2.up();
focusNode.dispose();
}); });
testWidgetsWithLeakTracking("MaterialButton's disabledColor takes precedence over its default disabled color.", (WidgetTester tester) async { testWidgetsWithLeakTracking("MaterialButton's disabledColor takes precedence over its default disabled color.", (WidgetTester tester) async {
@ -303,8 +299,6 @@ void main() {
await tester.pump(); await tester.pump();
expect(focusNode.hasPrimaryFocus, isTrue); expect(focusNode.hasPrimaryFocus, isTrue);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('MaterialButton onPressed and onLongPress callbacks are correctly called when non-null', (WidgetTester tester) async { testWidgetsWithLeakTracking('MaterialButton onPressed and onLongPress callbacks are correctly called when non-null', (WidgetTester tester) async {

View File

@ -5,6 +5,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
void main() { void main() {
void onPressed(TestMenu item) {} void onPressed(TestMenu item) {}
@ -52,7 +54,7 @@ void main() {
expect(identical(MenuBarThemeData.lerp(data, data, 0.5), data), true); expect(identical(MenuBarThemeData.lerp(data, data, 0.5), data), true);
}); });
testWidgets('theme is honored', (WidgetTester tester) async { testWidgetsWithLeakTracking('theme is honored', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false), theme: ThemeData(useMaterial3: false),
@ -105,7 +107,7 @@ void main() {
expect(subMenuMaterial.color, equals(Colors.green)); expect(subMenuMaterial.color, equals(Colors.green));
}); });
testWidgets('Constructor parameters override theme parameters', (WidgetTester tester) async { testWidgetsWithLeakTracking('Constructor parameters override theme parameters', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false), theme: ThemeData(useMaterial3: false),

View File

@ -5,6 +5,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
void main() { void main() {
Finder findMenuPanels() { Finder findMenuPanels() {
@ -42,7 +43,7 @@ void main() {
expect(identical(MenuStyle.lerp(data, data, 0.5), data), true); expect(identical(MenuStyle.lerp(data, data, 0.5), data), true);
}); });
testWidgets('fixedSize affects geometry', (WidgetTester tester) async { testWidgetsWithLeakTracking('fixedSize affects geometry', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -85,7 +86,7 @@ void main() {
expect(tester.getRect(findMenuPanels().at(1)).size, equals(const Size(100.0, 100.0))); expect(tester.getRect(findMenuPanels().at(1)).size, equals(const Size(100.0, 100.0)));
}); });
testWidgets('maximumSize affects geometry', (WidgetTester tester) async { testWidgetsWithLeakTracking('maximumSize affects geometry', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -128,7 +129,7 @@ void main() {
expect(tester.getRect(findMenuPanels().at(1)).size, equals(const Size(100.0, 100.0))); expect(tester.getRect(findMenuPanels().at(1)).size, equals(const Size(100.0, 100.0)));
}); });
testWidgets('minimumSize affects geometry', (WidgetTester tester) async { testWidgetsWithLeakTracking('minimumSize affects geometry', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -171,7 +172,7 @@ void main() {
expect(tester.getRect(findMenuPanels().at(1)).size, equals(const Size(300.0, 300.0))); expect(tester.getRect(findMenuPanels().at(1)).size, equals(const Size(300.0, 300.0)));
}); });
testWidgets('Material parameters are honored', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material parameters are honored', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -237,7 +238,7 @@ void main() {
expect(panelPadding.padding, equals(const EdgeInsets.all(20))); expect(panelPadding.padding, equals(const EdgeInsets.all(20)));
}); });
testWidgets('visual density', (WidgetTester tester) async { testWidgetsWithLeakTracking('visual density', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false), theme: ThemeData(useMaterial3: false),

View File

@ -5,6 +5,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
void main() { void main() {
void onPressed(TestMenu item) {} void onPressed(TestMenu item) {}
@ -53,7 +54,7 @@ void main() {
expect(identical(MenuThemeData.lerp(data, data, 0.5), data), true); expect(identical(MenuThemeData.lerp(data, data, 0.5), data), true);
}); });
testWidgets('theme is honored', (WidgetTester tester) async { testWidgetsWithLeakTracking('theme is honored', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false), theme: ThemeData(useMaterial3: false),
@ -106,7 +107,7 @@ void main() {
expect(subMenuMaterial.color, equals(Colors.red)); expect(subMenuMaterial.color, equals(Colors.red));
}); });
testWidgets('Constructor parameters override theme parameters', (WidgetTester tester) async { testWidgetsWithLeakTracking('Constructor parameters override theme parameters', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false), theme: ThemeData(useMaterial3: false),

View File

@ -80,7 +80,7 @@ void main() {
expect(box.size.height, equals(0)); expect(box.size.height, equals(0));
}); });
testWidgets('MergeableMaterial update slice', (WidgetTester tester) async { testWidgetsWithLeakTracking('MergeableMaterial update slice', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const MaterialApp( const MaterialApp(
home: Scaffold( home: Scaffold(
@ -234,7 +234,7 @@ void main() {
debugDisableShadows = true; debugDisableShadows = true;
}); });
testWidgets('MergeableMaterial skips shadow for zero elevation', (WidgetTester tester) async { testWidgetsWithLeakTracking('MergeableMaterial skips shadow for zero elevation', (WidgetTester tester) async {
debugDisableShadows = false; debugDisableShadows = false;
await tester.pumpWidget( await tester.pumpWidget(
const MaterialApp( const MaterialApp(
@ -1168,7 +1168,7 @@ void main() {
); );
} }
testWidgets('MergeableMaterial dividers', (WidgetTester tester) async { testWidgetsWithLeakTracking('MergeableMaterial dividers', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData(useMaterial3: false), theme: ThemeData(useMaterial3: false),
@ -1330,7 +1330,7 @@ void main() {
expect(decoration.border!.top.color, dividerColor); expect(decoration.border!.top.color, dividerColor);
}); });
testWidgets('MergeableMaterial respects MaterialSlice.color', (WidgetTester tester) async { testWidgetsWithLeakTracking('MergeableMaterial respects MaterialSlice.color', (WidgetTester tester) async {
const Color themeCardColor = Colors.red; const Color themeCardColor = Colors.red;
const Color materialSliceColor = Colors.green; const Color materialSliceColor = Colors.green;

View File

@ -5,8 +5,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
void main() { void main() {
testWidgets('Navigation drawer updates destinations when tapped', testWidgetsWithLeakTracking('Navigation drawer updates destinations when tapped',
(WidgetTester tester) async { (WidgetTester tester) async {
int mutatedIndex = -1; int mutatedIndex = -1;
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
@ -49,7 +51,7 @@ void main() {
expect(mutatedIndex, 0); expect(mutatedIndex, 0);
}); });
testWidgets('NavigationDrawer can update background color', testWidgetsWithLeakTracking('NavigationDrawer can update background color',
(WidgetTester tester) async { (WidgetTester tester) async {
const Color color = Colors.yellow; const Color color = Colors.yellow;
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
@ -82,7 +84,7 @@ void main() {
expect(_getMaterial(tester).color, equals(color)); expect(_getMaterial(tester).color, equals(color));
}); });
testWidgets('NavigationDrawer can update elevation', testWidgetsWithLeakTracking('NavigationDrawer can update elevation',
(WidgetTester tester) async { (WidgetTester tester) async {
const double elevation = 42.0; const double elevation = 42.0;
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
@ -114,7 +116,7 @@ void main() {
expect(_getMaterial(tester).elevation, equals(elevation)); expect(_getMaterial(tester).elevation, equals(elevation));
}); });
testWidgets( testWidgetsWithLeakTracking(
'NavigationDrawer uses proper defaults when no parameters are given', 'NavigationDrawer uses proper defaults when no parameters are given',
(WidgetTester tester) async { (WidgetTester tester) async {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
@ -163,7 +165,7 @@ void main() {
expect(iconBox.size, const Size(24.0, 24.0)); expect(iconBox.size, const Size(24.0, 24.0));
}); });
testWidgets('Navigation drawer is scrollable', (WidgetTester tester) async { testWidgetsWithLeakTracking('Navigation drawer is scrollable', (WidgetTester tester) async {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
widgetSetup(tester, 500, viewHeight: 300); widgetSetup(tester, 500, viewHeight: 300);
await tester.pumpWidget( await tester.pumpWidget(
@ -210,7 +212,7 @@ void main() {
expect(find.text('Label10'), findsNothing); expect(find.text('Label10'), findsNothing);
}); });
testWidgets('Safe Area test', (WidgetTester tester) async { testWidgetsWithLeakTracking('Safe Area test', (WidgetTester tester) async {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
const double viewHeight = 300; const double viewHeight = 300;
widgetSetup(tester, 500, viewHeight: viewHeight); widgetSetup(tester, 500, viewHeight: viewHeight);
@ -251,7 +253,7 @@ void main() {
expect(tester.getBottomRight(find.widgetWithText(NavigationDrawerDestination,'Label4')).dy, viewHeight); expect(tester.getBottomRight(find.widgetWithText(NavigationDrawerDestination,'Label4')).dy, viewHeight);
}); });
testWidgets('Navigation drawer semantics', (WidgetTester tester) async { testWidgetsWithLeakTracking('Navigation drawer semantics', (WidgetTester tester) async {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
final ThemeData theme= ThemeData.from(colorScheme: const ColorScheme.light()); final ThemeData theme= ThemeData.from(colorScheme: const ColorScheme.light());
Widget widget({int selectedIndex = 0}) { Widget widget({int selectedIndex = 0}) {
@ -321,7 +323,7 @@ void main() {
); );
}); });
testWidgets('Navigation destination updates indicator color and shape', (WidgetTester tester) async { testWidgetsWithLeakTracking('Navigation destination updates indicator color and shape', (WidgetTester tester) async {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
final ThemeData theme = ThemeData(useMaterial3: true); final ThemeData theme = ThemeData(useMaterial3: true);
const Color color = Color(0xff0000ff); const Color color = Color(0xff0000ff);
@ -372,7 +374,7 @@ void main() {
expect(_getInkWell(tester)?.customBorder, shape); expect(_getInkWell(tester)?.customBorder, shape);
}); });
testWidgets('NavigationDrawer.tilePadding defaults to EdgeInsets.symmetric(horizontal: 12.0)', (WidgetTester tester) async { testWidgetsWithLeakTracking('NavigationDrawer.tilePadding defaults to EdgeInsets.symmetric(horizontal: 12.0)', (WidgetTester tester) async {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
widgetSetup(tester, 3000, viewHeight: 3000); widgetSetup(tester, 3000, viewHeight: 3000);
final Widget widget = _buildWidget( final Widget widget = _buildWidget(

View File

@ -229,8 +229,6 @@ void main() {
focusNode.requestFocus(); focusNode.requestFocus();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.12))); expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Does OutlinedButton work with hover', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does OutlinedButton work with hover', (WidgetTester tester) async {
@ -289,8 +287,6 @@ void main() {
final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
expect(inkFeatures, paints..rect(color: focusColor)); expect(inkFeatures, paints..rect(color: focusColor));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Does OutlinedButton work with autofocus', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does OutlinedButton work with autofocus', (WidgetTester tester) async {
@ -321,8 +317,6 @@ void main() {
final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
expect(inkFeatures, paints..rect(color: focusColor)); expect(inkFeatures, paints..rect(color: focusColor));
focusNode.dispose();
}); });
testWidgets('Default OutlinedButton meets a11y contrast guidelines', (WidgetTester tester) async { testWidgets('Default OutlinedButton meets a11y contrast guidelines', (WidgetTester tester) async {
@ -368,8 +362,6 @@ void main() {
focusNode.requestFocus(); focusNode.requestFocus();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
await expectLater(tester, meetsGuideline(textContrastGuideline)); await expectLater(tester, meetsGuideline(textContrastGuideline));
focusNode.dispose();
}, },
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115 skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
); );
@ -439,8 +431,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
await expectLater(tester, meetsGuideline(textContrastGuideline)); await expectLater(tester, meetsGuideline(textContrastGuideline));
focusNode.dispose();
}, },
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115 skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
); );
@ -510,8 +500,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(textColor(), pressedColor); expect(textColor(), pressedColor);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('OutlinedButton uses stateful color for icon color in different states', (WidgetTester tester) async { testWidgetsWithLeakTracking('OutlinedButton uses stateful color for icon color in different states', (WidgetTester tester) async {
@ -579,8 +567,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(iconColor(), pressedColor); expect(iconColor(), pressedColor);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('OutlinedButton uses stateful color for border color in different states', (WidgetTester tester) async { testWidgetsWithLeakTracking('OutlinedButton uses stateful color for border color in different states', (WidgetTester tester) async {
@ -649,8 +635,6 @@ void main() {
await gesture.down(center); await gesture.down(center);
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(outlinedButton, paints..drrect(color: pressedColor)); expect(outlinedButton, paints..drrect(color: pressedColor));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('OutlinedButton onPressed and onLongPress callbacks are correctly called when non-null', (WidgetTester tester) async { testWidgetsWithLeakTracking('OutlinedButton onPressed and onLongPress callbacks are correctly called when non-null', (WidgetTester tester) async {
@ -745,8 +729,6 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(focusNode.hasPrimaryFocus, isFalse); expect(focusNode.hasPrimaryFocus, isFalse);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('disabled and hovered OutlinedButton responds to mouse-exit', (WidgetTester tester) async { testWidgetsWithLeakTracking('disabled and hovered OutlinedButton responds to mouse-exit', (WidgetTester tester) async {
@ -838,8 +820,6 @@ void main() {
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking('When OutlinedButton disable, Can not set OutlinedButton focus.', (WidgetTester tester) async { testWidgetsWithLeakTracking('When OutlinedButton disable, Can not set OutlinedButton focus.', (WidgetTester tester) async {
@ -863,8 +843,6 @@ void main() {
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking("Outline button doesn't crash if disabled during a gesture", (WidgetTester tester) async { testWidgetsWithLeakTracking("Outline button doesn't crash if disabled during a gesture", (WidgetTester tester) async {
@ -1843,7 +1821,7 @@ void main() {
expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic); expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic);
}); });
testWidgets('OutlinedButton in SelectionArea changes mouse cursor when hovered', (WidgetTester tester) async { testWidgetsWithLeakTracking('OutlinedButton in SelectionArea changes mouse cursor when hovered', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/104595. // Regression test for https://github.com/flutter/flutter/issues/104595.
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: SelectionArea( home: SelectionArea(
@ -1996,15 +1974,15 @@ void main() {
await gesture.removePointer(); await gesture.removePointer();
} }
testWidgets('OutlinedButton statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('OutlinedButton statesController', (WidgetTester tester) async {
testStatesController(null, tester); testStatesController(null, tester);
}); });
testWidgets('OutlinedButton.icon statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('OutlinedButton.icon statesController', (WidgetTester tester) async {
testStatesController(const Icon(Icons.add), tester); testStatesController(const Icon(Icons.add), tester);
}); });
testWidgets('Disabled OutlinedButton statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('Disabled OutlinedButton statesController', (WidgetTester tester) async {
int count = 0; int count = 0;
void valueChanged() { void valueChanged() {
count += 1; count += 1;

View File

@ -208,7 +208,7 @@ void main() {
expect(indicatorColors(tester), const <Color>[kBlue, kRed, kRed]); expect(indicatorColors(tester), const <Color>[kBlue, kRed, kRed]);
}); });
testWidgets('PageSelector indicatorSize', (WidgetTester tester) async { testWidgetsWithLeakTracking('PageSelector indicatorSize', (WidgetTester tester) async {
final TabController tabController = TabController( final TabController tabController = TabController(
vsync: const TestVSync(), vsync: const TestVSync(),
initialIndex: 1, initialIndex: 1,

View File

@ -124,7 +124,7 @@ void main() {
expect(buildCount, equals(2)); expect(buildCount, equals(2));
}); });
testWidgets('Verify that a persistent BottomSheet cannot be dismissed', (WidgetTester tester) async { testWidgetsWithLeakTracking('Verify that a persistent BottomSheet cannot be dismissed', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: Scaffold( home: Scaffold(
body: const Center(child: Text('body')), body: const Center(child: Text('body')),
@ -187,7 +187,7 @@ void main() {
expect(find.text('Two'), findsNothing); expect(find.text('Two'), findsNothing);
}); });
testWidgets('Verify DraggableScrollableSheet.shouldCloseOnMinExtent == false prevents dismissal', (WidgetTester tester) async { testWidgetsWithLeakTracking('Verify DraggableScrollableSheet.shouldCloseOnMinExtent == false prevents dismissal', (WidgetTester tester) async {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
@ -299,7 +299,7 @@ void main() {
expect(find.text('Two'), findsNothing); expect(find.text('Two'), findsNothing);
}); });
testWidgets('Verify that a persistent BottomSheet can fling up and hide the fab', (WidgetTester tester) async { testWidgetsWithLeakTracking('Verify that a persistent BottomSheet can fling up and hide the fab', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
@ -410,7 +410,7 @@ void main() {
expect(find.text('Item 22'), findsNothing); expect(find.text('Item 22'), findsNothing);
}); });
testWidgets('Verify that a scrollable BottomSheet hides the fab when scrolled up', (WidgetTester tester) async { testWidgetsWithLeakTracking('Verify that a scrollable BottomSheet hides the fab when scrolled up', (WidgetTester tester) async {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
@ -590,7 +590,7 @@ void main() {
}); });
// Regression test for https://github.com/flutter/flutter/issues/71435 // Regression test for https://github.com/flutter/flutter/issues/71435
testWidgets( testWidgetsWithLeakTracking(
'Scaffold.bottomSheet should be updated without creating a new RO' 'Scaffold.bottomSheet should be updated without creating a new RO'
' when the new widget has the same key and type.', ' when the new widget has the same key and type.',
(WidgetTester tester) async { (WidgetTester tester) async {

View File

@ -584,7 +584,6 @@ void main() {
..circle(color: const Color(0x61000000)) ..circle(color: const Color(0x61000000))
..circle(color: const Color(0x61000000)), ..circle(color: const Color(0x61000000)),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material3 - Radio is focusable and has correct focus color', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - Radio is focusable and has correct focus color', (WidgetTester tester) async {
@ -663,7 +662,6 @@ void main() {
..circle(color: theme.colorScheme.onSurface.withOpacity(0.38)) ..circle(color: theme.colorScheme.onSurface.withOpacity(0.38))
..circle(color: theme.colorScheme.onSurface.withOpacity(0.38)), ..circle(color: theme.colorScheme.onSurface.withOpacity(0.38)),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material2 - Radio can be hovered and has correct hover color', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material2 - Radio can be hovered and has correct hover color', (WidgetTester tester) async {
@ -910,8 +908,6 @@ void main() {
await tester.sendKeyEvent(LogicalKeyboardKey.space); await tester.sendKeyEvent(LogicalKeyboardKey.space);
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(groupValue, equals(2)); expect(groupValue, equals(2));
focusNode2.dispose();
}); });
testWidgetsWithLeakTracking('Radio responds to density changes.', (WidgetTester tester) async { testWidgetsWithLeakTracking('Radio responds to density changes.', (WidgetTester tester) async {
@ -1228,8 +1224,6 @@ void main() {
..circle(color: theme.hoverColor) ..circle(color: theme.hoverColor)
..circle(color: hoveredFillColor), ..circle(color: hoveredFillColor),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material3 - Radio fill color resolves in hovered/focused states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - Radio fill color resolves in hovered/focused states', (WidgetTester tester) async {
@ -1308,8 +1302,6 @@ void main() {
..circle(color: theme.colorScheme.primary.withOpacity(0.08)) ..circle(color: theme.colorScheme.primary.withOpacity(0.08))
..circle(color: hoveredFillColor), ..circle(color: hoveredFillColor),
); );
focusNode.dispose();
}); });
testWidgets('Radio overlay color resolves in active/pressed/focused/hovered states', (WidgetTester tester) async { testWidgets('Radio overlay color resolves in active/pressed/focused/hovered states', (WidgetTester tester) async {
@ -1455,8 +1447,6 @@ void main() {
), ),
reason: 'Hovered Radio should use overlay color $hoverOverlayColor over $hoverColor', reason: 'Hovered Radio should use overlay color $hoverOverlayColor over $hoverColor',
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Do not crash when widget disappears while pointer is down', (WidgetTester tester) async { testWidgetsWithLeakTracking('Do not crash when widget disappears while pointer is down', (WidgetTester tester) async {
@ -1720,8 +1710,6 @@ void main() {
Material.of(tester.element(find.byType(Radio<bool>))), Material.of(tester.element(find.byType(Radio<bool>))),
paints..circle(color: theme.hoverColor)..circle(color: colors.secondary) paints..circle(color: theme.hoverColor)..circle(color: colors.secondary)
); );
focusNode.dispose();
}); });
testWidgets('Material3 - Radio button default overlay colors in hover/focus/press states', (WidgetTester tester) async { testWidgets('Material3 - Radio button default overlay colors in hover/focus/press states', (WidgetTester tester) async {
@ -1808,8 +1796,6 @@ void main() {
Material.of(tester.element(find.byType(Radio<bool>))), Material.of(tester.element(find.byType(Radio<bool>))),
paints..circle(color: colors.primary.withOpacity(0.08))..circle(color: colors.primary.withOpacity(1)) paints..circle(color: colors.primary.withOpacity(0.08))..circle(color: colors.primary.withOpacity(1))
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Radio.adaptive shows the correct platform widget', (WidgetTester tester) async { testWidgetsWithLeakTracking('Radio.adaptive shows the correct platform widget', (WidgetTester tester) async {
@ -1906,7 +1892,6 @@ void main() {
..circle(color: theme.focusColor) ..circle(color: theme.focusColor)
..circle(color: theme.colorScheme.secondary) ..circle(color: theme.colorScheme.secondary)
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material3 - Radio default overlayColor and fillColor resolves pressed state', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - Radio default overlayColor and fillColor resolves pressed state', (WidgetTester tester) async {
@ -1972,6 +1957,5 @@ void main() {
..circle(color: theme.colorScheme.primary.withOpacity(0.12)) ..circle(color: theme.colorScheme.primary.withOpacity(0.12))
..circle(color: theme.colorScheme.primary) ..circle(color: theme.colorScheme.primary)
); );
focusNode.dispose();
}); });
} }

View File

@ -9,9 +9,11 @@ import 'package:flutter/rendering.dart';
import 'package:flutter/src/physics/utils.dart' show nearEqual; import 'package:flutter/src/physics/utils.dart' show nearEqual;
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
void main() { void main() {
// Regression test for https://github.com/flutter/flutter/issues/105833 // Regression test for https://github.com/flutter/flutter/issues/105833
testWidgets('Drag gesture uses provided gesture settings', (WidgetTester tester) async { testWidgetsWithLeakTracking('Drag gesture uses provided gesture settings', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.1, 0.5); RangeValues values = const RangeValues(0.1, 0.5);
bool dragStarted = false; bool dragStarted = false;
final Key sliderKey = UniqueKey(); final Key sliderKey = UniqueKey();
@ -117,7 +119,7 @@ void main() {
expect(dragStarted, false); expect(dragStarted, false);
}); });
testWidgets('Range Slider can move when tapped (continuous LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider can move when tapped (continuous LTR)', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
await tester.pumpWidget( await tester.pumpWidget(
@ -171,7 +173,7 @@ void main() {
expect(values.end, moreOrLessEquals(0.9, epsilon: 0.01)); expect(values.end, moreOrLessEquals(0.9, epsilon: 0.01));
}); });
testWidgets('Range Slider can move when tapped (continuous RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider can move when tapped (continuous RTL)', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
await tester.pumpWidget( await tester.pumpWidget(
@ -225,7 +227,7 @@ void main() {
expect(values.end, moreOrLessEquals(0.9, epsilon: 0.01)); expect(values.end, moreOrLessEquals(0.9, epsilon: 0.01));
}); });
testWidgets('Range Slider can move when tapped (discrete LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider can move when tapped (discrete LTR)', (WidgetTester tester) async {
RangeValues values = const RangeValues(30, 70); RangeValues values = const RangeValues(30, 70);
await tester.pumpWidget( await tester.pumpWidget(
@ -283,7 +285,7 @@ void main() {
expect(values.end.round(), equals(90)); expect(values.end.round(), equals(90));
}); });
testWidgets('Range Slider can move when tapped (discrete RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider can move when tapped (discrete RTL)', (WidgetTester tester) async {
RangeValues values = const RangeValues(30, 70); RangeValues values = const RangeValues(30, 70);
await tester.pumpWidget( await tester.pumpWidget(
@ -341,7 +343,7 @@ void main() {
expect(values.end.round(), equals(90)); expect(values.end.round(), equals(90));
}); });
testWidgets('Range Slider thumbs can be dragged to the min and max (continuous LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged to the min and max (continuous LTR)', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
await tester.pumpWidget( await tester.pumpWidget(
@ -385,7 +387,7 @@ void main() {
expect(values.end, equals(1)); expect(values.end, equals(1));
}); });
testWidgets('Range Slider thumbs can be dragged to the min and max (continuous RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged to the min and max (continuous RTL)', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
await tester.pumpWidget( await tester.pumpWidget(
@ -429,7 +431,7 @@ void main() {
expect(values.start, equals(0)); expect(values.start, equals(0));
}); });
testWidgets('Range Slider thumbs can be dragged to the min and max (discrete LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged to the min and max (discrete LTR)', (WidgetTester tester) async {
RangeValues values = const RangeValues(30, 70); RangeValues values = const RangeValues(30, 70);
await tester.pumpWidget( await tester.pumpWidget(
@ -475,7 +477,7 @@ void main() {
expect(values.end, equals(100)); expect(values.end, equals(100));
}); });
testWidgets('Range Slider thumbs can be dragged to the min and max (discrete RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged to the min and max (discrete RTL)', (WidgetTester tester) async {
RangeValues values = const RangeValues(30, 70); RangeValues values = const RangeValues(30, 70);
await tester.pumpWidget( await tester.pumpWidget(
@ -521,7 +523,7 @@ void main() {
expect(values.start, equals(0)); expect(values.start, equals(0));
}); });
testWidgets('Range Slider thumbs can be dragged together and the start thumb can be dragged apart (continuous LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged together and the start thumb can be dragged apart (continuous LTR)', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
await tester.pumpWidget( await tester.pumpWidget(
@ -571,7 +573,7 @@ void main() {
expect(values.start, moreOrLessEquals(0.2, epsilon: 0.05)); expect(values.start, moreOrLessEquals(0.2, epsilon: 0.05));
}); });
testWidgets('Range Slider thumbs can be dragged together and the start thumb can be dragged apart (continuous RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged together and the start thumb can be dragged apart (continuous RTL)', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
await tester.pumpWidget( await tester.pumpWidget(
@ -621,7 +623,7 @@ void main() {
expect(values.start, moreOrLessEquals(0.2, epsilon: 0.05)); expect(values.start, moreOrLessEquals(0.2, epsilon: 0.05));
}); });
testWidgets('Range Slider thumbs can be dragged together and the start thumb can be dragged apart (discrete LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged together and the start thumb can be dragged apart (discrete LTR)', (WidgetTester tester) async {
RangeValues values = const RangeValues(30, 70); RangeValues values = const RangeValues(30, 70);
await tester.pumpWidget( await tester.pumpWidget(
@ -673,7 +675,7 @@ void main() {
expect(values.start, moreOrLessEquals(20, epsilon: 0.01)); expect(values.start, moreOrLessEquals(20, epsilon: 0.01));
}); });
testWidgets('Range Slider thumbs can be dragged together and the start thumb can be dragged apart (discrete RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged together and the start thumb can be dragged apart (discrete RTL)', (WidgetTester tester) async {
RangeValues values = const RangeValues(30, 70); RangeValues values = const RangeValues(30, 70);
await tester.pumpWidget( await tester.pumpWidget(
@ -725,7 +727,7 @@ void main() {
expect(values.start, moreOrLessEquals(20, epsilon: 0.01)); expect(values.start, moreOrLessEquals(20, epsilon: 0.01));
}); });
testWidgets('Range Slider thumbs can be dragged together and the end thumb can be dragged apart (continuous LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged together and the end thumb can be dragged apart (continuous LTR)', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
await tester.pumpWidget( await tester.pumpWidget(
@ -775,7 +777,7 @@ void main() {
expect(values.end, moreOrLessEquals(0.8, epsilon: 0.05)); expect(values.end, moreOrLessEquals(0.8, epsilon: 0.05));
}); });
testWidgets('Range Slider thumbs can be dragged together and the end thumb can be dragged apart (continuous RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged together and the end thumb can be dragged apart (continuous RTL)', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
await tester.pumpWidget( await tester.pumpWidget(
@ -825,7 +827,7 @@ void main() {
expect(values.end, moreOrLessEquals(0.8, epsilon: 0.05)); expect(values.end, moreOrLessEquals(0.8, epsilon: 0.05));
}); });
testWidgets('Range Slider thumbs can be dragged together and the end thumb can be dragged apart (discrete LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged together and the end thumb can be dragged apart (discrete LTR)', (WidgetTester tester) async {
RangeValues values = const RangeValues(30, 70); RangeValues values = const RangeValues(30, 70);
await tester.pumpWidget( await tester.pumpWidget(
@ -877,7 +879,7 @@ void main() {
expect(values.end, moreOrLessEquals(80, epsilon: 0.01)); expect(values.end, moreOrLessEquals(80, epsilon: 0.01));
}); });
testWidgets('Range Slider thumbs can be dragged together and the end thumb can be dragged apart (discrete RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumbs can be dragged together and the end thumb can be dragged apart (discrete RTL)', (WidgetTester tester) async {
RangeValues values = const RangeValues(30, 70); RangeValues values = const RangeValues(30, 70);
await tester.pumpWidget( await tester.pumpWidget(
@ -929,7 +931,7 @@ void main() {
expect(values.end, moreOrLessEquals(80, epsilon: 0.01)); expect(values.end, moreOrLessEquals(80, epsilon: 0.01));
}); });
testWidgets('Range Slider onChangeEnd and onChangeStart are called on an interaction initiated by tap', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider onChangeEnd and onChangeStart are called on an interaction initiated by tap', (WidgetTester tester) async {
RangeValues values = const RangeValues(30, 70); RangeValues values = const RangeValues(30, 70);
RangeValues? startValues; RangeValues? startValues;
RangeValues? endValues; RangeValues? endValues;
@ -983,7 +985,7 @@ void main() {
expect(endValues!.end, moreOrLessEquals(70, epsilon: 1)); expect(endValues!.end, moreOrLessEquals(70, epsilon: 1));
}); });
testWidgets('Range Slider onChangeEnd and onChangeStart are called on an interaction initiated by drag', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider onChangeEnd and onChangeStart are called on an interaction initiated by drag', (WidgetTester tester) async {
RangeValues values = const RangeValues(30, 70); RangeValues values = const RangeValues(30, 70);
late RangeValues startValues; late RangeValues startValues;
late RangeValues endValues; late RangeValues endValues;
@ -1098,7 +1100,7 @@ void main() {
); );
} }
testWidgets('Range Slider uses the right theme colors for the right shapes for a default enabled slider', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider uses the right theme colors for the right shapes for a default enabled slider', (WidgetTester tester) async {
final ThemeData theme = buildTheme(); final ThemeData theme = buildTheme();
final SliderThemeData sliderTheme = theme.sliderTheme; final SliderThemeData sliderTheme = theme.sliderTheme;
@ -1127,7 +1129,7 @@ void main() {
expect(sliderBox, isNot(paints..circle(color: sliderTheme.inactiveTickMarkColor))); expect(sliderBox, isNot(paints..circle(color: sliderTheme.inactiveTickMarkColor)));
}); });
testWidgets('Range Slider uses the right theme colors for the right shapes when setting the active color', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider uses the right theme colors for the right shapes when setting the active color', (WidgetTester tester) async {
const Color activeColor = Color(0xcafefeed); const Color activeColor = Color(0xcafefeed);
final ThemeData theme = buildTheme(); final ThemeData theme = buildTheme();
final SliderThemeData sliderTheme = theme.sliderTheme; final SliderThemeData sliderTheme = theme.sliderTheme;
@ -1155,7 +1157,7 @@ void main() {
expect(sliderBox, isNot(paints..rect(color: sliderTheme.disabledInactiveTrackColor))); expect(sliderBox, isNot(paints..rect(color: sliderTheme.disabledInactiveTrackColor)));
}); });
testWidgets('Range Slider uses the right theme colors for the right shapes when setting the inactive color', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider uses the right theme colors for the right shapes when setting the inactive color', (WidgetTester tester) async {
const Color inactiveColor = Color(0xdeadbeef); const Color inactiveColor = Color(0xdeadbeef);
final ThemeData theme = buildTheme(); final ThemeData theme = buildTheme();
final SliderThemeData sliderTheme = theme.sliderTheme; final SliderThemeData sliderTheme = theme.sliderTheme;
@ -1182,7 +1184,7 @@ void main() {
expect(sliderBox, isNot(paints..rect(color: sliderTheme.disabledInactiveTrackColor))); expect(sliderBox, isNot(paints..rect(color: sliderTheme.disabledInactiveTrackColor)));
}); });
testWidgets('Range Slider uses the right theme colors for the right shapes with active and inactive colors', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider uses the right theme colors for the right shapes with active and inactive colors', (WidgetTester tester) async {
const Color activeColor = Color(0xcafefeed); const Color activeColor = Color(0xcafefeed);
const Color inactiveColor = Color(0xdeadbeef); const Color inactiveColor = Color(0xdeadbeef);
final ThemeData theme = buildTheme(); final ThemeData theme = buildTheme();
@ -1215,7 +1217,7 @@ void main() {
expect(sliderBox, isNot(paints..rect(color: sliderTheme.disabledInactiveTrackColor))); expect(sliderBox, isNot(paints..rect(color: sliderTheme.disabledInactiveTrackColor)));
}); });
testWidgets('Range Slider uses the right theme colors for the right shapes for a discrete slider', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider uses the right theme colors for the right shapes for a discrete slider', (WidgetTester tester) async {
final ThemeData theme = buildTheme(); final ThemeData theme = buildTheme();
final SliderThemeData sliderTheme = theme.sliderTheme; final SliderThemeData sliderTheme = theme.sliderTheme;
@ -1245,7 +1247,7 @@ void main() {
expect(sliderBox, isNot(paints..rect(color: sliderTheme.disabledInactiveTrackColor))); expect(sliderBox, isNot(paints..rect(color: sliderTheme.disabledInactiveTrackColor)));
}); });
testWidgets('Range Slider uses the right theme colors for the right shapes for a discrete slider with active and inactive colors', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider uses the right theme colors for the right shapes for a discrete slider with active and inactive colors', (WidgetTester tester) async {
const Color activeColor = Color(0xcafefeed); const Color activeColor = Color(0xcafefeed);
const Color inactiveColor = Color(0xdeadbeef); const Color inactiveColor = Color(0xdeadbeef);
final ThemeData theme = buildTheme(); final ThemeData theme = buildTheme();
@ -1286,7 +1288,7 @@ void main() {
expect(sliderBox, isNot(paints..circle(color: sliderTheme.inactiveTickMarkColor))); expect(sliderBox, isNot(paints..circle(color: sliderTheme.inactiveTickMarkColor)));
}); });
testWidgets('Range Slider uses the right theme colors for the right shapes for a default disabled slider', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider uses the right theme colors for the right shapes for a default disabled slider', (WidgetTester tester) async {
final ThemeData theme = buildTheme(); final ThemeData theme = buildTheme();
final SliderThemeData sliderTheme = theme.sliderTheme; final SliderThemeData sliderTheme = theme.sliderTheme;
@ -1306,7 +1308,7 @@ void main() {
expect(sliderBox, isNot(paints..rect(color: sliderTheme.inactiveTrackColor))); expect(sliderBox, isNot(paints..rect(color: sliderTheme.inactiveTrackColor)));
}); });
testWidgets('Range Slider uses the right theme colors for the right shapes for a disabled slider with active and inactive colors', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider uses the right theme colors for the right shapes for a disabled slider with active and inactive colors', (WidgetTester tester) async {
const Color activeColor = Color(0xcafefeed); const Color activeColor = Color(0xcafefeed);
const Color inactiveColor = Color(0xdeadbeef); const Color inactiveColor = Color(0xdeadbeef);
final ThemeData theme = buildTheme(); final ThemeData theme = buildTheme();
@ -1495,7 +1497,7 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
}); });
testWidgets('Range Slider top thumb gets stroked when overlapping', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider top thumb gets stroked when overlapping', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
@ -1562,7 +1564,7 @@ void main() {
); );
}); });
testWidgets('Range Slider top value indicator gets stroked when overlapping', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider top value indicator gets stroked when overlapping', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
@ -1636,7 +1638,7 @@ void main() {
await gesture.up(); await gesture.up();
}); });
testWidgets('Range Slider top value indicator gets stroked when overlapping with large text scale', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider top value indicator gets stroked when overlapping with large text scale', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
@ -1713,7 +1715,7 @@ void main() {
await gesture.up(); await gesture.up();
}); });
testWidgets('Range Slider thumb gets stroked when overlapping', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider thumb gets stroked when overlapping', (WidgetTester tester) async {
RangeValues values = const RangeValues(0.3, 0.7); RangeValues values = const RangeValues(0.3, 0.7);
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
@ -1794,7 +1796,7 @@ void main() {
}); });
// Regression test for https://github.com/flutter/flutter/issues/101868 // Regression test for https://github.com/flutter/flutter/issues/101868
testWidgets('RangeSlider.label info should not write to semantic node', (WidgetTester tester) async { testWidgetsWithLeakTracking('RangeSlider.label info should not write to semantic node', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Theme( home: Theme(
@ -1852,7 +1854,7 @@ void main() {
); );
}); });
testWidgets('Range Slider Semantics - ltr', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider Semantics - ltr', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Theme( home: Theme(
@ -1936,7 +1938,7 @@ void main() {
]); ]);
}); });
testWidgets('Range Slider Semantics - rtl', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider Semantics - rtl', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Theme( home: Theme(
@ -2018,7 +2020,7 @@ void main() {
]); ]);
}); });
testWidgets('Range Slider implements debugFillProperties', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider implements debugFillProperties', (WidgetTester tester) async {
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
RangeSlider( RangeSlider(
@ -2049,7 +2051,7 @@ void main() {
]); ]);
}); });
testWidgets('Range Slider can be painted in a narrower constraint when track shape is RoundedRectRange', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider can be painted in a narrower constraint when track shape is RoundedRectRange', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Directionality( home: Directionality(
@ -2088,7 +2090,7 @@ void main() {
); );
}); });
testWidgets('Range Slider can be painted in a narrower constraint when track shape is Rectangular', (WidgetTester tester) async { testWidgetsWithLeakTracking('Range Slider can be painted in a narrower constraint when track shape is Rectangular', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData( theme: ThemeData(
@ -2133,7 +2135,7 @@ void main() {
); );
}); });
testWidgets('Update the divisions and values at the same time for RangeSlider', (WidgetTester tester) async { testWidgetsWithLeakTracking('Update the divisions and values at the same time for RangeSlider', (WidgetTester tester) async {
// Regress test for https://github.com/flutter/flutter/issues/65943 // Regress test for https://github.com/flutter/flutter/issues/65943
Widget buildFrame(double maxValue) { Widget buildFrame(double maxValue) {
return MaterialApp( return MaterialApp(
@ -2177,7 +2179,7 @@ void main() {
expect(nearEqual(activeTrackRect.right, (800.0 - 24.0 - 24.0) * (8 / 15) + 24.0, 0.01), true); expect(nearEqual(activeTrackRect.right, (800.0 - 24.0 - 24.0) * (8 / 15) + 24.0, 0.01), true);
}); });
testWidgets('RangeSlider changes mouse cursor when hovered', (WidgetTester tester) async { testWidgetsWithLeakTracking('RangeSlider changes mouse cursor when hovered', (WidgetTester tester) async {
const RangeValues values = RangeValues(50, 70); const RangeValues values = RangeValues(50, 70);
// Test default cursor. // Test default cursor.
@ -2232,7 +2234,7 @@ void main() {
expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.text); expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.text);
}); });
testWidgets('RangeSlider MaterialStateMouseCursor resolves correctly', (WidgetTester tester) async { testWidgetsWithLeakTracking('RangeSlider MaterialStateMouseCursor resolves correctly', (WidgetTester tester) async {
RangeValues values = const RangeValues(50, 70); RangeValues values = const RangeValues(50, 70);
const MouseCursor disabledCursor = SystemMouseCursors.basic; const MouseCursor disabledCursor = SystemMouseCursors.basic;
const MouseCursor hoveredCursor = SystemMouseCursors.grab; const MouseCursor hoveredCursor = SystemMouseCursors.grab;
@ -2306,7 +2308,7 @@ void main() {
expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), draggedCursor); expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), draggedCursor);
}); });
testWidgets('RangeSlider can be hovered and has correct hover color', (WidgetTester tester) async { testWidgetsWithLeakTracking('RangeSlider can be hovered and has correct hover color', (WidgetTester tester) async {
tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional; tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional;
RangeValues values = const RangeValues(50, 70); RangeValues values = const RangeValues(50, 70);
final ThemeData theme = ThemeData(); final ThemeData theme = ThemeData();
@ -2369,7 +2371,7 @@ void main() {
); );
}); });
testWidgets('RangeSlider is draggable and has correct dragged color', (WidgetTester tester) async { testWidgetsWithLeakTracking('RangeSlider is draggable and has correct dragged color', (WidgetTester tester) async {
tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional; tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional;
RangeValues values = const RangeValues(50, 70); RangeValues values = const RangeValues(50, 70);
final ThemeData theme = ThemeData(); final ThemeData theme = ThemeData();
@ -2425,7 +2427,7 @@ void main() {
); );
}); });
testWidgets('RangeSlider overlayColor supports hovered and dragged states', (WidgetTester tester) async { testWidgetsWithLeakTracking('RangeSlider overlayColor supports hovered and dragged states', (WidgetTester tester) async {
tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional; tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional;
RangeValues values = const RangeValues(50, 70); RangeValues values = const RangeValues(50, 70);
const Color hoverColor = Color(0xffff0000); const Color hoverColor = Color(0xffff0000);
@ -2540,7 +2542,7 @@ void main() {
); );
}); });
testWidgets('RangeSlider onChangeStart and onChangeEnd fire once', (WidgetTester tester) async { testWidgetsWithLeakTracking('RangeSlider onChangeStart and onChangeEnd fire once', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/128433 // Regression test for https://github.com/flutter/flutter/issues/128433
int startFired = 0; int startFired = 0;

View File

@ -108,7 +108,6 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(pressed, isTrue); expect(pressed, isTrue);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('materialTapTargetSize.padded expands hit test area', (WidgetTester tester) async { testWidgetsWithLeakTracking('materialTapTargetSize.padded expands hit test area', (WidgetTester tester) async {
@ -346,7 +345,6 @@ void main() {
await tester.pumpAndSettle(const Duration(seconds: 1)); await tester.pumpAndSettle(const Duration(seconds: 1));
expect(box, paints..rect(color: focusColor)); expect(box, paints..rect(color: focusColor));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('RawMaterialButton loses focus when disabled.', (WidgetTester tester) async { testWidgetsWithLeakTracking('RawMaterialButton loses focus when disabled.', (WidgetTester tester) async {
@ -381,7 +379,6 @@ void main() {
await tester.pump(); await tester.pump();
expect(focusNode.hasPrimaryFocus, isFalse); expect(focusNode.hasPrimaryFocus, isFalse);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking("Disabled RawMaterialButton can't be traversed to.", (WidgetTester tester) async { testWidgetsWithLeakTracking("Disabled RawMaterialButton can't be traversed to.", (WidgetTester tester) async {
@ -422,9 +419,6 @@ void main() {
expect(focusNode1.hasPrimaryFocus, isTrue); expect(focusNode1.hasPrimaryFocus, isTrue);
expect(focusNode2.hasPrimaryFocus, isFalse); expect(focusNode2.hasPrimaryFocus, isFalse);
focusNode1.dispose();
focusNode2.dispose();
}); });
testWidgetsWithLeakTracking('RawMaterialButton handles hover', (WidgetTester tester) async { testWidgetsWithLeakTracking('RawMaterialButton handles hover', (WidgetTester tester) async {

View File

@ -79,7 +79,7 @@ void main() {
); );
}); });
testWidgets('works with MaterialApp and Scaffold', (WidgetTester tester) async { testWidgetsWithLeakTracking('works with MaterialApp and Scaffold', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: MediaQuery( home: MediaQuery(
data: const MediaQueryData( data: const MediaQueryData(
@ -123,7 +123,7 @@ void main() {
); );
}); });
testWidgets("should not paint when there isn't enough space", (WidgetTester tester) async { testWidgetsWithLeakTracking("should not paint when there isn't enough space", (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: MediaQuery( home: MediaQuery(
data: const MediaQueryData( data: const MediaQueryData(

View File

@ -243,19 +243,19 @@ void main() {
expect(trailingRect.right, barRect.right - 16.0); expect(trailingRect.right, barRect.right - 16.0);
} }
testWidgets('SearchBar properties overrides defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('SearchBar properties overrides defaults', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(useSearchBarProperties: true)); await tester.pumpWidget(buildFrame(useSearchBarProperties: true));
await tester.pumpAndSettle(); // allow the animations to finish await tester.pumpAndSettle(); // allow the animations to finish
checkSearchBar(tester); checkSearchBar(tester);
}); });
testWidgets('SearchBar theme data overrides defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('SearchBar theme data overrides defaults', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(searchBarThemeData: searchBarTheme)); await tester.pumpWidget(buildFrame(searchBarThemeData: searchBarTheme));
await tester.pumpAndSettle(); await tester.pumpAndSettle();
checkSearchBar(tester); checkSearchBar(tester);
}); });
testWidgets('Overall Theme SearchBar theme overrides defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('Overall Theme SearchBar theme overrides defaults', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(overallTheme: searchBarTheme)); await tester.pumpWidget(buildFrame(overallTheme: searchBarTheme));
await tester.pumpAndSettle(); await tester.pumpAndSettle();
checkSearchBar(tester); checkSearchBar(tester);
@ -263,7 +263,7 @@ void main() {
// Same as the previous tests with empty SearchBarThemeData's instead of null. // Same as the previous tests with empty SearchBarThemeData's instead of null.
testWidgets('SearchBar properties overrides defaults, empty theme and overall theme', (WidgetTester tester) async { testWidgetsWithLeakTracking('SearchBar properties overrides defaults, empty theme and overall theme', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(useSearchBarProperties: true, await tester.pumpWidget(buildFrame(useSearchBarProperties: true,
searchBarThemeData: const SearchBarThemeData(), searchBarThemeData: const SearchBarThemeData(),
overallTheme: const SearchBarThemeData())); overallTheme: const SearchBarThemeData()));
@ -271,14 +271,14 @@ void main() {
checkSearchBar(tester); checkSearchBar(tester);
}); });
testWidgets('SearchBar theme overrides defaults and overall theme', (WidgetTester tester) async { testWidgetsWithLeakTracking('SearchBar theme overrides defaults and overall theme', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(searchBarThemeData: searchBarTheme, await tester.pumpWidget(buildFrame(searchBarThemeData: searchBarTheme,
overallTheme: const SearchBarThemeData())); overallTheme: const SearchBarThemeData()));
await tester.pumpAndSettle(); // allow the animations to finish await tester.pumpAndSettle(); // allow the animations to finish
checkSearchBar(tester); checkSearchBar(tester);
}); });
testWidgets('Overall Theme SearchBar theme overrides defaults and null theme', (WidgetTester tester) async { testWidgetsWithLeakTracking('Overall Theme SearchBar theme overrides defaults and null theme', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(overallTheme: searchBarTheme)); await tester.pumpWidget(buildFrame(overallTheme: searchBarTheme));
await tester.pumpAndSettle(); // allow the animations to finish await tester.pumpAndSettle(); // allow the animations to finish
checkSearchBar(tester); checkSearchBar(tester);

View File

@ -197,21 +197,21 @@ void main() {
expect(inputText.style.fontSize, headerTextStyle.fontSize); expect(inputText.style.fontSize, headerTextStyle.fontSize);
} }
testWidgets('SearchView properties overrides defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('SearchView properties overrides defaults', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(useSearchViewProperties: true)); await tester.pumpWidget(buildFrame(useSearchViewProperties: true));
await tester.tap(find.byIcon(Icons.search)); await tester.tap(find.byIcon(Icons.search));
await tester.pumpAndSettle(); // allow the animations to finish await tester.pumpAndSettle(); // allow the animations to finish
checkSearchView(tester); checkSearchView(tester);
}); });
testWidgets('SearchView theme data overrides defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('SearchView theme data overrides defaults', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(searchViewThemeData: searchViewTheme)); await tester.pumpWidget(buildFrame(searchViewThemeData: searchViewTheme));
await tester.tap(find.byIcon(Icons.search)); await tester.tap(find.byIcon(Icons.search));
await tester.pumpAndSettle(); await tester.pumpAndSettle();
checkSearchView(tester); checkSearchView(tester);
}); });
testWidgets('Overall Theme SearchView theme overrides defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('Overall Theme SearchView theme overrides defaults', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(overallTheme: searchViewTheme)); await tester.pumpWidget(buildFrame(overallTheme: searchViewTheme));
await tester.tap(find.byIcon(Icons.search)); await tester.tap(find.byIcon(Icons.search));
await tester.pumpAndSettle(); await tester.pumpAndSettle();
@ -220,7 +220,7 @@ void main() {
// Same as the previous tests with empty SearchViewThemeData's instead of null. // Same as the previous tests with empty SearchViewThemeData's instead of null.
testWidgets('SearchView properties overrides defaults, empty theme and overall theme', (WidgetTester tester) async { testWidgetsWithLeakTracking('SearchView properties overrides defaults, empty theme and overall theme', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(useSearchViewProperties: true, await tester.pumpWidget(buildFrame(useSearchViewProperties: true,
searchViewThemeData: const SearchViewThemeData(), searchViewThemeData: const SearchViewThemeData(),
overallTheme: const SearchViewThemeData())); overallTheme: const SearchViewThemeData()));
@ -229,7 +229,7 @@ void main() {
checkSearchView(tester); checkSearchView(tester);
}); });
testWidgets('SearchView theme overrides defaults and overall theme', (WidgetTester tester) async { testWidgetsWithLeakTracking('SearchView theme overrides defaults and overall theme', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(searchViewThemeData: searchViewTheme, await tester.pumpWidget(buildFrame(searchViewThemeData: searchViewTheme,
overallTheme: const SearchViewThemeData())); overallTheme: const SearchViewThemeData()));
await tester.tap(find.byIcon(Icons.search)); await tester.tap(find.byIcon(Icons.search));
@ -237,7 +237,7 @@ void main() {
checkSearchView(tester); checkSearchView(tester);
}); });
testWidgets('Overall Theme SearchView theme overrides defaults and null theme', (WidgetTester tester) async { testWidgetsWithLeakTracking('Overall Theme SearchView theme overrides defaults and null theme', (WidgetTester tester) async {
await tester.pumpWidget(buildFrame(overallTheme: searchViewTheme)); await tester.pumpWidget(buildFrame(overallTheme: searchViewTheme));
await tester.tap(find.byIcon(Icons.search)); await tester.tap(find.byIcon(Icons.search));
await tester.pumpAndSettle(); // allow the animations to finish await tester.pumpAndSettle(); // allow the animations to finish

View File

@ -10,6 +10,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
import '../widgets/semantics_tester.dart'; import '../widgets/semantics_tester.dart';
Widget boilerplate({required Widget child}) { Widget boilerplate({required Widget child}) {
@ -21,7 +22,7 @@ Widget boilerplate({required Widget child}) {
void main() { void main() {
testWidgets('SegmentedButton is built with Material of type MaterialType.transparency', (WidgetTester tester) async { testWidgetsWithLeakTracking('SegmentedButton is built with Material of type MaterialType.transparency', (WidgetTester tester) async {
final ThemeData theme = ThemeData(useMaterial3: true); final ThemeData theme = ThemeData(useMaterial3: true);
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
@ -329,7 +330,7 @@ testWidgets('SegmentedButton shows checkboxes for selected segments', (WidgetTes
}); });
testWidgets('SegmentedButtons have correct semantics', (WidgetTester tester) async { testWidgetsWithLeakTracking('SegmentedButtons have correct semantics', (WidgetTester tester) async {
final SemanticsTester semantics = SemanticsTester(tester); final SemanticsTester semantics = SemanticsTester(tester);
await tester.pumpWidget( await tester.pumpWidget(
@ -408,7 +409,7 @@ testWidgets('SegmentedButton shows checkboxes for selected segments', (WidgetTes
}); });
testWidgets('Multi-select SegmentedButtons have correct semantics', (WidgetTester tester) async { testWidgetsWithLeakTracking('Multi-select SegmentedButtons have correct semantics', (WidgetTester tester) async {
final SemanticsTester semantics = SemanticsTester(tester); final SemanticsTester semantics = SemanticsTester(tester);
await tester.pumpWidget( await tester.pumpWidget(
@ -485,7 +486,7 @@ testWidgets('SegmentedButton shows checkboxes for selected segments', (WidgetTes
semantics.dispose(); semantics.dispose();
}); });
testWidgets('SegmentedButton default overlayColor and foregroundColor resolve pressed state', (WidgetTester tester) async { testWidgetsWithLeakTracking('SegmentedButton default overlayColor and foregroundColor resolve pressed state', (WidgetTester tester) async {
final ThemeData theme = ThemeData(useMaterial3: true); final ThemeData theme = ThemeData(useMaterial3: true);
await tester.pumpWidget( await tester.pumpWidget(
@ -533,7 +534,7 @@ testWidgets('SegmentedButton shows checkboxes for selected segments', (WidgetTes
expect(material.textStyle?.color, theme.colorScheme.onSurface); expect(material.textStyle?.color, theme.colorScheme.onSurface);
}); });
testWidgets('SegmentedButton has no tooltips by default', (WidgetTester tester) async { testWidgetsWithLeakTracking('SegmentedButton has no tooltips by default', (WidgetTester tester) async {
final ThemeData theme = ThemeData(useMaterial3: true); final ThemeData theme = ThemeData(useMaterial3: true);
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
@ -557,7 +558,7 @@ testWidgets('SegmentedButton shows checkboxes for selected segments', (WidgetTes
expect(find.byType(Tooltip), findsNothing); expect(find.byType(Tooltip), findsNothing);
}); });
testWidgets('SegmentedButton has correct tooltips', (WidgetTester tester) async { testWidgetsWithLeakTracking('SegmentedButton has correct tooltips', (WidgetTester tester) async {
final ThemeData theme = ThemeData(useMaterial3: true); final ThemeData theme = ThemeData(useMaterial3: true);
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(

View File

@ -43,7 +43,7 @@ void main() {
expect(description, <String>[]); expect(description, <String>[]);
}); });
testWidgets('With no other configuration, defaults are used', (WidgetTester tester) async { testWidgetsWithLeakTracking('With no other configuration, defaults are used', (WidgetTester tester) async {
final ThemeData theme = ThemeData(useMaterial3: true); final ThemeData theme = ThemeData(useMaterial3: true);
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
@ -110,7 +110,7 @@ void main() {
} }
}); });
testWidgets('ThemeData.segmentedButtonTheme overrides defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('ThemeData.segmentedButtonTheme overrides defaults', (WidgetTester tester) async {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
useMaterial3: true, useMaterial3: true,
segmentedButtonTheme: SegmentedButtonThemeData( segmentedButtonTheme: SegmentedButtonThemeData(
@ -203,7 +203,7 @@ void main() {
} }
}); });
testWidgets('SegmentedButtonTheme overrides ThemeData and defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('SegmentedButtonTheme overrides ThemeData and defaults', (WidgetTester tester) async {
final SegmentedButtonThemeData global = SegmentedButtonThemeData( final SegmentedButtonThemeData global = SegmentedButtonThemeData(
style: ButtonStyle( style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith((Set<MaterialState> states) { backgroundColor: MaterialStateProperty.resolveWith((Set<MaterialState> states) {
@ -330,7 +330,7 @@ void main() {
} }
}); });
testWidgets('Widget parameters overrides SegmentedTheme, ThemeData and defaults', (WidgetTester tester) async { testWidgetsWithLeakTracking('Widget parameters overrides SegmentedTheme, ThemeData and defaults', (WidgetTester tester) async {
final SegmentedButtonThemeData global = SegmentedButtonThemeData( final SegmentedButtonThemeData global = SegmentedButtonThemeData(
style: ButtonStyle( style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith((Set<MaterialState> states) { backgroundColor: MaterialStateProperty.resolveWith((Set<MaterialState> states) {

View File

@ -9,6 +9,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
Offset textOffsetToPosition(RenderParagraph paragraph, int offset) { Offset textOffsetToPosition(RenderParagraph paragraph, int offset) {
const Rect caret = Rect.fromLTWH(0.0, 0.0, 2.0, 20.0); const Rect caret = Rect.fromLTWH(0.0, 0.0, 2.0, 20.0);
@ -17,7 +18,7 @@ Offset textOffsetToPosition(RenderParagraph paragraph, int offset) {
} }
void main() { void main() {
testWidgets('SelectionArea uses correct selection controls', (WidgetTester tester) async { testWidgetsWithLeakTracking('SelectionArea uses correct selection controls', (WidgetTester tester) async {
await tester.pumpWidget(const MaterialApp( await tester.pumpWidget(const MaterialApp(
home: SelectionArea( home: SelectionArea(
child: Text('abc'), child: Text('abc'),
@ -39,7 +40,7 @@ void main() {
} }
}, variant: TargetPlatformVariant.all()); }, variant: TargetPlatformVariant.all());
testWidgets('Does not crash when long pressing on padding after dragging', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does not crash when long pressing on padding after dragging', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/123378 // Regression test for https://github.com/flutter/flutter/issues/123378
await tester.pumpWidget( await tester.pumpWidget(
const MaterialApp( const MaterialApp(
@ -70,7 +71,7 @@ void main() {
}); });
testWidgets('builds the default context menu by default', (WidgetTester tester) async { testWidgetsWithLeakTracking('builds the default context menu by default', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: SelectionArea( home: SelectionArea(
@ -97,7 +98,7 @@ void main() {
skip: kIsWeb, // [intended] skip: kIsWeb, // [intended]
); );
testWidgets('builds a custom context menu if provided', (WidgetTester tester) async { testWidgetsWithLeakTracking('builds a custom context menu if provided', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
@ -133,7 +134,7 @@ void main() {
skip: kIsWeb, // [intended] skip: kIsWeb, // [intended]
); );
testWidgets('onSelectionChange is called when the selection changes', (WidgetTester tester) async { testWidgetsWithLeakTracking('onSelectionChange is called when the selection changes', (WidgetTester tester) async {
SelectedContent? content; SelectedContent? content;
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(

View File

@ -7,6 +7,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
void main() { void main() {
test('SliderThemeData copyWith, ==, hashCode basics', () { test('SliderThemeData copyWith, ==, hashCode basics', () {
expect(const SliderThemeData(), const SliderThemeData().copyWith()); expect(const SliderThemeData(), const SliderThemeData().copyWith());
@ -18,7 +20,7 @@ void main() {
expect(identical(SliderThemeData.lerp(data, data, 0.5), data), true); expect(identical(SliderThemeData.lerp(data, data, 0.5), data), true);
}); });
testWidgets('Default SliderThemeData debugFillProperties', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default SliderThemeData debugFillProperties', (WidgetTester tester) async {
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
const SliderThemeData().debugFillProperties(builder); const SliderThemeData().debugFillProperties(builder);
@ -30,7 +32,7 @@ void main() {
expect(description, <String>[]); expect(description, <String>[]);
}); });
testWidgets('SliderThemeData implements debugFillProperties', (WidgetTester tester) async { testWidgetsWithLeakTracking('SliderThemeData implements debugFillProperties', (WidgetTester tester) async {
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
const SliderThemeData( const SliderThemeData(
trackHeight: 7.0, trackHeight: 7.0,
@ -500,7 +502,7 @@ void main() {
} }
}); });
testWidgets('Slider parameters overrides theme properties', (WidgetTester tester) async { testWidgetsWithLeakTracking('Slider parameters overrides theme properties', (WidgetTester tester) async {
debugDisableShadows = false; debugDisableShadows = false;
const Color activeTrackColor = Color(0xffff0001); const Color activeTrackColor = Color(0xffff0001);
const Color inactiveTrackColor = Color(0xffff0002); const Color inactiveTrackColor = Color(0xffff0002);
@ -554,7 +556,7 @@ void main() {
} }
}); });
testWidgets('Slider uses ThemeData slider theme if present', (WidgetTester tester) async { testWidgetsWithLeakTracking('Slider uses ThemeData slider theme if present', (WidgetTester tester) async {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
platform: TargetPlatform.android, platform: TargetPlatform.android,
primarySwatch: Colors.red, primarySwatch: Colors.red,
@ -578,7 +580,7 @@ void main() {
); );
}); });
testWidgets('Slider overrides ThemeData theme if SliderTheme present', (WidgetTester tester) async { testWidgetsWithLeakTracking('Slider overrides ThemeData theme if SliderTheme present', (WidgetTester tester) async {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
platform: TargetPlatform.android, platform: TargetPlatform.android,
primarySwatch: Colors.red, primarySwatch: Colors.red,
@ -602,7 +604,7 @@ void main() {
); );
}); });
testWidgets('SliderThemeData generates correct opacities for fromPrimaryColors', (WidgetTester tester) async { testWidgetsWithLeakTracking('SliderThemeData generates correct opacities for fromPrimaryColors', (WidgetTester tester) async {
const Color customColor1 = Color(0xcafefeed); const Color customColor1 = Color(0xcafefeed);
const Color customColor2 = Color(0xdeadbeef); const Color customColor2 = Color(0xdeadbeef);
const Color customColor3 = Color(0xdecaface); const Color customColor3 = Color(0xdecaface);
@ -632,7 +634,7 @@ void main() {
expect(sliderTheme.valueIndicatorTextStyle!.color, equals(customColor4)); expect(sliderTheme.valueIndicatorTextStyle!.color, equals(customColor4));
}); });
testWidgets('SliderThemeData generates correct shapes for fromPrimaryColors', (WidgetTester tester) async { testWidgetsWithLeakTracking('SliderThemeData generates correct shapes for fromPrimaryColors', (WidgetTester tester) async {
const Color customColor1 = Color(0xcafefeed); const Color customColor1 = Color(0xcafefeed);
const Color customColor2 = Color(0xdeadbeef); const Color customColor2 = Color(0xdeadbeef);
const Color customColor3 = Color(0xdecaface); const Color customColor3 = Color(0xdecaface);
@ -656,7 +658,7 @@ void main() {
expect(sliderTheme.rangeValueIndicatorShape, const PaddleRangeSliderValueIndicatorShape()); expect(sliderTheme.rangeValueIndicatorShape, const PaddleRangeSliderValueIndicatorShape());
}); });
testWidgets('SliderThemeData lerps correctly', (WidgetTester tester) async { testWidgetsWithLeakTracking('SliderThemeData lerps correctly', (WidgetTester tester) async {
final SliderThemeData sliderThemeBlack = SliderThemeData.fromPrimaryColors( final SliderThemeData sliderThemeBlack = SliderThemeData.fromPrimaryColors(
primaryColor: Colors.black, primaryColor: Colors.black,
primaryColorDark: Colors.black, primaryColorDark: Colors.black,
@ -690,7 +692,7 @@ void main() {
expect(lerp.valueIndicatorTextStyle!.color, equals(middleGrey.withAlpha(0xff))); expect(lerp.valueIndicatorTextStyle!.color, equals(middleGrey.withAlpha(0xff)));
}); });
testWidgets('Default slider track draws correctly', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default slider track draws correctly', (WidgetTester tester) async {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
platform: TargetPlatform.android, platform: TargetPlatform.android,
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
@ -726,7 +728,7 @@ void main() {
); );
}); });
testWidgets('Default slider overlay draws correctly', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default slider overlay draws correctly', (WidgetTester tester) async {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
platform: TargetPlatform.android, platform: TargetPlatform.android,
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
@ -787,7 +789,7 @@ void main() {
); );
}); });
testWidgets('Slider can use theme overlay with material states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Slider can use theme overlay with material states', (WidgetTester tester) async {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
platform: TargetPlatform.android, platform: TargetPlatform.android,
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
@ -846,7 +848,7 @@ void main() {
); );
}); });
testWidgets('Default slider ticker and thumb shape draw correctly', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default slider ticker and thumb shape draw correctly', (WidgetTester tester) async {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
platform: TargetPlatform.android, platform: TargetPlatform.android,
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
@ -890,7 +892,7 @@ void main() {
); );
}); });
testWidgets('Default paddle slider value indicator shape draws correctly', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default paddle slider value indicator shape draws correctly', (WidgetTester tester) async {
debugDisableShadows = false; debugDisableShadows = false;
try { try {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
@ -1074,7 +1076,7 @@ void main() {
} }
}); });
testWidgets('Default paddle slider value indicator shape draws correctly', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default paddle slider value indicator shape draws correctly', (WidgetTester tester) async {
debugDisableShadows = false; debugDisableShadows = false;
try { try {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
@ -1258,7 +1260,7 @@ void main() {
} }
}); });
testWidgets('The slider track height can be overridden', (WidgetTester tester) async { testWidgetsWithLeakTracking('The slider track height can be overridden', (WidgetTester tester) async {
final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith(trackHeight: 16); final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith(trackHeight: 16);
const Radius radius = Radius.circular(8); const Radius radius = Radius.circular(8);
const Radius activatedRadius = Radius.circular(9); const Radius activatedRadius = Radius.circular(9);
@ -1288,7 +1290,7 @@ void main() {
); );
}); });
testWidgets('The default slider thumb shape sizes can be overridden', (WidgetTester tester) async { testWidgetsWithLeakTracking('The default slider thumb shape sizes can be overridden', (WidgetTester tester) async {
final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith( final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith(
thumbShape: const RoundSliderThumbShape( thumbShape: const RoundSliderThumbShape(
enabledThumbRadius: 7, enabledThumbRadius: 7,
@ -1313,7 +1315,7 @@ void main() {
); );
}); });
testWidgets('The default slider thumb shape disabled size can be inferred from the enabled size', (WidgetTester tester) async { testWidgetsWithLeakTracking('The default slider thumb shape disabled size can be inferred from the enabled size', (WidgetTester tester) async {
final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith( final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith(
thumbShape: const RoundSliderThumbShape( thumbShape: const RoundSliderThumbShape(
enabledThumbRadius: 9, enabledThumbRadius: 9,
@ -1336,7 +1338,7 @@ void main() {
); );
}); });
testWidgets('The default slider tick mark shape size can be overridden', (WidgetTester tester) async { testWidgetsWithLeakTracking('The default slider tick mark shape size can be overridden', (WidgetTester tester) async {
final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith( final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith(
tickMarkShape: const RoundSliderTickMarkShape(tickMarkRadius: 5), tickMarkShape: const RoundSliderTickMarkShape(tickMarkRadius: 5),
activeTickMarkColor: const Color(0xfadedead), activeTickMarkColor: const Color(0xfadedead),
@ -1369,7 +1371,7 @@ void main() {
); );
}); });
testWidgets('The default slider overlay shape size can be overridden', (WidgetTester tester) async { testWidgetsWithLeakTracking('The default slider overlay shape size can be overridden', (WidgetTester tester) async {
const double uniqueOverlayRadius = 23; const double uniqueOverlayRadius = 23;
final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith( final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith(
overlayShape: const RoundSliderOverlayShape( overlayShape: const RoundSliderOverlayShape(
@ -1396,7 +1398,7 @@ void main() {
}); });
// Regression test for https://github.com/flutter/flutter/issues/74503 // Regression test for https://github.com/flutter/flutter/issues/74503
testWidgets('The slider track layout correctly when the overlay size is smaller than the thumb size', (WidgetTester tester) async { testWidgetsWithLeakTracking('The slider track layout correctly when the overlay size is smaller than the thumb size', (WidgetTester tester) async {
final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith( final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith(
overlayShape: SliderComponentShape.noOverlay, overlayShape: SliderComponentShape.noOverlay,
); );
@ -1437,7 +1439,7 @@ void main() {
}); });
// Regression test for https://github.com/flutter/flutter/issues/125467 // Regression test for https://github.com/flutter/flutter/issues/125467
testWidgets('The RangeSlider track layout correctly when the overlay size is smaller than the thumb size', (WidgetTester tester) async { testWidgetsWithLeakTracking('The RangeSlider track layout correctly when the overlay size is smaller than the thumb size', (WidgetTester tester) async {
final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith( final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith(
overlayShape: SliderComponentShape.noOverlay, overlayShape: SliderComponentShape.noOverlay,
); );
@ -1488,7 +1490,7 @@ void main() {
// //
// The value indicator can be skipped by passing the appropriate // The value indicator can be skipped by passing the appropriate
// [ShowValueIndicator]. // [ShowValueIndicator].
testWidgets('The slider can skip all of its component painting', (WidgetTester tester) async { testWidgetsWithLeakTracking('The slider can skip all of its component painting', (WidgetTester tester) async {
// Pump a slider with all shapes skipped. // Pump a slider with all shapes skipped.
await tester.pumpWidget(_buildApp( await tester.pumpWidget(_buildApp(
ThemeData().sliderTheme.copyWith( ThemeData().sliderTheme.copyWith(
@ -1509,7 +1511,7 @@ void main() {
expect(material, paintsExactlyCountTimes(#drawPath, 0)); expect(material, paintsExactlyCountTimes(#drawPath, 0));
}); });
testWidgets('The slider can skip all component painting except the track', (WidgetTester tester) async { testWidgetsWithLeakTracking('The slider can skip all component painting except the track', (WidgetTester tester) async {
// Pump a slider with just a track. // Pump a slider with just a track.
await tester.pumpWidget(_buildApp( await tester.pumpWidget(_buildApp(
ThemeData().sliderTheme.copyWith( ThemeData().sliderTheme.copyWith(
@ -1530,7 +1532,7 @@ void main() {
expect(material, paintsExactlyCountTimes(#drawPath, 0)); expect(material, paintsExactlyCountTimes(#drawPath, 0));
}); });
testWidgets('The slider can skip all component painting except the tick marks', (WidgetTester tester) async { testWidgetsWithLeakTracking('The slider can skip all component painting except the tick marks', (WidgetTester tester) async {
// Pump a slider with just tick marks. // Pump a slider with just tick marks.
await tester.pumpWidget(_buildApp( await tester.pumpWidget(_buildApp(
ThemeData().sliderTheme.copyWith( ThemeData().sliderTheme.copyWith(
@ -1554,7 +1556,7 @@ void main() {
expect(material, paintsExactlyCountTimes(#drawPath, 0)); expect(material, paintsExactlyCountTimes(#drawPath, 0));
}); });
testWidgets('The slider can skip all component painting except the thumb', (WidgetTester tester) async { testWidgetsWithLeakTracking('The slider can skip all component painting except the thumb', (WidgetTester tester) async {
debugDisableShadows = false; debugDisableShadows = false;
try { try {
// Pump a slider with just a thumb. // Pump a slider with just a thumb.
@ -1580,7 +1582,7 @@ void main() {
} }
}); });
testWidgets('The slider can skip all component painting except the overlay', (WidgetTester tester) async { testWidgetsWithLeakTracking('The slider can skip all component painting except the overlay', (WidgetTester tester) async {
// Pump a slider with just an overlay. // Pump a slider with just an overlay.
await tester.pumpWidget(_buildApp( await tester.pumpWidget(_buildApp(
ThemeData().sliderTheme.copyWith( ThemeData().sliderTheme.copyWith(
@ -1608,7 +1610,7 @@ void main() {
await gesture.up(); await gesture.up();
}); });
testWidgets('The slider can skip all component painting except the value indicator', (WidgetTester tester) async { testWidgetsWithLeakTracking('The slider can skip all component painting except the value indicator', (WidgetTester tester) async {
// Pump a slider with just a value indicator. // Pump a slider with just a value indicator.
await tester.pumpWidget(_buildApp( await tester.pumpWidget(_buildApp(
ThemeData().sliderTheme.copyWith( ThemeData().sliderTheme.copyWith(
@ -1638,7 +1640,7 @@ void main() {
await gesture.up(); await gesture.up();
}); });
testWidgets('PaddleSliderValueIndicatorShape skips all painting at zero scale', (WidgetTester tester) async { testWidgetsWithLeakTracking('PaddleSliderValueIndicatorShape skips all painting at zero scale', (WidgetTester tester) async {
// Pump a slider with just a value indicator. // Pump a slider with just a value indicator.
await tester.pumpWidget(_buildApp( await tester.pumpWidget(_buildApp(
ThemeData().sliderTheme.copyWith( ThemeData().sliderTheme.copyWith(
@ -1673,7 +1675,7 @@ void main() {
await gesture.up(); await gesture.up();
}); });
testWidgets('Default slider value indicator shape skips all painting at zero scale', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default slider value indicator shape skips all painting at zero scale', (WidgetTester tester) async {
// Pump a slider with just a value indicator. // Pump a slider with just a value indicator.
await tester.pumpWidget(_buildApp( await tester.pumpWidget(_buildApp(
ThemeData().sliderTheme.copyWith( ThemeData().sliderTheme.copyWith(
@ -1705,7 +1707,7 @@ void main() {
}); });
testWidgets('Default paddle range slider value indicator shape draws correctly', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default paddle range slider value indicator shape draws correctly', (WidgetTester tester) async {
debugDisableShadows = false; debugDisableShadows = false;
try { try {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
@ -1755,7 +1757,7 @@ void main() {
} }
}); });
testWidgets('Default paddle range slider value indicator shape draws correctly with debugDisableShadows', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default paddle range slider value indicator shape draws correctly with debugDisableShadows', (WidgetTester tester) async {
debugDisableShadows = true; debugDisableShadows = true;
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
platform: TargetPlatform.android, platform: TargetPlatform.android,
@ -1801,7 +1803,7 @@ void main() {
await gesture.up(); await gesture.up();
}); });
testWidgets('PaddleRangeSliderValueIndicatorShape skips all painting at zero scale', (WidgetTester tester) async { testWidgetsWithLeakTracking('PaddleRangeSliderValueIndicatorShape skips all painting at zero scale', (WidgetTester tester) async {
debugDisableShadows = false; debugDisableShadows = false;
try { try {
// Pump a slider with just a value indicator. // Pump a slider with just a value indicator.
@ -1835,7 +1837,7 @@ void main() {
} }
}); });
testWidgets('Default range indicator shape skips all painting at zero scale', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default range indicator shape skips all painting at zero scale', (WidgetTester tester) async {
debugDisableShadows = false; debugDisableShadows = false;
try { try {
// Pump a slider with just a value indicator. // Pump a slider with just a value indicator.
@ -1871,7 +1873,7 @@ void main() {
} }
}); });
testWidgets('activeTrackRadius is taken into account when painting the border of the active track', (WidgetTester tester) async { testWidgetsWithLeakTracking('activeTrackRadius is taken into account when painting the border of the active track', (WidgetTester tester) async {
await tester.pumpWidget(_buildApp( await tester.pumpWidget(_buildApp(
ThemeData().sliderTheme.copyWith( ThemeData().sliderTheme.copyWith(
trackShape: const RoundedRectSliderTrackShapeWithCustomAdditionalActiveTrackHeight( trackShape: const RoundedRectSliderTrackShapeWithCustomAdditionalActiveTrackHeight(
@ -1898,7 +1900,7 @@ void main() {
); );
}); });
testWidgets('The mouse cursor is themeable', (WidgetTester tester) async { testWidgetsWithLeakTracking('The mouse cursor is themeable', (WidgetTester tester) async {
await tester.pumpWidget(_buildApp( await tester.pumpWidget(_buildApp(
ThemeData().sliderTheme.copyWith( ThemeData().sliderTheme.copyWith(
mouseCursor: const MaterialStatePropertyAll<MouseCursor>(SystemMouseCursors.text), mouseCursor: const MaterialStatePropertyAll<MouseCursor>(SystemMouseCursors.text),
@ -1913,7 +1915,7 @@ void main() {
expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.text); expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.text);
}); });
testWidgets('SliderTheme.allowedInteraction is themeable', (WidgetTester tester) async { testWidgetsWithLeakTracking('SliderTheme.allowedInteraction is themeable', (WidgetTester tester) async {
double value = 0.0; double value = 0.0;
Widget buildApp({ Widget buildApp({
@ -2020,7 +2022,7 @@ void main() {
await gesture.up(); await gesture.up();
}); });
testWidgets('Default value indicator color', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default value indicator color', (WidgetTester tester) async {
debugDisableShadows = false; debugDisableShadows = false;
try { try {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(
@ -2233,7 +2235,7 @@ void main() {
} }
}); });
testWidgets('Default value indicator color', (WidgetTester tester) async { testWidgetsWithLeakTracking('Default value indicator color', (WidgetTester tester) async {
debugDisableShadows = false; debugDisableShadows = false;
try { try {
final ThemeData theme = ThemeData( final ThemeData theme = ThemeData(

View File

@ -560,7 +560,6 @@ void main() {
await tester.pump(); await tester.pump();
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking('SwitchListTile.adaptive onFocusChange Callback', (WidgetTester tester) async { testWidgetsWithLeakTracking('SwitchListTile.adaptive onFocusChange Callback', (WidgetTester tester) async {
@ -590,7 +589,6 @@ void main() {
await tester.pump(); await tester.pump();
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
group('feedback', () { group('feedback', () {
@ -865,7 +863,7 @@ void main() {
); );
}); });
testWidgets('Material3 - SwitchListTile respects thumbColor in hovered/pressed states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - SwitchListTile respects thumbColor in hovered/pressed states', (WidgetTester tester) async {
tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional; tester.binding.focusManager.highlightStrategy = FocusHighlightStrategy.alwaysTraditional;
const Color hoveredThumbColor = Color(0xFF4caf50); const Color hoveredThumbColor = Color(0xFF4caf50);
const Color pressedThumbColor = Color(0xFFF44336); const Color pressedThumbColor = Color(0xFFF44336);

View File

@ -701,8 +701,6 @@ void main() {
expect(getSwitchMaterial(tester), expect(getSwitchMaterial(tester),
paints..circle(color: theme.hoverColor) paints..circle(color: theme.hoverColor)
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material3 - Switch default overlayColor resolves hovered/focused state', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - Switch default overlayColor resolves hovered/focused state', (WidgetTester tester) async {
@ -748,8 +746,6 @@ void main() {
expect(getSwitchMaterial(tester), expect(getSwitchMaterial(tester),
paints..circle(color: theme.colorScheme.primary.withOpacity(0.08)) paints..circle(color: theme.colorScheme.primary.withOpacity(0.08))
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material2 - Switch can be set color', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material2 - Switch can be set color', (WidgetTester tester) async {
@ -1242,8 +1238,6 @@ void main() {
..rrect(color: const Color(0x1f000000)) ..rrect(color: const Color(0x1f000000))
..rrect(color: const Color(0xffbdbdbd)), ..rrect(color: const Color(0xffbdbdbd)),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material3 - Switch is focusable and has correct focus color', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - Switch is focusable and has correct focus color', (WidgetTester tester) async {
@ -1331,8 +1325,6 @@ void main() {
) )
..rrect(color: Color.alphaBlend(colors.onSurface.withOpacity(0.38), colors.surface)), ..rrect(color: Color.alphaBlend(colors.onSurface.withOpacity(0.38), colors.surface)),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Switch with splash radius set', (WidgetTester tester) async { testWidgetsWithLeakTracking('Switch with splash radius set', (WidgetTester tester) async {
@ -1993,8 +1985,6 @@ void main() {
..rrect(color: hoveredThumbColor), ..rrect(color: hoveredThumbColor),
reason: 'Inactive disabled switch should default track and custom thumb color', reason: 'Inactive disabled switch should default track and custom thumb color',
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material3 - Switch thumb color resolves in hovered/focused states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - Switch thumb color resolves in hovered/focused states', (WidgetTester tester) async {
@ -2071,8 +2061,6 @@ void main() {
..rrect(color: hoveredThumbColor), ..rrect(color: hoveredThumbColor),
reason: 'active enabled switch should default track and custom thumb color', reason: 'active enabled switch should default track and custom thumb color',
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material2 - Track color resolves in active/enabled states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material2 - Track color resolves in active/enabled states', (WidgetTester tester) async {
@ -2324,8 +2312,6 @@ void main() {
), ),
reason: 'Inactive enabled switch should match these colors', reason: 'Inactive enabled switch should match these colors',
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material3 - Switch track color resolves in hovered/focused states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material3 - Switch track color resolves in hovered/focused states', (WidgetTester tester) async {
@ -2396,8 +2382,6 @@ void main() {
), ),
reason: 'Active enabled switch should match these colors', reason: 'Active enabled switch should match these colors',
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Material2 - Switch thumb color is blended against surface color', (WidgetTester tester) async { testWidgetsWithLeakTracking('Material2 - Switch thumb color is blended against surface color', (WidgetTester tester) async {
@ -2650,8 +2634,6 @@ void main() {
), ),
reason: 'Hovered Switch should use overlay color $hoverOverlayColor over $hoverColor', reason: 'Hovered Switch should use overlay color $hoverOverlayColor over $hoverColor',
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Do not crash when widget disappears while pointer is down', (WidgetTester tester) async { testWidgetsWithLeakTracking('Do not crash when widget disappears while pointer is down', (WidgetTester tester) async {
@ -3205,8 +3187,6 @@ void main() {
..rrect(color: hoveredTrackOutlineColor, style: PaintingStyle.stroke), ..rrect(color: hoveredTrackOutlineColor, style: PaintingStyle.stroke),
reason: 'Active enabled switch track outline should match this color', reason: 'Active enabled switch track outline should match this color',
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Track outline width resolves in active/enabled states', (WidgetTester tester) async { testWidgetsWithLeakTracking('Track outline width resolves in active/enabled states', (WidgetTester tester) async {
@ -3342,8 +3322,6 @@ void main() {
..rrect(strokeWidth: hoveredTrackOutlineWidth, style: PaintingStyle.stroke), ..rrect(strokeWidth: hoveredTrackOutlineWidth, style: PaintingStyle.stroke),
reason: 'Active enabled switch track outline width should be 4.0', reason: 'Active enabled switch track outline width should be 4.0',
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Switch can set icon - M3', (WidgetTester tester) async { testWidgetsWithLeakTracking('Switch can set icon - M3', (WidgetTester tester) async {
@ -3508,8 +3486,6 @@ void main() {
..rrect(color: const Color(0x0a000000)) ..rrect(color: const Color(0x0a000000))
..rrect(color: const Color(0xffffffff)), ..rrect(color: const Color(0xffffffff)),
); );
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Switch.onFocusChange callback', (WidgetTester tester) async { testWidgetsWithLeakTracking('Switch.onFocusChange callback', (WidgetTester tester) async {
@ -3539,8 +3515,6 @@ void main() {
await tester.pump(); await tester.pump();
expect(focused, isFalse); expect(focused, isFalse);
expect(focusNode.hasFocus, isFalse); expect(focusNode.hasFocus, isFalse);
focusNode.dispose();
}); });
} }

View File

@ -200,8 +200,6 @@ void main() {
focusNode.requestFocus(); focusNode.requestFocus();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
await expectLater(tester, meetsGuideline(textContrastGuideline)); await expectLater(tester, meetsGuideline(textContrastGuideline));
focusNode.dispose();
}, },
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115 skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
); );
@ -269,8 +267,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
await expectLater(tester, meetsGuideline(textContrastGuideline)); await expectLater(tester, meetsGuideline(textContrastGuideline));
focusNode.dispose();
}, },
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115 skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
); );
@ -326,8 +322,6 @@ void main() {
focusNode.requestFocus(); focusNode.requestFocus();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.12))); expect(overlayColor(), paints..rect(color: theme.colorScheme.primary.withOpacity(0.12)));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('TextButton uses stateful color for text color in different states', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextButton uses stateful color for text color in different states', (WidgetTester tester) async {
@ -395,8 +389,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(textColor(), pressedColor); expect(textColor(), pressedColor);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('TextButton uses stateful color for icon color in different states', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextButton uses stateful color for icon color in different states', (WidgetTester tester) async {
@ -464,8 +456,6 @@ void main() {
await tester.pump(); // Start the splash and highlight animations. await tester.pump(); // Start the splash and highlight animations.
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way. await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
expect(iconColor(), pressedColor); expect(iconColor(), pressedColor);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('TextButton has no clip by default', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextButton has no clip by default', (WidgetTester tester) async {
@ -542,8 +532,6 @@ void main() {
final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
expect(inkFeatures, paints..rect(color: focusColor)); expect(inkFeatures, paints..rect(color: focusColor));
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('Does TextButton contribute semantics', (WidgetTester tester) async { testWidgetsWithLeakTracking('Does TextButton contribute semantics', (WidgetTester tester) async {
@ -813,8 +801,6 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(focusNode.hasPrimaryFocus, isFalse); expect(focusNode.hasPrimaryFocus, isFalse);
focusNode.dispose();
}); });
testWidgetsWithLeakTracking('disabled and hovered TextButton responds to mouse-exit', (WidgetTester tester) async { testWidgetsWithLeakTracking('disabled and hovered TextButton responds to mouse-exit', (WidgetTester tester) async {
@ -906,8 +892,6 @@ void main() {
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking('When TextButton disable, Can not set TextButton focus.', (WidgetTester tester) async { testWidgetsWithLeakTracking('When TextButton disable, Can not set TextButton focus.', (WidgetTester tester) async {
@ -931,8 +915,6 @@ void main() {
expect(gotFocus, isFalse); expect(gotFocus, isFalse);
expect(node.hasFocus, isFalse); expect(node.hasFocus, isFalse);
node.dispose();
}); });
testWidgetsWithLeakTracking('TextButton responds to density changes.', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextButton responds to density changes.', (WidgetTester tester) async {
@ -1643,7 +1625,7 @@ void main() {
expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic); expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic);
}); });
testWidgets('TextButton in SelectionArea changes mouse cursor when hovered', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextButton in SelectionArea changes mouse cursor when hovered', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/104595. // Regression test for https://github.com/flutter/flutter/issues/104595.
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: SelectionArea( home: SelectionArea(
@ -1796,15 +1778,15 @@ void main() {
await gesture.removePointer(); await gesture.removePointer();
} }
testWidgets('TextButton statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextButton statesController', (WidgetTester tester) async {
testStatesController(null, tester); testStatesController(null, tester);
}); });
testWidgets('TextButton.icon statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextButton.icon statesController', (WidgetTester tester) async {
testStatesController(const Icon(Icons.add), tester); testStatesController(const Icon(Icons.add), tester);
}); });
testWidgets('Disabled TextButton statesController', (WidgetTester tester) async { testWidgetsWithLeakTracking('Disabled TextButton statesController', (WidgetTester tester) async {
int count = 0; int count = 0;
void valueChanged() { void valueChanged() {
count += 1; count += 1;

View File

@ -5,8 +5,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
void main() { void main() {
testWidgets('TextField works correctly when changing helperText', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextField works correctly when changing helperText', (WidgetTester tester) async {
await tester.pumpWidget(const MaterialApp(home: Material(child: TextField(decoration: InputDecoration(helperText: 'Awesome'))))); await tester.pumpWidget(const MaterialApp(home: Material(child: TextField(decoration: InputDecoration(helperText: 'Awesome')))));
expect(find.text('Awesome'), findsNWidgets(1)); expect(find.text('Awesome'), findsNWidgets(1));
await tester.pump(const Duration(milliseconds: 100)); await tester.pump(const Duration(milliseconds: 100));

View File

@ -6,6 +6,8 @@ import 'package:flutter/gestures.dart' show kPressTimeout;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../foundation/leak_tracking.dart';
bool confirmCalled = false; bool confirmCalled = false;
bool cancelCalled = false; bool cancelCalled = false;
@ -135,7 +137,7 @@ void main() {
expect(cancelCalled, isFalse); expect(cancelCalled, isFalse);
}); });
testWidgets('Splash should never be created or canceled', (WidgetTester tester) async { testWidgetsWithLeakTracking('Splash should never be created or canceled', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Theme( home: Theme(

View File

@ -249,10 +249,10 @@ void main() {
skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web. skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web.
// TODO(polina-c): remove after fixing // TODO(polina-c): remove after fixing
// https://github.com/flutter/flutter/issues/130467 // https://github.com/flutter/flutter/issues/130467
leakTrackingTestConfig: const LeakTrackingTestConfig(allowAllNotDisposed: true, allowAllNotGCed: true), leakTrackingTestConfig: const LeakTrackingTestConfig(notDisposedAllowList: <String, int?>{'ValueNotifier<_OverlayEntryWidgetState?>': 16}),
); );
testWidgets('the desktop cut/copy/paste buttons are disabled for read-only obscured form fields', (WidgetTester tester) async { testWidgetsWithLeakTracking('the desktop cut/copy/paste buttons are disabled for read-only obscured form fields', (WidgetTester tester) async {
final TextEditingController controller = TextEditingController( final TextEditingController controller = TextEditingController(
text: 'blah1 blah2', text: 'blah1 blah2',
); );
@ -347,7 +347,7 @@ void main() {
skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web. skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web.
); );
testWidgets('TextFormField accepts TextField.noMaxLength as value to maxLength parameter', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextFormField accepts TextField.noMaxLength as value to maxLength parameter', (WidgetTester tester) async {
bool asserted; bool asserted;
try { try {
TextFormField( TextFormField(
@ -360,7 +360,7 @@ void main() {
expect(asserted, false); expect(asserted, false);
}); });
testWidgets('Passes textAlign to underlying TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes textAlign to underlying TextField', (WidgetTester tester) async {
const TextAlign alignment = TextAlign.center; const TextAlign alignment = TextAlign.center;
await tester.pumpWidget( await tester.pumpWidget(
@ -382,7 +382,7 @@ void main() {
expect(textFieldWidget.textAlign, alignment); expect(textFieldWidget.textAlign, alignment);
}); });
testWidgets('Passes scrollPhysics to underlying TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes scrollPhysics to underlying TextField', (WidgetTester tester) async {
const ScrollPhysics scrollPhysics = ScrollPhysics(); const ScrollPhysics scrollPhysics = ScrollPhysics();
await tester.pumpWidget( await tester.pumpWidget(
@ -404,7 +404,7 @@ void main() {
expect(textFieldWidget.scrollPhysics, scrollPhysics); expect(textFieldWidget.scrollPhysics, scrollPhysics);
}); });
testWidgets('Passes textAlignVertical to underlying TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes textAlignVertical to underlying TextField', (WidgetTester tester) async {
const TextAlignVertical textAlignVertical = TextAlignVertical.bottom; const TextAlignVertical textAlignVertical = TextAlignVertical.bottom;
await tester.pumpWidget( await tester.pumpWidget(
@ -426,7 +426,7 @@ void main() {
expect(textFieldWidget.textAlignVertical, textAlignVertical); expect(textFieldWidget.textAlignVertical, textAlignVertical);
}); });
testWidgets('Passes textInputAction to underlying TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes textInputAction to underlying TextField', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -446,7 +446,7 @@ void main() {
expect(textFieldWidget.textInputAction, TextInputAction.next); expect(textFieldWidget.textInputAction, TextInputAction.next);
}); });
testWidgets('Passes onEditingComplete to underlying TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes onEditingComplete to underlying TextField', (WidgetTester tester) async {
void onEditingComplete() { } void onEditingComplete() { }
await tester.pumpWidget( await tester.pumpWidget(
@ -468,7 +468,7 @@ void main() {
expect(textFieldWidget.onEditingComplete, onEditingComplete); expect(textFieldWidget.onEditingComplete, onEditingComplete);
}); });
testWidgets('Passes cursor attributes to underlying TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes cursor attributes to underlying TextField', (WidgetTester tester) async {
const double cursorWidth = 3.14; const double cursorWidth = 3.14;
const double cursorHeight = 6.28; const double cursorHeight = 6.28;
const Radius cursorRadius = Radius.circular(4); const Radius cursorRadius = Radius.circular(4);
@ -520,7 +520,7 @@ void main() {
expect(called, true); expect(called, true);
}); });
testWidgets('onChanged callbacks are called', (WidgetTester tester) async { testWidgetsWithLeakTracking('onChanged callbacks are called', (WidgetTester tester) async {
late String value; late String value;
await tester.pumpWidget( await tester.pumpWidget(
@ -542,7 +542,7 @@ void main() {
expect(value, 'Soup'); expect(value, 'Soup');
}); });
testWidgets('autovalidateMode is passed to super', (WidgetTester tester) async { testWidgetsWithLeakTracking('autovalidateMode is passed to super', (WidgetTester tester) async {
int validateCalled = 0; int validateCalled = 0;
await tester.pumpWidget( await tester.pumpWidget(
@ -567,7 +567,7 @@ void main() {
expect(validateCalled, 2); expect(validateCalled, 2);
}); });
testWidgets('validate is called if widget is enabled', (WidgetTester tester) async { testWidgetsWithLeakTracking('validate is called if widget is enabled', (WidgetTester tester) async {
int validateCalled = 0; int validateCalled = 0;
await tester.pumpWidget( await tester.pumpWidget(
@ -594,7 +594,7 @@ void main() {
}); });
testWidgets('Disabled field hides helper and counter in M2', (WidgetTester tester) async { testWidgetsWithLeakTracking('Disabled field hides helper and counter in M2', (WidgetTester tester) async {
const String helperText = 'helper text'; const String helperText = 'helper text';
const String counterText = 'counter text'; const String counterText = 'counter text';
const String errorText = 'error text'; const String errorText = 'error text';
@ -642,7 +642,7 @@ void main() {
expect(errorWidget.style!.color, equals(Colors.transparent)); expect(errorWidget.style!.color, equals(Colors.transparent));
}); });
testWidgets('passing a buildCounter shows returned widget', (WidgetTester tester) async { testWidgetsWithLeakTracking('passing a buildCounter shows returned widget', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: Material( home: Material(
child: Center( child: Center(
@ -707,7 +707,7 @@ void main() {
expect(renderEditable, paintsExactlyCountTimes(#drawRect, 0)); expect(renderEditable, paintsExactlyCountTimes(#drawRect, 0));
}, skip: isBrowser); // [intended] We do not use Flutter-rendered context menu on the Web. }, skip: isBrowser); // [intended] We do not use Flutter-rendered context menu on the Web.
testWidgets('onTap is called upon tap', (WidgetTester tester) async { testWidgetsWithLeakTracking('onTap is called upon tap', (WidgetTester tester) async {
int tapCount = 0; int tapCount = 0;
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
@ -734,7 +734,7 @@ void main() {
expect(tapCount, 3); expect(tapCount, 3);
}); });
testWidgets('onTapOutside is called upon tap outside', (WidgetTester tester) async { testWidgetsWithLeakTracking('onTapOutside is called upon tap outside', (WidgetTester tester) async {
int tapOutsideCount = 0; int tapOutsideCount = 0;
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
@ -765,7 +765,7 @@ void main() {
}); });
// Regression test for https://github.com/flutter/flutter/issues/54472. // Regression test for https://github.com/flutter/flutter/issues/54472.
testWidgets('reset resets the text fields value to the initialValue', (WidgetTester tester) async { testWidgetsWithLeakTracking('reset resets the text fields value to the initialValue', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -788,7 +788,7 @@ void main() {
}); });
// Regression test for https://github.com/flutter/flutter/issues/34847. // Regression test for https://github.com/flutter/flutter/issues/34847.
testWidgets("didChange resets the text field's value to empty when passed null", (WidgetTester tester) async { testWidgetsWithLeakTracking("didChange resets the text field's value to empty when passed null", (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -811,7 +811,7 @@ void main() {
}); });
// Regression test for https://github.com/flutter/flutter/issues/34847. // Regression test for https://github.com/flutter/flutter/issues/34847.
testWidgets("reset resets the text field's value to empty when initialValue is null", (WidgetTester tester) async { testWidgetsWithLeakTracking("reset resets the text field's value to empty when initialValue is null", (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -834,7 +834,7 @@ void main() {
}); });
// Regression test for https://github.com/flutter/flutter/issues/54472. // Regression test for https://github.com/flutter/flutter/issues/54472.
testWidgets('didChange changes text fields value', (WidgetTester tester) async { testWidgetsWithLeakTracking('didChange changes text fields value', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -856,7 +856,7 @@ void main() {
expect(find.text('changedValue'), findsOneWidget); expect(find.text('changedValue'), findsOneWidget);
}); });
testWidgets('onChanged callbacks value and FormFieldState.value are sync', (WidgetTester tester) async { testWidgetsWithLeakTracking('onChanged callbacks value and FormFieldState.value are sync', (WidgetTester tester) async {
bool called = false; bool called = false;
late FormFieldState<String> state; late FormFieldState<String> state;
@ -883,7 +883,7 @@ void main() {
expect(called, true); expect(called, true);
}); });
testWidgets('autofillHints is passed to super', (WidgetTester tester) async { testWidgetsWithLeakTracking('autofillHints is passed to super', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -900,7 +900,7 @@ void main() {
expect(widget.autofillHints, equals(const <String>[AutofillHints.countryName])); expect(widget.autofillHints, equals(const <String>[AutofillHints.countryName]));
}); });
testWidgets('autovalidateMode is passed to super', (WidgetTester tester) async { testWidgetsWithLeakTracking('autovalidateMode is passed to super', (WidgetTester tester) async {
int validateCalled = 0; int validateCalled = 0;
await tester.pumpWidget( await tester.pumpWidget(
@ -925,7 +925,7 @@ void main() {
expect(validateCalled, 1); expect(validateCalled, 1);
}); });
testWidgets('textSelectionControls is passed to super', (WidgetTester tester) async { testWidgetsWithLeakTracking('textSelectionControls is passed to super', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -942,7 +942,7 @@ void main() {
expect(widget.selectionControls, equals(materialTextSelectionControls)); expect(widget.selectionControls, equals(materialTextSelectionControls));
}); });
testWidgets('TextFormField respects hintTextDirection', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextFormField respects hintTextDirection', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: Material( home: Material(
child: Directionality( child: Directionality(
@ -984,7 +984,7 @@ void main() {
expect(textDirection, TextDirection.rtl); expect(textDirection, TextDirection.rtl);
}); });
testWidgets('Passes scrollController to underlying TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes scrollController to underlying TextField', (WidgetTester tester) async {
final ScrollController scrollController = ScrollController(); final ScrollController scrollController = ScrollController();
await tester.pumpWidget( await tester.pumpWidget(
@ -1006,7 +1006,7 @@ void main() {
expect(textFieldWidget.scrollController, scrollController); expect(textFieldWidget.scrollController, scrollController);
}); });
testWidgets('TextFormField changes mouse cursor when hovered', (WidgetTester tester) async { testWidgetsWithLeakTracking('TextFormField changes mouse cursor when hovered', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: Material( home: Material(
@ -1151,7 +1151,7 @@ void main() {
skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web. skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web.
); );
testWidgets('spellCheckConfiguration passes through to EditableText', (WidgetTester tester) async { testWidgetsWithLeakTracking('spellCheckConfiguration passes through to EditableText', (WidgetTester tester) async {
final SpellCheckConfiguration mySpellCheckConfiguration = SpellCheckConfiguration( final SpellCheckConfiguration mySpellCheckConfiguration = SpellCheckConfiguration(
spellCheckService: DefaultSpellCheckService(), spellCheckService: DefaultSpellCheckService(),
misspelledTextStyle: TextField.materialMisspelledTextStyle, misspelledTextStyle: TextField.materialMisspelledTextStyle,
@ -1181,7 +1181,7 @@ void main() {
); );
}); });
testWidgets('magnifierConfiguration passes through to EditableText', (WidgetTester tester) async { testWidgetsWithLeakTracking('magnifierConfiguration passes through to EditableText', (WidgetTester tester) async {
final TextMagnifierConfiguration myTextMagnifierConfiguration = TextMagnifierConfiguration( final TextMagnifierConfiguration myTextMagnifierConfiguration = TextMagnifierConfiguration(
magnifierBuilder: (BuildContext context, MagnifierController controller, ValueNotifier<MagnifierInfo> notifier) { magnifierBuilder: (BuildContext context, MagnifierController controller, ValueNotifier<MagnifierInfo> notifier) {
return const Placeholder(); return const Placeholder();
@ -1202,7 +1202,7 @@ void main() {
expect(editableText.magnifierConfiguration, equals(myTextMagnifierConfiguration)); expect(editableText.magnifierConfiguration, equals(myTextMagnifierConfiguration));
}); });
testWidgets('Passes undoController to undoController TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes undoController to undoController TextField', (WidgetTester tester) async {
final UndoHistoryController undoController = UndoHistoryController(value: UndoHistoryValue.empty); final UndoHistoryController undoController = UndoHistoryController(value: UndoHistoryValue.empty);
await tester.pumpWidget( await tester.pumpWidget(
@ -1224,7 +1224,7 @@ void main() {
expect(textFieldWidget.undoController, undoController); expect(textFieldWidget.undoController, undoController);
}); });
testWidgets('Passes cursorOpacityAnimates to cursorOpacityAnimates TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes cursorOpacityAnimates to cursorOpacityAnimates TextField', (WidgetTester tester) async {
const bool cursorOpacityAnimates = true; const bool cursorOpacityAnimates = true;
await tester.pumpWidget( await tester.pumpWidget(
@ -1246,7 +1246,7 @@ void main() {
expect(textFieldWidget.cursorOpacityAnimates, cursorOpacityAnimates); expect(textFieldWidget.cursorOpacityAnimates, cursorOpacityAnimates);
}); });
testWidgets('Passes contentInsertionConfiguration to contentInsertionConfiguration TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes contentInsertionConfiguration to contentInsertionConfiguration TextField', (WidgetTester tester) async {
final ContentInsertionConfiguration contentInsertionConfiguration = final ContentInsertionConfiguration contentInsertionConfiguration =
ContentInsertionConfiguration(onContentInserted: (KeyboardInsertedContent value) {}); ContentInsertionConfiguration(onContentInserted: (KeyboardInsertedContent value) {});
@ -1269,7 +1269,7 @@ void main() {
expect(textFieldWidget.contentInsertionConfiguration, contentInsertionConfiguration); expect(textFieldWidget.contentInsertionConfiguration, contentInsertionConfiguration);
}); });
testWidgets('Passes clipBehavior to clipBehavior TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes clipBehavior to clipBehavior TextField', (WidgetTester tester) async {
const Clip clipBehavior = Clip.antiAlias; const Clip clipBehavior = Clip.antiAlias;
await tester.pumpWidget( await tester.pumpWidget(
@ -1291,7 +1291,7 @@ void main() {
expect(textFieldWidget.clipBehavior, clipBehavior); expect(textFieldWidget.clipBehavior, clipBehavior);
}); });
testWidgets('Passes scribbleEnabled to scribbleEnabled TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes scribbleEnabled to scribbleEnabled TextField', (WidgetTester tester) async {
const bool scribbleEnabled = false; const bool scribbleEnabled = false;
await tester.pumpWidget( await tester.pumpWidget(
@ -1313,7 +1313,7 @@ void main() {
expect(textFieldWidget.scribbleEnabled, scribbleEnabled); expect(textFieldWidget.scribbleEnabled, scribbleEnabled);
}); });
testWidgets('Passes canRequestFocus to canRequestFocus TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes canRequestFocus to canRequestFocus TextField', (WidgetTester tester) async {
const bool canRequestFocus = false; const bool canRequestFocus = false;
await tester.pumpWidget( await tester.pumpWidget(
@ -1335,7 +1335,7 @@ void main() {
expect(textFieldWidget.canRequestFocus, canRequestFocus); expect(textFieldWidget.canRequestFocus, canRequestFocus);
}); });
testWidgets('Passes onAppPrivateCommand to onAppPrivateCommand TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes onAppPrivateCommand to onAppPrivateCommand TextField', (WidgetTester tester) async {
void onAppPrivateCommand(String p0, Map<String, dynamic> p1) {} void onAppPrivateCommand(String p0, Map<String, dynamic> p1) {}
await tester.pumpWidget( await tester.pumpWidget(
@ -1357,7 +1357,7 @@ void main() {
expect(textFieldWidget.onAppPrivateCommand, onAppPrivateCommand); expect(textFieldWidget.onAppPrivateCommand, onAppPrivateCommand);
}); });
testWidgets('Passes selectionHeightStyle to selectionHeightStyle TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes selectionHeightStyle to selectionHeightStyle TextField', (WidgetTester tester) async {
const BoxHeightStyle selectionHeightStyle = BoxHeightStyle.max; const BoxHeightStyle selectionHeightStyle = BoxHeightStyle.max;
await tester.pumpWidget( await tester.pumpWidget(
@ -1379,7 +1379,7 @@ void main() {
expect(textFieldWidget.selectionHeightStyle, selectionHeightStyle); expect(textFieldWidget.selectionHeightStyle, selectionHeightStyle);
}); });
testWidgets('Passes selectionWidthStyle to selectionWidthStyle TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes selectionWidthStyle to selectionWidthStyle TextField', (WidgetTester tester) async {
const BoxWidthStyle selectionWidthStyle = BoxWidthStyle.max; const BoxWidthStyle selectionWidthStyle = BoxWidthStyle.max;
await tester.pumpWidget( await tester.pumpWidget(
@ -1401,7 +1401,7 @@ void main() {
expect(textFieldWidget.selectionWidthStyle, selectionWidthStyle); expect(textFieldWidget.selectionWidthStyle, selectionWidthStyle);
}); });
testWidgets('Passes dragStartBehavior to dragStartBehavior TextField', (WidgetTester tester) async { testWidgetsWithLeakTracking('Passes dragStartBehavior to dragStartBehavior TextField', (WidgetTester tester) async {
const DragStartBehavior dragStartBehavior = DragStartBehavior.down; const DragStartBehavior dragStartBehavior = DragStartBehavior.down;
await tester.pumpWidget( await tester.pumpWidget(
@ -1423,7 +1423,7 @@ void main() {
expect(textFieldWidget.dragStartBehavior, dragStartBehavior); expect(textFieldWidget.dragStartBehavior, dragStartBehavior);
}); });
testWidgets('Error color for cursor while validating', (WidgetTester tester) async { testWidgetsWithLeakTracking('Error color for cursor while validating', (WidgetTester tester) async {
const Color errorColor = Color(0xff123456); const Color errorColor = Color(0xff123456);
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
theme: ThemeData( theme: ThemeData(

Some files were not shown because too many files have changed in this diff Show More