diff --git a/.ci.yaml b/.ci.yaml index bc1feca37966..dffc7364e65a 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -25,8 +25,149 @@ platform_properties: ] device_type: none os: Windows + mac_x64: + properties: + dependencies: >- + [ + {"dependency": "xcode", "version": "14a5294e"}, + {"dependency": "gems", "version": "v3.3.14"} + ] + os: Mac-12 + device_type: none + cpu: x86 + xcode: 14a5294e # xcode 14.0 beta 5 + targets: + ### iOS+macOS tasks *** + # TODO(stuartmorgan): Move this to ARM once google_maps_flutter has ARM + # support. `pod lint` makes a synthetic target that doesn't respect the + # pod's arch exclusions, so fails to build. + - name: Mac_x64 lint_podspecs + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6637 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: mac_lint_podspecs.yaml + + ### macOS desktop tasks ### + # macos-platform_tests builds all the plugins on M1, so this build is run + # on Intel to give us build coverage of both host types. + - name: Mac_x64 build_all_plugins master + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6671 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: mac_build_all_plugins.yaml + channel: master + + - name: Mac_x64 build_all_plugins stable + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6671 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: mac_build_all_plugins.yaml + channel: stable + + ### iOS tasks ### + # TODO(stuartmorgan): Swap this and ios-build_all_plugins once simulator + # tests are reliable on the ARM infrastructure. See discussion at + # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 + - name: Mac_x64 ios_platform_tests_1_of_4 master + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 0 --shardCount 4" + + - name: Mac_x64 ios_platform_tests_2_of_4 master + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 1 --shardCount 4" + + - name: Mac_x64 ios_platform_tests_3_of_4 master + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 2 --shardCount 4" + + - name: Mac_x64 ios_platform_tests_4_of_4 master + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 3 --shardCount 4" + + # Don't run full platform tests on both channels in pre-submit. + - name: Mac_x64 ios_platform_tests_1_of_4 stable + recipe: plugins/plugins + presubmit: false + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + channel: stable + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 0 --shardCount 4" + + - name: Mac_x64 ios_platform_tests_2_of_4 stable + recipe: plugins/plugins + presubmit: false + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + channel: stable + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 1 --shardCount 4" + + - name: Mac_x64 ios_platform_tests_3_of_4 stable + recipe: plugins/plugins + presubmit: false + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + channel: stable + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 2 --shardCount 4" + + - name: Mac_x64 ios_platform_tests_4_of_4 stable + recipe: plugins/plugins + presubmit: false + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + channel: stable + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 3 --shardCount 4" + - name: Windows win32-platform_tests master recipe: plugins/plugins timeout: 30 diff --git a/.ci/flutter_master.version b/.ci/flutter_master.version index f7578dc7ad5d..3fbdedb3a1d3 100644 --- a/.ci/flutter_master.version +++ b/.ci/flutter_master.version @@ -1 +1 @@ -be86a916548a66c93e4f2f919b5ca0ccd2cdae0c +61e927d22fe6d82c94c368d62aa81f733bd9218d diff --git a/.ci/flutter_stable.version b/.ci/flutter_stable.version index c26442d70e76..b19aa25587e7 100644 --- a/.ci/flutter_stable.version +++ b/.ci/flutter_stable.version @@ -1 +1 @@ -eb6d86ee27deecba4a83536aa20f366a6044895c +52b3dc25f6471c27b2144594abb11c741cb88f57 diff --git a/.ci/scripts/build_all_plugins.sh b/.ci/scripts/build_all_plugins.sh index 008dea7c5e13..89dab629fd52 100644 --- a/.ci/scripts/build_all_plugins.sh +++ b/.ci/scripts/build_all_plugins.sh @@ -3,6 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -cd all_plugins -flutter build windows --debug -flutter build windows --release +platform="$1" +build_mode="$2" +cd all_packages +flutter build "$platform" --"$build_mode" diff --git a/.ci/scripts/create_all_plugins_app.sh b/.ci/scripts/create_all_plugins_app.sh index 196fef9b06c9..100e8aca804a 100644 --- a/.ci/scripts/create_all_plugins_app.sh +++ b/.ci/scripts/create_all_plugins_app.sh @@ -3,5 +3,5 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -dart ./script/tool/bin/flutter_plugin_tools.dart all-plugins-app \ +dart ./script/tool/bin/flutter_plugin_tools.dart create-all-packages-app \ --output-dir=. --exclude script/configs/exclude_all_plugins_app.yaml diff --git a/.ci/scripts/create_simulator.sh b/.ci/scripts/create_simulator.sh new file mode 100644 index 000000000000..3d86739051f1 --- /dev/null +++ b/.ci/scripts/create_simulator.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Copyright 2013 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. + +device=com.apple.CoreSimulator.SimDeviceType.iPhone-11 +os=com.apple.CoreSimulator.SimRuntime.iOS-16-0 + +xcrun simctl list +xcrun simctl create Flutter-iPhone "$device" "$os" | xargs xcrun simctl boot diff --git a/.ci/scripts/prepare_tool.sh b/.ci/scripts/prepare_tool.sh old mode 100644 new mode 100755 diff --git a/.ci/targets/build_all_plugins.yaml b/.ci/targets/build_all_plugins.yaml index b51a5b18dfd9..0ffbdfcce376 100644 --- a/.ci/targets/build_all_plugins.yaml +++ b/.ci/targets/build_all_plugins.yaml @@ -3,5 +3,9 @@ tasks: script: .ci/scripts/prepare_tool.sh - name: create all_plugins app script: .ci/scripts/create_all_plugins_app.sh - - name: build all_plugins + - name: build all_plugins debug script: .ci/scripts/build_all_plugins.sh + args: ["windows", "debug"] + - name: build all_plugins release + script: .ci/scripts/build_all_plugins.sh + args: ["windows", "release"] diff --git a/.ci/targets/mac_build_all_plugins.yaml b/.ci/targets/mac_build_all_plugins.yaml new file mode 100644 index 000000000000..4dd324e8b3f0 --- /dev/null +++ b/.ci/targets/mac_build_all_plugins.yaml @@ -0,0 +1,11 @@ +tasks: + - name: prepare tool + script: .ci/scripts/prepare_tool.sh + - name: create all_plugins app + script: .ci/scripts/create_all_plugins_app.sh + - name: build all_plugins debug + script: .ci/scripts/build_all_plugins.sh + args: ["macos", "debug"] + - name: build all_plugins release + script: .ci/scripts/build_all_plugins.sh + args: ["macos", "release"] diff --git a/.ci/targets/mac_ios_platform_tests.yaml b/.ci/targets/mac_ios_platform_tests.yaml new file mode 100644 index 000000000000..ed63f226eaec --- /dev/null +++ b/.ci/targets/mac_ios_platform_tests.yaml @@ -0,0 +1,22 @@ +tasks: + - name: create simulator + script: .ci/scripts/create_simulator.sh + - name: build examples + script: script/tool_runner.sh + args: ["build-examples", "--ios"] + - name: xcode analyze + script: script/tool_runner.sh + args: ["xcode-analyze", "--ios"] + - name: xcode analyze deprecation + # Ensure we don't accidentally introduce deprecated code. + script: script/tool_runner.sh + args: ["xcode-analyze", "--ios", "--ios-min-version=13.0"] + - name: native test + script: script/tool_runner.sh + args: ["native-test", "--ios", "--ios-destination", "platform=iOS Simulator,name=iPhone 11,OS=latest"] + - name: drive examples + # `drive-examples` contains integration tests, which changes the UI of the application. + # This UI change sometimes affects `xctest`. + # So we run `drive-examples` after `native-test`; changing the order will result ci failure. + script: script/tool_runner.sh + args: ["drive-examples", "--ios", "--exclude=script/configs/exclude_integration_ios.yaml"] diff --git a/.ci/targets/mac_lint_podspecs.yaml b/.ci/targets/mac_lint_podspecs.yaml new file mode 100644 index 000000000000..02a904ee3d85 --- /dev/null +++ b/.ci/targets/mac_lint_podspecs.yaml @@ -0,0 +1,6 @@ +tasks: + - name: prepare tool + script: .ci/scripts/prepare_tool.sh + - name: lint iOS and macOS podspecs + script: script/tool_runner.sh + args: ["podspecs"] diff --git a/.cirrus.yml b/.cirrus.yml index 01de99c23e9c..5ff275e4c053 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,16 +1,29 @@ -gcp_credentials: ENCRYPTED[!f1177d1ddb5330ffaa9ea11c9c9e8e0c542185e895c36071f18cec923dd31c50ece6d18da89c2f6f1cd2d1a98d0c2eea!] +gcp_credentials: ENCRYPTED[!9e38557f08108136b3625b7e62c64cc9eccc50365ffeaaa55c6be52f1d8fd6225af5badc69983ca08484274f02f34424!] # Run on PRs and main branch post submit only. Don't run tests when tagging. only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'main') env: CHANNEL: "master" # Default to master when not explicitly set by a task. - PLUGIN_TOOL: "./script/tool/bin/flutter_plugin_tools.dart" + PLUGIN_TOOL_COMMAND: "dart ./script/tool/bin/flutter_plugin_tools.dart" tool_setup_template: &TOOL_SETUP_TEMPLATE tool_setup_script: - - git fetch origin main # To set FETCH_HEAD for "git merge-base" to work - - cd script/tool - - dart pub get + - .ci/scripts/prepare_tool.sh + +macos_template: &MACOS_TEMPLATE + # Only one macOS task can run in parallel without credits, so use them for + # PRs on macOS. + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + +macos_intel_template: &MACOS_INTEL_TEMPLATE + << : *MACOS_TEMPLATE + osx_instance: + image: big-sur-xcode-13 + +macos_arm_template: &MACOS_ARM_TEMPLATE + << : *MACOS_TEMPLATE + macos_instance: + image: ghcr.io/cirruslabs/macos-ventura-xcode:14 flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE upgrade_flutter_script: @@ -39,33 +52,18 @@ flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE build_all_plugins_app_template: &BUILD_ALL_PLUGINS_APP_TEMPLATE create_all_plugins_app_script: - - dart $PLUGIN_TOOL all-plugins-app --output-dir=. --exclude script/configs/exclude_all_plugins_app.yaml + - $PLUGIN_TOOL_COMMAND create-all-packages-app --output-dir=. --exclude script/configs/exclude_all_plugins_app.yaml build_all_plugins_debug_script: - - cd all_plugins + - cd all_packages - if [[ "$BUILD_ALL_ARGS" == "web" ]]; then - echo "Skipping; web does not support debug builds" - else - flutter build $BUILD_ALL_ARGS --debug - fi build_all_plugins_release_script: - - cd all_plugins + - cd all_packages - flutter build $BUILD_ALL_ARGS --release -macos_template: &MACOS_TEMPLATE - # Only one macOS task can run in parallel without credits, so use them for - # PRs on macOS. - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' - -macos_intel_template: &MACOS_INTEL_TEMPLATE - << : *MACOS_TEMPLATE - osx_instance: - image: big-sur-xcode-13 - -macos_arm_template: &MACOS_ARM_TEMPLATE - << : *MACOS_TEMPLATE - macos_instance: - image: ghcr.io/cirruslabs/macos-ventura-xcode:14 - # Light-workload Linux tasks. # These use default machines, with fewer CPUs, to reduce pressure on the # concurrency limits. @@ -84,22 +82,13 @@ task: script: - cd script/tool - dart pub run test - - name: publishable - version_check_script: - # For pre-submit, pass the PR labels to the script to allow for version - # check overrides. - # For post-submit, ignore platform version breaking version changes and - # missing version/CHANGELOG detection since the labels aren't - # available outside of the context of the PR. - - if [[ $CIRRUS_PR == "" ]]; then - - ./script/tool_runner.sh version-check --ignore-platform-interface-breaks - - else - - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS" - - fi - publish_check_script: ./script/tool_runner.sh publish-check - - name: format + # Repository rules and best-practice enforcement. + # Only channel-agnostic tests should go here since it is only run once + # (on Flutter master). + - name: repo_checks always: format_script: ./script/tool_runner.sh format --fail-on-change + license_script: $PLUGIN_TOOL_COMMAND license-check pubspec_script: ./script/tool_runner.sh pubspec-check readme_script: - ./script/tool_runner.sh readme-check @@ -108,19 +97,33 @@ task: # has been fixed, this can be removed and there can just be a single # run with --require-excerpts and no exclusions. - ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml - license_script: dart $PLUGIN_TOOL license-check - dependabot_script: dart $PLUGIN_TOOL dependabot-check - - name: federated_safety - # This check is only meaningful for PRs, as it validates changes - # rather than state. - only_if: $CIRRUS_PR != "" - script: ./script/tool_runner.sh federation-safety-check + dependabot_script: $PLUGIN_TOOL_COMMAND dependabot-check + version_script: + # For pre-submit, pass the PR labels to the script to allow for + # check overrides. + # For post-submit, ignore platform version breaking version changes + # and missing version/CHANGELOG detection since the labels aren't + # available outside of the context of the PR. + - if [[ $CIRRUS_PR == "" ]]; then + - ./script/tool_runner.sh version-check --ignore-platform-interface-breaks + - else + - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS" + - fi + publishable_script: ./script/tool_runner.sh publish-check --allow-pre-release + federated_safety_script: + # This check is only meaningful for PRs, as it validates changes + # rather than state. + - if [[ $CIRRUS_PR == "" ]]; then + - ./script/tool_runner.sh federation-safety-check + - else + - echo "Only run in presubmit" + - fi - name: dart_unit_tests env: matrix: CHANNEL: "master" CHANNEL: "stable" - test_script: + unit_test_script: - ./script/tool_runner.sh test - name: analyze env: @@ -142,39 +145,42 @@ task: # This uses --run-on-dirty-packages rather than --packages-for-branch # since only the packages changed by 'make-deps-path-based' need to be # checked. - - dart $PLUGIN_TOOL analyze --run-on-dirty-packages --log-timing --custom-analysis=script/configs/custom_analysis.yaml + - $PLUGIN_TOOL_COMMAND analyze --run-on-dirty-packages --log-timing --custom-analysis=script/configs/custom_analysis.yaml # Restore the tree to a clean state, to avoid accidental issues if # other script steps are added to this task. - git checkout . - # Does a sanity check that plugins at least pass analysis on the N-1 and N-2 - # versions of Flutter stable if the plugin claims to support that version. + # Does a sanity check that packages at least pass analysis on the N-1 and N-2 + # versions of Flutter stable if the package claims to support that version. # This is to minimize accidentally making changes that break old versions # (which we don't commit to supporting, but don't want to actively break) # without updating the constraints. # Note: The versions below should be manually updated after a new stable # version comes out. - - name: legacy-version-analyze + - name: legacy_version_analyze depends_on: analyze - env: - matrix: + matrix: + env: CHANNEL: "3.0.5" + DART_VERSION: "2.17.6" + env: CHANNEL: "2.10.5" + DART_VERSION: "2.16.2" package_prep_script: - # Allow analyzing plugins that use a Pigeon version with a higher - # minimum Flutter/Dart version than the plugin itself. + # Allow analyzing packages that use a dev dependency with a higher + # minimum Flutter/Dart version than the package itself. - ./script/tool_runner.sh remove-dev-dependencies analyze_script: # Only analyze lib/; non-client code doesn't need to work on # all supported legacy version. - - ./script/tool_runner.sh analyze --lib-only --skip-if-not-supporting-flutter-version="$CHANNEL" --custom-analysis=script/configs/custom_analysis.yaml - # Does a sanity check that plugins pass analysis with the lowest possible + - ./script/tool_runner.sh analyze --lib-only --skip-if-not-supporting-flutter-version="$CHANNEL" --skip-if-not-supporting-dart-version="$DART_VERSION" --custom-analysis=script/configs/custom_analysis.yaml + # Does a sanity check that packages pass analysis with the lowest possible # versions of all dependencies. This is to catch cases where we add use of - # new APIs but forget to update minimum versions of dependencies to when + # new APIs but forget to update minimum versions of dependencies to where # those APIs are introduced. - name: downgraded_analyze depends_on: analyze analyze_script: - - ./script/tool_runner.sh analyze --downgrade + - ./script/tool_runner.sh analyze --downgrade --custom-analysis=script/configs/custom_analysis.yaml - name: readme_excerpts env: CIRRUS_CLONE_SUBMODULES: true @@ -194,8 +200,6 @@ task: matrix: CHANNEL: "master" CHANNEL: "stable" - setup_script: - - flutter config --enable-linux-desktop << : *BUILD_ALL_PLUGINS_APP_TEMPLATE - name: linux-platform_tests # Don't run full platform tests on both channels in pre-submit. @@ -205,7 +209,6 @@ task: CHANNEL: "master" CHANNEL: "stable" build_script: - - flutter config --enable-linux-desktop - ./script/tool_runner.sh build-examples --linux native_test_script: - xvfb-run ./script/tool_runner.sh native-test --linux --no-integration @@ -242,40 +245,22 @@ task: CHANNEL: "master" CHANNEL: "stable" MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[30e6cf7189e3ff3868edc25d2e638ef2aec70546456427064bbc74b297d36145364f49f9d26b327787a59df149d69262] + GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[4457646586de940f49e054de7d82e60078b205ac627f11a89d077e63f639c9ba1002541d9209a9ee7777e159e97b43d0] build_script: - # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they - # might include non-ASCII characters which makes Gradle crash. - # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935 - - export CIRRUS_CHANGE_MESSAGE="" - - export CIRRUS_COMMIT_MESSAGE="" - ./script/tool_runner.sh build-examples --apk lint_script: - # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they - # might include non-ASCII characters which makes Gradle crash. - # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935 - - export CIRRUS_CHANGE_MESSAGE="" - - export CIRRUS_COMMIT_MESSAGE="" - ./script/tool_runner.sh lint-android # must come after build-examples native_unit_test_script: - # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they - # might include non-ASCII characters which makes Gradle crash. - # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935 - - export CIRRUS_CHANGE_MESSAGE="" - - export CIRRUS_COMMIT_MESSAGE="" # Native integration tests are handled by firebase-test-lab below, so # only run unit tests. # Must come after build-examples. - ./script/tool_runner.sh native-test --android --no-integration --exclude script/configs/exclude_native_unit_android.yaml firebase_test_lab_script: - # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they - # might include non-ASCII characters which makes Gradle crash. - # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935 - - export CIRRUS_CHANGE_MESSAGE="" - - export CIRRUS_COMMIT_MESSAGE="" - if [[ -n "$GCLOUD_FIREBASE_TESTLAB_KEY" ]]; then - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json - - ./script/tool_runner.sh firebase-test-lab --device model=redfin,version=30 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml + # (TODO)cyanglaz: add --device model=starqlteue,version=26 back when the device issue is fixed in FTL. + # https://github.com/flutter/flutter/issues/114535 + - ./script/tool_runner.sh firebase-test-lab --device model=redfin,version=30 --exclude=script/configs/exclude_integration_android.yaml - else - echo "This user does not have permission to run Firebase Test Lab tests." - fi @@ -339,7 +324,6 @@ task: CHANNEL: "stable" PATH: $PATH:/usr/local/bin build_script: - - flutter config --enable-macos-desktop - ./script/tool_runner.sh build-examples --macos xcode_analyze_script: - ./script/tool_runner.sh xcode-analyze --macos @@ -408,5 +392,4 @@ task: CHANNEL: "master" CHANNEL: "stable" setup_script: - - flutter config --enable-macos-desktop << : *BUILD_ALL_PLUGINS_APP_TEMPLATE diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml index baec3deb4893..16ad0a3c171a 100644 --- a/.github/workflows/pull_request_label.yml +++ b/.github/workflows/pull_request_label.yml @@ -21,7 +21,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@e54e5b338fbd6e6cdb5d60f51c22335fc57c401e + - uses: actions/labeler@5c7539237e04b714afd8ad9b4aed733815b9fab4 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ff15569f842..292db55dede7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: cd $GITHUB_WORKSPACE # Checks out a copy of the repo. - name: Check out code - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 with: fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version. - name: Set up tools @@ -36,7 +36,7 @@ jobs: # This workflow should be the last to run. So wait for all the other tests to succeed. - name: Wait on all tests - uses: lewagon/wait-on-check-action@e2558238c09778af25867eb5de5a3ce4bbae3dcd + uses: lewagon/wait-on-check-action@3a563271c3f8d1611ed7352809303617ee7e54ac with: ref: ${{ github.sha }} running-workflow-name: 'release' diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml index e14935f4e455..55fa7f14591e 100644 --- a/.github/workflows/scorecards-analysis.yml +++ b/.github/workflows/scorecards-analysis.yml @@ -22,12 +22,12 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 with: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@865b4092859256271290c77adbd10a43f4779972 + uses: ossf/scorecard-action@e363bfca00e752f91de7b7d2a77340e2e523cb18 with: results_file: results.sarif results_format: sarif @@ -42,7 +42,7 @@ jobs: # Upload the results as artifacts (optional). - name: "Upload artifact" - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb with: name: SARIF file path: results.sarif @@ -50,6 +50,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@86f3159a697a097a813ad9bfa0002412d97690a4 + uses: github/codeql-action/upload-sarif@807578363a7869ca324a79039e6db9c843e0e100 with: sarif_file: results.sarif diff --git a/analysis_options.yaml b/analysis_options.yaml index 98352af415de..b12af6cf11e6 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -22,7 +22,7 @@ # repository. analyzer: - strong-mode: + language: strict-casts: true strict-raw-types: true errors: diff --git a/packages/camera/camera/CHANGELOG.md b/packages/camera/camera/CHANGELOG.md index 30bb098f8fd4..127da4561bc3 100644 --- a/packages/camera/camera/CHANGELOG.md +++ b/packages/camera/camera/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.10.0+4 + +* Removes usage of `_ambiguate` method in example. +* Updates minimum Flutter version to 3.0. + ## 0.10.0+3 * Updates code for `no_leading_underscores_for_local_identifiers` lint. diff --git a/packages/camera/camera/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/camera/camera/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/camera/camera/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/camera/camera/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/camera/camera/example/android/build.gradle b/packages/camera/camera/example/android/build.gradle index 456d020f6e2c..c21bff8e0a2f 100644 --- a/packages/camera/camera/example/android/build.gradle +++ b/packages/camera/camera/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/camera/camera/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/camera/camera/example/android/gradle/wrapper/gradle-wrapper.properties index 01a286e96a21..297f2fec363f 100644 --- a/packages/camera/camera/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/camera/camera/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/camera/camera/example/lib/main.dart b/packages/camera/camera/example/lib/main.dart index c5804e7d0624..860263edf2d3 100644 --- a/packages/camera/camera/example/lib/main.dart +++ b/packages/camera/camera/example/lib/main.dart @@ -72,7 +72,7 @@ class _CameraExampleHomeState extends State @override void initState() { super.initState(); - _ambiguate(WidgetsBinding.instance)?.addObserver(this); + WidgetsBinding.instance.addObserver(this); _flashModeControlRowAnimationController = AnimationController( duration: const Duration(milliseconds: 300), @@ -102,7 +102,7 @@ class _CameraExampleHomeState extends State @override void dispose() { - _ambiguate(WidgetsBinding.instance)?.removeObserver(this); + WidgetsBinding.instance.removeObserver(this); _flashModeControlRowAnimationController.dispose(); _exposureModeControlRowAnimationController.dispose(); super.dispose(); @@ -585,7 +585,7 @@ class _CameraExampleHomeState extends State } if (_cameras.isEmpty) { - _ambiguate(SchedulerBinding.instance)?.addPostFrameCallback((_) async { + SchedulerBinding.instance.addPostFrameCallback((_) async { showInSnackBar('No camera found.'); }); return const Text('None'); @@ -1079,10 +1079,3 @@ Future main() async { } runApp(const CameraApp()); } - -/// This allows a value of type T or T? to be treated as a value of type T?. -/// -/// We use this so that APIs that have become non-nullable can still be used -/// with `!` and `?` on the stable branch. -// TODO(ianh): Remove this once we roll stable in late 2021. -T? _ambiguate(T? value) => value; diff --git a/packages/camera/camera/example/pubspec.yaml b/packages/camera/camera/example/pubspec.yaml index 22e275e633fe..e63024076fef 100644 --- a/packages/camera/camera/example/pubspec.yaml +++ b/packages/camera/camera/example/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: none environment: sdk: ">=2.14.0 <3.0.0" - flutter: ">=2.10.0" + flutter: ">=3.0.0" dependencies: camera: diff --git a/packages/camera/camera/pubspec.yaml b/packages/camera/camera/pubspec.yaml index 1190989a63b7..0f75d10c36cd 100644 --- a/packages/camera/camera/pubspec.yaml +++ b/packages/camera/camera/pubspec.yaml @@ -4,11 +4,11 @@ description: A Flutter plugin for controlling the camera. Supports previewing Dart. repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.10.0+3 +version: 0.10.0+4 environment: sdk: ">=2.14.0 <3.0.0" - flutter: ">=2.10.0" + flutter: ">=3.0.0" flutter: plugin: diff --git a/packages/camera/camera_android/CHANGELOG.md b/packages/camera/camera_android/CHANGELOG.md index af871474f68b..a62d3169e409 100644 --- a/packages/camera/camera_android/CHANGELOG.md +++ b/packages/camera/camera_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.10.0+4 + +* Upgrades `androidx.annotation` version to 1.5.0. + ## 0.10.0+3 * Updates code for `no_leading_underscores_for_local_identifiers` lint. diff --git a/packages/camera/camera_android/android/build.gradle b/packages/camera/camera_android/android/build.gradle index b060181316c1..4fbb2270b556 100644 --- a/packages/camera/camera_android/android/build.gradle +++ b/packages/camera/camera_android/android/build.gradle @@ -35,6 +35,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + // TODO(stuartmorgan): Enable when gradle is updated. + // disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' baseline file("lint-baseline.xml") @@ -59,7 +61,7 @@ android { } dependencies { - compileOnly 'androidx.annotation:annotation:1.1.0' + implementation 'androidx.annotation:annotation:1.5.0' testImplementation 'junit:junit:4.13.2' testImplementation 'org.mockito:mockito-inline:4.7.0' testImplementation 'androidx.test:core:1.4.0' diff --git a/packages/camera/camera_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/camera/camera_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/camera/camera_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/camera/camera_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/camera/camera_android/example/android/build.gradle b/packages/camera/camera_android/example/android/build.gradle index 456d020f6e2c..c21bff8e0a2f 100644 --- a/packages/camera/camera_android/example/android/build.gradle +++ b/packages/camera/camera_android/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/camera/camera_android/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/camera/camera_android/example/android/gradle/wrapper/gradle-wrapper.properties index 01a286e96a21..297f2fec363f 100644 --- a/packages/camera/camera_android/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/camera/camera_android/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/camera/camera_android/pubspec.yaml b/packages/camera/camera_android/pubspec.yaml index a464759c3c46..6f1b667670e8 100644 --- a/packages/camera/camera_android/pubspec.yaml +++ b/packages/camera/camera_android/pubspec.yaml @@ -2,7 +2,7 @@ name: camera_android description: Android implementation of the camera plugin. repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.10.0+3 +version: 0.10.0+4 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/camera/camera_android_camerax/android/build.gradle b/packages/camera/camera_android_camerax/android/build.gradle index b4209bbe62a6..bbc06317a23e 100644 --- a/packages/camera/camera_android_camerax/android/build.gradle +++ b/packages/camera/camera_android_camerax/android/build.gradle @@ -47,11 +47,16 @@ android { } } } + + lintOptions { + disable 'AndroidGradlePluginVersion' + disable 'GradleDependency' + } } dependencies { // CameraX core library using the camera2 implementation must use same version number. - def camerax_version = "1.2.0-beta02" + def camerax_version = "1.2.0-rc01" implementation "androidx.camera:camera-core:${camerax_version}" implementation "androidx.camera:camera-camera2:${camerax_version}" implementation "androidx.camera:camera-lifecycle:${camerax_version}" diff --git a/packages/camera/camera_platform_interface/CHANGELOG.md b/packages/camera/camera_platform_interface/CHANGELOG.md index d410304970cf..3bfc56f3f6e2 100644 --- a/packages/camera/camera_platform_interface/CHANGELOG.md +++ b/packages/camera/camera_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.0 + +* Adds new capture method for a camera to allow concurrent streaming and recording. + ## 2.2.2 * Updates code for `no_leading_underscores_for_local_identifiers` lint. diff --git a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart index b086dc87851f..d8f8f9ca4cc9 100644 --- a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart +++ b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart @@ -11,6 +11,7 @@ import 'package:plugin_platform_interface/plugin_platform_interface.dart'; import '../../camera_platform_interface.dart'; import '../method_channel/method_channel_camera.dart'; +import '../types/video_capture_options.dart'; /// The interface that implementations of camera must implement. /// @@ -131,10 +132,21 @@ abstract class CameraPlatform extends PlatformInterface { /// meaning the recording will continue until manually stopped. /// With [maxVideoDuration] set the video is returned in a [VideoRecordedEvent] /// through the [onVideoRecordedEvent] stream when the set duration is reached. + /// + /// This method is deprecated in favour of [startVideoCapturing]. Future startVideoRecording(int cameraId, {Duration? maxVideoDuration}) { throw UnimplementedError('startVideoRecording() is not implemented.'); } + /// Starts a video recording and/or streaming session. + /// + /// Please see [VideoCaptureOptions] for documentation on the + /// configuration options. + Future startVideoCapturing(VideoCaptureOptions options) { + return startVideoRecording(options.cameraId, + maxVideoDuration: options.maxDuration); + } + /// Stops the video recording and returns the file where it was saved. Future stopVideoRecording(int cameraId) { throw UnimplementedError('stopVideoRecording() is not implemented.'); diff --git a/packages/camera/camera_platform_interface/lib/src/types/video_capture_options.dart b/packages/camera/camera_platform_interface/lib/src/types/video_capture_options.dart new file mode 100644 index 000000000000..9fcb7fa95379 --- /dev/null +++ b/packages/camera/camera_platform_interface/lib/src/types/video_capture_options.dart @@ -0,0 +1,55 @@ +// Copyright 2013 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 'camera_image_data.dart'; + +/// Options wrapper for [CameraPlatform.startVideoCapturing] parameters. +@immutable +class VideoCaptureOptions { + /// Constructs a new instance. + const VideoCaptureOptions( + this.cameraId, { + this.maxDuration, + this.streamCallback, + this.streamOptions, + }) : assert( + streamOptions == null || streamCallback != null, + 'Must specify streamCallback if providing streamOptions.', + ); + + /// The ID of the camera to use for capturing. + final int cameraId; + + /// The maximum time to perform capturing for. + /// + /// By default there is no maximum on the capture time. + final Duration? maxDuration; + + /// An optional callback to enable streaming. + /// + /// If set, then each image captured by the camera will be + /// passed to this callback. + final Function(CameraImageData image)? streamCallback; + + /// Configuration options for streaming. + /// + /// Should only be set if a streamCallback is also present. + final CameraImageStreamOptions? streamOptions; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is VideoCaptureOptions && + runtimeType == other.runtimeType && + cameraId == other.cameraId && + maxDuration == other.maxDuration && + streamCallback == other.streamCallback && + streamOptions == other.streamOptions; + + @override + int get hashCode => + Object.hash(cameraId, maxDuration, streamCallback, streamOptions); +} diff --git a/packages/camera/camera_platform_interface/pubspec.yaml b/packages/camera/camera_platform_interface/pubspec.yaml index e87679261c5a..7ddc6d561aa4 100644 --- a/packages/camera/camera_platform_interface/pubspec.yaml +++ b/packages/camera/camera_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 # NOTE: We strongly prefer non-breaking changes, even at the expense of a # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes -version: 2.2.2 +version: 2.3.0 environment: sdk: '>=2.12.0 <3.0.0' diff --git a/packages/camera/camera_platform_interface/test/events/camera_event_test.dart b/packages/camera/camera_platform_interface/test/events/camera_event_test.dart index 3914859d44b0..074f203bea21 100644 --- a/packages/camera/camera_platform_interface/test/events/camera_event_test.dart +++ b/packages/camera/camera_platform_interface/test/events/camera_event_test.dart @@ -136,7 +136,7 @@ void main() { const CameraInitializedEvent event = CameraInitializedEvent( 1, 1024, 640, ExposureMode.auto, true, FocusMode.auto, true); final int expectedHashCode = Object.hash( - event.cameraId, + event.cameraId.hashCode, event.previewWidth, event.previewHeight, event.exposureMode, @@ -222,8 +222,11 @@ void main() { test('hashCode should match hashCode of all properties', () { const CameraResolutionChangedEvent event = CameraResolutionChangedEvent(1, 1024, 640); - final int expectedHashCode = - Object.hash(event.cameraId, event.captureWidth, event.captureHeight); + final int expectedHashCode = Object.hash( + event.cameraId.hashCode, + event.captureWidth, + event.captureHeight, + ); expect(event.hashCode, expectedHashCode); }); @@ -326,7 +329,7 @@ void main() { test('hashCode should match hashCode of all properties', () { const CameraErrorEvent event = CameraErrorEvent(1, 'Error'); final int expectedHashCode = - Object.hash(event.cameraId, event.description); + Object.hash(event.cameraId.hashCode, event.description); expect(event.hashCode, expectedHashCode); }); diff --git a/packages/espresso/CHANGELOG.md b/packages/espresso/CHANGELOG.md index bd04ecde59b6..38726df01fa6 100644 --- a/packages/espresso/CHANGELOG.md +++ b/packages/espresso/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.0+5 + +* Updates android gradle plugin to 7.3.1. + ## 0.2.0+4 * Updates minimum Flutter version to 2.10. diff --git a/packages/espresso/android/build.gradle b/packages/espresso/android/build.gradle index d78609270bf4..ce461b1ebe55 100644 --- a/packages/espresso/android/build.gradle +++ b/packages/espresso/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:7.3.1' } } @@ -29,6 +29,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + // TODO(stuartmorgan): Enable when gradle is updated. + // disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' baseline file("lint-baseline.xml") diff --git a/packages/espresso/android/gradle/wrapper/gradle-wrapper.properties b/packages/espresso/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 4751774dd352..000000000000 --- a/packages/espresso/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Nov 26 13:04:21 PST 2019 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/packages/espresso/example/android/build.gradle b/packages/espresso/example/android/build.gradle index 456d020f6e2c..c21bff8e0a2f 100644 --- a/packages/espresso/example/android/build.gradle +++ b/packages/espresso/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/espresso/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/espresso/example/android/gradle/wrapper/gradle-wrapper.properties index 296b146b7318..b8793d3c0d69 100644 --- a/packages/espresso/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/espresso/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/espresso/pubspec.yaml b/packages/espresso/pubspec.yaml index c0068ec9883c..16fcbfb3aa2c 100644 --- a/packages/espresso/pubspec.yaml +++ b/packages/espresso/pubspec.yaml @@ -3,7 +3,7 @@ description: Java classes for testing Flutter apps using Espresso. Allows driving Flutter widgets from a native Espresso test. repository: https://github.com/flutter/plugins/tree/main/packages/espresso issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+espresso%22 -version: 0.2.0+4 +version: 0.2.0+5 environment: sdk: ">=2.12.0 <3.0.0" diff --git a/packages/file_selector/file_selector/CHANGELOG.md b/packages/file_selector/file_selector/CHANGELOG.md index 06d01090edc0..7983aa57561f 100644 --- a/packages/file_selector/file_selector/CHANGELOG.md +++ b/packages/file_selector/file_selector/CHANGELOG.md @@ -1,5 +1,6 @@ -## 0.9.2+1 +## 0.9.2+2 +* Improves API docs and examples. * Changes XTypeGroup initialization from final to const. * Updates minimum Flutter version to 2.10. diff --git a/packages/file_selector/file_selector/README.md b/packages/file_selector/file_selector/README.md index 97433584b87a..938e796b879c 100644 --- a/packages/file_selector/file_selector/README.md +++ b/packages/file_selector/file_selector/README.md @@ -11,6 +11,7 @@ A Flutter plugin that manages files and interactions with file dialogs. | **Support** | iOS 9+ | Any | 10.11+ | Any | Windows 10+ | ## Usage + To use this plugin, add `file_selector` as a [dependency in your pubspec.yaml file](https://flutter.dev/platform-plugins/). ### macOS @@ -28,10 +29,12 @@ or read/write access: depending on your use case. ### Examples + Here are small examples that show you how to use the API. Please also take a look at our [example][example] app. #### Open a single file + ``` dart const XTypeGroup typeGroup = XTypeGroup( @@ -43,6 +46,7 @@ final XFile? file = ``` #### Open multiple files at once + ``` dart const XTypeGroup jpgsTypeGroup = XTypeGroup( @@ -59,7 +63,8 @@ final List files = await openFiles(acceptedTypeGroups: [ ]); ``` -#### Saving a file +#### Save a file + ```dart const String fileName = 'suggested_name.txt'; @@ -76,6 +81,17 @@ final XFile textFile = await textFile.saveTo(path); ``` +#### Get a directory path + + +```dart +final String? directoryPath = await getDirectoryPath(); +if (directoryPath == null) { + // Operation was canceled by the user. + return; +} +``` + ### Filtering by file types Different platforms support different type group filter options. To avoid @@ -92,5 +108,14 @@ pass different `XTypeGroup`s based on `Platform`. † `mimeTypes` are not supported on version of macOS earlier than 11 (Big Sur). +### Features supported by platform + +| Feature | Description | iOS | Linux | macOS | Windows | Web | +| ---------------------- |----------------------------------- |--------- | ---------- | -------- | ------------ | ----------- | +| Choose a single file | Pick a file/image | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| Choose multiple files | Pick multiple files/images | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| Choose a save location | Pick a directory to save a file in | ❌ | ✔️ | ✔️ | ✔️ | ❌ | +| Choose a directory | Pick a folder and get its path | ❌ | ✔️ | ✔️ | ✔️ | ❌ | + [example]:./example -[entitlement]: https://docs.flutter.dev/desktop#entitlements-and-the-app-sandbox +[entitlement]: https://docs.flutter.dev/desktop#entitlements-and-the-app-sandbox \ No newline at end of file diff --git a/packages/file_selector/file_selector/example/lib/readme_standalone_excerpts.dart b/packages/file_selector/file_selector/example/lib/readme_standalone_excerpts.dart index c67c93fa63f2..f8126045019a 100644 --- a/packages/file_selector/file_selector/example/lib/readme_standalone_excerpts.dart +++ b/packages/file_selector/file_selector/example/lib/readme_standalone_excerpts.dart @@ -54,4 +54,14 @@ class _MyAppState extends State { await textFile.saveTo(path); // #enddocregion Save } + + Future directoryPath() async { + // #docregion GetDirectory + final String? directoryPath = await getDirectoryPath(); + if (directoryPath == null) { + // Operation was canceled by the user. + return; + } + // #enddocregion GetDirectory + } } diff --git a/packages/file_selector/file_selector/pubspec.yaml b/packages/file_selector/file_selector/pubspec.yaml index cae08e47eeb1..ad187d6f446a 100644 --- a/packages/file_selector/file_selector/pubspec.yaml +++ b/packages/file_selector/file_selector/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for opening and saving files, or selecting directories, using native file selection UI. repository: https://github.com/flutter/plugins/tree/main/packages/file_selector/file_selector issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22 -version: 0.9.2+1 +version: 0.9.2+2 environment: sdk: ">=2.12.0 <3.0.0" diff --git a/packages/file_selector/file_selector_platform_interface/CHANGELOG.md b/packages/file_selector/file_selector_platform_interface/CHANGELOG.md index ad1fe2cb6cef..ad803fb12e66 100644 --- a/packages/file_selector/file_selector_platform_interface/CHANGELOG.md +++ b/packages/file_selector/file_selector_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.0 + +* Replaces `macUTIs` with `uniformTypeIdentifiers`. `macUTIs` is available as an alias, but will be deprecated in a future release. + ## 2.2.0 * Makes `XTypeGroup`'s constructor constant. diff --git a/packages/file_selector/file_selector_platform_interface/lib/src/types/x_type_group/x_type_group.dart b/packages/file_selector/file_selector_platform_interface/lib/src/types/x_type_group/x_type_group.dart index 00cd56563c32..e12b431d91d8 100644 --- a/packages/file_selector/file_selector_platform_interface/lib/src/types/x_type_group/x_type_group.dart +++ b/packages/file_selector/file_selector_platform_interface/lib/src/types/x_type_group/x_type_group.dart @@ -14,9 +14,13 @@ class XTypeGroup { this.label, List? extensions, this.mimeTypes, - this.macUTIs, + List? macUTIs, + List? uniformTypeIdentifiers, this.webWildCards, - }) : _extensions = extensions; + }) : _extensions = extensions, + assert(uniformTypeIdentifiers == null || macUTIs == null, + 'Only one of uniformTypeIdentifiers or macUTIs can be non-null'), + uniformTypeIdentifiers = uniformTypeIdentifiers ?? macUTIs; /// The 'name' or reference to this group of types. final String? label; @@ -24,8 +28,8 @@ class XTypeGroup { /// The MIME types for this group. final List? mimeTypes; - /// The UTIs for this group. - final List? macUTIs; + /// The uniform type identifiers for this group + final List? uniformTypeIdentifiers; /// The web wild cards for this group (ex: image/*, video/*). final List? webWildCards; @@ -56,6 +60,9 @@ class XTypeGroup { (webWildCards?.isEmpty ?? true); } + /// Returns the list of uniform type identifiers for this group + List? get macUTIs => uniformTypeIdentifiers; + static List? _removeLeadingDots(List? exts) => exts ?.map((String ext) => ext.startsWith('.') ? ext.substring(1) : ext) .toList(); diff --git a/packages/file_selector/file_selector_platform_interface/pubspec.yaml b/packages/file_selector/file_selector_platform_interface/pubspec.yaml index c4500061a3a1..ac8727c09e36 100644 --- a/packages/file_selector/file_selector_platform_interface/pubspec.yaml +++ b/packages/file_selector/file_selector_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/main/packages/file_selector/ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22 # NOTE: We strongly prefer non-breaking changes, even at the expense of a # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes -version: 2.2.0 +version: 2.3.0 environment: sdk: ">=2.12.0 <3.0.0" diff --git a/packages/file_selector/file_selector_platform_interface/test/x_type_group_test.dart b/packages/file_selector/file_selector_platform_interface/test/x_type_group_test.dart index c5e65d0264f5..5ac5722716c7 100644 --- a/packages/file_selector/file_selector_platform_interface/test/x_type_group_test.dart +++ b/packages/file_selector/file_selector_platform_interface/test/x_type_group_test.dart @@ -8,12 +8,11 @@ import 'package:flutter_test/flutter_test.dart'; void main() { group('XTypeGroup', () { test('toJSON() creates correct map', () { - const String label = 'test group'; const List extensions = ['txt', 'jpg']; const List mimeTypes = ['text/plain']; const List macUTIs = ['public.plain-text']; const List webWildCards = ['image/*']; - + const String label = 'test group'; const XTypeGroup group = XTypeGroup( label: label, extensions: extensions, @@ -30,7 +29,7 @@ void main() { expect(jsonMap['webWildCards'], webWildCards); }); - test('A wildcard group can be created', () { + test('a wildcard group can be created', () { const XTypeGroup group = XTypeGroup( label: 'Any', ); @@ -71,7 +70,70 @@ void main() { expect(webOnly.allowsAny, false); }); - test('Leading dots are removed from extensions', () { + test('passing only macUTIs should fill uniformTypeIdentifiers', () { + const List macUTIs = ['public.plain-text']; + const XTypeGroup group = XTypeGroup( + macUTIs: macUTIs, + ); + + expect(group.uniformTypeIdentifiers, macUTIs); + }); + + test( + 'passing only uniformTypeIdentifiers should fill uniformTypeIdentifiers', + () { + const List uniformTypeIdentifiers = ['public.plain-text']; + const XTypeGroup group = XTypeGroup( + uniformTypeIdentifiers: uniformTypeIdentifiers, + ); + + expect(group.uniformTypeIdentifiers, uniformTypeIdentifiers); + }); + + test('macUTIs getter return macUTIs value passed in constructor', () { + const List macUTIs = ['public.plain-text']; + const XTypeGroup group = XTypeGroup( + macUTIs: macUTIs, + ); + + expect(group.macUTIs, macUTIs); + }); + + test( + 'macUTIs getter returns uniformTypeIdentifiers value passed in constructor', + () { + const List uniformTypeIdentifiers = ['public.plain-text']; + const XTypeGroup group = XTypeGroup( + uniformTypeIdentifiers: uniformTypeIdentifiers, + ); + + expect(group.macUTIs, uniformTypeIdentifiers); + }); + + test('passing both uniformTypeIdentifiers and macUTIs should throw', () { + const List macUTIs = ['public.plain-text']; + const List uniformTypeIndentifiers = [ + 'public.plain-images' + ]; + expect( + () => XTypeGroup( + macUTIs: macUTIs, + uniformTypeIdentifiers: uniformTypeIndentifiers), + throwsA(predicate((Object? e) => + e is AssertionError && + e.message == + 'Only one of uniformTypeIdentifiers or macUTIs can be non-null'))); + }); + + test( + 'having uniformTypeIdentifiers and macUTIs as null should leave uniformTypeIdentifiers as null', + () { + const XTypeGroup group = XTypeGroup(); + + expect(group.uniformTypeIdentifiers, null); + }); + + test('leading dots are removed from extensions', () { const List extensions = ['.txt', '.jpg']; const XTypeGroup group = XTypeGroup(extensions: extensions); diff --git a/packages/flutter_plugin_android_lifecycle/android/build.gradle b/packages/flutter_plugin_android_lifecycle/android/build.gradle index a86e070bc693..5786a74e2e78 100644 --- a/packages/flutter_plugin_android_lifecycle/android/build.gradle +++ b/packages/flutter_plugin_android_lifecycle/android/build.gradle @@ -30,6 +30,8 @@ android { consumerProguardFiles 'proguard.txt' } lintOptions { + // TODO(stuartmorgan): Enable when gradle is updated. + // disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' } diff --git a/packages/flutter_plugin_android_lifecycle/android/gradle/wrapper/gradle-wrapper.properties b/packages/flutter_plugin_android_lifecycle/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index d757f3d33fcc..000000000000 --- a/packages/flutter_plugin_android_lifecycle/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/packages/flutter_plugin_android_lifecycle/example/android/build.gradle b/packages/flutter_plugin_android_lifecycle/example/android/build.gradle index 456d020f6e2c..c21bff8e0a2f 100644 --- a/packages/flutter_plugin_android_lifecycle/example/android/build.gradle +++ b/packages/flutter_plugin_android_lifecycle/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/flutter_plugin_android_lifecycle/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/flutter_plugin_android_lifecycle/example/android/gradle/wrapper/gradle-wrapper.properties index 296b146b7318..b8793d3c0d69 100644 --- a/packages/flutter_plugin_android_lifecycle/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/flutter_plugin_android_lifecycle/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/google_maps_flutter/google_maps_flutter/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/google_maps_flutter/google_maps_flutter/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_maps_flutter/google_maps_flutter/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/google_maps_flutter/google_maps_flutter/example/android/build.gradle b/packages/google_maps_flutter/google_maps_flutter/example/android/build.gradle index 4d8d45d13a0b..c21bff8e0a2f 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/android/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.4' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/google_maps_flutter/google_maps_flutter/example/android/gradle/wrapper/gradle-wrapper.properties index 9ec7236c631e..b8793d3c0d69 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_maps_flutter/google_maps_flutter/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index ad1ff2cad0a7..b86f05f3360a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: google_maps_flutter_platform_interface: ^2.2.1 dev_dependencies: - espresso: ^0.1.0+2 + espresso: ^0.2.0 flutter_driver: sdk: flutter flutter_test: diff --git a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md index 6fbd8d7e0b17..9bc8b195f6e2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.3 + +* Update android gradle plugin to 7.3.1. + ## 2.3.2 * Update `com.google.android.gms:play-services-maps` to 18.1.0. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle b/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle index 06599fc94c49..2d507c6cc9fa 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.4' + classpath 'com.android.tools.build:gradle:7.3.1' } } @@ -29,6 +29,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + // TODO(stuartmorgan): Enable when gradle is updated. + // disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/google_maps_flutter/google_maps_flutter_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/android/build.gradle b/packages/google_maps_flutter/google_maps_flutter_android/example/android/build.gradle index 4d8d45d13a0b..c21bff8e0a2f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/android/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.4' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/google_maps_flutter/google_maps_flutter_android/example/android/gradle/wrapper/gradle-wrapper.properties index 9ec7236c631e..b8793d3c0d69 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml index bc9a4dd03657..07decea39920 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: dev_dependencies: build_runner: ^2.1.10 - espresso: ^0.1.0+2 + espresso: ^0.2.0 flutter_driver: sdk: flutter flutter_test: diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml index 798380b5854d..d20322bc6ee1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_android description: Android implementation of the google_maps_flutter plugin. repository: https://github.com/flutter/plugins/tree/main/packages/google_maps_flutter/google_maps_flutter_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.3.2 +version: 2.3.3 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart index a7fe6bae347b..efde66459327 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.3.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in google_maps_flutter_web_integration_tests/integration_test/google_maps_controller_test.dart. // Do not manually edit this file. @@ -21,8 +21,13 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: subtype_of_sealed_class class _FakeGMap_0 extends _i1.SmartFake implements _i2.GMap { - _FakeGMap_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeGMap_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [CirclesController]. @@ -30,43 +35,85 @@ class _FakeGMap_0 extends _i1.SmartFake implements _i2.GMap { /// See the documentation for Mockito's code generation for more information. class MockCirclesController extends _i1.Mock implements _i3.CirclesController { @override - Map<_i4.CircleId, _i3.CircleController> get circles => - (super.noSuchMethod(Invocation.getter(#circles), - returnValue: <_i4.CircleId, _i3.CircleController>{}, - returnValueForMissingStub: <_i4.CircleId, _i3.CircleController>{}) - as Map<_i4.CircleId, _i3.CircleController>); - @override - _i2.GMap get googleMap => (super.noSuchMethod(Invocation.getter(#googleMap), - returnValue: _FakeGMap_0(this, Invocation.getter(#googleMap)), - returnValueForMissingStub: - _FakeGMap_0(this, Invocation.getter(#googleMap))) as _i2.GMap); - @override - set googleMap(_i2.GMap? _googleMap) => - super.noSuchMethod(Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null); - @override - int get mapId => (super.noSuchMethod(Invocation.getter(#mapId), - returnValue: 0, returnValueForMissingStub: 0) as int); - @override - set mapId(int? _mapId) => - super.noSuchMethod(Invocation.setter(#mapId, _mapId), - returnValueForMissingStub: null); - @override - void addCircles(Set<_i4.Circle>? circlesToAdd) => - super.noSuchMethod(Invocation.method(#addCircles, [circlesToAdd]), - returnValueForMissingStub: null); - @override - void changeCircles(Set<_i4.Circle>? circlesToChange) => - super.noSuchMethod(Invocation.method(#changeCircles, [circlesToChange]), - returnValueForMissingStub: null); + Map<_i4.CircleId, _i3.CircleController> get circles => (super.noSuchMethod( + Invocation.getter(#circles), + returnValue: <_i4.CircleId, _i3.CircleController>{}, + returnValueForMissingStub: <_i4.CircleId, _i3.CircleController>{}, + ) as Map<_i4.CircleId, _i3.CircleController>); + @override + _i2.GMap get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _FakeGMap_0( + this, + Invocation.getter(#googleMap), + ), + returnValueForMissingStub: _FakeGMap_0( + this, + Invocation.getter(#googleMap), + ), + ) as _i2.GMap); + @override + set googleMap(_i2.GMap? _googleMap) => super.noSuchMethod( + Invocation.setter( + #googleMap, + _googleMap, + ), + returnValueForMissingStub: null, + ); + @override + int get mapId => (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + @override + set mapId(int? _mapId) => super.noSuchMethod( + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); + @override + void addCircles(Set<_i4.Circle>? circlesToAdd) => super.noSuchMethod( + Invocation.method( + #addCircles, + [circlesToAdd], + ), + returnValueForMissingStub: null, + ); + @override + void changeCircles(Set<_i4.Circle>? circlesToChange) => super.noSuchMethod( + Invocation.method( + #changeCircles, + [circlesToChange], + ), + returnValueForMissingStub: null, + ); @override void removeCircles(Set<_i4.CircleId>? circleIdsToRemove) => - super.noSuchMethod(Invocation.method(#removeCircles, [circleIdsToRemove]), - returnValueForMissingStub: null); - @override - void bindToMap(int? mapId, _i2.GMap? googleMap) => - super.noSuchMethod(Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null); + super.noSuchMethod( + Invocation.method( + #removeCircles, + [circleIdsToRemove], + ), + returnValueForMissingStub: null, + ); + @override + void bindToMap( + int? mapId, + _i2.GMap? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [PolygonsController]. @@ -76,42 +123,84 @@ class MockPolygonsController extends _i1.Mock implements _i3.PolygonsController { @override Map<_i4.PolygonId, _i3.PolygonController> get polygons => (super.noSuchMethod( - Invocation.getter(#polygons), - returnValue: <_i4.PolygonId, _i3.PolygonController>{}, - returnValueForMissingStub: <_i4.PolygonId, _i3.PolygonController>{}) - as Map<_i4.PolygonId, _i3.PolygonController>); - @override - _i2.GMap get googleMap => (super.noSuchMethod(Invocation.getter(#googleMap), - returnValue: _FakeGMap_0(this, Invocation.getter(#googleMap)), - returnValueForMissingStub: - _FakeGMap_0(this, Invocation.getter(#googleMap))) as _i2.GMap); - @override - set googleMap(_i2.GMap? _googleMap) => - super.noSuchMethod(Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null); - @override - int get mapId => (super.noSuchMethod(Invocation.getter(#mapId), - returnValue: 0, returnValueForMissingStub: 0) as int); - @override - set mapId(int? _mapId) => - super.noSuchMethod(Invocation.setter(#mapId, _mapId), - returnValueForMissingStub: null); - @override - void addPolygons(Set<_i4.Polygon>? polygonsToAdd) => - super.noSuchMethod(Invocation.method(#addPolygons, [polygonsToAdd]), - returnValueForMissingStub: null); - @override - void changePolygons(Set<_i4.Polygon>? polygonsToChange) => - super.noSuchMethod(Invocation.method(#changePolygons, [polygonsToChange]), - returnValueForMissingStub: null); - @override - void removePolygons(Set<_i4.PolygonId>? polygonIdsToRemove) => super - .noSuchMethod(Invocation.method(#removePolygons, [polygonIdsToRemove]), - returnValueForMissingStub: null); - @override - void bindToMap(int? mapId, _i2.GMap? googleMap) => - super.noSuchMethod(Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null); + Invocation.getter(#polygons), + returnValue: <_i4.PolygonId, _i3.PolygonController>{}, + returnValueForMissingStub: <_i4.PolygonId, _i3.PolygonController>{}, + ) as Map<_i4.PolygonId, _i3.PolygonController>); + @override + _i2.GMap get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _FakeGMap_0( + this, + Invocation.getter(#googleMap), + ), + returnValueForMissingStub: _FakeGMap_0( + this, + Invocation.getter(#googleMap), + ), + ) as _i2.GMap); + @override + set googleMap(_i2.GMap? _googleMap) => super.noSuchMethod( + Invocation.setter( + #googleMap, + _googleMap, + ), + returnValueForMissingStub: null, + ); + @override + int get mapId => (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + @override + set mapId(int? _mapId) => super.noSuchMethod( + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); + @override + void addPolygons(Set<_i4.Polygon>? polygonsToAdd) => super.noSuchMethod( + Invocation.method( + #addPolygons, + [polygonsToAdd], + ), + returnValueForMissingStub: null, + ); + @override + void changePolygons(Set<_i4.Polygon>? polygonsToChange) => super.noSuchMethod( + Invocation.method( + #changePolygons, + [polygonsToChange], + ), + returnValueForMissingStub: null, + ); + @override + void removePolygons(Set<_i4.PolygonId>? polygonIdsToRemove) => + super.noSuchMethod( + Invocation.method( + #removePolygons, + [polygonIdsToRemove], + ), + returnValueForMissingStub: null, + ); + @override + void bindToMap( + int? mapId, + _i2.GMap? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [PolylinesController]. @@ -121,42 +210,85 @@ class MockPolylinesController extends _i1.Mock implements _i3.PolylinesController { @override Map<_i4.PolylineId, _i3.PolylineController> get lines => (super.noSuchMethod( - Invocation.getter(#lines), - returnValue: <_i4.PolylineId, _i3.PolylineController>{}, - returnValueForMissingStub: <_i4.PolylineId, _i3.PolylineController>{}) - as Map<_i4.PolylineId, _i3.PolylineController>); - @override - _i2.GMap get googleMap => (super.noSuchMethod(Invocation.getter(#googleMap), - returnValue: _FakeGMap_0(this, Invocation.getter(#googleMap)), - returnValueForMissingStub: - _FakeGMap_0(this, Invocation.getter(#googleMap))) as _i2.GMap); - @override - set googleMap(_i2.GMap? _googleMap) => - super.noSuchMethod(Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null); - @override - int get mapId => (super.noSuchMethod(Invocation.getter(#mapId), - returnValue: 0, returnValueForMissingStub: 0) as int); - @override - set mapId(int? _mapId) => - super.noSuchMethod(Invocation.setter(#mapId, _mapId), - returnValueForMissingStub: null); - @override - void addPolylines(Set<_i4.Polyline>? polylinesToAdd) => - super.noSuchMethod(Invocation.method(#addPolylines, [polylinesToAdd]), - returnValueForMissingStub: null); - @override - void changePolylines(Set<_i4.Polyline>? polylinesToChange) => super - .noSuchMethod(Invocation.method(#changePolylines, [polylinesToChange]), - returnValueForMissingStub: null); - @override - void removePolylines(Set<_i4.PolylineId>? polylineIdsToRemove) => super - .noSuchMethod(Invocation.method(#removePolylines, [polylineIdsToRemove]), - returnValueForMissingStub: null); - @override - void bindToMap(int? mapId, _i2.GMap? googleMap) => - super.noSuchMethod(Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null); + Invocation.getter(#lines), + returnValue: <_i4.PolylineId, _i3.PolylineController>{}, + returnValueForMissingStub: <_i4.PolylineId, _i3.PolylineController>{}, + ) as Map<_i4.PolylineId, _i3.PolylineController>); + @override + _i2.GMap get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _FakeGMap_0( + this, + Invocation.getter(#googleMap), + ), + returnValueForMissingStub: _FakeGMap_0( + this, + Invocation.getter(#googleMap), + ), + ) as _i2.GMap); + @override + set googleMap(_i2.GMap? _googleMap) => super.noSuchMethod( + Invocation.setter( + #googleMap, + _googleMap, + ), + returnValueForMissingStub: null, + ); + @override + int get mapId => (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + @override + set mapId(int? _mapId) => super.noSuchMethod( + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); + @override + void addPolylines(Set<_i4.Polyline>? polylinesToAdd) => super.noSuchMethod( + Invocation.method( + #addPolylines, + [polylinesToAdd], + ), + returnValueForMissingStub: null, + ); + @override + void changePolylines(Set<_i4.Polyline>? polylinesToChange) => + super.noSuchMethod( + Invocation.method( + #changePolylines, + [polylinesToChange], + ), + returnValueForMissingStub: null, + ); + @override + void removePolylines(Set<_i4.PolylineId>? polylineIdsToRemove) => + super.noSuchMethod( + Invocation.method( + #removePolylines, + [polylineIdsToRemove], + ), + returnValueForMissingStub: null, + ); + @override + void bindToMap( + int? mapId, + _i2.GMap? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [MarkersController]. @@ -164,53 +296,108 @@ class MockPolylinesController extends _i1.Mock /// See the documentation for Mockito's code generation for more information. class MockMarkersController extends _i1.Mock implements _i3.MarkersController { @override - Map<_i4.MarkerId, _i3.MarkerController> get markers => - (super.noSuchMethod(Invocation.getter(#markers), - returnValue: <_i4.MarkerId, _i3.MarkerController>{}, - returnValueForMissingStub: <_i4.MarkerId, _i3.MarkerController>{}) - as Map<_i4.MarkerId, _i3.MarkerController>); - @override - _i2.GMap get googleMap => (super.noSuchMethod(Invocation.getter(#googleMap), - returnValue: _FakeGMap_0(this, Invocation.getter(#googleMap)), - returnValueForMissingStub: - _FakeGMap_0(this, Invocation.getter(#googleMap))) as _i2.GMap); - @override - set googleMap(_i2.GMap? _googleMap) => - super.noSuchMethod(Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null); - @override - int get mapId => (super.noSuchMethod(Invocation.getter(#mapId), - returnValue: 0, returnValueForMissingStub: 0) as int); - @override - set mapId(int? _mapId) => - super.noSuchMethod(Invocation.setter(#mapId, _mapId), - returnValueForMissingStub: null); - @override - void addMarkers(Set<_i4.Marker>? markersToAdd) => - super.noSuchMethod(Invocation.method(#addMarkers, [markersToAdd]), - returnValueForMissingStub: null); - @override - void changeMarkers(Set<_i4.Marker>? markersToChange) => - super.noSuchMethod(Invocation.method(#changeMarkers, [markersToChange]), - returnValueForMissingStub: null); + Map<_i4.MarkerId, _i3.MarkerController> get markers => (super.noSuchMethod( + Invocation.getter(#markers), + returnValue: <_i4.MarkerId, _i3.MarkerController>{}, + returnValueForMissingStub: <_i4.MarkerId, _i3.MarkerController>{}, + ) as Map<_i4.MarkerId, _i3.MarkerController>); + @override + _i2.GMap get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _FakeGMap_0( + this, + Invocation.getter(#googleMap), + ), + returnValueForMissingStub: _FakeGMap_0( + this, + Invocation.getter(#googleMap), + ), + ) as _i2.GMap); + @override + set googleMap(_i2.GMap? _googleMap) => super.noSuchMethod( + Invocation.setter( + #googleMap, + _googleMap, + ), + returnValueForMissingStub: null, + ); + @override + int get mapId => (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + @override + set mapId(int? _mapId) => super.noSuchMethod( + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); + @override + void addMarkers(Set<_i4.Marker>? markersToAdd) => super.noSuchMethod( + Invocation.method( + #addMarkers, + [markersToAdd], + ), + returnValueForMissingStub: null, + ); + @override + void changeMarkers(Set<_i4.Marker>? markersToChange) => super.noSuchMethod( + Invocation.method( + #changeMarkers, + [markersToChange], + ), + returnValueForMissingStub: null, + ); @override void removeMarkers(Set<_i4.MarkerId>? markerIdsToRemove) => - super.noSuchMethod(Invocation.method(#removeMarkers, [markerIdsToRemove]), - returnValueForMissingStub: null); - @override - void showMarkerInfoWindow(_i4.MarkerId? markerId) => - super.noSuchMethod(Invocation.method(#showMarkerInfoWindow, [markerId]), - returnValueForMissingStub: null); - @override - void hideMarkerInfoWindow(_i4.MarkerId? markerId) => - super.noSuchMethod(Invocation.method(#hideMarkerInfoWindow, [markerId]), - returnValueForMissingStub: null); - @override - bool isInfoWindowShown(_i4.MarkerId? markerId) => - (super.noSuchMethod(Invocation.method(#isInfoWindowShown, [markerId]), - returnValue: false, returnValueForMissingStub: false) as bool); - @override - void bindToMap(int? mapId, _i2.GMap? googleMap) => - super.noSuchMethod(Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null); + super.noSuchMethod( + Invocation.method( + #removeMarkers, + [markerIdsToRemove], + ), + returnValueForMissingStub: null, + ); + @override + void showMarkerInfoWindow(_i4.MarkerId? markerId) => super.noSuchMethod( + Invocation.method( + #showMarkerInfoWindow, + [markerId], + ), + returnValueForMissingStub: null, + ); + @override + void hideMarkerInfoWindow(_i4.MarkerId? markerId) => super.noSuchMethod( + Invocation.method( + #hideMarkerInfoWindow, + [markerId], + ), + returnValueForMissingStub: null, + ); + @override + bool isInfoWindowShown(_i4.MarkerId? markerId) => (super.noSuchMethod( + Invocation.method( + #isInfoWindowShown, + [markerId], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void bindToMap( + int? mapId, + _i2.GMap? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.mocks.dart index 04cbc4a3416d..a85bce31e20f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.3.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in google_maps_flutter_web_integration_tests/integration_test/google_maps_plugin_test.dart. // Do not manually edit this file. @@ -24,24 +24,44 @@ import 'package:mockito/mockito.dart' as _i1; class _FakeStreamController_0 extends _i1.SmartFake implements _i2.StreamController { - _FakeStreamController_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeStreamController_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeLatLngBounds_1 extends _i1.SmartFake implements _i3.LatLngBounds { - _FakeLatLngBounds_1(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeLatLngBounds_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeScreenCoordinate_2 extends _i1.SmartFake implements _i3.ScreenCoordinate { - _FakeScreenCoordinate_2(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeScreenCoordinate_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeLatLng_3 extends _i1.SmartFake implements _i3.LatLng { - _FakeLatLng_3(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeLatLng_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [GoogleMapController]. @@ -51,117 +71,226 @@ class MockGoogleMapController extends _i1.Mock implements _i4.GoogleMapController { @override _i2.StreamController<_i3.MapEvent> get stream => (super.noSuchMethod( - Invocation.getter(#stream), - returnValue: _FakeStreamController_0<_i3.MapEvent>( - this, Invocation.getter(#stream)), - returnValueForMissingStub: _FakeStreamController_0<_i3.MapEvent>( - this, Invocation.getter(#stream))) as _i2 - .StreamController<_i3.MapEvent>); + Invocation.getter(#stream), + returnValue: _FakeStreamController_0<_i3.MapEvent>( + this, + Invocation.getter(#stream), + ), + returnValueForMissingStub: + _FakeStreamController_0<_i3.MapEvent>( + this, + Invocation.getter(#stream), + ), + ) as _i2.StreamController<_i3.MapEvent>); @override _i2.Stream<_i3.MapEvent> get events => (super.noSuchMethod( - Invocation.getter(#events), - returnValue: _i2.Stream<_i3.MapEvent>.empty(), - returnValueForMissingStub: _i2.Stream<_i3.MapEvent>.empty()) - as _i2.Stream<_i3.MapEvent>); - @override - bool get isInitialized => - (super.noSuchMethod(Invocation.getter(#isInitialized), - returnValue: false, returnValueForMissingStub: false) as bool); - @override - void debugSetOverrides( - {_i4.DebugCreateMapFunction? createMap, - _i4.MarkersController? markers, - _i4.CirclesController? circles, - _i4.PolygonsController? polygons, - _i4.PolylinesController? polylines}) => + Invocation.getter(#events), + returnValue: _i2.Stream<_i3.MapEvent>.empty(), + returnValueForMissingStub: _i2.Stream<_i3.MapEvent>.empty(), + ) as _i2.Stream<_i3.MapEvent>); + @override + bool get isInitialized => (super.noSuchMethod( + Invocation.getter(#isInitialized), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void debugSetOverrides({ + _i4.DebugCreateMapFunction? createMap, + _i4.MarkersController? markers, + _i4.CirclesController? circles, + _i4.PolygonsController? polygons, + _i4.PolylinesController? polylines, + }) => super.noSuchMethod( - Invocation.method(#debugSetOverrides, [], { + Invocation.method( + #debugSetOverrides, + [], + { #createMap: createMap, #markers: markers, #circles: circles, #polygons: polygons, - #polylines: polylines - }), - returnValueForMissingStub: null); + #polylines: polylines, + }, + ), + returnValueForMissingStub: null, + ); @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); + void init() => super.noSuchMethod( + Invocation.method( + #init, + [], + ), + returnValueForMissingStub: null, + ); @override void updateMapConfiguration(_i3.MapConfiguration? update) => - super.noSuchMethod(Invocation.method(#updateMapConfiguration, [update]), - returnValueForMissingStub: null); + super.noSuchMethod( + Invocation.method( + #updateMapConfiguration, + [update], + ), + returnValueForMissingStub: null, + ); @override - void updateStyles(List<_i5.MapTypeStyle>? styles) => - super.noSuchMethod(Invocation.method(#updateStyles, [styles]), - returnValueForMissingStub: null); + void updateStyles(List<_i5.MapTypeStyle>? styles) => super.noSuchMethod( + Invocation.method( + #updateStyles, + [styles], + ), + returnValueForMissingStub: null, + ); @override _i2.Future<_i3.LatLngBounds> getVisibleRegion() => (super.noSuchMethod( - Invocation.method(#getVisibleRegion, []), - returnValue: _i2.Future<_i3.LatLngBounds>.value( - _FakeLatLngBounds_1(this, Invocation.method(#getVisibleRegion, []))), - returnValueForMissingStub: _i2.Future<_i3.LatLngBounds>.value( - _FakeLatLngBounds_1( - this, Invocation.method(#getVisibleRegion, [])))) as _i2 - .Future<_i3.LatLngBounds>); + Invocation.method( + #getVisibleRegion, + [], + ), + returnValue: _i2.Future<_i3.LatLngBounds>.value(_FakeLatLngBounds_1( + this, + Invocation.method( + #getVisibleRegion, + [], + ), + )), + returnValueForMissingStub: + _i2.Future<_i3.LatLngBounds>.value(_FakeLatLngBounds_1( + this, + Invocation.method( + #getVisibleRegion, + [], + ), + )), + ) as _i2.Future<_i3.LatLngBounds>); @override _i2.Future<_i3.ScreenCoordinate> getScreenCoordinate(_i3.LatLng? latLng) => - (super.noSuchMethod(Invocation.method(#getScreenCoordinate, [latLng]), - returnValue: _i2.Future<_i3.ScreenCoordinate>.value( - _FakeScreenCoordinate_2( - this, Invocation.method(#getScreenCoordinate, [latLng]))), - returnValueForMissingStub: _i2.Future<_i3.ScreenCoordinate>.value( - _FakeScreenCoordinate_2( - this, Invocation.method(#getScreenCoordinate, [latLng])))) - as _i2.Future<_i3.ScreenCoordinate>); + (super.noSuchMethod( + Invocation.method( + #getScreenCoordinate, + [latLng], + ), + returnValue: + _i2.Future<_i3.ScreenCoordinate>.value(_FakeScreenCoordinate_2( + this, + Invocation.method( + #getScreenCoordinate, + [latLng], + ), + )), + returnValueForMissingStub: + _i2.Future<_i3.ScreenCoordinate>.value(_FakeScreenCoordinate_2( + this, + Invocation.method( + #getScreenCoordinate, + [latLng], + ), + )), + ) as _i2.Future<_i3.ScreenCoordinate>); @override _i2.Future<_i3.LatLng> getLatLng(_i3.ScreenCoordinate? screenCoordinate) => - (super.noSuchMethod(Invocation.method(#getLatLng, [screenCoordinate]), - returnValue: _i2.Future<_i3.LatLng>.value(_FakeLatLng_3( - this, Invocation.method(#getLatLng, [screenCoordinate]))), - returnValueForMissingStub: _i2.Future<_i3.LatLng>.value(_FakeLatLng_3( - this, Invocation.method(#getLatLng, [screenCoordinate])))) as _i2 - .Future<_i3.LatLng>); + (super.noSuchMethod( + Invocation.method( + #getLatLng, + [screenCoordinate], + ), + returnValue: _i2.Future<_i3.LatLng>.value(_FakeLatLng_3( + this, + Invocation.method( + #getLatLng, + [screenCoordinate], + ), + )), + returnValueForMissingStub: _i2.Future<_i3.LatLng>.value(_FakeLatLng_3( + this, + Invocation.method( + #getLatLng, + [screenCoordinate], + ), + )), + ) as _i2.Future<_i3.LatLng>); @override _i2.Future moveCamera(_i3.CameraUpdate? cameraUpdate) => - (super.noSuchMethod(Invocation.method(#moveCamera, [cameraUpdate]), - returnValue: _i2.Future.value(), - returnValueForMissingStub: _i2.Future.value()) - as _i2.Future); - @override - _i2.Future getZoomLevel() => - (super.noSuchMethod(Invocation.method(#getZoomLevel, []), - returnValue: _i2.Future.value(0.0), - returnValueForMissingStub: _i2.Future.value(0.0)) - as _i2.Future); - @override - void updateCircles(_i3.CircleUpdates? updates) => - super.noSuchMethod(Invocation.method(#updateCircles, [updates]), - returnValueForMissingStub: null); - @override - void updatePolygons(_i3.PolygonUpdates? updates) => - super.noSuchMethod(Invocation.method(#updatePolygons, [updates]), - returnValueForMissingStub: null); - @override - void updatePolylines(_i3.PolylineUpdates? updates) => - super.noSuchMethod(Invocation.method(#updatePolylines, [updates]), - returnValueForMissingStub: null); - @override - void updateMarkers(_i3.MarkerUpdates? updates) => - super.noSuchMethod(Invocation.method(#updateMarkers, [updates]), - returnValueForMissingStub: null); - @override - void showInfoWindow(_i3.MarkerId? markerId) => - super.noSuchMethod(Invocation.method(#showInfoWindow, [markerId]), - returnValueForMissingStub: null); - @override - void hideInfoWindow(_i3.MarkerId? markerId) => - super.noSuchMethod(Invocation.method(#hideInfoWindow, [markerId]), - returnValueForMissingStub: null); - @override - bool isInfoWindowShown(_i3.MarkerId? markerId) => - (super.noSuchMethod(Invocation.method(#isInfoWindowShown, [markerId]), - returnValue: false, returnValueForMissingStub: false) as bool); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); + (super.noSuchMethod( + Invocation.method( + #moveCamera, + [cameraUpdate], + ), + returnValue: _i2.Future.value(), + returnValueForMissingStub: _i2.Future.value(), + ) as _i2.Future); + @override + _i2.Future getZoomLevel() => (super.noSuchMethod( + Invocation.method( + #getZoomLevel, + [], + ), + returnValue: _i2.Future.value(0.0), + returnValueForMissingStub: _i2.Future.value(0.0), + ) as _i2.Future); + @override + void updateCircles(_i3.CircleUpdates? updates) => super.noSuchMethod( + Invocation.method( + #updateCircles, + [updates], + ), + returnValueForMissingStub: null, + ); + @override + void updatePolygons(_i3.PolygonUpdates? updates) => super.noSuchMethod( + Invocation.method( + #updatePolygons, + [updates], + ), + returnValueForMissingStub: null, + ); + @override + void updatePolylines(_i3.PolylineUpdates? updates) => super.noSuchMethod( + Invocation.method( + #updatePolylines, + [updates], + ), + returnValueForMissingStub: null, + ); + @override + void updateMarkers(_i3.MarkerUpdates? updates) => super.noSuchMethod( + Invocation.method( + #updateMarkers, + [updates], + ), + returnValueForMissingStub: null, + ); + @override + void showInfoWindow(_i3.MarkerId? markerId) => super.noSuchMethod( + Invocation.method( + #showInfoWindow, + [markerId], + ), + returnValueForMissingStub: null, + ); + @override + void hideInfoWindow(_i3.MarkerId? markerId) => super.noSuchMethod( + Invocation.method( + #hideInfoWindow, + [markerId], + ), + returnValueForMissingStub: null, + ); + @override + bool isInfoWindowShown(_i3.MarkerId? markerId) => (super.noSuchMethod( + Invocation.method( + #isInfoWindowShown, + [markerId], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index 7e25b6e3b483..35c9c903e982 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -25,4 +25,4 @@ dev_dependencies: http: ^0.13.0 integration_test: sdk: flutter - mockito: ^5.3.0 + mockito: ^5.3.2 diff --git a/packages/google_sign_in/google_sign_in/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/google_sign_in/google_sign_in/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/google_sign_in/google_sign_in/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_sign_in/google_sign_in/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/google_sign_in/google_sign_in/example/android/build.gradle b/packages/google_sign_in/google_sign_in/example/android/build.gradle index e101ac08df55..c21bff8e0a2f 100644 --- a/packages/google_sign_in/google_sign_in/example/android/build.gradle +++ b/packages/google_sign_in/google_sign_in/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/google_sign_in/google_sign_in/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/google_sign_in/google_sign_in/example/android/gradle/wrapper/gradle-wrapper.properties index 019065d1d650..297f2fec363f 100644 --- a/packages/google_sign_in/google_sign_in/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_sign_in/google_sign_in/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/google_sign_in/google_sign_in/example/pubspec.yaml b/packages/google_sign_in/google_sign_in/example/pubspec.yaml index b836ffea4664..fbf8f7cf0591 100644 --- a/packages/google_sign_in/google_sign_in/example/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in/example/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: http: ^0.13.0 dev_dependencies: - espresso: ^0.1.0+2 + espresso: ^0.2.0 flutter_driver: sdk: flutter flutter_test: diff --git a/packages/google_sign_in/google_sign_in_android/android/build.gradle b/packages/google_sign_in/google_sign_in_android/android/build.gradle index 3384029d666a..f3a324fefbc9 100644 --- a/packages/google_sign_in/google_sign_in_android/android/build.gradle +++ b/packages/google_sign_in/google_sign_in_android/android/build.gradle @@ -29,6 +29,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + // TODO(stuartmorgan): Enable when gradle is updated. + // disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' } diff --git a/packages/google_sign_in/google_sign_in_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/google_sign_in/google_sign_in_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/google_sign_in/google_sign_in_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_sign_in/google_sign_in_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/google_sign_in/google_sign_in_android/example/android/build.gradle b/packages/google_sign_in/google_sign_in_android/example/android/build.gradle index e101ac08df55..c21bff8e0a2f 100644 --- a/packages/google_sign_in/google_sign_in_android/example/android/build.gradle +++ b/packages/google_sign_in/google_sign_in_android/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/google_sign_in/google_sign_in_android/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/google_sign_in/google_sign_in_android/example/android/gradle/wrapper/gradle-wrapper.properties index 019065d1d650..297f2fec363f 100644 --- a/packages/google_sign_in/google_sign_in_android/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_sign_in/google_sign_in_android/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/google_sign_in/google_sign_in_android/example/pubspec.yaml b/packages/google_sign_in/google_sign_in_android/example/pubspec.yaml index f81df99b7d28..5ac2240cbba1 100644 --- a/packages/google_sign_in/google_sign_in_android/example/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in_android/example/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: http: ^0.13.0 dev_dependencies: - espresso: ^0.1.0+2 + espresso: ^0.2.0 flutter_driver: sdk: flutter flutter_test: diff --git a/packages/google_sign_in/google_sign_in_web/lib/src/generated/gapiauth2.dart b/packages/google_sign_in/google_sign_in_web/lib/src/generated/gapiauth2.dart index e1721668f41f..f474e0d00f69 100644 --- a/packages/google_sign_in/google_sign_in_web/lib/src/generated/gapiauth2.dart +++ b/packages/google_sign_in/google_sign_in_web/lib/src/generated/gapiauth2.dart @@ -12,7 +12,7 @@ // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/gapi.auth2 -// ignore_for_file: public_member_api_docs, unused_element, non_constant_identifier_names, sort_constructors_first, always_specify_types +// ignore_for_file: public_member_api_docs, unused_element, non_constant_identifier_names, sort_constructors_first, always_specify_types, strict_raw_type @JS() library gapiauth2; diff --git a/packages/image_picker/image_picker/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/image_picker/image_picker/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/image_picker/image_picker/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/image_picker/image_picker/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/image_picker/image_picker/example/android/build.gradle b/packages/image_picker/image_picker/example/android/build.gradle index e101ac08df55..c21bff8e0a2f 100755 --- a/packages/image_picker/image_picker/example/android/build.gradle +++ b/packages/image_picker/image_picker/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/image_picker/image_picker/example/android/gradle.properties b/packages/image_picker/image_picker/example/android/gradle.properties index 6effed032590..38c8d4544ff1 100755 --- a/packages/image_picker/image_picker/example/android/gradle.properties +++ b/packages/image_picker/image_picker/example/android/gradle.properties @@ -2,4 +2,3 @@ org.gradle.jvmargs=-Xmx1536M android.enableR8=true android.useAndroidX=true android.enableJetifier=true -android.enableUnitTestBinaryResources=true diff --git a/packages/image_picker/image_picker/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/image_picker/image_picker/example/android/gradle/wrapper/gradle-wrapper.properties index 019065d1d650..297f2fec363f 100644 --- a/packages/image_picker/image_picker/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/image_picker/image_picker/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/image_picker/image_picker_android/android/build.gradle b/packages/image_picker/image_picker_android/android/build.gradle index a6c01e386448..aed1ad5174ea 100644 --- a/packages/image_picker/image_picker_android/android/build.gradle +++ b/packages/image_picker/image_picker_android/android/build.gradle @@ -29,6 +29,7 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' } diff --git a/packages/image_picker/image_picker_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/image_picker/image_picker_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/image_picker/image_picker_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/image_picker/image_picker_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/in_app_purchase/in_app_purchase/CHANGELOG.md b/packages/in_app_purchase/in_app_purchase/CHANGELOG.md index 902c4377e9d6..f38fe18a25d4 100644 --- a/packages/in_app_purchase/in_app_purchase/CHANGELOG.md +++ b/packages/in_app_purchase/in_app_purchase/CHANGELOG.md @@ -1,6 +1,7 @@ -## NEXT +## 3.0.8 * Updates minimum Flutter version to 2.10. +* Bumps minimum in_app_purchase_android to 0.2.3. ## 3.0.7 diff --git a/packages/in_app_purchase/in_app_purchase/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/in_app_purchase/in_app_purchase/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/in_app_purchase/in_app_purchase/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/in_app_purchase/in_app_purchase/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/in_app_purchase/in_app_purchase/example/android/build.gradle b/packages/in_app_purchase/in_app_purchase/example/android/build.gradle index 0b4cf534e0aa..c21bff8e0a2f 100644 --- a/packages/in_app_purchase/in_app_purchase/example/android/build.gradle +++ b/packages/in_app_purchase/in_app_purchase/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/in_app_purchase/in_app_purchase/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/in_app_purchase/in_app_purchase/example/android/gradle/wrapper/gradle-wrapper.properties index bc6a58afdda2..b8793d3c0d69 100644 --- a/packages/in_app_purchase/in_app_purchase/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/in_app_purchase/in_app_purchase/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/in_app_purchase/in_app_purchase/pubspec.yaml b/packages/in_app_purchase/in_app_purchase/pubspec.yaml index 49382c90c01a..40b0ea9a152b 100644 --- a/packages/in_app_purchase/in_app_purchase/pubspec.yaml +++ b/packages/in_app_purchase/in_app_purchase/pubspec.yaml @@ -2,7 +2,7 @@ name: in_app_purchase description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play. repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22 -version: 3.0.7 +version: 3.0.8 environment: sdk: ">=2.12.0 <3.0.0" @@ -19,7 +19,7 @@ flutter: dependencies: flutter: sdk: flutter - in_app_purchase_android: ^0.2.1 + in_app_purchase_android: ^0.2.3 in_app_purchase_platform_interface: ^1.0.0 in_app_purchase_storekit: ^0.3.0+1 diff --git a/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md b/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md index 6540fdfedafe..b595d7e148d9 100644 --- a/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md +++ b/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.3+6 + +* Updates android gradle plugin to 7.3.1. + ## 0.2.3+5 * Updates imports for `prefer_relative_imports`. diff --git a/packages/in_app_purchase/in_app_purchase_android/android/build.gradle b/packages/in_app_purchase/in_app_purchase_android/android/build.gradle index d58d1cc7c052..704ab36c253b 100644 --- a/packages/in_app_purchase/in_app_purchase_android/android/build.gradle +++ b/packages/in_app_purchase/in_app_purchase_android/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.3.1' } } @@ -29,6 +29,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + // TODO(stuartmorgan): Enable when gradle is updated. + // disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' } @@ -55,7 +57,7 @@ dependencies { implementation 'androidx.annotation:annotation:1.3.0' implementation 'com.android.billingclient:billing:5.0.0' testImplementation 'junit:junit:4.13.2' - testImplementation 'org.json:json:20220320' + testImplementation 'org.json:json:20220924' testImplementation 'org.mockito:mockito-core:4.7.0' androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' diff --git a/packages/in_app_purchase/in_app_purchase_android/android/gradle/wrapper/gradle-wrapper.properties b/packages/in_app_purchase/in_app_purchase_android/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index baf2285f8c53..000000000000 --- a/packages/in_app_purchase/in_app_purchase_android/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Mon Oct 29 10:30:44 PDT 2018 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/packages/in_app_purchase/in_app_purchase_android/example/android/app/build.gradle b/packages/in_app_purchase/in_app_purchase_android/example/android/app/build.gradle index e2ec6af97c7a..281f349989be 100644 --- a/packages/in_app_purchase/in_app_purchase_android/example/android/app/build.gradle +++ b/packages/in_app_purchase/in_app_purchase_android/example/android/app/build.gradle @@ -109,7 +109,7 @@ dependencies { implementation 'com.android.billingclient:billing:5.0.0' testImplementation 'junit:junit:4.13.2' testImplementation 'org.mockito:mockito-core:4.7.0' - testImplementation 'org.json:json:20180813' + testImplementation 'org.json:json:20220924' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' } diff --git a/packages/in_app_purchase/in_app_purchase_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/in_app_purchase/in_app_purchase_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/in_app_purchase/in_app_purchase_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/in_app_purchase/in_app_purchase_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/in_app_purchase/in_app_purchase_android/example/android/build.gradle b/packages/in_app_purchase/in_app_purchase_android/example/android/build.gradle index 0b4cf534e0aa..c21bff8e0a2f 100644 --- a/packages/in_app_purchase/in_app_purchase_android/example/android/build.gradle +++ b/packages/in_app_purchase/in_app_purchase_android/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/in_app_purchase/in_app_purchase_android/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/in_app_purchase/in_app_purchase_android/example/android/gradle/wrapper/gradle-wrapper.properties index bc6a58afdda2..b8793d3c0d69 100644 --- a/packages/in_app_purchase/in_app_purchase_android/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/in_app_purchase/in_app_purchase_android/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml b/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml index 8c57a982937b..555773a47910 100644 --- a/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml +++ b/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml @@ -2,7 +2,7 @@ name: in_app_purchase_android description: An implementation for the Android platform of the Flutter `in_app_purchase` plugin. This uses the Android BillingClient APIs. repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22 -version: 0.2.3+5 +version: 0.2.3+6 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md b/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md index 52f59efacd6a..324e0608b7f9 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md +++ b/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.3.3 + +* Supports adding discount information to AppStorePurchaseParam. +* Fixes iOS Promotional Offers bug which prevents them from working. + ## 0.3.2+2 * Updates imports for `prefer_relative_imports`. diff --git a/packages/in_app_purchase/in_app_purchase_storekit/example/ios/RunnerTests/TranslatorTests.m b/packages/in_app_purchase/in_app_purchase_storekit/example/ios/RunnerTests/TranslatorTests.m index ed302d61d9b0..34d686753762 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/example/ios/RunnerTests/TranslatorTests.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/example/ios/RunnerTests/TranslatorTests.m @@ -390,4 +390,27 @@ - (void)testSKPaymentDiscountFromMapMissingTimestamp { } } +- (void)testSKPaymentDiscountFromMapOverflowingTimestamp { + if (@available(iOS 12.2, *)) { + NSDictionary *discountMap = @{ + @"identifier" : @"payment_discount_identifier", + @"keyIdentifier" : @"payment_discount_key_identifier", + @"nonce" : @"d18981e0-9003-4365-98a2-4b90e3b62c52", + @"signature" : @"this is a encrypted signature", + @"timestamp" : @1665044583595, // timestamp 2022 Oct + }; + NSString *error = nil; + SKPaymentDiscount *paymentDiscount = + [FIAObjectTranslator getSKPaymentDiscountFromMap:discountMap withError:&error]; + XCTAssertNil(error); + XCTAssertNotNil(paymentDiscount); + XCTAssertEqual(paymentDiscount.identifier, discountMap[@"identifier"]); + XCTAssertEqual(paymentDiscount.keyIdentifier, discountMap[@"keyIdentifier"]); + XCTAssertEqualObjects(paymentDiscount.nonce, + [[NSUUID alloc] initWithUUIDString:discountMap[@"nonce"]]); + XCTAssertEqual(paymentDiscount.signature, discountMap[@"signature"]); + XCTAssertEqual(paymentDiscount.timestamp, discountMap[@"timestamp"]); + } +} + @end diff --git a/packages/in_app_purchase/in_app_purchase_storekit/example/test_driver/test/integration_test.dart b/packages/in_app_purchase/in_app_purchase_storekit/example/test_driver/integration_test.dart similarity index 100% rename from packages/in_app_purchase/in_app_purchase_storekit/example/test_driver/test/integration_test.dart rename to packages/in_app_purchase/in_app_purchase_storekit/example/test_driver/integration_test.dart diff --git a/packages/in_app_purchase/in_app_purchase_storekit/ios/Classes/FIAObjectTranslator.m b/packages/in_app_purchase/in_app_purchase_storekit/ios/Classes/FIAObjectTranslator.m index d01eb9becf3d..c656b58808b3 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/ios/Classes/FIAObjectTranslator.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/ios/Classes/FIAObjectTranslator.m @@ -277,7 +277,7 @@ + (SKPaymentDiscount *)getSKPaymentDiscountFromMap:(NSDictionary *)map return nil; } - if (!timestamp || ![timestamp isKindOfClass:NSNumber.class] || [timestamp intValue] <= 0) { + if (!timestamp || ![timestamp isKindOfClass:NSNumber.class] || [timestamp longLongValue] <= 0) { if (error) { *error = @"When specifying a payment discount the 'timestamp' field is mandatory."; } diff --git a/packages/in_app_purchase/in_app_purchase_storekit/ios/Classes/InAppPurchasePlugin.m b/packages/in_app_purchase/in_app_purchase_storekit/ios/Classes/InAppPurchasePlugin.m index d64c24563b62..bfc90ea43716 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/ios/Classes/InAppPurchasePlugin.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/ios/Classes/InAppPurchasePlugin.m @@ -200,10 +200,11 @@ - (void)addPayment:(FlutterMethodCall *)call result:(FlutterResult)result { : [simulatesAskToBuyInSandbox boolValue]; if (@available(iOS 12.2, *)) { + NSDictionary *paymentDiscountMap = [self getNonNullValueFromDictionary:paymentMap + forKey:@"paymentDiscount"]; NSString *error = nil; - SKPaymentDiscount *paymentDiscount = [FIAObjectTranslator - getSKPaymentDiscountFromMap:[paymentMap objectForKey:@"paymentDiscount"] - withError:&error]; + SKPaymentDiscount *paymentDiscount = + [FIAObjectTranslator getSKPaymentDiscountFromMap:paymentDiscountMap withError:&error]; if (error) { result([FlutterError @@ -367,6 +368,11 @@ - (void)showPriceConsentIfNeeded:(FlutterResult)result { result(nil); } +- (id)getNonNullValueFromDictionary:(NSDictionary *)dictionary forKey:(NSString *)key { + id value = dictionary[key]; + return [value isKindOfClass:[NSNull class]] ? nil : value; +} + #pragma mark - transaction observer: - (void)handleTransactionsUpdated:(NSArray *)transactions { diff --git a/packages/in_app_purchase/in_app_purchase_storekit/lib/src/in_app_purchase_storekit_platform.dart b/packages/in_app_purchase/in_app_purchase_storekit/lib/src/in_app_purchase_storekit_platform.dart index c03f15f8ce48..0e5e420ece85 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/lib/src/in_app_purchase_storekit_platform.dart +++ b/packages/in_app_purchase/in_app_purchase_storekit/lib/src/in_app_purchase_storekit_platform.dart @@ -75,7 +75,10 @@ class InAppPurchaseStoreKitPlatform extends InAppPurchasePlatform { purchaseParam is AppStorePurchaseParam ? purchaseParam.quantity : 1, applicationUsername: purchaseParam.applicationUserName, simulatesAskToBuyInSandbox: purchaseParam is AppStorePurchaseParam && - purchaseParam.simulatesAskToBuyInSandbox)); + purchaseParam.simulatesAskToBuyInSandbox, + paymentDiscount: purchaseParam is AppStorePurchaseParam + ? purchaseParam.discount + : null)); return true; // There's no error feedback from iOS here to return. } diff --git a/packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/sk_payment_queue_wrapper.dart b/packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/sk_payment_queue_wrapper.dart index 78e16e22416c..d360a2da3fe5 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/sk_payment_queue_wrapper.dart +++ b/packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/sk_payment_queue_wrapper.dart @@ -405,7 +405,8 @@ class SKPaymentWrapper { 'applicationUsername': applicationUsername, 'requestData': requestData, 'quantity': quantity, - 'simulatesAskToBuyInSandbox': simulatesAskToBuyInSandbox + 'simulatesAskToBuyInSandbox': simulatesAskToBuyInSandbox, + 'paymentDiscount': paymentDiscount?.toMap(), }; } diff --git a/packages/in_app_purchase/in_app_purchase_storekit/lib/src/types/app_store_purchase_param.dart b/packages/in_app_purchase/in_app_purchase_storekit/lib/src/types/app_store_purchase_param.dart index 168ef5cea5f4..0e7e24166c4d 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/lib/src/types/app_store_purchase_param.dart +++ b/packages/in_app_purchase/in_app_purchase_storekit/lib/src/types/app_store_purchase_param.dart @@ -14,6 +14,7 @@ class AppStorePurchaseParam extends PurchaseParam { String? applicationUserName, this.quantity = 1, this.simulatesAskToBuyInSandbox = false, + this.discount, }) : super( productDetails: productDetails, applicationUserName: applicationUserName, @@ -32,4 +33,7 @@ class AppStorePurchaseParam extends PurchaseParam { /// Quantity of the product user requested to buy. final int quantity; + + /// Discount applied to the product. The value is `null` when the product does not have a discount. + final SKPaymentDiscountWrapper? discount; } diff --git a/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml b/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml index f2193e53b591..0b6e21a26978 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml +++ b/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml @@ -2,7 +2,7 @@ name: in_app_purchase_storekit description: An implementation for the iOS platform of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework. repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase_storekit issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22 -version: 0.3.2+2 +version: 0.3.3 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/in_app_purchase/in_app_purchase_storekit/test/fakes/fake_storekit_platform.dart b/packages/in_app_purchase/in_app_purchase_storekit/test/fakes/fake_storekit_platform.dart index 08b9c85961a3..e6b9696c8cb1 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/test/fakes/fake_storekit_platform.dart +++ b/packages/in_app_purchase/in_app_purchase_storekit/test/fakes/fake_storekit_platform.dart @@ -30,6 +30,7 @@ class FakeStoreKitPlatform { PlatformException? restoreException; SKError? testRestoredError; bool queueIsActive = false; + Map discountReceived = {}; void reset() { transactions = []; @@ -54,6 +55,7 @@ class FakeStoreKitPlatform { restoreException = null; testRestoredError = null; queueIsActive = false; + discountReceived = {}; } SKPaymentTransactionWrapper createPendingTransaction(String id, @@ -169,6 +171,18 @@ class FakeStoreKitPlatform { case '-[InAppPurchasePlugin addPayment:result:]': final String id = call.arguments['productIdentifier'] as String; final int quantity = call.arguments['quantity'] as int; + + // Keep the received paymentDiscount parameter when testing payment with discount. + if (call.arguments['applicationUsername'] == 'userWithDiscount') { + if (call.arguments['paymentDiscount'] != null) { + final Map discountArgument = + call.arguments['paymentDiscount'] as Map; + discountReceived = discountArgument.cast(); + } else { + discountReceived = {}; + } + } + final SKPaymentTransactionWrapper transaction = createPendingTransaction(id, quantity: quantity); transactions.add(transaction); diff --git a/packages/in_app_purchase/in_app_purchase_storekit/test/in_app_purchase_storekit_platform_test.dart b/packages/in_app_purchase/in_app_purchase_storekit/test/in_app_purchase_storekit_platform_test.dart index 852599ac3670..51ff2c229483 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/test/in_app_purchase_storekit_platform_test.dart +++ b/packages/in_app_purchase/in_app_purchase_storekit/test/in_app_purchase_storekit_platform_test.dart @@ -489,6 +489,38 @@ void main() { expect( fakeStoreKitPlatform.finishedTransactions.first.payment.quantity, 5); }); + + test( + 'buying non consumable with discount, should get purchase objects in the purchase update callback', + () async { + final List details = []; + final Completer> completer = + Completer>(); + final Stream> stream = + iapStoreKitPlatform.purchaseStream; + + late StreamSubscription> subscription; + subscription = stream.listen((List purchaseDetailsList) { + details.addAll(purchaseDetailsList); + if (purchaseDetailsList.first.status == PurchaseStatus.purchased) { + completer.complete(details); + subscription.cancel(); + } + }); + final AppStorePurchaseParam purchaseParam = AppStorePurchaseParam( + productDetails: + AppStoreProductDetails.fromSKProduct(dummyProductWrapper), + applicationUserName: 'userWithDiscount', + discount: dummyPaymentDiscountWrapper, + ); + await iapStoreKitPlatform.buyNonConsumable(purchaseParam: purchaseParam); + + final List result = await completer.future; + expect(result.length, 2); + expect(result.first.productID, dummyProductWrapper.productIdentifier); + expect(fakeStoreKitPlatform.discountReceived, + dummyPaymentDiscountWrapper.toMap()); + }); }); group('complete purchase', () { diff --git a/packages/in_app_purchase/in_app_purchase_storekit/test/store_kit_wrappers/sk_product_test.dart b/packages/in_app_purchase/in_app_purchase_storekit/test/store_kit_wrappers/sk_product_test.dart index de61268e4009..b6de5e035c5e 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/test/store_kit_wrappers/sk_product_test.dart +++ b/packages/in_app_purchase/in_app_purchase_storekit/test/store_kit_wrappers/sk_product_test.dart @@ -141,6 +141,21 @@ void main() { expect(payment, equals(dummyPayment)); }); + test('SKPaymentWrapper should have propery values consistent with .toMap()', + () { + final Map mapResult = dummyPaymentWithDiscount.toMap(); + expect(mapResult['productIdentifier'], + dummyPaymentWithDiscount.productIdentifier); + expect(mapResult['applicationUsername'], + dummyPaymentWithDiscount.applicationUsername); + expect(mapResult['requestData'], dummyPaymentWithDiscount.requestData); + expect(mapResult['quantity'], dummyPaymentWithDiscount.quantity); + expect(mapResult['simulatesAskToBuyInSandbox'], + dummyPaymentWithDiscount.simulatesAskToBuyInSandbox); + expect(mapResult['paymentDiscount'], + equals(dummyPaymentWithDiscount.paymentDiscount?.toMap())); + }); + test('Should construct correct SKError from json', () { final SKError error = SKError.fromJson(buildErrorMap(dummyError)); expect(error, equals(dummyError)); diff --git a/packages/in_app_purchase/in_app_purchase_storekit/test/store_kit_wrappers/sk_test_stub_objects.dart b/packages/in_app_purchase/in_app_purchase_storekit/test/store_kit_wrappers/sk_test_stub_objects.dart index 946fbc81b74c..6601a21c4ee4 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/test/store_kit_wrappers/sk_test_stub_objects.dart +++ b/packages/in_app_purchase/in_app_purchase_storekit/test/store_kit_wrappers/sk_test_stub_objects.dart @@ -10,6 +10,15 @@ const SKPaymentWrapper dummyPayment = SKPaymentWrapper( requestData: 'fake-data-utf8', quantity: 2, simulatesAskToBuyInSandbox: true); + +final SKPaymentWrapper dummyPaymentWithDiscount = SKPaymentWrapper( + productIdentifier: 'prod-id', + applicationUsername: 'app-user-name', + requestData: 'fake-data-utf8', + quantity: 2, + simulatesAskToBuyInSandbox: true, + paymentDiscount: dummyPaymentDiscountWrapper); + const SKError dummyError = SKError( code: 111, domain: 'dummy-domain', @@ -186,3 +195,12 @@ Map buildTransactionMap( }; return map; } + +final SKPaymentDiscountWrapper dummyPaymentDiscountWrapper = + SKPaymentDiscountWrapper.fromJson(const { + 'identifier': 'dummy-discount-identifier', + 'keyIdentifier': 'KEYIDTEST1', + 'nonce': '00000000-0000-0000-0000-000000000000', + 'signature': 'dummy-signature-string', + 'timestamp': 1231231231, +}); diff --git a/packages/local_auth/local_auth/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/local_auth/local_auth/example/android/app/gradle/wrapper/gradle-wrapper.properties index 186b71557c50..29e413457635 100644 --- a/packages/local_auth/local_auth/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/local_auth/local_auth/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/local_auth/local_auth/example/android/build.gradle b/packages/local_auth/local_auth/example/android/build.gradle index 54c943621de5..c21bff8e0a2f 100644 --- a/packages/local_auth/local_auth/example/android/build.gradle +++ b/packages/local_auth/local_auth/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.1' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/local_auth/local_auth/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/local_auth/local_auth/example/android/gradle/wrapper/gradle-wrapper.properties index cd9fe1c68282..3f383641d7c3 100644 --- a/packages/local_auth/local_auth/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/local_auth/local_auth/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/local_auth/local_auth_android/CHANGELOG.md b/packages/local_auth/local_auth_android/CHANGELOG.md index a26846d5ed01..bb3235b49c88 100644 --- a/packages/local_auth/local_auth_android/CHANGELOG.md +++ b/packages/local_auth/local_auth_android/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.15 + +* Updates androidx.fragment version to 1.5.4. + +## 1.0.14 + +* Fixes device credential authentication for API versions before R. + ## 1.0.13 * Updates imports for `prefer_relative_imports`. diff --git a/packages/local_auth/local_auth_android/android/build.gradle b/packages/local_auth/local_auth_android/android/build.gradle index 399d8a4fbb45..913ea6f33fc0 100644 --- a/packages/local_auth/local_auth_android/android/build.gradle +++ b/packages/local_auth/local_auth_android/android/build.gradle @@ -29,6 +29,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + // TODO(stuartmorgan): Enable when gradle is updated. + // disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' baseline file("lint-baseline.xml") @@ -51,9 +53,10 @@ android { dependencies { api "androidx.core:core:1.8.0" api "androidx.biometric:biometric:1.1.0" - api "androidx.fragment:fragment:1.5.2" + api "androidx.fragment:fragment:1.5.4" testImplementation 'junit:junit:4.13.2' testImplementation 'org.mockito:mockito-inline:4.7.0' + testImplementation 'org.robolectric:robolectric:4.5' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test:rules:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' diff --git a/packages/local_auth/local_auth_android/android/src/main/java/io/flutter/plugins/localauth/LocalAuthPlugin.java b/packages/local_auth/local_auth_android/android/src/main/java/io/flutter/plugins/localauth/LocalAuthPlugin.java index e8632c474030..e545df01e7c0 100644 --- a/packages/local_auth/local_auth_android/android/src/main/java/io/flutter/plugins/localauth/LocalAuthPlugin.java +++ b/packages/local_auth/local_auth_android/android/src/main/java/io/flutter/plugins/localauth/LocalAuthPlugin.java @@ -253,11 +253,16 @@ public ArrayList getEnrolledBiometrics() { } @VisibleForTesting - public boolean isDeviceSupported() { + public boolean isDeviceSecure() { if (keyguardManager == null) return false; return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && keyguardManager.isDeviceSecure()); } + @VisibleForTesting + public boolean isDeviceSupported() { + return isDeviceSecure() || canAuthenticateWithBiometrics(); + } + private boolean canAuthenticateWithBiometrics() { if (biometricManager == null) return false; return biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK) @@ -270,7 +275,15 @@ private boolean hasBiometricHardware() { != BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE; } - private boolean canAuthenticateWithDeviceCredential() { + @VisibleForTesting + public boolean canAuthenticateWithDeviceCredential() { + if (Build.VERSION.SDK_INT < 30) { + // Checking for device credential only authentication via the BiometricManager + // is not allowed before API level 30, so we check for presence of PIN, pattern, + // or password instead. + return isDeviceSecure(); + } + if (biometricManager == null) return false; return biometricManager.canAuthenticate(BiometricManager.Authenticators.DEVICE_CREDENTIAL) == BiometricManager.BIOMETRIC_SUCCESS; @@ -334,4 +347,9 @@ final Activity getActivity() { void setBiometricManager(BiometricManager biometricManager) { this.biometricManager = biometricManager; } + + @VisibleForTesting + void setKeyguardManager(KeyguardManager keyguardManager) { + this.keyguardManager = keyguardManager; + } } diff --git a/packages/local_auth/local_auth_android/android/src/test/java/io/flutter/plugins/localauth/LocalAuthTest.java b/packages/local_auth/local_auth_android/android/src/test/java/io/flutter/plugins/localauth/LocalAuthTest.java index 0eaf31255317..7279a3c49af2 100644 --- a/packages/local_auth/local_auth_android/android/src/test/java/io/flutter/plugins/localauth/LocalAuthTest.java +++ b/packages/local_auth/local_auth_android/android/src/test/java/io/flutter/plugins/localauth/LocalAuthTest.java @@ -17,6 +17,7 @@ import static org.mockito.Mockito.when; import android.app.Activity; +import android.app.KeyguardManager; import android.app.NativeActivity; import android.content.Context; import androidx.biometric.BiometricManager; @@ -34,8 +35,12 @@ import java.util.Collections; import java.util.HashMap; import org.junit.Test; +import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.annotation.Config; +@RunWith(RobolectricTestRunner.class) public class LocalAuthTest { @Test public void authenticate_returnsErrorWhenAuthInProgress() { @@ -107,14 +112,13 @@ public void authenticate_properlyConfiguresBiometricOnlyAuthenticationRequest() } @Test + @Config(sdk = 30) public void authenticate_properlyConfiguresBiometricAndDeviceCredentialAuthenticationRequest() { final LocalAuthPlugin plugin = spy(new LocalAuthPlugin()); setPluginActivity(plugin, buildMockActivityWithContext(mock(FragmentActivity.class))); when(plugin.isDeviceSupported()).thenReturn(true); final BiometricManager mockBiometricManager = mock(BiometricManager.class); - when(mockBiometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK)) - .thenReturn(BiometricManager.BIOMETRIC_SUCCESS); when(mockBiometricManager.canAuthenticate(BiometricManager.Authenticators.DEVICE_CREDENTIAL)) .thenReturn(BiometricManager.BIOMETRIC_SUCCESS); plugin.setBiometricManager(mockBiometricManager); @@ -135,6 +139,7 @@ public void authenticate_properlyConfiguresBiometricAndDeviceCredentialAuthentic } @Test + @Config(sdk = 30) public void authenticate_properlyConfiguresDeviceCredentialOnlyAuthenticationRequest() { final LocalAuthPlugin plugin = spy(new LocalAuthPlugin()); setPluginActivity(plugin, buildMockActivityWithContext(mock(FragmentActivity.class))); @@ -343,6 +348,44 @@ public void getEnrolledBiometrics_shouldAddStrongBiometrics() { }); } + @Test + @Config(sdk = 22) + public void isDeviceSecure_returnsFalseOnBelowApi23() { + final LocalAuthPlugin plugin = new LocalAuthPlugin(); + assertFalse(plugin.isDeviceSecure()); + } + + @Test + @Config(sdk = 23) + public void isDeviceSecure_returnsTrueIfDeviceIsSecure() { + final LocalAuthPlugin plugin = new LocalAuthPlugin(); + KeyguardManager mockKeyguardManager = mock(KeyguardManager.class); + plugin.setKeyguardManager(mockKeyguardManager); + + when(mockKeyguardManager.isDeviceSecure()).thenReturn(true); + assertTrue(plugin.isDeviceSecure()); + + when(mockKeyguardManager.isDeviceSecure()).thenReturn(false); + assertFalse(plugin.isDeviceSecure()); + } + + @Test + @Config(sdk = 30) + public void + canAuthenticateWithDeviceCredential_returnsTrueIfHasBiometricManagerSupportAboveApi30() { + final LocalAuthPlugin plugin = new LocalAuthPlugin(); + final BiometricManager mockBiometricManager = mock(BiometricManager.class); + plugin.setBiometricManager(mockBiometricManager); + + when(mockBiometricManager.canAuthenticate(BiometricManager.Authenticators.DEVICE_CREDENTIAL)) + .thenReturn(BiometricManager.BIOMETRIC_SUCCESS); + assertTrue(plugin.canAuthenticateWithDeviceCredential()); + + when(mockBiometricManager.canAuthenticate(BiometricManager.Authenticators.DEVICE_CREDENTIAL)) + .thenReturn(BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED); + assertFalse(plugin.canAuthenticateWithDeviceCredential()); + } + private Activity buildMockActivityWithContext(Activity mockActivity) { final Context mockContext = mock(Context.class); when(mockActivity.getBaseContext()).thenReturn(mockContext); diff --git a/packages/local_auth/local_auth_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/local_auth/local_auth_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 186b71557c50..29e413457635 100644 --- a/packages/local_auth/local_auth_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/local_auth/local_auth_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/local_auth/local_auth_android/example/android/build.gradle b/packages/local_auth/local_auth_android/example/android/build.gradle index 54c943621de5..c21bff8e0a2f 100644 --- a/packages/local_auth/local_auth_android/example/android/build.gradle +++ b/packages/local_auth/local_auth_android/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.1' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/local_auth/local_auth_android/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/local_auth/local_auth_android/example/android/gradle/wrapper/gradle-wrapper.properties index cd9fe1c68282..3f383641d7c3 100644 --- a/packages/local_auth/local_auth_android/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/local_auth/local_auth_android/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/local_auth/local_auth_android/pubspec.yaml b/packages/local_auth/local_auth_android/pubspec.yaml index 35c2d3af983c..0cddc94051c3 100644 --- a/packages/local_auth/local_auth_android/pubspec.yaml +++ b/packages/local_auth/local_auth_android/pubspec.yaml @@ -2,7 +2,7 @@ name: local_auth_android description: Android implementation of the local_auth plugin. repository: https://github.com/flutter/plugins/tree/main/packages/local_auth/local_auth_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+local_auth%22 -version: 1.0.13 +version: 1.0.15 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/path_provider/path_provider/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/path_provider/path_provider/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/path_provider/path_provider/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/path_provider/path_provider/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/path_provider/path_provider/example/android/build.gradle b/packages/path_provider/path_provider/example/android/build.gradle index e101ac08df55..c21bff8e0a2f 100644 --- a/packages/path_provider/path_provider/example/android/build.gradle +++ b/packages/path_provider/path_provider/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/path_provider/path_provider/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/path_provider/path_provider/example/android/gradle/wrapper/gradle-wrapper.properties index caf54fa2801c..297f2fec363f 100644 --- a/packages/path_provider/path_provider/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/path_provider/path_provider/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/path_provider/path_provider_android/CHANGELOG.md b/packages/path_provider/path_provider_android/CHANGELOG.md index c36a771d3340..ebd656816ead 100644 --- a/packages/path_provider/path_provider_android/CHANGELOG.md +++ b/packages/path_provider/path_provider_android/CHANGELOG.md @@ -1,7 +1,9 @@ -## NEXT +## 2.0.21 * Updates code for `no_leading_underscores_for_local_identifiers` lint. * Updates minimum Flutter version to 2.10. +* Upgrades `androidx.annotation` version to 1.5.0. +* Upgrades Android Gradle plugin version to 7.3.1. ## 2.0.20 diff --git a/packages/path_provider/path_provider_android/android/build.gradle b/packages/path_provider/path_provider_android/android/build.gradle index 4bfa738ac44c..9661390dbc80 100644 --- a/packages/path_provider/path_provider_android/android/build.gradle +++ b/packages/path_provider/path_provider_android/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:7.3.1' } } @@ -29,6 +29,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + // TODO(stuartmorgan): Enable when gradle is updated. + // disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' } @@ -52,7 +54,7 @@ android { } dependencies { - implementation 'androidx.annotation:annotation:1.1.0' + implementation 'androidx.annotation:annotation:1.5.0' implementation 'com.google.guava:guava:28.1-android' testImplementation 'junit:junit:4.13.2' } diff --git a/packages/path_provider/path_provider_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/path_provider/path_provider_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/path_provider/path_provider_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/path_provider/path_provider_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/path_provider/path_provider_android/example/android/build.gradle b/packages/path_provider/path_provider_android/example/android/build.gradle index e101ac08df55..c21bff8e0a2f 100644 --- a/packages/path_provider/path_provider_android/example/android/build.gradle +++ b/packages/path_provider/path_provider_android/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/path_provider/path_provider_android/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/path_provider/path_provider_android/example/android/gradle/wrapper/gradle-wrapper.properties index caf54fa2801c..297f2fec363f 100644 --- a/packages/path_provider/path_provider_android/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/path_provider/path_provider_android/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/path_provider/path_provider_android/pubspec.yaml b/packages/path_provider/path_provider_android/pubspec.yaml index fba4c32506fe..5d1e6c7b2db6 100644 --- a/packages/path_provider/path_provider_android/pubspec.yaml +++ b/packages/path_provider/path_provider_android/pubspec.yaml @@ -2,7 +2,7 @@ name: path_provider_android description: Android implementation of the path_provider plugin. repository: https://github.com/flutter/plugins/tree/main/packages/path_provider/path_provider_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22 -version: 2.0.20 +version: 2.0.21 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/quick_actions/quick_actions/CHANGELOG.md b/packages/quick_actions/quick_actions/CHANGELOG.md index b8b431490cae..7d1881596255 100644 --- a/packages/quick_actions/quick_actions/CHANGELOG.md +++ b/packages/quick_actions/quick_actions/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1 + +* Updates implementaion package versions to current versions. + ## 1.0.0 * Updates version to 1.0 to reflect current status. diff --git a/packages/quick_actions/quick_actions/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/quick_actions/quick_actions/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/quick_actions/quick_actions/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/quick_actions/quick_actions/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/quick_actions/quick_actions/example/android/build.gradle b/packages/quick_actions/quick_actions/example/android/build.gradle index e101ac08df55..c21bff8e0a2f 100644 --- a/packages/quick_actions/quick_actions/example/android/build.gradle +++ b/packages/quick_actions/quick_actions/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/quick_actions/quick_actions/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/quick_actions/quick_actions/example/android/gradle/wrapper/gradle-wrapper.properties index 019065d1d650..297f2fec363f 100644 --- a/packages/quick_actions/quick_actions/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/quick_actions/quick_actions/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/quick_actions/quick_actions/example/pubspec.yaml b/packages/quick_actions/quick_actions/example/pubspec.yaml index 46be008390d8..1a10a653db06 100644 --- a/packages/quick_actions/quick_actions/example/pubspec.yaml +++ b/packages/quick_actions/quick_actions/example/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: path: ../ dev_dependencies: - espresso: ^0.1.0+2 + espresso: ^0.2.0 flutter_driver: sdk: flutter flutter_test: diff --git a/packages/quick_actions/quick_actions/pubspec.yaml b/packages/quick_actions/quick_actions/pubspec.yaml index 9ce18456969e..08b486fe50e3 100644 --- a/packages/quick_actions/quick_actions/pubspec.yaml +++ b/packages/quick_actions/quick_actions/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for creating shortcuts on home screen, also known as Quick Actions on iOS and App Shortcuts on Android. repository: https://github.com/flutter/plugins/tree/main/packages/quick_actions/quick_actions issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+quick_actions%22 -version: 1.0.0 +version: 1.0.1 environment: sdk: ">=2.14.0 <3.0.0" @@ -20,8 +20,8 @@ flutter: dependencies: flutter: sdk: flutter - quick_actions_android: ^0.6.0+9 - quick_actions_ios: ^0.6.0+9 + quick_actions_android: ^1.0.0 + quick_actions_ios: ^1.0.0 quick_actions_platform_interface: ^1.0.0 dev_dependencies: diff --git a/packages/quick_actions/quick_actions_android/android/build.gradle b/packages/quick_actions/quick_actions_android/android/build.gradle index 8cb1ca327251..e4cdec819ec9 100644 --- a/packages/quick_actions/quick_actions_android/android/build.gradle +++ b/packages/quick_actions/quick_actions_android/android/build.gradle @@ -29,6 +29,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + // TODO(stuartmorgan): Enable when gradle is updated. + // disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' } diff --git a/packages/quick_actions/quick_actions_android/example/android/app/build.gradle b/packages/quick_actions/quick_actions_android/example/android/app/build.gradle index d01dce6dab26..666194bc11b0 100644 --- a/packages/quick_actions/quick_actions_android/example/android/app/build.gradle +++ b/packages/quick_actions/quick_actions_android/example/android/app/build.gradle @@ -27,7 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" def androidXTestVersion = '1.2.0' android { - compileSdkVersion 31 + compileSdkVersion 32 lintOptions { disable 'InvalidPackage' diff --git a/packages/quick_actions/quick_actions_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/quick_actions/quick_actions_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/quick_actions/quick_actions_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/quick_actions/quick_actions_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/quick_actions/quick_actions_android/example/android/app/src/androidTest/java/io/flutter/plugins/quickactionsexample/QuickActionsTest.java b/packages/quick_actions/quick_actions_android/example/android/app/src/androidTest/java/io/flutter/plugins/quickactionsexample/QuickActionsTest.java index 8b50fd7a90eb..cfcef3e1c76f 100644 --- a/packages/quick_actions/quick_actions_android/example/android/app/src/androidTest/java/io/flutter/plugins/quickactionsexample/QuickActionsTest.java +++ b/packages/quick_actions/quick_actions_android/example/android/app/src/androidTest/java/io/flutter/plugins/quickactionsexample/QuickActionsTest.java @@ -28,6 +28,7 @@ import org.junit.After; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -85,6 +86,9 @@ public void appShortcutsAreCreated() { } } + // TODO(bparrishMines): The test is ignored because it fails when ran on Firebase Test Lab. See + // https://github.com/flutter/flutter/issues/114246. + @Ignore @Test public void appShortcutLaunchActivityAfterStarting() { // Arrange diff --git a/packages/quick_actions/quick_actions_android/example/android/build.gradle b/packages/quick_actions/quick_actions_android/example/android/build.gradle index e101ac08df55..c21bff8e0a2f 100644 --- a/packages/quick_actions/quick_actions_android/example/android/build.gradle +++ b/packages/quick_actions/quick_actions_android/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/quick_actions/quick_actions_android/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/quick_actions/quick_actions_android/example/android/gradle/wrapper/gradle-wrapper.properties index 019065d1d650..297f2fec363f 100644 --- a/packages/quick_actions/quick_actions_android/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/quick_actions/quick_actions_android/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/quick_actions/quick_actions_android/example/pubspec.yaml b/packages/quick_actions/quick_actions_android/example/pubspec.yaml index 17d50f5d0829..c560d4dd5f1e 100644 --- a/packages/quick_actions/quick_actions_android/example/pubspec.yaml +++ b/packages/quick_actions/quick_actions_android/example/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: path: ../ dev_dependencies: - espresso: ^0.1.0+2 + espresso: ^0.2.0 flutter_driver: sdk: flutter flutter_test: diff --git a/packages/shared_preferences/shared_preferences_android/CHANGELOG.md b/packages/shared_preferences/shared_preferences_android/CHANGELOG.md index f21af6aff7aa..d9d7bbd82f46 100644 --- a/packages/shared_preferences/shared_preferences_android/CHANGELOG.md +++ b/packages/shared_preferences/shared_preferences_android/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 2.0.14 +* Fixes typo in `SharedPreferencesAndroid` docs. * Updates code for `no_leading_underscores_for_local_identifiers` lint. ## 2.0.13 diff --git a/packages/shared_preferences/shared_preferences_android/android/build.gradle b/packages/shared_preferences/shared_preferences_android/android/build.gradle index bd6adf411077..feae770a475d 100644 --- a/packages/shared_preferences/shared_preferences_android/android/build.gradle +++ b/packages/shared_preferences/shared_preferences_android/android/build.gradle @@ -37,6 +37,7 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' baseline file("lint-baseline.xml") diff --git a/packages/shared_preferences/shared_preferences_android/android/gradle/wrapper/gradle-wrapper.properties b/packages/shared_preferences/shared_preferences_android/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 3c9d0852bfa5..000000000000 --- a/packages/shared_preferences/shared_preferences_android/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/packages/shared_preferences/shared_preferences_android/lib/shared_preferences_android.dart b/packages/shared_preferences/shared_preferences_android/lib/shared_preferences_android.dart index 86f447b8959c..da5147d32da2 100644 --- a/packages/shared_preferences/shared_preferences_android/lib/shared_preferences_android.dart +++ b/packages/shared_preferences/shared_preferences_android/lib/shared_preferences_android.dart @@ -10,7 +10,7 @@ import 'package:shared_preferences_platform_interface/shared_preferences_platfor const MethodChannel _kChannel = MethodChannel('plugins.flutter.io/shared_preferences_android'); -/// The macOS implementation of [SharedPreferencesStorePlatform]. +/// The Android implementation of [SharedPreferencesStorePlatform]. /// /// This class implements the `package:shared_preferences` functionality for Android. class SharedPreferencesAndroid extends SharedPreferencesStorePlatform { diff --git a/packages/shared_preferences/shared_preferences_android/pubspec.yaml b/packages/shared_preferences/shared_preferences_android/pubspec.yaml index 7d7dfa85b71a..7692c114bfce 100644 --- a/packages/shared_preferences/shared_preferences_android/pubspec.yaml +++ b/packages/shared_preferences/shared_preferences_android/pubspec.yaml @@ -2,7 +2,7 @@ name: shared_preferences_android description: Android implementation of the shared_preferences plugin repository: https://github.com/flutter/plugins/tree/main/packages/shared_preferences/shared_preferences_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22 -version: 2.0.13 +version: 2.0.14 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/url_launcher/url_launcher/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/url_launcher/url_launcher/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/url_launcher/url_launcher/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/url_launcher/url_launcher/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/url_launcher/url_launcher/example/android/build.gradle b/packages/url_launcher/url_launcher/example/android/build.gradle index 328175bb6ac5..c21bff8e0a2f 100644 --- a/packages/url_launcher/url_launcher/example/android/build.gradle +++ b/packages/url_launcher/url_launcher/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.2.1' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/url_launcher/url_launcher/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/url_launcher/url_launcher/example/android/gradle/wrapper/gradle-wrapper.properties index 4ae10e927b38..e7c709db2454 100644 --- a/packages/url_launcher/url_launcher/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/url_launcher/url_launcher/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/url_launcher/url_launcher_android/CHANGELOG.md b/packages/url_launcher/url_launcher_android/CHANGELOG.md index c75e93e821a1..934d8da556b7 100644 --- a/packages/url_launcher/url_launcher_android/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_android/CHANGELOG.md @@ -1,3 +1,11 @@ +## 6.0.21 + +* Updates androidx.annotation to 1.2.0. + +## 6.0.20 + +* Updates android gradle plugin to 4.2.0. + ## 6.0.19 * Revert gradle back to 3.4.2. diff --git a/packages/url_launcher/url_launcher_android/android/build.gradle b/packages/url_launcher/url_launcher_android/android/build.gradle index a4fa269cbfc7..dbd68d99c1a2 100644 --- a/packages/url_launcher/url_launcher_android/android/build.gradle +++ b/packages/url_launcher/url_launcher_android/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.4.2' + classpath 'com.android.tools.build:gradle:4.2.0' } } @@ -22,13 +22,14 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 31 + compileSdkVersion 33 defaultConfig { minSdkVersion 16 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' } @@ -48,7 +49,7 @@ android { } dependencies { - compileOnly 'androidx.annotation:annotation:1.0.0' + compileOnly 'androidx.annotation:annotation:1.2.0' testImplementation 'junit:junit:4.13.2' testImplementation 'org.mockito:mockito-core:4.8.0' testImplementation 'androidx.test:core:1.0.0' diff --git a/packages/url_launcher/url_launcher_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/url_launcher/url_launcher_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/url_launcher/url_launcher_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/url_launcher/url_launcher_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/url_launcher/url_launcher_android/example/android/build.gradle b/packages/url_launcher/url_launcher_android/example/android/build.gradle index 328175bb6ac5..c21bff8e0a2f 100644 --- a/packages/url_launcher/url_launcher_android/example/android/build.gradle +++ b/packages/url_launcher/url_launcher_android/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.2.1' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/url_launcher/url_launcher_android/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/url_launcher/url_launcher_android/example/android/gradle/wrapper/gradle-wrapper.properties index 4ae10e927b38..e7c709db2454 100644 --- a/packages/url_launcher/url_launcher_android/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/url_launcher/url_launcher_android/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/url_launcher/url_launcher_android/pubspec.yaml b/packages/url_launcher/url_launcher_android/pubspec.yaml index db2bddcc54c3..e97fde31b2e0 100644 --- a/packages/url_launcher/url_launcher_android/pubspec.yaml +++ b/packages/url_launcher/url_launcher_android/pubspec.yaml @@ -2,7 +2,7 @@ name: url_launcher_android description: Android implementation of the url_launcher plugin. repository: https://github.com/flutter/plugins/tree/main/packages/url_launcher/url_launcher_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22 -version: 6.0.19 +version: 6.0.21 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/url_launcher/url_launcher_web/example/integration_test/url_launcher_web_test.mocks.dart b/packages/url_launcher/url_launcher_web/example/integration_test/url_launcher_web_test.mocks.dart index 36903b0a4250..0717dc7ff478 100644 --- a/packages/url_launcher/url_launcher_web/example/integration_test/url_launcher_web_test.mocks.dart +++ b/packages/url_launcher/url_launcher_web/example/integration_test/url_launcher_web_test.mocks.dart @@ -1,13 +1,15 @@ -// Mocks generated by Mockito 5.0.17 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in regular_integration_tests/integration_test/url_launcher_web_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:html' as _i2; import 'dart:math' as _i4; import 'package:mockito/mockito.dart' as _i1; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -16,40 +18,170 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeDocument_0 extends _i1.Fake implements _i2.Document {} +class _FakeDocument_0 extends _i1.SmartFake implements _i2.Document { + _FakeDocument_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeLocation_1 extends _i1.Fake implements _i2.Location {} +class _FakeLocation_1 extends _i1.SmartFake implements _i2.Location { + _FakeLocation_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeConsole_2 extends _i1.Fake implements _i2.Console {} +class _FakeConsole_2 extends _i1.SmartFake implements _i2.Console { + _FakeConsole_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeHistory_3 extends _i1.Fake implements _i2.History {} +class _FakeHistory_3 extends _i1.SmartFake implements _i2.History { + _FakeHistory_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeStorage_4 extends _i1.Fake implements _i2.Storage {} +class _FakeStorage_4 extends _i1.SmartFake implements _i2.Storage { + _FakeStorage_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeNavigator_5 extends _i1.Fake implements _i2.Navigator {} +class _FakeNavigator_5 extends _i1.SmartFake implements _i2.Navigator { + _FakeNavigator_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakePerformance_6 extends _i1.Fake implements _i2.Performance {} +class _FakePerformance_6 extends _i1.SmartFake implements _i2.Performance { + _FakePerformance_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeEvents_7 extends _i1.Fake implements _i2.Events {} +class _FakeEvents_7 extends _i1.SmartFake implements _i2.Events { + _FakeEvents_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWindowBase_8 extends _i1.Fake implements _i2.WindowBase {} +class _FakeWindowBase_8 extends _i1.SmartFake implements _i2.WindowBase { + _FakeWindowBase_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFileSystem_9 extends _i1.Fake implements _i2.FileSystem {} +class _FakeFileSystem_9 extends _i1.SmartFake implements _i2.FileSystem { + _FakeFileSystem_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeStylePropertyMapReadonly_10 extends _i1.Fake - implements _i2.StylePropertyMapReadonly {} +class _FakeStylePropertyMapReadonly_10 extends _i1.SmartFake + implements _i2.StylePropertyMapReadonly { + _FakeStylePropertyMapReadonly_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeMediaQueryList_11 extends _i1.Fake implements _i2.MediaQueryList {} +class _FakeMediaQueryList_11 extends _i1.SmartFake + implements _i2.MediaQueryList { + _FakeMediaQueryList_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeEntry_12 extends _i1.Fake implements _i2.Entry {} +class _FakeEntry_12 extends _i1.SmartFake implements _i2.Entry { + _FakeEntry_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeGeolocation_13 extends _i1.Fake implements _i2.Geolocation {} +class _FakeGeolocation_13 extends _i1.SmartFake implements _i2.Geolocation { + _FakeGeolocation_13( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeMediaStream_14 extends _i1.Fake implements _i2.MediaStream {} +class _FakeMediaStream_14 extends _i1.SmartFake implements _i2.MediaStream { + _FakeMediaStream_14( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeRelatedApplication_15 extends _i1.Fake - implements _i2.RelatedApplication {} +class _FakeRelatedApplication_15 extends _i1.SmartFake + implements _i2.RelatedApplication { + _FakeRelatedApplication_15( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Window]. /// @@ -60,589 +192,966 @@ class MockWindow extends _i1.Mock implements _i2.Window { } @override - _i3.Future get animationFrame => - (super.noSuchMethod(Invocation.getter(#animationFrame), - returnValue: Future.value(0)) as _i3.Future); - @override - _i2.Document get document => (super.noSuchMethod(Invocation.getter(#document), - returnValue: _FakeDocument_0()) as _i2.Document); - @override - _i2.Location get location => (super.noSuchMethod(Invocation.getter(#location), - returnValue: _FakeLocation_1()) as _i2.Location); - @override - set location(_i2.LocationBase? value) => - super.noSuchMethod(Invocation.setter(#location, value), - returnValueForMissingStub: null); - @override - _i2.Console get console => (super.noSuchMethod(Invocation.getter(#console), - returnValue: _FakeConsole_2()) as _i2.Console); - @override - set defaultStatus(String? value) => - super.noSuchMethod(Invocation.setter(#defaultStatus, value), - returnValueForMissingStub: null); - @override - set defaultstatus(String? value) => - super.noSuchMethod(Invocation.setter(#defaultstatus, value), - returnValueForMissingStub: null); - @override - num get devicePixelRatio => - (super.noSuchMethod(Invocation.getter(#devicePixelRatio), returnValue: 0) - as num); - @override - _i2.History get history => (super.noSuchMethod(Invocation.getter(#history), - returnValue: _FakeHistory_3()) as _i2.History); - @override - _i2.Storage get localStorage => - (super.noSuchMethod(Invocation.getter(#localStorage), - returnValue: _FakeStorage_4()) as _i2.Storage); - @override - set name(String? value) => super.noSuchMethod(Invocation.setter(#name, value), - returnValueForMissingStub: null); - @override - _i2.Navigator get navigator => - (super.noSuchMethod(Invocation.getter(#navigator), - returnValue: _FakeNavigator_5()) as _i2.Navigator); - @override - set opener(_i2.WindowBase? value) => - super.noSuchMethod(Invocation.setter(#opener, value), - returnValueForMissingStub: null); - @override - int get outerHeight => - (super.noSuchMethod(Invocation.getter(#outerHeight), returnValue: 0) - as int); - @override - int get outerWidth => - (super.noSuchMethod(Invocation.getter(#outerWidth), returnValue: 0) - as int); - @override - _i2.Performance get performance => - (super.noSuchMethod(Invocation.getter(#performance), - returnValue: _FakePerformance_6()) as _i2.Performance); - @override - _i2.Storage get sessionStorage => - (super.noSuchMethod(Invocation.getter(#sessionStorage), - returnValue: _FakeStorage_4()) as _i2.Storage); - @override - set status(String? value) => - super.noSuchMethod(Invocation.setter(#status, value), - returnValueForMissingStub: null); - @override - _i3.Stream<_i2.Event> get onContentLoaded => - (super.noSuchMethod(Invocation.getter(#onContentLoaded), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onAbort => - (super.noSuchMethod(Invocation.getter(#onAbort), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onBlur => - (super.noSuchMethod(Invocation.getter(#onBlur), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onCanPlay => - (super.noSuchMethod(Invocation.getter(#onCanPlay), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onCanPlayThrough => - (super.noSuchMethod(Invocation.getter(#onCanPlayThrough), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onChange => - (super.noSuchMethod(Invocation.getter(#onChange), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.MouseEvent> get onClick => - (super.noSuchMethod(Invocation.getter(#onClick), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onContextMenu => - (super.noSuchMethod(Invocation.getter(#onContextMenu), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.Event> get onDoubleClick => - (super.noSuchMethod(Invocation.getter(#onDoubleClick), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.DeviceMotionEvent> get onDeviceMotion => - (super.noSuchMethod(Invocation.getter(#onDeviceMotion), - returnValue: Stream<_i2.DeviceMotionEvent>.empty()) - as _i3.Stream<_i2.DeviceMotionEvent>); + _i3.Future get animationFrame => (super.noSuchMethod( + Invocation.getter(#animationFrame), + returnValue: _i3.Future.value(0), + ) as _i3.Future); + @override + _i2.Document get document => (super.noSuchMethod( + Invocation.getter(#document), + returnValue: _FakeDocument_0( + this, + Invocation.getter(#document), + ), + ) as _i2.Document); + @override + _i2.Location get location => (super.noSuchMethod( + Invocation.getter(#location), + returnValue: _FakeLocation_1( + this, + Invocation.getter(#location), + ), + ) as _i2.Location); + @override + set location(_i2.LocationBase? value) => super.noSuchMethod( + Invocation.setter( + #location, + value, + ), + returnValueForMissingStub: null, + ); + @override + _i2.Console get console => (super.noSuchMethod( + Invocation.getter(#console), + returnValue: _FakeConsole_2( + this, + Invocation.getter(#console), + ), + ) as _i2.Console); + @override + set defaultStatus(String? value) => super.noSuchMethod( + Invocation.setter( + #defaultStatus, + value, + ), + returnValueForMissingStub: null, + ); + @override + set defaultstatus(String? value) => super.noSuchMethod( + Invocation.setter( + #defaultstatus, + value, + ), + returnValueForMissingStub: null, + ); + @override + num get devicePixelRatio => (super.noSuchMethod( + Invocation.getter(#devicePixelRatio), + returnValue: 0, + ) as num); + @override + _i2.History get history => (super.noSuchMethod( + Invocation.getter(#history), + returnValue: _FakeHistory_3( + this, + Invocation.getter(#history), + ), + ) as _i2.History); + @override + _i2.Storage get localStorage => (super.noSuchMethod( + Invocation.getter(#localStorage), + returnValue: _FakeStorage_4( + this, + Invocation.getter(#localStorage), + ), + ) as _i2.Storage); + @override + set name(String? value) => super.noSuchMethod( + Invocation.setter( + #name, + value, + ), + returnValueForMissingStub: null, + ); + @override + _i2.Navigator get navigator => (super.noSuchMethod( + Invocation.getter(#navigator), + returnValue: _FakeNavigator_5( + this, + Invocation.getter(#navigator), + ), + ) as _i2.Navigator); + @override + set opener(_i2.WindowBase? value) => super.noSuchMethod( + Invocation.setter( + #opener, + value, + ), + returnValueForMissingStub: null, + ); + @override + int get outerHeight => (super.noSuchMethod( + Invocation.getter(#outerHeight), + returnValue: 0, + ) as int); + @override + int get outerWidth => (super.noSuchMethod( + Invocation.getter(#outerWidth), + returnValue: 0, + ) as int); + @override + _i2.Performance get performance => (super.noSuchMethod( + Invocation.getter(#performance), + returnValue: _FakePerformance_6( + this, + Invocation.getter(#performance), + ), + ) as _i2.Performance); + @override + _i2.Storage get sessionStorage => (super.noSuchMethod( + Invocation.getter(#sessionStorage), + returnValue: _FakeStorage_4( + this, + Invocation.getter(#sessionStorage), + ), + ) as _i2.Storage); + @override + set status(String? value) => super.noSuchMethod( + Invocation.setter( + #status, + value, + ), + returnValueForMissingStub: null, + ); + @override + _i3.Stream<_i2.Event> get onContentLoaded => (super.noSuchMethod( + Invocation.getter(#onContentLoaded), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onAbort => (super.noSuchMethod( + Invocation.getter(#onAbort), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onBlur => (super.noSuchMethod( + Invocation.getter(#onBlur), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onCanPlay => (super.noSuchMethod( + Invocation.getter(#onCanPlay), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onCanPlayThrough => (super.noSuchMethod( + Invocation.getter(#onCanPlayThrough), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onChange => (super.noSuchMethod( + Invocation.getter(#onChange), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.MouseEvent> get onClick => (super.noSuchMethod( + Invocation.getter(#onClick), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onContextMenu => (super.noSuchMethod( + Invocation.getter(#onContextMenu), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.Event> get onDoubleClick => (super.noSuchMethod( + Invocation.getter(#onDoubleClick), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.DeviceMotionEvent> get onDeviceMotion => (super.noSuchMethod( + Invocation.getter(#onDeviceMotion), + returnValue: _i3.Stream<_i2.DeviceMotionEvent>.empty(), + ) as _i3.Stream<_i2.DeviceMotionEvent>); @override _i3.Stream<_i2.DeviceOrientationEvent> get onDeviceOrientation => - (super.noSuchMethod(Invocation.getter(#onDeviceOrientation), - returnValue: Stream<_i2.DeviceOrientationEvent>.empty()) - as _i3.Stream<_i2.DeviceOrientationEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onDrag => - (super.noSuchMethod(Invocation.getter(#onDrag), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onDragEnd => - (super.noSuchMethod(Invocation.getter(#onDragEnd), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onDragEnter => - (super.noSuchMethod(Invocation.getter(#onDragEnter), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onDragLeave => - (super.noSuchMethod(Invocation.getter(#onDragLeave), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onDragOver => - (super.noSuchMethod(Invocation.getter(#onDragOver), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onDragStart => - (super.noSuchMethod(Invocation.getter(#onDragStart), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onDrop => - (super.noSuchMethod(Invocation.getter(#onDrop), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.Event> get onDurationChange => - (super.noSuchMethod(Invocation.getter(#onDurationChange), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onEmptied => - (super.noSuchMethod(Invocation.getter(#onEmptied), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onEnded => - (super.noSuchMethod(Invocation.getter(#onEnded), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onError => - (super.noSuchMethod(Invocation.getter(#onError), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onFocus => - (super.noSuchMethod(Invocation.getter(#onFocus), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onHashChange => - (super.noSuchMethod(Invocation.getter(#onHashChange), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onInput => - (super.noSuchMethod(Invocation.getter(#onInput), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onInvalid => - (super.noSuchMethod(Invocation.getter(#onInvalid), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.KeyboardEvent> get onKeyDown => - (super.noSuchMethod(Invocation.getter(#onKeyDown), - returnValue: Stream<_i2.KeyboardEvent>.empty()) - as _i3.Stream<_i2.KeyboardEvent>); - @override - _i3.Stream<_i2.KeyboardEvent> get onKeyPress => - (super.noSuchMethod(Invocation.getter(#onKeyPress), - returnValue: Stream<_i2.KeyboardEvent>.empty()) - as _i3.Stream<_i2.KeyboardEvent>); - @override - _i3.Stream<_i2.KeyboardEvent> get onKeyUp => - (super.noSuchMethod(Invocation.getter(#onKeyUp), - returnValue: Stream<_i2.KeyboardEvent>.empty()) - as _i3.Stream<_i2.KeyboardEvent>); - @override - _i3.Stream<_i2.Event> get onLoad => - (super.noSuchMethod(Invocation.getter(#onLoad), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onLoadedData => - (super.noSuchMethod(Invocation.getter(#onLoadedData), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onLoadedMetadata => - (super.noSuchMethod(Invocation.getter(#onLoadedMetadata), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onLoadStart => - (super.noSuchMethod(Invocation.getter(#onLoadStart), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.MessageEvent> get onMessage => - (super.noSuchMethod(Invocation.getter(#onMessage), - returnValue: Stream<_i2.MessageEvent>.empty()) - as _i3.Stream<_i2.MessageEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onMouseDown => - (super.noSuchMethod(Invocation.getter(#onMouseDown), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onMouseEnter => - (super.noSuchMethod(Invocation.getter(#onMouseEnter), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onMouseLeave => - (super.noSuchMethod(Invocation.getter(#onMouseLeave), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onMouseMove => - (super.noSuchMethod(Invocation.getter(#onMouseMove), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onMouseOut => - (super.noSuchMethod(Invocation.getter(#onMouseOut), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onMouseOver => - (super.noSuchMethod(Invocation.getter(#onMouseOver), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.MouseEvent> get onMouseUp => - (super.noSuchMethod(Invocation.getter(#onMouseUp), - returnValue: Stream<_i2.MouseEvent>.empty()) - as _i3.Stream<_i2.MouseEvent>); - @override - _i3.Stream<_i2.WheelEvent> get onMouseWheel => - (super.noSuchMethod(Invocation.getter(#onMouseWheel), - returnValue: Stream<_i2.WheelEvent>.empty()) - as _i3.Stream<_i2.WheelEvent>); - @override - _i3.Stream<_i2.Event> get onOffline => - (super.noSuchMethod(Invocation.getter(#onOffline), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onOnline => - (super.noSuchMethod(Invocation.getter(#onOnline), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onPageHide => - (super.noSuchMethod(Invocation.getter(#onPageHide), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onPageShow => - (super.noSuchMethod(Invocation.getter(#onPageShow), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onPause => - (super.noSuchMethod(Invocation.getter(#onPause), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onPlay => - (super.noSuchMethod(Invocation.getter(#onPlay), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onPlaying => - (super.noSuchMethod(Invocation.getter(#onPlaying), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.PopStateEvent> get onPopState => - (super.noSuchMethod(Invocation.getter(#onPopState), - returnValue: Stream<_i2.PopStateEvent>.empty()) - as _i3.Stream<_i2.PopStateEvent>); - @override - _i3.Stream<_i2.Event> get onProgress => - (super.noSuchMethod(Invocation.getter(#onProgress), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onRateChange => - (super.noSuchMethod(Invocation.getter(#onRateChange), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onReset => - (super.noSuchMethod(Invocation.getter(#onReset), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onResize => - (super.noSuchMethod(Invocation.getter(#onResize), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onScroll => - (super.noSuchMethod(Invocation.getter(#onScroll), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onSearch => - (super.noSuchMethod(Invocation.getter(#onSearch), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onSeeked => - (super.noSuchMethod(Invocation.getter(#onSeeked), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onSeeking => - (super.noSuchMethod(Invocation.getter(#onSeeking), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onSelect => - (super.noSuchMethod(Invocation.getter(#onSelect), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onStalled => - (super.noSuchMethod(Invocation.getter(#onStalled), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.StorageEvent> get onStorage => - (super.noSuchMethod(Invocation.getter(#onStorage), - returnValue: Stream<_i2.StorageEvent>.empty()) - as _i3.Stream<_i2.StorageEvent>); - @override - _i3.Stream<_i2.Event> get onSubmit => - (super.noSuchMethod(Invocation.getter(#onSubmit), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onSuspend => - (super.noSuchMethod(Invocation.getter(#onSuspend), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onTimeUpdate => - (super.noSuchMethod(Invocation.getter(#onTimeUpdate), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.TouchEvent> get onTouchCancel => - (super.noSuchMethod(Invocation.getter(#onTouchCancel), - returnValue: Stream<_i2.TouchEvent>.empty()) - as _i3.Stream<_i2.TouchEvent>); - @override - _i3.Stream<_i2.TouchEvent> get onTouchEnd => - (super.noSuchMethod(Invocation.getter(#onTouchEnd), - returnValue: Stream<_i2.TouchEvent>.empty()) - as _i3.Stream<_i2.TouchEvent>); - @override - _i3.Stream<_i2.TouchEvent> get onTouchMove => - (super.noSuchMethod(Invocation.getter(#onTouchMove), - returnValue: Stream<_i2.TouchEvent>.empty()) - as _i3.Stream<_i2.TouchEvent>); - @override - _i3.Stream<_i2.TouchEvent> get onTouchStart => - (super.noSuchMethod(Invocation.getter(#onTouchStart), - returnValue: Stream<_i2.TouchEvent>.empty()) - as _i3.Stream<_i2.TouchEvent>); - @override - _i3.Stream<_i2.TransitionEvent> get onTransitionEnd => - (super.noSuchMethod(Invocation.getter(#onTransitionEnd), - returnValue: Stream<_i2.TransitionEvent>.empty()) - as _i3.Stream<_i2.TransitionEvent>); - @override - _i3.Stream<_i2.Event> get onUnload => - (super.noSuchMethod(Invocation.getter(#onUnload), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onVolumeChange => - (super.noSuchMethod(Invocation.getter(#onVolumeChange), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.Event> get onWaiting => - (super.noSuchMethod(Invocation.getter(#onWaiting), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.AnimationEvent> get onAnimationEnd => - (super.noSuchMethod(Invocation.getter(#onAnimationEnd), - returnValue: Stream<_i2.AnimationEvent>.empty()) - as _i3.Stream<_i2.AnimationEvent>); + (super.noSuchMethod( + Invocation.getter(#onDeviceOrientation), + returnValue: _i3.Stream<_i2.DeviceOrientationEvent>.empty(), + ) as _i3.Stream<_i2.DeviceOrientationEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onDrag => (super.noSuchMethod( + Invocation.getter(#onDrag), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onDragEnd => (super.noSuchMethod( + Invocation.getter(#onDragEnd), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onDragEnter => (super.noSuchMethod( + Invocation.getter(#onDragEnter), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onDragLeave => (super.noSuchMethod( + Invocation.getter(#onDragLeave), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onDragOver => (super.noSuchMethod( + Invocation.getter(#onDragOver), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onDragStart => (super.noSuchMethod( + Invocation.getter(#onDragStart), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onDrop => (super.noSuchMethod( + Invocation.getter(#onDrop), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.Event> get onDurationChange => (super.noSuchMethod( + Invocation.getter(#onDurationChange), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onEmptied => (super.noSuchMethod( + Invocation.getter(#onEmptied), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onEnded => (super.noSuchMethod( + Invocation.getter(#onEnded), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onError => (super.noSuchMethod( + Invocation.getter(#onError), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onFocus => (super.noSuchMethod( + Invocation.getter(#onFocus), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onHashChange => (super.noSuchMethod( + Invocation.getter(#onHashChange), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onInput => (super.noSuchMethod( + Invocation.getter(#onInput), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onInvalid => (super.noSuchMethod( + Invocation.getter(#onInvalid), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.KeyboardEvent> get onKeyDown => (super.noSuchMethod( + Invocation.getter(#onKeyDown), + returnValue: _i3.Stream<_i2.KeyboardEvent>.empty(), + ) as _i3.Stream<_i2.KeyboardEvent>); + @override + _i3.Stream<_i2.KeyboardEvent> get onKeyPress => (super.noSuchMethod( + Invocation.getter(#onKeyPress), + returnValue: _i3.Stream<_i2.KeyboardEvent>.empty(), + ) as _i3.Stream<_i2.KeyboardEvent>); + @override + _i3.Stream<_i2.KeyboardEvent> get onKeyUp => (super.noSuchMethod( + Invocation.getter(#onKeyUp), + returnValue: _i3.Stream<_i2.KeyboardEvent>.empty(), + ) as _i3.Stream<_i2.KeyboardEvent>); + @override + _i3.Stream<_i2.Event> get onLoad => (super.noSuchMethod( + Invocation.getter(#onLoad), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onLoadedData => (super.noSuchMethod( + Invocation.getter(#onLoadedData), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onLoadedMetadata => (super.noSuchMethod( + Invocation.getter(#onLoadedMetadata), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onLoadStart => (super.noSuchMethod( + Invocation.getter(#onLoadStart), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.MessageEvent> get onMessage => (super.noSuchMethod( + Invocation.getter(#onMessage), + returnValue: _i3.Stream<_i2.MessageEvent>.empty(), + ) as _i3.Stream<_i2.MessageEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onMouseDown => (super.noSuchMethod( + Invocation.getter(#onMouseDown), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onMouseEnter => (super.noSuchMethod( + Invocation.getter(#onMouseEnter), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onMouseLeave => (super.noSuchMethod( + Invocation.getter(#onMouseLeave), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onMouseMove => (super.noSuchMethod( + Invocation.getter(#onMouseMove), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onMouseOut => (super.noSuchMethod( + Invocation.getter(#onMouseOut), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onMouseOver => (super.noSuchMethod( + Invocation.getter(#onMouseOver), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.MouseEvent> get onMouseUp => (super.noSuchMethod( + Invocation.getter(#onMouseUp), + returnValue: _i3.Stream<_i2.MouseEvent>.empty(), + ) as _i3.Stream<_i2.MouseEvent>); + @override + _i3.Stream<_i2.WheelEvent> get onMouseWheel => (super.noSuchMethod( + Invocation.getter(#onMouseWheel), + returnValue: _i3.Stream<_i2.WheelEvent>.empty(), + ) as _i3.Stream<_i2.WheelEvent>); + @override + _i3.Stream<_i2.Event> get onOffline => (super.noSuchMethod( + Invocation.getter(#onOffline), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onOnline => (super.noSuchMethod( + Invocation.getter(#onOnline), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onPageHide => (super.noSuchMethod( + Invocation.getter(#onPageHide), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onPageShow => (super.noSuchMethod( + Invocation.getter(#onPageShow), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onPause => (super.noSuchMethod( + Invocation.getter(#onPause), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onPlay => (super.noSuchMethod( + Invocation.getter(#onPlay), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onPlaying => (super.noSuchMethod( + Invocation.getter(#onPlaying), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.PopStateEvent> get onPopState => (super.noSuchMethod( + Invocation.getter(#onPopState), + returnValue: _i3.Stream<_i2.PopStateEvent>.empty(), + ) as _i3.Stream<_i2.PopStateEvent>); + @override + _i3.Stream<_i2.Event> get onProgress => (super.noSuchMethod( + Invocation.getter(#onProgress), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onRateChange => (super.noSuchMethod( + Invocation.getter(#onRateChange), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onReset => (super.noSuchMethod( + Invocation.getter(#onReset), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onResize => (super.noSuchMethod( + Invocation.getter(#onResize), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onScroll => (super.noSuchMethod( + Invocation.getter(#onScroll), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onSearch => (super.noSuchMethod( + Invocation.getter(#onSearch), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onSeeked => (super.noSuchMethod( + Invocation.getter(#onSeeked), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onSeeking => (super.noSuchMethod( + Invocation.getter(#onSeeking), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onSelect => (super.noSuchMethod( + Invocation.getter(#onSelect), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onStalled => (super.noSuchMethod( + Invocation.getter(#onStalled), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.StorageEvent> get onStorage => (super.noSuchMethod( + Invocation.getter(#onStorage), + returnValue: _i3.Stream<_i2.StorageEvent>.empty(), + ) as _i3.Stream<_i2.StorageEvent>); + @override + _i3.Stream<_i2.Event> get onSubmit => (super.noSuchMethod( + Invocation.getter(#onSubmit), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onSuspend => (super.noSuchMethod( + Invocation.getter(#onSuspend), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onTimeUpdate => (super.noSuchMethod( + Invocation.getter(#onTimeUpdate), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.TouchEvent> get onTouchCancel => (super.noSuchMethod( + Invocation.getter(#onTouchCancel), + returnValue: _i3.Stream<_i2.TouchEvent>.empty(), + ) as _i3.Stream<_i2.TouchEvent>); + @override + _i3.Stream<_i2.TouchEvent> get onTouchEnd => (super.noSuchMethod( + Invocation.getter(#onTouchEnd), + returnValue: _i3.Stream<_i2.TouchEvent>.empty(), + ) as _i3.Stream<_i2.TouchEvent>); + @override + _i3.Stream<_i2.TouchEvent> get onTouchMove => (super.noSuchMethod( + Invocation.getter(#onTouchMove), + returnValue: _i3.Stream<_i2.TouchEvent>.empty(), + ) as _i3.Stream<_i2.TouchEvent>); + @override + _i3.Stream<_i2.TouchEvent> get onTouchStart => (super.noSuchMethod( + Invocation.getter(#onTouchStart), + returnValue: _i3.Stream<_i2.TouchEvent>.empty(), + ) as _i3.Stream<_i2.TouchEvent>); + @override + _i3.Stream<_i2.TransitionEvent> get onTransitionEnd => (super.noSuchMethod( + Invocation.getter(#onTransitionEnd), + returnValue: _i3.Stream<_i2.TransitionEvent>.empty(), + ) as _i3.Stream<_i2.TransitionEvent>); + @override + _i3.Stream<_i2.Event> get onUnload => (super.noSuchMethod( + Invocation.getter(#onUnload), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onVolumeChange => (super.noSuchMethod( + Invocation.getter(#onVolumeChange), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.Event> get onWaiting => (super.noSuchMethod( + Invocation.getter(#onWaiting), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.AnimationEvent> get onAnimationEnd => (super.noSuchMethod( + Invocation.getter(#onAnimationEnd), + returnValue: _i3.Stream<_i2.AnimationEvent>.empty(), + ) as _i3.Stream<_i2.AnimationEvent>); @override _i3.Stream<_i2.AnimationEvent> get onAnimationIteration => - (super.noSuchMethod(Invocation.getter(#onAnimationIteration), - returnValue: Stream<_i2.AnimationEvent>.empty()) - as _i3.Stream<_i2.AnimationEvent>); - @override - _i3.Stream<_i2.AnimationEvent> get onAnimationStart => - (super.noSuchMethod(Invocation.getter(#onAnimationStart), - returnValue: Stream<_i2.AnimationEvent>.empty()) - as _i3.Stream<_i2.AnimationEvent>); - @override - _i3.Stream<_i2.Event> get onBeforeUnload => - (super.noSuchMethod(Invocation.getter(#onBeforeUnload), - returnValue: Stream<_i2.Event>.empty()) as _i3.Stream<_i2.Event>); - @override - _i3.Stream<_i2.WheelEvent> get onWheel => - (super.noSuchMethod(Invocation.getter(#onWheel), - returnValue: Stream<_i2.WheelEvent>.empty()) - as _i3.Stream<_i2.WheelEvent>); - @override - int get pageXOffset => - (super.noSuchMethod(Invocation.getter(#pageXOffset), returnValue: 0) - as int); - @override - int get pageYOffset => - (super.noSuchMethod(Invocation.getter(#pageYOffset), returnValue: 0) - as int); - @override - int get scrollX => - (super.noSuchMethod(Invocation.getter(#scrollX), returnValue: 0) as int); - @override - int get scrollY => - (super.noSuchMethod(Invocation.getter(#scrollY), returnValue: 0) as int); - @override - _i2.Events get on => - (super.noSuchMethod(Invocation.getter(#on), returnValue: _FakeEvents_7()) - as _i2.Events); - @override - _i2.WindowBase open(String? url, String? name, [String? options]) => - (super.noSuchMethod(Invocation.method(#open, [url, name, options]), - returnValue: _FakeWindowBase_8()) as _i2.WindowBase); + (super.noSuchMethod( + Invocation.getter(#onAnimationIteration), + returnValue: _i3.Stream<_i2.AnimationEvent>.empty(), + ) as _i3.Stream<_i2.AnimationEvent>); + @override + _i3.Stream<_i2.AnimationEvent> get onAnimationStart => (super.noSuchMethod( + Invocation.getter(#onAnimationStart), + returnValue: _i3.Stream<_i2.AnimationEvent>.empty(), + ) as _i3.Stream<_i2.AnimationEvent>); + @override + _i3.Stream<_i2.Event> get onBeforeUnload => (super.noSuchMethod( + Invocation.getter(#onBeforeUnload), + returnValue: _i3.Stream<_i2.Event>.empty(), + ) as _i3.Stream<_i2.Event>); + @override + _i3.Stream<_i2.WheelEvent> get onWheel => (super.noSuchMethod( + Invocation.getter(#onWheel), + returnValue: _i3.Stream<_i2.WheelEvent>.empty(), + ) as _i3.Stream<_i2.WheelEvent>); + @override + int get pageXOffset => (super.noSuchMethod( + Invocation.getter(#pageXOffset), + returnValue: 0, + ) as int); + @override + int get pageYOffset => (super.noSuchMethod( + Invocation.getter(#pageYOffset), + returnValue: 0, + ) as int); + @override + int get scrollX => (super.noSuchMethod( + Invocation.getter(#scrollX), + returnValue: 0, + ) as int); + @override + int get scrollY => (super.noSuchMethod( + Invocation.getter(#scrollY), + returnValue: 0, + ) as int); + @override + _i2.Events get on => (super.noSuchMethod( + Invocation.getter(#on), + returnValue: _FakeEvents_7( + this, + Invocation.getter(#on), + ), + ) as _i2.Events); + @override + _i2.WindowBase open( + String? url, + String? name, [ + String? options, + ]) => + (super.noSuchMethod( + Invocation.method( + #open, + [ + url, + name, + options, + ], + ), + returnValue: _FakeWindowBase_8( + this, + Invocation.method( + #open, + [ + url, + name, + options, + ], + ), + ), + ) as _i2.WindowBase); @override int requestAnimationFrame(_i2.FrameRequestCallback? callback) => - (super.noSuchMethod(Invocation.method(#requestAnimationFrame, [callback]), - returnValue: 0) as int); - @override - void cancelAnimationFrame(int? id) => - super.noSuchMethod(Invocation.method(#cancelAnimationFrame, [id]), - returnValueForMissingStub: null); - @override - _i3.Future<_i2.FileSystem> requestFileSystem(int? size, - {bool? persistent = false}) => (super.noSuchMethod( - Invocation.method( - #requestFileSystem, [size], {#persistent: persistent}), - returnValue: Future<_i2.FileSystem>.value(_FakeFileSystem_9())) - as _i3.Future<_i2.FileSystem>); - @override - void alert([String? message]) => - super.noSuchMethod(Invocation.method(#alert, [message]), - returnValueForMissingStub: null); - @override - void cancelIdleCallback(int? handle) => - super.noSuchMethod(Invocation.method(#cancelIdleCallback, [handle]), - returnValueForMissingStub: null); - @override - void close() => super.noSuchMethod(Invocation.method(#close, []), - returnValueForMissingStub: null); - @override - bool confirm([String? message]) => - (super.noSuchMethod(Invocation.method(#confirm, [message]), - returnValue: false) as bool); - @override - _i3.Future fetch(dynamic input, [Map? init]) => - (super.noSuchMethod(Invocation.method(#fetch, [input, init]), - returnValue: Future.value()) as _i3.Future); - @override - bool find(String? string, bool? caseSensitive, bool? backwards, bool? wrap, - bool? wholeWord, bool? searchInFrames, bool? showDialog) => + Invocation.method( + #requestAnimationFrame, + [callback], + ), + returnValue: 0, + ) as int); + @override + void cancelAnimationFrame(int? id) => super.noSuchMethod( + Invocation.method( + #cancelAnimationFrame, + [id], + ), + returnValueForMissingStub: null, + ); + @override + _i3.Future<_i2.FileSystem> requestFileSystem( + int? size, { + bool? persistent = false, + }) => + (super.noSuchMethod( + Invocation.method( + #requestFileSystem, + [size], + {#persistent: persistent}, + ), + returnValue: _i3.Future<_i2.FileSystem>.value(_FakeFileSystem_9( + this, + Invocation.method( + #requestFileSystem, + [size], + {#persistent: persistent}, + ), + )), + ) as _i3.Future<_i2.FileSystem>); + @override + void alert([String? message]) => super.noSuchMethod( + Invocation.method( + #alert, + [message], + ), + returnValueForMissingStub: null, + ); + @override + void cancelIdleCallback(int? handle) => super.noSuchMethod( + Invocation.method( + #cancelIdleCallback, + [handle], + ), + returnValueForMissingStub: null, + ); + @override + void close() => super.noSuchMethod( + Invocation.method( + #close, + [], + ), + returnValueForMissingStub: null, + ); + @override + bool confirm([String? message]) => (super.noSuchMethod( + Invocation.method( + #confirm, + [message], + ), + returnValue: false, + ) as bool); + @override + _i3.Future fetch( + dynamic input, [ + Map? init, + ]) => + (super.noSuchMethod( + Invocation.method( + #fetch, + [ + input, + init, + ], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + @override + bool find( + String? string, + bool? caseSensitive, + bool? backwards, + bool? wrap, + bool? wholeWord, + bool? searchInFrames, + bool? showDialog, + ) => (super.noSuchMethod( - Invocation.method(#find, [ + Invocation.method( + #find, + [ string, caseSensitive, backwards, wrap, wholeWord, searchInFrames, - showDialog - ]), - returnValue: false) as bool); + showDialog, + ], + ), + returnValue: false, + ) as bool); @override _i2.StylePropertyMapReadonly getComputedStyleMap( - _i2.Element? element, String? pseudoElement) => + _i2.Element? element, + String? pseudoElement, + ) => (super.noSuchMethod( - Invocation.method(#getComputedStyleMap, [element, pseudoElement]), - returnValue: _FakeStylePropertyMapReadonly_10()) - as _i2.StylePropertyMapReadonly); + Invocation.method( + #getComputedStyleMap, + [ + element, + pseudoElement, + ], + ), + returnValue: _FakeStylePropertyMapReadonly_10( + this, + Invocation.method( + #getComputedStyleMap, + [ + element, + pseudoElement, + ], + ), + ), + ) as _i2.StylePropertyMapReadonly); @override List<_i2.CssRule> getMatchedCssRules( - _i2.Element? element, String? pseudoElement) => + _i2.Element? element, + String? pseudoElement, + ) => (super.noSuchMethod( - Invocation.method(#getMatchedCssRules, [element, pseudoElement]), - returnValue: <_i2.CssRule>[]) as List<_i2.CssRule>); - @override - _i2.MediaQueryList matchMedia(String? query) => - (super.noSuchMethod(Invocation.method(#matchMedia, [query]), - returnValue: _FakeMediaQueryList_11()) as _i2.MediaQueryList); - @override - void moveBy(int? x, int? y) => - super.noSuchMethod(Invocation.method(#moveBy, [x, y]), - returnValueForMissingStub: null); - @override - void postMessage(dynamic message, String? targetOrigin, - [List? transfer]) => + Invocation.method( + #getMatchedCssRules, + [ + element, + pseudoElement, + ], + ), + returnValue: <_i2.CssRule>[], + ) as List<_i2.CssRule>); + @override + _i2.MediaQueryList matchMedia(String? query) => (super.noSuchMethod( + Invocation.method( + #matchMedia, + [query], + ), + returnValue: _FakeMediaQueryList_11( + this, + Invocation.method( + #matchMedia, + [query], + ), + ), + ) as _i2.MediaQueryList); + @override + void moveBy( + int? x, + int? y, + ) => super.noSuchMethod( - Invocation.method(#postMessage, [message, targetOrigin, transfer]), - returnValueForMissingStub: null); - @override - void print() => super.noSuchMethod(Invocation.method(#print, []), - returnValueForMissingStub: null); - @override - int requestIdleCallback(_i2.IdleRequestCallback? callback, - [Map? options]) => + Invocation.method( + #moveBy, + [ + x, + y, + ], + ), + returnValueForMissingStub: null, + ); + @override + void postMessage( + dynamic message, + String? targetOrigin, [ + List? transfer, + ]) => + super.noSuchMethod( + Invocation.method( + #postMessage, + [ + message, + targetOrigin, + transfer, + ], + ), + returnValueForMissingStub: null, + ); + @override + void print() => super.noSuchMethod( + Invocation.method( + #print, + [], + ), + returnValueForMissingStub: null, + ); + @override + int requestIdleCallback( + _i2.IdleRequestCallback? callback, [ + Map? options, + ]) => (super.noSuchMethod( - Invocation.method(#requestIdleCallback, [callback, options]), - returnValue: 0) as int); - @override - void resizeBy(int? x, int? y) => - super.noSuchMethod(Invocation.method(#resizeBy, [x, y]), - returnValueForMissingStub: null); - @override - void resizeTo(int? x, int? y) => - super.noSuchMethod(Invocation.method(#resizeTo, [x, y]), - returnValueForMissingStub: null); - @override - void scroll( - [dynamic options_OR_x, - dynamic y, - Map? scrollOptions]) => + Invocation.method( + #requestIdleCallback, + [ + callback, + options, + ], + ), + returnValue: 0, + ) as int); + @override + void resizeBy( + int? x, + int? y, + ) => super.noSuchMethod( - Invocation.method(#scroll, [options_OR_x, y, scrollOptions]), - returnValueForMissingStub: null); - @override - void scrollBy( - [dynamic options_OR_x, - dynamic y, - Map? scrollOptions]) => + Invocation.method( + #resizeBy, + [ + x, + y, + ], + ), + returnValueForMissingStub: null, + ); + @override + void resizeTo( + int? x, + int? y, + ) => super.noSuchMethod( - Invocation.method(#scrollBy, [options_OR_x, y, scrollOptions]), - returnValueForMissingStub: null); - @override - void scrollTo( - [dynamic options_OR_x, - dynamic y, - Map? scrollOptions]) => + Invocation.method( + #resizeTo, + [ + x, + y, + ], + ), + returnValueForMissingStub: null, + ); + @override + void scroll([ + dynamic options_OR_x, + dynamic y, + Map? scrollOptions, + ]) => super.noSuchMethod( - Invocation.method(#scrollTo, [options_OR_x, y, scrollOptions]), - returnValueForMissingStub: null); - @override - void stop() => super.noSuchMethod(Invocation.method(#stop, []), - returnValueForMissingStub: null); + Invocation.method( + #scroll, + [ + options_OR_x, + y, + scrollOptions, + ], + ), + returnValueForMissingStub: null, + ); + @override + void scrollBy([ + dynamic options_OR_x, + dynamic y, + Map? scrollOptions, + ]) => + super.noSuchMethod( + Invocation.method( + #scrollBy, + [ + options_OR_x, + y, + scrollOptions, + ], + ), + returnValueForMissingStub: null, + ); + @override + void scrollTo([ + dynamic options_OR_x, + dynamic y, + Map? scrollOptions, + ]) => + super.noSuchMethod( + Invocation.method( + #scrollTo, + [ + options_OR_x, + y, + scrollOptions, + ], + ), + returnValueForMissingStub: null, + ); + @override + void stop() => super.noSuchMethod( + Invocation.method( + #stop, + [], + ), + returnValueForMissingStub: null, + ); @override _i3.Future<_i2.Entry> resolveLocalFileSystemUrl(String? url) => - (super.noSuchMethod(Invocation.method(#resolveLocalFileSystemUrl, [url]), - returnValue: Future<_i2.Entry>.value(_FakeEntry_12())) - as _i3.Future<_i2.Entry>); - @override - String atob(String? atob) => - (super.noSuchMethod(Invocation.method(#atob, [atob]), returnValue: '') - as String); - @override - String btoa(String? btoa) => - (super.noSuchMethod(Invocation.method(#btoa, [btoa]), returnValue: '') - as String); - @override - void moveTo(_i4.Point? p) => - super.noSuchMethod(Invocation.method(#moveTo, [p]), - returnValueForMissingStub: null); - @override - void addEventListener(String? type, _i2.EventListener? listener, - [bool? useCapture]) => + (super.noSuchMethod( + Invocation.method( + #resolveLocalFileSystemUrl, + [url], + ), + returnValue: _i3.Future<_i2.Entry>.value(_FakeEntry_12( + this, + Invocation.method( + #resolveLocalFileSystemUrl, + [url], + ), + )), + ) as _i3.Future<_i2.Entry>); + @override + String atob(String? atob) => (super.noSuchMethod( + Invocation.method( + #atob, + [atob], + ), + returnValue: '', + ) as String); + @override + String btoa(String? btoa) => (super.noSuchMethod( + Invocation.method( + #btoa, + [btoa], + ), + returnValue: '', + ) as String); + @override + void moveTo(_i4.Point? p) => super.noSuchMethod( + Invocation.method( + #moveTo, + [p], + ), + returnValueForMissingStub: null, + ); + @override + void addEventListener( + String? type, + _i2.EventListener? listener, [ + bool? useCapture, + ]) => super.noSuchMethod( - Invocation.method(#addEventListener, [type, listener, useCapture]), - returnValueForMissingStub: null); - @override - void removeEventListener(String? type, _i2.EventListener? listener, - [bool? useCapture]) => + Invocation.method( + #addEventListener, + [ + type, + listener, + useCapture, + ], + ), + returnValueForMissingStub: null, + ); + @override + void removeEventListener( + String? type, + _i2.EventListener? listener, [ + bool? useCapture, + ]) => super.noSuchMethod( - Invocation.method(#removeEventListener, [type, listener, useCapture]), - returnValueForMissingStub: null); - @override - bool dispatchEvent(_i2.Event? event) => - (super.noSuchMethod(Invocation.method(#dispatchEvent, [event]), - returnValue: false) as bool); + Invocation.method( + #removeEventListener, + [ + type, + listener, + useCapture, + ], + ), + returnValueForMissingStub: null, + ); + @override + bool dispatchEvent(_i2.Event? event) => (super.noSuchMethod( + Invocation.method( + #dispatchEvent, + [event], + ), + returnValue: false, + ) as bool); } /// A class which mocks [Navigator]. @@ -654,97 +1163,199 @@ class MockNavigator extends _i1.Mock implements _i2.Navigator { } @override - String get language => - (super.noSuchMethod(Invocation.getter(#language), returnValue: '') - as String); - @override - _i2.Geolocation get geolocation => - (super.noSuchMethod(Invocation.getter(#geolocation), - returnValue: _FakeGeolocation_13()) as _i2.Geolocation); - @override - String get vendor => - (super.noSuchMethod(Invocation.getter(#vendor), returnValue: '') - as String); - @override - String get vendorSub => - (super.noSuchMethod(Invocation.getter(#vendorSub), returnValue: '') - as String); - @override - String get appCodeName => - (super.noSuchMethod(Invocation.getter(#appCodeName), returnValue: '') - as String); - @override - String get appName => - (super.noSuchMethod(Invocation.getter(#appName), returnValue: '') - as String); - @override - String get appVersion => - (super.noSuchMethod(Invocation.getter(#appVersion), returnValue: '') - as String); - @override - String get product => - (super.noSuchMethod(Invocation.getter(#product), returnValue: '') - as String); - @override - String get userAgent => - (super.noSuchMethod(Invocation.getter(#userAgent), returnValue: '') - as String); - @override - List<_i2.Gamepad?> getGamepads() => - (super.noSuchMethod(Invocation.method(#getGamepads, []), - returnValue: <_i2.Gamepad?>[]) as List<_i2.Gamepad?>); - @override - _i3.Future<_i2.MediaStream> getUserMedia( - {dynamic audio = false, dynamic video = false}) => + String get language => (super.noSuchMethod( + Invocation.getter(#language), + returnValue: '', + ) as String); + @override + _i2.Geolocation get geolocation => (super.noSuchMethod( + Invocation.getter(#geolocation), + returnValue: _FakeGeolocation_13( + this, + Invocation.getter(#geolocation), + ), + ) as _i2.Geolocation); + @override + String get vendor => (super.noSuchMethod( + Invocation.getter(#vendor), + returnValue: '', + ) as String); + @override + String get vendorSub => (super.noSuchMethod( + Invocation.getter(#vendorSub), + returnValue: '', + ) as String); + @override + String get appCodeName => (super.noSuchMethod( + Invocation.getter(#appCodeName), + returnValue: '', + ) as String); + @override + String get appName => (super.noSuchMethod( + Invocation.getter(#appName), + returnValue: '', + ) as String); + @override + String get appVersion => (super.noSuchMethod( + Invocation.getter(#appVersion), + returnValue: '', + ) as String); + @override + String get product => (super.noSuchMethod( + Invocation.getter(#product), + returnValue: '', + ) as String); + @override + String get userAgent => (super.noSuchMethod( + Invocation.getter(#userAgent), + returnValue: '', + ) as String); + @override + List<_i2.Gamepad?> getGamepads() => (super.noSuchMethod( + Invocation.method( + #getGamepads, + [], + ), + returnValue: <_i2.Gamepad?>[], + ) as List<_i2.Gamepad?>); + @override + _i3.Future<_i2.MediaStream> getUserMedia({ + dynamic audio = false, + dynamic video = false, + }) => (super.noSuchMethod( - Invocation.method(#getUserMedia, [], {#audio: audio, #video: video}), - returnValue: - Future<_i2.MediaStream>.value(_FakeMediaStream_14())) as _i3 - .Future<_i2.MediaStream>); - @override - void cancelKeyboardLock() => - super.noSuchMethod(Invocation.method(#cancelKeyboardLock, []), - returnValueForMissingStub: null); - @override - _i3.Future getBattery() => - (super.noSuchMethod(Invocation.method(#getBattery, []), - returnValue: Future.value()) as _i3.Future); + Invocation.method( + #getUserMedia, + [], + { + #audio: audio, + #video: video, + }, + ), + returnValue: _i3.Future<_i2.MediaStream>.value(_FakeMediaStream_14( + this, + Invocation.method( + #getUserMedia, + [], + { + #audio: audio, + #video: video, + }, + ), + )), + ) as _i3.Future<_i2.MediaStream>); + @override + void cancelKeyboardLock() => super.noSuchMethod( + Invocation.method( + #cancelKeyboardLock, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i3.Future getBattery() => (super.noSuchMethod( + Invocation.method( + #getBattery, + [], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); @override _i3.Future<_i2.RelatedApplication> getInstalledRelatedApps() => - (super.noSuchMethod(Invocation.method(#getInstalledRelatedApps, []), - returnValue: Future<_i2.RelatedApplication>.value( - _FakeRelatedApplication_15())) - as _i3.Future<_i2.RelatedApplication>); - @override - _i3.Future getVRDisplays() => - (super.noSuchMethod(Invocation.method(#getVRDisplays, []), - returnValue: Future.value()) as _i3.Future); - @override - void registerProtocolHandler(String? scheme, String? url, String? title) => + (super.noSuchMethod( + Invocation.method( + #getInstalledRelatedApps, + [], + ), + returnValue: + _i3.Future<_i2.RelatedApplication>.value(_FakeRelatedApplication_15( + this, + Invocation.method( + #getInstalledRelatedApps, + [], + ), + )), + ) as _i3.Future<_i2.RelatedApplication>); + @override + _i3.Future getVRDisplays() => (super.noSuchMethod( + Invocation.method( + #getVRDisplays, + [], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + @override + void registerProtocolHandler( + String? scheme, + String? url, + String? title, + ) => super.noSuchMethod( - Invocation.method(#registerProtocolHandler, [scheme, url, title]), - returnValueForMissingStub: null); + Invocation.method( + #registerProtocolHandler, + [ + scheme, + url, + title, + ], + ), + returnValueForMissingStub: null, + ); @override _i3.Future requestKeyboardLock([List? keyCodes]) => - (super.noSuchMethod(Invocation.method(#requestKeyboardLock, [keyCodes]), - returnValue: Future.value()) as _i3.Future); + (super.noSuchMethod( + Invocation.method( + #requestKeyboardLock, + [keyCodes], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); @override _i3.Future requestMidiAccess([Map? options]) => - (super.noSuchMethod(Invocation.method(#requestMidiAccess, [options]), - returnValue: Future.value()) as _i3.Future); - @override - _i3.Future requestMediaKeySystemAccess(String? keySystem, - List>? supportedConfigurations) => (super.noSuchMethod( - Invocation.method(#requestMediaKeySystemAccess, - [keySystem, supportedConfigurations]), - returnValue: Future.value()) as _i3.Future); - @override - bool sendBeacon(String? url, Object? data) => - (super.noSuchMethod(Invocation.method(#sendBeacon, [url, data]), - returnValue: false) as bool); + Invocation.method( + #requestMidiAccess, + [options], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future requestMediaKeySystemAccess( + String? keySystem, + List>? supportedConfigurations, + ) => + (super.noSuchMethod( + Invocation.method( + #requestMediaKeySystemAccess, + [ + keySystem, + supportedConfigurations, + ], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + @override + bool sendBeacon( + String? url, + Object? data, + ) => + (super.noSuchMethod( + Invocation.method( + #sendBeacon, + [ + url, + data, + ], + ), + returnValue: false, + ) as bool); @override _i3.Future share([Map? data]) => - (super.noSuchMethod(Invocation.method(#share, [data]), - returnValue: Future.value()) as _i3.Future); + (super.noSuchMethod( + Invocation.method( + #share, + [data], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); } diff --git a/packages/url_launcher/url_launcher_web/example/pubspec.yaml b/packages/url_launcher/url_launcher_web/example/pubspec.yaml index 881cb29c7599..f972b2857ecf 100644 --- a/packages/url_launcher/url_launcher_web/example/pubspec.yaml +++ b/packages/url_launcher/url_launcher_web/example/pubspec.yaml @@ -19,7 +19,7 @@ dev_dependencies: sdk: flutter integration_test: sdk: flutter - mockito: ^5.0.0 + mockito: ^5.3.2 url_launcher_platform_interface: ^2.0.3 url_launcher_web: path: ../ diff --git a/packages/video_player/video_player/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/video_player/video_player/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/video_player/video_player/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/video_player/video_player/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/video_player/video_player_android/CHANGELOG.md b/packages/video_player/video_player_android/CHANGELOG.md index 7298bacf4f78..4d3f72da6fbd 100644 --- a/packages/video_player/video_player_android/CHANGELOG.md +++ b/packages/video_player/video_player_android/CHANGELOG.md @@ -3,6 +3,7 @@ * Updates code for `no_leading_underscores_for_local_identifiers` lint. * Updates minimum Flutter version to 2.10. * Fixes violations of new analysis option use_named_constants. +* Removes an unnecessary override in example code. ## 2.3.9 diff --git a/packages/video_player/video_player_android/android/build.gradle b/packages/video_player/video_player_android/android/build.gradle index 2376d53a0ec1..2677050d303b 100644 --- a/packages/video_player/video_player_android/android/build.gradle +++ b/packages/video_player/video_player_android/android/build.gradle @@ -34,6 +34,7 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { + disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' } diff --git a/packages/video_player/video_player_android/android/gradle/wrapper/gradle-wrapper.properties b/packages/video_player/video_player_android/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 9f96ce648a03..000000000000 --- a/packages/video_player/video_player_android/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Oct 17 09:04:56 PDT 2018 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/packages/video_player/video_player_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/video_player/video_player_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/video_player/video_player_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/video_player/video_player_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/video_player/video_player_android/example/lib/mini_controller.dart b/packages/video_player/video_player_android/example/lib/mini_controller.dart index 24a9e0297df2..61959efe1e10 100644 --- a/packages/video_player/video_player_android/example/lib/mini_controller.dart +++ b/packages/video_player/video_player_android/example/lib/mini_controller.dart @@ -341,11 +341,6 @@ class MiniController extends ValueNotifier { void _updatePosition(Duration position) { value = value.copyWith(position: position); } - - @override - void removeListener(VoidCallback listener) { - super.removeListener(listener); - } } /// Widget that displays the video controlled by [controller]. diff --git a/packages/video_player/video_player_avfoundation/CHANGELOG.md b/packages/video_player/video_player_avfoundation/CHANGELOG.md index ed2f345784bd..b1cc1ce13927 100644 --- a/packages/video_player/video_player_avfoundation/CHANGELOG.md +++ b/packages/video_player/video_player_avfoundation/CHANGELOG.md @@ -1,3 +1,8 @@ +## NEXT + +* Adds an integration test for a bug where the aspect ratios of some HLS videos are incorrectly inverted. +* Removes an unnecessary override in example code. + ## 2.3.7 * Fixes a bug where the aspect ratio of some HLS videos are incorrectly inverted. diff --git a/packages/video_player/video_player_avfoundation/example/integration_test/video_player_test.dart b/packages/video_player/video_player_avfoundation/example/integration_test/video_player_test.dart index 5027973a660d..408eebbbc730 100644 --- a/packages/video_player/video_player_avfoundation/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player_avfoundation/example/integration_test/video_player_test.dart @@ -177,5 +177,19 @@ void main() { expect(livestreamController.value.duration, (Duration duration) => duration != Duration.zero); }); + + testWidgets('rotated m3u8 has correct aspect ratio', + (WidgetTester tester) async { + // Some m3u8 files contain rotation data that may incorrectly invert the aspect ratio. + // More info [here](https://github.com/flutter/flutter/issues/109116). + final MiniController livestreamController = MiniController.network( + 'https://flutter.github.io/assets-for-api-docs/assets/videos/hls/rotated_nail_manifest.m3u8', + ); + await livestreamController.initialize(); + + expect(livestreamController.value.isInitialized, true); + expect(livestreamController.value.size.width, + lessThan(livestreamController.value.size.height)); + }); }); } diff --git a/packages/video_player/video_player_avfoundation/example/lib/mini_controller.dart b/packages/video_player/video_player_avfoundation/example/lib/mini_controller.dart index 24a9e0297df2..61959efe1e10 100644 --- a/packages/video_player/video_player_avfoundation/example/lib/mini_controller.dart +++ b/packages/video_player/video_player_avfoundation/example/lib/mini_controller.dart @@ -341,11 +341,6 @@ class MiniController extends ValueNotifier { void _updatePosition(Duration position) { value = value.copyWith(position: position); } - - @override - void removeListener(VoidCallback listener) { - super.removeListener(listener); - } } /// Widget that displays the video controlled by [controller]. diff --git a/packages/webview_flutter/webview_flutter/CHANGELOG.md b/packages/webview_flutter/webview_flutter/CHANGELOG.md index d5559f9ca7f7..f278cf9f9d5b 100644 --- a/packages/webview_flutter/webview_flutter/CHANGELOG.md +++ b/packages/webview_flutter/webview_flutter/CHANGELOG.md @@ -5,6 +5,7 @@ * Fixes avoid_redundant_argument_values lint warnings and minor typos. * Ignores unnecessary import warnings in preparation for [upcoming Flutter changes](https://github.com/flutter/flutter/pull/104231). * Updates references to the obsolete master branch. +* Fixes typo from lowercase to uppercase. ## 3.0.4 diff --git a/packages/webview_flutter/webview_flutter/example/android/app/build.gradle b/packages/webview_flutter/webview_flutter/example/android/app/build.gradle index 8548d5b30ddd..968eed6cad85 100644 --- a/packages/webview_flutter/webview_flutter/example/android/app/build.gradle +++ b/packages/webview_flutter/webview_flutter/example/android/app/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 31 + compileSdkVersion 32 lintOptions { disable 'InvalidPackage' diff --git a/packages/webview_flutter/webview_flutter/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/webview_flutter/webview_flutter/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/webview_flutter/webview_flutter/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/webview_flutter/webview_flutter/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/webview_flutter/webview_flutter/example/android/build.gradle b/packages/webview_flutter/webview_flutter/example/android/build.gradle index e101ac08df55..c21bff8e0a2f 100644 --- a/packages/webview_flutter/webview_flutter/example/android/build.gradle +++ b/packages/webview_flutter/webview_flutter/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:7.0.1' } } diff --git a/packages/webview_flutter/webview_flutter/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/webview_flutter/webview_flutter/example/android/gradle/wrapper/gradle-wrapper.properties index 2819f022f1fd..b8793d3c0d69 100644 --- a/packages/webview_flutter/webview_flutter/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/webview_flutter/webview_flutter/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/webview_flutter/webview_flutter/example/pubspec.yaml b/packages/webview_flutter/webview_flutter/example/pubspec.yaml index 7af8b2f9dcc4..6b01b53ee4a3 100644 --- a/packages/webview_flutter/webview_flutter/example/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter/example/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: path: ../ dev_dependencies: - espresso: ^0.1.0+2 + espresso: ^0.2.0 flutter_driver: sdk: flutter flutter_test: diff --git a/packages/webview_flutter/webview_flutter/lib/src/webview.dart b/packages/webview_flutter/webview_flutter/lib/src/webview.dart index 697eb487b953..7de8e281711b 100644 --- a/packages/webview_flutter/webview_flutter/lib/src/webview.dart +++ b/packages/webview_flutter/webview_flutter/lib/src/webview.dart @@ -316,7 +316,7 @@ class _WebViewState extends State { webViewPlatformCallbacksHandler: _platformCallbacksHandler, javascriptChannelRegistry: _javascriptChannelRegistry, gestureRecognizers: widget.gestureRecognizers, - creationParams: _creationParamsfromWidget(widget), + creationParams: _creationParamsFromWidget(widget), ); } @@ -361,7 +361,7 @@ class _WebViewState extends State { } } -CreationParams _creationParamsfromWidget(WebView widget) { +CreationParams _creationParamsFromWidget(WebView widget) { return CreationParams( initialUrl: widget.initialUrl, webSettings: _webSettingsFromWidget(widget), diff --git a/packages/webview_flutter/webview_flutter_android/android/build.gradle b/packages/webview_flutter/webview_flutter_android/android/build.gradle index 65374fee88bf..7384f8d453da 100644 --- a/packages/webview_flutter/webview_flutter_android/android/build.gradle +++ b/packages/webview_flutter/webview_flutter_android/android/build.gradle @@ -30,6 +30,7 @@ android { } lintOptions { + disable 'AndroidGradlePluginVersion' disable 'InvalidPackage' disable 'GradleDependency' } diff --git a/packages/webview_flutter/webview_flutter_android/example/android/app/gradle/wrapper/gradle-wrapper.properties b/packages/webview_flutter/webview_flutter_android/example/android/app/gradle/wrapper/gradle-wrapper.properties index 9a4163a4f5ee..29e413457635 100644 --- a/packages/webview_flutter/webview_flutter_android/example/android/app/gradle/wrapper/gradle-wrapper.properties +++ b/packages/webview_flutter/webview_flutter_android/example/android/app/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/webview_flutter/webview_flutter_web/example/pubspec.yaml b/packages/webview_flutter/webview_flutter_web/example/pubspec.yaml index 7ceb586a9316..e2e0796e7ea3 100644 --- a/packages/webview_flutter/webview_flutter_web/example/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_web/example/pubspec.yaml @@ -20,7 +20,6 @@ dependencies: path: ../ dev_dependencies: - espresso: ^0.1.0+2 flutter_driver: sdk: flutter flutter_test: diff --git a/packages/webview_flutter/webview_flutter_web/pubspec.yaml b/packages/webview_flutter/webview_flutter_web/pubspec.yaml index 8f1b523be555..f27e6408335a 100644 --- a/packages/webview_flutter/webview_flutter_web/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_web/pubspec.yaml @@ -29,4 +29,4 @@ dev_dependencies: sdk: flutter flutter_test: sdk: flutter - mockito: ^5.0.0 + mockito: ^5.3.2 diff --git a/packages/webview_flutter/webview_flutter_web/test/webview_flutter_web_test.mocks.dart b/packages/webview_flutter/webview_flutter_web/test/webview_flutter_web_test.mocks.dart index e35d1e93c59f..db442eeea7a3 100644 --- a/packages/webview_flutter/webview_flutter_web/test/webview_flutter_web_test.mocks.dart +++ b/packages/webview_flutter/webview_flutter_web/test/webview_flutter_web_test.mocks.dart @@ -1,25 +1,22 @@ -// Copyright 2013 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. - -// Mocks generated by Mockito 5.0.16 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in webview_flutter_web/test/webview_flutter_web_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:html' as _i2; import 'dart:math' as _i3; import 'package:flutter/foundation.dart' as _i5; +import 'package:flutter/src/widgets/notification_listener.dart' as _i7; import 'package:flutter/widgets.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; -import 'package:webview_flutter_platform_interface/src/types/auto_media_playback_policy.dart' - as _i8; -import 'package:webview_flutter_platform_interface/src/types/types.dart' as _i7; +import 'package:webview_flutter_platform_interface/src/types/types.dart' as _i8; import 'package:webview_flutter_platform_interface/webview_flutter_platform_interface.dart' as _i9; import 'package:webview_flutter_web/webview_flutter_web.dart' as _i10; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -28,66 +25,231 @@ import 'package:webview_flutter_web/webview_flutter_web.dart' as _i10; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeCssClassSet_0 extends _i1.SmartFake implements _i2.CssClassSet { + _FakeCssClassSet_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCssClassSet_0 extends _i1.Fake implements _i2.CssClassSet {} +class _FakeRectangle_1 extends _i1.SmartFake + implements _i3.Rectangle { + _FakeRectangle_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeRectangle_1 extends _i1.Fake - implements _i3.Rectangle {} +class _FakeCssRect_2 extends _i1.SmartFake implements _i2.CssRect { + _FakeCssRect_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCssRect_2 extends _i1.Fake implements _i2.CssRect {} +class _FakePoint_3 extends _i1.SmartFake + implements _i3.Point { + _FakePoint_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakePoint_3 extends _i1.Fake implements _i3.Point {} +class _FakeElementEvents_4 extends _i1.SmartFake implements _i2.ElementEvents { + _FakeElementEvents_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeElementEvents_4 extends _i1.Fake implements _i2.ElementEvents {} +class _FakeCssStyleDeclaration_5 extends _i1.SmartFake + implements _i2.CssStyleDeclaration { + _FakeCssStyleDeclaration_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCssStyleDeclaration_5 extends _i1.Fake - implements _i2.CssStyleDeclaration {} +class _FakeElementStream_6 extends _i1.SmartFake + implements _i2.ElementStream { + _FakeElementStream_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeElementStream_6 extends _i1.Fake - implements _i2.ElementStream {} +class _FakeElementList_7 extends _i1.SmartFake + implements _i2.ElementList { + _FakeElementList_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeElementList_7 extends _i1.Fake - implements _i2.ElementList {} +class _FakeScrollState_8 extends _i1.SmartFake implements _i2.ScrollState { + _FakeScrollState_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeScrollState_8 extends _i1.Fake implements _i2.ScrollState {} +class _FakeAnimation_9 extends _i1.SmartFake implements _i2.Animation { + _FakeAnimation_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeAnimation_9 extends _i1.Fake implements _i2.Animation {} +class _FakeElement_10 extends _i1.SmartFake implements _i2.Element { + _FakeElement_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeElement_10 extends _i1.Fake implements _i2.Element {} +class _FakeShadowRoot_11 extends _i1.SmartFake implements _i2.ShadowRoot { + _FakeShadowRoot_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeShadowRoot_11 extends _i1.Fake implements _i2.ShadowRoot {} +class _FakeDocumentFragment_12 extends _i1.SmartFake + implements _i2.DocumentFragment { + _FakeDocumentFragment_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDocumentFragment_12 extends _i1.Fake - implements _i2.DocumentFragment {} +class _FakeNode_13 extends _i1.SmartFake implements _i2.Node { + _FakeNode_13( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeNode_13 extends _i1.Fake implements _i2.Node {} +class _FakeWidget_14 extends _i1.SmartFake implements _i4.Widget { + _FakeWidget_14( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); -class _FakeWidget_14 extends _i1.Fake implements _i4.Widget { @override String toString({_i5.DiagnosticLevel? minLevel = _i5.DiagnosticLevel.info}) => super.toString(); } -class _FakeInheritedWidget_15 extends _i1.Fake implements _i4.InheritedWidget { +class _FakeInheritedWidget_15 extends _i1.SmartFake + implements _i4.InheritedWidget { + _FakeInheritedWidget_15( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); + @override String toString({_i5.DiagnosticLevel? minLevel = _i5.DiagnosticLevel.info}) => super.toString(); } -class _FakeDiagnosticsNode_16 extends _i1.Fake implements _i5.DiagnosticsNode { +class _FakeDiagnosticsNode_16 extends _i1.SmartFake + implements _i5.DiagnosticsNode { + _FakeDiagnosticsNode_16( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); + @override - String toString( - {_i5.TextTreeConfiguration? parentConfiguration, - _i5.DiagnosticLevel? minLevel = _i5.DiagnosticLevel.info}) => + String toString({ + _i5.TextTreeConfiguration? parentConfiguration, + _i5.DiagnosticLevel? minLevel = _i5.DiagnosticLevel.info, + }) => super.toString(); } -class _FakeHttpRequest_17 extends _i1.Fake implements _i2.HttpRequest {} +class _FakeHttpRequest_17 extends _i1.SmartFake implements _i2.HttpRequest { + _FakeHttpRequest_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeHttpRequestUpload_18 extends _i1.Fake - implements _i2.HttpRequestUpload {} +class _FakeHttpRequestUpload_18 extends _i1.SmartFake + implements _i2.HttpRequestUpload { + _FakeHttpRequestUpload_18( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeEvents_19 extends _i1.Fake implements _i2.Events {} +class _FakeEvents_19 extends _i1.SmartFake implements _i2.Events { + _FakeEvents_19( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [IFrameElement]. /// @@ -98,907 +260,1844 @@ class MockIFrameElement extends _i1.Mock implements _i2.IFrameElement { } @override - set allow(String? value) => - super.noSuchMethod(Invocation.setter(#allow, value), - returnValueForMissingStub: null); - @override - set allowFullscreen(bool? value) => - super.noSuchMethod(Invocation.setter(#allowFullscreen, value), - returnValueForMissingStub: null); - @override - set allowPaymentRequest(bool? value) => - super.noSuchMethod(Invocation.setter(#allowPaymentRequest, value), - returnValueForMissingStub: null); - @override - set csp(String? value) => super.noSuchMethod(Invocation.setter(#csp, value), - returnValueForMissingStub: null); - @override - set height(String? value) => - super.noSuchMethod(Invocation.setter(#height, value), - returnValueForMissingStub: null); - @override - set name(String? value) => super.noSuchMethod(Invocation.setter(#name, value), - returnValueForMissingStub: null); - @override - set referrerPolicy(String? value) => - super.noSuchMethod(Invocation.setter(#referrerPolicy, value), - returnValueForMissingStub: null); - @override - set src(String? value) => super.noSuchMethod(Invocation.setter(#src, value), - returnValueForMissingStub: null); - @override - set srcdoc(String? value) => - super.noSuchMethod(Invocation.setter(#srcdoc, value), - returnValueForMissingStub: null); - @override - set width(String? value) => - super.noSuchMethod(Invocation.setter(#width, value), - returnValueForMissingStub: null); - @override - set nonce(String? value) => - super.noSuchMethod(Invocation.setter(#nonce, value), - returnValueForMissingStub: null); - @override - Map get attributes => - (super.noSuchMethod(Invocation.getter(#attributes), - returnValue: {}) as Map); - @override - set attributes(Map? value) => - super.noSuchMethod(Invocation.setter(#attributes, value), - returnValueForMissingStub: null); - @override - List<_i2.Element> get children => - (super.noSuchMethod(Invocation.getter(#children), - returnValue: <_i2.Element>[]) as List<_i2.Element>); - @override - set children(List<_i2.Element>? value) => - super.noSuchMethod(Invocation.setter(#children, value), - returnValueForMissingStub: null); - @override - _i2.CssClassSet get classes => - (super.noSuchMethod(Invocation.getter(#classes), - returnValue: _FakeCssClassSet_0()) as _i2.CssClassSet); - @override - set classes(Iterable? value) => - super.noSuchMethod(Invocation.setter(#classes, value), - returnValueForMissingStub: null); - @override - Map get dataset => - (super.noSuchMethod(Invocation.getter(#dataset), - returnValue: {}) as Map); - @override - set dataset(Map? value) => - super.noSuchMethod(Invocation.setter(#dataset, value), - returnValueForMissingStub: null); - @override - _i3.Rectangle get client => - (super.noSuchMethod(Invocation.getter(#client), - returnValue: _FakeRectangle_1()) as _i3.Rectangle); - @override - _i3.Rectangle get offset => - (super.noSuchMethod(Invocation.getter(#offset), - returnValue: _FakeRectangle_1()) as _i3.Rectangle); - @override - String get localName => - (super.noSuchMethod(Invocation.getter(#localName), returnValue: '') - as String); - @override - _i2.CssRect get contentEdge => - (super.noSuchMethod(Invocation.getter(#contentEdge), - returnValue: _FakeCssRect_2()) as _i2.CssRect); - @override - _i2.CssRect get paddingEdge => - (super.noSuchMethod(Invocation.getter(#paddingEdge), - returnValue: _FakeCssRect_2()) as _i2.CssRect); - @override - _i2.CssRect get borderEdge => - (super.noSuchMethod(Invocation.getter(#borderEdge), - returnValue: _FakeCssRect_2()) as _i2.CssRect); - @override - _i2.CssRect get marginEdge => - (super.noSuchMethod(Invocation.getter(#marginEdge), - returnValue: _FakeCssRect_2()) as _i2.CssRect); - @override - _i3.Point get documentOffset => - (super.noSuchMethod(Invocation.getter(#documentOffset), - returnValue: _FakePoint_3()) as _i3.Point); - @override - set innerHtml(String? html) => - super.noSuchMethod(Invocation.setter(#innerHtml, html), - returnValueForMissingStub: null); - @override - String get innerText => - (super.noSuchMethod(Invocation.getter(#innerText), returnValue: '') - as String); - @override - set innerText(String? value) => - super.noSuchMethod(Invocation.setter(#innerText, value), - returnValueForMissingStub: null); - @override - _i2.ElementEvents get on => (super.noSuchMethod(Invocation.getter(#on), - returnValue: _FakeElementEvents_4()) as _i2.ElementEvents); - @override - int get offsetHeight => - (super.noSuchMethod(Invocation.getter(#offsetHeight), returnValue: 0) - as int); - @override - int get offsetLeft => - (super.noSuchMethod(Invocation.getter(#offsetLeft), returnValue: 0) - as int); - @override - int get offsetTop => - (super.noSuchMethod(Invocation.getter(#offsetTop), returnValue: 0) - as int); - @override - int get offsetWidth => - (super.noSuchMethod(Invocation.getter(#offsetWidth), returnValue: 0) - as int); - @override - int get scrollHeight => - (super.noSuchMethod(Invocation.getter(#scrollHeight), returnValue: 0) - as int); - @override - int get scrollLeft => - (super.noSuchMethod(Invocation.getter(#scrollLeft), returnValue: 0) - as int); - @override - set scrollLeft(int? value) => - super.noSuchMethod(Invocation.setter(#scrollLeft, value), - returnValueForMissingStub: null); - @override - int get scrollTop => - (super.noSuchMethod(Invocation.getter(#scrollTop), returnValue: 0) - as int); - @override - set scrollTop(int? value) => - super.noSuchMethod(Invocation.setter(#scrollTop, value), - returnValueForMissingStub: null); - @override - int get scrollWidth => - (super.noSuchMethod(Invocation.getter(#scrollWidth), returnValue: 0) - as int); - @override - String get contentEditable => - (super.noSuchMethod(Invocation.getter(#contentEditable), returnValue: '') - as String); - @override - set contentEditable(String? value) => - super.noSuchMethod(Invocation.setter(#contentEditable, value), - returnValueForMissingStub: null); - @override - set dir(String? value) => super.noSuchMethod(Invocation.setter(#dir, value), - returnValueForMissingStub: null); - @override - bool get draggable => - (super.noSuchMethod(Invocation.getter(#draggable), returnValue: false) - as bool); - @override - set draggable(bool? value) => - super.noSuchMethod(Invocation.setter(#draggable, value), - returnValueForMissingStub: null); - @override - bool get hidden => - (super.noSuchMethod(Invocation.getter(#hidden), returnValue: false) - as bool); - @override - set hidden(bool? value) => - super.noSuchMethod(Invocation.setter(#hidden, value), - returnValueForMissingStub: null); - @override - set inert(bool? value) => super.noSuchMethod(Invocation.setter(#inert, value), - returnValueForMissingStub: null); - @override - set inputMode(String? value) => - super.noSuchMethod(Invocation.setter(#inputMode, value), - returnValueForMissingStub: null); - @override - set lang(String? value) => super.noSuchMethod(Invocation.setter(#lang, value), - returnValueForMissingStub: null); - @override - set spellcheck(bool? value) => - super.noSuchMethod(Invocation.setter(#spellcheck, value), - returnValueForMissingStub: null); + set allow(String? value) => super.noSuchMethod( + Invocation.setter( + #allow, + value, + ), + returnValueForMissingStub: null, + ); + @override + set allowFullscreen(bool? value) => super.noSuchMethod( + Invocation.setter( + #allowFullscreen, + value, + ), + returnValueForMissingStub: null, + ); + @override + set allowPaymentRequest(bool? value) => super.noSuchMethod( + Invocation.setter( + #allowPaymentRequest, + value, + ), + returnValueForMissingStub: null, + ); + @override + set csp(String? value) => super.noSuchMethod( + Invocation.setter( + #csp, + value, + ), + returnValueForMissingStub: null, + ); + @override + set height(String? value) => super.noSuchMethod( + Invocation.setter( + #height, + value, + ), + returnValueForMissingStub: null, + ); + @override + set name(String? value) => super.noSuchMethod( + Invocation.setter( + #name, + value, + ), + returnValueForMissingStub: null, + ); + @override + set referrerPolicy(String? value) => super.noSuchMethod( + Invocation.setter( + #referrerPolicy, + value, + ), + returnValueForMissingStub: null, + ); + @override + set src(String? value) => super.noSuchMethod( + Invocation.setter( + #src, + value, + ), + returnValueForMissingStub: null, + ); + @override + set srcdoc(String? value) => super.noSuchMethod( + Invocation.setter( + #srcdoc, + value, + ), + returnValueForMissingStub: null, + ); + @override + set width(String? value) => super.noSuchMethod( + Invocation.setter( + #width, + value, + ), + returnValueForMissingStub: null, + ); + @override + set nonce(String? value) => super.noSuchMethod( + Invocation.setter( + #nonce, + value, + ), + returnValueForMissingStub: null, + ); + @override + Map get attributes => (super.noSuchMethod( + Invocation.getter(#attributes), + returnValue: {}, + ) as Map); + @override + set attributes(Map? value) => super.noSuchMethod( + Invocation.setter( + #attributes, + value, + ), + returnValueForMissingStub: null, + ); + @override + List<_i2.Element> get children => (super.noSuchMethod( + Invocation.getter(#children), + returnValue: <_i2.Element>[], + ) as List<_i2.Element>); + @override + set children(List<_i2.Element>? value) => super.noSuchMethod( + Invocation.setter( + #children, + value, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CssClassSet get classes => (super.noSuchMethod( + Invocation.getter(#classes), + returnValue: _FakeCssClassSet_0( + this, + Invocation.getter(#classes), + ), + ) as _i2.CssClassSet); + @override + set classes(Iterable? value) => super.noSuchMethod( + Invocation.setter( + #classes, + value, + ), + returnValueForMissingStub: null, + ); + @override + Map get dataset => (super.noSuchMethod( + Invocation.getter(#dataset), + returnValue: {}, + ) as Map); + @override + set dataset(Map? value) => super.noSuchMethod( + Invocation.setter( + #dataset, + value, + ), + returnValueForMissingStub: null, + ); + @override + _i3.Rectangle get client => (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeRectangle_1( + this, + Invocation.getter(#client), + ), + ) as _i3.Rectangle); + @override + _i3.Rectangle get offset => (super.noSuchMethod( + Invocation.getter(#offset), + returnValue: _FakeRectangle_1( + this, + Invocation.getter(#offset), + ), + ) as _i3.Rectangle); + @override + String get localName => (super.noSuchMethod( + Invocation.getter(#localName), + returnValue: '', + ) as String); + @override + _i2.CssRect get contentEdge => (super.noSuchMethod( + Invocation.getter(#contentEdge), + returnValue: _FakeCssRect_2( + this, + Invocation.getter(#contentEdge), + ), + ) as _i2.CssRect); + @override + _i2.CssRect get paddingEdge => (super.noSuchMethod( + Invocation.getter(#paddingEdge), + returnValue: _FakeCssRect_2( + this, + Invocation.getter(#paddingEdge), + ), + ) as _i2.CssRect); + @override + _i2.CssRect get borderEdge => (super.noSuchMethod( + Invocation.getter(#borderEdge), + returnValue: _FakeCssRect_2( + this, + Invocation.getter(#borderEdge), + ), + ) as _i2.CssRect); + @override + _i2.CssRect get marginEdge => (super.noSuchMethod( + Invocation.getter(#marginEdge), + returnValue: _FakeCssRect_2( + this, + Invocation.getter(#marginEdge), + ), + ) as _i2.CssRect); + @override + _i3.Point get documentOffset => (super.noSuchMethod( + Invocation.getter(#documentOffset), + returnValue: _FakePoint_3( + this, + Invocation.getter(#documentOffset), + ), + ) as _i3.Point); + @override + set innerHtml(String? html) => super.noSuchMethod( + Invocation.setter( + #innerHtml, + html, + ), + returnValueForMissingStub: null, + ); + @override + String get innerText => (super.noSuchMethod( + Invocation.getter(#innerText), + returnValue: '', + ) as String); + @override + set innerText(String? value) => super.noSuchMethod( + Invocation.setter( + #innerText, + value, + ), + returnValueForMissingStub: null, + ); + @override + _i2.ElementEvents get on => (super.noSuchMethod( + Invocation.getter(#on), + returnValue: _FakeElementEvents_4( + this, + Invocation.getter(#on), + ), + ) as _i2.ElementEvents); + @override + int get offsetHeight => (super.noSuchMethod( + Invocation.getter(#offsetHeight), + returnValue: 0, + ) as int); + @override + int get offsetLeft => (super.noSuchMethod( + Invocation.getter(#offsetLeft), + returnValue: 0, + ) as int); + @override + int get offsetTop => (super.noSuchMethod( + Invocation.getter(#offsetTop), + returnValue: 0, + ) as int); + @override + int get offsetWidth => (super.noSuchMethod( + Invocation.getter(#offsetWidth), + returnValue: 0, + ) as int); + @override + int get scrollHeight => (super.noSuchMethod( + Invocation.getter(#scrollHeight), + returnValue: 0, + ) as int); + @override + int get scrollLeft => (super.noSuchMethod( + Invocation.getter(#scrollLeft), + returnValue: 0, + ) as int); + @override + set scrollLeft(int? value) => super.noSuchMethod( + Invocation.setter( + #scrollLeft, + value, + ), + returnValueForMissingStub: null, + ); + @override + int get scrollTop => (super.noSuchMethod( + Invocation.getter(#scrollTop), + returnValue: 0, + ) as int); + @override + set scrollTop(int? value) => super.noSuchMethod( + Invocation.setter( + #scrollTop, + value, + ), + returnValueForMissingStub: null, + ); + @override + int get scrollWidth => (super.noSuchMethod( + Invocation.getter(#scrollWidth), + returnValue: 0, + ) as int); + @override + String get contentEditable => (super.noSuchMethod( + Invocation.getter(#contentEditable), + returnValue: '', + ) as String); + @override + set contentEditable(String? value) => super.noSuchMethod( + Invocation.setter( + #contentEditable, + value, + ), + returnValueForMissingStub: null, + ); + @override + set dir(String? value) => super.noSuchMethod( + Invocation.setter( + #dir, + value, + ), + returnValueForMissingStub: null, + ); + @override + bool get draggable => (super.noSuchMethod( + Invocation.getter(#draggable), + returnValue: false, + ) as bool); + @override + set draggable(bool? value) => super.noSuchMethod( + Invocation.setter( + #draggable, + value, + ), + returnValueForMissingStub: null, + ); + @override + bool get hidden => (super.noSuchMethod( + Invocation.getter(#hidden), + returnValue: false, + ) as bool); + @override + set hidden(bool? value) => super.noSuchMethod( + Invocation.setter( + #hidden, + value, + ), + returnValueForMissingStub: null, + ); + @override + set inert(bool? value) => super.noSuchMethod( + Invocation.setter( + #inert, + value, + ), + returnValueForMissingStub: null, + ); + @override + set inputMode(String? value) => super.noSuchMethod( + Invocation.setter( + #inputMode, + value, + ), + returnValueForMissingStub: null, + ); + @override + set lang(String? value) => super.noSuchMethod( + Invocation.setter( + #lang, + value, + ), + returnValueForMissingStub: null, + ); + @override + set spellcheck(bool? value) => super.noSuchMethod( + Invocation.setter( + #spellcheck, + value, + ), + returnValueForMissingStub: null, + ); @override _i2.CssStyleDeclaration get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakeCssStyleDeclaration_5()) as _i2.CssStyleDeclaration); - @override - set tabIndex(int? value) => - super.noSuchMethod(Invocation.setter(#tabIndex, value), - returnValueForMissingStub: null); - @override - set title(String? value) => - super.noSuchMethod(Invocation.setter(#title, value), - returnValueForMissingStub: null); - @override - set translate(bool? value) => - super.noSuchMethod(Invocation.setter(#translate, value), - returnValueForMissingStub: null); - @override - String get className => - (super.noSuchMethod(Invocation.getter(#className), returnValue: '') - as String); - @override - set className(String? value) => - super.noSuchMethod(Invocation.setter(#className, value), - returnValueForMissingStub: null); - @override - int get clientHeight => - (super.noSuchMethod(Invocation.getter(#clientHeight), returnValue: 0) - as int); - @override - int get clientWidth => - (super.noSuchMethod(Invocation.getter(#clientWidth), returnValue: 0) - as int); - @override - String get id => - (super.noSuchMethod(Invocation.getter(#id), returnValue: '') as String); - @override - set id(String? value) => super.noSuchMethod(Invocation.setter(#id, value), - returnValueForMissingStub: null); - @override - set slot(String? value) => super.noSuchMethod(Invocation.setter(#slot, value), - returnValueForMissingStub: null); - @override - String get tagName => - (super.noSuchMethod(Invocation.getter(#tagName), returnValue: '') - as String); - @override - _i2.ElementStream<_i2.Event> get onAbort => - (super.noSuchMethod(Invocation.getter(#onAbort), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onBeforeCopy => - (super.noSuchMethod(Invocation.getter(#onBeforeCopy), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onBeforeCut => - (super.noSuchMethod(Invocation.getter(#onBeforeCut), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onBeforePaste => - (super.noSuchMethod(Invocation.getter(#onBeforePaste), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onBlur => - (super.noSuchMethod(Invocation.getter(#onBlur), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onCanPlay => - (super.noSuchMethod(Invocation.getter(#onCanPlay), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onCanPlayThrough => - (super.noSuchMethod(Invocation.getter(#onCanPlayThrough), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onChange => - (super.noSuchMethod(Invocation.getter(#onChange), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.MouseEvent> get onClick => - (super.noSuchMethod(Invocation.getter(#onClick), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onContextMenu => - (super.noSuchMethod(Invocation.getter(#onContextMenu), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.ClipboardEvent> get onCopy => - (super.noSuchMethod(Invocation.getter(#onCopy), - returnValue: _FakeElementStream_6<_i2.ClipboardEvent>()) - as _i2.ElementStream<_i2.ClipboardEvent>); - @override - _i2.ElementStream<_i2.ClipboardEvent> get onCut => - (super.noSuchMethod(Invocation.getter(#onCut), - returnValue: _FakeElementStream_6<_i2.ClipboardEvent>()) - as _i2.ElementStream<_i2.ClipboardEvent>); - @override - _i2.ElementStream<_i2.Event> get onDoubleClick => - (super.noSuchMethod(Invocation.getter(#onDoubleClick), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.MouseEvent> get onDrag => - (super.noSuchMethod(Invocation.getter(#onDrag), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onDragEnd => - (super.noSuchMethod(Invocation.getter(#onDragEnd), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onDragEnter => - (super.noSuchMethod(Invocation.getter(#onDragEnter), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onDragLeave => - (super.noSuchMethod(Invocation.getter(#onDragLeave), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onDragOver => - (super.noSuchMethod(Invocation.getter(#onDragOver), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onDragStart => - (super.noSuchMethod(Invocation.getter(#onDragStart), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onDrop => - (super.noSuchMethod(Invocation.getter(#onDrop), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.Event> get onDurationChange => - (super.noSuchMethod(Invocation.getter(#onDurationChange), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onEmptied => - (super.noSuchMethod(Invocation.getter(#onEmptied), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onEnded => - (super.noSuchMethod(Invocation.getter(#onEnded), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onError => - (super.noSuchMethod(Invocation.getter(#onError), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onFocus => - (super.noSuchMethod(Invocation.getter(#onFocus), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onInput => - (super.noSuchMethod(Invocation.getter(#onInput), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onInvalid => - (super.noSuchMethod(Invocation.getter(#onInvalid), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.KeyboardEvent> get onKeyDown => - (super.noSuchMethod(Invocation.getter(#onKeyDown), - returnValue: _FakeElementStream_6<_i2.KeyboardEvent>()) - as _i2.ElementStream<_i2.KeyboardEvent>); - @override - _i2.ElementStream<_i2.KeyboardEvent> get onKeyPress => - (super.noSuchMethod(Invocation.getter(#onKeyPress), - returnValue: _FakeElementStream_6<_i2.KeyboardEvent>()) - as _i2.ElementStream<_i2.KeyboardEvent>); - @override - _i2.ElementStream<_i2.KeyboardEvent> get onKeyUp => - (super.noSuchMethod(Invocation.getter(#onKeyUp), - returnValue: _FakeElementStream_6<_i2.KeyboardEvent>()) - as _i2.ElementStream<_i2.KeyboardEvent>); - @override - _i2.ElementStream<_i2.Event> get onLoad => - (super.noSuchMethod(Invocation.getter(#onLoad), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onLoadedData => - (super.noSuchMethod(Invocation.getter(#onLoadedData), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onLoadedMetadata => - (super.noSuchMethod(Invocation.getter(#onLoadedMetadata), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.MouseEvent> get onMouseDown => - (super.noSuchMethod(Invocation.getter(#onMouseDown), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onMouseEnter => - (super.noSuchMethod(Invocation.getter(#onMouseEnter), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onMouseLeave => - (super.noSuchMethod(Invocation.getter(#onMouseLeave), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onMouseMove => - (super.noSuchMethod(Invocation.getter(#onMouseMove), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onMouseOut => - (super.noSuchMethod(Invocation.getter(#onMouseOut), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onMouseOver => - (super.noSuchMethod(Invocation.getter(#onMouseOver), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.MouseEvent> get onMouseUp => - (super.noSuchMethod(Invocation.getter(#onMouseUp), - returnValue: _FakeElementStream_6<_i2.MouseEvent>()) - as _i2.ElementStream<_i2.MouseEvent>); - @override - _i2.ElementStream<_i2.WheelEvent> get onMouseWheel => - (super.noSuchMethod(Invocation.getter(#onMouseWheel), - returnValue: _FakeElementStream_6<_i2.WheelEvent>()) - as _i2.ElementStream<_i2.WheelEvent>); - @override - _i2.ElementStream<_i2.ClipboardEvent> get onPaste => - (super.noSuchMethod(Invocation.getter(#onPaste), - returnValue: _FakeElementStream_6<_i2.ClipboardEvent>()) - as _i2.ElementStream<_i2.ClipboardEvent>); - @override - _i2.ElementStream<_i2.Event> get onPause => - (super.noSuchMethod(Invocation.getter(#onPause), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onPlay => - (super.noSuchMethod(Invocation.getter(#onPlay), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onPlaying => - (super.noSuchMethod(Invocation.getter(#onPlaying), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onRateChange => - (super.noSuchMethod(Invocation.getter(#onRateChange), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onReset => - (super.noSuchMethod(Invocation.getter(#onReset), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onResize => - (super.noSuchMethod(Invocation.getter(#onResize), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onScroll => - (super.noSuchMethod(Invocation.getter(#onScroll), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onSearch => - (super.noSuchMethod(Invocation.getter(#onSearch), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onSeeked => - (super.noSuchMethod(Invocation.getter(#onSeeked), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onSeeking => - (super.noSuchMethod(Invocation.getter(#onSeeking), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onSelect => - (super.noSuchMethod(Invocation.getter(#onSelect), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onSelectStart => - (super.noSuchMethod(Invocation.getter(#onSelectStart), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onStalled => - (super.noSuchMethod(Invocation.getter(#onStalled), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onSubmit => - (super.noSuchMethod(Invocation.getter(#onSubmit), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onSuspend => - (super.noSuchMethod(Invocation.getter(#onSuspend), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onTimeUpdate => - (super.noSuchMethod(Invocation.getter(#onTimeUpdate), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.TouchEvent> get onTouchCancel => - (super.noSuchMethod(Invocation.getter(#onTouchCancel), - returnValue: _FakeElementStream_6<_i2.TouchEvent>()) - as _i2.ElementStream<_i2.TouchEvent>); - @override - _i2.ElementStream<_i2.TouchEvent> get onTouchEnd => - (super.noSuchMethod(Invocation.getter(#onTouchEnd), - returnValue: _FakeElementStream_6<_i2.TouchEvent>()) - as _i2.ElementStream<_i2.TouchEvent>); - @override - _i2.ElementStream<_i2.TouchEvent> get onTouchEnter => - (super.noSuchMethod(Invocation.getter(#onTouchEnter), - returnValue: _FakeElementStream_6<_i2.TouchEvent>()) - as _i2.ElementStream<_i2.TouchEvent>); - @override - _i2.ElementStream<_i2.TouchEvent> get onTouchLeave => - (super.noSuchMethod(Invocation.getter(#onTouchLeave), - returnValue: _FakeElementStream_6<_i2.TouchEvent>()) - as _i2.ElementStream<_i2.TouchEvent>); - @override - _i2.ElementStream<_i2.TouchEvent> get onTouchMove => - (super.noSuchMethod(Invocation.getter(#onTouchMove), - returnValue: _FakeElementStream_6<_i2.TouchEvent>()) - as _i2.ElementStream<_i2.TouchEvent>); - @override - _i2.ElementStream<_i2.TouchEvent> get onTouchStart => - (super.noSuchMethod(Invocation.getter(#onTouchStart), - returnValue: _FakeElementStream_6<_i2.TouchEvent>()) - as _i2.ElementStream<_i2.TouchEvent>); + Invocation.getter(#style), + returnValue: _FakeCssStyleDeclaration_5( + this, + Invocation.getter(#style), + ), + ) as _i2.CssStyleDeclaration); + @override + set tabIndex(int? value) => super.noSuchMethod( + Invocation.setter( + #tabIndex, + value, + ), + returnValueForMissingStub: null, + ); + @override + set title(String? value) => super.noSuchMethod( + Invocation.setter( + #title, + value, + ), + returnValueForMissingStub: null, + ); + @override + set translate(bool? value) => super.noSuchMethod( + Invocation.setter( + #translate, + value, + ), + returnValueForMissingStub: null, + ); + @override + String get className => (super.noSuchMethod( + Invocation.getter(#className), + returnValue: '', + ) as String); + @override + set className(String? value) => super.noSuchMethod( + Invocation.setter( + #className, + value, + ), + returnValueForMissingStub: null, + ); + @override + int get clientHeight => (super.noSuchMethod( + Invocation.getter(#clientHeight), + returnValue: 0, + ) as int); + @override + int get clientWidth => (super.noSuchMethod( + Invocation.getter(#clientWidth), + returnValue: 0, + ) as int); + @override + String get id => (super.noSuchMethod( + Invocation.getter(#id), + returnValue: '', + ) as String); + @override + set id(String? value) => super.noSuchMethod( + Invocation.setter( + #id, + value, + ), + returnValueForMissingStub: null, + ); + @override + set slot(String? value) => super.noSuchMethod( + Invocation.setter( + #slot, + value, + ), + returnValueForMissingStub: null, + ); + @override + String get tagName => (super.noSuchMethod( + Invocation.getter(#tagName), + returnValue: '', + ) as String); + @override + _i2.ElementStream<_i2.Event> get onAbort => (super.noSuchMethod( + Invocation.getter(#onAbort), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onAbort), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onBeforeCopy => (super.noSuchMethod( + Invocation.getter(#onBeforeCopy), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onBeforeCopy), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onBeforeCut => (super.noSuchMethod( + Invocation.getter(#onBeforeCut), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onBeforeCut), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onBeforePaste => (super.noSuchMethod( + Invocation.getter(#onBeforePaste), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onBeforePaste), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onBlur => (super.noSuchMethod( + Invocation.getter(#onBlur), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onBlur), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onCanPlay => (super.noSuchMethod( + Invocation.getter(#onCanPlay), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onCanPlay), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onCanPlayThrough => (super.noSuchMethod( + Invocation.getter(#onCanPlayThrough), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onCanPlayThrough), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onChange => (super.noSuchMethod( + Invocation.getter(#onChange), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onChange), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.MouseEvent> get onClick => (super.noSuchMethod( + Invocation.getter(#onClick), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onClick), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onContextMenu => (super.noSuchMethod( + Invocation.getter(#onContextMenu), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onContextMenu), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.ClipboardEvent> get onCopy => (super.noSuchMethod( + Invocation.getter(#onCopy), + returnValue: _FakeElementStream_6<_i2.ClipboardEvent>( + this, + Invocation.getter(#onCopy), + ), + ) as _i2.ElementStream<_i2.ClipboardEvent>); + @override + _i2.ElementStream<_i2.ClipboardEvent> get onCut => (super.noSuchMethod( + Invocation.getter(#onCut), + returnValue: _FakeElementStream_6<_i2.ClipboardEvent>( + this, + Invocation.getter(#onCut), + ), + ) as _i2.ElementStream<_i2.ClipboardEvent>); + @override + _i2.ElementStream<_i2.Event> get onDoubleClick => (super.noSuchMethod( + Invocation.getter(#onDoubleClick), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onDoubleClick), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.MouseEvent> get onDrag => (super.noSuchMethod( + Invocation.getter(#onDrag), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onDrag), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onDragEnd => (super.noSuchMethod( + Invocation.getter(#onDragEnd), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onDragEnd), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onDragEnter => (super.noSuchMethod( + Invocation.getter(#onDragEnter), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onDragEnter), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onDragLeave => (super.noSuchMethod( + Invocation.getter(#onDragLeave), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onDragLeave), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onDragOver => (super.noSuchMethod( + Invocation.getter(#onDragOver), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onDragOver), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onDragStart => (super.noSuchMethod( + Invocation.getter(#onDragStart), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onDragStart), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onDrop => (super.noSuchMethod( + Invocation.getter(#onDrop), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onDrop), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.Event> get onDurationChange => (super.noSuchMethod( + Invocation.getter(#onDurationChange), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onDurationChange), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onEmptied => (super.noSuchMethod( + Invocation.getter(#onEmptied), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onEmptied), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onEnded => (super.noSuchMethod( + Invocation.getter(#onEnded), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onEnded), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onError => (super.noSuchMethod( + Invocation.getter(#onError), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onError), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onFocus => (super.noSuchMethod( + Invocation.getter(#onFocus), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onFocus), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onInput => (super.noSuchMethod( + Invocation.getter(#onInput), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onInput), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onInvalid => (super.noSuchMethod( + Invocation.getter(#onInvalid), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onInvalid), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.KeyboardEvent> get onKeyDown => (super.noSuchMethod( + Invocation.getter(#onKeyDown), + returnValue: _FakeElementStream_6<_i2.KeyboardEvent>( + this, + Invocation.getter(#onKeyDown), + ), + ) as _i2.ElementStream<_i2.KeyboardEvent>); + @override + _i2.ElementStream<_i2.KeyboardEvent> get onKeyPress => (super.noSuchMethod( + Invocation.getter(#onKeyPress), + returnValue: _FakeElementStream_6<_i2.KeyboardEvent>( + this, + Invocation.getter(#onKeyPress), + ), + ) as _i2.ElementStream<_i2.KeyboardEvent>); + @override + _i2.ElementStream<_i2.KeyboardEvent> get onKeyUp => (super.noSuchMethod( + Invocation.getter(#onKeyUp), + returnValue: _FakeElementStream_6<_i2.KeyboardEvent>( + this, + Invocation.getter(#onKeyUp), + ), + ) as _i2.ElementStream<_i2.KeyboardEvent>); + @override + _i2.ElementStream<_i2.Event> get onLoad => (super.noSuchMethod( + Invocation.getter(#onLoad), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onLoad), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onLoadedData => (super.noSuchMethod( + Invocation.getter(#onLoadedData), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onLoadedData), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onLoadedMetadata => (super.noSuchMethod( + Invocation.getter(#onLoadedMetadata), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onLoadedMetadata), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.MouseEvent> get onMouseDown => (super.noSuchMethod( + Invocation.getter(#onMouseDown), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onMouseDown), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onMouseEnter => (super.noSuchMethod( + Invocation.getter(#onMouseEnter), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onMouseEnter), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onMouseLeave => (super.noSuchMethod( + Invocation.getter(#onMouseLeave), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onMouseLeave), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onMouseMove => (super.noSuchMethod( + Invocation.getter(#onMouseMove), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onMouseMove), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onMouseOut => (super.noSuchMethod( + Invocation.getter(#onMouseOut), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onMouseOut), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onMouseOver => (super.noSuchMethod( + Invocation.getter(#onMouseOver), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onMouseOver), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.MouseEvent> get onMouseUp => (super.noSuchMethod( + Invocation.getter(#onMouseUp), + returnValue: _FakeElementStream_6<_i2.MouseEvent>( + this, + Invocation.getter(#onMouseUp), + ), + ) as _i2.ElementStream<_i2.MouseEvent>); + @override + _i2.ElementStream<_i2.WheelEvent> get onMouseWheel => (super.noSuchMethod( + Invocation.getter(#onMouseWheel), + returnValue: _FakeElementStream_6<_i2.WheelEvent>( + this, + Invocation.getter(#onMouseWheel), + ), + ) as _i2.ElementStream<_i2.WheelEvent>); + @override + _i2.ElementStream<_i2.ClipboardEvent> get onPaste => (super.noSuchMethod( + Invocation.getter(#onPaste), + returnValue: _FakeElementStream_6<_i2.ClipboardEvent>( + this, + Invocation.getter(#onPaste), + ), + ) as _i2.ElementStream<_i2.ClipboardEvent>); + @override + _i2.ElementStream<_i2.Event> get onPause => (super.noSuchMethod( + Invocation.getter(#onPause), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onPause), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onPlay => (super.noSuchMethod( + Invocation.getter(#onPlay), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onPlay), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onPlaying => (super.noSuchMethod( + Invocation.getter(#onPlaying), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onPlaying), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onRateChange => (super.noSuchMethod( + Invocation.getter(#onRateChange), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onRateChange), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onReset => (super.noSuchMethod( + Invocation.getter(#onReset), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onReset), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onResize => (super.noSuchMethod( + Invocation.getter(#onResize), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onResize), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onScroll => (super.noSuchMethod( + Invocation.getter(#onScroll), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onScroll), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onSearch => (super.noSuchMethod( + Invocation.getter(#onSearch), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onSearch), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onSeeked => (super.noSuchMethod( + Invocation.getter(#onSeeked), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onSeeked), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onSeeking => (super.noSuchMethod( + Invocation.getter(#onSeeking), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onSeeking), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onSelect => (super.noSuchMethod( + Invocation.getter(#onSelect), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onSelect), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onSelectStart => (super.noSuchMethod( + Invocation.getter(#onSelectStart), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onSelectStart), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onStalled => (super.noSuchMethod( + Invocation.getter(#onStalled), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onStalled), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onSubmit => (super.noSuchMethod( + Invocation.getter(#onSubmit), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onSubmit), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onSuspend => (super.noSuchMethod( + Invocation.getter(#onSuspend), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onSuspend), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onTimeUpdate => (super.noSuchMethod( + Invocation.getter(#onTimeUpdate), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onTimeUpdate), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.TouchEvent> get onTouchCancel => (super.noSuchMethod( + Invocation.getter(#onTouchCancel), + returnValue: _FakeElementStream_6<_i2.TouchEvent>( + this, + Invocation.getter(#onTouchCancel), + ), + ) as _i2.ElementStream<_i2.TouchEvent>); + @override + _i2.ElementStream<_i2.TouchEvent> get onTouchEnd => (super.noSuchMethod( + Invocation.getter(#onTouchEnd), + returnValue: _FakeElementStream_6<_i2.TouchEvent>( + this, + Invocation.getter(#onTouchEnd), + ), + ) as _i2.ElementStream<_i2.TouchEvent>); + @override + _i2.ElementStream<_i2.TouchEvent> get onTouchEnter => (super.noSuchMethod( + Invocation.getter(#onTouchEnter), + returnValue: _FakeElementStream_6<_i2.TouchEvent>( + this, + Invocation.getter(#onTouchEnter), + ), + ) as _i2.ElementStream<_i2.TouchEvent>); + @override + _i2.ElementStream<_i2.TouchEvent> get onTouchLeave => (super.noSuchMethod( + Invocation.getter(#onTouchLeave), + returnValue: _FakeElementStream_6<_i2.TouchEvent>( + this, + Invocation.getter(#onTouchLeave), + ), + ) as _i2.ElementStream<_i2.TouchEvent>); + @override + _i2.ElementStream<_i2.TouchEvent> get onTouchMove => (super.noSuchMethod( + Invocation.getter(#onTouchMove), + returnValue: _FakeElementStream_6<_i2.TouchEvent>( + this, + Invocation.getter(#onTouchMove), + ), + ) as _i2.ElementStream<_i2.TouchEvent>); + @override + _i2.ElementStream<_i2.TouchEvent> get onTouchStart => (super.noSuchMethod( + Invocation.getter(#onTouchStart), + returnValue: _FakeElementStream_6<_i2.TouchEvent>( + this, + Invocation.getter(#onTouchStart), + ), + ) as _i2.ElementStream<_i2.TouchEvent>); @override _i2.ElementStream<_i2.TransitionEvent> get onTransitionEnd => - (super.noSuchMethod(Invocation.getter(#onTransitionEnd), - returnValue: _FakeElementStream_6<_i2.TransitionEvent>()) - as _i2.ElementStream<_i2.TransitionEvent>); - @override - _i2.ElementStream<_i2.Event> get onVolumeChange => - (super.noSuchMethod(Invocation.getter(#onVolumeChange), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onWaiting => - (super.noSuchMethod(Invocation.getter(#onWaiting), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onFullscreenChange => - (super.noSuchMethod(Invocation.getter(#onFullscreenChange), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.Event> get onFullscreenError => - (super.noSuchMethod(Invocation.getter(#onFullscreenError), - returnValue: _FakeElementStream_6<_i2.Event>()) - as _i2.ElementStream<_i2.Event>); - @override - _i2.ElementStream<_i2.WheelEvent> get onWheel => - (super.noSuchMethod(Invocation.getter(#onWheel), - returnValue: _FakeElementStream_6<_i2.WheelEvent>()) - as _i2.ElementStream<_i2.WheelEvent>); - @override - List<_i2.Node> get nodes => - (super.noSuchMethod(Invocation.getter(#nodes), returnValue: <_i2.Node>[]) - as List<_i2.Node>); - @override - set nodes(Iterable<_i2.Node>? value) => - super.noSuchMethod(Invocation.setter(#nodes, value), - returnValueForMissingStub: null); - @override - List<_i2.Node> get childNodes => - (super.noSuchMethod(Invocation.getter(#childNodes), - returnValue: <_i2.Node>[]) as List<_i2.Node>); - @override - int get nodeType => - (super.noSuchMethod(Invocation.getter(#nodeType), returnValue: 0) as int); - @override - set text(String? value) => super.noSuchMethod(Invocation.setter(#text, value), - returnValueForMissingStub: null); - @override - String? getAttribute(String? name) => - (super.noSuchMethod(Invocation.method(#getAttribute, [name])) as String?); - @override - String? getAttributeNS(String? namespaceURI, String? name) => (super.noSuchMethod( - Invocation.method(#getAttributeNS, [namespaceURI, name])) as String?); - @override - bool hasAttribute(String? name) => - (super.noSuchMethod(Invocation.method(#hasAttribute, [name]), - returnValue: false) as bool); - @override - bool hasAttributeNS(String? namespaceURI, String? name) => (super - .noSuchMethod(Invocation.method(#hasAttributeNS, [namespaceURI, name]), - returnValue: false) as bool); - @override - void removeAttribute(String? name) => - super.noSuchMethod(Invocation.method(#removeAttribute, [name]), - returnValueForMissingStub: null); - @override - void removeAttributeNS(String? namespaceURI, String? name) => super - .noSuchMethod(Invocation.method(#removeAttributeNS, [namespaceURI, name]), - returnValueForMissingStub: null); - @override - void setAttribute(String? name, Object? value) => - super.noSuchMethod(Invocation.method(#setAttribute, [name, value]), - returnValueForMissingStub: null); - @override - void setAttributeNS(String? namespaceURI, String? name, Object? value) => + Invocation.getter(#onTransitionEnd), + returnValue: _FakeElementStream_6<_i2.TransitionEvent>( + this, + Invocation.getter(#onTransitionEnd), + ), + ) as _i2.ElementStream<_i2.TransitionEvent>); + @override + _i2.ElementStream<_i2.Event> get onVolumeChange => (super.noSuchMethod( + Invocation.getter(#onVolumeChange), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onVolumeChange), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onWaiting => (super.noSuchMethod( + Invocation.getter(#onWaiting), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onWaiting), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onFullscreenChange => (super.noSuchMethod( + Invocation.getter(#onFullscreenChange), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onFullscreenChange), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.Event> get onFullscreenError => (super.noSuchMethod( + Invocation.getter(#onFullscreenError), + returnValue: _FakeElementStream_6<_i2.Event>( + this, + Invocation.getter(#onFullscreenError), + ), + ) as _i2.ElementStream<_i2.Event>); + @override + _i2.ElementStream<_i2.WheelEvent> get onWheel => (super.noSuchMethod( + Invocation.getter(#onWheel), + returnValue: _FakeElementStream_6<_i2.WheelEvent>( + this, + Invocation.getter(#onWheel), + ), + ) as _i2.ElementStream<_i2.WheelEvent>); + @override + List<_i2.Node> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i2.Node>[], + ) as List<_i2.Node>); + @override + set nodes(Iterable<_i2.Node>? value) => super.noSuchMethod( + Invocation.setter( + #nodes, + value, + ), + returnValueForMissingStub: null, + ); + @override + List<_i2.Node> get childNodes => (super.noSuchMethod( + Invocation.getter(#childNodes), + returnValue: <_i2.Node>[], + ) as List<_i2.Node>); + @override + int get nodeType => (super.noSuchMethod( + Invocation.getter(#nodeType), + returnValue: 0, + ) as int); + @override + set text(String? value) => super.noSuchMethod( + Invocation.setter( + #text, + value, + ), + returnValueForMissingStub: null, + ); + @override + String? getAttribute(String? name) => (super.noSuchMethod(Invocation.method( + #getAttribute, + [name], + )) as String?); + @override + String? getAttributeNS( + String? namespaceURI, + String? name, + ) => + (super.noSuchMethod(Invocation.method( + #getAttributeNS, + [ + namespaceURI, + name, + ], + )) as String?); + @override + bool hasAttribute(String? name) => (super.noSuchMethod( + Invocation.method( + #hasAttribute, + [name], + ), + returnValue: false, + ) as bool); + @override + bool hasAttributeNS( + String? namespaceURI, + String? name, + ) => + (super.noSuchMethod( + Invocation.method( + #hasAttributeNS, + [ + namespaceURI, + name, + ], + ), + returnValue: false, + ) as bool); + @override + void removeAttribute(String? name) => super.noSuchMethod( + Invocation.method( + #removeAttribute, + [name], + ), + returnValueForMissingStub: null, + ); + @override + void removeAttributeNS( + String? namespaceURI, + String? name, + ) => + super.noSuchMethod( + Invocation.method( + #removeAttributeNS, + [ + namespaceURI, + name, + ], + ), + returnValueForMissingStub: null, + ); + @override + void setAttribute( + String? name, + Object? value, + ) => + super.noSuchMethod( + Invocation.method( + #setAttribute, + [ + name, + value, + ], + ), + returnValueForMissingStub: null, + ); + @override + void setAttributeNS( + String? namespaceURI, + String? name, + Object? value, + ) => super.noSuchMethod( - Invocation.method(#setAttributeNS, [namespaceURI, name, value]), - returnValueForMissingStub: null); + Invocation.method( + #setAttributeNS, + [ + namespaceURI, + name, + value, + ], + ), + returnValueForMissingStub: null, + ); @override _i2.ElementList querySelectorAll( String? selectors) => - (super.noSuchMethod(Invocation.method(#querySelectorAll, [selectors]), - returnValue: _FakeElementList_7()) as _i2.ElementList); + (super.noSuchMethod( + Invocation.method( + #querySelectorAll, + [selectors], + ), + returnValue: _FakeElementList_7( + this, + Invocation.method( + #querySelectorAll, + [selectors], + ), + ), + ) as _i2.ElementList); @override _i6.Future<_i2.ScrollState> setApplyScroll(String? nativeScrollBehavior) => (super.noSuchMethod( - Invocation.method(#setApplyScroll, [nativeScrollBehavior]), - returnValue: Future<_i2.ScrollState>.value(_FakeScrollState_8())) - as _i6.Future<_i2.ScrollState>); + Invocation.method( + #setApplyScroll, + [nativeScrollBehavior], + ), + returnValue: _i6.Future<_i2.ScrollState>.value(_FakeScrollState_8( + this, + Invocation.method( + #setApplyScroll, + [nativeScrollBehavior], + ), + )), + ) as _i6.Future<_i2.ScrollState>); @override _i6.Future<_i2.ScrollState> setDistributeScroll( String? nativeScrollBehavior) => (super.noSuchMethod( - Invocation.method(#setDistributeScroll, [nativeScrollBehavior]), - returnValue: Future<_i2.ScrollState>.value(_FakeScrollState_8())) - as _i6.Future<_i2.ScrollState>); + Invocation.method( + #setDistributeScroll, + [nativeScrollBehavior], + ), + returnValue: _i6.Future<_i2.ScrollState>.value(_FakeScrollState_8( + this, + Invocation.method( + #setDistributeScroll, + [nativeScrollBehavior], + ), + )), + ) as _i6.Future<_i2.ScrollState>); @override - Map getNamespacedAttributes(String? namespace) => (super - .noSuchMethod(Invocation.method(#getNamespacedAttributes, [namespace]), - returnValue: {}) as Map); + Map getNamespacedAttributes(String? namespace) => + (super.noSuchMethod( + Invocation.method( + #getNamespacedAttributes, + [namespace], + ), + returnValue: {}, + ) as Map); @override _i2.CssStyleDeclaration getComputedStyle([String? pseudoElement]) => - (super.noSuchMethod(Invocation.method(#getComputedStyle, [pseudoElement]), - returnValue: _FakeCssStyleDeclaration_5()) - as _i2.CssStyleDeclaration); - @override - void appendText(String? text) => - super.noSuchMethod(Invocation.method(#appendText, [text]), - returnValueForMissingStub: null); - @override - void appendHtml(String? text, - {_i2.NodeValidator? validator, - _i2.NodeTreeSanitizer? treeSanitizer}) => + (super.noSuchMethod( + Invocation.method( + #getComputedStyle, + [pseudoElement], + ), + returnValue: _FakeCssStyleDeclaration_5( + this, + Invocation.method( + #getComputedStyle, + [pseudoElement], + ), + ), + ) as _i2.CssStyleDeclaration); + @override + void appendText(String? text) => super.noSuchMethod( + Invocation.method( + #appendText, + [text], + ), + returnValueForMissingStub: null, + ); + @override + void appendHtml( + String? text, { + _i2.NodeValidator? validator, + _i2.NodeTreeSanitizer? treeSanitizer, + }) => super.noSuchMethod( - Invocation.method(#appendHtml, [text], - {#validator: validator, #treeSanitizer: treeSanitizer}), - returnValueForMissingStub: null); - @override - void attached() => super.noSuchMethod(Invocation.method(#attached, []), - returnValueForMissingStub: null); - @override - void detached() => super.noSuchMethod(Invocation.method(#detached, []), - returnValueForMissingStub: null); - @override - void enteredView() => super.noSuchMethod(Invocation.method(#enteredView, []), - returnValueForMissingStub: null); - @override - List<_i3.Rectangle> getClientRects() => - (super.noSuchMethod(Invocation.method(#getClientRects, []), - returnValue: <_i3.Rectangle>[]) as List<_i3.Rectangle>); - @override - void leftView() => super.noSuchMethod(Invocation.method(#leftView, []), - returnValueForMissingStub: null); - @override - _i2.Animation animate(Iterable>? frames, - [dynamic timing]) => - (super.noSuchMethod(Invocation.method(#animate, [frames, timing]), - returnValue: _FakeAnimation_9()) as _i2.Animation); - @override - void attributeChanged(String? name, String? oldValue, String? newValue) => + Invocation.method( + #appendHtml, + [text], + { + #validator: validator, + #treeSanitizer: treeSanitizer, + }, + ), + returnValueForMissingStub: null, + ); + @override + void attached() => super.noSuchMethod( + Invocation.method( + #attached, + [], + ), + returnValueForMissingStub: null, + ); + @override + void detached() => super.noSuchMethod( + Invocation.method( + #detached, + [], + ), + returnValueForMissingStub: null, + ); + @override + void enteredView() => super.noSuchMethod( + Invocation.method( + #enteredView, + [], + ), + returnValueForMissingStub: null, + ); + @override + List<_i3.Rectangle> getClientRects() => (super.noSuchMethod( + Invocation.method( + #getClientRects, + [], + ), + returnValue: <_i3.Rectangle>[], + ) as List<_i3.Rectangle>); + @override + void leftView() => super.noSuchMethod( + Invocation.method( + #leftView, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i2.Animation animate( + Iterable>? frames, [ + dynamic timing, + ]) => + (super.noSuchMethod( + Invocation.method( + #animate, + [ + frames, + timing, + ], + ), + returnValue: _FakeAnimation_9( + this, + Invocation.method( + #animate, + [ + frames, + timing, + ], + ), + ), + ) as _i2.Animation); + @override + void attributeChanged( + String? name, + String? oldValue, + String? newValue, + ) => super.noSuchMethod( - Invocation.method(#attributeChanged, [name, oldValue, newValue]), - returnValueForMissingStub: null); - @override - String toString() => super.toString(); - @override - void scrollIntoView([_i2.ScrollAlignment? alignment]) => - super.noSuchMethod(Invocation.method(#scrollIntoView, [alignment]), - returnValueForMissingStub: null); - @override - void insertAdjacentText(String? where, String? text) => - super.noSuchMethod(Invocation.method(#insertAdjacentText, [where, text]), - returnValueForMissingStub: null); - @override - void insertAdjacentHtml(String? where, String? html, - {_i2.NodeValidator? validator, - _i2.NodeTreeSanitizer? treeSanitizer}) => + Invocation.method( + #attributeChanged, + [ + name, + oldValue, + newValue, + ], + ), + returnValueForMissingStub: null, + ); + @override + void scrollIntoView([_i2.ScrollAlignment? alignment]) => super.noSuchMethod( + Invocation.method( + #scrollIntoView, + [alignment], + ), + returnValueForMissingStub: null, + ); + @override + void insertAdjacentText( + String? where, + String? text, + ) => super.noSuchMethod( - Invocation.method(#insertAdjacentHtml, [where, html], - {#validator: validator, #treeSanitizer: treeSanitizer}), - returnValueForMissingStub: null); - @override - _i2.Element insertAdjacentElement(String? where, _i2.Element? element) => + Invocation.method( + #insertAdjacentText, + [ + where, + text, + ], + ), + returnValueForMissingStub: null, + ); + @override + void insertAdjacentHtml( + String? where, + String? html, { + _i2.NodeValidator? validator, + _i2.NodeTreeSanitizer? treeSanitizer, + }) => + super.noSuchMethod( + Invocation.method( + #insertAdjacentHtml, + [ + where, + html, + ], + { + #validator: validator, + #treeSanitizer: treeSanitizer, + }, + ), + returnValueForMissingStub: null, + ); + @override + _i2.Element insertAdjacentElement( + String? where, + _i2.Element? element, + ) => (super.noSuchMethod( - Invocation.method(#insertAdjacentElement, [where, element]), - returnValue: _FakeElement_10()) as _i2.Element); - @override - bool matches(String? selectors) => - (super.noSuchMethod(Invocation.method(#matches, [selectors]), - returnValue: false) as bool); - @override - bool matchesWithAncestors(String? selectors) => - (super.noSuchMethod(Invocation.method(#matchesWithAncestors, [selectors]), - returnValue: false) as bool); - @override - _i2.ShadowRoot createShadowRoot() => - (super.noSuchMethod(Invocation.method(#createShadowRoot, []), - returnValue: _FakeShadowRoot_11()) as _i2.ShadowRoot); - @override - _i3.Point offsetTo(_i2.Element? parent) => - (super.noSuchMethod(Invocation.method(#offsetTo, [parent]), - returnValue: _FakePoint_3()) as _i3.Point); - @override - _i2.DocumentFragment createFragment(String? html, - {_i2.NodeValidator? validator, - _i2.NodeTreeSanitizer? treeSanitizer}) => + Invocation.method( + #insertAdjacentElement, + [ + where, + element, + ], + ), + returnValue: _FakeElement_10( + this, + Invocation.method( + #insertAdjacentElement, + [ + where, + element, + ], + ), + ), + ) as _i2.Element); + @override + bool matches(String? selectors) => (super.noSuchMethod( + Invocation.method( + #matches, + [selectors], + ), + returnValue: false, + ) as bool); + @override + bool matchesWithAncestors(String? selectors) => (super.noSuchMethod( + Invocation.method( + #matchesWithAncestors, + [selectors], + ), + returnValue: false, + ) as bool); + @override + _i2.ShadowRoot createShadowRoot() => (super.noSuchMethod( + Invocation.method( + #createShadowRoot, + [], + ), + returnValue: _FakeShadowRoot_11( + this, + Invocation.method( + #createShadowRoot, + [], + ), + ), + ) as _i2.ShadowRoot); + @override + _i3.Point offsetTo(_i2.Element? parent) => (super.noSuchMethod( + Invocation.method( + #offsetTo, + [parent], + ), + returnValue: _FakePoint_3( + this, + Invocation.method( + #offsetTo, + [parent], + ), + ), + ) as _i3.Point); + @override + _i2.DocumentFragment createFragment( + String? html, { + _i2.NodeValidator? validator, + _i2.NodeTreeSanitizer? treeSanitizer, + }) => (super.noSuchMethod( - Invocation.method(#createFragment, [html], - {#validator: validator, #treeSanitizer: treeSanitizer}), - returnValue: _FakeDocumentFragment_12()) as _i2.DocumentFragment); - @override - void setInnerHtml(String? html, - {_i2.NodeValidator? validator, - _i2.NodeTreeSanitizer? treeSanitizer}) => + Invocation.method( + #createFragment, + [html], + { + #validator: validator, + #treeSanitizer: treeSanitizer, + }, + ), + returnValue: _FakeDocumentFragment_12( + this, + Invocation.method( + #createFragment, + [html], + { + #validator: validator, + #treeSanitizer: treeSanitizer, + }, + ), + ), + ) as _i2.DocumentFragment); + @override + void setInnerHtml( + String? html, { + _i2.NodeValidator? validator, + _i2.NodeTreeSanitizer? treeSanitizer, + }) => super.noSuchMethod( - Invocation.method(#setInnerHtml, [html], - {#validator: validator, #treeSanitizer: treeSanitizer}), - returnValueForMissingStub: null); - @override - void blur() => super.noSuchMethod(Invocation.method(#blur, []), - returnValueForMissingStub: null); - @override - void click() => super.noSuchMethod(Invocation.method(#click, []), - returnValueForMissingStub: null); - @override - void focus() => super.noSuchMethod(Invocation.method(#focus, []), - returnValueForMissingStub: null); + Invocation.method( + #setInnerHtml, + [html], + { + #validator: validator, + #treeSanitizer: treeSanitizer, + }, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future requestFullscreen([Map? options]) => + (super.noSuchMethod( + Invocation.method( + #requestFullscreen, + [options], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void blur() => super.noSuchMethod( + Invocation.method( + #blur, + [], + ), + returnValueForMissingStub: null, + ); + @override + void click() => super.noSuchMethod( + Invocation.method( + #click, + [], + ), + returnValueForMissingStub: null, + ); + @override + void focus() => super.noSuchMethod( + Invocation.method( + #focus, + [], + ), + returnValueForMissingStub: null, + ); @override _i2.ShadowRoot attachShadow(Map? shadowRootInitDict) => (super.noSuchMethod( - Invocation.method(#attachShadow, [shadowRootInitDict]), - returnValue: _FakeShadowRoot_11()) as _i2.ShadowRoot); + Invocation.method( + #attachShadow, + [shadowRootInitDict], + ), + returnValue: _FakeShadowRoot_11( + this, + Invocation.method( + #attachShadow, + [shadowRootInitDict], + ), + ), + ) as _i2.ShadowRoot); @override _i2.Element? closest(String? selectors) => - (super.noSuchMethod(Invocation.method(#closest, [selectors])) - as _i2.Element?); - @override - List<_i2.Animation> getAnimations() => - (super.noSuchMethod(Invocation.method(#getAnimations, []), - returnValue: <_i2.Animation>[]) as List<_i2.Animation>); - @override - List getAttributeNames() => - (super.noSuchMethod(Invocation.method(#getAttributeNames, []), - returnValue: []) as List); - @override - _i3.Rectangle getBoundingClientRect() => - (super.noSuchMethod(Invocation.method(#getBoundingClientRect, []), - returnValue: _FakeRectangle_1()) as _i3.Rectangle); - @override - List<_i2.Node> getDestinationInsertionPoints() => - (super.noSuchMethod(Invocation.method(#getDestinationInsertionPoints, []), - returnValue: <_i2.Node>[]) as List<_i2.Node>); - @override - List<_i2.Node> getElementsByClassName(String? classNames) => (super - .noSuchMethod(Invocation.method(#getElementsByClassName, [classNames]), - returnValue: <_i2.Node>[]) as List<_i2.Node>); - @override - bool hasPointerCapture(int? pointerId) => - (super.noSuchMethod(Invocation.method(#hasPointerCapture, [pointerId]), - returnValue: false) as bool); - @override - void releasePointerCapture(int? pointerId) => - super.noSuchMethod(Invocation.method(#releasePointerCapture, [pointerId]), - returnValueForMissingStub: null); - @override - void requestPointerLock() => - super.noSuchMethod(Invocation.method(#requestPointerLock, []), - returnValueForMissingStub: null); - @override - void scroll([dynamic options_OR_x, num? y]) => - super.noSuchMethod(Invocation.method(#scroll, [options_OR_x, y]), - returnValueForMissingStub: null); - @override - void scrollBy([dynamic options_OR_x, num? y]) => - super.noSuchMethod(Invocation.method(#scrollBy, [options_OR_x, y]), - returnValueForMissingStub: null); - @override - void scrollTo([dynamic options_OR_x, num? y]) => - super.noSuchMethod(Invocation.method(#scrollTo, [options_OR_x, y]), - returnValueForMissingStub: null); - @override - void setPointerCapture(int? pointerId) => - super.noSuchMethod(Invocation.method(#setPointerCapture, [pointerId]), - returnValueForMissingStub: null); - // TODO(ditman): Undo this manual change when the return type change to - // Future has propagated to stable. - /*@override - void requestFullscreen() => - super.noSuchMethod(Invocation.method(#requestFullscreen, []), - returnValueForMissingStub: null);*/ - @override - void after(Object? nodes) => - super.noSuchMethod(Invocation.method(#after, [nodes]), - returnValueForMissingStub: null); - @override - void before(Object? nodes) => - super.noSuchMethod(Invocation.method(#before, [nodes]), - returnValueForMissingStub: null); + (super.noSuchMethod(Invocation.method( + #closest, + [selectors], + )) as _i2.Element?); + @override + List<_i2.Animation> getAnimations() => (super.noSuchMethod( + Invocation.method( + #getAnimations, + [], + ), + returnValue: <_i2.Animation>[], + ) as List<_i2.Animation>); + @override + List getAttributeNames() => (super.noSuchMethod( + Invocation.method( + #getAttributeNames, + [], + ), + returnValue: [], + ) as List); + @override + _i3.Rectangle getBoundingClientRect() => (super.noSuchMethod( + Invocation.method( + #getBoundingClientRect, + [], + ), + returnValue: _FakeRectangle_1( + this, + Invocation.method( + #getBoundingClientRect, + [], + ), + ), + ) as _i3.Rectangle); + @override + List<_i2.Node> getDestinationInsertionPoints() => (super.noSuchMethod( + Invocation.method( + #getDestinationInsertionPoints, + [], + ), + returnValue: <_i2.Node>[], + ) as List<_i2.Node>); + @override + List<_i2.Node> getElementsByClassName(String? classNames) => + (super.noSuchMethod( + Invocation.method( + #getElementsByClassName, + [classNames], + ), + returnValue: <_i2.Node>[], + ) as List<_i2.Node>); + @override + bool hasPointerCapture(int? pointerId) => (super.noSuchMethod( + Invocation.method( + #hasPointerCapture, + [pointerId], + ), + returnValue: false, + ) as bool); + @override + void releasePointerCapture(int? pointerId) => super.noSuchMethod( + Invocation.method( + #releasePointerCapture, + [pointerId], + ), + returnValueForMissingStub: null, + ); + @override + void requestPointerLock() => super.noSuchMethod( + Invocation.method( + #requestPointerLock, + [], + ), + returnValueForMissingStub: null, + ); + @override + void scroll([ + dynamic options_OR_x, + num? y, + ]) => + super.noSuchMethod( + Invocation.method( + #scroll, + [ + options_OR_x, + y, + ], + ), + returnValueForMissingStub: null, + ); + @override + void scrollBy([ + dynamic options_OR_x, + num? y, + ]) => + super.noSuchMethod( + Invocation.method( + #scrollBy, + [ + options_OR_x, + y, + ], + ), + returnValueForMissingStub: null, + ); + @override + void scrollIntoViewIfNeeded([bool? centerIfNeeded]) => super.noSuchMethod( + Invocation.method( + #scrollIntoViewIfNeeded, + [centerIfNeeded], + ), + returnValueForMissingStub: null, + ); + @override + void scrollTo([ + dynamic options_OR_x, + num? y, + ]) => + super.noSuchMethod( + Invocation.method( + #scrollTo, + [ + options_OR_x, + y, + ], + ), + returnValueForMissingStub: null, + ); + @override + void setPointerCapture(int? pointerId) => super.noSuchMethod( + Invocation.method( + #setPointerCapture, + [pointerId], + ), + returnValueForMissingStub: null, + ); + @override + void after(Object? nodes) => super.noSuchMethod( + Invocation.method( + #after, + [nodes], + ), + returnValueForMissingStub: null, + ); + @override + void before(Object? nodes) => super.noSuchMethod( + Invocation.method( + #before, + [nodes], + ), + returnValueForMissingStub: null, + ); @override _i2.Element? querySelector(String? selectors) => - (super.noSuchMethod(Invocation.method(#querySelector, [selectors])) - as _i2.Element?); - @override - void remove() => super.noSuchMethod(Invocation.method(#remove, []), - returnValueForMissingStub: null); - @override - _i2.Node replaceWith(_i2.Node? otherNode) => - (super.noSuchMethod(Invocation.method(#replaceWith, [otherNode]), - returnValue: _FakeNode_13()) as _i2.Node); - @override - void insertAllBefore(Iterable<_i2.Node>? newNodes, _i2.Node? refChild) => + (super.noSuchMethod(Invocation.method( + #querySelector, + [selectors], + )) as _i2.Element?); + @override + void remove() => super.noSuchMethod( + Invocation.method( + #remove, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i2.Node replaceWith(_i2.Node? otherNode) => (super.noSuchMethod( + Invocation.method( + #replaceWith, + [otherNode], + ), + returnValue: _FakeNode_13( + this, + Invocation.method( + #replaceWith, + [otherNode], + ), + ), + ) as _i2.Node); + @override + void insertAllBefore( + Iterable<_i2.Node>? newNodes, + _i2.Node? child, + ) => super.noSuchMethod( - Invocation.method(#insertAllBefore, [newNodes, refChild]), - returnValueForMissingStub: null); - @override - _i2.Node append(_i2.Node? node) => - (super.noSuchMethod(Invocation.method(#append, [node]), - returnValue: _FakeNode_13()) as _i2.Node); - @override - _i2.Node clone(bool? deep) => - (super.noSuchMethod(Invocation.method(#clone, [deep]), - returnValue: _FakeNode_13()) as _i2.Node); - @override - bool contains(_i2.Node? other) => - (super.noSuchMethod(Invocation.method(#contains, [other]), - returnValue: false) as bool); - @override - _i2.Node getRootNode([Map? options]) => - (super.noSuchMethod(Invocation.method(#getRootNode, [options]), - returnValue: _FakeNode_13()) as _i2.Node); - @override - bool hasChildNodes() => - (super.noSuchMethod(Invocation.method(#hasChildNodes, []), - returnValue: false) as bool); - @override - _i2.Node insertBefore(_i2.Node? node, _i2.Node? child) => - (super.noSuchMethod(Invocation.method(#insertBefore, [node, child]), - returnValue: _FakeNode_13()) as _i2.Node); - @override - void addEventListener(String? type, _i2.EventListener? listener, - [bool? useCapture]) => + Invocation.method( + #insertAllBefore, + [ + newNodes, + child, + ], + ), + returnValueForMissingStub: null, + ); + @override + _i2.Node append(_i2.Node? node) => (super.noSuchMethod( + Invocation.method( + #append, + [node], + ), + returnValue: _FakeNode_13( + this, + Invocation.method( + #append, + [node], + ), + ), + ) as _i2.Node); + @override + _i2.Node clone(bool? deep) => (super.noSuchMethod( + Invocation.method( + #clone, + [deep], + ), + returnValue: _FakeNode_13( + this, + Invocation.method( + #clone, + [deep], + ), + ), + ) as _i2.Node); + @override + bool contains(_i2.Node? other) => (super.noSuchMethod( + Invocation.method( + #contains, + [other], + ), + returnValue: false, + ) as bool); + @override + _i2.Node getRootNode([Map? options]) => (super.noSuchMethod( + Invocation.method( + #getRootNode, + [options], + ), + returnValue: _FakeNode_13( + this, + Invocation.method( + #getRootNode, + [options], + ), + ), + ) as _i2.Node); + @override + bool hasChildNodes() => (super.noSuchMethod( + Invocation.method( + #hasChildNodes, + [], + ), + returnValue: false, + ) as bool); + @override + _i2.Node insertBefore( + _i2.Node? node, + _i2.Node? child, + ) => + (super.noSuchMethod( + Invocation.method( + #insertBefore, + [ + node, + child, + ], + ), + returnValue: _FakeNode_13( + this, + Invocation.method( + #insertBefore, + [ + node, + child, + ], + ), + ), + ) as _i2.Node); + @override + void addEventListener( + String? type, + _i2.EventListener? listener, [ + bool? useCapture, + ]) => super.noSuchMethod( - Invocation.method(#addEventListener, [type, listener, useCapture]), - returnValueForMissingStub: null); - @override - void removeEventListener(String? type, _i2.EventListener? listener, - [bool? useCapture]) => + Invocation.method( + #addEventListener, + [ + type, + listener, + useCapture, + ], + ), + returnValueForMissingStub: null, + ); + @override + void removeEventListener( + String? type, + _i2.EventListener? listener, [ + bool? useCapture, + ]) => super.noSuchMethod( - Invocation.method(#removeEventListener, [type, listener, useCapture]), - returnValueForMissingStub: null); - @override - bool dispatchEvent(_i2.Event? event) => - (super.noSuchMethod(Invocation.method(#dispatchEvent, [event]), - returnValue: false) as bool); + Invocation.method( + #removeEventListener, + [ + type, + listener, + useCapture, + ], + ), + returnValueForMissingStub: null, + ); + @override + bool dispatchEvent(_i2.Event? event) => (super.noSuchMethod( + Invocation.method( + #dispatchEvent, + [event], + ), + returnValue: false, + ) as bool); } /// A class which mocks [BuildContext]. @@ -1010,80 +2109,162 @@ class MockBuildContext extends _i1.Mock implements _i4.BuildContext { } @override - _i4.Widget get widget => (super.noSuchMethod(Invocation.getter(#widget), - returnValue: _FakeWidget_14()) as _i4.Widget); - @override - bool get debugDoingBuild => (super - .noSuchMethod(Invocation.getter(#debugDoingBuild), returnValue: false) - as bool); - @override - _i4.InheritedWidget dependOnInheritedElement(_i4.InheritedElement? ancestor, - {Object? aspect}) => + _i4.Widget get widget => (super.noSuchMethod( + Invocation.getter(#widget), + returnValue: _FakeWidget_14( + this, + Invocation.getter(#widget), + ), + ) as _i4.Widget); + @override + bool get mounted => (super.noSuchMethod( + Invocation.getter(#mounted), + returnValue: false, + ) as bool); + @override + bool get debugDoingBuild => (super.noSuchMethod( + Invocation.getter(#debugDoingBuild), + returnValue: false, + ) as bool); + @override + _i4.InheritedWidget dependOnInheritedElement( + _i4.InheritedElement? ancestor, { + Object? aspect, + }) => (super.noSuchMethod( + Invocation.method( + #dependOnInheritedElement, + [ancestor], + {#aspect: aspect}, + ), + returnValue: _FakeInheritedWidget_15( + this, Invocation.method( - #dependOnInheritedElement, [ancestor], {#aspect: aspect}), - returnValue: _FakeInheritedWidget_15()) as _i4.InheritedWidget); + #dependOnInheritedElement, + [ancestor], + {#aspect: aspect}, + ), + ), + ) as _i4.InheritedWidget); @override void visitAncestorElements(bool Function(_i4.Element)? visitor) => - super.noSuchMethod(Invocation.method(#visitAncestorElements, [visitor]), - returnValueForMissingStub: null); - @override - void visitChildElements(_i4.ElementVisitor? visitor) => - super.noSuchMethod(Invocation.method(#visitChildElements, [visitor]), - returnValueForMissingStub: null); - @override - _i5.DiagnosticsNode describeElement(String? name, - {_i5.DiagnosticsTreeStyle? style = - _i5.DiagnosticsTreeStyle.errorProperty}) => + super.noSuchMethod( + Invocation.method( + #visitAncestorElements, + [visitor], + ), + returnValueForMissingStub: null, + ); + @override + void visitChildElements(_i4.ElementVisitor? visitor) => super.noSuchMethod( + Invocation.method( + #visitChildElements, + [visitor], + ), + returnValueForMissingStub: null, + ); + @override + void dispatchNotification(_i7.Notification? notification) => + super.noSuchMethod( + Invocation.method( + #dispatchNotification, + [notification], + ), + returnValueForMissingStub: null, + ); + @override + _i5.DiagnosticsNode describeElement( + String? name, { + _i5.DiagnosticsTreeStyle? style = _i5.DiagnosticsTreeStyle.errorProperty, + }) => (super.noSuchMethod( - Invocation.method(#describeElement, [name], {#style: style}), - returnValue: _FakeDiagnosticsNode_16()) as _i5.DiagnosticsNode); - @override - _i5.DiagnosticsNode describeWidget(String? name, - {_i5.DiagnosticsTreeStyle? style = - _i5.DiagnosticsTreeStyle.errorProperty}) => + Invocation.method( + #describeElement, + [name], + {#style: style}, + ), + returnValue: _FakeDiagnosticsNode_16( + this, + Invocation.method( + #describeElement, + [name], + {#style: style}, + ), + ), + ) as _i5.DiagnosticsNode); + @override + _i5.DiagnosticsNode describeWidget( + String? name, { + _i5.DiagnosticsTreeStyle? style = _i5.DiagnosticsTreeStyle.errorProperty, + }) => (super.noSuchMethod( - Invocation.method(#describeWidget, [name], {#style: style}), - returnValue: _FakeDiagnosticsNode_16()) as _i5.DiagnosticsNode); + Invocation.method( + #describeWidget, + [name], + {#style: style}, + ), + returnValue: _FakeDiagnosticsNode_16( + this, + Invocation.method( + #describeWidget, + [name], + {#style: style}, + ), + ), + ) as _i5.DiagnosticsNode); @override List<_i5.DiagnosticsNode> describeMissingAncestor( - {Type? expectedAncestorType}) => + {required Type? expectedAncestorType}) => (super.noSuchMethod( - Invocation.method(#describeMissingAncestor, [], - {#expectedAncestorType: expectedAncestorType}), - returnValue: <_i5.DiagnosticsNode>[]) as List<_i5.DiagnosticsNode>); + Invocation.method( + #describeMissingAncestor, + [], + {#expectedAncestorType: expectedAncestorType}, + ), + returnValue: <_i5.DiagnosticsNode>[], + ) as List<_i5.DiagnosticsNode>); @override _i5.DiagnosticsNode describeOwnershipChain(String? name) => - (super.noSuchMethod(Invocation.method(#describeOwnershipChain, [name]), - returnValue: _FakeDiagnosticsNode_16()) as _i5.DiagnosticsNode); - @override - String toString() => super.toString(); + (super.noSuchMethod( + Invocation.method( + #describeOwnershipChain, + [name], + ), + returnValue: _FakeDiagnosticsNode_16( + this, + Invocation.method( + #describeOwnershipChain, + [name], + ), + ), + ) as _i5.DiagnosticsNode); } /// A class which mocks [CreationParams]. /// /// See the documentation for Mockito's code generation for more information. -class MockCreationParams extends _i1.Mock implements _i7.CreationParams { +class MockCreationParams extends _i1.Mock implements _i8.CreationParams { MockCreationParams() { _i1.throwOnMissingStub(this); } @override - Set get javascriptChannelNames => - (super.noSuchMethod(Invocation.getter(#javascriptChannelNames), - returnValue: {}) as Set); + Set get javascriptChannelNames => (super.noSuchMethod( + Invocation.getter(#javascriptChannelNames), + returnValue: {}, + ) as Set); @override _i8.AutoMediaPlaybackPolicy get autoMediaPlaybackPolicy => - (super.noSuchMethod(Invocation.getter(#autoMediaPlaybackPolicy), - returnValue: _i8.AutoMediaPlaybackPolicy - .require_user_action_for_all_media_types) - as _i8.AutoMediaPlaybackPolicy); - @override - List<_i7.WebViewCookie> get cookies => - (super.noSuchMethod(Invocation.getter(#cookies), - returnValue: <_i7.WebViewCookie>[]) as List<_i7.WebViewCookie>); - @override - String toString() => super.toString(); + (super.noSuchMethod( + Invocation.getter(#autoMediaPlaybackPolicy), + returnValue: + _i8.AutoMediaPlaybackPolicy.require_user_action_for_all_media_types, + ) as _i8.AutoMediaPlaybackPolicy); + @override + List<_i8.WebViewCookie> get cookies => (super.noSuchMethod( + Invocation.getter(#cookies), + returnValue: <_i8.WebViewCookie>[], + ) as List<_i8.WebViewCookie>); } /// A class which mocks [WebViewPlatformCallbacksHandler]. @@ -1096,29 +2277,53 @@ class MockWebViewPlatformCallbacksHandler extends _i1.Mock } @override - _i6.FutureOr onNavigationRequest({String? url, bool? isForMainFrame}) => + _i6.FutureOr onNavigationRequest({ + required String? url, + required bool? isForMainFrame, + }) => (super.noSuchMethod( - Invocation.method(#onNavigationRequest, [], - {#url: url, #isForMainFrame: isForMainFrame}), - returnValue: Future.value(false)) as _i6.FutureOr); - @override - void onPageStarted(String? url) => - super.noSuchMethod(Invocation.method(#onPageStarted, [url]), - returnValueForMissingStub: null); - @override - void onPageFinished(String? url) => - super.noSuchMethod(Invocation.method(#onPageFinished, [url]), - returnValueForMissingStub: null); - @override - void onProgress(int? progress) => - super.noSuchMethod(Invocation.method(#onProgress, [progress]), - returnValueForMissingStub: null); - @override - void onWebResourceError(_i7.WebResourceError? error) => - super.noSuchMethod(Invocation.method(#onWebResourceError, [error]), - returnValueForMissingStub: null); - @override - String toString() => super.toString(); + Invocation.method( + #onNavigationRequest, + [], + { + #url: url, + #isForMainFrame: isForMainFrame, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.FutureOr); + @override + void onPageStarted(String? url) => super.noSuchMethod( + Invocation.method( + #onPageStarted, + [url], + ), + returnValueForMissingStub: null, + ); + @override + void onPageFinished(String? url) => super.noSuchMethod( + Invocation.method( + #onPageFinished, + [url], + ), + returnValueForMissingStub: null, + ); + @override + void onProgress(int? progress) => super.noSuchMethod( + Invocation.method( + #onProgress, + [progress], + ), + returnValueForMissingStub: null, + ); + @override + void onWebResourceError(_i8.WebResourceError? error) => super.noSuchMethod( + Invocation.method( + #onWebResourceError, + [error], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [HttpRequestFactory]. @@ -1131,30 +2336,47 @@ class MockHttpRequestFactory extends _i1.Mock } @override - _i6.Future<_i2.HttpRequest> request(String? url, - {String? method, - bool? withCredentials, - String? responseType, - String? mimeType, - Map? requestHeaders, - dynamic sendData, - void Function(_i2.ProgressEvent)? onProgress}) => + _i6.Future<_i2.HttpRequest> request( + String? url, { + String? method, + bool? withCredentials, + String? responseType, + String? mimeType, + Map? requestHeaders, + dynamic sendData, + void Function(_i2.ProgressEvent)? onProgress, + }) => (super.noSuchMethod( - Invocation.method(#request, [ - url - ], { - #method: method, - #withCredentials: withCredentials, - #responseType: responseType, - #mimeType: mimeType, - #requestHeaders: requestHeaders, - #sendData: sendData, - #onProgress: onProgress - }), - returnValue: Future<_i2.HttpRequest>.value(_FakeHttpRequest_17())) - as _i6.Future<_i2.HttpRequest>); - @override - String toString() => super.toString(); + Invocation.method( + #request, + [url], + { + #method: method, + #withCredentials: withCredentials, + #responseType: responseType, + #mimeType: mimeType, + #requestHeaders: requestHeaders, + #sendData: sendData, + #onProgress: onProgress, + }, + ), + returnValue: _i6.Future<_i2.HttpRequest>.value(_FakeHttpRequest_17( + this, + Invocation.method( + #request, + [url], + { + #method: method, + #withCredentials: withCredentials, + #responseType: responseType, + #mimeType: mimeType, + #requestHeaders: requestHeaders, + #sendData: sendData, + #onProgress: onProgress, + }, + ), + )), + ) as _i6.Future<_i2.HttpRequest>); } /// A class which mocks [HttpRequest]. @@ -1166,122 +2388,216 @@ class MockHttpRequest extends _i1.Mock implements _i2.HttpRequest { } @override - Map get responseHeaders => - (super.noSuchMethod(Invocation.getter(#responseHeaders), - returnValue: {}) as Map); - @override - int get readyState => - (super.noSuchMethod(Invocation.getter(#readyState), returnValue: 0) - as int); - @override - String get responseType => - (super.noSuchMethod(Invocation.getter(#responseType), returnValue: '') - as String); - @override - set responseType(String? value) => - super.noSuchMethod(Invocation.setter(#responseType, value), - returnValueForMissingStub: null); - @override - set timeout(int? value) => - super.noSuchMethod(Invocation.setter(#timeout, value), - returnValueForMissingStub: null); - @override - _i2.HttpRequestUpload get upload => - (super.noSuchMethod(Invocation.getter(#upload), - returnValue: _FakeHttpRequestUpload_18()) as _i2.HttpRequestUpload); - @override - set withCredentials(bool? value) => - super.noSuchMethod(Invocation.setter(#withCredentials, value), - returnValueForMissingStub: null); - @override - _i6.Stream<_i2.Event> get onReadyStateChange => - (super.noSuchMethod(Invocation.getter(#onReadyStateChange), - returnValue: Stream<_i2.Event>.empty()) as _i6.Stream<_i2.Event>); - @override - _i6.Stream<_i2.ProgressEvent> get onAbort => - (super.noSuchMethod(Invocation.getter(#onAbort), - returnValue: Stream<_i2.ProgressEvent>.empty()) - as _i6.Stream<_i2.ProgressEvent>); - @override - _i6.Stream<_i2.ProgressEvent> get onError => - (super.noSuchMethod(Invocation.getter(#onError), - returnValue: Stream<_i2.ProgressEvent>.empty()) - as _i6.Stream<_i2.ProgressEvent>); - @override - _i6.Stream<_i2.ProgressEvent> get onLoad => - (super.noSuchMethod(Invocation.getter(#onLoad), - returnValue: Stream<_i2.ProgressEvent>.empty()) - as _i6.Stream<_i2.ProgressEvent>); - @override - _i6.Stream<_i2.ProgressEvent> get onLoadEnd => - (super.noSuchMethod(Invocation.getter(#onLoadEnd), - returnValue: Stream<_i2.ProgressEvent>.empty()) - as _i6.Stream<_i2.ProgressEvent>); - @override - _i6.Stream<_i2.ProgressEvent> get onLoadStart => - (super.noSuchMethod(Invocation.getter(#onLoadStart), - returnValue: Stream<_i2.ProgressEvent>.empty()) - as _i6.Stream<_i2.ProgressEvent>); - @override - _i6.Stream<_i2.ProgressEvent> get onProgress => - (super.noSuchMethod(Invocation.getter(#onProgress), - returnValue: Stream<_i2.ProgressEvent>.empty()) - as _i6.Stream<_i2.ProgressEvent>); - @override - _i6.Stream<_i2.ProgressEvent> get onTimeout => - (super.noSuchMethod(Invocation.getter(#onTimeout), - returnValue: Stream<_i2.ProgressEvent>.empty()) - as _i6.Stream<_i2.ProgressEvent>); - @override - _i2.Events get on => - (super.noSuchMethod(Invocation.getter(#on), returnValue: _FakeEvents_19()) - as _i2.Events); - @override - void open(String? method, String? url, - {bool? async, String? user, String? password}) => + Map get responseHeaders => (super.noSuchMethod( + Invocation.getter(#responseHeaders), + returnValue: {}, + ) as Map); + @override + int get readyState => (super.noSuchMethod( + Invocation.getter(#readyState), + returnValue: 0, + ) as int); + @override + String get responseType => (super.noSuchMethod( + Invocation.getter(#responseType), + returnValue: '', + ) as String); + @override + set responseType(String? value) => super.noSuchMethod( + Invocation.setter( + #responseType, + value, + ), + returnValueForMissingStub: null, + ); + @override + set timeout(int? value) => super.noSuchMethod( + Invocation.setter( + #timeout, + value, + ), + returnValueForMissingStub: null, + ); + @override + _i2.HttpRequestUpload get upload => (super.noSuchMethod( + Invocation.getter(#upload), + returnValue: _FakeHttpRequestUpload_18( + this, + Invocation.getter(#upload), + ), + ) as _i2.HttpRequestUpload); + @override + set withCredentials(bool? value) => super.noSuchMethod( + Invocation.setter( + #withCredentials, + value, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Stream<_i2.Event> get onReadyStateChange => (super.noSuchMethod( + Invocation.getter(#onReadyStateChange), + returnValue: _i6.Stream<_i2.Event>.empty(), + ) as _i6.Stream<_i2.Event>); + @override + _i6.Stream<_i2.ProgressEvent> get onAbort => (super.noSuchMethod( + Invocation.getter(#onAbort), + returnValue: _i6.Stream<_i2.ProgressEvent>.empty(), + ) as _i6.Stream<_i2.ProgressEvent>); + @override + _i6.Stream<_i2.ProgressEvent> get onError => (super.noSuchMethod( + Invocation.getter(#onError), + returnValue: _i6.Stream<_i2.ProgressEvent>.empty(), + ) as _i6.Stream<_i2.ProgressEvent>); + @override + _i6.Stream<_i2.ProgressEvent> get onLoad => (super.noSuchMethod( + Invocation.getter(#onLoad), + returnValue: _i6.Stream<_i2.ProgressEvent>.empty(), + ) as _i6.Stream<_i2.ProgressEvent>); + @override + _i6.Stream<_i2.ProgressEvent> get onLoadEnd => (super.noSuchMethod( + Invocation.getter(#onLoadEnd), + returnValue: _i6.Stream<_i2.ProgressEvent>.empty(), + ) as _i6.Stream<_i2.ProgressEvent>); + @override + _i6.Stream<_i2.ProgressEvent> get onLoadStart => (super.noSuchMethod( + Invocation.getter(#onLoadStart), + returnValue: _i6.Stream<_i2.ProgressEvent>.empty(), + ) as _i6.Stream<_i2.ProgressEvent>); + @override + _i6.Stream<_i2.ProgressEvent> get onProgress => (super.noSuchMethod( + Invocation.getter(#onProgress), + returnValue: _i6.Stream<_i2.ProgressEvent>.empty(), + ) as _i6.Stream<_i2.ProgressEvent>); + @override + _i6.Stream<_i2.ProgressEvent> get onTimeout => (super.noSuchMethod( + Invocation.getter(#onTimeout), + returnValue: _i6.Stream<_i2.ProgressEvent>.empty(), + ) as _i6.Stream<_i2.ProgressEvent>); + @override + _i2.Events get on => (super.noSuchMethod( + Invocation.getter(#on), + returnValue: _FakeEvents_19( + this, + Invocation.getter(#on), + ), + ) as _i2.Events); + @override + void open( + String? method, + String? url, { + bool? async, + String? user, + String? password, + }) => super.noSuchMethod( - Invocation.method(#open, [method, url], - {#async: async, #user: user, #password: password}), - returnValueForMissingStub: null); - @override - void abort() => super.noSuchMethod(Invocation.method(#abort, []), - returnValueForMissingStub: null); - @override - String getAllResponseHeaders() => - (super.noSuchMethod(Invocation.method(#getAllResponseHeaders, []), - returnValue: '') as String); + Invocation.method( + #open, + [ + method, + url, + ], + { + #async: async, + #user: user, + #password: password, + }, + ), + returnValueForMissingStub: null, + ); + @override + void abort() => super.noSuchMethod( + Invocation.method( + #abort, + [], + ), + returnValueForMissingStub: null, + ); + @override + String getAllResponseHeaders() => (super.noSuchMethod( + Invocation.method( + #getAllResponseHeaders, + [], + ), + returnValue: '', + ) as String); @override String? getResponseHeader(String? name) => - (super.noSuchMethod(Invocation.method(#getResponseHeader, [name])) - as String?); - @override - void overrideMimeType(String? mime) => - super.noSuchMethod(Invocation.method(#overrideMimeType, [mime]), - returnValueForMissingStub: null); - @override - void send([dynamic body_OR_data]) => - super.noSuchMethod(Invocation.method(#send, [body_OR_data]), - returnValueForMissingStub: null); - @override - void setRequestHeader(String? name, String? value) => - super.noSuchMethod(Invocation.method(#setRequestHeader, [name, value]), - returnValueForMissingStub: null); - @override - void addEventListener(String? type, _i2.EventListener? listener, - [bool? useCapture]) => + (super.noSuchMethod(Invocation.method( + #getResponseHeader, + [name], + )) as String?); + @override + void overrideMimeType(String? mime) => super.noSuchMethod( + Invocation.method( + #overrideMimeType, + [mime], + ), + returnValueForMissingStub: null, + ); + @override + void send([dynamic body_OR_data]) => super.noSuchMethod( + Invocation.method( + #send, + [body_OR_data], + ), + returnValueForMissingStub: null, + ); + @override + void setRequestHeader( + String? name, + String? value, + ) => super.noSuchMethod( - Invocation.method(#addEventListener, [type, listener, useCapture]), - returnValueForMissingStub: null); - @override - void removeEventListener(String? type, _i2.EventListener? listener, - [bool? useCapture]) => + Invocation.method( + #setRequestHeader, + [ + name, + value, + ], + ), + returnValueForMissingStub: null, + ); + @override + void addEventListener( + String? type, + _i2.EventListener? listener, [ + bool? useCapture, + ]) => super.noSuchMethod( - Invocation.method(#removeEventListener, [type, listener, useCapture]), - returnValueForMissingStub: null); - @override - bool dispatchEvent(_i2.Event? event) => - (super.noSuchMethod(Invocation.method(#dispatchEvent, [event]), - returnValue: false) as bool); - @override - String toString() => super.toString(); + Invocation.method( + #addEventListener, + [ + type, + listener, + useCapture, + ], + ), + returnValueForMissingStub: null, + ); + @override + void removeEventListener( + String? type, + _i2.EventListener? listener, [ + bool? useCapture, + ]) => + super.noSuchMethod( + Invocation.method( + #removeEventListener, + [ + type, + listener, + useCapture, + ], + ), + returnValueForMissingStub: null, + ); + @override + bool dispatchEvent(_i2.Event? event) => (super.noSuchMethod( + Invocation.method( + #dispatchEvent, + [event], + ), + returnValue: false, + ) as bool); } diff --git a/packages/webview_flutter/webview_flutter_wkwebview/example/pubspec.yaml b/packages/webview_flutter/webview_flutter_wkwebview/example/pubspec.yaml index 495f5aeb87e6..a3f65b861944 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/example/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_wkwebview/example/pubspec.yaml @@ -19,7 +19,6 @@ dependencies: path: ../ dev_dependencies: - espresso: ^0.1.0+2 flutter_driver: sdk: flutter flutter_test: diff --git a/script/configs/exclude_integration_ios.yaml b/script/configs/exclude_integration_ios.yaml index 19dfdb0350dc..2d535cd4f0dc 100644 --- a/script/configs/exclude_integration_ios.yaml +++ b/script/configs/exclude_integration_ios.yaml @@ -1,5 +1,3 @@ -# Currently missing: https://github.com/flutter/flutter/issues/81695 -- in_app_purchase_storekit # Currently missing: https://github.com/flutter/flutter/issues/82208 - ios_platform_images # Can't use Flutter integration tests due to native modal UI. diff --git a/script/tool/CHANGELOG.md b/script/tool/CHANGELOG.md index f62509040a3d..a346ac093c68 100644 --- a/script/tool/CHANGELOG.md +++ b/script/tool/CHANGELOG.md @@ -1,4 +1,21 @@ -## 12.0 +## NEXT + +* Pins `package:git` dependency to `2.0.x` until `dart >=2.18.0` becomes our + oldest legacy. +* Updates test mocks. + +## 0.13.0 + +* Renames `all-plugins-app` to `create-all-packages-app` to clarify what it + actually does. Also renames the project directory it creates from + `all_plugins` to `all_packages`. + +## 0.12.1 + +* Modifies `publish_check_command.dart` to do a `dart pub get` in all examples + of the package being checked. Workaround for [dart-lang/pub#3618](https://github.com/dart-lang/pub/issues/3618). + +## 0.12.0 * Changes the behavior of `--packages-for-branch` on main/master to run for packages changed in the last commit, rather than running for all packages. @@ -6,7 +23,7 @@ tested in presubmit. * Adds a `fix` command to run `dart fix --apply` in target packages. -## 0.11 +## 0.11.0 * Renames `publish-plugin` to `publish`. * Renames arguments to `list`: diff --git a/script/tool/lib/src/common/package_state_utils.dart b/script/tool/lib/src/common/package_state_utils.dart index a0c82400e1db..65f311974f3a 100644 --- a/script/tool/lib/src/common/package_state_utils.dart +++ b/script/tool/lib/src/common/package_state_utils.dart @@ -173,10 +173,25 @@ Future _isDevChange(List pathComponents, pathComponents.first == 'run_tests.sh' || // Ignoring lints doesn't affect clients. pathComponents.contains('lint-baseline.xml') || + // Example build files are very unlikely to be interesting to clients. + _isExampleBuildFile(pathComponents) || + // Test-only gradle depenedencies don't affect clients. await _isGradleTestDependencyChange(pathComponents, git: git, repoPath: repoPath); } +bool _isExampleBuildFile(List pathComponents) { + if (!pathComponents.contains('example')) { + return false; + } + return pathComponents.contains('gradle-wrapper.properties') || + pathComponents.contains('gradle.properties') || + pathComponents.contains('build.gradle') || + pathComponents.contains('Runner.xcodeproj') || + pathComponents.contains('CMakeLists.txt') || + pathComponents.contains('pubspec.yaml'); +} + Future _isGradleTestDependencyChange(List pathComponents, {GitVersionFinder? git, String? repoPath}) async { if (git == null) { diff --git a/script/tool/lib/src/create_all_plugins_app_command.dart b/script/tool/lib/src/create_all_packages_app_command.dart similarity index 69% rename from script/tool/lib/src/create_all_plugins_app_command.dart rename to script/tool/lib/src/create_all_packages_app_command.dart index a23dc83d98f3..142a992972ca 100644 --- a/script/tool/lib/src/create_all_plugins_app_command.dart +++ b/script/tool/lib/src/create_all_packages_app_command.dart @@ -6,44 +6,55 @@ import 'dart:io' as io; import 'package:file/file.dart'; import 'package:path/path.dart' as p; +import 'package:platform/platform.dart'; import 'package:pub_semver/pub_semver.dart'; import 'package:pubspec_parse/pubspec_parse.dart'; import 'common/core.dart'; import 'common/package_command.dart'; +import 'common/process_runner.dart'; import 'common/repository_package.dart'; const String _outputDirectoryFlag = 'output-dir'; +const String _projectName = 'all_packages'; + +const int _exitUpdateMacosPodfileFailed = 3; +const int _exitUpdateMacosPbxprojFailed = 4; +const int _exitGenNativeBuildFilesFailed = 5; + /// A command to create an application that builds all in a single application. -class CreateAllPluginsAppCommand extends PackageCommand { +class CreateAllPackagesAppCommand extends PackageCommand { /// Creates an instance of the builder command. - CreateAllPluginsAppCommand( + CreateAllPackagesAppCommand( Directory packagesDir, { + ProcessRunner processRunner = const ProcessRunner(), Directory? pluginsRoot, - }) : super(packagesDir) { + Platform platform = const LocalPlatform(), + }) : super(packagesDir, processRunner: processRunner, platform: platform) { final Directory defaultDir = pluginsRoot ?? packagesDir.fileSystem.currentDirectory; argParser.addOption(_outputDirectoryFlag, defaultsTo: defaultDir.path, - help: 'The path the directory to create the "all_plugins" project in.\n' + help: + 'The path the directory to create the "$_projectName" project in.\n' 'Defaults to the repository root.'); } /// The location to create the synthesized app project. Directory get _appDirectory => packagesDir.fileSystem .directory(getStringArg(_outputDirectoryFlag)) - .childDirectory('all_plugins'); + .childDirectory(_projectName); /// The synthesized app project. RepositoryPackage get app => RepositoryPackage(_appDirectory); @override String get description => - 'Generate Flutter app that includes all plugins in packages.'; + 'Generate Flutter app that includes all target packagas.'; @override - String get name => 'all-plugins-app'; + String get name => 'create-all-packages-app'; @override Future run() async { @@ -61,10 +72,28 @@ class CreateAllPluginsAppCommand extends PackageCommand { print(''); } + await _genPubspecWithAllPlugins(); + + // Run `flutter pub get` to generate all native build files. + // TODO(stuartmorgan): This hangs on Windows for some reason. Since it's + // currently not needed on Windows, skip it there, but we should investigate + // further and/or implement https://github.com/flutter/flutter/issues/93407, + // and remove the need for this conditional. + if (!platform.isWindows) { + if (!await _genNativeBuildFiles()) { + printError( + "Failed to generate native build files via 'flutter pub get'"); + throw ToolExit(_exitGenNativeBuildFilesFailed); + } + } + await Future.wait(>[ - _genPubspecWithAllPlugins(), _updateAppGradle(), _updateManifest(), + _updateMacosPbxproj(), + // This step requires the native file generation triggered by + // flutter pub get above, so can't currently be run on Windows. + if (!platform.isWindows) _updateMacosPodfile(), ]); } @@ -74,7 +103,7 @@ class CreateAllPluginsAppCommand extends PackageCommand { [ 'create', '--template=app', - '--project-name=all_plugins', + '--project-name=$_projectName', '--android-language=java', _appDirectory.path, ], @@ -134,9 +163,9 @@ class CreateAllPluginsAppCommand extends PackageCommand { final StringBuffer newManifest = StringBuffer(); for (final String line in manifestFile.readAsLinesSync()) { - if (line.contains('package="com.example.all_plugins"')) { + if (line.contains('package="com.example.$_projectName"')) { newManifest - ..writeln('package="com.example.all_plugins"') + ..writeln('package="com.example.$_projectName"') ..writeln('xmlns:tools="http://schemas.android.com/tools">') ..writeln() ..writeln( @@ -165,7 +194,7 @@ class CreateAllPluginsAppCommand extends PackageCommand { final Map pluginDeps = await _getValidPathDependencies(); final Pubspec pubspec = Pubspec( - 'all_plugins', + _projectName, description: 'Flutter app containing all 1st party plugins.', version: Version.parse('1.0.0+1'), environment: { @@ -259,4 +288,61 @@ dev_dependencies:${_pubspecMapString(pubspec.devDependencies)} return buffer.toString(); } + + Future _genNativeBuildFiles() async { + final int exitCode = await processRunner.runAndStream( + flutterCommand, + ['pub', 'get'], + workingDir: _appDirectory, + ); + return exitCode == 0; + } + + Future _updateMacosPodfile() async { + /// Only change the macOS deployment target if the host platform is macOS. + /// The Podfile is not generated on other platforms. + if (!platform.isMacOS) { + return; + } + + final File podfileFile = + app.platformDirectory(FlutterPlatform.macos).childFile('Podfile'); + if (!podfileFile.existsSync()) { + printError("Can't find Podfile for macOS"); + throw ToolExit(_exitUpdateMacosPodfileFailed); + } + + final StringBuffer newPodfile = StringBuffer(); + for (final String line in podfileFile.readAsLinesSync()) { + if (line.contains('platform :osx')) { + // macOS 10.15 is required by in_app_purchase. + newPodfile.writeln("platform :osx, '10.15'"); + } else { + newPodfile.writeln(line); + } + } + podfileFile.writeAsStringSync(newPodfile.toString()); + } + + Future _updateMacosPbxproj() async { + final File pbxprojFile = app + .platformDirectory(FlutterPlatform.macos) + .childDirectory('Runner.xcodeproj') + .childFile('project.pbxproj'); + if (!pbxprojFile.existsSync()) { + printError("Can't find project.pbxproj for macOS"); + throw ToolExit(_exitUpdateMacosPbxprojFailed); + } + + final StringBuffer newPbxproj = StringBuffer(); + for (final String line in pbxprojFile.readAsLinesSync()) { + if (line.contains('MACOSX_DEPLOYMENT_TARGET')) { + // macOS 10.15 is required by in_app_purchase. + newPbxproj.writeln(' MACOSX_DEPLOYMENT_TARGET = 10.15;'); + } else { + newPbxproj.writeln(line); + } + } + pbxprojFile.writeAsStringSync(newPbxproj.toString()); + } } diff --git a/script/tool/lib/src/main.dart b/script/tool/lib/src/main.dart index 414ca7f303c0..2d48f079b306 100644 --- a/script/tool/lib/src/main.dart +++ b/script/tool/lib/src/main.dart @@ -11,7 +11,7 @@ import 'package:file/local.dart'; import 'analyze_command.dart'; import 'build_examples_command.dart'; import 'common/core.dart'; -import 'create_all_plugins_app_command.dart'; +import 'create_all_packages_app_command.dart'; import 'custom_test_command.dart'; import 'dependabot_check_command.dart'; import 'drive_examples_command.dart'; @@ -56,7 +56,7 @@ void main(List args) { 'Productivity utils for hosting multiple plugins within one repository.') ..addCommand(AnalyzeCommand(packagesDir)) ..addCommand(BuildExamplesCommand(packagesDir)) - ..addCommand(CreateAllPluginsAppCommand(packagesDir)) + ..addCommand(CreateAllPackagesAppCommand(packagesDir)) ..addCommand(CustomTestCommand(packagesDir)) ..addCommand(DependabotCheckCommand(packagesDir)) ..addCommand(DriveExamplesCommand(packagesDir)) diff --git a/script/tool/lib/src/publish_check_command.dart b/script/tool/lib/src/publish_check_command.dart index 38e1b7bdebbb..14b240dc04c2 100644 --- a/script/tool/lib/src/publish_check_command.dart +++ b/script/tool/lib/src/publish_check_command.dart @@ -130,7 +130,23 @@ class PublishCheckCommand extends PackageLoopingCommand { } } + // Run `dart pub get` on the examples of [package]. + Future _fetchExampleDeps(RepositoryPackage package) async { + for (final RepositoryPackage example in package.getExamples()) { + await processRunner.runAndStream( + 'dart', + ['pub', 'get'], + workingDir: example.directory, + ); + } + } + Future _hasValidPublishCheckRun(RepositoryPackage package) async { + // `pub publish` does not do `dart pub get` inside `example` directories + // of a package (but they're part of the analysis output!). + // Issue: https://github.com/flutter/flutter/issues/113788 + await _fetchExampleDeps(package); + print('Running pub publish --dry-run:'); final io.Process process = await processRunner.start( flutterCommand, diff --git a/script/tool/pubspec.yaml b/script/tool/pubspec.yaml index 9e767ad724c0..e450a1114e87 100644 --- a/script/tool/pubspec.yaml +++ b/script/tool/pubspec.yaml @@ -1,7 +1,7 @@ name: flutter_plugin_tools description: Productivity utils for flutter/plugins and flutter/packages repository: https://github.com/flutter/plugins/tree/main/script/tool -version: 0.12.0 +version: 0.13.0 dependencies: args: ^2.1.0 @@ -9,7 +9,8 @@ dependencies: collection: ^1.15.0 colorize: ^3.0.0 file: ^6.1.0 - git: ^2.0.0 + # Pin git to 2.0.x until dart >=2.18 is legacy + git: '>=2.0.0 <2.1.0' http: ^0.13.3 http_multi_server: ^3.0.1 meta: ^1.3.0 diff --git a/script/tool/test/common/package_command_test.mocks.dart b/script/tool/test/common/package_command_test.mocks.dart index b7f7807b3b05..79c5d4df1a8c 100644 --- a/script/tool/test/common/package_command_test.mocks.dart +++ b/script/tool/test/common/package_command_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.7 from annotations -// in flutter_plugin_tools/test/common_test.dart. +// Mocks generated by Mockito 5.3.2 from annotations +// in flutter_plugin_tools/test/common/package_command_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:io' as _i4; @@ -13,18 +14,47 @@ import 'package:git/src/tag.dart' as _i7; import 'package:git/src/tree_entry.dart' as _i9; import 'package:mockito/mockito.dart' as _i1; +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references -// ignore_for_file: unnecessary_parenthesis - +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -// ignore_for_file: avoid_redundant_argument_values - -class _FakeCommit extends _i1.Fake implements _i2.Commit {} +class _FakeCommit_0 extends _i1.SmartFake implements _i2.Commit { + _FakeCommit_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeBranchReference extends _i1.Fake implements _i3.BranchReference {} +class _FakeBranchReference_1 extends _i1.SmartFake + implements _i3.BranchReference { + _FakeBranchReference_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeProcessResult extends _i1.Fake implements _i4.ProcessResult {} +class _FakeProcessResult_2 extends _i1.SmartFake implements _i4.ProcessResult { + _FakeProcessResult_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [GitDir]. /// @@ -35,109 +65,222 @@ class MockGitDir extends _i1.Mock implements _i5.GitDir { } @override - String get path => - (super.noSuchMethod(Invocation.getter(#path), returnValue: '') as String); + String get path => (super.noSuchMethod( + Invocation.getter(#path), + returnValue: '', + ) as String); @override _i6.Future commitCount([String? branchName = r'HEAD']) => - (super.noSuchMethod(Invocation.method(#commitCount, [branchName]), - returnValue: Future.value(0)) as _i6.Future); + (super.noSuchMethod( + Invocation.method( + #commitCount, + [branchName], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); @override _i6.Future<_i2.Commit> commitFromRevision(String? revision) => - (super.noSuchMethod(Invocation.method(#commitFromRevision, [revision]), - returnValue: Future<_i2.Commit>.value(_FakeCommit())) - as _i6.Future<_i2.Commit>); + (super.noSuchMethod( + Invocation.method( + #commitFromRevision, + [revision], + ), + returnValue: _i6.Future<_i2.Commit>.value(_FakeCommit_0( + this, + Invocation.method( + #commitFromRevision, + [revision], + ), + )), + ) as _i6.Future<_i2.Commit>); @override _i6.Future> commits([String? branchName = r'HEAD']) => - (super.noSuchMethod(Invocation.method(#commits, [branchName]), - returnValue: - Future>.value({})) - as _i6.Future>); + (super.noSuchMethod( + Invocation.method( + #commits, + [branchName], + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future<_i3.BranchReference?> branchReference(String? branchName) => - (super.noSuchMethod(Invocation.method(#branchReference, [branchName]), - returnValue: - Future<_i3.BranchReference?>.value(_FakeBranchReference())) - as _i6.Future<_i3.BranchReference?>); + (super.noSuchMethod( + Invocation.method( + #branchReference, + [branchName], + ), + returnValue: _i6.Future<_i3.BranchReference?>.value(), + ) as _i6.Future<_i3.BranchReference?>); @override _i6.Future> branches() => (super.noSuchMethod( - Invocation.method(#branches, []), - returnValue: - Future>.value(<_i3.BranchReference>[])) - as _i6.Future>); + Invocation.method( + #branches, + [], + ), + returnValue: _i6.Future>.value( + <_i3.BranchReference>[]), + ) as _i6.Future>); @override - _i6.Stream<_i7.Tag> tags() => - (super.noSuchMethod(Invocation.method(#tags, []), - returnValue: Stream<_i7.Tag>.empty()) as _i6.Stream<_i7.Tag>); + _i6.Stream<_i7.Tag> tags() => (super.noSuchMethod( + Invocation.method( + #tags, + [], + ), + returnValue: _i6.Stream<_i7.Tag>.empty(), + ) as _i6.Stream<_i7.Tag>); @override - _i6.Future> showRef( - {bool? heads = false, bool? tags = false}) => + _i6.Future> showRef({ + bool? heads = false, + bool? tags = false, + }) => (super.noSuchMethod( - Invocation.method(#showRef, [], {#heads: heads, #tags: tags}), - returnValue: Future>.value( - <_i8.CommitReference>[])) - as _i6.Future>); - @override - _i6.Future<_i3.BranchReference> currentBranch() => - (super.noSuchMethod(Invocation.method(#currentBranch, []), - returnValue: - Future<_i3.BranchReference>.value(_FakeBranchReference())) - as _i6.Future<_i3.BranchReference>); - @override - _i6.Future> lsTree(String? treeish, - {bool? subTreesOnly = false, String? path}) => + Invocation.method( + #showRef, + [], + { + #heads: heads, + #tags: tags, + }, + ), + returnValue: _i6.Future>.value( + <_i8.CommitReference>[]), + ) as _i6.Future>); + @override + _i6.Future<_i3.BranchReference> currentBranch() => (super.noSuchMethod( + Invocation.method( + #currentBranch, + [], + ), + returnValue: + _i6.Future<_i3.BranchReference>.value(_FakeBranchReference_1( + this, + Invocation.method( + #currentBranch, + [], + ), + )), + ) as _i6.Future<_i3.BranchReference>); + @override + _i6.Future> lsTree( + String? treeish, { + bool? subTreesOnly = false, + String? path, + }) => (super.noSuchMethod( - Invocation.method(#lsTree, [treeish], - {#subTreesOnly: subTreesOnly, #path: path}), - returnValue: Future>.value(<_i9.TreeEntry>[])) - as _i6.Future>); + Invocation.method( + #lsTree, + [treeish], + { + #subTreesOnly: subTreesOnly, + #path: path, + }, + ), + returnValue: _i6.Future>.value(<_i9.TreeEntry>[]), + ) as _i6.Future>); @override _i6.Future createOrUpdateBranch( - String? branchName, String? treeSha, String? commitMessage) => + String? branchName, + String? treeSha, + String? commitMessage, + ) => (super.noSuchMethod( - Invocation.method( - #createOrUpdateBranch, [branchName, treeSha, commitMessage]), - returnValue: Future.value('')) as _i6.Future); + Invocation.method( + #createOrUpdateBranch, + [ + branchName, + treeSha, + commitMessage, + ], + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); @override - _i6.Future commitTree(String? treeSha, String? commitMessage, - {List? parentCommitShas}) => + _i6.Future commitTree( + String? treeSha, + String? commitMessage, { + List? parentCommitShas, + }) => (super.noSuchMethod( - Invocation.method(#commitTree, [treeSha, commitMessage], - {#parentCommitShas: parentCommitShas}), - returnValue: Future.value('')) as _i6.Future); + Invocation.method( + #commitTree, + [ + treeSha, + commitMessage, + ], + {#parentCommitShas: parentCommitShas}, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); @override _i6.Future> writeObjects(List? paths) => - (super.noSuchMethod(Invocation.method(#writeObjects, [paths]), - returnValue: - Future>.value({})) - as _i6.Future>); + (super.noSuchMethod( + Invocation.method( + #writeObjects, + [paths], + ), + returnValue: _i6.Future>.value({}), + ) as _i6.Future>); @override - _i6.Future<_i4.ProcessResult> runCommand(Iterable? args, - {bool? throwOnError = true}) => + _i6.Future<_i4.ProcessResult> runCommand( + Iterable? args, { + bool? throwOnError = true, + }) => (super.noSuchMethod( - Invocation.method(#runCommand, [args], {#throwOnError: throwOnError}), - returnValue: - Future<_i4.ProcessResult>.value(_FakeProcessResult())) as _i6 - .Future<_i4.ProcessResult>); + Invocation.method( + #runCommand, + [args], + {#throwOnError: throwOnError}, + ), + returnValue: _i6.Future<_i4.ProcessResult>.value(_FakeProcessResult_2( + this, + Invocation.method( + #runCommand, + [args], + {#throwOnError: throwOnError}, + ), + )), + ) as _i6.Future<_i4.ProcessResult>); @override - _i6.Future isWorkingTreeClean() => - (super.noSuchMethod(Invocation.method(#isWorkingTreeClean, []), - returnValue: Future.value(false)) as _i6.Future); + _i6.Future isWorkingTreeClean() => (super.noSuchMethod( + Invocation.method( + #isWorkingTreeClean, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); @override _i6.Future<_i2.Commit?> updateBranch( - String? branchName, - _i6.Future Function(_i4.Directory)? populater, - String? commitMessage) => + String? branchName, + _i6.Future Function(_i4.Directory)? populater, + String? commitMessage, + ) => (super.noSuchMethod( - Invocation.method( - #updateBranch, [branchName, populater, commitMessage]), - returnValue: Future<_i2.Commit?>.value(_FakeCommit())) - as _i6.Future<_i2.Commit?>); + Invocation.method( + #updateBranch, + [ + branchName, + populater, + commitMessage, + ], + ), + returnValue: _i6.Future<_i2.Commit?>.value(), + ) as _i6.Future<_i2.Commit?>); @override - _i6.Future<_i2.Commit?> updateBranchWithDirectoryContents(String? branchName, - String? sourceDirectoryPath, String? commitMessage) => + _i6.Future<_i2.Commit?> updateBranchWithDirectoryContents( + String? branchName, + String? sourceDirectoryPath, + String? commitMessage, + ) => (super.noSuchMethod( - Invocation.method(#updateBranchWithDirectoryContents, - [branchName, sourceDirectoryPath, commitMessage]), - returnValue: Future<_i2.Commit?>.value(_FakeCommit())) - as _i6.Future<_i2.Commit?>); + Invocation.method( + #updateBranchWithDirectoryContents, + [ + branchName, + sourceDirectoryPath, + commitMessage, + ], + ), + returnValue: _i6.Future<_i2.Commit?>.value(), + ) as _i6.Future<_i2.Commit?>); } diff --git a/script/tool/test/common/package_state_utils_test.dart b/script/tool/test/common/package_state_utils_test.dart index c20951876e39..c9ae5ba4c742 100644 --- a/script/tool/test/common/package_state_utils_test.dart +++ b/script/tool/test/common/package_state_utils_test.dart @@ -61,13 +61,25 @@ void main() { createFakePlugin('a_plugin', packagesDir); const List changedFiles = [ + 'packages/a_plugin/CHANGELOG.md', + // Analysis. 'packages/a_plugin/example/android/lint-baseline.xml', + // Tests. 'packages/a_plugin/example/android/src/androidTest/foo/bar/FooTest.java', 'packages/a_plugin/example/ios/RunnerTests/Foo.m', 'packages/a_plugin/example/ios/RunnerUITests/info.plist', - 'packages/a_plugin/tool/a_development_tool.dart', + // Test scripts. 'packages/a_plugin/run_tests.sh', - 'packages/a_plugin/CHANGELOG.md', + // Tools. + 'packages/a_plugin/tool/a_development_tool.dart', + // Example build files. + 'packages/a_plugin/example/android/build.gradle', + 'packages/a_plugin/example/android/gradle/wrapper/gradle-wrapper.properties', + 'packages/a_plugin/example/ios/Runner.xcodeproj/project.pbxproj', + 'packages/a_plugin/example/linux/flutter/CMakeLists.txt', + 'packages/a_plugin/example/macos/Runner.xcodeproj/project.pbxproj', + 'packages/a_plugin/example/windows/CMakeLists.txt', + 'packages/a_plugin/example/pubspec.yaml', ]; final PackageChangeState state = await checkPackageChangeState(package, diff --git a/script/tool/test/create_all_packages_app_command_test.dart b/script/tool/test/create_all_packages_app_command_test.dart new file mode 100644 index 000000000000..54551cbc3712 --- /dev/null +++ b/script/tool/test/create_all_packages_app_command_test.dart @@ -0,0 +1,256 @@ +// Copyright 2013 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:io' as io; + +import 'package:args/command_runner.dart'; +import 'package:file/file.dart'; +import 'package:file/local.dart'; +import 'package:flutter_plugin_tools/src/common/core.dart'; +import 'package:flutter_plugin_tools/src/create_all_packages_app_command.dart'; +import 'package:platform/platform.dart'; +import 'package:test/test.dart'; + +import 'mocks.dart'; +import 'util.dart'; + +void main() { + late CommandRunner runner; + late CreateAllPackagesAppCommand command; + late FileSystem fileSystem; + late Directory testRoot; + late Directory packagesDir; + late RecordingProcessRunner processRunner; + + setUp(() { + // Since the core of this command is a call to 'flutter create', the test + // has to use the real filesystem. Put everything possible in a unique + // temporary to minimize effect on the host system. + fileSystem = const LocalFileSystem(); + testRoot = fileSystem.systemTempDirectory.createTempSync(); + packagesDir = testRoot.childDirectory('packages'); + processRunner = RecordingProcessRunner(); + + command = CreateAllPackagesAppCommand( + packagesDir, + processRunner: processRunner, + pluginsRoot: testRoot, + ); + runner = CommandRunner( + 'create_all_test', 'Test for $CreateAllPackagesAppCommand'); + runner.addCommand(command); + }); + + tearDown(() { + testRoot.deleteSync(recursive: true); + }); + + group('non-macOS host', () { + setUp(() { + command = CreateAllPackagesAppCommand( + packagesDir, + processRunner: processRunner, + // Set isWindows or not based on the actual host, so that + // `flutterCommand` works, since these tests actually call 'flutter'. + // The important thing is that isMacOS always returns false. + platform: MockPlatform(isWindows: const LocalPlatform().isWindows), + pluginsRoot: testRoot, + ); + runner = CommandRunner( + 'create_all_test', 'Test for $CreateAllPackagesAppCommand'); + runner.addCommand(command); + }); + + test('pubspec includes all plugins', () async { + createFakePlugin('plugina', packagesDir); + createFakePlugin('pluginb', packagesDir); + createFakePlugin('pluginc', packagesDir); + + await runCapturingPrint(runner, ['create-all-packages-app']); + final List pubspec = command.app.pubspecFile.readAsLinesSync(); + + expect( + pubspec, + containsAll([ + contains(RegExp('path: .*/packages/plugina')), + contains(RegExp('path: .*/packages/pluginb')), + contains(RegExp('path: .*/packages/pluginc')), + ])); + }); + + test('pubspec has overrides for all plugins', () async { + createFakePlugin('plugina', packagesDir); + createFakePlugin('pluginb', packagesDir); + createFakePlugin('pluginc', packagesDir); + + await runCapturingPrint(runner, ['create-all-packages-app']); + final List pubspec = command.app.pubspecFile.readAsLinesSync(); + + expect( + pubspec, + containsAllInOrder([ + contains('dependency_overrides:'), + contains(RegExp('path: .*/packages/plugina')), + contains(RegExp('path: .*/packages/pluginb')), + contains(RegExp('path: .*/packages/pluginc')), + ])); + }); + + test('pubspec preserves existing Dart SDK version', () async { + const String baselineProjectName = 'baseline'; + final Directory baselineProjectDirectory = + testRoot.childDirectory(baselineProjectName); + io.Process.runSync( + getFlutterCommand(const LocalPlatform()), + [ + 'create', + '--template=app', + '--project-name=$baselineProjectName', + baselineProjectDirectory.path, + ], + ); + final Pubspec baselinePubspec = + RepositoryPackage(baselineProjectDirectory).parsePubspec(); + + createFakePlugin('plugina', packagesDir); + + await runCapturingPrint(runner, ['create-all-packages-app']); + final Pubspec generatedPubspec = command.app.parsePubspec(); + + const String dartSdkKey = 'sdk'; + expect(generatedPubspec.environment?[dartSdkKey], + baselinePubspec.environment?[dartSdkKey]); + }); + + test('macOS deployment target is modified in pbxproj', () async { + createFakePlugin('plugina', packagesDir); + + await runCapturingPrint(runner, ['create-all-packages-app']); + final List pbxproj = command.app + .platformDirectory(FlutterPlatform.macos) + .childDirectory('Runner.xcodeproj') + .childFile('project.pbxproj') + .readAsLinesSync(); + + expect( + pbxproj, + everyElement((String line) => + !line.contains('MACOSX_DEPLOYMENT_TARGET') || + line.contains('10.15'))); + }); + + test('calls flutter pub get', () async { + createFakePlugin('plugina', packagesDir); + + await runCapturingPrint(runner, ['create-all-packages-app']); + + expect( + processRunner.recordedCalls, + orderedEquals([ + ProcessCall( + getFlutterCommand(const LocalPlatform()), + const ['pub', 'get'], + testRoot.childDirectory('all_packages').path), + ])); + }, + // See comment about Windows in create_all_packages_app_command.dart + skip: io.Platform.isWindows); + + test('fails if flutter pub get fails', () async { + createFakePlugin('plugina', packagesDir); + + processRunner.mockProcessesForExecutable[ + getFlutterCommand(const LocalPlatform())] = [ + MockProcess(exitCode: 1) + ]; + Error? commandError; + final List output = await runCapturingPrint( + runner, ['create-all-packages-app'], errorHandler: (Error e) { + commandError = e; + }); + + expect(commandError, isA()); + expect( + output, + containsAllInOrder([ + contains( + "Failed to generate native build files via 'flutter pub get'"), + ])); + }, + // See comment about Windows in create_all_packages_app_command.dart + skip: io.Platform.isWindows); + + test('handles --output-dir', () async { + createFakePlugin('plugina', packagesDir); + + final Directory customOutputDir = + fileSystem.systemTempDirectory.createTempSync(); + await runCapturingPrint(runner, [ + 'create-all-packages-app', + '--output-dir=${customOutputDir.path}' + ]); + + expect(command.app.path, + customOutputDir.childDirectory('all_packages').path); + }); + + test('logs exclusions', () async { + createFakePlugin('plugina', packagesDir); + createFakePlugin('pluginb', packagesDir); + createFakePlugin('pluginc', packagesDir); + + final List output = await runCapturingPrint(runner, + ['create-all-packages-app', '--exclude=pluginb,pluginc']); + + expect( + output, + containsAllInOrder([ + 'Exluding the following plugins from the combined build:', + ' pluginb', + ' pluginc', + ])); + }); + }); + + group('macOS host', () { + setUp(() { + command = CreateAllPackagesAppCommand( + packagesDir, + processRunner: processRunner, + platform: MockPlatform(isMacOS: true), + pluginsRoot: testRoot, + ); + runner = CommandRunner( + 'create_all_test', 'Test for $CreateAllPackagesAppCommand'); + runner.addCommand(command); + }); + + test('macOS deployment target is modified in Podfile', () async { + createFakePlugin('plugina', packagesDir); + + final File podfileFile = RepositoryPackage( + command.packagesDir.parent.childDirectory('all_packages')) + .platformDirectory(FlutterPlatform.macos) + .childFile('Podfile'); + podfileFile.createSync(recursive: true); + podfileFile.writeAsStringSync(""" +platform :osx, '10.11' +# some other line +"""); + + await runCapturingPrint(runner, ['create-all-packages-app']); + final List podfile = command.app + .platformDirectory(FlutterPlatform.macos) + .childFile('Podfile') + .readAsLinesSync(); + + expect( + podfile, + everyElement((String line) => + !line.contains('platform :osx') || line.contains("'10.15'"))); + }, + // Podfile is only generated (and thus only edited) on macOS. + skip: !io.Platform.isMacOS); + }); +} diff --git a/script/tool/test/create_all_plugins_app_command_test.dart b/script/tool/test/create_all_plugins_app_command_test.dart deleted file mode 100644 index 830dd59a8d42..000000000000 --- a/script/tool/test/create_all_plugins_app_command_test.dart +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2013 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:io' as io; - -import 'package:args/command_runner.dart'; -import 'package:file/file.dart'; -import 'package:file/local.dart'; -import 'package:flutter_plugin_tools/src/create_all_plugins_app_command.dart'; -import 'package:platform/platform.dart'; -import 'package:test/test.dart'; - -import 'util.dart'; - -void main() { - group('$CreateAllPluginsAppCommand', () { - late CommandRunner runner; - late CreateAllPluginsAppCommand command; - late FileSystem fileSystem; - late Directory testRoot; - late Directory packagesDir; - - setUp(() { - // Since the core of this command is a call to 'flutter create', the test - // has to use the real filesystem. Put everything possible in a unique - // temporary to minimize effect on the host system. - fileSystem = const LocalFileSystem(); - testRoot = fileSystem.systemTempDirectory.createTempSync(); - packagesDir = testRoot.childDirectory('packages'); - - command = CreateAllPluginsAppCommand( - packagesDir, - pluginsRoot: testRoot, - ); - runner = CommandRunner( - 'create_all_test', 'Test for $CreateAllPluginsAppCommand'); - runner.addCommand(command); - }); - - tearDown(() { - testRoot.deleteSync(recursive: true); - }); - - test('pubspec includes all plugins', () async { - createFakePlugin('plugina', packagesDir); - createFakePlugin('pluginb', packagesDir); - createFakePlugin('pluginc', packagesDir); - - await runCapturingPrint(runner, ['all-plugins-app']); - final List pubspec = command.app.pubspecFile.readAsLinesSync(); - - expect( - pubspec, - containsAll([ - contains(RegExp('path: .*/packages/plugina')), - contains(RegExp('path: .*/packages/pluginb')), - contains(RegExp('path: .*/packages/pluginc')), - ])); - }); - - test('pubspec has overrides for all plugins', () async { - createFakePlugin('plugina', packagesDir); - createFakePlugin('pluginb', packagesDir); - createFakePlugin('pluginc', packagesDir); - - await runCapturingPrint(runner, ['all-plugins-app']); - final List pubspec = command.app.pubspecFile.readAsLinesSync(); - - expect( - pubspec, - containsAllInOrder([ - contains('dependency_overrides:'), - contains(RegExp('path: .*/packages/plugina')), - contains(RegExp('path: .*/packages/pluginb')), - contains(RegExp('path: .*/packages/pluginc')), - ])); - }); - - test('pubspec preserves existing Dart SDK version', () async { - const String baselineProjectName = 'baseline'; - final Directory baselineProjectDirectory = - testRoot.childDirectory(baselineProjectName); - io.Process.runSync( - getFlutterCommand(const LocalPlatform()), - [ - 'create', - '--template=app', - '--project-name=$baselineProjectName', - baselineProjectDirectory.path, - ], - ); - final Pubspec baselinePubspec = - RepositoryPackage(baselineProjectDirectory).parsePubspec(); - - createFakePlugin('plugina', packagesDir); - - await runCapturingPrint(runner, ['all-plugins-app']); - final Pubspec generatedPubspec = command.app.parsePubspec(); - - const String dartSdkKey = 'sdk'; - expect(generatedPubspec.environment?[dartSdkKey], - baselinePubspec.environment?[dartSdkKey]); - }); - - test('handles --output-dir', () async { - createFakePlugin('plugina', packagesDir); - - final Directory customOutputDir = - fileSystem.systemTempDirectory.createTempSync(); - await runCapturingPrint(runner, - ['all-plugins-app', '--output-dir=${customOutputDir.path}']); - - expect( - command.app.path, customOutputDir.childDirectory('all_plugins').path); - }); - - test('logs exclusions', () async { - createFakePlugin('plugina', packagesDir); - createFakePlugin('pluginb', packagesDir); - createFakePlugin('pluginc', packagesDir); - - final List output = await runCapturingPrint( - runner, ['all-plugins-app', '--exclude=pluginb,pluginc']); - - expect( - output, - containsAllInOrder([ - 'Exluding the following plugins from the combined build:', - ' pluginb', - ' pluginc', - ])); - }); - }); -} diff --git a/script/tool/test/publish_check_command_test.dart b/script/tool/test/publish_check_command_test.dart index e6c5b9cdebc5..575f8509fd25 100644 --- a/script/tool/test/publish_check_command_test.dart +++ b/script/tool/test/publish_check_command_test.dart @@ -44,10 +44,16 @@ void main() { }); test('publish check all packages', () async { - final RepositoryPackage plugin1 = - createFakePlugin('plugin_tools_test_package_a', packagesDir); - final RepositoryPackage plugin2 = - createFakePlugin('plugin_tools_test_package_b', packagesDir); + final RepositoryPackage plugin1 = createFakePlugin( + 'plugin_tools_test_package_a', + packagesDir, + examples: [], + ); + final RepositoryPackage plugin2 = createFakePlugin( + 'plugin_tools_test_package_b', + packagesDir, + examples: [], + ); await runCapturingPrint(runner, ['publish-check']); @@ -65,6 +71,49 @@ void main() { ])); }); + test('publish prepares dependencies of examples (when present)', () async { + final RepositoryPackage plugin1 = createFakePlugin( + 'plugin_tools_test_package_a', + packagesDir, + examples: ['example1', 'example2'], + ); + final RepositoryPackage plugin2 = createFakePlugin( + 'plugin_tools_test_package_b', + packagesDir, + examples: [], + ); + + await runCapturingPrint(runner, ['publish-check']); + + // For plugin1, these are the expected pub get calls that will happen + final Iterable pubGetCalls = + plugin1.getExamples().map((RepositoryPackage example) { + return ProcessCall( + 'dart', + const ['pub', 'get'], + example.path, + ); + }); + + expect(pubGetCalls, hasLength(2)); + expect( + processRunner.recordedCalls, + orderedEquals([ + // plugin1 has 2 examples, so there's some 'dart pub get' calls. + ...pubGetCalls, + ProcessCall( + 'flutter', + const ['pub', 'publish', '--', '--dry-run'], + plugin1.path), + // plugin2 has no examples, so there's no extra 'dart pub get' calls. + ProcessCall( + 'flutter', + const ['pub', 'publish', '--', '--dry-run'], + plugin2.path), + ]), + ); + }); + test('fail on negative test', () async { createFakePlugin('plugin_tools_test_package_a', packagesDir);