[
  {
    "path": ".github/FUNDING.yml",
    "content": "github: [AlexV525, kuhnroyal]\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug.yml",
    "content": "name: 🐞 Bug Report\ndescription: Tell us about something that's not working the way we (probably) intend.\nlabels: [\"s: bug\", \"h: need triage\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        🧐 **Guidelines:**\n\n        - Search through [existing issues](https://github.com/cfug/dio/issues) first to ensure that this bug has not been reported before.\n        - Write a descriptive title for your issue. Avoid generic or vague titles such as \"Something's not working\" or \"A couple of problems\".\n        - Keep your issue focused on one single problem. If you have multiple bug reports, please create separate issues for each of them.\n        - Provide as much context as possible in the fields below. Include screenshots, screen recordings, links, references, or anything else you may consider relevant.\n        - If you want to ask a question instead of reporting a bug, please use [discussions](https://github.com/cfug/dio/discussions/new) instead.\n  - type: dropdown\n    id: package\n    attributes:\n      label: Package\n      description: Which package has a problem?\n      options:\n        - dio\n        - compatibility_layer\n        - cookie_manager\n        - http2_adapter\n        - native_dio_adapter\n        - web_adapter\n    validations:\n      required: true\n  - type: input\n    id: version\n    attributes:\n      label: Version\n      placeholder: 1.2.3\n      description: Which version of that package do you use?\n    validations:\n      required: true\n  - type: dropdown\n    id: os\n    attributes:\n      label: Operating-System\n      description: On which OS does the problem occur?\n      multiple: true\n      options:\n        - Android\n        - iOS\n        - Web\n        - MacOS\n        - Linux\n        - Windows\n    validations:\n      required: true\n  - type: dropdown\n    id: adapter\n    attributes:\n      label: Adapter\n      description: Which adapter(s) are used?\n      multiple: true\n      options:\n        - Default Dio\n        - NativeAdapter\n        - Http2Adapter\n        - ConversionLayerAdapter\n    validations:\n      required: true\n  - type: textarea\n    id: flutter_info\n    attributes:\n      label: Output of `flutter doctor -v`\n      description: Required when used with Flutter. The input is automatically formatted in code fences\n      render: shell\n  - type: input\n    id: dart_version\n    attributes:\n      label: Dart Version\n      placeholder: 1.2.3\n      description: Which version of Dart do you use?\n    validations:\n      required: false\n  - type: textarea\n    id: repro\n    attributes:\n      label: Steps to Reproduce\n      description: How can we see what you're seeing? Specific is terrific.\n      placeholder: |-\n        1. foo\n        2. bar\n        3. baz\n    validations:\n      required: true\n  - type: textarea\n    id: expected\n    attributes:\n      label: Expected Result\n    validations:\n      required: true\n  - type: textarea\n    id: actual\n    attributes:\n      label: Actual Result\n      description: Logs? Screenshots? Yes, please.\n    validations:\n      required: true\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yaml",
    "content": "blank_issues_enabled: true"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature.yml",
    "content": "name: 💡 Feature Request\ndescription: Tell us about a problem dio could solve but doesn't.\nlabels: [\"s: feature\"]\nbody:\n  - type: textarea\n    id: problem\n    attributes:\n      label: Request Statement\n      description: What problem could dio solve that it doesn't?\n    validations:\n      required: true\n  - type: textarea\n    id: expected\n    attributes:\n      label: Solution Brainstorm\n      description: We know you have bright ideas to share ... share away, friend.\n    validations:\n      required: false\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/infra.yml",
    "content": "name: 👷 Infra\ndescription: Something is wrong with the CI setup or could be improved\nlabels: [\"infra\"]\nbody:\n  - type: textarea\n    id: problem\n    attributes:\n      label: Request Statement\n    validations:\n      required: true\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "<!-- Write down your pull request descriptions. -->\n\n### New Pull Request Checklist\n\n- [ ] I have read the [Documentation](https://pub.dev/documentation/dio/latest/)\n- [ ] I have searched for a similar pull request in the [project](https://github.com/cfug/dio/pulls) and found none\n- [ ] I have updated this branch with the latest `main` branch to avoid conflicts (via merge from master or rebase)\n- [ ] I have added the required tests to prove the fix/feature I'm adding\n- [ ] I have updated the documentation (if necessary)\n- [ ] I have run the tests without failures\n- [ ] I have updated the `CHANGELOG.md` in the corresponding package\n\n### Additional context and info (if any)\n\n<!-- Provide more context and info about the PR. -->\n"
  },
  {
    "path": ".github/dependabot.yaml",
    "content": "version: 2\nupdates:\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"weekly\"\n    labels:\n      - \"infra\"\n      - \"github-actions\"\n"
  },
  {
    "path": ".github/workflows/check_issues_access.yml",
    "content": "# Not allow users without write access to create \"infra\" or blank issues.\nname: Check issues access\n\non:\n  issues:\n    types: [ opened, reopened, edited ]\n\njobs:\n  verify_access:\n    runs-on: ubuntu-latest\n    if: ${{ join(github.event.issue.labels) == '' || contains(github.event.issue.labels.*.name, 'infra')}}\n    steps:\n      - uses: actions-cool/check-user-permission@v2.3.0\n        id: checkUser\n        with:\n          require: 'write'\n      - name: Write comment\n        if: steps.checkUser.outputs.require-result == 'false'\n        uses: actions-cool/issues-helper@v3.7.6\n        with:\n          actions: 'create-comment'\n          issue-number: ${{ github.event.issue.number }}\n          body: |\n            @${{ github.event.issue.user.login }} Infra and blank issues are only available for moderators. You're apparently using the wrong issue template.\n            > Infra 和空白 issue 仅供管理人员使用，请选择其他 issue 模板创建 issue。\n      - name: Close issue\n        if: steps.checkUser.outputs.require-result == 'false'\n        uses: actions-cool/issues-helper@v3.7.6\n        with:\n          actions: 'close-issue'\n          issue-number: ${{ github.event.issue.number }}\n      - name: Lock issue\n        if: steps.checkUser.outputs.require-result == 'false'\n        uses: actions-cool/issues-helper@v3.7.6\n        with:\n          actions: 'lock-issue'\n          issue-number: ${{ github.event.issue.number }}\n          lock-reason: 'off-topic'\n"
  },
  {
    "path": ".github/workflows/coverage_base.yml",
    "content": "name: 'coverage_baseline'\n\n# The code-coverage-report-action uses workflow artifacts to store the coverage report.\n# The action will upload the coverage report as an artifact,\n# and the action will also download the coverage report from the artifact in PRs.\n# The action will then compare the coverage report from the PR with the coverage report from the base branch.\n# For this to work, the action needs to be run on the base branch after each pushed commit\n# or at least once before the artifact retention period ends.\n\non:\n  # Allow for manual runs\n  workflow_dispatch:\n  # Runs at 00:00, on day 1 of the month (every ~30 days)\n  schedule:\n    - cron: '0 0 1 * *'\n  push:\n    branches:\n      - main\n\njobs:\n  generate:\n    runs-on: ubuntu-latest\n    env:\n      TEST_PRESET: all\n    steps:\n      - uses: actions/checkout@v6\n      - uses: subosito/flutter-action@v2\n        with:\n          cache: true\n      - run: |\n          chmod +x ./scripts/prepare_pinning_certs.sh\n          ./scripts/prepare_pinning_certs.sh\n      - name: Install proxy for tests\n        run: sudo apt-get update && sudo apt-get install -y squid\n      - run: dart pub get\n      - uses: bluefireteam/melos-action@v3\n        with:\n          run-bootstrap: false\n          melos-version: '^6.0.0'\n      - name: Check satisfied packages\n        run: |\n          dart ./scripts/melos_packages.dart\n          echo $(cat .melos_packages) >> $GITHUB_ENV\n      - name: Melos Bootstrap\n        run: melos bootstrap\n      # Tests\n      - run: ./scripts/prepare_pinning_certs.sh\n      - name: Install proxy for tests\n        run: sudo apt-get update && sudo apt-get install -y squid mkcert\n      - name: Start local httpbun\n        run: |\n          mkcert -install\n          mkcert -cert-file '/tmp/cert.pem' -key-file '/tmp/key.pem' httpbun.local\n          echo '127.0.0.1 httpbun.local' | sudo tee --append /etc/hosts\n          docker run \\\n            --name httpbun \\\n            --detach \\\n            --publish 443:443 \\\n            --volume /tmp:/tmp:ro \\\n            --env HTTPBUN_TLS_CERT=/tmp/cert.pem \\\n            --env HTTPBUN_TLS_KEY=/tmp/key.pem \\\n            --pull always \\\n            sharat87/httpbun\n          sleep 1\n          curl --fail --silent --show-error https://httpbun.local/any\n      - name: Use httpbun.local for tests\n        run: melos run httpbun:local\n      - name: '[Verify step] Test Dart packages [VM]'\n        run: melos run test:vm\n      - name: Use httpbun.com for Web/Flutter tests\n        run: melos run httpbun:com\n      - name: '[Verify step] Test Dart packages [Chrome]'\n        run: melos run test:web:chrome\n      - name: '[Verify step] Test Dart packages [Firefox]'\n        run: melos run test:web:firefox\n      - name: '[Verify step] Test Flutter packages'\n        run: melos run test:flutter\n      - name: '[Coverage] Generate report'\n        run: melos run coverage:combine\n      - uses: clearlyip/code-coverage-report-action@v6\n        with:\n          filename: 'coverage/cobertura.xml'\n"
  },
  {
    "path": ".github/workflows/coverage_comment.yml",
    "content": "name: 'coverage_comment'\n\n# This workflow runs after the 'Verify packages abilities' workflow is completed for a pull request.\n# The workflow downloads the coverage report if the 'Verify packages abilities' workflow was successful.\n# The workflow then adds a comment to the PR with the coverage report.\n\non:\n  workflow_run:\n    workflows: ['Verify packages abilities']\n    types:\n      - completed\n\njobs:\n  download_coverage:\n    runs-on: ubuntu-latest\n    if: github.event.workflow_run.event == 'pull_request'\n    steps:\n      - name: Download artifact\n        id: download-artifact\n        uses: dawidd6/action-download-artifact@v18\n        with:\n          workflow: tests.yml\n          workflow_conclusion: success\n          run_id: ${{ github.event.workflow_run.id }}\n          name: code-coverage-results\n      - name: Determine PR number\n        id: pr-number\n        run: |\n          PR_NUMBER=$(cat pr_number.txt)\n          echo \"Found PR:$PR_NUMBER\"\n          echo \"value=$PR_NUMBER\" >> $GITHUB_OUTPUT\n      - name: Add PR comment\n        uses: marocchino/sticky-pull-request-comment@v3\n        with:\n          number: ${{ steps.pr-number.outputs.value }}\n          recreate: true\n          path: code-coverage-results.md\n"
  },
  {
    "path": ".github/workflows/publish.yml",
    "content": "name: Publish from comments\n\non:\n  issue_comment:\n    types: [created]\n\njobs:\n  publish:\n    # https://github.com/cfug/dio/issues/1633\n    if: github.event.issue.number == 1633\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          token: ${{ secrets.CFUG_PUBLISHER }}\n      - uses: dart-lang/setup-dart@v1.4\n      - uses: cfug/dio_issue_release_action@v2\n        with:\n          github-token: ${{ secrets.CFUG_PUBLISHER }}\n          pub-credentials-json: ${{ secrets.CREDENTIAL_JSON }}\n"
  },
  {
    "path": ".github/workflows/tests.yml",
    "content": "name: Verify packages abilities\n\non:\n  push:\n    branches:\n      - main\n      - '6.0.0'\n    paths-ignore:\n      - \"**.md\"\n  pull_request:\n    branches:\n      - main\n      - '6.0.0'\n    paths-ignore:\n      - \"**.md\"\n\n# Ensure that new pushes/updates cancel running jobs\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}\n  cancel-in-progress: true\n\ndefaults:\n  run:\n    shell: bash -leo pipefail {0}\n\njobs:\n  workflows:\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        sdk: [ min, stable, beta ]\n    env:\n      TEST_PRESET: all\n    steps:\n      - uses: actions/checkout@v6\n      - uses: subosito/flutter-action@v2\n        with:\n          cache: true\n          flutter-version: ${{ matrix.sdk == 'min' && '3.3.0' || '' }}\n          channel: ${{ matrix.sdk == 'min' && '' || matrix.channel }}\n      - run: |\n          echo TARGET_DART_SDK=${{ matrix.sdk }} >> $GITHUB_ENV\n      - name: Prepare dependencies for the project management\n        run: dart pub get\n      - uses: bluefireteam/melos-action@v3\n        with:\n          run-bootstrap: false\n          melos-version: ${{ matrix.sdk == 'min' && '3.4.0' || '^6.0.0' }}\n      - name: Remove dio_web_adapter overrides\n        if: ${{ matrix.sdk == 'min' }}\n        run: rm -rf plugins/web_adapter\n      - name: Check satisfied packages\n        run: |\n          dart ./scripts/melos_packages.dart\n          echo $(cat .melos_packages) >> $GITHUB_ENV\n      - name: Melos Bootstrap\n        run: melos bootstrap\n      - name: '[Verify step] Format'\n        if: ${{ matrix.sdk == 'stable' }}\n        run: melos run format\n      - name: '[Verify step] Analyze packages'\n        if: ${{ matrix.sdk == 'stable' }}\n        run: melos run analyze\n      - name: '[Verify step] Publish dry-run'\n        if: ${{ matrix.sdk == 'stable' }}\n        run: melos run publish-dry-run\n      # Tests\n      - run: ./scripts/prepare_pinning_certs.sh\n      - name: Install proxy for tests\n        run: sudo apt-get update && sudo apt-get install -y squid mkcert\n      - name: Start local httpbun\n        run: |\n          mkcert -install\n          mkcert -cert-file '/tmp/cert.pem' -key-file '/tmp/key.pem' httpbun.local\n          echo '127.0.0.1 httpbun.local' | sudo tee --append /etc/hosts\n          docker run \\\n            --name httpbun \\\n            --detach \\\n            --publish 443:443 \\\n            --volume /tmp:/tmp:ro \\\n            --env HTTPBUN_TLS_CERT=/tmp/cert.pem \\\n            --env HTTPBUN_TLS_KEY=/tmp/key.pem \\\n            --pull always \\\n            sharat87/httpbun\n          sleep 1\n          curl --fail --silent --show-error https://httpbun.local/any\n      - name: Use httpbun.local for tests\n        run: melos run httpbun:local\n      - name: '[Verify step] Test Dart packages [VM]'\n        run: melos run test:vm\n      - name: Use httpbun.com for Web/Flutter tests\n        run: melos run httpbun:com\n      - name: '[Verify step] Test Dart packages [Chrome]'\n        run: melos run test:web:chrome\n      - name: '[Verify step] Test Dart packages [Firefox]'\n        run: melos run test:web:firefox\n      - name: '[Verify step] Test Flutter packages'\n        run: melos run test:flutter\n      - uses: actions/setup-java@v5\n        if: ${{ matrix.sdk == 'stable' }}\n        with:\n          distribution: 'adopt'\n          java-version: '17'\n      - name: '[Verify step] Build Flutter APK'\n        if: ${{ matrix.sdk == 'stable' }}\n        run: melos run build:example:apk\n      # Coverage\n      - name: '[Coverage] Format & print test coverage'\n        if: ${{ matrix.sdk == 'stable' }}\n        run: melos run coverage:show\n      - name: '[Coverage] Create Report'\n        uses: clearlyip/code-coverage-report-action@v6\n        id: code_coverage_report\n        if: ${{ matrix.sdk == 'stable' && github.actor != 'dependabot[bot]'}}\n        with:\n          artifact_download_workflow_names: 'Verify packages abilities,coverage_baseline'\n          filename: 'coverage/cobertura.xml'\n          only_list_changed_files: true\n      - name: '[Coverage] Write PR number to file'\n        if: ${{ matrix.sdk == 'stable' && github.actor != 'dependabot[bot]'}}\n        run: echo ${{ github.event.number }} > pr_number.txt\n      - name: '[Coverage] Upload'\n        if: ${{ matrix.sdk == 'stable' && github.actor != 'dependabot[bot]'}}\n        uses: actions/upload-artifact@v7\n        with:\n          name: code-coverage-results\n          path: |\n            coverage/cobertura.xml\n            code-coverage-results.md\n            pr_number.txt\n"
  },
  {
    "path": ".gitignore",
    "content": "# Files and directories created by pub\n.packages\n.dart_tool/\n.pub/\n.example/flutter.png\nbuild/\n# Remove the following pattern if you wish to check in your lock file\npubspec.lock\npubspec_overrides.yaml\n\n# Directory created by dartdoc\ndoc/api/\n.cookies/\n\n.vscode/\n\n# Miscellaneous\n.DS_Store\n**/DerivedData/\n\n# IDEA configurations\n/.idea/*\n!/.idea/dio.iml\n!/.idea/modules.xml\n\n# Coverage\ncoverage\n\n# Melos\n**/.melos_package\n.melos_packages\nmelos_overrides.yaml\n\n# FVM Version Cache\n.fvm/\n.fvmrc\n"
  },
  {
    "path": ".idea/modules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectModuleManager\">\n    <modules>\n      <module fileurl=\"file://$PROJECT_DIR$/dio/dio.iml\" filepath=\"$PROJECT_DIR$/dio/dio.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/plugins/compatibility_layer/dio_compatibility_layer.iml\" filepath=\"$PROJECT_DIR$/plugins/compatibility_layer/dio_compatibility_layer.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/plugins/cookie_manager/dio_cookie_manager.iml\" filepath=\"$PROJECT_DIR$/plugins/cookie_manager/dio_cookie_manager.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/example_dart/dio_example.iml\" filepath=\"$PROJECT_DIR$/example_dart/dio_example.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/example_flutter_app/dio_flutter_example.iml\" filepath=\"$PROJECT_DIR$/example_flutter_app/dio_flutter_example.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/plugins/http2_adapter/dio_http2_adapter.iml\" filepath=\"$PROJECT_DIR$/plugins/http2_adapter/dio_http2_adapter.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/dio_test/dio_test.iml\" filepath=\"$PROJECT_DIR$/dio_test/dio_test.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/plugins/web_adapter/dio_web_adapter.iml\" filepath=\"$PROJECT_DIR$/plugins/web_adapter/dio_web_adapter.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/plugins/native_dio_adapter/native_dio_adapter.iml\" filepath=\"$PROJECT_DIR$/plugins/native_dio_adapter/native_dio_adapter.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/plugins/native_dio_adapter/example/native_dio_adapter_example.iml\" filepath=\"$PROJECT_DIR$/plugins/native_dio_adapter/example/native_dio_adapter_example.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/dio_workspace.iml\" filepath=\"$PROJECT_DIR$/dio_workspace.iml\" />\n    </modules>\n  </component>\n</project>"
  },
  {
    "path": "CODEOWNERS",
    "content": "* @cfug/dio-core\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to participate in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, religion, or sexual identity\nand orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity includes:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n  and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the\n  overall community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or\n  advances of any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email\n  address, without their explicit permission\n* Other conduct that could reasonably be considered inappropriate in a\n  professional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\n[cfug-team@googlegroups.com](mailto:cfug-team@googlegroups.com).\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series\nof actions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or\npermanent ban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior, harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within\nthe community.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.0, available at\nhttps://www.contributor-covenant.org/version/2/0/code_of_conduct.html.\n\nCommunity Impact Guidelines were inspired by [Mozilla's code of conduct\nenforcement ladder](https://github.com/mozilla/diversity).\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see the FAQ at\nhttps://www.contributor-covenant.org/faq. Translations are available at\nhttps://www.contributor-covenant.org/translations.\n"
  },
  {
    "path": "COMPATIBILITY_POLICY.md",
    "content": "# Compatibility Policy\n\nAs an open-source project, all activities happened when the maintainers have spare time and energy.\nThe support range is limited due to the above condition.\nTherefore, we have a general compatibility policy to help people\nthat are not actively adapting SDK updates or intended to use any old SDKs to acknowledge the support range.\n\n## Policy Details\n\nFor all packages, the oldest Dart SDK we typically support\nis one that was **released less than 2 years ago**.\n\n### Exceptions\n\n- The minimum SDK version will follow the dependencies' requirement.\n  For example: `http2: ^2.1.0` requires Dart SDK >=3.0.0.\n- The implementation can no longer compatible between the latest and previous SDKs.\n- Previous SDKs have security issues that require to use a new version.\n\nTo raise your suggestions and reports, use the issue tracker\nor contact cfug-team@googlegroups.com if you want to do this privately.\n"
  },
  {
    "path": "CONTRIBUTING-ZH.md",
    "content": "# 贡献指南\n\nLanguage: [English](CONTRIBUTING.md) | 简体中文\n\n首先，感谢您考虑为 `dio` 项目做出贡献！像这样的开源项目得以成长和繁荣，多亏了像您这样的贡献者。无论您是在修复错误、添加新功能、改进文档还是报告问题，每一份贡献都是宝贵和值得赞赏的。\n\n本文档提供了一些指南，以帮助确保您的贡献尽可能有效。在提交您的贡献之前，请花一点时间阅读这些指南。\n\n请记住，每个为这个项目做出贡献的人都需要遵循我们的行为准则。这有助于确保所有贡献者的积极和包容环境。\n\n再次感谢您的贡献，我们期待看到您将为 `dio` 项目带来什么！\n\n## 创建好的工单\n\n> [!TIP]\n> 在创建新问题之前，搜索已有的工单和拉取请求以避免重复是一个好习惯。\n\n### 错误报告\n\n报告错误时，请包括以下信息：\n\n1. **标题**：简短描述性的错误标题。\n2. **包**：指定有问题的包。\n3. **版本**：您正在使用的包版本。\n4. **操作系统**：出现问题的操作系统。\n5. **适配器**：指定使用的适配器。\n6. **`flutter doctor -v` 的输出**：使用 Flutter 时需要。\n7. **Dart 版本**：您使用的 Dart 版本。\n8. **重现步骤**：详细步骤说明如何重现错误。\n9. **预期结果**：您期望发生的事情。\n10. **实际结果**：实际发生的事情。包括日志、屏幕截图或任何其他相关信息。\n\n### 功能请求\n\n请求新功能时，请包括以下信息：\n\n1. **标题**：功能请求的简短描述性标题。\n2. **请求声明**：描述您认为 `dio` 项目能解决但目前没有解决的问题。\n3. **解决方案头脑风暴**：分享您的想法，关于如何解决问题。如果您没有特定的解决方案，那也没关系！\n\n> [!TIP]\n> 记住，您提供的信息越多，我们就越容易理解和解决问题。感谢您的贡献！\n> 请避免评论旧的、已关闭的工单。如果旧问题似乎与您的问题有关但并未完全解决您的问题，最好开一个新工单并引用旧的。\n\n## 开发\n\n此项目使用 [Melos](https://github.com/invertase/melos) 管理单体仓库和大多数任务。Melos 是一个为 Dart 和 Flutter 的多包项目优化工作流的工具。有关如何使用 Melos 的更多信息，请参阅 [Melos 文档](https://melos.invertase.dev)。\n\n### 设置\n\n开始之前，您需要全局安装 Melos：\n\n```bash\ndart pub global activate melos\n```\n\n在安装 Melos 后，可以克隆仓库并安装依赖项：\n\n```bash\ngit clone https://github.com/cfug/dio.git\ncd dio\nmelos bootstrap\n```\n\n## 提交更改\n\n在以拉取请求提交您的更改之前，请确保格式化和分析您的代码并运行所有测试。以下是您应该了解的主要 melos 脚本：\n\n### 代码质量\n\n要格式化（和修复）所有包，请运行：\n```bash\nmelos run format\n# 或者\nmelos run format:fix\n```\n\n要分析所有包，请运行：\n```bash\nmelos run analyze\n```\n\n### 测试\n\n要运行所有测试，请使用：\n```bash\nmelos run test\n```\n\n可以使用适当的脚本运行单个测试目标：\n```bash\nmelos run test:vm\nmelos run test:web\nmelos run test:web:chrome\nmelos run test:web:firefox\n```\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing Guidelines\n\nLanguage: English | [简体中文](CONTRIBUTING-ZH.md)\n\nFirst of all, thank you for considering contributing to the `dio` project! Open source projects like this one grow and thrive thanks to the contributions from people like you. Whether you're fixing bugs, adding new features, improving the documentation, or even reporting issues, every contribution is valuable and appreciated.\n\nThis document provides some guidelines to help ensure that your contributions are as effective as possible. Please take a moment to read through these guidelines before submitting your contribution.\n\nRemember, everyone contributing to this project is expected to follow our code of conduct. This helps ensure a positive and inclusive environment for all contributors.\n\nThank you again for your contributions, and we look forward to seeing what you will bring to the `dio` project!\n\n## Creating Good Tickets\n\n> [!TIP]\n> Before creating a new issue, it's a good practice to search for open tickets and pull requests to avoid duplicates.\n\n### Bug Reports\n\nWhen reporting a bug, please include the following information:\n\n1. **Title**: A brief, descriptive title for the bug.\n2. **Package**: Specify which package has the problem.\n3. **Version**: The version of the package you are using.\n4. **Operating System**: The OS on which the problem occurs.\n5. **Adapter**: Specify which adapter(s) are used.\n6. **Output of `flutter doctor -v`**: Required when used with Flutter.\n7. **Dart Version**: The version of Dart you are using.\n8. **Steps to Reproduce**: Detailed steps on how to reproduce the bug.\n9. **Expected Result**: What you expected to happen.\n10. **Actual Result**: What actually happened. Include logs, screenshots, or any other relevant information.\n\n### Feature Requests\n\nWhen requesting a new feature, please include the following information:\n\n1. **Title**: A brief, descriptive title for the feature request.\n2. **Request Statement**: Describe the problem that you believe the `dio` project could solve but currently doesn't.\n3. **Solution Brainstorm**: Share your ideas on how the problem could be solved. If you don't have a specific solution in mind, that's okay too!\n\n> [!TIP]\n> Remember, the more information you provide, the easier it is for us to understand and address the issue. Thank you for your contributions!\n> Please refrain from commenting on old, closed tickets. If an old issue seems related but doesn't fully address your problem, it's best to open a new ticket and reference the old one instead.\n\n## Development\n\nThis project uses [Melos](https://github.com/invertase/melos) to manage the mono-repo and most tasks. Melos is a tool that optimizes the workflow for multi-package Dart and Flutter projects. For more information on how to use Melos, please refer to the [Melos documentation](https://melos.invertase.dev).\n\n\n### Setup\n\nTo get started, you'll need to install Melos globally:\n\n```bash\ndart pub global activate melos\n```\n\nAfter installing Melos, you can clone the repository and install the dependencies:\n\n```bash\ngit clone https://github.com/cfug/dio.git\ncd dio\nmelos bootstrap\n```\n\n## Submitting changes\n\nBefore submitting your changes as a pull request, please make sure to format and analyze your and run the all tests. Here are the main melos scripts you should be aware of:\n\n### Code quality\n\nTo format (and fix) all packages, run: \n```bash\nmelos run format\n# OR\nmelos run format:fix\n```\n\nTo analyze all packages, run: \n```bash\nmelos run analyze\n```\n\n### Testing\n\nTo run all tests, use: \n```bash\nmelos run test\n```\n\nIndividual test targets can be run with the appropriate scripts:\n```bash\nmelos run test:vm\nmelos run test:web\nmelos run test:web:chrome\nmelos run test:web:firefox\n```\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Wen Du (wendux)\nCopyright (c) 2022 The CFUG Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README-ZH.md",
    "content": "# dio\n\nLanguage: [English](README.md) | 简体中文\n\n此处是 **dio** 项目的基础仓库。请前往项目各自的路径查看指引。\n\n> 别忘了为你发布的与 dio 相关的 package 添加\n> [#dio](https://pub.flutter-io.cn/packages?q=topic%3Adio) 分类标签！\n> 了解更多：https://dart.cn/tools/pub/pubspec#topics\n\n## 版本问题\n\n**在你更新之前：大版本和次要版本可能会包含不兼容的重大改动。<br/>\n请阅读 [迁移指南][] 了解完整的重大变更内容。**\n\n想要了解我们的兼容性政策，请参阅 [兼容性政策][]文档。\n\n[迁移指南]: https://pub.flutter-io.cn/documentation/dio/latest/topics/Migration%20Guide-topic.html\n[兼容性政策]: COMPATIBILITY_POLICY.md\n\n## 所有依赖\n\n### dio\n\n- dio: [链接](dio)\n  [![Pub](https://img.shields.io/pub/v/dio.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/dio)\n\n### 插件\n\n- cookie_manager: [链接](plugins/cookie_manager)\n  [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/dio_cookie_manager)\n- compatibility_layer: [链接](plugins/compatibility_layer)\n  [![Pub](https://img.shields.io/pub/v/dio_compatibility_layer.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/dio_compatibility_layer)\n- http2_adapter: [链接](plugins/http2_adapter)\n  [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/dio_http2_adapter)\n- native_dio_adapter: [链接](plugins/native_dio_adapter)\n  [![Pub](https://img.shields.io/pub/v/native_dio_adapter.svg?label=dev&include_prereleases)](https://pub.dev/packages/native_dio_adapter)\n- web_adapter: [链接](plugins/web_adapter)\n  [![Pub](https://img.shields.io/pub/v/dio_web_adapter.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_web_adapter)\n\n### 示例\n\n- example: [链接](example_dart)\n- example_flutter_app: [链接](example_flutter_app)\n\n## 版权 & 协议\n\n该项目由 [@flutterchina](https://github.com/flutterchina)\n开源组织的 [@wendux](https://github.com/wendux) 创作，\n并在 2023 年转移至\n[Flutter 中文社区 (@cfug)](https://github.com/cfug) 组织进行维护。\n\n该项目遵循 [MIT 开源协议](LICENSE)。\n"
  },
  {
    "path": "README.md",
    "content": "# dio\n\nLanguage: English | [简体中文](README-ZH.md)\n\nThis is the base repo of the **dio** project.\nPlease move specific paths for project instructions.\n\n> Don't forget to add [#dio](https://pub.dev/packages?q=topic%3Adio)\n> topic to your published dio related packages!\n> See more: https://dart.dev/tools/pub/pubspec#topics\n\n## Versioning\n\n**Before you upgrade: Breaking changes might happen in major and minor versions of packages.<br/>\nSee the [Migration Guide][] for the complete breaking changes list.**\n\nTo know about our compatibility policy, see the [Compatibility Policy][] doc.\n\n[Migration Guide]: https://pub.dev/documentation/dio/latest/topics/Migration%20Guide-topic.html\n[Compatibility Policy]: COMPATIBILITY_POLICY.md\n\n## All Packages\n\n### dio\n\n- dio: [link](dio)\n  [![Pub](https://img.shields.io/pub/v/dio.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio)\n\n### Plugins\n\n- cookie_manager: [link](plugins/cookie_manager)\n  [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_cookie_manager)\n- compatibility_layer: [link](plugins/compatibility_layer)\n  [![Pub](https://img.shields.io/pub/v/dio_compatibility_layer.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_compatibility_layer)\n- http2_adapter: [link](plugins/http2_adapter)\n  [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_http2_adapter)\n- native_dio_adapter: [link](plugins/native_dio_adapter)\n  [![Pub](https://img.shields.io/pub/v/native_dio_adapter.svg?label=dev&include_prereleases)](https://pub.dev/packages/native_dio_adapter)\n- web_adapter: [link](plugins/web_adapter)\n  [![Pub](https://img.shields.io/pub/v/dio_web_adapter.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_web_adapter)\n\n### Examples\n\n- example: [link](example_dart)\n- example_flutter_app: [link](example_flutter_app)\n\n## Copyright & License\n\nThe project and its underlying projects\nare originally authored by\n[@wendux](https://github.com/wendux)\nwith the organization\n[@flutterchina](https://github.com/flutterchina),\nstarted being maintained by\n[Chinese Flutter User Group (@cfug)](https://github.com/cfug)\nsince 2023.\n\nThe project consents [the MIT license](LICENSE).\n\n## Star History\n\n<a href=\"https://star-history.com/#cfug/dio&Date\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=cfug/dio&type=Date&theme=dark\" />\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=cfug/dio&type=Date\" />\n    <img alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=cfug/dio&type=Date\" />\n  </picture>\n</a>\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\n| Version | Supported |\n|---------|-----------|\n| >=5.0   | ✅         |\n| < 5.0   | ❌         |\n\n## Reporting a Vulnerability\n\nContact cfug-team@googlegroups.com with your vulnerability report.\n"
  },
  {
    "path": "analysis_options.yaml",
    "content": "include: package:lints/recommended.yaml\n\nanalyzer:\n  errors:\n    always_declare_return_types: error\n    always_put_control_body_on_new_line: error\n    avoid_renaming_method_parameters: error\n    avoid_void_async: error\n    camel_case_types: error\n    constant_identifier_names: error\n    deprecated_member_use_from_same_package: ignore\n    non_constant_identifier_names: error\n    prefer_single_quotes: error\n    require_trailing_commas: error\n    todo: ignore\n\nlinter:\n  rules:\n    always_declare_return_types: true\n    always_put_control_body_on_new_line: true\n    avoid_renaming_method_parameters: true\n    avoid_unnecessary_containers: true\n    avoid_void_async: true\n    curly_braces_in_flow_control_structures: true\n    directives_ordering: true\n    library_annotations: false\n    prefer_const_constructors: true\n    prefer_const_constructors_in_immutables: false\n    prefer_final_fields: true\n    prefer_final_in_for_each: true\n    prefer_final_locals: true\n    prefer_relative_imports: true\n    prefer_single_quotes: true\n    require_trailing_commas: true\n    sort_constructors_first: true\n    sort_unnamed_constructors_first: true\n    unnecessary_await_in_return: true\n    unnecessary_breaks: true\n    unnecessary_late: true\n    unnecessary_library_name: false\n    unnecessary_parenthesis: true\n"
  },
  {
    "path": "dio/.gitignore",
    "content": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\n\n# IntelliJ related\n*.ipr\n*.iws\n.idea/\n\n# The .vscode folder contains launch configuration and tasks you configure in\n# VS Code which you may wish to be included in version control, so this line\n# is commented out by default.\n#.vscode/\n\n# Flutter/Dart/Pub related\n**/doc/api/\n.dart_tool/\n.flutter-plugins\n.packages\n.pub-cache/\n.pub/\nbuild/\n\n# Exceptions to above rules.\n!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages\n\n# Project related.\ntest/*_pinning.txt\n\ncoverage\n"
  },
  {
    "path": "dio/CHANGELOG.md",
    "content": "# CHANGELOG\n\n**Before you upgrade: Breaking changes might happen in major and minor versions of packages.<br/>\nSee the [Migration Guide][] for the complete breaking changes list.**\n\n## Unreleased\n\n*None.*\n\n## 5.9.2\n\n- Fixes `kIsWeb` across different Flutter SDKs.\n- Provides `httpVersion` in `Response.extra` when using `IOHttpClientAdapter`.\n\n## 5.9.1\n\n- Add `requestUrl` and `responseUrl` parameters to `LogInterceptor` for more precise control over URL logging.\n- Fix `QueuedInterceptor` hanging indefinitely when interceptor callbacks throw synchronous exceptions.\n\n## 5.9.0\n\n- Do not allow updating the error field after a cancel token has canceled.\n- Allow passing an initial interceptors list to the constructor of `Interceptors`.\n- Use `package:mime` to help determine the `content-type` of `MultipartFile` base on the provided `filename`.\n\n## 5.8.0+1\n\n- Raise the version constraint of `dio_web_adapter`.\n\n## 5.8.0\n\n- Update comments and strings with `MultipartFile`.\n- Removes redundant warnings when composing request options on Web.\n- Fixes boundary inconsistency in `FormData.clone()`.\n- Support `FileAccessMode` in `Dio.download` and `Dio.downloadUri` to change download file opening mode.\n- Fix `ListParam` equality by using the `DeepCollectionEquality`.\n- Enables configuring the logging details of `DioException` globally and locally.\n- Enables using `Dio.clone` to reuse base options, client adapter, interceptors, and transformer,\n  in a new `Dio` instance.\n\n## 5.7.0\n\n- Graceful handling of responses with nonzero `Content-Length`, `Content-Type` that is json, and empty payload.\n    - Empty responses are now transformed to `null`.\n\n## 5.6.0\n\n- Supports the WASM environment. Users should upgrade the adapter with\n  `dart pub upgrade` or `flutter pub upgrade` to use the WASM-supported version.\n\n## 5.5.0+1\n\n- Fix WASM compile errors after moving the web implementation to `dio_web_adapter`.\n\n## 5.5.0\n\n- Raise the min Dart SDK version to 2.18.0.\n- Add constructor for `DioExceptionType.badCertificate`.\n- Create type alias `DioMediaType` for `http_parser`'s `MediaType`.\n- Fix the type conversion regression when using `MultipartFile.fromBytes`.\n- Split the Web implementation to `package:dio_web_adapter`.\n- Add FusedTransformer for improved performance when decoding JSON.\n- Set FusedTransformer as the default transformer.\n- Improves `InterceptorState.toString()`.\n- If the `CancelToken` got canceled before making requests,\n  throws the exception directly rather than cut actual HTTP requests afterward.\n- Catch `MediaType` parse exception in `Transformer.isJsonMimeType`.\n- Improves warning logs on the Web platform.\n- Improves memory allocating when using `CancelToken`.\n\n## 5.4.3+1\n\n- Fix type promotions for the UTF-8 encoder on previous Dart SDKs.\n\n## 5.4.3\n\n- Remove sockets detach in `IOHttpClientAdapter`.\n- Allows to define `FormData.boundaryName` instead of the default `--dio-boundary-`.\n\n## 5.4.2+1\n\n- Revert \"Catch sync/async exceptions in interceptors' handlers\".\n\n## 5.4.2\n\n- Fix `receiveTimeout` throws exception after the request has been cancelled.\n- Catch sync/async exceptions in interceptors' handlers.\n- Throws precise `StateError` for handler's duplicated calls.\n\n## 5.4.1\n\n- Provide fix suggestions for `dart fix`.\n- Fix `receiveTimeout` for streamed responses.\n- Fix cancellation for streamed responses and downloads when using `IOHttpClientAdapter`.\n- Fix receive progress for streamed responses and downloads when using `IOHttpClientAdapter`.\n- Support relative `baseUrl` on the Web platform.\n- Avoid fake uncaught exceptions during debugging with IDEs.\n\n## 5.4.0\n\n- Improve `SyncTransformer`'s stream transform.\n- Allow case-sensitive header keys with the `preserveHeaderCase` flag through options.\n- Fix `receiveTimeout` for the `IOHttpClientAdapter`.\n- Fix `receiveTimeout` for the `download` method of `DioForNative`.\n- Improve the stream byte conversion.\n\n## 5.3.4\n\n- Raise warning for `Map`s other than `Map<String, dynamic>` when encoding request data.\n- Improve exception messages.\n- Allow `ResponseDecoder` and `RequestEncoder` to be async.\n- Ignores `Duration.zero` timeouts.\n\n## 5.3.3\n\n- Fix failing requests throw `DioException`s with `.unknown` instead of `.connectionError` on `SocketException`.\n- Removes the accidentally added `options` argument for `Options.compose`.\n- Fix wrong formatting of multi-value header in `BrowserHttpClientAdapter`.\n- Add warning in debug mode when trying to send data with a `GET` request in web.\n- Reduce cases in which browsers would trigger a CORS preflight request.\n- Add warnings in debug mode when using `sendTimeout` and `onSendProgress` with an empty request body.\n- Fix `receiveTimeout` not working correctly on web.\n- Fix `ImplyContentTypeInterceptor` can be removed by `Interceptors.clear()` by default.\n\n## 5.3.2\n\n- Revert removed `download` for `DioMixin`.\n- Fix for `Dio.download` not cleaning the file on data handling error.\n\n## 5.3.1\n\n- Improve package descriptions and code formats.\n- Improve comments.\n- Fix error when cloning `MultipartFile` from `FormData` with regression test.\n- Deprecate `MultipartFile` constructor in favor `MultipartFile.fromStream`.\n- Add `FormData.clone`.\n\n## 5.3.0\n\n- Remove `http` from `dev_dependencies`.\n- Add support for cloning `MultipartFile` from `FormData`.\n- Only produce null response body when `ResponseType.json`.\n\n## 5.2.1+1\n\n- Fix changelog on pub.dev.\n\n## 5.2.1\n\n- Revert changes to handling of `List<int>` body data.\n\n## 5.2.0+1\n\n- Fix `DioErrorType` deprecation hint.\n\n## 5.2.0\n\n- Make `LogInterceptor` prints in DEBUG mode (when the assertion is enabled) by default.\n- Deprecate `DioError` in favor of `DioException`.\n- Fix `IOHttpClientAdapter.onHttpClientCreate` Repeated calls\n- `IOHttpClientAdapter.onHttpClientCreate` has been deprecated and is scheduled for removal in\n  Dio 6.0.0 - Please use the replacement `IOHttpClientAdapter.createHttpClient` instead.\n- Using `CancelToken` no longer closes and re-creates `HttpClient` for each request when `IOHttpClientAdapter` is used.\n- Fix timeout handling for browser `receiveTimeout`.\n- Improve performance when sending binary data (`List<int>`/`Uint8List`).\n\n## 5.1.2\n\n- Allow `FormData` to send a null entry value as an empty string.\n\n## 5.1.1\n\n- Revert changes to `CancelToken.cancel()` behavior, as a result the `DioError`\n  provided by the `CancelToken.cancelError` does not contain useful information\n  when the token was not used with a request.\n- Fix wrong `ListFormat` being used for comparison during encoding of `FormData`\n  and `application/x-www-form-urlencoded`, resulting in potential wrong output encoding\n  for `ListFormat.multi` and `ListFormat.multiCompatible` since Dio 4.0.x.\n- Respect `Options.listFormat` when encoding `x-www-url-encoded` content.\n\n## 5.1.0\n\n- Fix double-completion when using `connectionTimeout` on web platform.\n- Allow defining adapter methods through their constructors.\n- Fix `FormData` encoding regression for maps with dynamic keys, introduced in 5.0.3.\n- Mark several static `DioMixin` functions as `@internal`.\n- Make `DioError.stackTrace` non-nullable.\n- Ensure `DioError.stackTrace` always points to the correct call site.\n\n## 5.0.3\n\n- Imply `List<Map>` as JSON content in `ImplyContentTypeInterceptor`.\n- Fix `FormData` encoding for collections and objects.\n\n## 5.0.2\n\n- Improve code formats according to linter rules.\n- Remove the force conversion for the response body.\n- Fix `DioErrorType.cancel` in `Interceptors`.\n- Fix wrong encoding of collection query parameters.\n- Fix \"unsupported operation\" error on web platform.\n\n## 5.0.1\n\n- Add `ImplyContentTypeInterceptor` as a default interceptor.\n- Add `Headers.multipartFormDataContentType` for headers usage.\n- Fix variable shadowing of `withCredentials` in `browser_adapter.dart`.\n\n## 5.0.0\n\n- Raise the min Dart SDK version to 2.15.0 to support `BackgroundTransformer`.\n- Change `Dio.transformer` from `DefaultTransformer` to `BackgroundTransformer`.\n- Remove plain ASCII check in `FormData`.\n- Allow asynchronous method with `savePath`.\n- Allow `data` in all request methods.\n- A platform independent `HttpClientAdapter` can now be instantiated by doing\n  `dio.httpClientAdapter = HttpClientAdapter();`.\n- Add `ValidateCertificate` to handle certificate pinning better.\n- Support `Content-Disposition` header case sensitivity.\n\n### Breaking Changes\n\n- The default charset `utf-8` in `Headers` content type constants has been removed.\n- `BaseOptions.setRequestContentTypeWhenNoPayload` has been removed.\n- Improve `DioError`s. There are now more cases in which the inner original stacktrace is supplied.\n- `HttpClientAdapter` must now be implemented instead of extended.\n- Any classes specific to `dart:io` platforms can now be imported via `import 'package:dio/io.dart';`.\n  Classes specific to web can be imported via `import 'package:dio/browser.dart';`.\n- `connectTimeout`, `sendTimeout`, and `receiveTimeout` are now `Duration`s.\n\n## 4.0.6\n\n- fix #1452\n\n## 4.0.5\n\n- require Dart `2.12.1` which fixes exception handling for secure socket connections (#45214)\n- Only delete file if it exists when downloading.\n- Fix `BrowserHttpClientAdapter` canceled hangs\n- Correct JSON MIME Type detection\n- [Web] support send/receive progress in web platform\n- refactor timeout logic\n- use 'arraybuffer' instead of 'blob' for xhr requests in web platform\n\n## 4.0.4\n\n- Fix fetching null data in a response\n\n## 4.0.3\n\n- fix #1311\n\n## 4.0.2\n\n- Add QueuedInterceptor\n- merge #1316 #1317\n\n## 4.0.1\n\n- merge pr #1177 #1196 #1205 #1224 #1225 #1227 #1256 #1263 #1291\n- fix #1257\n\n## 4.0.0\n\nstable version\n\n## 4.0.0-prev3\n\n- fix #1091 , #1089 , #1087\n\n## 4.0.0-prev2\n\n- fix #1082 and # 1076\n\n## 4.0.0-prev1\n\n**Interceptors:** Add `handler` for Interceptor APIs which can specify\nthe subsequent interceptors processing logic more finely (whether to skip them or not).\n\n## 4.0.0-beta7\n\n- fix #1074\n\n## 4.0.0-beta6\n\n- fix #1070\n\n## 4.0.0-beta5\n\n- support ListParam\n\n## 4.0.0-beta4\n\n- fix #1060\n\n## 4.0.0-beta3\n\n- rename CollectionFormat to ListFormat\n- change default value of Options.listFormat from `multiCompatible` to `multi`\n- add upload_stream_test.dart\n\n## 4.0.0-beta2\n\n- support null-safety\n- add `CollectionFormat` configuration in Options\n- add `fetch` API for Dio\n- rename DioErrorType enums from uppercase to camel style\n- rename 'Options.merge' to 'Options.copyWith'\n\n## 3.0.10 2020.8.7\n\n1. fix #877 'dio.interceptors.errorLock.lock()'\n2. fix #851\n3. fix #641\n\n## 3.0.9 2020.2.24\n\n- Add test cases\n\n## 3.0.8 2019.12.29\n\n- Code style improvement\n\n## 3.0.7 2019.11.25\n\n- Merge #574 : fix upload image header error, support both oss and other server\n\n## 3.0.6 2019.11.22\n\n- revert #562, and fixed #566\n\n## 3.0.5 2019.11.19\n\n- merge #557 #531\n\n## 3.0.4 2019.10.29\n\n- fix #502 #515 #523\n\n## 3.0.3 2019.10.1\n\n- fix encode bug\n\n## 3.0.2 2019.9.26\n\n- fix #474 #480\n\n## 3.0.2-dev.1 2019.9.20\n\n- fix #470 #471\n\n## 3.0.1 2019.9.20\n\n- Fix #467\n- Export `DioForNative` and `DioForBrowser` classes.\n\n## 3.0.0\n\n### New features\n\n- Support Flutter Web.\n- Extract [CookieManager](../plugins/cookie_manager) into a separate package（No need for Flutter Web）.\n- Provides [HTTP/2.0 HttpClientAdapter](../plugins/http2_adapter).\n\n### Change List\n\n- ~~Options.cookies~~\n\n- ~~Options.connectionTimeout~~ ；We should config connection timed out in `BaseOptions`. For keep-alive reasons, not every request requires a separate connection。\n\n- `Options.followRedirects`、`Options.maxRedirects`、`Response.redirects` don't make sense in Flutter Web，because redirection can be automatically handled by browsers.\n- ~~FormData.from~~，use `FormData.fromMap` instead.\n- Delete ~~Formdata.asBytes()~~、~~Formdata.asBytesAsync()~~ , use `Formdata.readAsBytes()` instead.\n- Delete ~~`UploadFileInfo`~~ class， `MultipartFile` instead.\n- The return type of Interceptor's callback changes from `FutureOr<dynamic>` to `Future`.\n  The reason is [here](https://dart.dev/guides/language/effective-dart/design#avoid-using-futureort-as-a-return-type).\n- The type of `Response.headers` changes from `HttpHeaders` to `Headers`,\n  because `HttpHeaders` is in \"dart:io\" library which is not supported in Flutter Web.\n\n## 2.1.16\n\nAdd `deleteOnError` parameter to `downloadUri`\n\n## 2.1.14\n\n- fix #402 #385 #422\n\n## 2.1.13\n\n- fix #369\n\n## 2.1.12\n\n- fix #367 #365\n\n## 2.1.10\n\n- fix #360\n\n## 2.1.9\n\n- support flutter version>=1.8 (fix #357)\n\n## 2.1.8\n\n- fix #354 #312\n- Allow \"delete\" method with request body(#223)\n\n## 2.1.7\n\n- fix #321 #318\n\n## 2.1.6\n\n- fix #316\n\n## 2.1.5\n\n- fix #309\n\n## 2.1.4\n\n- Add `options.responseDecoder`\n- Make DioError catchable by implementing Exception instead of Error\n\n## 2.1.3\n\nAdd `statusMessage` attribute for `Response` and `ResponseBody`\n\n## 2.1.2\n\nFirst Stable version for 2.x\n\n## 2.0\n\n**Refactor the Interceptors**\n\n- Support add Multiple Interceptors.\n- Add Log Interceptor\n- Add CookieManager Interceptor\n\n**API**\n\n- Support Uri\n- Support `queryParameters` for all request API\n- Modify the `get` API\n\n**Options**\n\n- Separate Options to three class: Options、BaseOptions、RequestOptions\n- Add `queryParameters` and `cookies` for BaseOptions\n\n**Adapter**\n\n- Abstract HttpClientAdapter layer.\n- Provide a DefaultHttpClientAdapter which make http requests by `dart:io:HttpClient`\n\n## 0.1.8\n\n- change file name \"TransFormer\" to \"Transformer\"\n- change \"dio.transFormer\" to \"dio.transformer\"\n- change deprecated \"UTF8\" to \"utf8\"\n\n## 0.1.5\n\n- add `clear` method for dio instance\n\n## 0.1.4\n\n- fix `download` bugs\n\n## 0.1.3\n\n- support upload files with Array\n- support create `HttpClient` by user self in `onHttpClientCreate`\n- support generic\n- bug fix\n\n## 0.0.1\n\n- Initial version, created by Stagehand\n\n[Migration Guide]: doc/migration_guide.md\n"
  },
  {
    "path": "dio/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Wen Du (wendux)\nCopyright (c) 2022 The CFUG Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "dio/README-ZH.md",
    "content": "# dio\n\n[![Pub](https://img.shields.io/pub/v/dio.svg)](https://pub.flutter-io.cn/packages/dio)\n[![Dev](https://img.shields.io/pub/v/dio.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/dio)\n\n文档语言： 简体中文 | [English](README.md)\n\ndio 是一个强大的 HTTP 网络请求库，支持全局配置、Restful API、FormData、拦截器、\n请求取消、Cookie 管理、文件上传/下载、超时、自定义适配器、转换器等。\n\n> 别忘了为你发布的与 dio 相关的 package 添加\n> [#dio](https://pub.flutter-io.cn/packages?q=topic%3Adio) 分类标签！\n> 了解更多：https://dart.cn/tools/pub/pubspec#topics\n\n<details>\n  <summary>内容列表</summary>\n\n<!-- TOC -->\n* [dio](#dio)\n  * [开始使用](#开始使用)\n    * [添加依赖](#添加依赖)\n  * [一个极简的示例](#一个极简的示例)\n  * [Awesome dio](#awesome-dio)\n    * [相关插件](#相关插件)\n    * [相关的项目](#相关的项目)\n  * [示例](#示例)\n    * [发起一个 `GET` 请求 :](#发起一个-get-请求-)\n    * [发起一个 `POST` 请求:](#发起一个-post-请求)\n    * [发起多个并发请求](#发起多个并发请求)\n    * [下载文件](#下载文件)\n    * [以流的方式接收响应数据](#以流的方式接收响应数据)\n    * [以二进制数组的方式接收响应数据](#以二进制数组的方式接收响应数据)\n    * [发送 `FormData`](#发送-formdata)\n    * [通过 `FormData` 上传多个文件](#通过-formdata-上传多个文件)\n    * [监听发送（上传）数据进度](#监听发送上传数据进度)\n    * [以流的形式提交二进制数据](#以流的形式提交二进制数据)\n  * [Dio APIs](#dio-apis)\n    * [创建一个Dio实例，并配置它](#创建一个dio实例并配置它)\n    * [请求配置](#请求配置)\n    * [响应数据](#响应数据)\n    * [拦截器](#拦截器)\n      * [完成和终止请求/响应](#完成和终止请求响应)\n      * [QueuedInterceptor](#queuedinterceptor)\n        * [例子](#例子)\n      * [日志拦截器](#日志拦截器)\n      * [Dart](#dart)\n      * [Flutter](#flutter)\n    * [自定义拦截器](#自定义拦截器)\n  * [错误处理](#错误处理)\n    * [DioException](#dioexception)\n    * [DioExceptionType](#dioexceptiontype)\n  * [使用 application/x-www-form-urlencoded 编码](#使用-applicationx-www-form-urlencoded-编码)\n  * [发送 FormData](#发送-formdata-1)\n    * [多文件上传](#多文件上传)\n    * [复用 `FormData` 和 `MultipartFile`](#复用-formdata-和-multipartfile)\n  * [转换器](#转换器)\n    * [在 Flutter 中进行设置](#在-flutter-中进行设置)\n    * [其它示例](#其它示例)\n  * [HttpClientAdapter](#httpclientadapter)\n    * [设置代理](#设置代理)\n    * [HTTPS 证书校验](#https-证书校验)\n  * [HTTP/2 支持](#http2-支持)\n  * [请求取消](#请求取消)\n  * [继承 Dio class](#继承-dio-class)\n  * [Web 平台跨域资源共享 (CORS)](#web-平台跨域资源共享-cors)\n<!-- TOC -->\n</details>\n\n## 开始使用\n\n### 添加依赖\n\n依照文档将 `dio` 包添加为\n[pubspec 的依赖](https://pub.flutter-io.cn/packages/dio/install)。\n\n**在你更新之前：大版本和次要版本可能会包含不兼容的重大改动。<br/>\n请阅读 [迁移指南][] 了解完整的重大变更内容。**\n\n[迁移指南]: https://pub.flutter-io.cn/documentation/dio/latest/topics/Migration%20Guide-topic.html\n\n## 一个极简的示例\n\n```dart\nimport 'package:dio/dio.dart';\n\nfinal dio = Dio();\n\nvoid getHttp() async {\n  final response = await dio.get('https://dart.dev');\n  print(response);\n}\n```\n\n## Awesome dio\n\n🎉 以下是一个与 Dio 相关的精选清单。\n\n### 相关插件\n\n<!-- 使用 https://pub.flutter-io.cn 作为管理网址 -->\n| 仓库                                                                                                     | 最新版本                                                                                                                             | 描述                                                 |\n|--------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------|\n| [dio_cookie_manager](https://github.com/cfug/dio/blob/main/plugins/cookie_manager)                     | [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg)](https://pub.flutter-io.cn/packages/dio_cookie_manager)             | Cookie 管理                                          |\n| [dio_http2_adapter](https://github.com/cfug/dio/blob/main/plugins/http2_adapter)                       | [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg)](https://pub.flutter-io.cn/packages/dio_http2_adapter)               | 支持 HTTP/2 的自定义适配器                                  |\n| [native_dio_adapter](https://github.com/cfug/dio/blob/main/plugins/native_dio_adapter)                 | [![Pub](https://img.shields.io/pub/v/native_dio_adapter.svg)](https://pub.flutter-io.cn/packages/native_dio_adapter)             | 使用 cupertino_http 和 cronet_http 以适配器代理实现的原生网络请求功能。 |\n| [dio_smart_retry](https://github.com/rodion-m/dio_smart_retry)                                         | [![Pub](https://img.shields.io/pub/v/dio_smart_retry.svg)](https://pub.flutter-io.cn/packages/dio_smart_retry)                   | 支持灵活地请求重试                                          |\n| [http_certificate_pinning](https://github.com/diefferson/http_certificate_pinning)                     | [![Pub](https://img.shields.io/pub/v/http_certificate_pinning.svg)](https://pub.flutter-io.cn/packages/http_certificate_pinning) | 用于 Flutter 的 HTTPS 证书锁定                            |\n| [dio_intercept_to_curl](https://github.com/blackflamedigital/dio_intercept_to_curl)                    | [![Pub](https://img.shields.io/pub/v/dio_intercept_to_curl.svg)](https://pub.flutter-io.cn/packages/dio_intercept_to_curl)       | 用于 Flutter 的 CURL 命令生成器                            |\n| [dio_cache_interceptor](https://github.com/llfbandit/dio_cache_interceptor)                            | [![Pub](https://img.shields.io/pub/v/dio_cache_interceptor.svg)](https://pub.flutter-io.cn/packages/dio_cache_interceptor)       | 具有多个符合 HTTP 指令的 HTTP 缓存拦截器，                        |\n| [dio_http_cache](https://github.com/hurshi/dio-http-cache)                                             | [![Pub](https://img.shields.io/pub/v/dio_http_cache.svg)](https://pub.flutter-io.cn/packages/dio_http_cache)                     | 类似 Android 中的 RxCache 的缓存管理                        |\n| [pretty_dio_logger](https://github.com/Milad-Akarie/pretty_dio_logger)                                 | [![Pub](https://img.shields.io/pub/v/pretty_dio_logger.svg)](https://pub.flutter-io.cn/packages/pretty_dio_logger)               | 基于拦截器的简明易读的请求日志打印                                  |\n| [dio_image_provider](https://github.com/ueman/image_provider)                                          | [![Pub](https://img.shields.io/pub/v/dio_image_provider.svg)](https://pub.flutter-io.cn/packages/dio_image_provider)             | 基于 Dio 的图片加载                                       |\n| [flutter_ume_kit_dio](https://github.com/cfug/flutter_ume_kits/tree/main/packages/flutter_ume_kit_dio) | [![Pub](https://img.shields.io/pub/v/flutter_ume_kit_dio.svg)](https://pub.flutter-io.cn/packages/flutter_ume_kit_dio)           | flutter_ume 上的 dio 调试插件                            |\n| [talker_dio_logger](https://github.com/Frezyx/talker/tree/master/packages/talker_dio_logger)           | [![Pub](https://img.shields.io/pub/v/talker_dio_logger.svg)](https://pub.flutter-io.cn/packages/talker_dio_logger)               | 基于 talker 的轻量级和可定制的 dio 记录器                        |\n\n### 相关的项目\n\n如果您也想提供第三方组件，请移步\n[这里](https://github.com/cfug/dio/issues/347)。\n\n## 示例\n\n### 发起一个 `GET` 请求 :\n\n```dart\nimport 'package:dio/dio.dart';\n\nfinal dio = Dio();\n\nvoid request() async {\n  Response response;\n  response = await dio.get('/test?id=12&name=dio');\n  print(response.data.toString());\n  // The below request is the same as above.\n  response = await dio.get(\n    '/test',\n    queryParameters: {'id': 12, 'name': 'dio'},\n  );\n  print(response.data.toString());\n}\n```\n\n### 发起一个 `POST` 请求:\n\n```dart\nresponse = await dio.post('/test', data: {'id': 12, 'name': 'dio'});\n```\n\n### 发起多个并发请求\n\n```dart\nList<Response> responses = await Future.wait([dio.post('/info'), dio.get('/token')]);\n```\n\n### 下载文件\n\n```dart\nresponse = await dio.download(\n  'https://www.google.com/',\n  '${(await getTemporaryDirectory()).path}google.html',\n);\n```\n\n### 以流的方式接收响应数据\n\n```dart\nfinal rs = await dio.get(\n  url,\n  options: Options(responseType: ResponseType.stream), // 设置接收类型为 `stream`\n);\nprint(rs.data.stream); // 响应流\n```\n\n### 以二进制数组的方式接收响应数据\n\n```dart\nfinal rs = await dio.get(\n  url,\n  options: Options(responseType: ResponseType.bytes), // 设置接收类型为 `bytes`\n);\nprint(rs.data); // 类型: List<int>\n```\n\n### 发送 `FormData`\n\n```dart\nfinal formData = FormData.fromMap({\n  'name': 'dio',\n  'date': DateTime.now().toIso8601String(),\n});\nfinal response = await dio.post('/info', data: formData);\n```\n\n### 通过 `FormData` 上传多个文件\n\n```dart\nfinal formData = FormData.fromMap({\n  'name': 'dio',\n  'date': DateTime.now().toIso8601String(),\n  'file': await MultipartFile.fromFile('./text.txt', filename: 'upload.txt'),\n  'files': [\n    await MultipartFile.fromFile('./text1.txt', filename: 'text1.txt'),\n    await MultipartFile.fromFile('./text2.txt', filename: 'text2.txt'),\n  ]\n});\nfinal response = await dio.post('/info', data: formData);\n```\n\n### 监听发送（上传）数据进度\n\n```dart\nfinal response = await dio.post(\n  'https://www.dtworkroom.com/doris/1/2.0.0/test',\n  data: {'aa': 'bb' * 22},\n  onSendProgress: (int sent, int total) {\n    print('$sent $total');\n  },\n);\n```\n\n### 以流的形式提交二进制数据\n\n```dart\n// Binary data\nfinal postData = <int>[0, 1, 2];\nawait dio.post(\n  url,\n  data: Stream.fromIterable(postData.map((e) => [e])), // 构建 Stream<List<int>>\n  options: Options(\n    headers: {\n      Headers.contentLengthHeader: postData.length, // 设置 content-length.\n    },\n  ),\n);\n```\n\n注意：如果要监听提交进度，则必须设置content-length，否则是可选的。\n\n你可以在这里查看 [全部示例](example)。\n\n## Dio APIs\n\n### 创建一个Dio实例，并配置它\n\n> 建议在项目中使用Dio单例，这样便可对同一个dio实例发起的所有请求进行一些统一的配置，\n> 比如设置公共header、请求基地址、超时时间等。\n> 这里有一个在[Flutter工程中使用Dio单例](../example_flutter_app)\n> （定义为top level变量）的示例供开发者参考。\n\n你可以使用默认配置或传递一个可选 `BaseOptions`参数来创建一个Dio实例 :\n\n```dart\nfinal dio = Dio(); // With default `Options`.\n\nvoid configureDio() {\n  // Update default configs.\n  dio.options.baseUrl = 'https://api.pub.dev';\n  dio.options.connectTimeout = Duration(seconds: 5);\n  dio.options.receiveTimeout = Duration(seconds: 3);\n\n  // Or create `Dio` with a `BaseOptions` instance.\n  final options = BaseOptions(\n    baseUrl: 'https://api.pub.dev',\n    connectTimeout: Duration(seconds: 5),\n    receiveTimeout: Duration(seconds: 3),\n  );\n  final anotherDio = Dio(options);\n\n  // Or clone the existing `Dio` instance with all fields.\n  final clonedDio = dio.clone();\n}\n```\n\nDio 的核心 API 是：\n\n```dart\nFuture<Response<T>> request<T>(\n  String path, {\n  Object? data,\n  Map<String, dynamic>? queryParameters,\n  CancelToken? cancelToken,\n  Options? options,\n  ProgressCallback? onSendProgress,\n  ProgressCallback? onReceiveProgress,\n});\n```\n\n```dart\nfinal response = await dio.request(\n  '/test',\n  data: {'id': 12, 'name': 'dio'},\n  options: Options(method: 'GET'),\n);\n```\n\n### 请求配置\n\n在 Dio 中有两种配置概念：`BaseOptions` 和 `Options`。\n`BaseOptions` 描述的是 Dio 实例的一套基本配置，而 `Options` 描述了单独请求的配置信息。\n以上的配置会在发起请求时进行合并。\n下面是 `Options` 的配置项：\n\n```dart\n/// HTTP 请求方法。\nString method;\n\n/// 发送数据的超时设置。\n///\n/// 超时时会抛出类型为 [DioExceptionType.sendTimeout] 的\n/// [DioException]。\n///\n/// `null` 或 `Duration.zero` 即不设置超时。\nDuration? sendTimeout;\n\n/// 接收数据的超时设置。\n///\n/// 这里的超时对应的时间是：\n///  - 在建立连接和第一次收到响应数据事件之前的超时。\n///  - 每个数据事件传输的间隔时间，而不是接收的总持续时间。\n///\n/// 超时时会抛出类型为 [DioExceptionType.receiveTimeout] 的\n/// [DioException]。\n///\n/// `null` 或 `Duration.zero` 即不设置超时。\nDuration? receiveTimeout;\n\n/// 可以在 [Interceptor]、[Transformer] 和\n/// [Response.requestOptions] 中获取到的自定义对象。\nMap<String, dynamic>? extra;\n\n/// HTTP 请求头。\n///\n/// 请求头的键是否相等的判断大小写不敏感的。\n/// 例如：`content-type` 和 `Content-Type` 会视为同样的请求头键。\nMap<String, dynamic>? headers;\n\n/// 是否保留请求头的大小写。\n///\n/// 默认值为 false。\n///\n/// 该选项在以下场景无效：\n///  - XHR 不支持直接处理。\n///  - 按照 HTTP/2 的标准，只支持小写请求头键。\nbool? preserveHeaderCase;\n\n/// 表示 [Dio] 处理请求响应数据的类型。\n///\n/// 默认值为 [ResponseType.json]。\n/// [Dio] 会在请求响应的 content-type\n/// 为 [Headers.jsonContentType] 时自动将响应字符串处理为 JSON 对象。\n///\n/// 在以下情况时，分别使用：\n///  - `plain` 将数据处理为 `String`；\n///  - `bytes` 将数据处理为完整的 bytes。\n///  - `stream` 将数据处理为流式返回的二进制数据；\nResponseType? responseType;\n\n/// 请求的 content-type。\n///\n/// 请求默认的 `content-type` 会由 [ImplyContentTypeInterceptor]\n/// 根据发送数据的类型推断。它可以通过\n/// [Interceptors.removeImplyContentTypeInterceptor] 移除。\nString? contentType;\n\n/// 判断当前返回的状态码是否可以视为请求成功。\nValidateStatus? validateStatus;\n\n/// 是否在请求失败时仍然获取返回数据内容。\n///\n/// 默认为 true。\nbool? receiveDataWhenStatusError;\n\n/// 参考 [HttpClientRequest.followRedirects]。\n///\n/// 默认为 true。\nbool? followRedirects;\n\n/// 当 [followRedirects] 为 true 时，指定的最大重定向次数。\n/// 如果请求超出了重定向次数上线，会抛出 [RedirectException]。\n///\n/// 默认为 5。\nint? maxRedirects;\n\n/// 参考 [HttpClientRequest.persistentConnection]。\n///\n/// 默认为 true。\nbool? persistentConnection;\n\n/// 对请求内容进行自定义编码转换。\n///\n/// 默认为 [Utf8Encoder]。\nRequestEncoder? requestEncoder;\n\n/// 对请求响应内容进行自定义解码转换。\n///\n/// 默认为 [Utf8Decoder]。\nResponseDecoder? responseDecoder;\n\n/// 当请求参数以 `x-www-url-encoded` 方式发送时，如何处理集合参数。\n///\n/// 默认为 [ListFormat.multi]。\nListFormat? listFormat;\n```\n\n此处为 [完整的代码示例](../example_dart/lib/options.dart)。\n\n### 响应数据\n\n当请求成功时会返回一个Response对象，它包含如下字段：\n\n```dart\n/// 响应数据。可能已经被转换了类型, 详情请参考 [ResponseType]。\nT? data;\n\n/// 响应对应的请求配置。\nRequestOptions requestOptions;\n\n/// 响应的 HTTP 状态码。\nint? statusCode;\n\n/// 响应对应状态码的详情信息。\nString? statusMessage;\n\n/// 响应是否被重定向\nbool isRedirect;\n\n/// 请求连接经过的重定向列表。如果请求未经过重定向，则列表为空。\nList<RedirectRecord> redirects;\n\n/// 在 [RequestOptions] 中构造的自定义字段。\nMap<String, dynamic> extra;\n\n/// 响应对应的头数据。\nHeaders headers;\n```\n\n请求成功后，你可以访问到下列字段：\n\n```dart\nfinal response = await dio.get('https://pub.dev');\nprint(response.data);\nprint(response.headers);\nprint(response.requestOptions);\nprint(response.statusCode);\n```\n\n注意，`Response.extra` 与 `RequestOptions.extra` 是不同的实例，互相之间无关。\n\n### 拦截器\n\n每个 Dio 实例都可以添加任意多个拦截器，他们会组成一个队列，拦截器队列的执行顺序是先进先出。\n通过使用拦截器，你可以在请求之前、响应之后和发生异常时（未被 `then` 或 `catchError` 处理）\n做一些统一的预处理操作。\n\n```dart\ndio.interceptors.add(\n  InterceptorsWrapper(\n    onRequest: (RequestOptions options, RequestInterceptorHandler handler) {\n      // 如果你想完成请求并返回一些自定义数据，你可以使用 `handler.resolve(response)`。\n      // 如果你想终止请求并触发一个错误，你可以使用 `handler.reject(error)`。\n      return handler.next(options);\n    },\n    onResponse: (Response response, ResponseInterceptorHandler handler) {\n      // 如果你想终止请求并触发一个错误，你可以使用 `handler.reject(error)`。\n      return handler.next(response);\n    },\n    onError: (DioException error, ErrorInterceptorHandler handler) {\n      // 如果你想完成请求并返回一些自定义数据，你可以使用 `handler.resolve(response)`。\n      return handler.next(error);\n    },\n  ),\n);\n```\n\n一个简单的自定义拦截器示例:\n\n```dart\nimport 'package:dio/dio.dart';\nclass CustomInterceptors extends Interceptor {\n  @override\n  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {\n    print('REQUEST[${options.method}] => PATH: ${options.path}');\n    super.onRequest(options, handler);\n  }\n\n  @override\n  void onResponse(Response response, ResponseInterceptorHandler handler) {\n    print('RESPONSE[${response.statusCode}] => PATH: ${response.requestOptions.path}');\n    super.onResponse(response, handler);\n  }\n\n  @override\n  Future onError(DioException err, ErrorInterceptorHandler handler) async {\n    print('ERROR[${err.response?.statusCode}] => PATH: ${err.requestOptions.path}');\n    super.onError(err, handler);\n  }\n}\n```\n\n#### 完成和终止请求/响应\n\n在所有拦截器中，你都可以改变请求执行流，\n如果你想完成请求/响应并返回自定义数据，你可以 resolve 一个 `Response` 对象\n或返回 `handler.resolve(data)` 的结果。\n如果你想终止（触发一个错误，上层 `catchError` 会被调用）一个请求/响应，\n那么可以 reject 一个`DioException` 对象或返回 `handler.reject(errMsg)` 的结果。\n\n```dart\ndio.interceptors.add(\n  InterceptorsWrapper(\n    onRequest: (options, handler) {\n      return handler.resolve(\n        Response(requestOptions: options, data: 'fake data'),\n      );\n    },\n  ),\n);\nfinal response = await dio.get('/test');\nprint(response.data); // 'fake data'\n```\n\n#### QueuedInterceptor\n\n如果同时发起多个网络请求，则它们是可以同时进入`Interceptor` 的（并行的），\n而 `QueuedInterceptor` 提供了一种串行机制：\n它可以保证请求进入拦截器时是串行的（前面的执行完后后面的才会进入拦截器）。\n\n##### 例子\n\n假设这么一个场景：出于安全原因，我们需要给所有的请求头中添加一个 `csrfToken`，\n如果 `csrfToken` 不存在，我们先去请求 `csrfToken`，获取到 `csrfToken` 后再重试。\n假设刚开始的时候 `csrfToken` 为 null，如果允许请求并发，则这些并发请求并行进入拦截器时\n`csrfToken` 都为 null，所以它们都需要去请求 `csrfToken`，这会导致 `csrfToken` 被请求多次。\n为了避免不必要的重复请求，可以使用 `QueuedInterceptor`， 这样只需要第一个请求处理一次即可。\n\n完整的示例代码请点击 [这里](../example_dart/lib/queued_interceptor_crsftoken.dart).\n\n#### 日志拦截器\n\n我们可以添加 `LogInterceptor` 拦截器来自动打印请求和响应等日志：\n\n**注意：** `LogInterceptor` 应该保持最后一个被添加到拦截器中，\n否则在它之后进行处理的拦截器修改的内容将无法体现。\n\n#### Dart\n\n```dart\ndio.interceptors.add(LogInterceptor(responseBody: false)); // 不输出响应内容体\n```\n\n**注意：** 默认的 `logPrint` 只会在 DEBUG 模式（启用了断言）\n的情况下输出日志。\n\n你也可以使用 `dart:developer` 中的 `log` 来输出日志（在 Flutter 中也可以使用）。\n\n#### Flutter\n\n在 Flutter 中你应该使用 `debugPrint` 来打印日志。\n\n这样也会让调试日志能够通过 `flutter logs` 获取到。\n\n**注意：** `debugPrint` 的意义 **不是只在 DEBUG 模式下打印**，\n而是对输出内容进行节流，从而保证输出完整。\n请不要在生产模式使用，除非你有意输出相关日志。\n\n```dart\ndio.interceptors.add(\n  LogInterceptor(\n    logPrint: (o) => debugPrint(o.toString()),\n  ),\n);\n```\n\n### 自定义拦截器\n\n开发者可以通过继承 `Interceptor/QueuedInterceptor` 类来实现自定义拦截器。\n这是一个简单的 [缓存拦截器](../example_dart/lib/custom_cache_interceptor.dart)。\n\n## 错误处理\n\n当请求过程中发生错误时, Dio 会将 `Error/Exception` 包装成一个 `DioException`:\n\n```dart\ntry {\n  // 404\n  await dio.get('https://api.pub.dev/not-exist');\n} on DioException catch (e) {\n  // The request was made and the server responded with a status code\n  // that falls out of the range of 2xx and is also not 304.\n  if (e.response != null) {\n    print(e.response.data)\n    print(e.response.headers)\n    print(e.response.requestOptions)\n  } else {\n    // Something happened in setting up or sending the request that triggered an Error\n    print(e.requestOptions)\n    print(e.message)\n  }\n}\n```\n\n### DioException\n\n```dart\n/// 错误的请求对应的配置。\nRequestOptions requestOptions;\n\n/// 错误的请求对应的响应内容。如果请求未完成，响应内容可能为空。\nResponse? response;\n\n/// 错误的类型。\nDioExceptionType type;\n\n/// 实际错误的内容。\nObject? error;\n\n/// 实际错误的堆栈。\nStackTrace? stackTrace;\n\n/// 错误信息。\nString? message;\n```\n\n### DioExceptionType\n\n见 [源码](lib/src/dio_exception.dart)。\n\n## 使用 application/x-www-form-urlencoded 编码\n\n默认情况下, Dio 会将请求数据（除了 `String` 类型）序列化为 JSON。\n如果想要以 `application/x-www-form-urlencoded` 格式编码, 你可以设置 `contentType` :\n\n```dart\n// Instance level\ndio.options.contentType = Headers.formUrlEncodedContentType;\n// or only works once\ndio.post(\n  '/info',\n  data: {'id': 5},\n  options: Options(contentType: Headers.formUrlEncodedContentType),\n);\n```\n\n## 发送 FormData\n\nDio 支持发送 `FormData`, 请求数据将会以 `multipart/form-data` 方式编码, \n`FormData` 中可以包含一个或多个文件。\n\n```dart\nfinal formData = FormData.fromMap({\n  'name': 'dio',\n  'date': DateTime.now().toIso8601String(),\n  'file': await MultipartFile.fromFile('./text.txt',filename: 'upload.txt')\n});\nfinal response = await dio.post('/info', data: formData);\n```\n\n你也可以指定封边 (boundary) 的名称，\n封边名称会与额外的前缀和后缀一并组装成 `FormData` 的封边。\n\n```dart\nfinal formDataWithBoundaryName = FormData(\n  boundaryName: 'my-boundary-name',\n);\n```\n\n> 通常情况下只有 POST 方法支持发送 FormData。\n\n这里有一个完整的 [示例](../example_dart/lib/formdata.dart)。\n\n### 多文件上传\n\n多文件上传时，通过给 key 加中括号 `[]` 方式作为文件数组的标记，大多数后台也会通过 `key[]` 来读取多个文件。 \n然而 RFC 标准中并没有规定多文件上传必须要使用 `[]`，关键在于后台与客户端之间保持一致。\n\n```dart\nfinal formData = FormData.fromMap({\n  'files': [\n    MultipartFile.fromFileSync('path/to/upload1.txt', filename: 'upload1.txt'),\n    MultipartFile.fromFileSync('path/to/upload2.txt', filename: 'upload2.txt'),\n  ],\n});\n```\n\n最终编码时会 key 会为 `files[]`，\n**如果不想添加 `[]`**，可以通过 `Formdata` 的 `files` 来构建：\n\n```dart\nfinal formData = FormData();\nformData.files.addAll([\n  MapEntry(\n   'files',\n    MultipartFile.fromFileSync('./example/upload.txt',filename: 'upload.txt'),\n  ),\n  MapEntry(\n    'files',\n    MultipartFile.fromFileSync('./example/upload.txt',filename: 'upload.txt'),\n  ),\n]);\n```\n\n### 复用 `FormData` 和 `MultipartFile`\n\n如果你在重复调用的请求中使用 `FormData` 或者 `MultipartFile`，确保你每次使用的都是新实例。\n常见的错误做法是将 `FormData` 赋值给一个共享变量，在每次请求中都使用这个变量。\n这样的操作会加大 **无法序列化** 的错误出现的可能性。\n你可以像以下的代码一样编写你的请求以避免出现这样的错误：\n```dart\nFuture<void> _repeatedlyRequest() async {\n  Future<FormData> createFormData() async {\n    return FormData.fromMap({\n      'name': 'dio',\n      'date': DateTime.now().toIso8601String(),\n      'file': await MultipartFile.fromFile('./text.txt',filename: 'upload.txt'),\n    });\n  }\n  \n  await dio.post('some-url', data: await createFormData());\n}\n```\n\n## 转换器\n\n转换器 `Transformer` 用于对请求数据和响应数据进行编解码处理。\nDio 实现了一个默认转换器 `DefaultTransformer`。\n如果你想对请求和响应数据进行自定义编解码处理，可以提供自定义转换器并通过 `dio.transformer` 设置。\n\n> `Transformer.transformRequest` 只在 `PUT`/`POST`/`PATCH` 方法中生效，\n> 只有这些方法可以使用请求内容体 (request body)。\n> 但是 `Transformer.transformResponse` 可以用于所有请求方法的返回数据。\n\n### 在 Flutter 中进行设置\n\n如果你在开发 Flutter 应用，强烈建议通过 `compute` 在单独的 isolate 中进行 JSON 解码，\n从而避免在解析复杂 JSON 时导致的 UI 卡顿。\n\n```dart\n/// \nMap<String, dynamic> _parseAndDecode(String response) {\n  return jsonDecode(response) as Map<String, dynamic>;\n}\n\nFuture<Map<String, dynamic>> parseJson(String text) {\n  return compute(_parseAndDecode, text);\n}\n\nvoid main() {\n  // 自定义 `jsonDecodeCallback`\n  dio.transformer = DefaultTransformer()..jsonDecodeCallback = parseJson;\n  runApp(MyApp());\n}\n```\n\n### 其它示例\n\n这里有一个 [自定义 Transformer 的示例](../example_dart/lib/transformer.dart)。\n\n## HttpClientAdapter\n\n`HttpClientAdapter` 是 `Dio` 和 `HttpClient` 之间的桥梁。\n\n`Dio` 实现了一套标准且强大的 API，而 `HttpClient` 则是真正发起 HTTP 请求的对象。\n\n我们通过 `HttpClientAdapter` 将 `Dio` 和 `HttpClient` 解耦，\n这样一来便可以自由定制 HTTP 请求的底层实现。\nDio 使用 `IOHttpClientAdapter` 作为原生平台默认的桥梁，\n`BrowserHttpClientAdapter` 作为 Web 平台的桥梁。\n你可以通过 `HttpClientAdapter()` 来根据平台创建它们。\n\n```dart\ndio.httpClientAdapter = HttpClientAdapter();\n```\n\n如果你需要单独使用对应平台的适配器：\n- 对于 Web 平台\n  ```dart\n  import 'package:dio/browser.dart';\n  // ...\n  dio.httpClientAdapter = BrowserHttpClientAdapter();\n  ```\n- 对于原生平台：\n  ```dart\n  import 'package:dio/io.dart';\n  // ...\n  dio.httpClientAdapter = IOHttpClientAdapter();\n  ```\n\n[示例](../example_dart/lib/adapter.dart) 中包含了一个简单的自定义桥接。\n\n### 设置代理\n\n`IOHttpClientAdapter` 提供了一个 `createHttpClient` 回调来设置底层 `HttpClient` 的代理：\n\n```dart\nimport 'package:dio/io.dart';\n\nvoid initAdapter() {\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    createHttpClient: () {\n      final client = HttpClient();\n      client.findProxy = (uri) {\n        // 将请求代理至 localhost:8888。\n        // 请注意，代理会在你正在运行应用的设备上生效，而不是在宿主平台生效。\n        return 'PROXY localhost:8888';\n      };\n      return client;\n    },\n  );\n}\n```\n\n完整的示例请查看 [这里](../example_dart/lib/proxy.dart)。\n\nWeb 平台不支持设置代理。\n\n### HTTPS 证书校验\n\nHTTPS 证书验证（或公钥固定）是指确保端侧与服务器的 TLS 连接的证书是期望的证书，从而减少中间人攻击的机会。\n[OWASP](https://owasp.org/www-community/controls/Certificate_and_Public_Key_Pinning) 中解释了该理论。\n\n**服务器响应证书**\n\n与其他方法不同，此方法使用服务器本身的证书。\n\n```dart\nvoid initAdapter() {\n  const String fingerprint = 'ee5ce1dfa7a53657c545c62b65802e4272878dabd65c0aadcf85783ebb0b4d5c';\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    createHttpClient: () {\n      // Don't trust any certificate just because their root cert is trusted.\n      final HttpClient client = HttpClient(context: SecurityContext(withTrustedRoots: false));\n      // You can test the intermediate / root cert here. We just ignore it.\n      client.badCertificateCallback = (cert, host, port) => true;\n      return client;\n    },\n    validateCertificate: (cert, host, port) {\n      // Check that the cert fingerprint matches the one we expect.\n      // We definitely require _some_ certificate.\n      if (cert == null) {\n        return false;\n      }\n      // Validate it any way you want. Here we only check that\n      // the fingerprint matches the OpenSSL SHA256.\n      return fingerprint == sha256.convert(cert.der).toString();\n    },\n  );\n}\n```\n\n你可以使用 OpenSSL 读取密钥的 SHA-256：\n\n```sh\nopenssl s_client -servername pinning-test.badssl.com -connect pinning-test.badssl.com:443 < /dev/null 2>/dev/null \\\n  | openssl x509 -noout -fingerprint -sha256\n\n# SHA256 Fingerprint=EE:5C:E1:DF:A7:A5:36:57:C5:45:C6:2B:65:80:2E:42:72:87:8D:AB:D6:5C:0A:AD:CF:85:78:3E:BB:0B:4D:5C\n# (remove the formatting, keep only lower case hex characters to match the `sha256` above)\n```\n\n**证书颁发机构验证**\n\n当您的服务器具有自签名证书时，可以用下面的方法，但它们不适用于 AWS 或 Let's Encrypt 等第三方颁发的证书。\n\n有两种方法可以校验证书，假设我们的后台服务使用的是自签名证书，证书格式是 PEM 格式，我们将证书的内容保存在本地字符串中，\n那么我们的校验逻辑如下：\n\n```dart\nvoid initAdapter() {\n  String PEM = 'XXXXX'; // root certificate content\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    createHttpClient: () {\n      final client = HttpClient();\n      client.badCertificateCallback = (X509Certificate cert, String host, int port) {\n        return cert.pem == PEM; // Verify the certificate.\n      };\n      return client;\n    },\n  );\n}\n```\n\n对于自签名的证书，我们也可以将其添加到本地证书信任链中，\n这样证书验证时就会自动通过，而不会再走到 `badCertificateCallback` 回调中：\n\n```dart\nvoid initAdapter() {\n  String PEM = 'XXXXX'; // root certificate content\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    onHttpClientCreate: (_) {\n      final SecurityContext sc = SecurityContext();\n      sc.setTrustedCertificates(File(pathToTheCertificate));\n      final HttpClient client = HttpClient(context: sc);\n      return client;\n    },\n  );\n}\n```\n\n注意，通过 `setTrustedCertificates()` 设置的证书格式必须为 PEM 或 PKCS12，\n如果证书格式为 PKCS12，则需将证书密码传入，\n这样则会在代码中暴露证书密码，所以客户端证书校验不建议使用 PKCS12 格式的证书。\n\n## HTTP/2 支持\n\n[dio_http2_adapter](../plugins/http2_adapter) 提供了一个支持 HTTP/2 的桥接 。\n\n## 请求取消\n\n你可以通过 `CancelToken` 来取消发起的请求。\n一个 `CancelToken` 可以给多个请求共用，\n在共用时调用 `cancel()` 会取消对应的所有请求：\n\n```dart\nfinal cancelToken = CancelToken();\ndio.get(url, cancelToken: cancelToken).catchError((DioException error) {\n  if (CancelToken.isCancel(error)) {\n    print('Request canceled: ${error.message}');\n  } else {\n    // handle error.\n  }\n});\n// Cancel the requests with \"cancelled\" message.\ntoken.cancel('cancelled');\n```\n\n完整的示例请参考 [取消示例](../example_dart/lib/cancel_request.dart).\n\n## 继承 Dio class\n\n`Dio` 是一个拥有工厂构造函数的接口类，因此不能直接继承 `Dio`，\n但是可以继承 `DioForNative` 或 `DioForBrowser`： \n\n```dart\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\n// 在浏览器中，导入 'package:dio/browser.dart'。\n\nclass Http extends DioForNative {\n  Http([BaseOptions options]) : super(options) {\n    // 构造函数执行\n  }\n}\n```\n\n我们也可以直接实现 `Dio` 接口类 :\n\n```dart\nclass MyDio with DioMixin implements Dio {\n  // ...\n}\n```\n\n## Web 平台跨域资源共享 (CORS)\n\n在 Web 平台上发送网络请求时，如果请求不是一个 [简单请求][]，\n浏览器会自动向服务器发送 [CORS 预检][] (Pre-flight requests)，\n用于检查服务器是否支持跨域资源共享。\n\n你可以参考简单请求的定义修改你的请求，或者为你的服务加上 CORS 中间件进行跨域处理。\n\n[简单请求]: https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CORS#%E7%AE%80%E5%8D%95%E8%AF%B7%E6%B1%82\n[CORS 预检]: https://developer.mozilla.org/zh-CN/docs/Glossary/Preflight_request\n"
  },
  {
    "path": "dio/README.md",
    "content": "# dio\n\n[![Pub](https://img.shields.io/pub/v/dio.svg)](https://pub.dev/packages/dio)\n[![Dev](https://img.shields.io/pub/v/dio.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio)\n\nLanguage: English | [简体中文](README-ZH.md)\n\nA powerful HTTP networking package for Dart/Flutter,\nsupports Global configuration, Interceptors, FormData,\nRequest cancellation, File uploading/downloading,\nTimeout, Custom adapters, Transformers, etc. \n\n> Don't forget to add [#dio](https://pub.dev/packages?q=topic%3Adio)\n> topic to your published dio related packages!\n> See more: https://dart.dev/tools/pub/pubspec#topics\n\n<details>\n  <summary>Table of content</summary>\n\n<!-- TOC -->\n* [dio](#dio)\n  * [Get started](#get-started)\n    * [Install](#install)\n    * [Super simple to use](#super-simple-to-use)\n  * [Awesome dio](#awesome-dio)\n    * [Plugins](#plugins)\n  * [Examples](#examples)\n    * [Performing a `GET` request](#performing-a-get-request)\n    * [Performing a `POST` request](#performing-a-post-request)\n    * [Performing multiple concurrent requests](#performing-multiple-concurrent-requests)\n    * [Downloading a file](#downloading-a-file)\n    * [Get response stream](#get-response-stream)\n    * [Get response with bytes](#get-response-with-bytes)\n    * [Sending a `FormData`](#sending-a-formdata)\n    * [Uploading multiple files to server by FormData](#uploading-multiple-files-to-server-by-formdata)\n    * [Listening the uploading progress](#listening-the-uploading-progress)\n    * [Post binary data with Stream](#post-binary-data-with-stream)\n  * [Dio APIs](#dio-apis)\n    * [Creating an instance and set default configs](#creating-an-instance-and-set-default-configs)\n    * [Request Options](#request-options)\n    * [Response](#response)\n    * [Interceptors](#interceptors)\n      * [Resolve and reject the request](#resolve-and-reject-the-request)\n      * [QueuedInterceptor](#queuedinterceptor)\n        * [Example](#example)\n      * [LogInterceptor](#loginterceptor)\n      * [Dart](#dart)\n      * [Flutter](#flutter)\n      * [Custom Interceptor](#custom-interceptor)\n  * [Handling Errors](#handling-errors)\n    * [DioException](#dioexception)\n    * [DioExceptionType](#dioexceptiontype)\n  * [Using application/x-www-form-urlencoded format](#using-applicationx-www-form-urlencoded-format)\n  * [Sending FormData](#sending-formdata)\n    * [Multiple files upload](#multiple-files-upload)\n    * [Reuse `FormData`s and `MultipartFile`s](#reuse-formdatas-and-multipartfiles)\n  * [Transformer](#transformer)\n    * [Transformer example](#transformer-example)\n  * [HttpClientAdapter](#httpclientadapter)\n    * [Using proxy](#using-proxy)\n    * [HTTPS certificate verification](#https-certificate-verification)\n  * [HTTP/2 support](#http2-support)\n  * [Cancellation](#cancellation)\n  * [Extends Dio class](#extends-dio-class)\n  * [Cross-Origin Resource Sharing on Web (CORS)](#cross-origin-resource-sharing-on-web-cors)\n<!-- TOC -->\n</details>\n\n## Get started\n\n### Install\n\nAdd the `dio` package to your\n[pubspec dependencies](https://pub.dev/packages/dio/install).\n\n**Before you upgrade: Breaking changes might happen in major and minor versions of packages.<br/>\nSee the [Migration Guide][] for the complete breaking changes list.**\n\n[Migration Guide]: https://pub.dev/documentation/dio/latest/topics/Migration%20Guide-topic.html\n\n### Super simple to use\n\n```dart\nimport 'package:dio/dio.dart';\n\nfinal dio = Dio();\n\nvoid getHttp() async {\n  final response = await dio.get('https://dart.dev');\n  print(response);\n}\n```\n\n## Awesome dio\n\n🎉 A curated list of awesome things related to dio.\n\n### Plugins\n\n[Plugins](https://pub.dev/documentation/dio/latest/topics/Plugins-topic.html)\n\nWelcome to submit third-party plugins and related libraries\nin [here](https://github.com/cfug/dio/issues/347).\n\n## Examples\n\n### Performing a `GET` request\n\n```dart\nimport 'package:dio/dio.dart';\n\nfinal dio = Dio();\n\nvoid request() async {\n  Response response;\n  response = await dio.get('/test?id=12&name=dio');\n  print(response.data.toString());\n  // The below request is the same as above.\n  response = await dio.get(\n    '/test',\n    queryParameters: {'id': 12, 'name': 'dio'},\n  );\n  print(response.data.toString());\n}\n```\n\n### Performing a `POST` request\n\n```dart\nresponse = await dio.post('/test', data: {'id': 12, 'name': 'dio'});\n```\n\n### Performing multiple concurrent requests\n\n```dart\nList<Response> responses = await Future.wait([dio.post('/info'), dio.get('/token')]);\n```\n\n### Downloading a file\n\n```dart\nresponse = await dio.download(\n  'https://pub.dev/',\n  (await getTemporaryDirectory()).path + 'pub.html',\n);\n```\n\n### Get response stream\n\n```dart\nfinal rs = await dio.get(\n  url,\n  options: Options(responseType: ResponseType.stream), // Set the response type to `stream`.\n);\nprint(rs.data.stream); // Response stream.\n```\n\n### Get response with bytes\n\n```dart\nfinal rs = await Dio().get<List<int>>(\n  url,\n  options: Options(responseType: ResponseType.bytes), // Set the response type to `bytes`.\n);\nprint(rs.data); // Type: List<int>.\n```\n\n### Sending a `FormData`\n\n```dart\nfinal formData = FormData.fromMap({\n  'name': 'dio',\n  'date': DateTime.now().toIso8601String(),\n});\nfinal response = await dio.post('/info', data: formData);\n```\n\n### Uploading multiple files to server by FormData\n\n```dart\nfinal formData = FormData.fromMap({\n  'name': 'dio',\n  'date': DateTime.now().toIso8601String(),\n  'file': await MultipartFile.fromFile('./text.txt', filename: 'upload.txt'),\n  'files': [\n    await MultipartFile.fromFile('./text1.txt', filename: 'text1.txt'),\n    await MultipartFile.fromFile('./text2.txt', filename: 'text2.txt'),\n  ]\n});\nfinal response = await dio.post('/info', data: formData);\n```\n\n### Listening the uploading progress\n\n```dart\nfinal response = await dio.post(\n  'https://www.dtworkroom.com/doris/1/2.0.0/test',\n  data: {'aa': 'bb' * 22},\n  onSendProgress: (int sent, int total) {\n    print('$sent $total');\n  },\n);\n```\n\n### Post binary data with Stream\n\n```dart\n// Binary data\nfinal postData = <int>[0, 1, 2];\nawait dio.post(\n  url,\n  data: Stream.fromIterable(postData.map((e) => [e])), // Creates a Stream<List<int>>.\n  options: Options(\n    headers: {\n      Headers.contentLengthHeader: postData.length, // Set the content-length.\n    },\n  ),\n);\n```\n\nNote: `content-length` must be set if you want to subscribe to the sending progress.\n\nSee all examples code [here](example).\n\n## Dio APIs\n\n### Creating an instance and set default configs\n\n> It is recommended to use a singleton of `Dio` in projects, which can manage configurations like headers, base urls,\n> and timeouts consistently.\n> Here is an [example](../example_flutter_app) that use a singleton in Flutter.\n\nYou can create instance of Dio with an optional `BaseOptions` object:\n\n```dart\nfinal dio = Dio(); // With default `Options`.\n\nvoid configureDio() {\n  // Set default configs\n  dio.options.baseUrl = 'https://api.pub.dev';\n  dio.options.connectTimeout = Duration(seconds: 5);\n  dio.options.receiveTimeout = Duration(seconds: 3);\n\n  // Or create `Dio` with a `BaseOptions` instance.\n  final options = BaseOptions(\n    baseUrl: 'https://api.pub.dev',\n    connectTimeout: Duration(seconds: 5),\n    receiveTimeout: Duration(seconds: 3),\n  );\n  final anotherDio = Dio(options);\n\n  // Or clone the existing `Dio` instance with all fields.\n  final clonedDio = dio.clone();\n}\n```\n\nThe core API in Dio instance is:\n\n```dart\nFuture<Response<T>> request<T>(\n  String path, {\n  Object? data,\n  Map<String, dynamic>? queryParameters,\n  CancelToken? cancelToken,\n  Options? options,\n  ProgressCallback? onSendProgress,\n  ProgressCallback? onReceiveProgress,\n});\n```\n\n```dart\nfinal response = await dio.request(\n  '/test',\n  data: {'id': 12, 'name': 'dio'},\n  options: Options(method: 'GET'),\n);\n```\n\n### Request Options\n\nThere are two request options concepts in the Dio library:\n`BaseOptions` and `Options`.\nThe `BaseOptions` include a set of base settings for each `Dio()`,\nand the `Options` describes the configuration for a single request.\nThese options will be merged when making requests.\nThe `Options` declaration is as follows:\n\n```dart\n/// The HTTP request method.\nString method;\n\n/// Timeout when sending data.\n///\n/// Throws the [DioException] with\n/// [DioExceptionType.sendTimeout] type when timed out.\n///\n/// `null` or `Duration.zero` means no timeout limit.\nDuration? sendTimeout;\n\n/// Timeout when receiving data.\n///\n/// The timeout represents:\n///  - a timeout before the connection is established\n///    and the first received response bytes.\n///  - the duration during data transfer of each byte event,\n///    rather than the total duration of the receiving.\n///\n/// Throws the [DioException] with\n/// [DioExceptionType.receiveTimeout] type when timed out.\n///\n/// `null` or `Duration.zero` means no timeout limit.\nDuration? receiveTimeout;\n\n/// Custom field that you can retrieve it later in [Interceptor],\n/// [Transformer] and the [Response.requestOptions] object.\nMap<String, dynamic>? extra;\n\n/// HTTP request headers.\n///\n/// The keys of the header are case-insensitive,\n/// e.g.: `content-type` and `Content-Type` will be treated as the same key.\nMap<String, dynamic>? headers;\n\n/// Whether the case of header keys should be preserved.\n///\n/// Defaults to false.\n///\n/// This option WILL NOT take effect on these circumstances:\n/// - XHR ([HttpRequest]) does not support handling this explicitly.\n/// - The HTTP/2 standard only supports lowercase header keys.\nbool? preserveHeaderCase;\n\n/// The type of data that [Dio] handles with options.\n///\n/// The default value is [ResponseType.json].\n/// [Dio] will parse response string to JSON object automatically\n/// when the content-type of response is [Headers.jsonContentType].\n///\n/// See also:\n///  - `plain` if you want to receive the data as `String`.\n///  - `bytes` if you want to receive the data as the complete bytes.\n///  - `stream` if you want to receive the data as streamed binary bytes.\nResponseType? responseType;\n\n/// The request content-type.\n///\n/// The default `content-type` for requests will be implied by the\n/// [ImplyContentTypeInterceptor] according to the type of the request payload.\n/// The interceptor can be removed by\n/// [Interceptors.removeImplyContentTypeInterceptor].\nString? contentType;\n\n/// Defines whether the request is considered to be successful\n/// with the given status code.\n/// The request will be treated as succeed if the callback returns true.\nValidateStatus? validateStatus;\n\n/// Whether to retrieve the data if status code indicates a failed request.\n///\n/// Defaults to true.\nbool? receiveDataWhenStatusError;\n\n/// See [HttpClientRequest.followRedirects].\n///\n/// Defaults to true.\nbool? followRedirects;\n\n/// The maximum number of redirects when [followRedirects] is `true`.\n/// [RedirectException] will be thrown if redirects exceeded the limit.\n///\n/// Defaults to 5.\nint? maxRedirects;\n\n/// See [HttpClientRequest.persistentConnection].\n///\n/// Defaults to true.\nbool? persistentConnection;\n\n/// The default request encoder is [Utf8Encoder], you can set custom\n/// encoder by this option.\nRequestEncoder? requestEncoder;\n\n/// The default response decoder is [Utf8Decoder], you can set custom\n/// decoder by this option, it will be used in [Transformer].\nResponseDecoder? responseDecoder;\n\n/// Indicates the format of collection data in request query parameters and\n/// `x-www-url-encoded` body data.\n///\n/// Defaults to [ListFormat.multi].\nListFormat? listFormat;\n```\n\nThere is a complete example [here](../example_dart/lib/options.dart).\n\n### Response\n\nThe response for a request contains the following information.\n\n```dart\n/// Response body. may have been transformed, please refer to [ResponseType].\nT? data;\n\n/// The corresponding request info.\nRequestOptions requestOptions;\n\n/// HTTP status code.\nint? statusCode;\n\n/// Returns the reason phrase associated with the status code.\n/// The reason phrase must be set before the body is written\n/// to. Setting the reason phrase after writing to the body.\nString? statusMessage;\n\n/// Whether this response is a redirect.\n/// ** Attention **: Whether this field is available depends on whether the\n/// implementation of the adapter supports it or not.\nbool isRedirect;\n\n/// The series of redirects this connection has been through. The list will be\n/// empty if no redirects were followed. [redirects] will be updated both\n/// in the case of an automatic and a manual redirect.\n///\n/// ** Attention **: Whether this field is available depends on whether the\n/// implementation of the adapter supports it or not.\nList<RedirectRecord> redirects;\n\n/// Custom fields that only for the [Response].\nMap<String, dynamic> extra;\n\n/// Response headers.\nHeaders headers;\n```\n\nWhen request is succeed, you will receive the response as follows:\n\n```dart\nfinal response = await dio.get('https://pub.dev');\nprint(response.data);\nprint(response.headers);\nprint(response.requestOptions);\nprint(response.statusCode);\n```\n\nBe aware, the `Response.extra` is different from `RequestOptions.extra`,\nthey are not related to each other.\n\n### Interceptors\n\nFor each dio instance, we can add one or more interceptors,\nby which we can intercept requests, responses, and errors\nbefore they are handled by `then` or `catchError`.\n\n```dart\ndio.interceptors.add(\n  InterceptorsWrapper(\n    onRequest: (RequestOptions options, RequestInterceptorHandler handler) {\n      // Do something before request is sent.\n      // If you want to resolve the request with custom data,\n      // you can resolve a `Response` using `handler.resolve(response)`.\n      // If you want to reject the request with a error message,\n      // you can reject with a `DioException` using `handler.reject(dioError)`.\n      return handler.next(options);\n    },\n    onResponse: (Response response, ResponseInterceptorHandler handler) {\n      // Do something with response data.\n      // If you want to reject the request with a error message,\n      // you can reject a `DioException` object using `handler.reject(dioError)`.\n      return handler.next(response);\n    },\n    onError: (DioException error, ErrorInterceptorHandler handler) {\n      // Do something with response error.\n      // If you want to resolve the request with some custom data,\n      // you can resolve a `Response` object using `handler.resolve(response)`.\n      return handler.next(error);\n    },\n  ),\n);\n```\n\nSimple interceptor example:\n\n```dart\nimport 'package:dio/dio.dart';\nclass CustomInterceptors extends Interceptor {\n  @override\n  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {\n    print('REQUEST[${options.method}] => PATH: ${options.path}');\n    super.onRequest(options, handler);\n  }\n\n  @override\n  void onResponse(Response response, ResponseInterceptorHandler handler) {\n    print('RESPONSE[${response.statusCode}] => PATH: ${response.requestOptions.path}');\n    super.onResponse(response, handler);\n  }\n\n  @override\n  Future onError(DioException err, ErrorInterceptorHandler handler) async {\n    print('ERROR[${err.response?.statusCode}] => PATH: ${err.requestOptions.path}');\n    super.onError(err, handler);\n  }\n}\n```\n\n#### Resolve and reject the request\n\nIn all interceptors, you can interfere with their execution flow.\nIf you want to resolve the request/response with some custom data,\nyou can call `handler.resolve(Response)`.\nIf you want to reject the request/response with a error message,\nyou can call `handler.reject(dioError)` .\n\n```dart\ndio.interceptors.add(\n  InterceptorsWrapper(\n    onRequest: (options, handler) {\n      return handler.resolve(\n        Response(requestOptions: options, data: 'fake data'),\n      );\n    },\n  ),\n);\nfinal response = await dio.get('/test');\nprint(response.data); // 'fake data'\n```\n\n#### QueuedInterceptor\n\n`Interceptor` can be executed concurrently, that is,\nall the requests enter the interceptor at once, rather than executing sequentially.\nHowever, in some cases we expect that requests enter the interceptor sequentially like #590.\nTherefore, we need to provide a mechanism for sequential access (step by step)\nto interceptors and `QueuedInterceptor` can solve this problem.\n\n##### Example\n\nBecause of security reasons, we need all the requests to set up\na `csrfToken` in the header, if `csrfToken` does not exist,\nwe need to request a csrfToken first, and then perform the network request,\nbecause the request csrfToken progress is asynchronous,\nso we need to execute this async request in request interceptor.\n\nFor the complete code see [here](../example_dart/lib/queued_interceptor_crsftoken.dart).\n\n#### LogInterceptor\n\nYou can apply the `LogInterceptor` to log requests and responses automatically.\n\n**Note:** `LogInterceptor` should always be the last interceptor added,\notherwise modifications by following interceptors will not be logged.\n\n#### Dart\n\n```dart\ndio.interceptors.add(LogInterceptor(responseBody: false)); // Do not output responses body.\n```\n\n**Note:** When using the default `logPrint` function, logs will only be printed\nin DEBUG mode (when the assertion is enabled).\n\nAlternatively `dart:developer`'s log can also be used to log messages (available in Flutter too).\n\n#### Flutter\n\nWhen using Flutter, Flutters own `debugPrint` function should be used.\n\nThis ensures, that debug messages are also available via `flutter logs`.\n\n**Note:** `debugPrint` **does not mean print logs under the DEBUG mode**,\nit's a throttled function which helps to print full logs without truncation.\nDo not use it under any production environment unless you're intended to.\n\n```dart\ndio.interceptors.add(\n  LogInterceptor(\n    logPrint: (o) => debugPrint(o.toString()),\n  ),\n);\n```\n\n#### Custom Interceptor\n\nYou can customize interceptor by extending the `Interceptor/QueuedInterceptor` class.\nThere is an example that implementing a simple cache policy:\n[custom cache interceptor](../example_dart/lib/custom_cache_interceptor.dart).\n\n## Handling Errors\n\nWhen an error occurs, Dio will wrap the `Error/Exception` to a `DioException`:\n\n```dart\ntry {\n  // 404\n  await dio.get('https://api.pub.dev/not-exist');\n} on DioException catch (e) {\n  // The request was made and the server responded with a status code\n  // that falls out of the range of 2xx and is also not 304.\n  if (e.response != null) {\n    print(e.response.data)\n    print(e.response.headers)\n    print(e.response.requestOptions)\n  } else {\n    // Something happened in setting up or sending the request that triggered an Error\n    print(e.requestOptions)\n    print(e.message)\n  }\n}\n```\n\n### DioException\n\n```dart\n/// The request info for the request that throws exception.\nRequestOptions requestOptions;\n\n/// Response info, it may be `null` if the request can't reach to the\n/// HTTP server, for example, occurring a DNS error, network is not available.\nResponse? response;\n\n/// The type of the current [DioException].\nDioExceptionType type;\n\n/// The original error/exception object;\n/// It's usually not null when `type` is [DioExceptionType.unknown].\nObject? error;\n\n/// The stacktrace of the original error/exception object;\n/// It's usually not null when `type` is [DioExceptionType.unknown].\nStackTrace? stackTrace;\n\n/// The error message that throws a [DioException].\nString? message;\n```\n\n### DioExceptionType\n\nSee [the source code](lib/src/dio_exception.dart).\n\n## Using application/x-www-form-urlencoded format\n\nBy default, Dio serializes request data (except `String` type) to `JSON`.\nTo send data in the `application/x-www-form-urlencoded` format instead:\n\n```dart\n// Instance level\ndio.options.contentType = Headers.formUrlEncodedContentType;\n// or only works once\ndio.post(\n  '/info',\n  data: {'id': 5},\n  options: Options(contentType: Headers.formUrlEncodedContentType),\n);\n```\n\n## Sending FormData\n\nYou can also send `FormData` with Dio, which will send data in the `multipart/form-data`,\nand it supports uploading files.\n\n```dart\nfinal formData = FormData.fromMap({\n  'name': 'dio',\n  'date': DateTime.now().toIso8601String(),\n  'file': await MultipartFile.fromFile('./text.txt', filename: 'upload.txt'),\n});\nfinal response = await dio.post('/info', data: formData);\n```\n\nYou can also specify your desired boundary name which will be used\nto construct boundaries of every `FormData` with additional prefix and suffix.\n\n```dart\nfinal formDataWithBoundaryName = FormData(\n  boundaryName: 'my-boundary-name',\n);\n```\n\n> `FormData` is supported with the POST method typically.\n\nThere is a complete example [here](../example_dart/lib/formdata.dart).\n\n### Multiple files upload\n\nThere are two ways to add multiple files to `FormData`,\nthe only difference is that upload keys are different for array types。\n\n```dart\nfinal formData = FormData.fromMap({\n  'files': [\n    MultipartFile.fromFileSync('path/to/upload1.txt', filename: 'upload1.txt'),\n    MultipartFile.fromFileSync('path/to/upload2.txt', filename: 'upload2.txt'),\n  ],\n});\n```\n\nThe upload key eventually becomes `files[]`.\nThis is because many back-end services add a middle bracket to key\nwhen they get an array of files.\n**If you don't want a list literal**,\nyou should create FormData as follows (Don't use `FormData.fromMap`):\n\n```dart\nfinal formData = FormData();\nformData.files.addAll([\n  MapEntry(\n   'files',\n    MultipartFile.fromFileSync('./example/upload.txt',filename: 'upload.txt'),\n  ),\n  MapEntry(\n    'files',\n    MultipartFile.fromFileSync('./example/upload.txt',filename: 'upload.txt'),\n  ),\n]);\n```\n\n### Reuse `FormData`s and `MultipartFile`s\n\nYou should make a new `FormData` or `MultipartFile` every time in repeated requests.\nA typical wrong behavior is setting the `FormData` as a variable and using it in every request.\nIt can be easy for the *Cannot finalize* exceptions to occur.\nTo avoid that, write your requests like the below code:\n```dart\nFuture<void> _repeatedlyRequest() async {\n  Future<FormData> createFormData() async {\n    return FormData.fromMap({\n      'name': 'dio',\n      'date': DateTime.now().toIso8601String(),\n      'file': await MultipartFile.fromFile('./text.txt',filename: 'upload.txt'),\n    });\n  }\n  \n  await dio.post('some-url', data: await createFormData());\n}\n```\n\n## Transformer\n\n`Transformer` allows changes to the request/response data\nbefore it is sent/received to/from the server.\nDio has already implemented a `BackgroundTransformer` as default, \nwhich calls `jsonDecode` in an isolate if the response is larger than 50 KB.\nIf you want to customize the transformation of request/response data,\nyou can provide a `Transformer` by your self,\nand replace the `BackgroundTransformer` by setting the `dio.transformer`.\n\n> `Transformer.transformRequest` only takes effect when request with `PUT`/`POST`/`PATCH`,\n> they're methods that can contain the request body.\n> `Transformer.transformResponse` however, can be applied to all types of responses.\n\n### Transformer example\n\nThere is an example for [customizing Transformer](../example_dart/lib/transformer.dart).\n\n## HttpClientAdapter\n\n`HttpClientAdapter` is a bridge between `Dio` and `HttpClient`.\n\n`Dio` implements standard and friendly APIs for developer.\n`HttpClient` is the real object that makes Http requests.\n\nWe can use any `HttpClient` not just `dart:io:HttpClient` to make HTTP requests.\nAnd all we need is providing a `HttpClientAdapter`.\nThe default `HttpClientAdapter` for Dio is `IOHttpClientAdapter` on native platforms,\nand `BrowserHttpClientAdapter` on the Web platform.\nThey can be initiated by calling the `HttpClientAdapter()`.\n\n```dart\ndio.httpClientAdapter = HttpClientAdapter();\n```\n\nIf you want to use platform adapters explicitly:\n- For the Web platform:\n  ```dart\n  import 'package:dio/browser.dart';\n  // ...\n  dio.httpClientAdapter = BrowserHttpClientAdapter();\n  ```\n- For native platforms:\n  ```dart\n  import 'package:dio/io.dart';\n  // ...\n  dio.httpClientAdapter = IOHttpClientAdapter();\n  ```\n\n[Here](../example_dart/lib/adapter.dart) is a simple example to custom adapter. \n\n### Using proxy\n\n`IOHttpClientAdapter` provide a callback to set proxy to `dart:io:HttpClient`,\nfor example:\n\n```dart\nimport 'package:dio/io.dart';\n\nvoid initAdapter() {\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    createHttpClient: () {\n      final client = HttpClient();\n      // Config the client.\n      client.findProxy = (uri) {\n        // Forward all request to proxy \"localhost:8888\".\n        // Be aware, the proxy should went through you running device,\n        // not the host platform.\n        return 'PROXY localhost:8888';\n      };\n      // You can also create a new HttpClient for Dio instead of returning,\n      // but a client must being returned here.\n      return client;\n    },\n  );\n}\n```\n\nThere is a complete example [here](../example_dart/lib/proxy.dart).\n\nWeb does not support to set proxy.\n\n### HTTPS certificate verification\n\nHTTPS certificate verification (or public key pinning) refers to the process of ensuring that\nthe certificates protecting the TLS connection to the server are the ones you expect them to be.\nThe intention is to reduce the chance of a man-in-the-middle attack.\nThe theory is covered by [OWASP](https://owasp.org/www-community/controls/Certificate_and_Public_Key_Pinning).\n\n_Server Response Certificate_\n\nUnlike other methods, this one works with the certificate of the server itself.\n\n```dart\nvoid initAdapter() {\n  const String fingerprint = 'ee5ce1dfa7a53657c545c62b65802e4272878dabd65c0aadcf85783ebb0b4d5c';\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    createHttpClient: () {\n      // Don't trust any certificate just because their root cert is trusted.\n      final HttpClient client = HttpClient(context: SecurityContext(withTrustedRoots: false));\n      // You can test the intermediate / root cert here. We just ignore it.\n      client.badCertificateCallback = (cert, host, port) => true;\n      return client;\n    },\n    validateCertificate: (cert, host, port) {\n      // Check that the cert fingerprint matches the one we expect.\n      // We definitely require _some_ certificate.\n      if (cert == null) {\n        return false;\n      }\n      // Validate it any way you want. Here we only check that\n      // the fingerprint matches the OpenSSL SHA256.\n      return fingerprint == sha256.convert(cert.der).toString();\n    },\n  );\n}\n```\n\nYou can use openssl to read the SHA256 value of a certificate:\n\n```sh\nopenssl s_client -servername pinning-test.badssl.com -connect pinning-test.badssl.com:443 < /dev/null 2>/dev/null \\\n  | openssl x509 -noout -fingerprint -sha256\n\n# SHA256 Fingerprint=EE:5C:E1:DF:A7:A5:36:57:C5:45:C6:2B:65:80:2E:42:72:87:8D:AB:D6:5C:0A:AD:CF:85:78:3E:BB:0B:4D:5C\n# (remove the formatting, keep only lower case hex characters to match the `sha256` above)\n```\n\n_Certificate Authority Verification_\n\nThese methods work well when your server has a self-signed certificate,\nbut they don't work for certificates issued by a 3rd party like AWS or Let's Encrypt.\n\nThere are two ways to verify the root of the https certificate chain provided by the server.\nSuppose the certificate format is PEM, the code like:\n\n```dart\nvoid initAdapter() {\n  String PEM = 'XXXXX'; // root certificate content\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    createHttpClient: () {\n      final client = HttpClient();\n      client.badCertificateCallback = (X509Certificate cert, String host, int port) {\n        return cert.pem == PEM; // Verify the certificate.\n      };\n      return client;\n    },\n  );\n}\n```\n\nAnother way is creating a `SecurityContext` when create the `HttpClient`:\n\n```dart\nvoid initAdapter() {\n  String PEM = 'XXXXX'; // root certificate content\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    onHttpClientCreate: (_) {\n      final SecurityContext sc = SecurityContext();\n      sc.setTrustedCertificates(File(pathToTheCertificate));\n      final HttpClient client = HttpClient(context: sc);\n      return client;\n    },\n  );\n}\n```\n\nIn this way, the format of `setTrustedCertificates()` must be PEM or PKCS12.\nPKCS12 requires password to use, which will expose the password in the code,\nso it's not recommended to use in common cases.\n\n## HTTP/2 support\n\n[dio_http2_adapter](../plugins/http2_adapter) is a Dio `HttpClientAdapter`\nwhich supports HTTP/2.\n\n## Cancellation\n\nYou can cancel a request using a `CancelToken`.\nOne token can be shared with multiple requests.\nWhen a token's `cancel()` is invoked, all requests with this token will be cancelled.\n\n```dart\nfinal cancelToken = CancelToken();\ndio.get(url, cancelToken: cancelToken).catchError((DioException error) {\n  if (CancelToken.isCancel(error)) {\n    print('Request canceled: ${error.message}');\n  } else {\n    // handle error.\n  }\n});\n// Cancel the requests with \"cancelled\" message.\ntoken.cancel('cancelled');\n```\n\nThere is a complete example [here](../example_dart/lib/cancel_request.dart).\n\n## Extends Dio class\n\n`Dio` is an abstract class with factory constructor,\nso we don't extend `Dio` class direct.\nWe can extend `DioForNative` or `DioForBrowser` instead, for example:\n\n```dart\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\n// If in browser, import 'package:dio/browser.dart'.\n\nclass Http extends DioForNative {\n  Http([BaseOptions options]) : super(options) {\n    // do something\n  }\n}\n```\n\nWe can also implement a custom `Dio` client:\n\n```dart\nclass MyDio with DioMixin implements Dio {\n  // ...\n}\n```\n\n## Cross-Origin Resource Sharing on Web (CORS)\n\nIf a request is not a [simple request][],\nthe Web browser will send a [CORS preflight request][]\nthat checks to see if the CORS protocol is understood\nand a server is aware using specific methods and headers.\n\nYou can modify your requests to match the definition of simple request,\nor add a CORS middleware for your service to handle CORS requests.\n\n[simple request]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests\n[CORS preflight request]: https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request\n"
  },
  {
    "path": "dio/analysis_options.yaml",
    "content": "include: ../analysis_options.yaml\n"
  },
  {
    "path": "dio/dart_test.yaml",
    "content": "file_reporters:\n  json: build/reports/test-results.json\n\npresets:\n  # empty placeholders required in CI scripts\n  all:\n  default:\n  min:\n  stable:\n  beta:\n\ntags:\n  tls:\n    skip: \"Skipping TLS test with specific setup requirements by default. Use '-P all' to run all tests.\"\n    presets:\n      all:\n        skip: false\n      default:\n        skip: true\n  gc: # We have that tag, but we are not skipping in any preset.\n\noverride_platforms:\n  chrome:\n    settings:\n      headless: true\n  firefox:\n    settings:\n      # headless argument has to be set explicitly for non-chrome browsers\n      arguments: --headless\n      executable:\n        # https://github.com/dart-lang/test/pull/2195\n        mac_os: '/Applications/Firefox.app/Contents/MacOS/firefox'\n"
  },
  {
    "path": "dio/dartdoc_options.yaml",
    "content": "dartdoc:\n  showUndocumentedCategories: true\n  categories:\n    \"Migration Guide\":\n      markdown: doc/migration_guide.md\n    \"Plugins\":\n      markdown: doc/plugins.md\n"
  },
  {
    "path": "dio/dio.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/test\" isTestSource=\"true\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n  </component>\n</module>"
  },
  {
    "path": "dio/doc/migration_guide.md",
    "content": "# Migration Guide\n\nThis document gathered all breaking changes and migrations requirement between versions.\n\n<!--\nWhen new content need to be added to the migration guide, make sure they're following the format:\n1. Add a version in the *Breaking versions* section, with a version anchor.\n2. Use *Summary* and *Details* to introduce the migration.\n-->\n\n## Breaking versions\n\n- [5.0.0](#500)\n- [4.0.0](#400)\n\n## 5.0.0\n\n### Summary\n\n- `get` and `getUri` in `Dio` has different signature.\n- `DefaultHttpClientAdapter` is now named `IOHttpClientAdapter`,\n  and the platform independent adapter can be initiated by `HttpClientAdapter()` which is a factory method.\n- Adapters that extends `HttpClientAdapter` must now `implements` instead of `extends`.\n- `DioError` has separate constructors and all fields are annotated as final.\n- `DioErrorType` has different values.\n- Imports are split into new libraries:\n  - `dio/io.dart` is for natives specific classes;\n  - `dio/browser.dart` is for web specific classes.\n- `connectTimeout`, `sendTimeout`, and `receiveTimeout` are now `Duration` instead of `int`.\n\n### Details\n\n#### `get` and `getUri`\n\n```diff\n Future<Response<T>> get<T>(\n   String path, {\n+  Object? data,\n   Map<String, dynamic>? queryParameters,\n   Options? options,\n   CancelToken? cancelToken,\n   ProgressCallback? onReceiveProgress,\n });\n```\n\n```diff\n Future<Response<T>> getUri<T>(\n   Uri uri, {\n+  Object? data,\n   Map<String, dynamic>? queryParameters,\n   Options? options,\n   CancelToken? cancelToken,\n   ProgressCallback? onReceiveProgress,\n });\n```\n\n#### `HttpClientAdapter`\n\nBefore:\n\n```dart\nvoid initAdapter() {\n  final dio = Dio();\n  // For natives.\n  dio.httpClientAdapter = DefaultHttpClientAdapter();\n  // For web.\n  dio.httpClientAdapter = BrowserHttpClientAdapter();\n}\n```\n\nAfter:\n\n```dart\nvoid initAdapter() {\n  final dio = Dio();\n  // Universal adapter that create the adapter for the corresponding platform.\n  dio.httpClientAdapter = HttpClientAdapter();\n  // For natives.\n  dio.httpClientAdapter = IOHttpClientAdapter();\n  // For web.\n  dio.httpClientAdapter = BrowserHttpClientAdapter();\n}\n```\n\n#### Implementing `HttpClientAdapter`\n\nBefore:\n```dart\nclass ExampleAdapter extends HttpClientAdapter { /* ... */ }\n```\n\nAfter:\n```dart\nclass ExampleAdapter implements HttpClientAdapter { /* ... */ }\n```\n\n#### Const `DioError`\n\nBefore:\n\n```dart\nNever throwDioError() {\n  final error = DioError(request: requestOptions, error: e);\n  error.message = 'Custom message.';\n  error.stackTrace = StackTrace.current;\n  throw error;\n}\n```\n\nAfter:\n\n```dart\nNever throwDioError() {\n  DioError error = DioError(\n    request: requestOptions,\n    error: e,\n    stackTrace: StackTrace.current\n  );\n  error = error.copyWith(message: 'Custom message.');\n  throw error;\n}\n```\n\n#### `DioErrorType` values update\n\n| Before         | After             |\n|:---------------|:------------------|\n| N/A            | badCertificate    |\n| response       | badResponse       |\n| connectTimeout | connectionTimeout |\n| other          | unknown           |\n\n#### `Duration` instead of `int` for timeouts\n\nBefore:\n\n```dart\nvoid request() {\n  final dio = Dio(\n    BaseOptions(\n      connectTimeout: 5000,\n      sendTimeout: 5000,\n      receiveTimeout: 10000,\n    ),\n  );\n}\n```\n\nAfter:\n\n```dart\nvoid request() {\n  final dio = Dio(\n    BaseOptions(\n      connectTimeout: const Duration(seconds: 5),\n      sendTimeout: const Duration(seconds: 5),\n      receiveTimeout: const Duration(seconds: 10),\n    ),\n  );\n}\n```\n\n## 4.0.0\n\n### Details\n\n1. **Null safety support** (Dart >= 2.12).\n2. **The `Interceptor` APIs signature has changed**.\n3. Rename `options.merge` to `options.copyWith`.\n4. Rename `DioErrorType` enums from uppercase to camel style.\n5. Delete `dio.resolve` and `dio.reject` APIs (use `handler` instead in  interceptors).\n6. Class `BaseOptions`  no longer inherits from `Options` class.\n7. Change `requestStream` type of `HttpClientAdapter.fetch` from `Stream<List<int>>` to `Stream<Uint8List>`.\n8. Download API: Add real uri and redirect information to headers.\n"
  },
  {
    "path": "dio/doc/plugins.md",
    "content": "<!-- Use https://pub.dev for the hosted URL. -->\n\n| Repository                                                                                             | Version                                                                                                                       | Description                                                                                                            |\n|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|\n| [dio_cookie_manager](https://github.com/cfug/dio/blob/main/plugins/cookie_manager)                     | [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg?label=)](https://pub.dev/packages/dio_cookie_manager)             | A cookie manager for Dio                                                                                               |\n| [dio_http2_adapter](https://github.com/cfug/dio/blob/main/plugins/http2_adapter)                       | [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg?label=)](https://pub.dev/packages/dio_http2_adapter)               | A Dio HttpClientAdapter which support Http/2.0                                                                         |\n| [native_dio_adapter](https://github.com/cfug/dio/blob/main/plugins/native_dio_adapter)                 | [![Pub](https://img.shields.io/pub/v/native_dio_adapter.svg?label=)](https://pub.dev/packages/native_dio_adapter)             | An adapter for Dio which makes use of cupertino_http and cronet_http to delegate HTTP requests to the native platform. |\n| [dio_smart_retry](https://github.com/rodion-m/dio_smart_retry)                                         | [![Pub](https://img.shields.io/pub/v/dio_smart_retry.svg?label=)](https://pub.dev/packages/dio_smart_retry)                   | Flexible retry library for Dio                                                                                         |\n| [http_certificate_pinning](https://github.com/diefferson/http_certificate_pinning)                     | [![Pub](https://img.shields.io/pub/v/http_certificate_pinning.svg?label=)](https://pub.dev/packages/http_certificate_pinning) | Https Certificate pinning for Flutter                                                                                  |\n| [dio_intercept_to_curl](https://github.com/blackflamedigital/dio_intercept_to_curl)                    | [![Pub](https://img.shields.io/pub/v/dio_intercept_to_curl.svg?label=)](https://pub.dev/packages/dio_intercept_to_curl)       | A Flutter curl-command generator for Dio.                                                                              |\n| [dio_cache_interceptor](https://github.com/llfbandit/dio_cache_interceptor)                            | [![Pub](https://img.shields.io/pub/v/dio_cache_interceptor.svg?label=)](https://pub.dev/packages/dio_cache_interceptor)       | Dio HTTP cache interceptor with multiple stores respecting HTTP directives (or not)                                    |\n| [dio_http_cache](https://github.com/hurshi/dio-http-cache)                                             | [![Pub](https://img.shields.io/pub/v/dio_http_cache.svg?label=)](https://pub.dev/packages/dio_http_cache)                     | A simple cache library for Dio like Rxcache in Android                                                                 |\n| [pretty_dio_logger](https://github.com/Milad-Akarie/pretty_dio_logger)                                 | [![Pub](https://img.shields.io/pub/v/pretty_dio_logger.svg?label=)](https://pub.dev/packages/pretty_dio_logger)               | Pretty Dio logger is a Dio interceptor that logs network calls in a pretty, easy to read format.                       |\n| [dio_image_provider](https://github.com/ueman/image_provider)                                          | [![Pub](https://img.shields.io/pub/v/dio_image_provider.svg?label=)](https://pub.dev/packages/dio_image_provider)             | An image provider which makes use of package:dio to instead of dart:io                                                 |\n| [flutter_ume_kit_dio](https://github.com/cfug/flutter_ume_kits/tree/main/packages/flutter_ume_kit_dio) | [![Pub](https://img.shields.io/pub/v/flutter_ume_kit_dio.svg?label=)](https://pub.dev/packages/flutter_ume_kit_dio)           | A debug kit of dio on flutter_ume                                                                                      |\n| [sentry_dio](https://github.com/getsentry/sentry-dart)                                                 | [![Pub](https://img.shields.io/pub/v/sentry_dio.svg?label=)](https://pub.dev/packages/sentry_dio)                             | An integration which adds support for performance tracing for the Dio package.                                         |\n| [talker_dio_logger](https://github.com/Frezyx/talker/tree/master/packages/talker_dio_logger)           | [![Pub](https://img.shields.io/pub/v/talker_dio_logger.svg?label=)](https://pub.dev/packages/talker_dio_logger)               | Colorful and customizable dio logger with a lightweight design and talker additional functionality                     |\n"
  },
  {
    "path": "dio/example/dio.dart",
    "content": "import 'package:dio/dio.dart';\n\n/// More examples see https://github.com/cfug/dio/tree/main/dio#examples\nvoid main() async {\n  final dio = Dio();\n  final response = await dio.get('https://pub.dev');\n  print(response.data);\n}\n"
  },
  {
    "path": "dio/lib/browser.dart",
    "content": "export 'src/adapters/browser_adapter.dart' show BrowserHttpClientAdapter;\nexport 'src/dio/dio_for_browser.dart' show DioForBrowser;\n"
  },
  {
    "path": "dio/lib/dio.dart",
    "content": "/// A powerful HTTP client for Dart and Flutter, which supports global settings,\n/// [Interceptors], [FormData], aborting and canceling a request,\n/// files uploading and downloading, requests timeout, custom adapters, etc.\n/// {@category Migration Guide}\n/// {@category Plugins}\nlibrary dio;\n\nexport 'src/adapter.dart';\nexport 'src/cancel_token.dart';\nexport 'src/dio.dart';\nexport 'src/dio_exception.dart';\nexport 'src/dio_mixin.dart' hide InterceptorState, InterceptorResultType;\nexport 'src/form_data.dart';\nexport 'src/headers.dart';\nexport 'src/interceptors/log.dart';\nexport 'src/multipart_file.dart';\nexport 'src/options.dart';\nexport 'src/parameter.dart';\nexport 'src/redirect_record.dart';\nexport 'src/response.dart';\nexport 'src/transformer.dart';\n"
  },
  {
    "path": "dio/lib/fix_data/fix.yaml",
    "content": "version: 1\n\ntransforms:\n  # Changes made in https://github.com/cfug/diox/pull/14\n  - title: \"Migrate to 'IOHttpClientAdapter'\"\n    date: 2022-11-07\n    element:\n      uris: ['dio.dart', 'src/adapter.dart', 'src/adapters/io_adapter.dart']\n      class: 'DefaultHttpClientAdapter'\n    changes:\n      - kind: 'rename'\n        newName: 'IOHttpClientAdapter'\n\n  # Changes made in https://github.com/cfug/diox/pull/62\n  - title: \"Migrate to 'BackgroundTransformer'\"\n    date: 2023-01-31\n    element:\n      uris: ['dio.dart', 'src/transformer.dart']\n      class: 'DefaultTransformer'\n    changes:\n      - kind: 'rename'\n        newName: 'BackgroundTransformer'\n\n  # Changes made in https://github.com/cfug/dio/pull/1812\n  - title: \"Migrate to 'CreateHttpClient'\"\n    date: 2023-05-14\n    element:\n      uris: ['dio.dart', 'src/adapters/io_adapter.dart']\n      typedef: 'OnHttpClientCreate'\n    changes:\n      - kind: 'rename'\n        newName: 'CreateHttpClient'\n      - kind: 'removeParameter'\n        index: 0\n  - title: \"Migrate to 'createHttpClient'\"\n    date: 2023-05-14\n    element:\n      uris: ['dio.dart', 'src/adapters/io_adapter.dart']\n      constructor: ''\n      inClass: 'IOHttpClientAdapter'\n    changes:\n      - kind: 'renameParameter'\n        oldName: 'onHttpClientCreate'\n        newName: 'createHttpClient'\n\n  # Changes made in https://github.com/cfug/dio/pull/1803\n  - title: \"Migrate to 'DioException'\"\n    date: 2023-05-15\n    element:\n      uris: ['dio.dart', 'src/dio_exception.dart', 'src/dio_error.dart']\n      class: 'DioError'\n    changes:\n      - kind: 'rename'\n        newName: 'DioException'\n\n  # Changes made in https://github.com/cfug/dio/pull/1803\n  - title: \"Migrate to 'DioExceptionType'\"\n    date: 2023-05-15\n    element:\n      uris: ['dio.dart', 'src/dio_exception.dart', 'src/dio_error.dart']\n      class: 'DioErrorType'\n    changes:\n      - kind: 'rename'\n        newName: 'DioExceptionType'\n\n  # Changes made in https://github.com/cfug/dio/pull/1903\n  - title: \"Migrate to 'MultipartFile.fromStream'\"\n    date: 2023-06-25\n    element:\n      uris: ['dio.dart', 'src/multipart_file.dart']\n      constructor: ''\n      inClass: 'MultipartFile'\n    changes:\n      - kind: 'rename'\n        newName: 'fromStream'\n"
  },
  {
    "path": "dio/lib/io.dart",
    "content": "export 'src/adapters/io_adapter.dart' hide createAdapter;\nexport 'src/dio/dio_for_native.dart' show DioForNative;\n"
  },
  {
    "path": "dio/lib/src/adapter.dart",
    "content": "import 'dart:convert';\nimport 'dart:typed_data';\n\nimport 'package:meta/meta.dart';\n\nimport 'adapters/io_adapter.dart'\n    if (dart.library.js_interop) 'adapters/browser_adapter.dart'\n    if (dart.library.html) 'adapters/browser_adapter.dart' as adapter;\nimport 'headers.dart';\nimport 'options.dart';\nimport 'redirect_record.dart';\n\n/// {@template dio.HttpClientAdapter}\n/// [HttpAdapter] is a bridge between [Dio] and [HttpClient].\n///\n/// [Dio] implements standard and friendly API for developer.\n/// [HttpClient] is the real object that makes Http\n/// requests.\n///\n/// We can use any [HttpClient]s not just \"dart:io:HttpClient\" to\n/// make the HTTP request. All we need is to provide a [HttpClientAdapter].\n///\n/// If you want to customize the [HttpClientAdapter] you should instead use\n/// either [IOHttpClientAdapter] on `dart:io` platforms\n/// or [BrowserHttpClientAdapter] on `dart:html` platforms.\n/// {@endtemplate}\nabstract class HttpClientAdapter {\n  /// Create a [HttpClientAdapter] based on the current platform (IO/Web).\n  factory HttpClientAdapter() => adapter.createAdapter();\n\n  /// The key used to store the HTTP protocol version in [ResponseBody.extra].\n  ///\n  /// This value is typically \"1.0\", \"1.1\", or \"2.0\" depending on the\n  /// protocol negotiated with the server.\n  ///\n  /// The value may be unavailable when using some adapters (for example\n  /// `web_adapter` and `native_dio_adapter`), depending on whether the\n  /// underlying transport exposes protocol metadata.\n  static const extraKeyHttpVersion = 'httpVersion';\n\n  /// Implement this method to make real HTTP requests.\n  ///\n  /// [options] are the request options.\n  ///\n  /// [requestStream] is the request stream. It will not be null only when\n  /// the request body is not empty.\n  /// Use [requestStream] if your code rely on [RequestOptions.onSendProgress].\n  ///\n  /// [cancelFuture] corresponds to [CancelToken] handling.\n  /// When the request is canceled, [cancelFuture] will be resolved.\n  /// To await if a request has been canceled:\n  /// ```dart\n  /// cancelFuture?.then((_) => print('request cancelled!'));\n  /// ```\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  );\n\n  /// Close the current adapter and its inner clients or requests.\n  void close({bool force = false});\n}\n\n/// The response wrapper class for adapters.\n///\n/// This class should not be used in regular usages.\nclass ResponseBody {\n  ResponseBody(\n    this.stream,\n    this.statusCode, {\n    this.statusMessage,\n    this.isRedirect = false,\n    this.redirects,\n    void Function()? onClose,\n    Map<String, List<String>>? headers,\n  })  : headers = headers ?? {},\n        _onClose = onClose;\n\n  ResponseBody.fromString(\n    String text,\n    this.statusCode, {\n    this.statusMessage,\n    this.isRedirect = false,\n    void Function()? onClose,\n    Map<String, List<String>>? headers,\n  })  : stream = Stream.value(Uint8List.fromList(utf8.encode(text))),\n        headers = headers ?? {},\n        _onClose = onClose;\n\n  ResponseBody.fromBytes(\n    List<int> bytes,\n    this.statusCode, {\n    this.statusMessage,\n    this.isRedirect = false,\n    void Function()? onClose,\n    Map<String, List<String>>? headers,\n  })  : stream = Stream.value(\n          bytes is Uint8List ? bytes : Uint8List.fromList(bytes),\n        ),\n        headers = headers ?? {},\n        _onClose = onClose;\n\n  /// Whether this response is a redirect.\n  final bool isRedirect;\n\n  /// The response stream.\n  Stream<Uint8List> stream;\n\n  /// HTTP status code.\n  int statusCode;\n\n  /// Content length of the response or -1 if not specified\n  int get contentLength =>\n      int.parse(headers[Headers.contentLengthHeader]?.first ?? '-1');\n\n  /// Returns the reason phrase corresponds to the status code.\n  /// The message can be [HttpRequest.statusText]\n  /// or [HttpClientResponse.reasonPhrase].\n  String? statusMessage;\n\n  /// Stores redirections during the request.\n  List<RedirectRecord>? redirects;\n\n  /// The response headers.\n  Map<String, List<String>> headers;\n\n  /// The extra field which will pass-through to the [Response.extra].\n  Map<String, dynamic> extra = {};\n\n  final void Function()? _onClose;\n\n  /// Closes the request & frees the underlying resources.\n  @internal\n  void close() => _onClose?.call();\n}\n"
  },
  {
    "path": "dio/lib/src/adapters/browser_adapter.dart",
    "content": "export 'package:dio_web_adapter/dio_web_adapter.dart'\n    show createAdapter, BrowserHttpClientAdapter;\n"
  },
  {
    "path": "dio/lib/src/adapters/io_adapter.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport '../adapter.dart';\nimport '../dio_exception.dart';\nimport '../options.dart';\nimport '../redirect_record.dart';\n\n@Deprecated('Use IOHttpClientAdapter instead. This will be removed in 6.0.0')\ntypedef DefaultHttpClientAdapter = IOHttpClientAdapter;\n\n/// The signature of [IOHttpClientAdapter.onHttpClientCreate].\n@Deprecated('Use CreateHttpClient instead. This will be removed in 6.0.0')\ntypedef OnHttpClientCreate = HttpClient? Function(HttpClient client);\n\n/// The signature of [IOHttpClientAdapter.createHttpClient].\n/// Can be used to provide a custom [HttpClient] for Dio.\ntypedef CreateHttpClient = HttpClient Function();\n\n/// The signature of [IOHttpClientAdapter.validateCertificate].\ntypedef ValidateCertificate = bool Function(\n  X509Certificate? certificate,\n  String host,\n  int port,\n);\n\n/// Creates an [IOHttpClientAdapter].\nHttpClientAdapter createAdapter() => IOHttpClientAdapter();\n\n/// The default [HttpClientAdapter] for native platforms.\nclass IOHttpClientAdapter implements HttpClientAdapter {\n  IOHttpClientAdapter({\n    @Deprecated('Use createHttpClient instead. This will be removed in 6.0.0')\n    this.onHttpClientCreate,\n    this.createHttpClient,\n    this.validateCertificate,\n  });\n\n  /// [Dio] will create [HttpClient] when it is needed. If [onHttpClientCreate]\n  /// has provided, [Dio] will call it when a [HttpClient] created.\n  @Deprecated('Use createHttpClient instead. This will be removed in 6.0.0')\n  OnHttpClientCreate? onHttpClientCreate;\n\n  /// When this callback is set, [Dio] will call it every\n  /// time it needs a [HttpClient].\n  CreateHttpClient? createHttpClient;\n\n  /// Allows the user to decide if the response certificate is good.\n  /// If this function is missing, then the certificate is allowed.\n  /// This method is called only if both the [SecurityContext] and\n  /// [badCertificateCallback] accept the certificate chain. Those\n  /// methods evaluate the root or intermediate certificate, while\n  /// [validateCertificate] evaluates the leaf certificate.\n  ValidateCertificate? validateCertificate;\n\n  HttpClient? _cachedHttpClient;\n  bool _closed = false;\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) async {\n    if (_closed) {\n      throw StateError(\n        \"Can't establish connection after the adapter was closed.\",\n      );\n    }\n    return _fetch(options, requestStream, cancelFuture);\n  }\n\n  Future<ResponseBody> _fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) async {\n    final httpClient = _configHttpClient(options.connectTimeout);\n    final reqFuture = httpClient.openUrl(options.method, options.uri);\n    late HttpClientRequest request;\n    try {\n      final connectionTimeout = options.connectTimeout;\n      if (connectionTimeout != null && connectionTimeout > Duration.zero) {\n        request = await reqFuture.timeout(\n          connectionTimeout,\n          onTimeout: () {\n            throw DioException.connectionTimeout(\n              requestOptions: options,\n              timeout: connectionTimeout,\n            );\n          },\n        );\n      } else {\n        request = await reqFuture;\n      }\n\n      final requestWR = WeakReference<HttpClientRequest>(request);\n      cancelFuture?.whenComplete(() {\n        requestWR.target?.abort();\n      });\n\n      // Set Headers\n      options.headers.forEach((key, value) {\n        if (value != null) {\n          request.headers.set(\n            key,\n            value,\n            preserveHeaderCase: options.preserveHeaderCase,\n          );\n        }\n      });\n    } on SocketException catch (e) {\n      if (e.message.contains('timed out')) {\n        final Duration effectiveTimeout;\n        if (options.connectTimeout != null &&\n            options.connectTimeout! > Duration.zero) {\n          effectiveTimeout = options.connectTimeout!;\n        } else if (httpClient.connectionTimeout != null &&\n            httpClient.connectionTimeout! > Duration.zero) {\n          effectiveTimeout = httpClient.connectionTimeout!;\n        } else {\n          effectiveTimeout = Duration.zero;\n        }\n        throw DioException.connectionTimeout(\n          requestOptions: options,\n          timeout: effectiveTimeout,\n          error: e,\n        );\n      }\n      throw DioException.connectionError(\n        requestOptions: options,\n        reason: e.message,\n        error: e,\n      );\n    }\n\n    request.followRedirects = options.followRedirects;\n    request.maxRedirects = options.maxRedirects;\n    request.persistentConnection = options.persistentConnection;\n\n    if (requestStream != null) {\n      // Transform the request data.\n      Future<dynamic> future = request.addStream(requestStream);\n      final sendTimeout = options.sendTimeout;\n      if (sendTimeout != null && sendTimeout > Duration.zero) {\n        future = future.timeout(\n          sendTimeout,\n          onTimeout: () {\n            request.abort();\n            throw DioException.sendTimeout(\n              timeout: sendTimeout,\n              requestOptions: options,\n            );\n          },\n        );\n      }\n      await future;\n    }\n\n    Future<HttpClientResponse> future = request.close();\n    final receiveTimeout = options.receiveTimeout ?? Duration.zero;\n    if (receiveTimeout > Duration.zero) {\n      future = future.timeout(\n        receiveTimeout,\n        onTimeout: () {\n          request.abort();\n          throw DioException.receiveTimeout(\n            timeout: receiveTimeout,\n            requestOptions: options,\n          );\n        },\n      );\n    }\n    final responseStream = await future;\n\n    if (validateCertificate != null) {\n      final host = options.uri.host;\n      final port = options.uri.port;\n      final bool isCertApproved = validateCertificate!(\n        responseStream.certificate,\n        host,\n        port,\n      );\n      if (!isCertApproved) {\n        throw DioException.badCertificate(\n          requestOptions: options,\n          error: responseStream.certificate,\n        );\n      }\n    }\n\n    final headers = <String, List<String>>{};\n    responseStream.headers.forEach((key, values) {\n      headers[key] = values;\n    });\n\n    // Extract HTTP protocol version from the response headers.\n    // The protocolVersion is available in the internal `_HttpHeaders`\n    // implementation but not exposed in the public `HttpHeaders` interface,\n    // so we use dynamic access. This may fail in certain environments\n    // (e.g., tests with mocks), so we catch and omit errors.\n    String? httpVersion;\n    try {\n      httpVersion = (responseStream.headers as dynamic).protocolVersion;\n    } catch (_) {}\n\n    final responseBody = ResponseBody(\n      responseStream.cast(),\n      responseStream.statusCode,\n      headers: headers,\n      isRedirect:\n          responseStream.isRedirect || responseStream.redirects.isNotEmpty,\n      redirects: responseStream.redirects\n          .map((e) => RedirectRecord(e.statusCode, e.method, e.location))\n          .toList(),\n      statusMessage: responseStream.reasonPhrase,\n    );\n    if (httpVersion != null) {\n      responseBody.extra[HttpClientAdapter.extraKeyHttpVersion] ??= httpVersion;\n    }\n    return responseBody;\n  }\n\n  HttpClient _configHttpClient(Duration? connectionTimeout) {\n    final client = _cachedHttpClient ??= _createHttpClient();\n    connectionTimeout ??= Duration.zero;\n    if (connectionTimeout > Duration.zero) {\n      client.connectionTimeout = connectionTimeout;\n    } else {\n      client.connectionTimeout = null;\n    }\n    return client;\n  }\n\n  @override\n  void close({bool force = false}) {\n    _closed = true;\n    _cachedHttpClient?.close(force: force);\n  }\n\n  HttpClient _createHttpClient() {\n    if (createHttpClient != null) {\n      return createHttpClient!();\n    }\n    final client = HttpClient()..idleTimeout = const Duration(seconds: 3);\n    // ignore: deprecated_member_use, deprecated_member_use_from_same_package\n    return onHttpClientCreate?.call(client) ?? client;\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/cancel_token.dart",
    "content": "import 'dart:async';\n\nimport 'dio_exception.dart';\nimport 'options.dart';\nimport 'utils.dart' show warningLog;\n\n/// {@template dio.CancelToken}\n/// Controls cancellation of [Dio]'s requests.\n///\n/// The same token can be shared between different requests.\n/// When [cancel] is invoked, requests bound to this token will be cancelled.\n/// {@endtemplate}\nclass CancelToken {\n  CancelToken();\n\n  final Completer<DioException> _completer = Completer<DioException>();\n\n  /// Whether the [error] is thrown by [cancel].\n  static bool isCancel(DioException error) =>\n      error.type == DioExceptionType.cancel;\n\n  /// If request have been canceled, save the cancel error.\n  DioException? get cancelError => _cancelError;\n  DioException? _cancelError;\n\n  /// Corresponding request options for the request.\n  ///\n  /// This field can be null if the request was never submitted.\n  RequestOptions? requestOptions;\n\n  /// Whether the token is cancelled.\n  bool get isCancelled => _cancelError != null;\n\n  /// When cancelled, this future will be resolved.\n  Future<DioException> get whenCancel => _completer.future;\n\n  /// Cancel the request with the given [reason].\n  void cancel([Object? reason]) {\n    if (_completer.isCompleted) {\n      if (reason != _cancelError?.error) {\n        final buffer = StringBuffer();\n        buffer.writeln(\n          'The CancelToken was cancelled multiple times with different reason:',\n        );\n        buffer.writeln('=> [Error      ]:');\n        buffer.writeln('   |--- Previous:${_cancelError?.error}');\n        buffer.writeln('   |--- Current :$reason');\n        buffer.writeln('=> [Stack Trace]:');\n        buffer.writeln('   |--- Previous:${_cancelError?.stackTrace}');\n        buffer.writeln('   |--- Current :${StackTrace.current}');\n        warningLog(buffer.toString(), StackTrace.current);\n      }\n      return;\n    }\n    _cancelError = DioException.requestCancelled(\n      requestOptions: requestOptions ?? RequestOptions(),\n      reason: reason,\n      stackTrace: StackTrace.current,\n    );\n    _completer.complete(_cancelError);\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/compute/compute.dart",
    "content": "// Copyright 2014 The Flutter Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// This file corresponds to Flutter's\n// [`foundation/isolates.dart`](https://github.com/flutter/flutter/blob/stable/packages/flutter/lib/src/foundation/isolates.dart).\n//\n// Changes are only synced with the `stable` branch.\n//\n// Last synced commit:\n// [3d46ab9](https://github.com/flutter/flutter/commit/3d46ab920b47a2ecb250c6f890f3559ef913cb0b)\n//\n// The changes are currently manually synced. If you noticed that the Flutter's\n// original `compute` function (and any of the related files) have changed\n// on the `stable` branch and you would like to see those changes in the `compute` package\n// please open an [issue](https://github.com/dartsidedev/compute/issues),\n// and I'll try my best to \"merge\".\n//\n// The file is intentionally not refactored so that it is easier to keep the\n// compute package up to date with Flutter's implementation.\n//\n// When this library supports just Dart 3, we can delete most of this code\n// an make use of `Isolate.run()`\n// ignore_for_file: no_leading_underscores_for_library_prefixes\n\nimport 'dart:async';\n\nimport 'compute_io.dart'\n    if (dart.library.js_interop) 'compute_web.dart'\n    if (dart.library.html) 'compute_web.dart' as _c;\n\n/// Signature for the callback passed to [compute].\n///\n/// For more information, visit Flutter documentation for the equivalent\n/// [`ComputeCallback<Q, R>` type definition](https://api.flutter.dev/flutter/foundation/ComputeCallback.html)\n/// in Flutter. This documentation is taken directly from\n/// the Flutter source code.\n///\n/// {@macro flutter.foundation.compute.types}\n///\n/// Instances of [ComputeCallback] must be functions that can be sent to an\n/// isolate.\n/// {@macro flutter.foundation.compute.callback}\n///\n/// {@macro flutter.foundation.compute.types}\ntypedef ComputeCallback<Q, R> = FutureOr<R> Function(Q message);\n\n/// The signature of [compute], which spawns an isolate, runs `callback` on\n/// that isolate, passes it `message`, and (eventually) returns the value\n/// returned by `callback`.\n///\n/// For more information, visit Flutter documentation for the equivalent\n/// [`ComputeImpl` type definition](https://api.flutter.dev/flutter/foundation/ComputeImpl.html)\n/// in Flutter. This documentation is taken directly from\n/// the Flutter source code.\n///\n/// {@macro flutter.foundation.compute.usecase}\n///\n/// The function used as `callback` must be one that can be sent to an isolate.\n/// {@macro flutter.foundation.compute.callback}\n///\n/// {@macro flutter.foundation.compute.types}\n///\n/// The `debugLabel` argument can be specified to provide a name to add to the\n/// [Timeline]. This is useful when profiling an application.\ntypedef ComputeImpl = Future<R> Function<Q, R>(\n  ComputeCallback<Q, R> callback,\n  Q message, {\n  String? debugLabel,\n});\n\n/// A function that spawns an isolate and runs the provided `callback` on that\n/// isolate, passes it the provided `message`, and (eventually) returns the\n/// value returned by `callback`.\n///\n/// For more information, visit Flutter documentation for the equivalent\n/// [`compute` function](https://pub.dev/documentation/compute/latest/compute/compute-constant.html)\n/// in Flutter. This documentation is taken directly from\n/// the Flutter source code.\n///\n/// {@template flutter.foundation.compute.usecase}\n/// This is useful for operations that take longer than a few milliseconds, and\n/// which would therefore risk skipping frames. For tasks that will only take a\n/// few milliseconds, consider [SchedulerBinding.scheduleTask] instead.\n/// {@endtemplate}\n///\n/// {@youtube 560 315 https://www.youtube.com/watch?v=5AxWC49ZMzs}\n///\n/// The following code uses the [compute] function to check whether a given\n/// integer is a prime number.\n///\n/// ```dart\n/// Future<bool> isPrime(int value) {\n///   return compute(_calculate, value);\n/// }\n///\n/// bool _calculate(int value) {\n///   if (value == 1) {\n///     return false;\n///   }\n///   for (int i = 2; i < value; ++i) {\n///     if (value % i == 0) {\n///       return false;\n///     }\n///   }\n///   return true;\n/// }\n/// ```\n///\n/// The function used as `callback` must be one that can be sent to an isolate.\n/// {@template flutter.foundation.compute.callback}\n/// Qualifying functions include:\n///\n///   * top-level functions\n///   * static methods\n///   * closures that only capture objects that can be sent to an isolate\n///\n/// Using closures must be done with care. Due to\n/// [dart-lang/sdk#36983](https://github.com/dart-lang/sdk/issues/36983) a\n/// closure may captures objects that, while not directly used in the closure\n/// itself, may prevent it from being sent to an isolate.\n/// {@endtemplate}\n///\n/// {@template flutter.foundation.compute.types}\n/// The [compute] method accepts the following parameters:\n///\n///  * `Q` is the type of the message that kicks off the computation.\n///  * `R` is the type of the value returned.\n///\n/// There are limitations on the values that can be sent and received to and\n/// from isolates. These limitations constrain the values of `Q` and `R` that\n/// are possible. See the discussion at [SendPort.send].\n///\n/// The same limitations apply to any errors generated by the computation.\n/// {@endtemplate}\n///\n/// See also:\n///\n///   * [ComputeImpl], for the [compute] function's signature.\nconst ComputeImpl compute = _c.compute;\n"
  },
  {
    "path": "dio/lib/src/compute/compute_io.dart",
    "content": "// Copyright 2014 The Flutter Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// This file corresponds to Flutter's\n// [`foundation/_isolates_io.dart`](https://github.com/flutter/flutter/blob/stable/packages/flutter/lib/src/foundation/_isolates_io.dart).\n//\n// Changes are only synced with the `stable` branch.\n//\n// Last synced commit:\n// [3420b9c](https://github.com/flutter/flutter/commit/3420b9c50ea19489dd74b024705bb010c5763d0a)\n//\n// The changes are currently manually synced. If you noticed that the Flutter's\n// original `compute` function (and any of the related files) have changed\n// on the `stable` branch and you would like to see those changes in the `compute` package\n// please open an [issue](https://github.com/dartsidedev/compute/issues),\n// and I'll try my best to \"merge\".\n//\n// The file is intentionally not refactored so that it is easier to keep the\n// compute package up to date with Flutter's implementation.\nimport 'dart:async';\nimport 'dart:developer';\nimport 'dart:isolate';\n\nimport '../utils.dart' show kReleaseMode;\nimport 'compute.dart' as c;\n\n/// The dart:io implementation of [c.compute].\nFuture<R> compute<Q, R>(\n  c.ComputeCallback<Q, R> callback,\n  Q message, {\n  String? debugLabel,\n}) async {\n  debugLabel ??= kReleaseMode ? 'compute' : callback.toString();\n\n  final Flow flow = Flow.begin();\n  Timeline.startSync('$debugLabel: start', flow: flow);\n  final RawReceivePort port = RawReceivePort();\n  Timeline.finishSync();\n\n  void timeEndAndCleanup() {\n    Timeline.startSync('$debugLabel: end', flow: Flow.end(flow.id));\n    port.close();\n    Timeline.finishSync();\n  }\n\n  final Completer<dynamic> completer = Completer<dynamic>();\n  port.handler = (dynamic msg) {\n    timeEndAndCleanup();\n    completer.complete(msg);\n  };\n\n  try {\n    await Isolate.spawn<_IsolateConfiguration<Q, R>>(\n      _spawn,\n      _IsolateConfiguration<Q, R>(\n        callback,\n        message,\n        port.sendPort,\n        debugLabel,\n        flow.id,\n      ),\n      errorsAreFatal: true,\n      onExit: port.sendPort,\n      onError: port.sendPort,\n      debugName: debugLabel,\n    );\n  } on Object {\n    timeEndAndCleanup();\n    rethrow;\n  }\n\n  final dynamic response = await completer.future;\n  if (response == null) {\n    throw RemoteError('Isolate exited without result or error.', '');\n  }\n\n  assert(response is List<dynamic>);\n  response as List<dynamic>;\n\n  final int type = response.length;\n  assert(1 <= type && type <= 3);\n\n  switch (type) {\n    // success; see _buildSuccessResponse\n    case 1:\n      return response[0] as R;\n\n    // native error; see Isolate.addErrorListener\n    case 2:\n      await Future<Never>.error(\n        RemoteError(\n          response[0] as String,\n          response[1] as String,\n        ),\n      );\n\n    // caught error; see _buildErrorResponse\n    case 3:\n    default:\n      assert(type == 3 && response[2] == null);\n\n      await Future<Never>.error(\n        response[0] as Object,\n        response[1] as StackTrace,\n      );\n  }\n}\n\nclass _IsolateConfiguration<Q, R> {\n  const _IsolateConfiguration(\n    this.callback,\n    this.message,\n    this.resultPort,\n    this.debugLabel,\n    this.flowId,\n  );\n\n  final c.ComputeCallback<Q, R> callback;\n  final Q message;\n  final SendPort resultPort;\n  final String debugLabel;\n  final int flowId;\n\n  FutureOr<R> applyAndTime() {\n    return Timeline.timeSync(\n      debugLabel,\n      () => callback(message),\n      flow: Flow.step(flowId),\n    );\n  }\n}\n\n/// The spawn point MUST guarantee only one result event is sent through the\n/// [SendPort.send] be it directly or indirectly i.e. [Isolate.exit].\n///\n/// In case an [Error] or [Exception] are thrown AFTER the data\n/// is sent, they will NOT be handled or reported by the main [Isolate] because\n/// it stops listening after the first event is received.\n///\n/// Also use the helpers [_buildSuccessResponse] and [_buildErrorResponse] to\n/// build the response\nFuture<void> _spawn<Q, R>(_IsolateConfiguration<Q, R> configuration) async {\n  late final List<dynamic> computationResult;\n\n  try {\n    computationResult =\n        _buildSuccessResponse(await configuration.applyAndTime());\n  } catch (e, s) {\n    computationResult = _buildErrorResponse(e, s);\n  }\n\n  Isolate.exit(configuration.resultPort, computationResult);\n}\n\n/// Wrap in [List] to ensure our expectations in the main [Isolate] are met.\n///\n/// We need to wrap a success result in a [List] because the user provided type\n/// [R] could also be a [List]. Meaning, a check `result is R` could return true\n/// for what was an error event.\nList<R> _buildSuccessResponse<R>(R result) {\n  return List<R>.filled(1, result);\n}\n\n/// Wrap in [List] to ensure our expectations in the main isolate are met.\n///\n/// We wrap a caught error in a 3 element [List]. Where the last element is\n/// always null. We do this so we have a way to know if an error was one we\n/// caught or one thrown by the library code.\nList<dynamic> _buildErrorResponse(Object error, StackTrace stack) {\n  return List<dynamic>.filled(3, null)\n    ..[0] = error\n    ..[1] = stack;\n}\n"
  },
  {
    "path": "dio/lib/src/compute/compute_web.dart",
    "content": "export 'package:dio_web_adapter/dio_web_adapter.dart' show compute;\n"
  },
  {
    "path": "dio/lib/src/dio/dio_for_browser.dart",
    "content": "export 'package:dio_web_adapter/dio_web_adapter.dart'\n    show createDio, DioForBrowser;\n"
  },
  {
    "path": "dio/lib/src/dio/dio_for_native.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport '../adapter.dart';\nimport '../adapters/io_adapter.dart';\nimport '../cancel_token.dart';\nimport '../dio.dart';\nimport '../dio_exception.dart';\nimport '../dio_mixin.dart';\nimport '../headers.dart';\nimport '../options.dart';\nimport '../response.dart';\n\n/// Create the [Dio] instance for native platforms.\nDio createDio([BaseOptions? baseOptions]) => DioForNative(baseOptions);\n\n/// Implements features for [Dio] on native platforms.\nclass DioForNative with DioMixin implements Dio {\n  /// Create Dio instance with default [BaseOptions].\n  /// It is recommended that an application use only the same DIO singleton.\n  DioForNative([BaseOptions? baseOptions]) {\n    options = baseOptions ?? BaseOptions();\n    httpClientAdapter = IOHttpClientAdapter();\n  }\n\n  /// {@macro dio.Dio.download}\n  @override\n  Future<Response> download(\n    String urlPath,\n    dynamic savePath, {\n    ProgressCallback? onReceiveProgress,\n    Map<String, dynamic>? queryParameters,\n    CancelToken? cancelToken,\n    bool deleteOnError = true,\n    FileAccessMode fileAccessMode = FileAccessMode.write,\n    String lengthHeader = Headers.contentLengthHeader,\n    Object? data,\n    Options? options,\n  }) async {\n    options ??= DioMixin.checkOptions('GET', options);\n    // Manually set the `responseType` to [ResponseType.stream]\n    // to retrieve the response stream.\n    // Do not modify previous options.\n    options = options.copyWith(responseType: ResponseType.stream);\n    final Response<ResponseBody> response;\n    try {\n      response = await request<ResponseBody>(\n        urlPath,\n        data: data,\n        options: options,\n        queryParameters: queryParameters,\n        cancelToken: cancelToken,\n      );\n    } on DioException catch (e) {\n      if (e.type == DioExceptionType.badResponse) {\n        final response = e.response!;\n        if (response.requestOptions.receiveDataWhenStatusError == true) {\n          final ResponseType implyResponseType;\n          final contentType = response.headers.value(Headers.contentTypeHeader);\n          if (contentType != null && contentType.startsWith('text/')) {\n            implyResponseType = ResponseType.plain;\n          } else {\n            implyResponseType = ResponseType.json;\n          }\n          final res = await transformer.transformResponse(\n            response.requestOptions.copyWith(responseType: implyResponseType),\n            response.data as ResponseBody,\n          );\n          response.data = res;\n        } else {\n          response.data = null;\n        }\n      }\n      rethrow;\n    }\n    final File file;\n    if (savePath is FutureOr<String> Function(Headers)) {\n      // Add real Uri and redirect information to headers.\n      response.headers\n        ..add('redirects', response.redirects.length.toString())\n        ..add('uri', response.realUri.toString());\n      file = File(await savePath(response.headers));\n    } else if (savePath is String) {\n      file = File(savePath);\n    } else {\n      throw ArgumentError.value(\n        savePath.runtimeType,\n        'savePath',\n        'The type must be `String` or `FutureOr<String> Function(Headers)`.',\n      );\n    }\n\n    // If the file already exists, the method fails.\n    file.createSync(recursive: true);\n\n    // Shouldn't call file.writeAsBytesSync(list, flush: flush),\n    // because it can write all bytes by once. Consider that the file is\n    // a very big size (up to 1 Gigabytes), it will be expensive in memory.\n    RandomAccessFile raf = file.openSync(\n      mode: fileAccessMode == FileAccessMode.write\n          ? FileMode.write\n          : FileMode.append,\n    );\n\n    // Create a Completer to notify the success/error state.\n    final completer = Completer<Response>();\n    int received = 0;\n\n    // Stream<Uint8List>\n    final stream = response.data!.stream;\n    bool compressed = false;\n    int total = 0;\n    final contentEncoding = response.headers.value(\n      Headers.contentEncodingHeader,\n    );\n    if (contentEncoding != null) {\n      compressed = ['gzip', 'deflate', 'compress'].contains(contentEncoding);\n    }\n    if (lengthHeader == Headers.contentLengthHeader && compressed) {\n      total = -1;\n    } else {\n      total = int.parse(response.headers.value(lengthHeader) ?? '-1');\n    }\n\n    Future<void>? asyncWrite;\n    bool closed = false;\n    Future<void> closeAndDelete() async {\n      if (!closed) {\n        closed = true;\n        await asyncWrite;\n        await raf.close().catchError((_) => raf);\n        if (deleteOnError && file.existsSync()) {\n          await file.delete().catchError((_) => file);\n        }\n      }\n    }\n\n    late StreamSubscription subscription;\n    subscription = stream.listen(\n      (data) {\n        subscription.pause();\n        // Write file asynchronously\n        asyncWrite = raf.writeFrom(data).then((result) {\n          // Notify progress\n          received += data.length;\n          onReceiveProgress?.call(received, total);\n          raf = result;\n          if (cancelToken == null || !cancelToken.isCancelled) {\n            subscription.resume();\n          }\n        }).catchError((Object e) async {\n          try {\n            await subscription.cancel().catchError((_) {});\n            closed = true;\n            await raf.close().catchError((_) => raf);\n            if (deleteOnError && file.existsSync()) {\n              await file.delete().catchError((_) => file);\n            }\n          } finally {\n            completer.completeError(\n              DioMixin.assureDioException(e, response.requestOptions),\n            );\n          }\n        });\n      },\n      onDone: () async {\n        try {\n          await asyncWrite;\n          closed = true;\n          await raf.close().catchError((_) => raf);\n          completer.complete(response);\n        } catch (e) {\n          completer.completeError(\n            DioMixin.assureDioException(e, response.requestOptions),\n          );\n        }\n      },\n      onError: (e) async {\n        try {\n          await closeAndDelete();\n        } finally {\n          completer.completeError(\n            DioMixin.assureDioException(e, response.requestOptions),\n          );\n        }\n      },\n      cancelOnError: true,\n    );\n    cancelToken?.whenCancel.then((_) async {\n      await subscription.cancel();\n      await closeAndDelete();\n    });\n    return DioMixin.listenCancelForAsyncTask(cancelToken, completer.future);\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/dio.dart",
    "content": "import 'dart:async';\n\nimport 'adapter.dart';\nimport 'cancel_token.dart';\nimport 'dio/dio_for_native.dart'\n    if (dart.library.js_interop) 'dio/dio_for_browser.dart'\n    if (dart.library.html) 'dio/dio_for_browser.dart';\nimport 'dio_mixin.dart';\nimport 'headers.dart';\nimport 'options.dart';\nimport 'response.dart';\nimport 'transformer.dart';\n\n/// Dio enables you to make HTTP requests easily.\n///\n/// Creating a [Dio] instance with configurations:\n/// ```dart\n/// final dio = Dio(\n///   BaseOptions(\n///     baseUrl: \"https://pub.dev\",\n///     connectTimeout: const Duration(seconds: 5),\n///     receiveTimeout: const Duration(seconds: 5),\n///     headers: {\n///       HttpHeaders.userAgentHeader: 'dio',\n///       'common-header': 'xx',\n///     },\n///   )\n/// );\n/// ```\n///\n/// The [Dio.options] can be updated in anytime:\n/// ```dart\n/// dio.options.baseUrl = \"https://pub.dev\";\n/// dio.options.connectTimeout = const Duration(seconds: 5);\n/// dio.options.receiveTimeout = const Duration(seconds: 5);\n/// ```\nabstract class Dio {\n  /// Create the default [Dio] instance with the default implementation\n  /// based on different platforms.\n  factory Dio([BaseOptions? options]) => createDio(options);\n\n  /// Default Request config. More see [BaseOptions] .\n  late BaseOptions options;\n\n  /// Return the interceptors added into the instance.\n  Interceptors get interceptors;\n\n  /// The adapter that the instance is using.\n  late HttpClientAdapter httpClientAdapter;\n\n  /// [Transformer] allows changes to the request/response data before it is\n  /// sent/received to/from the server.\n  /// This is only applicable for requests that have payload.\n  late Transformer transformer;\n\n  /// Shuts down the dio client.\n  ///\n  /// If [force] is `false` (the default) the [Dio] will be kept alive\n  /// until all active connections are done. If [force] is `true` any active\n  /// connections will be closed to immediately release all resources. These\n  /// closed connections will receive an error event to indicate that the client\n  /// was shut down. In both cases trying to establish a new connection after\n  /// calling [close] will throw an exception.\n  void close({bool force = false});\n\n  /// Convenience method to make an HTTP HEAD request.\n  Future<Response<T>> head<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n  });\n\n  /// Convenience method to make an HTTP HEAD request with [Uri].\n  Future<Response<T>> headUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n  });\n\n  /// Convenience method to make an HTTP GET request.\n  Future<Response<T>> get<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onReceiveProgress,\n  });\n\n  /// Convenience method to make an HTTP GET request with [Uri].\n  Future<Response<T>> getUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onReceiveProgress,\n  });\n\n  /// Convenience method to make an HTTP POST request.\n  Future<Response<T>> post<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  });\n\n  /// Convenience method to make an HTTP POST request with [Uri].\n  Future<Response<T>> postUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  });\n\n  /// Convenience method to make an HTTP PUT request.\n  Future<Response<T>> put<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  });\n\n  /// Convenience method to make an HTTP PUT request with [Uri].\n  Future<Response<T>> putUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  });\n\n  /// Convenience method to make an HTTP PATCH request.\n  Future<Response<T>> patch<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  });\n\n  /// Convenience method to make an HTTP PATCH request with [Uri].\n  Future<Response<T>> patchUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  });\n\n  /// Convenience method to make an HTTP DELETE request.\n  Future<Response<T>> delete<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n  });\n\n  /// Convenience method to make an HTTP DELETE request with [Uri].\n  Future<Response<T>> deleteUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n  });\n\n  /// {@template dio.Dio.download}\n  /// Download the file and save it in local. The default http method is \"GET\",\n  /// you can custom it by [Options.method].\n  ///\n  /// [urlPath] is the file url.\n  ///\n  /// The file will be saved to the path specified by [savePath].\n  /// The following two types are accepted:\n  /// 1. `String`: A path, eg \"xs.jpg\"\n  /// 2. `FutureOr<String> Function(Headers headers)`, for example:\n  ///    ```dart\n  ///    await dio.download(\n  ///      url,\n  ///      (Headers headers) {\n  ///        // Extra info: redirect counts\n  ///        print(headers.value('redirects'));\n  ///        // Extra info: real uri\n  ///        print(headers.value('uri'));\n  ///        // ...\n  ///        return (await getTemporaryDirectory()).path + 'file_name';\n  ///      },\n  ///    );\n  ///    ```\n  ///\n  /// [onReceiveProgress] is the callback to listen downloading progress.\n  /// Please refer to [ProgressCallback].\n  ///\n  /// [deleteOnError] whether delete the file when error occurs.\n  /// The default value is [true].\n  ///\n  /// [fileAccessMode]\n  /// {@macro dio.options.FileAccessMode}\n  ///\n  /// [lengthHeader] : The real size of original file (not compressed).\n  /// When file is compressed:\n  /// 1. If this value is 'content-length', the `total` argument of\n  ///    [onReceiveProgress] will be -1.\n  /// 2. If this value is not 'content-length', maybe a custom header indicates\n  ///    the original file size, the `total` argument of [onReceiveProgress]\n  ///    will be this header value.\n  ///\n  /// You can also disable the compression by specifying the 'accept-encoding'\n  /// header value as '*' to assure the value of `total` argument of\n  /// [onReceiveProgress] is not -1. For example:\n  ///\n  /// ```dart\n  /// await dio.download(\n  ///   url,\n  ///   (await getTemporaryDirectory()).path + 'flutter.svg',\n  ///   options: Options(\n  ///     headers: {HttpHeaders.acceptEncodingHeader: '*'}, // Disable gzip\n  ///   ),\n  ///   onReceiveProgress: (received, total) {\n  ///     if (total <= 0) return;\n  ///     print('percentage: ${(received / total * 100).toStringAsFixed(0)}%');\n  ///   },\n  /// );\n  /// ```\n  /// {@endtemplate}\n  Future<Response> download(\n    String urlPath,\n    dynamic savePath, {\n    ProgressCallback? onReceiveProgress,\n    Map<String, dynamic>? queryParameters,\n    CancelToken? cancelToken,\n    bool deleteOnError = true,\n    FileAccessMode fileAccessMode = FileAccessMode.write,\n    String lengthHeader = Headers.contentLengthHeader,\n    Object? data,\n    Options? options,\n  });\n\n  /// {@macro dio.Dio.download}\n  Future<Response> downloadUri(\n    Uri uri,\n    dynamic savePath, {\n    ProgressCallback? onReceiveProgress,\n    CancelToken? cancelToken,\n    bool deleteOnError = true,\n    FileAccessMode fileAccessMode = FileAccessMode.write,\n    String lengthHeader = Headers.contentLengthHeader,\n    Object? data,\n    Options? options,\n  }) {\n    return download(\n      uri.toString(),\n      savePath,\n      onReceiveProgress: onReceiveProgress,\n      lengthHeader: lengthHeader,\n      deleteOnError: deleteOnError,\n      cancelToken: cancelToken,\n      data: data,\n      fileAccessMode: fileAccessMode,\n      options: options,\n    );\n  }\n\n  /// Make HTTP request with options.\n  Future<Response<T>> request<T>(\n    String url, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    CancelToken? cancelToken,\n    Options? options,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  });\n\n  /// Make http request with options with [Uri].\n  Future<Response<T>> requestUri<T>(\n    Uri uri, {\n    Object? data,\n    CancelToken? cancelToken,\n    Options? options,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  });\n\n  /// The eventual method to submit requests. All callers for requests should\n  /// eventually go through this method.\n  Future<Response<T>> fetch<T>(RequestOptions requestOptions);\n\n  /// Clones a new [Dio] instance with override fields or reuses current fields.\n  Dio clone({\n    BaseOptions? options,\n    Interceptors? interceptors,\n    HttpClientAdapter? httpClientAdapter,\n    Transformer? transformer,\n  });\n}\n"
  },
  {
    "path": "dio/lib/src/dio_exception.dart",
    "content": "import 'options.dart';\nimport 'response.dart';\nimport 'utils.dart' show warningLog;\n\n/// Deprecated in favor of [DioExceptionType] and will be removed in future major versions.\n@Deprecated('Use DioExceptionType instead. This will be removed in 6.0.0')\ntypedef DioErrorType = DioExceptionType;\n\n/// [DioError] describes the exception info when a request failed.\n@Deprecated('Use DioException instead. This will be removed in 6.0.0')\ntypedef DioError = DioException;\n\n/// The exception enumeration indicates what type of exception\n/// has happened during requests.\nenum DioExceptionType {\n  /// Caused by a connection timeout.\n  connectionTimeout,\n\n  /// It occurs when url is sent timeout.\n  sendTimeout,\n\n  /// It occurs when receiving timeout.\n  receiveTimeout,\n\n  /// Caused by an incorrect certificate as configured by [ValidateCertificate].\n  badCertificate,\n\n  /// The [DioException] was caused by an incorrect status code as configured by\n  /// [ValidateStatus].\n  badResponse,\n\n  /// When the request is cancelled, dio will throw a error with this type.\n  cancel,\n\n  /// Caused for example by a `xhr.onError` or SocketExceptions.\n  connectionError,\n\n  /// Default error type, Some other [Error]. In this case, you can use the\n  /// [DioException.error] if it is not null.\n  unknown,\n}\n\nextension _DioExceptionTypeExtension on DioExceptionType {\n  String toPrettyDescription() {\n    switch (this) {\n      case DioExceptionType.connectionTimeout:\n        return 'connection timeout';\n      case DioExceptionType.sendTimeout:\n        return 'send timeout';\n      case DioExceptionType.receiveTimeout:\n        return 'receive timeout';\n      case DioExceptionType.badCertificate:\n        return 'bad certificate';\n      case DioExceptionType.badResponse:\n        return 'bad response';\n      case DioExceptionType.cancel:\n        return 'request cancelled';\n      case DioExceptionType.connectionError:\n        return 'connection error';\n      case DioExceptionType.unknown:\n        return 'unknown';\n    }\n  }\n}\n\n/// [DioException] describes the exception info when a request failed.\nclass DioException implements Exception {\n  /// Prefer using one of the other constructors.\n  /// They're most likely better fitting.\n  DioException({\n    required this.requestOptions,\n    this.response,\n    this.type = DioExceptionType.unknown,\n    this.error,\n    StackTrace? stackTrace,\n    this.message,\n  }) : stackTrace = identical(stackTrace, StackTrace.empty)\n            ? requestOptions.sourceStackTrace ?? StackTrace.current\n            : stackTrace ??\n                requestOptions.sourceStackTrace ??\n                StackTrace.current;\n\n  factory DioException.badResponse({\n    required int statusCode,\n    required RequestOptions requestOptions,\n    required Response response,\n  }) =>\n      DioException(\n        type: DioExceptionType.badResponse,\n        requestOptions: requestOptions,\n        response: response,\n        error: null,\n        message: _badResponseExceptionMessage(statusCode),\n      );\n\n  factory DioException.connectionTimeout({\n    required Duration timeout,\n    required RequestOptions requestOptions,\n    Object? error,\n  }) =>\n      DioException(\n        type: DioExceptionType.connectionTimeout,\n        requestOptions: requestOptions,\n        response: null,\n        error: error,\n        message: 'The request connection took longer than $timeout '\n            'and it was aborted. '\n            'To get rid of this exception, try raising the '\n            'RequestOptions.connectTimeout above the duration of $timeout or '\n            'improve the response time of the server.',\n      );\n\n  factory DioException.sendTimeout({\n    required Duration timeout,\n    required RequestOptions requestOptions,\n  }) =>\n      DioException(\n        type: DioExceptionType.sendTimeout,\n        requestOptions: requestOptions,\n        response: null,\n        error: null,\n        message: 'The request took longer than $timeout to send data. '\n            'It was aborted. '\n            'To get rid of this exception, try raising the '\n            'RequestOptions.sendTimeout above the duration of $timeout or '\n            'improve the response time of the server.',\n      );\n\n  factory DioException.receiveTimeout({\n    required Duration timeout,\n    required RequestOptions requestOptions,\n    Object? error,\n  }) =>\n      DioException(\n        type: DioExceptionType.receiveTimeout,\n        requestOptions: requestOptions,\n        response: null,\n        error: error,\n        message: 'The request took longer than $timeout to receive data. '\n            'It was aborted. '\n            'To get rid of this exception, try raising the '\n            'RequestOptions.receiveTimeout above the duration of $timeout or '\n            'improve the response time of the server.',\n      );\n\n  factory DioException.badCertificate({\n    required RequestOptions requestOptions,\n    Object? error,\n  }) =>\n      DioException(\n        type: DioExceptionType.badCertificate,\n        requestOptions: requestOptions,\n        response: null,\n        error: error,\n        message: 'The certificate of the response is not approved.',\n      );\n\n  factory DioException.requestCancelled({\n    required RequestOptions requestOptions,\n    required Object? reason,\n    StackTrace? stackTrace,\n  }) =>\n      DioException(\n        type: DioExceptionType.cancel,\n        requestOptions: requestOptions,\n        response: null,\n        error: reason,\n        stackTrace: stackTrace,\n        message: 'The request was manually cancelled by the user.',\n      );\n\n  factory DioException.connectionError({\n    required RequestOptions requestOptions,\n    required String reason,\n    Object? error,\n  }) =>\n      DioException(\n        type: DioExceptionType.connectionError,\n        message: 'The connection errored: $reason '\n            'This indicates an error which most likely cannot be solved by the library.',\n        requestOptions: requestOptions,\n        response: null,\n        error: error,\n      );\n\n  /// The request info for the request that throws exception.\n  ///\n  /// The info can be empty (e.g. `uri` equals to \"\")\n  /// if the request was never submitted.\n  final RequestOptions requestOptions;\n\n  /// Response info, it may be `null` if the request can't reach to the\n  /// HTTP server, for example, occurring a DNS error, network is not available.\n  final Response? response;\n\n  final DioExceptionType type;\n\n  /// The original error/exception object;\n  /// It's usually not null when `type` is [DioExceptionType.unknown].\n  final Object? error;\n\n  /// The stacktrace of the original error/exception object;\n  /// It's usually not null when `type` is [DioExceptionType.unknown].\n  final StackTrace stackTrace;\n\n  /// The error message that throws a [DioException].\n  final String? message;\n\n  /// Users can customize the content of [toString] when thrown.\n  static DioExceptionReadableStringBuilder readableStringBuilder =\n      defaultDioExceptionReadableStringBuilder;\n\n  /// Each exception can be override with a customized builder or fallback to\n  /// the default [DioException.readableStringBuilder].\n  DioExceptionReadableStringBuilder? stringBuilder;\n\n  /// Generate a new [DioException] by combining given values and original values.\n  DioException copyWith({\n    RequestOptions? requestOptions,\n    Response? response,\n    DioExceptionType? type,\n    Object? error,\n    StackTrace? stackTrace,\n    String? message,\n  }) {\n    return DioException(\n      requestOptions: requestOptions ?? this.requestOptions,\n      response: response ?? this.response,\n      type: type ?? this.type,\n      error: error ?? this.error,\n      stackTrace: stackTrace ?? this.stackTrace,\n      message: message ?? this.message,\n    );\n  }\n\n  @override\n  String toString() {\n    try {\n      return stringBuilder?.call(this) ?? readableStringBuilder(this);\n    } catch (e, s) {\n      warningLog(e, s);\n      return defaultDioExceptionReadableStringBuilder(this);\n    }\n  }\n\n  /// Because of [ValidateStatus] we need to consider all status codes when\n  /// creating a [DioException.badResponse].\n  static String _badResponseExceptionMessage(int statusCode) {\n    final String message;\n    if (statusCode >= 100 && statusCode < 200) {\n      message =\n          'This is an informational response - the request was received, continuing processing';\n    } else if (statusCode >= 200 && statusCode < 300) {\n      message =\n          'The request was successfully received, understood, and accepted';\n    } else if (statusCode >= 300 && statusCode < 400) {\n      message =\n          'Redirection: further action needs to be taken in order to complete the request';\n    } else if (statusCode >= 400 && statusCode < 500) {\n      message =\n          'Client error - the request contains bad syntax or cannot be fulfilled';\n    } else if (statusCode >= 500 && statusCode < 600) {\n      message =\n          'Server error - the server failed to fulfil an apparently valid request';\n    } else {\n      message =\n          'A response with a status code that is not within the range of inclusive 100 to exclusive 600'\n          'is a non-standard response, possibly due to the server\\'s software';\n    }\n\n    final buffer = StringBuffer();\n\n    buffer.writeln(\n      'This exception was thrown because the response has a status code of $statusCode '\n      'and RequestOptions.validateStatus was configured to throw for this status code.',\n    );\n    buffer.writeln(\n      'The status code of $statusCode has the following meaning: \"$message\"',\n    );\n    buffer.writeln(\n      'Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status',\n    );\n    buffer.writeln(\n      'In order to resolve this exception you typically have either to verify '\n      'and fix your request code or you have to fix the server code.',\n    );\n\n    return buffer.toString();\n  }\n}\n\n/// The readable string builder's signature of\n/// [DioException.readableStringBuilder].\ntypedef DioExceptionReadableStringBuilder = String Function(DioException e);\n\n/// The default implementation of building a readable string of [DioException].\nString defaultDioExceptionReadableStringBuilder(DioException e) {\n  final buffer = StringBuffer(\n    'DioException [${e.type.toPrettyDescription()}]: '\n    '${e.message}',\n  );\n  if (e.error != null) {\n    buffer.writeln();\n    buffer.write('Error: ${e.error}');\n  }\n  return buffer.toString();\n}\n"
  },
  {
    "path": "dio/lib/src/dio_mixin.dart",
    "content": "import 'dart:async';\nimport 'dart:collection';\nimport 'dart:convert';\nimport 'dart:math' as math;\nimport 'dart:typed_data';\n\nimport 'package:async/async.dart';\nimport 'package:meta/meta.dart';\n\nimport 'adapter.dart';\nimport 'cancel_token.dart';\nimport 'dio.dart';\nimport 'dio_exception.dart';\nimport 'form_data.dart';\nimport 'headers.dart';\nimport 'interceptors/imply_content_type.dart';\nimport 'options.dart';\nimport 'progress_stream/io_progress_stream.dart'\n    if (dart.library.js_interop) 'progress_stream/browser_progress_stream.dart'\n    if (dart.library.html) 'progress_stream/browser_progress_stream.dart';\nimport 'response.dart';\nimport 'response/response_stream_handler.dart';\nimport 'transformer.dart';\n\npart 'interceptor.dart';\n\n// TODO(EVERYONE): Use `mixin class` when the lower bound of SDK is raised to 3.0.0.\nabstract class DioMixin implements Dio {\n  /// The base request config for the instance.\n  @override\n  late BaseOptions options;\n\n  /// Each Dio instance has a interceptor group by which you can\n  /// intercept requests or responses before they are ended.\n  @override\n  Interceptors get interceptors => _interceptors;\n  final Interceptors _interceptors = Interceptors();\n\n  @override\n  late HttpClientAdapter httpClientAdapter;\n\n  /// The default [Transformer] that transfers requests and responses\n  /// into corresponding content to send.\n  /// For response bodies greater than 50KB, a new Isolate will be spawned to\n  /// decode the response body to JSON.\n  /// Taken from https://github.com/flutter/flutter/blob/135454af32477f815a7525073027a3ff9eff1bfd/packages/flutter/lib/src/services/asset_bundle.dart#L87-L93\n  /// 50 KB of data should take 2-3 ms to parse on a Moto G4, and about 400 μs\n  /// on a Pixel 4.\n  @override\n  Transformer transformer = FusedTransformer(\n    contentLengthIsolateThreshold: 50 * 1024,\n  );\n\n  bool _closed = false;\n\n  @override\n  void close({bool force = false}) {\n    _closed = true;\n    httpClientAdapter.close(force: force);\n  }\n\n  @override\n  Future<Response<T>> get<T>(\n    String path, {\n    Map<String, dynamic>? queryParameters,\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onReceiveProgress,\n  }) {\n    return request<T>(\n      path,\n      data: data,\n      queryParameters: queryParameters,\n      options: checkOptions('GET', options),\n      onReceiveProgress: onReceiveProgress,\n      cancelToken: cancelToken,\n    );\n  }\n\n  @override\n  Future<Response<T>> getUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onReceiveProgress,\n  }) {\n    return requestUri<T>(\n      uri,\n      data: data,\n      options: checkOptions('GET', options),\n      onReceiveProgress: onReceiveProgress,\n      cancelToken: cancelToken,\n    );\n  }\n\n  @override\n  Future<Response<T>> post<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  }) {\n    return request<T>(\n      path,\n      data: data,\n      options: checkOptions('POST', options),\n      queryParameters: queryParameters,\n      cancelToken: cancelToken,\n      onSendProgress: onSendProgress,\n      onReceiveProgress: onReceiveProgress,\n    );\n  }\n\n  @override\n  Future<Response<T>> postUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  }) {\n    return requestUri<T>(\n      uri,\n      data: data,\n      options: checkOptions('POST', options),\n      cancelToken: cancelToken,\n      onSendProgress: onSendProgress,\n      onReceiveProgress: onReceiveProgress,\n    );\n  }\n\n  @override\n  Future<Response<T>> put<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  }) {\n    return request<T>(\n      path,\n      data: data,\n      queryParameters: queryParameters,\n      options: checkOptions('PUT', options),\n      cancelToken: cancelToken,\n      onSendProgress: onSendProgress,\n      onReceiveProgress: onReceiveProgress,\n    );\n  }\n\n  @override\n  Future<Response<T>> putUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  }) {\n    return requestUri<T>(\n      uri,\n      data: data,\n      options: checkOptions('PUT', options),\n      cancelToken: cancelToken,\n      onSendProgress: onSendProgress,\n      onReceiveProgress: onReceiveProgress,\n    );\n  }\n\n  @override\n  Future<Response<T>> head<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n  }) {\n    return request<T>(\n      path,\n      data: data,\n      queryParameters: queryParameters,\n      options: checkOptions('HEAD', options),\n      cancelToken: cancelToken,\n    );\n  }\n\n  @override\n  Future<Response<T>> headUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n  }) {\n    return requestUri<T>(\n      uri,\n      data: data,\n      options: checkOptions('HEAD', options),\n      cancelToken: cancelToken,\n    );\n  }\n\n  @override\n  Future<Response<T>> delete<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n  }) {\n    return request<T>(\n      path,\n      data: data,\n      queryParameters: queryParameters,\n      options: checkOptions('DELETE', options),\n      cancelToken: cancelToken,\n    );\n  }\n\n  @override\n  Future<Response<T>> deleteUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n  }) {\n    return requestUri<T>(\n      uri,\n      data: data,\n      options: checkOptions('DELETE', options),\n      cancelToken: cancelToken,\n    );\n  }\n\n  @override\n  Future<Response<T>> patch<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  }) {\n    return request<T>(\n      path,\n      data: data,\n      queryParameters: queryParameters,\n      options: checkOptions('PATCH', options),\n      cancelToken: cancelToken,\n      onSendProgress: onSendProgress,\n      onReceiveProgress: onReceiveProgress,\n    );\n  }\n\n  @override\n  Future<Response<T>> patchUri<T>(\n    Uri uri, {\n    Object? data,\n    Options? options,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  }) {\n    return requestUri<T>(\n      uri,\n      data: data,\n      options: checkOptions('PATCH', options),\n      cancelToken: cancelToken,\n      onSendProgress: onSendProgress,\n      onReceiveProgress: onReceiveProgress,\n    );\n  }\n\n  @override\n  Future<Response> downloadUri(\n    Uri uri,\n    dynamic savePath, {\n    ProgressCallback? onReceiveProgress,\n    CancelToken? cancelToken,\n    bool deleteOnError = true,\n    FileAccessMode fileAccessMode = FileAccessMode.write,\n    String lengthHeader = Headers.contentLengthHeader,\n    Object? data,\n    Options? options,\n  }) {\n    return download(\n      uri.toString(),\n      savePath,\n      onReceiveProgress: onReceiveProgress,\n      lengthHeader: lengthHeader,\n      deleteOnError: deleteOnError,\n      cancelToken: cancelToken,\n      data: data,\n      fileAccessMode: fileAccessMode,\n      options: options,\n    );\n  }\n\n  @override\n  Future<Response> download(\n    String urlPath,\n    dynamic savePath, {\n    ProgressCallback? onReceiveProgress,\n    Map<String, dynamic>? queryParameters,\n    CancelToken? cancelToken,\n    bool deleteOnError = true,\n    FileAccessMode fileAccessMode = FileAccessMode.write,\n    String lengthHeader = Headers.contentLengthHeader,\n    Object? data,\n    Options? options,\n  }) {\n    throw UnimplementedError();\n  }\n\n  @override\n  Future<Response<T>> requestUri<T>(\n    Uri uri, {\n    Object? data,\n    CancelToken? cancelToken,\n    Options? options,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  }) {\n    return request(\n      uri.toString(),\n      data: data,\n      cancelToken: cancelToken,\n      options: options,\n      onSendProgress: onSendProgress,\n      onReceiveProgress: onReceiveProgress,\n    );\n  }\n\n  @override\n  Future<Response<T>> request<T>(\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    CancelToken? cancelToken,\n    Options? options,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n  }) async {\n    if (cancelToken != null && cancelToken.isCancelled) {\n      throw cancelToken.cancelError!;\n    }\n\n    final requestOptions = (options ?? Options()).compose(\n      this.options,\n      path,\n      data: data,\n      queryParameters: queryParameters,\n      onReceiveProgress: onReceiveProgress,\n      onSendProgress: onSendProgress,\n      cancelToken: cancelToken,\n      sourceStackTrace: StackTrace.current,\n    );\n\n    if (_closed) {\n      throw DioException.connectionError(\n        reason: \"Dio can't establish a new connection after it was closed.\",\n        requestOptions: requestOptions,\n      );\n    }\n\n    return fetch<T>(requestOptions);\n  }\n\n  @override\n  Future<Response<T>> fetch<T>(RequestOptions requestOptions) async {\n    if (T != dynamic &&\n        !(requestOptions.responseType == ResponseType.bytes ||\n            requestOptions.responseType == ResponseType.stream)) {\n      if (T == String) {\n        requestOptions.responseType = ResponseType.plain;\n      } else {\n        requestOptions.responseType = ResponseType.json;\n      }\n    }\n\n    // Convert the request interceptor to a functional callback in which\n    // we can handle the return value of interceptor callback.\n    FutureOr Function(dynamic) requestInterceptorWrapper(\n      InterceptorSendCallback cb,\n    ) {\n      return (dynamic incomingState) {\n        final state = incomingState as InterceptorState;\n        if (state.type == InterceptorResultType.next) {\n          return listenCancelForAsyncTask(\n            requestOptions.cancelToken,\n            Future(() async {\n              final handler = RequestInterceptorHandler();\n              cb(state.data as RequestOptions, handler);\n              return handler.future;\n            }),\n          );\n        }\n        return state;\n      };\n    }\n\n    // Convert the response interceptor to a functional callback in which\n    // we can handle the return value of interceptor callback.\n    FutureOr<dynamic> Function(dynamic) responseInterceptorWrapper(\n      InterceptorSuccessCallback cb,\n    ) {\n      return (dynamic incomingState) {\n        final state = incomingState as InterceptorState;\n        if (state.type == InterceptorResultType.next ||\n            state.type == InterceptorResultType.resolveCallFollowing) {\n          return listenCancelForAsyncTask(\n            requestOptions.cancelToken,\n            Future(() async {\n              final handler = ResponseInterceptorHandler();\n              cb(state.data as Response, handler);\n              return handler.future;\n            }),\n          );\n        }\n        return state;\n      };\n    }\n\n    // Convert the error interceptor to a functional callback in which\n    // we can handle the return value of interceptor callback.\n    FutureOr<dynamic> Function(Object) errorInterceptorWrapper(\n      InterceptorErrorCallback cb,\n    ) {\n      return (dynamic error) {\n        final state = error is InterceptorState\n            ? error\n            : InterceptorState(assureDioException(error, requestOptions));\n        Future<InterceptorState> handleError() async {\n          final handler = ErrorInterceptorHandler();\n          cb(state.data, handler);\n          return handler.future;\n        }\n\n        // The request has already been cancelled,\n        // there is no need to listen for another cancellation.\n        if (state.data is DioException &&\n            state.data.type == DioExceptionType.cancel) {\n          return handleError();\n        }\n        if (state.type == InterceptorResultType.next ||\n            state.type == InterceptorResultType.rejectCallFollowing) {\n          return listenCancelForAsyncTask(\n            requestOptions.cancelToken,\n            Future(handleError),\n          );\n        }\n        throw error;\n      };\n    }\n\n    // Build a request flow in which the processors(interceptors)\n    // execute in FIFO order.\n    Future<dynamic> future = Future<dynamic>(\n      () => InterceptorState(requestOptions),\n    );\n\n    // Add request interceptors into the request flow.\n    for (final interceptor in interceptors) {\n      final fun = interceptor is QueuedInterceptor\n          ? interceptor._handleRequest\n          : interceptor.onRequest;\n      future = future.then(requestInterceptorWrapper(fun));\n    }\n\n    // Add dispatching callback into the request flow.\n    future = future.then(\n      requestInterceptorWrapper((\n        RequestOptions reqOpt,\n        RequestInterceptorHandler handler,\n      ) async {\n        requestOptions = reqOpt;\n        try {\n          final value = await _dispatchRequest<T>(reqOpt);\n          handler.resolve(value, true);\n        } on DioException catch (e) {\n          handler.reject(e, true);\n        }\n      }),\n    );\n\n    // Add response interceptors into the request flow\n    for (final interceptor in interceptors) {\n      final fun = interceptor is QueuedInterceptor\n          ? interceptor._handleResponse\n          : interceptor.onResponse;\n      future = future.then(responseInterceptorWrapper(fun));\n    }\n\n    // Add error handlers into the request flow.\n    for (final interceptor in interceptors) {\n      final fun = interceptor is QueuedInterceptor\n          ? interceptor._handleError\n          : interceptor.onError;\n      future = future.catchError(errorInterceptorWrapper(fun));\n    }\n    // Normalize errors, converts errors to [DioException].\n    try {\n      final data = await future;\n      return assureResponse<T>(\n        data is InterceptorState ? data.data : data,\n        requestOptions,\n      );\n    } catch (e) {\n      final isState = e is InterceptorState;\n      if (isState) {\n        if (e.type == InterceptorResultType.resolve) {\n          return assureResponse<T>(e.data, requestOptions);\n        }\n      }\n      throw assureDioException(isState ? e.data : e, requestOptions);\n    }\n  }\n\n  Future<Response<dynamic>> _dispatchRequest<T>(RequestOptions reqOpt) async {\n    final cancelToken = reqOpt.cancelToken;\n    try {\n      final stream = await _transformData(reqOpt);\n      final operation = CancelableOperation.fromFuture(\n        httpClientAdapter.fetch(\n          reqOpt,\n          stream,\n          cancelToken?.whenCancel,\n        ),\n      );\n      final operationWeakReference = WeakReference(operation);\n      cancelToken?.whenCancel.whenComplete(() {\n        operationWeakReference.target?.cancel();\n      });\n      final responseBody = await operation.value;\n      final headers = Headers.fromMap(\n        responseBody.headers,\n        preserveHeaderCase: reqOpt.preserveHeaderCase,\n      );\n      // Make sure headers and [ResponseBody.headers] are the same instance.\n      responseBody.headers = headers.map;\n      final ret = Response<dynamic>(\n        headers: headers,\n        requestOptions: reqOpt,\n        redirects: responseBody.redirects ?? [],\n        isRedirect: responseBody.isRedirect,\n        statusCode: responseBody.statusCode,\n        statusMessage: responseBody.statusMessage,\n        extra: responseBody.extra,\n      );\n      final statusOk = reqOpt.validateStatus(responseBody.statusCode);\n      if (statusOk || reqOpt.receiveDataWhenStatusError == true) {\n        responseBody.stream = handleResponseStream(reqOpt, responseBody);\n\n        Object? data = await transformer.transformResponse(\n          reqOpt,\n          responseBody,\n        );\n        // Make the response as null before returned as JSON.\n        if (data is String &&\n            data.isEmpty &&\n            T != dynamic &&\n            T != String &&\n            reqOpt.responseType == ResponseType.json) {\n          data = null;\n        }\n        ret.data = data;\n      } else {\n        responseBody.close();\n      }\n      checkCancelled(cancelToken);\n      if (statusOk) {\n        return ret;\n      } else {\n        throw DioException.badResponse(\n          statusCode: responseBody.statusCode,\n          requestOptions: reqOpt,\n          response: ret,\n        );\n      }\n    } catch (e) {\n      throw assureDioException(e, reqOpt);\n    }\n  }\n\n  bool _isValidToken(String token) {\n    _checkNotNullable(token, 'token');\n    // from https://www.rfc-editor.org/rfc/rfc2616#page-15\n    //\n    // CTL            = <any US-ASCII control character\n    //                  (octets 0 - 31) and DEL (127)>\n    // separators     = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n    //                | \",\" | \";\" | \":\" | \"\\\" | <\">\n    //                | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n    //                | \"{\" | \"}\" | SP | HT\n    // token          = 1*<any CHAR except CTLs or separators>\n    const String validChars = r'                                '\n        r\" ! #$%&'  *+ -. 0123456789      \"\n        r' ABCDEFGHIJKLMNOPQRSTUVWXYZ   ^_'\n        r'`abcdefghijklmnopqrstuvwxyz | ~ ';\n    for (final int codeUnit in token.codeUnits) {\n      if (codeUnit >= validChars.length ||\n          validChars.codeUnitAt(codeUnit) == 0x20) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  Future<Stream<Uint8List>?> _transformData(RequestOptions options) async {\n    if (!_isValidToken(options.method)) {\n      throw ArgumentError.value(options.method, 'method');\n    }\n    final data = options.data;\n    if (data != null) {\n      final Stream<List<int>> stream;\n      // Handle the FormData.\n      int? length;\n      if (data is Stream) {\n        if (data is! Stream<List<int>>) {\n          throw ArgumentError.value(\n            data.runtimeType,\n            'data',\n            'Stream type must be `Stream<List<int>>`',\n          );\n        }\n        stream = data;\n        options.headers.keys.any((String key) {\n          if (key.toLowerCase() == Headers.contentLengthHeader) {\n            length = int.parse(options.headers[key].toString());\n            return true;\n          }\n          return false;\n        });\n      } else if (data is FormData) {\n        options.headers[Headers.contentTypeHeader] =\n            '${Headers.multipartFormDataContentType}; '\n            'boundary=${data.boundary}';\n        stream = data.finalize();\n        length = data.length;\n        options.headers[Headers.contentLengthHeader] = length.toString();\n      } else {\n        final List<int> bytes;\n        if (data is Uint8List) {\n          // Handle binary data which does not need to be transformed.\n          bytes = data;\n        } else {\n          // Call the request transformer.\n          final transformed = await transformer.transformRequest(options);\n          if (options.requestEncoder != null) {\n            final encoded = options.requestEncoder!(transformed, options);\n\n            if (encoded is Future) {\n              bytes = await encoded;\n            } else {\n              bytes = encoded;\n            }\n          } else {\n            // Converts the data to UTF-8 by default.\n            bytes = utf8.encode(transformed);\n          }\n        }\n\n        // Allocate send progress.\n        length = bytes.length;\n        options.headers[Headers.contentLengthHeader] = length.toString();\n\n        final group = <List<int>>[];\n        const size = 1024;\n        final groupCount = (bytes.length / size).ceil();\n        for (int i = 0; i < groupCount; ++i) {\n          final start = i * size;\n          group.add(bytes.sublist(start, math.min(start + size, bytes.length)));\n        }\n        stream = Stream.fromIterable(group);\n      }\n      return addProgress(stream, length, options);\n    }\n    return null;\n  }\n\n  // If the request has been cancelled, stop the request and throw error.\n  @internal\n  static void checkCancelled(CancelToken? cancelToken) {\n    final error = cancelToken?.cancelError;\n    if (error != null) {\n      throw error;\n    }\n  }\n\n  @internal\n  static Future<T> listenCancelForAsyncTask<T>(\n    CancelToken? cancelToken,\n    Future<T> future,\n  ) {\n    if (cancelToken == null) {\n      return future;\n    }\n    return Future.any([future, cancelToken.whenCancel.then((e) => throw e)]);\n  }\n\n  @internal\n  static Options checkOptions(String method, Options? options) {\n    options ??= Options();\n    options.method = method;\n    return options;\n  }\n\n  @internal\n  static DioException assureDioException(\n    Object error,\n    RequestOptions requestOptions,\n  ) {\n    if (error is DioException) {\n      return error;\n    }\n    return DioException(\n      requestOptions: requestOptions,\n      error: error,\n    );\n  }\n\n  @internal\n  static Response<T> assureResponse<T>(\n    Object response,\n    RequestOptions requestOptions,\n  ) {\n    if (response is! Response) {\n      return Response<T>(\n        data: response as T,\n        requestOptions: requestOptions,\n      );\n    } else if (response is! Response<T>) {\n      final T? data = response.data as T?;\n      final Headers headers;\n      if (data is ResponseBody) {\n        headers = Headers.fromMap(\n          data.headers,\n          preserveHeaderCase: requestOptions.preserveHeaderCase,\n        );\n      } else {\n        headers = response.headers;\n      }\n      return Response<T>(\n        data: data,\n        headers: headers,\n        requestOptions: response.requestOptions,\n        statusCode: response.statusCode,\n        isRedirect: response.isRedirect,\n        redirects: response.redirects,\n        statusMessage: response.statusMessage,\n        extra: response.extra,\n      );\n    }\n    return response;\n  }\n\n  @override\n  Dio clone({\n    BaseOptions? options,\n    Interceptors? interceptors,\n    HttpClientAdapter? httpClientAdapter,\n    Transformer? transformer,\n  }) {\n    final dio = Dio(options ?? this.options);\n    dio.interceptors.removeImplyContentTypeInterceptor();\n    dio.interceptors.addAll(interceptors ?? this.interceptors);\n    dio.httpClientAdapter = httpClientAdapter ?? this.httpClientAdapter;\n    dio.transformer = transformer ?? this.transformer;\n    return dio;\n  }\n}\n\n/// A null-check function for function parameters in Null Safety enabled code.\n///\n/// Because Dart does not have full null safety until all legacy code has been\n/// removed from a program, a non-nullable parameter can still end up with a\n/// `null` value. This function can be used to guard those functions against\n/// null arguments. It throws a [TypeError] because we are really seeing\n/// the failure to assign `null` to a non-nullable type.\n///\n/// See http://dartbug.com/40614 for context.\nT _checkNotNullable<T extends Object>(T value, String name) {\n  if ((value as dynamic) == null) {\n    throw NotNullableError<T>(name);\n  }\n  return value;\n}\n\n/// A [TypeError] thrown by [_checkNotNullable].\nclass NotNullableError<T> extends Error implements TypeError {\n  NotNullableError(this._name);\n\n  final String _name;\n\n  @override\n  String toString() => \"Null is not a valid value for '$_name' of type '$T'\";\n}\n"
  },
  {
    "path": "dio/lib/src/form_data.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:math' as math;\nimport 'dart:typed_data' show Uint8List;\n\nimport 'multipart_file.dart';\nimport 'options.dart';\nimport 'utils.dart';\n\nconst _boundaryName = '--dio-boundary';\nconst _rn = '\\r\\n';\nfinal _rnU8 = Uint8List.fromList([13, 10]);\n\nconst _secureRandomSeedBound = 4294967296;\nfinal _random = math.Random();\n\nString get _nextRandomId =>\n    _random.nextInt(_secureRandomSeedBound).toString().padLeft(10, '0');\n\n/// A class to create readable \"multipart/form-data\" streams.\n/// It can be used to submit forms and file uploads to http server.\nclass FormData {\n  FormData({\n    this.boundaryName = _boundaryName,\n    this.camelCaseContentDisposition = false,\n  }) {\n    _init();\n  }\n\n  /// Create [FormData] from a [Map].\n  FormData.fromMap(\n    Map<String, dynamic> map, [\n    ListFormat listFormat = ListFormat.multi,\n    this.camelCaseContentDisposition = false,\n    this.boundaryName = _boundaryName,\n  ]) {\n    _init(fromMap: map, listFormat: listFormat);\n  }\n\n  /// Provides the boundary name which will be used to construct boundaries\n  /// in the [FormData] with additional prefix and suffix.\n  final String boundaryName;\n\n  /// Whether the 'content-disposition' header can be 'Content-Disposition'.\n  final bool camelCaseContentDisposition;\n\n  void _init({\n    Map<String, dynamic>? fromMap,\n    ListFormat listFormat = ListFormat.multi,\n  }) {\n    // Get an unique boundary for the instance.\n    _boundary = '$boundaryName-$_nextRandomId';\n    if (fromMap != null) {\n      // Use [encodeMap] to recursively add fields and files.\n      // TODO(Alex): Write a proper/elegant implementation.\n      encodeMap(\n        fromMap,\n        (key, value) {\n          if (value is MultipartFile) {\n            files.add(MapEntry(key, value));\n          } else {\n            fields.add(MapEntry(key, value?.toString() ?? ''));\n          }\n          return null;\n        },\n        listFormat: listFormat,\n        encode: false,\n      );\n    }\n  }\n\n  /// The Content-Type field for multipart entities requires one parameter,\n  /// \"boundary\", which is used to specify the encapsulation boundary.\n  ///\n  /// See also: https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html\n  String get boundary => _boundary;\n  late String _boundary;\n\n  /// The form fields to send for this request.\n  final fields = <MapEntry<String, String>>[];\n\n  /// The [files].\n  final files = <MapEntry<String, MultipartFile>>[];\n\n  /// Whether [finalize] has been called.\n  bool get isFinalized => _isFinalized;\n  bool _isFinalized = false;\n\n  String get _contentDispositionKey => camelCaseContentDisposition\n      ? 'Content-Disposition'\n      : 'content-disposition';\n\n  /// Returns the header string for a field.\n  String _headerForField(String name, String value) {\n    return '$_contentDispositionKey'\n        ': form-data; name=\"${_browserEncode(name)}\"'\n        '$_rn$_rn';\n  }\n\n  /// Returns the header string for a file. The return value is guaranteed to\n  /// contain only ASCII characters.\n  String _headerForFile(MapEntry<String, MultipartFile> entry) {\n    final file = entry.value;\n    String header = '$_contentDispositionKey'\n        ': form-data; name=\"${_browserEncode(entry.key)}\"';\n    if (file.filename != null) {\n      header = '$header; filename=\"${_browserEncode(file.filename)}\"';\n    }\n    header = '$header$_rn'\n        'content-type: ${file.contentType}';\n    if (file.headers != null) {\n      // append additional headers\n      file.headers!.forEach((key, values) {\n        for (final value in values) {\n          header = '$header$_rn'\n              '$key: $value';\n        }\n      });\n    }\n    return '$header$_rn$_rn';\n  }\n\n  /// Encode [value] that follows\n  /// [RFC 2388](http://tools.ietf.org/html/rfc2388).\n  ///\n  /// The standard mandates some complex encodings for field and file names,\n  /// but in practice user agents seem not to follow this at all.\n  /// Instead, they URL-encode `\\r`, `\\n`, and `\\r\\n` as `\\r\\n`;\n  /// URL-encode `\"`; and do nothing else\n  /// (even for `%` or non-ASCII characters).\n  /// Here we follow their behavior.\n  String? _browserEncode(String? value) {\n    return value\n        ?.replaceAll(RegExp(r'\\r\\n|\\r|\\n'), '%0D%0A')\n        .replaceAll('\"', '%22');\n  }\n\n  /// The total length of the request body, in bytes. This is calculated from\n  /// [fields] and [files] and cannot be set manually.\n  int get length {\n    int length = 0;\n    for (final entry in fields) {\n      length += '--'.length +\n          _boundary.length +\n          _rn.length +\n          utf8.encode(_headerForField(entry.key, entry.value)).length +\n          utf8.encode(entry.value).length +\n          _rn.length;\n    }\n\n    for (final file in files) {\n      length += '--'.length +\n          _boundary.length +\n          _rn.length +\n          utf8.encode(_headerForFile(file)).length +\n          file.value.length +\n          _rn.length;\n    }\n\n    return length + '--'.length + _boundary.length + '--$_rn'.length;\n  }\n\n  /// Commits all fields and files into a stream for the final sending.\n  Stream<Uint8List> finalize() {\n    if (isFinalized) {\n      throw StateError(\n        'The FormData has already been finalized. '\n        'This typically means you are using '\n        'the same FormData in repeated requests.',\n      );\n    }\n    _isFinalized = true;\n\n    final controller = StreamController<Uint8List>(sync: false);\n\n    void writeLine() => controller.add(_rnU8); // \\r\\n\n    void writeUtf8(String s) =>\n        controller.add(_effectiveU8Encoding(utf8.encode(s)));\n\n    for (final entry in fields) {\n      writeUtf8('--$boundary$_rn');\n      writeUtf8(_headerForField(entry.key, entry.value));\n      writeUtf8(entry.value);\n      writeLine();\n    }\n\n    Future<void>(() async {\n      for (final file in files) {\n        writeUtf8('--$boundary$_rn');\n        writeUtf8(_headerForFile(file));\n        await writeStreamToSink<Uint8List>(file.value.finalize(), controller);\n        writeLine();\n      }\n    }).then((_) {\n      writeUtf8('--$boundary--$_rn');\n    }).whenComplete(() {\n      controller.close();\n    });\n\n    return controller.stream;\n  }\n\n  /// Transform the entire FormData contents as a list of bytes asynchronously.\n  Future<Uint8List> readAsBytes() {\n    return Future.sync(\n      () => finalize().reduce((a, b) => Uint8List.fromList([...a, ...b])),\n    );\n  }\n\n  // Convenience method to clone finalized FormData when retrying requests.\n  FormData clone() {\n    final clone = FormData();\n    clone._boundary = _boundary;\n    clone.fields.addAll(fields);\n    for (final file in files) {\n      clone.files.add(MapEntry(file.key, file.value.clone()));\n    }\n    return clone;\n  }\n}\n\nUint8List _effectiveU8Encoding(List<int> encoded) {\n  return encoded is Uint8List ? encoded : Uint8List.fromList(encoded);\n}\n"
  },
  {
    "path": "dio/lib/src/headers.dart",
    "content": "import 'package:http_parser/http_parser.dart';\n\nimport 'utils.dart';\n\n/// The signature that iterates header fields.\ntypedef HeaderForEachCallback = void Function(String name, List<String> values);\n\n/// The headers class for requests and responses.\nclass Headers {\n  Headers({\n    this.preserveHeaderCase = false,\n  }) : _map = caseInsensitiveKeyMap<List<String>>();\n\n  /// Create the [Headers] from a [Map] instance.\n  Headers.fromMap(\n    Map<String, List<String>> map, {\n    this.preserveHeaderCase = false,\n  }) : _map = caseInsensitiveKeyMap<List<String>>(\n          map.map((k, v) => MapEntry(k.trim(), v)),\n        );\n\n  static const acceptHeader = 'accept';\n  static const contentEncodingHeader = 'content-encoding';\n  static const contentLengthHeader = 'content-length';\n  static const contentTypeHeader = 'content-type';\n  static const wwwAuthenticateHeader = 'www-authenticate';\n\n  static const jsonContentType = 'application/json';\n  static const formUrlEncodedContentType = 'application/x-www-form-urlencoded';\n  static const textPlainContentType = 'text/plain';\n  static const multipartFormDataContentType = 'multipart/form-data';\n\n  static final jsonMimeType = MediaType.parse(jsonContentType);\n\n  /// Whether the header key should be case-sensitive.\n  ///\n  /// Defaults to false.\n  final bool preserveHeaderCase;\n\n  final Map<String, List<String>> _map;\n\n  Map<String, List<String>> get map => _map;\n\n  /// Returns the list of values for the header named [name]. If there\n  /// is no header with the provided name, [:null:] will be returned.\n  List<String>? operator [](String name) {\n    return _map[name.trim()];\n  }\n\n  /// Convenience method for the value for a single valued header. If\n  /// there is no header with the provided name, [:null:] will be\n  /// returned. If the header has more than one value an exception is\n  /// thrown.\n  String? value(String name) {\n    final arr = this[name];\n    if (arr == null) {\n      return null;\n    }\n    if (arr.length == 1) {\n      return arr.first;\n    }\n    throw Exception(\n      '\"$name\" header has more than one value, please use Headers[name]',\n    );\n  }\n\n  /// Adds a header value. The header named [name] will have the value\n  /// [value] added to its list of values.\n  void add(String name, String value) {\n    final arr = this[name];\n    if (arr == null) {\n      return set(name, value);\n    }\n    arr.add(value);\n  }\n\n  /// Sets a header. The header named [name] will have all its values\n  /// cleared before the value [value] is added as its value.\n  void set(String name, dynamic value) {\n    if (value == null) {\n      return;\n    }\n    name = name.trim();\n    if (value is List) {\n      _map[name] = value.map<String>((e) => '$e').toList();\n    } else {\n      _map[name] = ['$value'.trim()];\n    }\n  }\n\n  /// Removes a specific value for a header name.\n  void remove(String name, String value) {\n    final arr = this[name];\n    if (arr == null) {\n      return;\n    }\n    arr.removeWhere((v) => v == value);\n  }\n\n  /// Removes all values for the specified header name.\n  void removeAll(String name) {\n    _map.remove(name);\n  }\n\n  /// Clearing all fields in the headers.\n  void clear() {\n    _map.clear();\n  }\n\n  /// Whether the headers has no fields.\n  bool get isEmpty => _map.isEmpty;\n\n  /// Enumerates the headers, applying the function [f] to each\n  /// header. The header name passed in [:name:] will be all lower\n  /// case.\n  void forEach(HeaderForEachCallback f) {\n    for (final key in _map.keys) {\n      f(key, this[key]!);\n    }\n  }\n\n  @override\n  String toString() {\n    final stringBuffer = StringBuffer();\n    _map.forEach((key, value) {\n      for (final e in value) {\n        stringBuffer.writeln('$key: $e');\n      }\n    });\n    return stringBuffer.toString();\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/interceptor.dart",
    "content": "part of 'dio_mixin.dart';\n\n/// The result type after handled by the interceptor.\nenum InterceptorResultType {\n  next,\n  resolve,\n  resolveCallFollowing,\n  reject,\n  rejectCallFollowing,\n}\n\n/// Used to pass state between interceptors.\nclass InterceptorState<T> {\n  const InterceptorState(this.data, [this.type = InterceptorResultType.next]);\n\n  final T data;\n  final InterceptorResultType type;\n\n  @override\n  String toString() => 'InterceptorState<$T>(type: $type, data: $data)';\n}\n\nabstract class _BaseHandler {\n  final _completer = Completer<InterceptorState>();\n  void Function()? _processNextInQueue;\n\n  @protected\n  Future<InterceptorState> get future => _completer.future;\n\n  bool get isCompleted => _completer.isCompleted;\n\n  void _throwIfCompleted() {\n    if (_completer.isCompleted) {\n      throw StateError(\n        'The `handler` has already been called, '\n        'make sure each handler gets called only once.',\n      );\n    }\n  }\n}\n\n/// The handler for interceptors to handle before the request has been sent.\nclass RequestInterceptorHandler extends _BaseHandler {\n  /// Deliver the [requestOptions] to the next interceptor.\n  ///\n  /// Typically, the method should be called once interceptors done\n  /// manipulating the [requestOptions].\n  void next(RequestOptions requestOptions) {\n    _throwIfCompleted();\n    _completer.complete(InterceptorState<RequestOptions>(requestOptions));\n    _processNextInQueue?.call();\n  }\n\n  /// Completes the request by resolves the [response] as the result.\n  ///\n  /// Invoking the method will make the rest of interceptors in the queue\n  /// skipped to handle the request,\n  /// unless [callFollowingResponseInterceptor] is true\n  /// which delivers [InterceptorResultType.resolveCallFollowing]\n  /// to the [InterceptorState].\n  void resolve(\n    Response response, [\n    bool callFollowingResponseInterceptor = false,\n  ]) {\n    _throwIfCompleted();\n    _completer.complete(\n      InterceptorState<Response>(\n        response,\n        callFollowingResponseInterceptor\n            ? InterceptorResultType.resolveCallFollowing\n            : InterceptorResultType.resolve,\n      ),\n    );\n    _processNextInQueue?.call();\n  }\n\n  /// Completes the request by reject with the [error] as the result.\n  ///\n  /// Invoking the method will make the rest of interceptors in the queue\n  /// skipped to handle the request,\n  /// unless [callFollowingErrorInterceptor] is true\n  /// which delivers [InterceptorResultType.rejectCallFollowing]\n  /// to the [InterceptorState].\n  void reject(\n    DioException error, [\n    bool callFollowingErrorInterceptor = false,\n  ]) {\n    _throwIfCompleted();\n    _completer.completeError(\n      InterceptorState<DioException>(\n        error,\n        callFollowingErrorInterceptor\n            ? InterceptorResultType.rejectCallFollowing\n            : InterceptorResultType.reject,\n      ),\n      error.stackTrace,\n    );\n    _processNextInQueue?.call();\n  }\n}\n\n/// The handler for interceptors to handle after respond.\nclass ResponseInterceptorHandler extends _BaseHandler {\n  /// Deliver the [response] to the next interceptor.\n  ///\n  /// Typically, the method should be called once interceptors done\n  /// manipulating the [response].\n  void next(Response response) {\n    _throwIfCompleted();\n    _completer.complete(\n      InterceptorState<Response>(response),\n    );\n    _processNextInQueue?.call();\n  }\n\n  /// Completes the request by resolves the [response] as the result.\n  void resolve(Response response) {\n    _throwIfCompleted();\n    _completer.complete(\n      InterceptorState<Response>(\n        response,\n        InterceptorResultType.resolve,\n      ),\n    );\n    _processNextInQueue?.call();\n  }\n\n  /// Completes the request by reject with the [error] as the result.\n  ///\n  /// Invoking the method will make the rest of interceptors in the queue\n  /// skipped to handle the request,\n  /// unless [callFollowingErrorInterceptor] is true\n  /// which delivers [InterceptorResultType.rejectCallFollowing]\n  /// to the [InterceptorState].\n  void reject(\n    DioException error, [\n    bool callFollowingErrorInterceptor = false,\n  ]) {\n    _throwIfCompleted();\n    _completer.completeError(\n      InterceptorState<DioException>(\n        error,\n        callFollowingErrorInterceptor\n            ? InterceptorResultType.rejectCallFollowing\n            : InterceptorResultType.reject,\n      ),\n      error.stackTrace,\n    );\n    _processNextInQueue?.call();\n  }\n}\n\n/// The handler for interceptors to handle error occurred during the request.\nclass ErrorInterceptorHandler extends _BaseHandler {\n  /// Deliver the [error] to the next interceptor.\n  ///\n  /// Typically, the method should be called once interceptors done\n  /// manipulating the [error].\n  void next(DioException error) {\n    _throwIfCompleted();\n    _completer.completeError(\n      InterceptorState<DioException>(error),\n      error.stackTrace,\n    );\n    _processNextInQueue?.call();\n  }\n\n  /// Completes the request by resolves the [response] as the result.\n  void resolve(Response response) {\n    _throwIfCompleted();\n    _completer.complete(\n      InterceptorState<Response>(\n        response,\n        InterceptorResultType.resolve,\n      ),\n    );\n    _processNextInQueue?.call();\n  }\n\n  /// Completes the request by reject with the [error] as the result.\n  void reject(DioException error) {\n    _throwIfCompleted();\n    _completer.completeError(\n      InterceptorState<DioException>(error, InterceptorResultType.reject),\n      error.stackTrace,\n    );\n    _processNextInQueue?.call();\n  }\n}\n\n/// [Interceptor] helps to deal with [RequestOptions], [Response],\n/// and [DioException] during the lifecycle of a request\n/// before it reaches users.\n///\n/// Interceptors are called once per request and response,\n/// that means redirects aren't triggering interceptors.\n///\n/// See also:\n///  - [InterceptorsWrapper], the helper class to create [Interceptor]s.\n///  - [QueuedInterceptor], resolves interceptors as a task in the queue.\n///  - [QueuedInterceptorsWrapper],\n///    the helper class to create [QueuedInterceptor]s.\nclass Interceptor {\n  /// The constructor only helps sub-classes to inherit from.\n  /// Do not use it directly.\n  const Interceptor();\n\n  /// Called when the request is about to be sent.\n  void onRequest(\n    RequestOptions options,\n    RequestInterceptorHandler handler,\n  ) {\n    handler.next(options);\n  }\n\n  /// Called when the response is about to be resolved.\n  void onResponse(\n    Response response,\n    ResponseInterceptorHandler handler,\n  ) {\n    handler.next(response);\n  }\n\n  /// Called when an exception was occurred during the request.\n  void onError(\n    DioException err,\n    ErrorInterceptorHandler handler,\n  ) {\n    handler.next(err);\n  }\n}\n\n/// The signature of [Interceptor.onRequest].\ntypedef InterceptorSendCallback = void Function(\n  RequestOptions options,\n  RequestInterceptorHandler handler,\n);\n\n/// The signature of [Interceptor.onResponse].\ntypedef InterceptorSuccessCallback = void Function(\n  Response<dynamic> response,\n  ResponseInterceptorHandler handler,\n);\n\n/// The signature of [Interceptor.onError].\ntypedef InterceptorErrorCallback = void Function(\n  DioException error,\n  ErrorInterceptorHandler handler,\n);\n\nmixin _InterceptorWrapperMixin on Interceptor {\n  InterceptorSendCallback? _onRequest;\n  InterceptorSuccessCallback? _onResponse;\n  InterceptorErrorCallback? _onError;\n\n  @override\n  void onRequest(\n    RequestOptions options,\n    RequestInterceptorHandler handler,\n  ) {\n    if (_onRequest != null) {\n      _onRequest!(options, handler);\n    } else {\n      handler.next(options);\n    }\n  }\n\n  @override\n  void onResponse(\n    Response<dynamic> response,\n    ResponseInterceptorHandler handler,\n  ) {\n    if (_onResponse != null) {\n      _onResponse!(response, handler);\n    } else {\n      handler.next(response);\n    }\n  }\n\n  @override\n  void onError(\n    DioException err,\n    ErrorInterceptorHandler handler,\n  ) {\n    if (_onError != null) {\n      _onError!(err, handler);\n    } else {\n      handler.next(err);\n    }\n  }\n}\n\n/// A helper class to create interceptors in ease.\n///\n/// See also:\n///  - [QueuedInterceptorsWrapper], creates [QueuedInterceptor]s in ease.\nclass InterceptorsWrapper extends Interceptor with _InterceptorWrapperMixin {\n  InterceptorsWrapper({\n    InterceptorSendCallback? onRequest,\n    InterceptorSuccessCallback? onResponse,\n    InterceptorErrorCallback? onError,\n  })  : __onRequest = onRequest,\n        __onResponse = onResponse,\n        __onError = onError;\n\n  @override\n  InterceptorSendCallback? get _onRequest => __onRequest;\n  final InterceptorSendCallback? __onRequest;\n\n  @override\n  InterceptorSuccessCallback? get _onResponse => __onResponse;\n  final InterceptorSuccessCallback? __onResponse;\n\n  @override\n  InterceptorErrorCallback? get _onError => __onError;\n  final InterceptorErrorCallback? __onError;\n}\n\n/// A Queue-Model list for [Interceptor]s.\n///\n/// Interceptors will be executed with FIFO.\nclass Interceptors extends ListMixin<Interceptor> {\n  Interceptors({\n    List<Interceptor> initialInterceptors = const <Interceptor>[],\n  }) {\n    addAll(initialInterceptors);\n  }\n\n  /// Define a nullable list to be capable with growable elements.\n  final List<Interceptor?> _list = [const ImplyContentTypeInterceptor()];\n\n  @override\n  int get length => _list.length;\n\n  @override\n  set length(int newLength) {\n    _list.length = newLength;\n  }\n\n  @override\n  Interceptor operator [](int index) => _list[index]!;\n\n  @override\n  void operator []=(int index, Interceptor value) {\n    if (_list.length == index) {\n      _list.add(value);\n    } else {\n      _list[index] = value;\n    }\n  }\n\n  /// The default [ImplyContentTypeInterceptor] will be removed only if\n  /// [keepImplyContentTypeInterceptor] is false.\n  @override\n  void clear({bool keepImplyContentTypeInterceptor = true}) {\n    if (keepImplyContentTypeInterceptor) {\n      _list.removeWhere((e) => e is! ImplyContentTypeInterceptor);\n    } else {\n      super.clear();\n    }\n  }\n\n  /// Remove the default imply content type interceptor.\n  void removeImplyContentTypeInterceptor() {\n    _list.removeWhere((e) => e is ImplyContentTypeInterceptor);\n  }\n}\n\nclass _InterceptorParams<T, V extends _BaseHandler> {\n  const _InterceptorParams(this.data, this.handler);\n\n  final T data;\n  final V handler;\n}\n\nclass _TaskQueue<T, V extends _BaseHandler> {\n  final queue = Queue<_InterceptorParams<T, V>>();\n  bool processing = false;\n}\n\n/// [Interceptor] in queue.\n///\n/// `onRequest`, `onResponse`, and `onError` are processed in separate queues\n/// when running concurrent requests. These queues run in parallel,\n/// new requests can be initiated before previous have been completed.\nclass QueuedInterceptor extends Interceptor {\n  final _requestQueue = _TaskQueue<RequestOptions, RequestInterceptorHandler>();\n  final _responseQueue = _TaskQueue<Response, ResponseInterceptorHandler>();\n  final _errorQueue = _TaskQueue<DioException, ErrorInterceptorHandler>();\n\n  void _handleRequest(\n    RequestOptions options,\n    RequestInterceptorHandler handler,\n  ) {\n    _handleQueue(\n      _requestQueue,\n      options,\n      handler,\n      onRequest,\n      (e, handler) {\n        final error = DioMixin.assureDioException(e, options);\n        handler.reject(error, true);\n      },\n    );\n  }\n\n  void _handleResponse(\n    Response<dynamic> response,\n    ResponseInterceptorHandler handler,\n  ) {\n    _handleQueue(\n      _responseQueue,\n      response,\n      handler,\n      onResponse,\n      (e, handler) {\n        final error = DioMixin.assureDioException(e, response.requestOptions);\n        handler.reject(error, true);\n      },\n    );\n  }\n\n  void _handleError(\n    DioException error,\n    ErrorInterceptorHandler handler,\n  ) {\n    _handleQueue(\n      _errorQueue,\n      error,\n      handler,\n      onError,\n      (e, handler) {\n        final err = DioMixin.assureDioException(e, error.requestOptions);\n        handler.next(err);\n      },\n    );\n  }\n\n  void _handleQueue<T, V extends _BaseHandler>(\n    _TaskQueue<T, V> taskQueue,\n    T data,\n    V handler,\n    void Function(T, V) callback,\n    void Function(Object, V) onError,\n  ) {\n    final task = _InterceptorParams<T, V>(data, handler);\n    task.handler._processNextInQueue = () {\n      if (taskQueue.queue.isNotEmpty) {\n        final next = taskQueue.queue.removeFirst();\n        assert(next.handler._processNextInQueue != null);\n        callback(next.data, next.handler);\n      } else {\n        taskQueue.processing = false;\n      }\n    };\n    taskQueue.queue.add(task);\n    if (!taskQueue.processing) {\n      taskQueue.processing = true;\n      final task = taskQueue.queue.removeFirst();\n      try {\n        callback(task.data, task.handler);\n      } catch (e) {\n        // Handle synchronous exceptions thrown by interceptor callbacks.\n        // Without this, the request would hang indefinitely because the\n        // handler's completer would never be completed.\n        onError(e, task.handler);\n      }\n    }\n  }\n}\n\n/// A helper class to create [QueuedInterceptor] in ease.\n///\n/// See also:\n///  - [InterceptorsWrapper], creates [Interceptor]s in ease.\nclass QueuedInterceptorsWrapper extends QueuedInterceptor\n    with _InterceptorWrapperMixin {\n  QueuedInterceptorsWrapper({\n    InterceptorSendCallback? onRequest,\n    InterceptorSuccessCallback? onResponse,\n    InterceptorErrorCallback? onError,\n  })  : __onRequest = onRequest,\n        __onResponse = onResponse,\n        __onError = onError;\n\n  @override\n  InterceptorSendCallback? get _onRequest => __onRequest;\n  final InterceptorSendCallback? __onRequest;\n\n  @override\n  InterceptorSuccessCallback? get _onResponse => __onResponse;\n  final InterceptorSuccessCallback? __onResponse;\n\n  @override\n  InterceptorErrorCallback? get _onError => __onError;\n  final InterceptorErrorCallback? __onError;\n}\n"
  },
  {
    "path": "dio/lib/src/interceptors/imply_content_type.dart",
    "content": "import '../dio_mixin.dart';\nimport '../form_data.dart';\nimport '../headers.dart';\nimport '../options.dart';\nimport '../utils.dart';\n\n/// {@template dio.interceptors.ImplyContentTypeInterceptor}\n/// The default `content-type` for requests will be implied by the\n/// [ImplyContentTypeInterceptor] according to the type of the request payload.\n/// The interceptor can be removed by\n/// [Interceptors.removeImplyContentTypeInterceptor].\n/// {@endtemplate}\nclass ImplyContentTypeInterceptor extends Interceptor {\n  const ImplyContentTypeInterceptor();\n\n  @override\n  void onRequest(\n    RequestOptions options,\n    RequestInterceptorHandler handler,\n  ) {\n    final Object? data = options.data;\n    if (data != null && options.contentType == null) {\n      final String? contentType;\n      if (data is FormData) {\n        contentType = Headers.multipartFormDataContentType;\n      } else if (data is List<Map> || data is Map || data is String) {\n        contentType = Headers.jsonContentType;\n      } else {\n        warningLog(\n          '${data.runtimeType} cannot be used '\n          'to imply a default content-type, '\n          'please set a proper content-type in the request.',\n          StackTrace.current,\n        );\n        contentType = null;\n      }\n      options.contentType = contentType;\n    }\n    handler.next(options);\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/interceptors/log.dart",
    "content": "import '../dio_exception.dart';\nimport '../dio_mixin.dart';\nimport '../options.dart';\nimport '../response.dart';\n\n/// [LogInterceptor] is used to print logs during network requests.\n/// It should be the last interceptor added,\n/// otherwise modifications by following interceptors will not be logged.\n/// This is because the execution of interceptors is in the order of addition.\n///\n/// **Note**\n/// When used in Flutter, make sure to use `debugPrint` to print logs.\n/// Alternatively `dart:developer`'s `log` function can also be used.\n///\n/// ```dart\n/// dio.interceptors.add(\n///   LogInterceptor(\n///     logPrint: (o) => debugPrint(o.toString()),\n///   ),\n/// );\n/// ```\nclass LogInterceptor extends Interceptor {\n  LogInterceptor({\n    this.request = true,\n    this.requestUrl = true,\n    this.requestHeader = true,\n    this.requestBody = false,\n    this.responseUrl = true,\n    this.responseHeader = true,\n    this.responseBody = false,\n    this.error = true,\n    this.logPrint = _debugPrint,\n  });\n\n  /// Print request [RequestOptions]\n  bool request;\n\n  /// Print request URL [RequestOptions.uri]\n  bool requestUrl;\n\n  /// Print request headers [RequestOptions.headers]\n  bool requestHeader;\n\n  /// Print request data [RequestOptions.data]\n  bool requestBody;\n\n  /// Print [Response.realUri]\n  bool responseUrl;\n\n  /// Print [Response.headers]\n  bool responseHeader;\n\n  /// Print [Response.data]\n  bool responseBody;\n\n  /// Print error message\n  bool error;\n\n  /// Log printer; defaults print log to console.\n  /// In flutter, you'd better use debugPrint.\n  /// you can also write log in a file, for example:\n  /// ```dart\n  ///  final file=File(\"./log.txt\");\n  ///  final sink=file.openWrite();\n  ///  dio.interceptors.add(LogInterceptor(logPrint: sink.writeln));\n  ///  ...\n  ///  await sink.close();\n  /// ```\n  void Function(Object object) logPrint;\n\n  @override\n  void onRequest(\n    RequestOptions options,\n    RequestInterceptorHandler handler,\n  ) {\n    _printRequest(options);\n    handler.next(options);\n  }\n\n  @override\n  void onResponse(Response response, ResponseInterceptorHandler handler) {\n    _printResponse(response);\n    handler.next(response);\n  }\n\n  @override\n  void onError(DioException err, ErrorInterceptorHandler handler) {\n    if (error) {\n      logPrint('*** DioException ***:');\n      logPrint('uri: ${err.requestOptions.uri}');\n      logPrint('$err');\n      if (err.response != null) {\n        _printResponse(err.response!);\n      }\n      logPrint('');\n    }\n\n    handler.next(err);\n  }\n\n  void _printRequest(RequestOptions options) {\n    if (!request && !requestUrl && !requestHeader && !requestBody) {\n      return;\n    }\n\n    if (requestUrl) {\n      logPrint('*** Request ***');\n      _printKV('uri', options.uri);\n    }\n\n    if (request) {\n      _printKV('method', options.method);\n      _printKV('responseType', options.responseType.toString());\n      _printKV('followRedirects', options.followRedirects);\n      _printKV('persistentConnection', options.persistentConnection);\n      _printKV('connectTimeout', options.connectTimeout);\n      _printKV('sendTimeout', options.sendTimeout);\n      _printKV('receiveTimeout', options.receiveTimeout);\n      _printKV(\n        'receiveDataWhenStatusError',\n        options.receiveDataWhenStatusError,\n      );\n      _printKV('extra', options.extra);\n    }\n\n    if (requestHeader) {\n      logPrint('headers:');\n      options.headers.forEach((key, v) => _printKV(' $key', v));\n    }\n\n    if (requestBody) {\n      logPrint('data:');\n      _printAll(options.data);\n    }\n\n    logPrint('');\n  }\n\n  void _printResponse(Response response) {\n    if (!responseUrl && !responseHeader && !responseBody) {\n      return;\n    }\n\n    if (responseUrl) {\n      logPrint('*** Response ***');\n      _printKV('uri', response.realUri);\n    }\n\n    if (responseHeader) {\n      _printKV('statusCode', response.statusCode);\n      if (response.statusMessage != null) {\n        _printKV('statusMessage', response.statusMessage);\n      }\n      if (response.redirects.isNotEmpty) {\n        _printKV('redirects', response.redirects);\n      }\n\n      logPrint('headers:');\n      response.headers.forEach((key, v) => _printKV(' $key', v.join('\\r\\n\\t')));\n    }\n\n    if (responseBody) {\n      logPrint('Response Text:');\n      _printAll(response.toString());\n    }\n\n    logPrint('');\n  }\n\n  void _printKV(String key, Object? v) {\n    logPrint('$key: $v');\n  }\n\n  void _printAll(Object? msg) {\n    msg.toString().split('\\n').forEach(logPrint);\n  }\n}\n\nvoid _debugPrint(Object? object) {\n  assert(() {\n    print(object);\n    return true;\n  }());\n}\n"
  },
  {
    "path": "dio/lib/src/multipart_file/browser_multipart_file.dart",
    "content": "export 'package:dio_web_adapter/dio_web_adapter.dart'\n    show multipartFileFromPath, multipartFileFromPathSync;\n"
  },
  {
    "path": "dio/lib/src/multipart_file/io_multipart_file.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:path/path.dart' as p;\n\nimport '../multipart_file.dart' show MultipartFile, DioMediaType;\n\nFuture<MultipartFile> multipartFileFromPath(\n  String filePath, {\n  String? filename,\n  DioMediaType? contentType,\n  final Map<String, List<String>>? headers,\n}) async {\n  filename ??= p.basename(filePath);\n  final file = File(filePath);\n  final length = await file.length();\n  return MultipartFile.fromStream(\n    () => _getStreamFromFilepath(file),\n    length,\n    filename: filename,\n    contentType: contentType,\n    headers: headers,\n  );\n}\n\nMultipartFile multipartFileFromPathSync(\n  String filePath, {\n  String? filename,\n  DioMediaType? contentType,\n  final Map<String, List<String>>? headers,\n}) {\n  filename ??= p.basename(filePath);\n  final file = File(filePath);\n  final length = file.lengthSync();\n  return MultipartFile.fromStream(\n    () => _getStreamFromFilepath(file),\n    length,\n    filename: filename,\n    contentType: contentType,\n    headers: headers,\n  );\n}\n\nStream<List<int>> _getStreamFromFilepath(File file) {\n  final stream = file.openRead();\n  return stream;\n}\n"
  },
  {
    "path": "dio/lib/src/multipart_file.dart",
    "content": "import 'dart:convert' show utf8;\nimport 'dart:typed_data' show Uint8List;\n\nimport 'package:http_parser/http_parser.dart' show MediaType;\nimport 'package:mime/mime.dart' show lookupMimeType;\n\nimport 'multipart_file/io_multipart_file.dart'\n    if (dart.library.js_interop) 'multipart_file/browser_multipart_file.dart'\n    if (dart.library.html) 'multipart_file/browser_multipart_file.dart';\nimport 'utils.dart';\n\n/// The type (alias) for specifying the content-type of the `MultipartFile`.\ntypedef DioMediaType = MediaType;\n\n/// An upload content that is a part of `MultipartRequest`.\n/// This doesn't need to correspond to a physical file.\nclass MultipartFile {\n  /// Creates a new [MultipartFile] from a chunked [Stream] of bytes. The length\n  /// of the file in bytes must be known in advance. If it's not, read the data\n  /// from the stream and use [MultipartFile.fromBytes] instead.\n  ///\n  /// [contentType] currently defaults to `application/octet-stream`,\n  /// but it may be inferred from [filename] in the future.\n  @Deprecated(\n    'MultipartFile() is not cloneable when the stream is consumed, '\n    'use MultipartFile.fromStream() instead.'\n    'This will be removed in 6.0.0',\n  )\n  MultipartFile(\n    Stream<List<int>> stream,\n    this.length, {\n    this.filename,\n    DioMediaType? contentType,\n    Map<String, List<String>>? headers,\n  })  : _dataBuilder = (() => stream),\n        headers = caseInsensitiveKeyMap(headers),\n        contentType = contentType ??\n            lookupMediaType(filename) ??\n            DioMediaType('application', 'octet-stream');\n\n  /// Creates a new [MultipartFile] from a creation method that creates\n  /// chunked [Stream] of bytes. The length of the file in bytes must be known\n  /// in advance. If it's not, read the data from the stream and use\n  /// [MultipartFile.fromBytes] instead.\n  ///\n  /// [contentType] currently defaults to `application/octet-stream`,\n  /// but it may be inferred from [filename] in the future.\n  MultipartFile.fromStream(\n    Stream<List<int>> Function() data,\n    this.length, {\n    this.filename,\n    DioMediaType? contentType,\n    Map<String, List<String>>? headers,\n  })  : _dataBuilder = data,\n        headers = caseInsensitiveKeyMap(headers),\n        contentType = contentType ??\n            lookupMediaType(filename) ??\n            DioMediaType('application', 'octet-stream');\n\n  /// Creates a new [MultipartFile] from a byte array.\n  ///\n  /// [contentType] currently defaults to `application/octet-stream`,\n  /// but it may be inferred from [filename] in the future.\n  factory MultipartFile.fromBytes(\n    List<int> value, {\n    String? filename,\n    DioMediaType? contentType,\n    final Map<String, List<String>>? headers,\n  }) {\n    return MultipartFile.fromStream(\n      () => Stream.fromIterable([value]),\n      value.length,\n      filename: filename,\n      contentType: contentType,\n      headers: headers,\n    );\n  }\n\n  /// Creates a new [MultipartFile] from a string.\n  ///\n  /// The encoding to use when translating [value] into bytes is taken from\n  /// [contentType] if it has a charset set. Otherwise, it defaults to UTF-8.\n  ///\n  /// [contentType] currently defaults to `text/plain; charset=utf-8`,\n  /// but it may be inferred from [filename] in the future.\n  factory MultipartFile.fromString(\n    String value, {\n    String? filename,\n    DioMediaType? contentType,\n    final Map<String, List<String>>? headers,\n  }) {\n    contentType ??= lookupMediaType(filename) ?? DioMediaType('text', 'plain');\n    final encoding = encodingForCharset(\n      contentType.parameters['charset'],\n      utf8,\n    );\n    contentType = contentType.change(parameters: {'charset': encoding.name});\n    return MultipartFile.fromBytes(\n      encoding.encode(value),\n      filename: filename,\n      contentType: contentType,\n      headers: headers,\n    );\n  }\n\n  /// The size of the file in bytes. This must be known in advance, even if this\n  /// file is created from a [ByteStream].\n  final int length;\n\n  /// The basename of the file. May be null.\n  final String? filename;\n\n  /// The additional headers the file has. May be null.\n  final Map<String, List<String>>? headers;\n\n  /// The content-type of the file. Defaults to `application/octet-stream`.\n  final DioMediaType? contentType;\n\n  /// The stream builder that will emit the file's contents for every call.\n  final Stream<List<int>> Function() _dataBuilder;\n\n  /// Whether [finalize] has been called.\n  bool get isFinalized => _isFinalized;\n\n  /// Creates a new [MultipartFile] from a path to a file on disk.\n  ///\n  /// [filename] defaults to the basename of [filePath]. [contentType] currently\n  /// defaults to `application/octet-stream`, but in the future may be inferred\n  /// from [filename].\n  ///\n  /// Throws an [UnsupportedError] if `dart:io` isn't supported in this\n  /// environment.\n  static Future<MultipartFile> fromFile(\n    String filePath, {\n    String? filename,\n    DioMediaType? contentType,\n    final Map<String, List<String>>? headers,\n  }) {\n    return multipartFileFromPath(\n      filePath,\n      filename: filename,\n      contentType: contentType,\n      headers: headers,\n    );\n  }\n\n  static MultipartFile fromFileSync(\n    String filePath, {\n    String? filename,\n    DioMediaType? contentType,\n    final Map<String, List<String>>? headers,\n  }) {\n    return multipartFileFromPathSync(\n      filePath,\n      filename: filename,\n      contentType: contentType,\n      headers: headers,\n    );\n  }\n\n  /// Lookup the media type from the given [filenameOrPath] based on its extension.\n  static DioMediaType? lookupMediaType(String? filenameOrPath) {\n    filenameOrPath = filenameOrPath?.trim();\n    if (filenameOrPath == null || filenameOrPath.isEmpty) {\n      return null;\n    }\n\n    final mimeType = lookupMimeType(filenameOrPath);\n    if (mimeType == null) {\n      return null;\n    }\n\n    return DioMediaType.parse(mimeType);\n  }\n\n  bool _isFinalized = false;\n\n  Stream<Uint8List> finalize() {\n    if (isFinalized) {\n      throw StateError(\n        'The MultipartFile has already been finalized. '\n        'This typically means you are using '\n        'the same MultipartFile in repeated requests.\\n'\n        'Use MultipartFile.clone() or create a new MultipartFile '\n        'for further usages.',\n      );\n    }\n    _isFinalized = true;\n    return _dataBuilder().map(\n      (e) => e is Uint8List ? e : Uint8List.fromList(e),\n    );\n  }\n\n  /// Clone MultipartFile, returning a new instance of the same object.\n  /// This is useful if your request failed and you wish to retry it,\n  /// such as an unauthorized exception can be solved by refreshing the token.\n  MultipartFile clone() {\n    return MultipartFile.fromStream(\n      _dataBuilder,\n      length,\n      filename: filename,\n      contentType: contentType,\n      headers: headers,\n    );\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/options.dart",
    "content": "import 'dart:async';\n\nimport 'package:meta/meta.dart';\n\nimport 'adapter.dart';\nimport 'cancel_token.dart';\nimport 'headers.dart';\nimport 'transformer.dart';\nimport 'utils.dart';\n\n/// {@template dio.options.ProgressCallback}\n/// The type of a progress listening callback when sending or receiving data.\n///\n/// [count] is the length of the bytes have been sent/received.\n///\n/// [total] is the content length of the response/request body.\n/// 1. When sending data, [total] is the request body length.\n/// 2. When receiving data, [total] will be -1 if the size of the response body,\n///    typically with no `content-length` header.\n/// {@endtemplate}\ntypedef ProgressCallback = void Function(int count, int total);\n\n/// Indicates which transformation should be applied to the response data.\nenum ResponseType {\n  /// Transform the response data to JSON object only when the\n  /// content-type of response is \"application/json\" .\n  json,\n\n  /// Get the response stream directly,\n  /// the [Response.data] will be [ResponseBody].\n  ///\n  /// ```dart\n  /// Response<ResponseBody> rs = await Dio().get<ResponseBody>(\n  ///   url,\n  ///   options: Options(responseType: ResponseType.stream),\n  /// );\n  stream,\n\n  /// Transform the response data to an UTF-8 encoded [String].\n  plain,\n\n  /// Get the original bytes, the [Response.data] will be [List<int>].\n  bytes,\n}\n\n/// {@template dio.options.ListFormat}\n/// Specifies the array format (a single parameter with multiple parameter\n/// or multiple parameters with the same name).\n/// and the separator for array items.\n/// {@endtemplate}\nenum ListFormat {\n  /// Comma-separated values.\n  /// e.g. (foo,bar,baz)\n  csv,\n\n  /// Space-separated values.\n  /// e.g. (foo bar baz)\n  ssv,\n\n  /// Tab-separated values.\n  /// e.g. (foo\\tbar\\tbaz)\n  tsv,\n\n  /// Pipe-separated values.\n  /// e.g. (foo|bar|baz)\n  pipes,\n\n  /// Multiple parameter instances rather than multiple values.\n  /// e.g. (foo=value&foo=another_value)\n  multi,\n\n  /// Forward compatibility.\n  /// e.g. (foo[]=value&foo[]=another_value)\n  multiCompatible,\n}\n\n/// The type of a response status code validate callback.\ntypedef ValidateStatus = bool Function(int? status);\n\n/// The type of a response decoding callback.\ntypedef ResponseDecoder = FutureOr<String?> Function(\n  List<int> responseBytes,\n  RequestOptions options,\n  ResponseBody responseBody,\n);\n\n/// The type of a request encoding callback.\ntypedef RequestEncoder = FutureOr<List<int>> Function(\n  String request,\n  RequestOptions options,\n);\n\n/// The mixin class for options that provides common attributes.\nmixin OptionsMixin {\n  /// Request base url, it can be multiple forms:\n  ///  - Contains sub paths, e.g. `https://pub.dev/api/`.\n  ///  - Relative path on Web, e.g. `api/`.\n  String get baseUrl => _baseUrl;\n  late String _baseUrl;\n\n  set baseUrl(String value) {\n    if (value.isNotEmpty && !kIsWeb && Uri.parse(value).host.isEmpty) {\n      throw ArgumentError.value(\n        value,\n        'baseUrl',\n        'Must be a valid URL on platforms other than Web.',\n      );\n    }\n    _baseUrl = value;\n  }\n\n  /// Common query parameters.\n  ///\n  /// List values use the default [ListFormat.multiCompatible].\n  /// The value can be overridden per parameter by adding a [ListParam]\n  /// object wrapping the actual List value and the desired format.\n  late Map<String, dynamic /*String|Iterable<String>*/ > queryParameters;\n\n  /// Timeout when opening a request.\n  ///\n  /// Throws the [DioException] with\n  /// [DioExceptionType.connectionTimeout] type when time out.\n  ///\n  /// `null` or `Duration.zero` means no timeout limit.\n  Duration? get connectTimeout => _connectTimeout;\n  Duration? _connectTimeout;\n\n  set connectTimeout(Duration? value) {\n    if (value != null && value.isNegative) {\n      throw StateError('connectTimeout should be positive');\n    }\n    _connectTimeout = value;\n  }\n}\n\n/// A set of base settings for each `Dio()`.\n/// {@template dio.options.compose_merging}\n/// [BaseOptions] and [Options] will be merged into one [RequestOptions] before\n/// sending the requests. See [Options.compose].\n/// {@endtemplate}\nclass BaseOptions extends _RequestConfig with OptionsMixin {\n  BaseOptions({\n    super.method,\n    Duration? connectTimeout,\n    super.receiveTimeout,\n    super.sendTimeout,\n    String baseUrl = '',\n    Map<String, dynamic>? queryParameters,\n    super.extra,\n    super.headers,\n    super.preserveHeaderCase = false,\n    super.responseType = ResponseType.json,\n    super.contentType,\n    super.validateStatus,\n    super.receiveDataWhenStatusError,\n    super.followRedirects,\n    super.maxRedirects,\n    super.persistentConnection,\n    super.requestEncoder,\n    super.responseDecoder,\n    super.listFormat,\n  }) {\n    this.baseUrl = baseUrl;\n    this.queryParameters = queryParameters ?? {};\n    this.connectTimeout = connectTimeout;\n  }\n\n  /// Create a [BaseOptions] from current instance with merged attributes.\n  BaseOptions copyWith({\n    String? method,\n    String? baseUrl,\n    Map<String, dynamic>? queryParameters,\n    String? path,\n    Duration? connectTimeout,\n    Duration? receiveTimeout,\n    Duration? sendTimeout,\n    Map<String, Object?>? extra,\n    Map<String, Object?>? headers,\n    bool? preserveHeaderCase,\n    ResponseType? responseType,\n    String? contentType,\n    ValidateStatus? validateStatus,\n    bool? receiveDataWhenStatusError,\n    bool? followRedirects,\n    int? maxRedirects,\n    bool? persistentConnection,\n    RequestEncoder? requestEncoder,\n    ResponseDecoder? responseDecoder,\n    ListFormat? listFormat,\n  }) {\n    return BaseOptions(\n      method: method ?? this.method,\n      baseUrl: baseUrl ?? this.baseUrl,\n      queryParameters: queryParameters ?? this.queryParameters,\n      connectTimeout: connectTimeout ?? this.connectTimeout,\n      receiveTimeout: receiveTimeout ?? this.receiveTimeout,\n      sendTimeout: sendTimeout ?? this.sendTimeout,\n      extra: extra ?? Map.from(this.extra),\n      headers: headers ?? Map.from(this.headers),\n      preserveHeaderCase: preserveHeaderCase ?? this.preserveHeaderCase,\n      responseType: responseType ?? this.responseType,\n      contentType: contentType ?? this.contentType,\n      validateStatus: validateStatus ?? this.validateStatus,\n      receiveDataWhenStatusError:\n          receiveDataWhenStatusError ?? this.receiveDataWhenStatusError,\n      followRedirects: followRedirects ?? this.followRedirects,\n      maxRedirects: maxRedirects ?? this.maxRedirects,\n      persistentConnection: persistentConnection ?? this.persistentConnection,\n      requestEncoder: requestEncoder ?? this.requestEncoder,\n      responseDecoder: responseDecoder ?? this.responseDecoder,\n      listFormat: listFormat ?? this.listFormat,\n    );\n  }\n}\n\n/// The configuration for a single request.\n/// {@macro dio.options.compose_merging}\nclass Options {\n  Options({\n    this.method,\n    Duration? sendTimeout,\n    Duration? receiveTimeout,\n    Duration? connectTimeout,\n    this.extra,\n    this.headers,\n    this.preserveHeaderCase,\n    this.responseType,\n    this.contentType,\n    this.validateStatus,\n    this.receiveDataWhenStatusError,\n    this.followRedirects,\n    this.maxRedirects,\n    this.persistentConnection,\n    this.requestEncoder,\n    this.responseDecoder,\n    this.listFormat,\n  })  : assert(receiveTimeout == null || !receiveTimeout.isNegative),\n        _receiveTimeout = receiveTimeout,\n        assert(sendTimeout == null || !sendTimeout.isNegative),\n        _sendTimeout = sendTimeout,\n        assert(connectTimeout == null || !connectTimeout.isNegative),\n        _connectTimeout = connectTimeout;\n\n  /// Create a Option from current instance with merging attributes.\n  Options copyWith({\n    String? method,\n    Duration? sendTimeout,\n    Duration? receiveTimeout,\n    Duration? connectTimeout,\n    Map<String, Object?>? extra,\n    Map<String, Object?>? headers,\n    bool? preserveHeaderCase,\n    ResponseType? responseType,\n    String? contentType,\n    ValidateStatus? validateStatus,\n    bool? receiveDataWhenStatusError,\n    bool? followRedirects,\n    int? maxRedirects,\n    bool? persistentConnection,\n    RequestEncoder? requestEncoder,\n    ResponseDecoder? responseDecoder,\n    ListFormat? listFormat,\n  }) {\n    Map<String, dynamic>? effectiveHeaders;\n    if (headers == null && this.headers != null) {\n      effectiveHeaders = caseInsensitiveKeyMap(this.headers!);\n    }\n\n    if (headers != null) {\n      headers = caseInsensitiveKeyMap(headers);\n      assert(\n        !(contentType != null &&\n            headers.containsKey(Headers.contentTypeHeader)),\n        'You cannot set both contentType param and a content-type header',\n      );\n    }\n\n    Map<String, dynamic>? effectiveExtra;\n    if (extra == null && this.extra != null) {\n      effectiveExtra = Map.from(this.extra!);\n    }\n\n    return Options(\n      method: method ?? this.method,\n      sendTimeout: sendTimeout ?? this.sendTimeout,\n      receiveTimeout: receiveTimeout ?? this.receiveTimeout,\n      connectTimeout: connectTimeout ?? this.connectTimeout,\n      extra: extra ?? effectiveExtra,\n      headers: headers ?? effectiveHeaders,\n      preserveHeaderCase: preserveHeaderCase ?? this.preserveHeaderCase,\n      responseType: responseType ?? this.responseType,\n      contentType: contentType ?? this.contentType,\n      validateStatus: validateStatus ?? this.validateStatus,\n      receiveDataWhenStatusError:\n          receiveDataWhenStatusError ?? this.receiveDataWhenStatusError,\n      followRedirects: followRedirects ?? this.followRedirects,\n      maxRedirects: maxRedirects ?? this.maxRedirects,\n      persistentConnection: persistentConnection ?? this.persistentConnection,\n      requestEncoder: requestEncoder ?? this.requestEncoder,\n      responseDecoder: responseDecoder ?? this.responseDecoder,\n      listFormat: listFormat ?? this.listFormat,\n    );\n  }\n\n  /// Merge a [BaseOptions] with the current [Options]\n  /// and compose them into the [RequestOptions].\n  RequestOptions compose(\n    BaseOptions baseOpt,\n    String path, {\n    Object? data,\n    Map<String, dynamic>? queryParameters,\n    CancelToken? cancelToken,\n    ProgressCallback? onSendProgress,\n    ProgressCallback? onReceiveProgress,\n    StackTrace? sourceStackTrace,\n  }) {\n    final query = <String, dynamic>{};\n    query.addAll(baseOpt.queryParameters);\n    if (queryParameters != null) {\n      query.addAll(queryParameters);\n    }\n\n    final headers = caseInsensitiveKeyMap(baseOpt.headers);\n    if (this.headers != null) {\n      headers.addAll(this.headers!);\n    }\n    if (this.contentType != null) {\n      headers[Headers.contentTypeHeader] = this.contentType;\n    }\n    final String? contentType = headers[Headers.contentTypeHeader];\n    final extra = Map<String, dynamic>.from(baseOpt.extra);\n    if (this.extra != null) {\n      extra.addAll(this.extra!);\n    }\n    final method = (this.method ?? baseOpt.method).toUpperCase();\n    final requestOptions = RequestOptions(\n      method: method,\n      headers: headers,\n      extra: extra,\n      baseUrl: baseOpt.baseUrl,\n      path: path,\n      data: data,\n      preserveHeaderCase: preserveHeaderCase ?? baseOpt.preserveHeaderCase,\n      sourceStackTrace: sourceStackTrace ?? StackTrace.current,\n      connectTimeout: connectTimeout ?? baseOpt.connectTimeout,\n      sendTimeout: sendTimeout ?? baseOpt.sendTimeout,\n      receiveTimeout: receiveTimeout ?? baseOpt.receiveTimeout,\n      responseType: responseType ?? baseOpt.responseType,\n      validateStatus: validateStatus ?? baseOpt.validateStatus,\n      receiveDataWhenStatusError:\n          receiveDataWhenStatusError ?? baseOpt.receiveDataWhenStatusError,\n      followRedirects: followRedirects ?? baseOpt.followRedirects,\n      maxRedirects: maxRedirects ?? baseOpt.maxRedirects,\n      persistentConnection:\n          persistentConnection ?? baseOpt.persistentConnection,\n      queryParameters: query,\n      requestEncoder: requestEncoder ?? baseOpt.requestEncoder,\n      responseDecoder: responseDecoder ?? baseOpt.responseDecoder,\n      listFormat: listFormat ?? baseOpt.listFormat,\n      onReceiveProgress: onReceiveProgress,\n      onSendProgress: onSendProgress,\n      cancelToken: cancelToken,\n      contentType: contentType ?? this.contentType ?? baseOpt.contentType,\n    );\n    requestOptions.cancelToken?.requestOptions = requestOptions;\n    return requestOptions;\n  }\n\n  /// The HTTP request method.\n  String? method;\n\n  /// HTTP request headers.\n  ///\n  /// The keys of the header are case-insensitive,\n  /// e.g.: `content-type` and `Content-Type` will be treated as the same key.\n  Map<String, dynamic>? headers;\n\n  /// Whether the case of header keys should be preserved.\n  ///\n  /// Defaults to false.\n  ///\n  /// This option WILL NOT take effect on these circumstances:\n  /// - XHR ([HttpRequest]) does not support handling this explicitly.\n  /// - The HTTP/2 standard only supports lowercase header keys.\n  bool? preserveHeaderCase;\n\n  /// Timeout when sending data.\n  ///\n  /// Throws the [DioException] with\n  /// [DioExceptionType.sendTimeout] type when timed out.\n  ///\n  /// `null` or `Duration.zero` means no timeout limit.\n  Duration? get sendTimeout => _sendTimeout;\n  Duration? _sendTimeout;\n\n  set sendTimeout(Duration? value) {\n    if (value != null && value.isNegative) {\n      throw ArgumentError.value(value, 'sendTimeout', 'should be positive');\n    }\n    _sendTimeout = value;\n  }\n\n  /// Timeout when receiving data.\n  ///\n  /// The timeout represents:\n  ///  - a timeout before the connection is established\n  ///    and the first received response bytes.\n  ///  - the duration during data transfer of each byte event,\n  ///    rather than the total duration of the receiving.\n  ///\n  /// Throws the [DioException] with\n  /// [DioExceptionType.receiveTimeout] type when timed out.\n  ///\n  /// `null` or `Duration.zero` means no timeout limit.\n  Duration? get receiveTimeout => _receiveTimeout;\n  Duration? _receiveTimeout;\n\n  set receiveTimeout(Duration? value) {\n    if (value != null && value.isNegative) {\n      throw ArgumentError.value(value, 'receiveTimeout', 'should be positive');\n    }\n    _receiveTimeout = value;\n  }\n\n  /// Timeout when opening a request.\n  ///\n  /// Throws the [DioException] with\n  /// [DioExceptionType.connectionTimeout] type when timed out.\n  ///\n  /// `null` or `Duration.zero` means no timeout limit.\n  Duration? get connectTimeout => _connectTimeout;\n  Duration? _connectTimeout;\n\n  set connectTimeout(Duration? value) {\n    if (value != null && value.isNegative) {\n      throw ArgumentError.value(value, 'connectTimeout', 'should be positive');\n    }\n    _connectTimeout = value;\n  }\n\n  /// The request content-type.\n  ///\n  /// {@macro dio.interceptors.ImplyContentTypeInterceptor}\n  String? contentType;\n\n  /// The type of data that [Dio] handles with options.\n  ///\n  /// The default value is [ResponseType.json].\n  /// [Dio] will parse response string to JSON object automatically\n  /// when the content-type of response is [Headers.jsonContentType].\n  ///\n  /// See also:\n  ///  - `plain` if you want to receive the data as `String`.\n  ///  - `bytes` if you want to receive the data as the complete bytes.\n  ///  - `stream` if you want to receive the data as streamed binary bytes.\n  ResponseType? responseType;\n\n  /// Defines whether the request is considered to be successful\n  /// with the given status code.\n  /// The request will be treated as succeed if the callback returns true.\n  ValidateStatus? validateStatus;\n\n  /// Whether to retrieve the data if status code indicates a failed request.\n  ///\n  /// Defaults to true.\n  bool? receiveDataWhenStatusError;\n\n  /// An extra map that you can retrieve in [Interceptor], [Transformer]\n  /// and [Response.requestOptions].\n  ///\n  /// The field is designed to be non-identical with [Response.extra].\n  Map<String, dynamic>? extra;\n\n  /// See [HttpClientRequest.followRedirects].\n  ///\n  /// Defaults to true.\n  bool? followRedirects;\n\n  /// The maximum number of redirects when [followRedirects] is `true`.\n  /// [RedirectException] will be thrown if redirects exceeded the limit.\n  ///\n  /// Defaults to 5.\n  int? maxRedirects;\n\n  /// See [HttpClientRequest.persistentConnection].\n  ///\n  /// Defaults to true.\n  bool? persistentConnection;\n\n  /// The type of a request encoding callback.\n  ///\n  /// Defaults to [Utf8Encoder].\n  RequestEncoder? requestEncoder;\n\n  /// The type of a response decoding callback.\n  ///\n  /// Defaults to [Utf8Decoder].\n  ResponseDecoder? responseDecoder;\n\n  /// Indicates the format of collection data in request query parameters and\n  /// `x-www-url-encoded` body data.\n  ///\n  /// Defaults to [ListFormat.multi].\n  ListFormat? listFormat;\n}\n\n/// The internal request option class that is the eventual result after\n/// [BaseOptions] and [Options] are composed.\nclass RequestOptions extends _RequestConfig with OptionsMixin {\n  RequestOptions({\n    this.path = '',\n    this.data,\n    this.onReceiveProgress,\n    this.onSendProgress,\n    this.cancelToken,\n    super.method,\n    super.sendTimeout,\n    super.receiveTimeout,\n    Duration? connectTimeout,\n    Map<String, dynamic>? queryParameters,\n    String? baseUrl,\n    super.extra,\n    super.headers,\n    super.preserveHeaderCase,\n    super.responseType,\n    super.contentType,\n    super.validateStatus,\n    super.receiveDataWhenStatusError,\n    super.followRedirects,\n    super.maxRedirects,\n    super.persistentConnection,\n    super.requestEncoder,\n    super.responseDecoder,\n    super.listFormat,\n    bool? setRequestContentTypeWhenNoPayload,\n    StackTrace? sourceStackTrace,\n  }) : assert(connectTimeout == null || !connectTimeout.isNegative) {\n    this.sourceStackTrace = sourceStackTrace ?? StackTrace.current;\n    this.queryParameters = queryParameters ?? {};\n    this.baseUrl = baseUrl ?? '';\n    this.connectTimeout = connectTimeout;\n  }\n\n  /// Create a [RequestOptions] from current instance with merged attributes.\n  RequestOptions copyWith({\n    String? method,\n    Duration? sendTimeout,\n    Duration? receiveTimeout,\n    Duration? connectTimeout,\n    dynamic data,\n    String? path,\n    Map<String, dynamic>? queryParameters,\n    String? baseUrl,\n    ProgressCallback? onReceiveProgress,\n    ProgressCallback? onSendProgress,\n    CancelToken? cancelToken,\n    Map<String, dynamic>? extra,\n    Map<String, dynamic>? headers,\n    bool? preserveHeaderCase,\n    ResponseType? responseType,\n    String? contentType,\n    ValidateStatus? validateStatus,\n    bool? receiveDataWhenStatusError,\n    bool? followRedirects,\n    int? maxRedirects,\n    bool? persistentConnection,\n    RequestEncoder? requestEncoder,\n    ResponseDecoder? responseDecoder,\n    ListFormat? listFormat,\n    bool? setRequestContentTypeWhenNoPayload,\n  }) {\n    final contentTypeInHeader = headers != null &&\n        headers.keys\n            .map((e) => e.toLowerCase())\n            .contains(Headers.contentTypeHeader);\n\n    assert(\n      !(contentType != null && contentTypeInHeader),\n      'You cannot set both contentType param and a content-type header',\n    );\n\n    final ro = RequestOptions(\n      method: method ?? this.method,\n      sendTimeout: sendTimeout ?? this.sendTimeout,\n      receiveTimeout: receiveTimeout ?? this.receiveTimeout,\n      connectTimeout: connectTimeout ?? this.connectTimeout,\n      data: data ?? this.data,\n      path: path ?? this.path,\n      baseUrl: baseUrl ?? this.baseUrl,\n      queryParameters: queryParameters ?? Map.from(this.queryParameters),\n      onReceiveProgress: onReceiveProgress ?? this.onReceiveProgress,\n      onSendProgress: onSendProgress ?? this.onSendProgress,\n      cancelToken: cancelToken ?? this.cancelToken,\n      extra: extra ?? Map.from(this.extra),\n      headers: headers ?? Map.from(this.headers),\n      preserveHeaderCase: preserveHeaderCase ?? this.preserveHeaderCase,\n      responseType: responseType ?? this.responseType,\n      validateStatus: validateStatus ?? this.validateStatus,\n      receiveDataWhenStatusError:\n          receiveDataWhenStatusError ?? this.receiveDataWhenStatusError,\n      followRedirects: followRedirects ?? this.followRedirects,\n      maxRedirects: maxRedirects ?? this.maxRedirects,\n      persistentConnection: persistentConnection ?? this.persistentConnection,\n      requestEncoder: requestEncoder ?? this.requestEncoder,\n      responseDecoder: responseDecoder ?? this.responseDecoder,\n      listFormat: listFormat ?? this.listFormat,\n      sourceStackTrace: sourceStackTrace,\n    );\n\n    if (contentType != null) {\n      ro.headers.remove(Headers.contentTypeHeader);\n      ro.contentType = contentType;\n    } else if (!contentTypeInHeader) {\n      ro.contentType = this.contentType;\n    }\n\n    return ro;\n  }\n\n  /// The source [StackTrace] which should always point to the invocation of\n  /// [DioMixin.request] or if not provided, to the construction of the\n  /// [RequestOptions] instance. In both instances the source context should\n  /// still be available before it is lost due to asynchronous operations.\n  @internal\n  StackTrace? sourceStackTrace;\n\n  /// Generate the requesting [Uri] from the options.\n  Uri get uri {\n    String url = path;\n    if (!url.startsWith(RegExp(r'https?:'))) {\n      url = baseUrl + url;\n      final s = url.split(':/');\n      if (s.length == 2) {\n        url = '${s[0]}:/${s[1].replaceAll('//', '/')}';\n      }\n    }\n    final query = Transformer.urlEncodeQueryMap(queryParameters, listFormat);\n    if (query.isNotEmpty) {\n      url += (url.contains('?') ? '&' : '?') + query;\n    }\n    // Normalize the url.\n    return Uri.parse(url).normalizePath();\n  }\n\n  /// Request data in dynamic types.\n  dynamic data;\n\n  /// Defines the path of the request. If it starts with \"http(s)\",\n  /// [baseUrl] will be ignored. Otherwise, it will be combined and resolved\n  /// with the [baseUrl].\n  String path;\n\n  /// {@macro dio.CancelToken}\n  CancelToken? cancelToken;\n\n  /// {@macro dio.options.ProgressCallback}\n  ProgressCallback? onReceiveProgress;\n\n  /// {@macro dio.options.ProgressCallback}\n  ProgressCallback? onSendProgress;\n}\n\nbool _defaultValidateStatus(int? status) {\n  return status != null && status >= 200 && status < 300;\n}\n\nclass _RequestConfig {\n  _RequestConfig({\n    Duration? receiveTimeout,\n    Duration? sendTimeout,\n    String? method,\n    Map<String, dynamic>? extra,\n    Map<String, dynamic>? headers,\n    bool? preserveHeaderCase,\n    String? contentType,\n    ListFormat? listFormat,\n    bool? followRedirects,\n    int? maxRedirects,\n    bool? persistentConnection,\n    bool? receiveDataWhenStatusError,\n    ValidateStatus? validateStatus,\n    ResponseType? responseType,\n    this.requestEncoder,\n    this.responseDecoder,\n  })  : assert(receiveTimeout == null || !receiveTimeout.isNegative),\n        _receiveTimeout = receiveTimeout,\n        assert(sendTimeout == null || !sendTimeout.isNegative),\n        _sendTimeout = sendTimeout,\n        method = method ?? 'GET',\n        preserveHeaderCase = preserveHeaderCase ?? false,\n        listFormat = listFormat ?? ListFormat.multi,\n        extra = extra ?? {},\n        followRedirects = followRedirects ?? true,\n        maxRedirects = maxRedirects ?? 5,\n        persistentConnection = persistentConnection ?? true,\n        receiveDataWhenStatusError = receiveDataWhenStatusError ?? true,\n        validateStatus = validateStatus ?? _defaultValidateStatus,\n        responseType = responseType ?? ResponseType.json {\n    this.headers = headers;\n    final hasContentTypeHeader =\n        this.headers.containsKey(Headers.contentTypeHeader);\n    if (contentType != null &&\n        hasContentTypeHeader &&\n        this.headers[Headers.contentTypeHeader] != contentType) {\n      throw ArgumentError.value(\n        contentType,\n        'contentType',\n        'Unable to set different values for '\n            '`contentType` and the content-type header.',\n      );\n    }\n    if (!hasContentTypeHeader) {\n      this.contentType = contentType;\n    }\n  }\n\n  late String method;\n\n  Map<String, dynamic> get headers => _headers;\n  late Map<String, dynamic> _headers;\n\n  set headers(Map<String, dynamic>? headers) {\n    _headers = caseInsensitiveKeyMap(headers);\n    if (!_headers.containsKey(Headers.contentTypeHeader) &&\n        _defaultContentType != null) {\n      _headers[Headers.contentTypeHeader] = _defaultContentType;\n    }\n  }\n\n  late bool preserveHeaderCase;\n\n  Duration? get sendTimeout => _sendTimeout;\n  Duration? _sendTimeout;\n\n  set sendTimeout(Duration? value) {\n    if (value != null && value.isNegative) {\n      throw StateError('sendTimeout should be positive');\n    }\n    _sendTimeout = value;\n  }\n\n  Duration? get receiveTimeout => _receiveTimeout;\n  Duration? _receiveTimeout;\n\n  set receiveTimeout(Duration? value) {\n    if (value != null && value.isNegative) {\n      throw StateError('receiveTimeout should be positive');\n    }\n    _receiveTimeout = value;\n  }\n\n  String? _defaultContentType;\n\n  String? get contentType => _headers[Headers.contentTypeHeader] as String?;\n\n  set contentType(String? contentType) {\n    final newContentType = contentType?.trim();\n    _defaultContentType = newContentType;\n    if (newContentType != null) {\n      _headers[Headers.contentTypeHeader] = newContentType;\n    } else {\n      _headers.remove(Headers.contentTypeHeader);\n    }\n  }\n\n  late ResponseType responseType;\n  late ValidateStatus validateStatus;\n  late bool receiveDataWhenStatusError;\n  late Map<String, dynamic> extra;\n  late bool followRedirects;\n  late int maxRedirects;\n  late bool persistentConnection;\n  RequestEncoder? requestEncoder;\n  ResponseDecoder? responseDecoder;\n  late ListFormat listFormat;\n}\n\n/// {@template dio.options.FileAccessMode}\n/// The file access mode when downloading a file, corresponds to a subset of\n/// dart:io::[FileMode].\n/// {@endtemplate}\nenum FileAccessMode {\n  /// Mode for opening a file for reading and writing. The file is overwritten\n  /// if it already exists. The file is created if it does not already exist.\n  write,\n\n  /// Mode for opening a file for reading and writing to the end of it.\n  /// The file is created if it does not already exist.\n  append,\n}\n"
  },
  {
    "path": "dio/lib/src/parameter.dart",
    "content": "import 'package:collection/collection.dart';\n\nimport 'options.dart';\n\n/// Indicates a param being used as queries or form data,\n/// and how does it gets formatted.\nclass ListParam<T> {\n  const ListParam(this.value, this.format);\n\n  /// The value used in queries or in form data.\n  final List<T> value;\n\n  /// How does the value gets formatted.\n  final ListFormat format;\n\n  /// Generate a new [ListParam] by copying fields.\n  ListParam<T> copyWith({List<T>? value, ListFormat? format}) {\n    return ListParam(value ?? this.value, format ?? this.format);\n  }\n\n  @override\n  String toString() {\n    return 'ListParam{value: $value, format: $format}';\n  }\n\n  @override\n  bool operator ==(Object other) =>\n      identical(this, other) ||\n      other is ListParam &&\n          runtimeType == other.runtimeType &&\n          const DeepCollectionEquality().equals(value, other.value) &&\n          format == other.format;\n\n  @override\n  int get hashCode => Object.hash(\n        const DeepCollectionEquality().hash(value),\n        format,\n      );\n}\n"
  },
  {
    "path": "dio/lib/src/progress_stream/browser_progress_stream.dart",
    "content": "export 'package:dio_web_adapter/dio_web_adapter.dart' show addProgress;\n"
  },
  {
    "path": "dio/lib/src/progress_stream/io_progress_stream.dart",
    "content": "import 'dart:async';\nimport 'dart:typed_data';\n\nimport '../options.dart';\n\nStream<Uint8List> addProgress(\n  Stream<List<int>> stream,\n  int? length,\n  RequestOptions options,\n) {\n  final streamTransformer = stream is Stream<Uint8List>\n      ? _transform<Uint8List>(stream, length, options)\n      : _transform<List<int>>(stream, length, options);\n  return stream.transform<Uint8List>(streamTransformer);\n}\n\nStreamTransformer<S, Uint8List> _transform<S extends List<int>>(\n  Stream<S> stream,\n  int? length,\n  RequestOptions options,\n) {\n  int complete = 0;\n  return StreamTransformer<S, Uint8List>.fromHandlers(\n    handleData: (S data, sink) {\n      final cancelToken = options.cancelToken;\n      if (cancelToken != null && cancelToken.isCancelled) {\n        cancelToken.requestOptions = options;\n        sink\n          ..addError(cancelToken.cancelError!)\n          ..close();\n      } else {\n        if (data is Uint8List) {\n          sink.add(data);\n        } else {\n          sink.add(Uint8List.fromList(data));\n        }\n        if (length != null) {\n          complete += data.length;\n          if (options.onSendProgress != null) {\n            options.onSendProgress!(complete, length);\n          }\n        }\n      }\n    },\n  );\n}\n"
  },
  {
    "path": "dio/lib/src/redirect_record.dart",
    "content": "/// A record that records the redirection happens during requests,\n/// including status code, request method, and the location.\nclass RedirectRecord {\n  const RedirectRecord(this.statusCode, this.method, this.location);\n\n  /// Returns the status code used for the redirect.\n  final int statusCode;\n\n  /// Returns the method used for the redirect.\n  final String method;\n\n  /// Returns the location for the redirect.\n  final Uri location;\n\n  @override\n  String toString() {\n    return 'RedirectRecord'\n        '{statusCode: $statusCode, method: $method, location: $location}';\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/response/response_stream_handler.dart",
    "content": "import 'dart:async';\nimport 'dart:typed_data';\n\nimport 'package:meta/meta.dart';\n\nimport '../adapter.dart';\nimport '../dio_exception.dart';\nimport '../options.dart';\n\n/// An internal helper which handles functionality\n/// common to all adapters. This function ensures that\n/// all resources are closed when the request is finished\n/// or cancelled.\n///\n/// - [options.receiveTimeout] between received chunks\n/// - [options.onReceiveProgress] progress for received chunks\n/// - [options.cancelToken] for cancellation while receiving\nStream<Uint8List> handleResponseStream(\n  RequestOptions options,\n  ResponseBody response, {\n  @visibleForTesting void Function()? onReceiveTimeoutWatchCancelled,\n}) {\n  final source = response.stream;\n  final responseSink = StreamController<Uint8List>();\n  late StreamSubscription<List<int>> responseSubscription;\n\n  late int totalLength;\n  int receivedLength = 0;\n  if (options.onReceiveProgress != null) {\n    totalLength = response.contentLength;\n  }\n\n  final receiveTimeout = options.receiveTimeout ?? Duration.zero;\n  final receiveStopwatch = Stopwatch();\n  Timer? receiveTimer;\n\n  void stopWatchReceiveTimeout() {\n    onReceiveTimeoutWatchCancelled?.call();\n    receiveTimer?.cancel();\n    receiveTimer = null;\n    receiveStopwatch\n      ..stop()\n      ..reset();\n  }\n\n  void watchReceiveTimeout() {\n    if (receiveTimeout <= Duration.zero) {\n      return;\n    }\n    // Not calling `stopWatchReceiveTimeout` to follow the semantic:\n    // Watching the new receive timeout does not indicate the watch\n    // has been cancelled.\n    receiveTimer?.cancel();\n    receiveStopwatch\n      ..reset()\n      ..start();\n    receiveTimer = Timer(receiveTimeout, () {\n      stopWatchReceiveTimeout();\n      response.close();\n      responseSubscription.cancel();\n      responseSink.addErrorAndClose(\n        DioException.receiveTimeout(\n          timeout: receiveTimeout,\n          requestOptions: options,\n        ),\n      );\n    });\n  }\n\n  responseSubscription = source.listen(\n    (data) {\n      watchReceiveTimeout();\n      // Always true if the receive timeout was not set.\n      if (receiveStopwatch.elapsed <= receiveTimeout) {\n        responseSink.add(data);\n        options.onReceiveProgress?.call(\n          receivedLength += data.length,\n          totalLength,\n        );\n      }\n    },\n    onError: (error, stackTrace) {\n      stopWatchReceiveTimeout();\n      responseSink.addErrorAndClose(error, stackTrace);\n    },\n    onDone: () {\n      stopWatchReceiveTimeout();\n      responseSubscription.cancel();\n      responseSink.close();\n    },\n    cancelOnError: true,\n  );\n\n  options.cancelToken?.whenCancel.whenComplete(() {\n    stopWatchReceiveTimeout();\n    // Close the response stream upon a cancellation.\n    response.close();\n    responseSubscription.cancel();\n    responseSink.addErrorAndClose(options.cancelToken!.cancelError!);\n  });\n  return responseSink.stream;\n}\n\nextension on StreamController<Uint8List> {\n  void addErrorAndClose(Object error, [StackTrace? stackTrace]) {\n    if (!isClosed) {\n      addError(error, stackTrace);\n      close();\n    }\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/response.dart",
    "content": "import 'dart:convert';\n\nimport 'headers.dart';\nimport 'options.dart';\nimport 'redirect_record.dart';\n\n/// The [Response] class contains the payload (could be transformed)\n/// that respond from the request, and other information of the response.\n///\n/// The object is not sealed or immutable, which means it can be manipulated\n/// in anytime, typically by [Interceptor] and [Transformer].\nclass Response<T> {\n  Response({\n    this.data,\n    required this.requestOptions,\n    this.statusCode,\n    this.statusMessage,\n    this.isRedirect = false,\n    this.redirects = const [],\n    Map<String, dynamic>? extra,\n    Headers? headers,\n  })  : headers = headers ??\n            Headers(preserveHeaderCase: requestOptions.preserveHeaderCase),\n        extra = extra ?? <String, dynamic>{};\n\n  /// The response payload in specific type.\n  ///\n  /// The content could have been transformed by the [Transformer]\n  /// before it can use eventually.\n  T? data;\n\n  /// The [RequestOptions] used for the corresponding request.\n  RequestOptions requestOptions;\n\n  /// The HTTP status code for the response.\n  ///\n  /// This can be null if the response was constructed manually.\n  int? statusCode;\n\n  /// Returns the reason phrase associated with the status code.\n  String? statusMessage;\n\n  /// Headers for the response.\n  Headers headers;\n\n  /// Whether the response has been redirected.\n  ///\n  /// The field rely on the implementation of the adapter.\n  bool isRedirect;\n\n  /// All redirections happened before the response respond.\n  ///\n  /// The field rely on the implementation of the adapter.\n  List<RedirectRecord> redirects;\n\n  /// Return the final real request URI (may be redirected).\n  ///\n  /// Note: Whether the field is available depends on whether the adapter\n  /// supports or not.\n  Uri get realUri =>\n      redirects.isNotEmpty ? redirects.last.location : requestOptions.uri;\n\n  /// An extra map that you can save your custom information in.\n  ///\n  /// The field is designed to be non-identical with\n  /// [Options.extra] and [RequestOptions.extra].\n  Map<String, dynamic> extra;\n\n  @override\n  String toString() {\n    if (data is Map) {\n      // Log encoded maps for better readability.\n      return json.encode(data);\n    }\n    return data.toString();\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/transformer.dart",
    "content": "import 'dart:async';\nimport 'package:http_parser/http_parser.dart';\n\nimport 'adapter.dart';\nimport 'options.dart';\nimport 'utils.dart';\n\nexport 'transformers/background_transformer.dart';\nexport 'transformers/fused_transformer.dart';\nexport 'transformers/sync_transformer.dart';\n\n/// The callback definition for decoding a JSON string.\ntypedef JsonDecodeCallback = FutureOr<dynamic> Function(String);\n\n/// The callback definition for encoding a JSON object.\ntypedef JsonEncodeCallback = FutureOr<String> Function(Object);\n\n/// [Transformer] allows changes to the request/response data before\n/// it is sent/received to/from the server.\n///\n/// Dio has already implemented a [BackgroundTransformer], and as the default\n/// [Transformer]. If you want to custom the transformation of\n/// request/response data, you can provide a [Transformer] by your self, and\n/// replace the [BackgroundTransformer] by setting the [Dio.Transformer].\nabstract class Transformer {\n  /// [transformRequest] allows changes to the request data before it is\n  /// sent to the server, but **after** the [RequestInterceptor].\n  ///\n  /// This is only applicable for request methods 'PUT', 'POST', and 'PATCH'\n  Future<String> transformRequest(RequestOptions options);\n\n  /// [transformResponse] allows changes to the response data  before\n  /// it is passed to [ResponseInterceptor].\n  ///\n  /// **Note**: As an agreement, you must return the [responseBody]\n  /// when the Options.responseType is [ResponseType.stream].\n  // TODO(AlexV525): Add generic type for the method in v6.0.0.\n  Future transformResponse(RequestOptions options, ResponseBody responseBody);\n\n  /// Recursively encode the [Map<String, dynamic>] to percent-encoding.\n  /// Generally used with the \"application/x-www-form-urlencoded\" content-type.\n  static String urlEncodeMap(\n    Map<String, dynamic> map, [\n    ListFormat listFormat = ListFormat.multi,\n  ]) {\n    return encodeMap(\n      map,\n      (key, value) {\n        if (value == null) {\n          return key;\n        }\n        return '$key=${Uri.encodeQueryComponent(value.toString())}';\n      },\n      listFormat: listFormat,\n    );\n  }\n\n  /// Deep encode the [Map<String, dynamic>] to a query parameter string.\n  static String urlEncodeQueryMap(\n    Map<String, dynamic> map, [\n    ListFormat listFormat = ListFormat.multi,\n  ]) {\n    return encodeMap(\n      map,\n      (key, value) {\n        if (value == null) {\n          return key;\n        }\n        return '$key=$value';\n      },\n      listFormat: listFormat,\n      isQuery: true,\n    );\n  }\n\n  /// See https://mimesniff.spec.whatwg.org/#json-mime-type.\n  static bool isJsonMimeType(String? contentType) {\n    if (contentType == null) {\n      return false;\n    }\n    try {\n      final mediaType = MediaType.parse(contentType);\n      return mediaType.mimeType == 'application/json' ||\n          mediaType.mimeType == 'text/json' ||\n          mediaType.subtype.endsWith('+json');\n    } catch (e, s) {\n      warningLog(\n        'Failed to parse the media type: $contentType, '\n        'thus it is not a JSON MIME type.',\n        s,\n      );\n      return false;\n    }\n  }\n\n  static FutureOr<String> defaultTransformRequest(\n    RequestOptions options,\n    JsonEncodeCallback jsonEncodeCallback,\n  ) {\n    final Object data = options.data ?? '';\n    if (data is! String && Transformer.isJsonMimeType(options.contentType)) {\n      return jsonEncodeCallback(data);\n    } else if (data is Map) {\n      if (data is Map<String, dynamic>) {\n        return Transformer.urlEncodeMap(data, options.listFormat);\n      }\n      warningLog(\n        'The data is a type of `Map` (${data.runtimeType}), '\n        'but the transformer can only encode `Map<String, dynamic>`.\\n'\n        'If you are writing maps using `{}`, '\n        'consider writing `<String, dynamic>{}`.',\n        StackTrace.current,\n      );\n      return data.toString();\n    } else {\n      return data.toString();\n    }\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/transformers/background_transformer.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\n\nimport '../compute/compute.dart';\nimport '../transformers/sync_transformer.dart';\n\n/// The default [Transformer] for [Dio].\n///\n/// [BackgroundTransformer] will do the deserialization of JSON in\n/// a background isolate if possible.\nclass BackgroundTransformer extends SyncTransformer {\n  BackgroundTransformer() : super(jsonDecodeCallback: _decodeJson);\n}\n\nFutureOr<dynamic> _decodeJson(String text) {\n  // Taken from https://github.com/flutter/flutter/blob/135454af32477f815a7525073027a3ff9eff1bfd/packages/flutter/lib/src/services/asset_bundle.dart#L87-L93\n  // 50 KB of data should take 2-3 ms to parse on a Moto G4, and about 400 μs\n  // on a Pixel 4.\n  if (text.codeUnits.length < 50 * 1024) {\n    return jsonDecode(text);\n  }\n  // For strings larger than 50 KB, run the computation in an isolate to\n  // avoid causing main thread jank.\n  return compute(jsonDecode, text);\n}\n"
  },
  {
    "path": "dio/lib/src/transformers/fused_transformer.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:typed_data';\n\nimport '../adapter.dart';\nimport '../compute/compute.dart';\nimport '../headers.dart';\nimport '../options.dart';\nimport '../transformer.dart';\nimport 'util/consolidate_bytes.dart';\nimport 'util/transform_empty_to_null.dart';\n\n/// A [Transformer] that has a fast path for decoding UTF8-encoded JSON.\n/// If the response is utf8-encoded JSON and no custom decoder is specified in the [RequestOptions], this transformer\n/// is significantly faster than the default [SyncTransformer] and the [BackgroundTransformer].\n/// This improvement is achieved by using a fused [Utf8Decoder] and [JsonDecoder] to decode the response,\n/// which is faster than decoding the utf8-encoded JSON in two separate steps, since\n/// Dart uses a special fast decoder for this case.\n/// See https://github.com/dart-lang/sdk/blob/5b2ea0c7a227d91c691d2ff8cbbeb5f7f86afdb9/sdk/lib/_internal/vm/lib/convert_patch.dart#L40\n///\n/// By default, this transformer will transform responses in the main isolate,\n/// but a custom threshold can be set to switch to an isolate for large responses by passing\n/// [contentLengthIsolateThreshold].\nclass FusedTransformer extends Transformer {\n  FusedTransformer({\n    this.contentLengthIsolateThreshold = -1,\n  });\n\n  /// Always decode the response in the same isolate\n  factory FusedTransformer.sync() => FusedTransformer(\n        contentLengthIsolateThreshold: -1,\n      );\n\n  // whether to switch decoding to an isolate for large responses\n  // set to -1 to disable, 0 to always use isolate\n  final int contentLengthIsolateThreshold;\n\n  static final _utf8JsonDecoder = const Utf8Decoder().fuse(const JsonDecoder());\n\n  @override\n  Future<String> transformRequest(RequestOptions options) async {\n    return Transformer.defaultTransformRequest(options, jsonEncode);\n  }\n\n  @override\n  Future<dynamic> transformResponse(\n    RequestOptions options,\n    ResponseBody responseBody,\n  ) async {\n    final responseType = options.responseType;\n    // Do not handle the body for streams.\n    if (responseType == ResponseType.stream) {\n      return responseBody;\n    }\n\n    // Return the finalized bytes if the response type is bytes.\n    if (responseType == ResponseType.bytes) {\n      return consolidateBytes(responseBody.stream);\n    }\n\n    final isJsonContent = Transformer.isJsonMimeType(\n          responseBody.headers[Headers.contentTypeHeader]?.first,\n        ) &&\n        responseType == ResponseType.json;\n\n    final customResponseDecoder = options.responseDecoder;\n\n    // No custom decoder was specified for the response,\n    // and the response is json -> use the fast path decoder\n    if (isJsonContent && customResponseDecoder == null) {\n      return _fastUtf8JsonDecode(options, responseBody);\n    }\n    final responseBytes = await consolidateBytes(responseBody.stream);\n\n    // A custom response decoder overrides the default behavior\n    final String? decodedResponse;\n\n    if (customResponseDecoder != null) {\n      final decodeResponse = customResponseDecoder(\n        responseBytes,\n        options,\n        responseBody..stream = const Stream.empty(),\n      );\n\n      if (decodeResponse is Future) {\n        decodedResponse = await decodeResponse;\n      } else {\n        decodedResponse = decodeResponse;\n      }\n    } else {\n      decodedResponse = null;\n    }\n\n    if (isJsonContent && decodedResponse != null) {\n      // slow path decoder, since there was a custom decoder specified\n      return jsonDecode(decodedResponse);\n    } else if (customResponseDecoder != null) {\n      return decodedResponse;\n    } else {\n      // If the response is not JSON and no custom decoder was specified,\n      // assume it is an utf8 string\n      return utf8.decode(\n        responseBytes,\n        allowMalformed: true,\n      );\n    }\n  }\n\n  Future<Object?> _fastUtf8JsonDecode(\n    RequestOptions options,\n    ResponseBody responseBody,\n  ) async {\n    final contentLengthHeader =\n        responseBody.headers[Headers.contentLengthHeader];\n\n    final hasContentLengthHeader =\n        contentLengthHeader != null && contentLengthHeader.isNotEmpty;\n\n    // The content length of the response, either from the content-length header\n    // of the response or the length of the eagerly decoded response bytes\n    final int contentLength;\n\n    // The eagerly decoded response bytes\n    // which is set if the content length is not specified and\n    // null otherwise (we'll feed the stream directly to the decoder in that case)\n    Uint8List? responseBytes;\n\n    // If the content length is not specified, we need to consolidate the stream\n    // and count the bytes to determine if we should use an isolate\n    // otherwise we use the content length header\n    if (!hasContentLengthHeader) {\n      responseBytes = await consolidateBytes(responseBody.stream);\n      contentLength = responseBytes.length;\n    } else {\n      contentLength = int.parse(contentLengthHeader.first);\n    }\n\n    // The decoding in done on an isolate if\n    // - contentLengthIsolateThreshold is not -1\n    // - the content length, calculated from either\n    //   the content-length header if present or the eagerly decoded response bytes,\n    //   is greater than or equal to contentLengthIsolateThreshold\n    final shouldUseIsolate = !(contentLengthIsolateThreshold < 0) &&\n        contentLength >= contentLengthIsolateThreshold;\n    if (shouldUseIsolate) {\n      // we can't send the stream to the isolate, so we need to decode the response bytes first\n      return compute(\n        _decodeUtf8ToJson,\n        responseBytes ?? await consolidateBytes(responseBody.stream),\n      );\n    } else {\n      if (responseBytes != null) {\n        if (responseBytes.isEmpty) {\n          return null;\n        }\n        return _utf8JsonDecoder.convert(responseBytes);\n      } else {\n        assert(responseBytes == null);\n        // The content length is specified and we can feed the stream directly to the decoder,\n        // without eagerly decoding the response bytes first.\n        // If the response is empty, return null;\n        // This is done by the DefaultNullIfEmptyStreamTransformer\n        final streamWithNullFallback = responseBody.stream\n            .transform(const DefaultNullIfEmptyStreamTransformer());\n        final decodedStream = _utf8JsonDecoder.bind(streamWithNullFallback);\n        final decoded = await decodedStream.toList();\n        if (decoded.isEmpty) {\n          return null;\n        }\n        assert(decoded.length == 1);\n        return decoded.first;\n      }\n    }\n  }\n\n  static Future<Object?> _decodeUtf8ToJson(Uint8List data) async {\n    if (data.isEmpty) {\n      return null;\n    }\n    return _utf8JsonDecoder.convert(data);\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/transformers/sync_transformer.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\n\nimport '../adapter.dart';\nimport '../headers.dart';\nimport '../options.dart';\nimport '../transformer.dart';\nimport 'util/consolidate_bytes.dart';\n\n@Deprecated('Use BackgroundTransformer instead')\ntypedef DefaultTransformer = SyncTransformer;\n\n/// If you want to custom the transformation of request/response data,\n/// you can provide a [Transformer] by your self, and replace\n/// the transformer by setting the [Dio.transformer].\nclass SyncTransformer extends Transformer {\n  SyncTransformer({\n    this.jsonDecodeCallback = jsonDecode,\n    this.jsonEncodeCallback = jsonEncode,\n  });\n\n  JsonDecodeCallback jsonDecodeCallback;\n  JsonEncodeCallback jsonEncodeCallback;\n\n  @override\n  Future<String> transformRequest(RequestOptions options) async {\n    return Transformer.defaultTransformRequest(options, jsonEncodeCallback);\n  }\n\n  @override\n  Future<dynamic> transformResponse(\n    RequestOptions options,\n    ResponseBody responseBody,\n  ) async {\n    final responseType = options.responseType;\n    // Do not handled the body for streams.\n    if (responseType == ResponseType.stream) {\n      return responseBody;\n    }\n\n    final responseBytes = await consolidateBytes(responseBody.stream);\n\n    // Return the finalized bytes if the response type is bytes.\n    if (responseType == ResponseType.bytes) {\n      return responseBytes;\n    }\n\n    final isJsonContent = Transformer.isJsonMimeType(\n      responseBody.headers[Headers.contentTypeHeader]?.first,\n    );\n    final String? response;\n    if (options.responseDecoder != null) {\n      final decodeResponse = options.responseDecoder!(\n        responseBytes,\n        options,\n        responseBody..stream = const Stream.empty(),\n      );\n\n      if (decodeResponse is Future) {\n        response = await decodeResponse;\n      } else {\n        response = decodeResponse;\n      }\n    } else if (!isJsonContent || responseBytes.isNotEmpty) {\n      response = utf8.decode(responseBytes, allowMalformed: true);\n    } else {\n      response = null;\n    }\n\n    if (response != null &&\n        response.isNotEmpty &&\n        responseType == ResponseType.json &&\n        isJsonContent) {\n      return jsonDecodeCallback(response);\n    }\n    return response;\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/transformers/util/consolidate_bytes.dart",
    "content": "import 'dart:typed_data';\n\n/// Consolidates a stream of [Uint8List] into a single [Uint8List]\nFuture<Uint8List> consolidateBytes(Stream<Uint8List> stream) async {\n  final builder = BytesBuilder(copy: false);\n\n  await for (final chunk in stream) {\n    builder.add(chunk);\n  }\n\n  return builder.takeBytes();\n}\n"
  },
  {
    "path": "dio/lib/src/transformers/util/transform_empty_to_null.dart",
    "content": "import 'dart:async';\nimport 'dart:typed_data';\n\n/// A [StreamTransformer] that replaces an empty stream of Uint8List with a default value\n/// - the utf8-encoded string \"null\".\n/// Feeding an empty stream to a JSON decoder will throw an exception, so this transformer\n/// is used to prevent that; the JSON decoder will instead return null.\nclass DefaultNullIfEmptyStreamTransformer\n    extends StreamTransformerBase<Uint8List, Uint8List> {\n  const DefaultNullIfEmptyStreamTransformer();\n\n  @override\n  Stream<Uint8List> bind(Stream<Uint8List> stream) {\n    return Stream.eventTransformed(\n      stream,\n      (sink) => _DefaultIfEmptyStreamSink(sink),\n    );\n  }\n}\n\nclass _DefaultIfEmptyStreamSink implements EventSink<Uint8List> {\n  _DefaultIfEmptyStreamSink(this._outputSink);\n\n  /// Hard-coded constant for replacement value, \"null\"\n  static final Uint8List _nullUtf8Value =\n      Uint8List.fromList(const [110, 117, 108, 108]);\n\n  final EventSink<Uint8List> _outputSink;\n  bool _hasData = false;\n\n  @override\n  void add(Uint8List data) {\n    _hasData = _hasData || data.isNotEmpty;\n    _outputSink.add(data);\n  }\n\n  @override\n  void addError(e, [st]) => _outputSink.addError(e, st);\n\n  @override\n  void close() {\n    if (!_hasData) {\n      _outputSink.add(_nullUtf8Value);\n    }\n\n    _outputSink.close();\n  }\n}\n"
  },
  {
    "path": "dio/lib/src/utils.dart",
    "content": "import 'dart:async';\nimport 'dart:collection';\nimport 'dart:convert';\nimport 'dart:developer' as dev;\n\nimport 'options.dart';\nimport 'parameter.dart';\n\n// See https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/foundation/constants.dart.\nconst _kIsWebInterop = bool.fromEnvironment('dart.library.js_interop');\nconst _kIsWebUtil = bool.fromEnvironment('dart.library.js_util');\nconst kIsWeb = _kIsWebInterop || _kIsWebUtil || identical(0, 0.0);\n\n// For the web platform, an inline `bool.fromEnvironment` translates to\n// `core.bool.fromEnvironment` instead of correctly being replaced by the\n// constant value found in the environment at build time.\n//\n// See https://github.com/flutter/flutter/issues/51186.\nconst kReleaseMode = bool.fromEnvironment('dart.vm.product');\n\n/// Pipes all data and errors from [stream] into [sink]. Completes [Future] once\n/// [stream] is done. Unlike [store], [sink] remains open after [stream] is\n/// done.\nFuture<void> writeStreamToSink<T>(Stream<T> stream, EventSink<T> sink) {\n  final completer = Completer<void>();\n  stream.listen(\n    sink.add,\n    onError: sink.addError,\n    onDone: () => completer.complete(),\n  );\n  return completer.future;\n}\n\n/// Returns the [Encoding] that corresponds to [charset]. Returns [fallback] if\n/// [charset] is null or if no [Encoding] was found that corresponds to\n/// [charset].\nEncoding encodingForCharset(String? charset, [Encoding fallback = latin1]) {\n  if (charset == null) {\n    return fallback;\n  }\n  final encoding = Encoding.getByName(charset);\n  return encoding ?? fallback;\n}\n\ntypedef DioEncodeHandler = String? Function(String key, Object? value);\n\nString encodeMap(\n  Object data,\n  DioEncodeHandler handler, {\n  bool encode = true,\n  bool isQuery = false,\n  ListFormat listFormat = ListFormat.multi,\n}) {\n  final urlData = StringBuffer('');\n  bool first = true;\n  // URL Query parameters are generally encoded but not their\n  // index or nested names in square brackets.\n  // When [encode] is false, for example for [FormData], nothing is encoded.\n  final leftBracket = isQuery || !encode ? '[' : '%5B';\n  final rightBracket = isQuery || !encode ? ']' : '%5D';\n\n  final String Function(String) encodeComponent =\n      encode ? Uri.encodeQueryComponent : (e) => e;\n  Object? maybeEncode(Object? value) {\n    if (!isQuery || value == null || value is! String) {\n      return value;\n    }\n    return encodeComponent(value);\n  }\n\n  void urlEncode(Object? sub, String path) {\n    // Detect if the list format for this parameter derivatives from default.\n    final format = sub is ListParam ? sub.format : listFormat;\n    final separatorChar = _getSeparatorChar(format, isQuery);\n\n    if (sub is ListParam) {\n      // Need to unwrap all param objects here\n      sub = sub.value;\n    }\n\n    if (sub is List) {\n      if (format == ListFormat.multi || format == ListFormat.multiCompatible) {\n        for (int i = 0; i < sub.length; i++) {\n          final isCollection =\n              sub[i] is Map || sub[i] is List || sub[i] is ListParam;\n          if (format == ListFormat.multi) {\n            urlEncode(\n              maybeEncode(sub[i]),\n              '$path${isCollection ? '$leftBracket$i$rightBracket' : ''}',\n            );\n          } else {\n            // Forward compatibility\n            urlEncode(\n              maybeEncode(sub[i]),\n              '$path$leftBracket${isCollection ? i : ''}$rightBracket',\n            );\n          }\n        }\n      } else {\n        urlEncode(sub.map(maybeEncode).join(separatorChar), path);\n      }\n    } else if (sub is Map) {\n      sub.forEach((k, v) {\n        if (path == '') {\n          urlEncode(maybeEncode(v), encodeComponent(k));\n        } else {\n          urlEncode(\n            maybeEncode(v),\n            '$path$leftBracket${encodeComponent(k)}$rightBracket',\n          );\n        }\n      });\n    } else {\n      final str = handler(path, sub);\n      final isNotEmpty = str != null && str.trim().isNotEmpty;\n      if (!first && isNotEmpty) {\n        urlData.write('&');\n      }\n      first = false;\n      if (isNotEmpty) {\n        urlData.write(str);\n      }\n    }\n  }\n\n  urlEncode(data, '');\n  return urlData.toString();\n}\n\nString _getSeparatorChar(ListFormat collectionFormat, bool isQuery) {\n  switch (collectionFormat) {\n    case ListFormat.csv:\n      return ',';\n    case ListFormat.ssv:\n      return isQuery ? '%20' : ' ';\n    case ListFormat.tsv:\n      return r'\\t';\n    case ListFormat.pipes:\n      return '|';\n    default:\n      return '';\n  }\n}\n\nMap<String, V> caseInsensitiveKeyMap<V>([Map<String, V>? value]) {\n  final map = LinkedHashMap<String, V>(\n    equals: (key1, key2) => key1.toLowerCase() == key2.toLowerCase(),\n    hashCode: (key) => key.toLowerCase().hashCode,\n  );\n  if (value != null && value.isNotEmpty) {\n    map.addAll(value);\n  }\n  return map;\n}\n\n// TODO(Alex): Provide a configurable property on the Dio class once https://github.com/cfug/dio/discussions/1982 has made some progress.\nvoid warningLog(Object message, StackTrace stackTrace) {\n  if (!kReleaseMode) {\n    dev.log(\n      message.toString(),\n      level: 900,\n      name: '🔔 Dio',\n      stackTrace: stackTrace,\n    );\n  }\n}\n"
  },
  {
    "path": "dio/pubspec.yaml",
    "content": "name: dio\nversion: 5.9.2\n\ndescription: |\n  A powerful HTTP networking package,\n  supports Interceptors,\n  Aborting and canceling a request,\n  Custom adapters, Transformers, etc.\ntopics:\n  - dio\n  - http\n  - network\n  - interceptor\n  - middleware\nhomepage: https://github.com/cfug/dio\nrepository: https://github.com/cfug/dio/blob/main/dio\nissue_tracker: https://github.com/cfug/dio/issues\n\nenvironment:\n  sdk: '>=2.18.0 <4.0.0'\n\ndependencies:\n  async: ^2.8.2\n  collection: ^1.16.0\n  http_parser: ^4.0.0\n  meta: ^1.5.0\n  mime: '>=1.0.0 <3.0.0'\n  path: ^1.8.0\n\n  dio_web_adapter: '>=1.1.0 <3.0.0'\n\ndev_dependencies:\n  lints: any\n  test: ^1.5.1\n  build_runner: any\n  coverage: ^1.0.3\n  crypto: ^3.0.2\n  mockito: ^5.2.0\n\n  # Shared test package.\n  dio_test:\n    git:\n      url: https://github.com/cfug/dio\n      path: dio_test\n"
  },
  {
    "path": "dio/test/adapters_test.dart",
    "content": "import 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group(\n    IOHttpClientAdapter,\n    () {\n      test('onHttpClientCreate is only executed once per request', () async {\n        int onHttpClientCreateInvokeCount = 0;\n        final dio = Dio();\n        dio.httpClientAdapter = IOHttpClientAdapter(\n          // ignore: deprecated_member_use_from_same_package\n          onHttpClientCreate: (client) {\n            onHttpClientCreateInvokeCount++;\n            return client;\n          },\n        );\n        await dio.get('https://pub.dev');\n        expect(onHttpClientCreateInvokeCount, 1);\n      });\n\n      test('createHttpClientCount is only executed once per request', () async {\n        int createHttpClientCount = 0;\n        final dio = Dio();\n        dio.httpClientAdapter = IOHttpClientAdapter(\n          createHttpClient: () {\n            createHttpClientCount++;\n            return HttpClient();\n          },\n        );\n        await dio.get('https://pub.dev');\n        expect(createHttpClientCount, 1);\n      });\n\n      test('httpVersion is set in response extra', () async {\n        final dio = Dio();\n        dio.httpClientAdapter = IOHttpClientAdapter();\n        final response = await dio.get('https://pub.dev');\n        final httpVersion =\n            response.extra[HttpClientAdapter.extraKeyHttpVersion];\n        expect(httpVersion, isNotNull);\n        expect(httpVersion, anyOf(equals('1.0'), equals('1.1')));\n      });\n    },\n    testOn: 'vm',\n  );\n}\n"
  },
  {
    "path": "dio/test/cancel_token_test.dart",
    "content": "import 'dart:typed_data' show Uint8List;\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/src/adapters/io_adapter.dart';\nimport 'package:dio_test/util.dart';\nimport 'package:mockito/mockito.dart';\nimport 'package:test/test.dart';\n\nimport 'mock/http_mock.mocks.dart';\n\nvoid main() {\n  group(CancelToken, () {\n    test('cancel returns the correct DioException', () async {\n      final token = CancelToken();\n      const reason = 'cancel';\n\n      expectLater(\n        token.whenCancel,\n        completion(\n          matchesDioException(DioExceptionType.cancel),\n        ),\n      );\n      token.requestOptions = RequestOptions();\n      token.cancel(reason);\n      token.cancel('after cancelled');\n      expect(token.cancelError?.error, reason);\n    });\n\n    test('cancel without use does not throw (#1765)', () async {\n      CancelToken().cancel();\n    });\n\n    test('cancels multiple requests', () async {\n      final client = MockHttpClient();\n      final token = CancelToken();\n      const reason = 'cancel';\n      final dio = Dio()\n        ..httpClientAdapter = IOHttpClientAdapter(\n          createHttpClient: () => client,\n        );\n\n      final requests = <MockHttpClientRequest>[];\n      when(client.openUrl(any, any)).thenAnswer((_) async {\n        final request = MockHttpClientRequest();\n        requests.add(request);\n        when(request.close()).thenAnswer((_) async {\n          final response = MockHttpClientResponse();\n          when(response.headers).thenReturn(MockHttpHeaders());\n          when(response.statusCode).thenReturn(200);\n          await Future.delayed(const Duration(milliseconds: 200));\n          return response;\n        });\n        return request;\n      });\n\n      final futures = [\n        dio.get('https://pub.dev', cancelToken: token),\n        dio.get('https://pub.dev', cancelToken: token),\n      ];\n\n      for (final future in futures) {\n        expectLater(\n          future,\n          throwsDioException(\n            DioExceptionType.cancel,\n            matcher: isA<DioException>().having(\n              (e) => e.error,\n              'error',\n              reason,\n            ),\n          ),\n        );\n      }\n\n      await Future.delayed(const Duration(milliseconds: 100));\n      token.cancel(reason);\n\n      expect(requests, hasLength(2));\n\n      try {\n        await Future.wait(futures);\n      } catch (_) {\n        // ignore, just waiting here till all futures are completed.\n      }\n\n      for (final request in requests) {\n        verify(request.abort()).called(1);\n      }\n    });\n\n    test('throws if cancelled before making requests', () async {\n      final cancelToken = CancelToken();\n\n      bool walkThroughHandlers = false;\n      final interceptor = QueuedInterceptorsWrapper(\n        onRequest: (options, handler) {\n          walkThroughHandlers = true;\n          handler.next(options);\n        },\n      );\n\n      cancelToken.cancel();\n      final dio = Dio();\n      dio.interceptors.add(interceptor);\n      await expectLater(\n        () => dio.get('/test', cancelToken: cancelToken),\n        throwsDioException(\n          DioExceptionType.cancel,\n          matcher: isA<DioException>(),\n        ),\n      );\n      expect(walkThroughHandlers, isFalse);\n    });\n  });\n\n  test(\n    'deallocates HttpClientRequest',\n    () async {\n      final client = MockHttpClient();\n      final dio = Dio();\n      dio.httpClientAdapter = IOHttpClientAdapter(\n        createHttpClient: () => client,\n      );\n      final token = CancelToken();\n      final requests = <MockHttpClientRequest>{};\n      final requestsReferences = <WeakReference<MockHttpClientRequest>>{};\n      when(client.openUrl(any, any)).thenAnswer((_) async {\n        final request = MockHttpClientRequest();\n        requests.add(request);\n        requestsReferences.add(WeakReference(request));\n        when(request.close()).thenAnswer((_) async {\n          final response = MockHttpClientResponse();\n          when(response.headers).thenReturn(MockHttpHeaders());\n          when(response.statusCode).thenReturn(200);\n          when(response.reasonPhrase).thenReturn('OK');\n          when(response.isRedirect).thenReturn(false);\n          when(response.redirects).thenReturn([]);\n          when(response.cast())\n              .thenAnswer((_) => const Stream<Uint8List>.empty());\n          await Future.delayed(const Duration(milliseconds: 200));\n          return response;\n        });\n        when(request.abort()).thenAnswer((realInvocation) {\n          requests.remove(request);\n        });\n        return request;\n      });\n\n      final futures = [\n        dio.get('https://does.not.exists', cancelToken: token),\n        dio.get('https://does.not.exists', cancelToken: token),\n      ];\n      for (final future in futures) {\n        expectLater(\n          future,\n          throwsDioException(DioExceptionType.cancel),\n        );\n      }\n\n      // Opening requests.\n      await Future.delayed(const Duration(milliseconds: 100));\n      token.cancel();\n      // Aborting requests.\n      await Future.delayed(const Duration(seconds: 1));\n      expect(requests, isEmpty);\n\n      try {\n        await Future.wait(futures);\n      } catch (_) {\n        // Waiting here until all futures are completed.\n      }\n      expect(requests, isEmpty);\n      expect(requestsReferences, hasLength(2));\n\n      // GC.\n      produceGarbage();\n      await Future.delayed(const Duration(seconds: 1));\n      expect(requestsReferences.every((e) => e.target == null), isTrue);\n    },\n    tags: ['gc'],\n    testOn: 'vm',\n  );\n}\n"
  },
  {
    "path": "dio/test/connect_timeout_integration_test.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('connectTimeout can be set through Options', () {\n    // Create options with connectTimeout\n    final options = Options(\n      connectTimeout: const Duration(seconds: 10),\n    );\n\n    expect(options.connectTimeout, const Duration(seconds: 10));\n  });\n\n  test('Options connectTimeout overrides BaseOptions', () {\n    final baseOptions = BaseOptions(\n      baseUrl: 'http://example.com',\n      connectTimeout: const Duration(seconds: 5),\n    );\n\n    final options = Options(\n      connectTimeout: const Duration(seconds: 10),\n    );\n\n    final requestOptions = options.compose(baseOptions, '/test');\n    expect(requestOptions.connectTimeout, const Duration(seconds: 10));\n  });\n\n  test('BaseOptions connectTimeout is used when Options does not set it', () {\n    final baseOptions = BaseOptions(\n      baseUrl: 'http://example.com',\n      connectTimeout: const Duration(seconds: 5),\n    );\n\n    final options = Options();\n\n    final requestOptions = options.compose(baseOptions, '/test');\n    expect(requestOptions.connectTimeout, const Duration(seconds: 5));\n  });\n}\n"
  },
  {
    "path": "dio/test/dio_mixin_test.dart",
    "content": "import 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('not thrown for implements', () {\n    expect(_TestDioMixin().interceptors, isA<Interceptors>());\n    expect(_TestDioMixinExtends().interceptors, isA<Interceptors>());\n  });\n\n  test('assureResponse', () {\n    final requestOptions = RequestOptions(path: '');\n    final untypedResponse = Response<dynamic>(\n      requestOptions: requestOptions,\n      data: null,\n    );\n    expect(untypedResponse is Response<int?>, isFalse);\n\n    final typedResponse = DioMixin.assureResponse<int?>(\n      untypedResponse,\n      requestOptions,\n    );\n    expect(typedResponse.data, isNull);\n  });\n\n  test('throws UnimplementedError when calling download', () {\n    expectLater(\n      () => _TestDioMixin().download('a', 'b'),\n      throwsA(const TypeMatcher<UnimplementedError>()),\n    );\n  });\n\n  test('cloned', () {\n    final dio = Dio();\n    final cloned = dio.clone();\n    expect(dio == cloned, false);\n    expect(dio.options, equals(cloned.options));\n    expect(dio.interceptors, equals(cloned.interceptors));\n    expect(dio.httpClientAdapter, equals(cloned.httpClientAdapter));\n    expect(dio.transformer, equals(cloned.transformer));\n    final clonedWithFields = dio.clone(\n      options: BaseOptions(baseUrl: 'http://localhost'),\n      interceptors: Interceptors()..add(InterceptorsWrapper()),\n      httpClientAdapter: _TestAdapter(),\n      transformer: SyncTransformer(),\n    );\n    expect(clonedWithFields.options.baseUrl, equals('http://localhost'));\n    expect(clonedWithFields.interceptors.length, equals(2));\n    expect(clonedWithFields.httpClientAdapter, isA<_TestAdapter>());\n    expect(clonedWithFields.transformer, isA<SyncTransformer>());\n  });\n}\n\nclass _TestDioMixin with DioMixin implements Dio {}\n\nclass _TestDioMixinExtends extends DioMixin implements Dio {}\n\nclass _TestAdapter implements HttpClientAdapter {\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) {\n    throw UnimplementedError();\n  }\n\n  @override\n  void close({bool force = false}) {}\n}\n"
  },
  {
    "path": "dio/test/encoding_test.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group(Transformer.urlEncodeMap, () {\n    final data = {\n      'a': '你好',\n      'b': [5, '6'],\n      'c': {\n        'd': 8,\n        'e': {\n          'a': 5,\n          'b': [66, 8],\n        },\n      },\n    };\n    test('default ', () {\n      // a=你好&b=5&b=6&c[d]=8&c[e][a]=5&c[e][b]=66&c[e][b]=8\n      final result =\n          'a=%E4%BD%A0%E5%A5%BD&b=5&b=6&c%5Bd%5D=8&c%5Be%5D%5Ba%5D=5&c%5Be%5D%5Bb%5D=66&c%5Be%5D%5Bb%5D=8';\n      expect(Transformer.urlEncodeMap(data), result);\n    });\n    test('csv', () {\n      // a=你好&b=5,6&c[d]=8&c[e][a]=5&c[e][b]=66,8\n      final result =\n          'a=%E4%BD%A0%E5%A5%BD&b=5%2C6&c%5Bd%5D=8&c%5Be%5D%5Ba%5D=5&c%5Be%5D%5Bb%5D=66%2C8';\n      expect(Transformer.urlEncodeMap(data, ListFormat.csv), result);\n    });\n    test('ssv', () {\n      // a=你好&b=5+6&c[d]=8&c[e][a]=5&c[e][b]=66+8\n      final result =\n          'a=%E4%BD%A0%E5%A5%BD&b=5+6&c%5Bd%5D=8&c%5Be%5D%5Ba%5D=5&c%5Be%5D%5Bb%5D=66+8';\n      expect(Transformer.urlEncodeMap(data, ListFormat.ssv), result);\n    });\n    test('tsv', () {\n      // a=你好&b=5\\t6&c[d]=8&c[e][a]=5&c[e][b]=66\\t8\n      final result =\n          'a=%E4%BD%A0%E5%A5%BD&b=5%5Ct6&c%5Bd%5D=8&c%5Be%5D%5Ba%5D=5&c%5Be%5D%5Bb%5D=66%5Ct8';\n      expect(Transformer.urlEncodeMap(data, ListFormat.tsv), result);\n    });\n    test('pipe', () {\n      //a=你好&b=5|6&c[d]=8&c[e][a]=5&c[e][b]=66|8\n      final result =\n          'a=%E4%BD%A0%E5%A5%BD&b=5%7C6&c%5Bd%5D=8&c%5Be%5D%5Ba%5D=5&c%5Be%5D%5Bb%5D=66%7C8';\n      expect(Transformer.urlEncodeMap(data, ListFormat.pipes), result);\n    });\n\n    test('multi', () {\n      //a=你好&b[]=5&b[]=6&c[d]=8&c[e][a]=5&c[e][b][]=66&c[e][b][]=8\n      final result =\n          'a=%E4%BD%A0%E5%A5%BD&b%5B%5D=5&b%5B%5D=6&c%5Bd%5D=8&c%5Be%5D%5Ba%5D=5&c%5Be%5D%5Bb%5D%5B%5D=66&c%5Be%5D%5Bb%5D%5B%5D=8';\n      expect(\n        Transformer.urlEncodeMap(data, ListFormat.multiCompatible),\n        result,\n      );\n    });\n\n    test('multi2', () {\n      final data = {\n        'a': 'string',\n        'b': 'another_string',\n        'z': ['string'],\n      };\n      // a=string&b=another_string&z[]=string\n      final result = 'a=string&b=another_string&z%5B%5D=string';\n      expect(\n        Transformer.urlEncodeMap(data, ListFormat.multiCompatible),\n        result,\n      );\n    });\n\n    test('custom', () {\n      final result =\n          'a=%E4%BD%A0%E5%A5%BD&b=5%7C6&c%5Bd%5D=8&c%5Be%5D%5Ba%5D=5&c%5Be%5D%5Bb%5D=foo%2Cbar&c%5Be%5D%5Bc%5D=foo+bar&c%5Be%5D%5Bd%5D=foo&c%5Be%5D%5Bd%5D=bar&c%5Be%5D%5Be%5D=foo%5Ctbar&c%5Be%5D%5Bf%5D%5B%5D=foo&c%5Be%5D%5Bf%5D%5B%5D=bar';\n      expect(\n        Transformer.urlEncodeMap(\n          {\n            'a': '你好',\n            'b': const ListParam<int>([5, 6], ListFormat.pipes),\n            'c': {\n              'd': 8,\n              'e': {\n                'a': 5,\n                'b': const ListParam<String>(['foo', 'bar'], ListFormat.csv),\n                'c': const ListParam<String>(['foo', 'bar'], ListFormat.ssv),\n                'd': const ListParam<String>(['foo', 'bar'], ListFormat.multi),\n                'e': const ListParam<String>(['foo', 'bar'], ListFormat.tsv),\n                'f': [\n                  'foo',\n                  'bar',\n                ], // this uses ListFormat.multiCompatible set below\n              },\n            },\n          },\n          ListFormat.multiCompatible,\n        ),\n        result,\n      );\n    });\n  });\n\n  group(Transformer.urlEncodeQueryMap, () {\n    test(ListFormat.csv, () {\n      expect(\n        Transformer.urlEncodeQueryMap({\n          'foo': const ListParam(['1', '%', '\\$'], ListFormat.csv),\n        }),\n        'foo=1,%25,%24',\n      );\n    });\n\n    test('custom', () {\n      expect(\n        Transformer.urlEncodeQueryMap(\n          {\n            'a': '你好',\n            'b': const ListParam<int>([5, 6], ListFormat.pipes),\n            'c': {\n              'd': 8,\n              'e': {\n                'a': 5,\n                'b': const ListParam<Object>(\n                  ['foo', 'bar', 1, 2.2],\n                  ListFormat.csv,\n                ),\n                'c': const ListParam<Object>(\n                  ['foo', 'bar', 1, 2.2],\n                  ListFormat.ssv,\n                ),\n                'd': const ListParam<Object>(\n                  ['foo', 'bar', 1, 2.2],\n                  ListFormat.multi,\n                ),\n                'e': const ListParam<Object>(\n                  ['foo', 'bar', 1, 2.2],\n                  ListFormat.tsv,\n                ),\n                'f': [\n                  'foo',\n                  'bar',\n                  1,\n                  2.2,\n                ], // this uses ListFormat.multiCompatible set below\n              },\n            },\n          },\n          ListFormat.multiCompatible,\n        ),\n        'a=%E4%BD%A0%E5%A5%BD&b=5|6&c[d]=8&c[e][a]=5&c[e][b]=foo,bar,1,2.2&c[e][c]=foo%20bar%201%202.2&c[e][d]=foo&c[e][d]=bar&c[e][d]=1&c[e][d]=2.2&c[e][e]=foo\\\\tbar\\\\t1\\\\t2.2&c[e][f][]=foo&c[e][f][]=bar&c[e][f][]=1&c[e][f][]=2.2',\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "dio/test/exception_test.dart",
    "content": "@TestOn('vm')\nimport 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  /// https://github.com/cfug/diox/issues/66\n  test('Ensure DioException is an Exception', () {\n    final error = DioException(requestOptions: RequestOptions());\n    expect(error, isA<Exception>());\n  });\n\n  test(\n    'catch DioException: hostname mismatch',\n    () async {\n      DioException? error;\n      try {\n        await Dio().get('https://wrong.host.badssl.com/');\n        fail('did not throw');\n      } on DioException catch (e) {\n        error = e;\n      }\n      expect(error, isNotNull);\n      expect(error.error, isA<HandshakeException>());\n      expect((error.error as HandshakeException).osError, isNotNull);\n      expect(\n        ((error.error as HandshakeException).osError as OSError).message,\n        contains('Hostname mismatch'),\n      );\n    },\n    tags: ['tls'],\n  );\n\n  test(\n    'allow badssl',\n    () async {\n      final dio = Dio();\n      dio.httpClientAdapter = IOHttpClientAdapter(\n        createHttpClient: () {\n          return HttpClient()\n            ..badCertificateCallback = (cert, host, port) => true;\n        },\n      );\n      Response response = await dio.get('https://wrong.host.badssl.com/');\n      expect(response.statusCode, 200);\n      response = await dio.get('https://expired.badssl.com/');\n      expect(response.statusCode, 200);\n      response = await dio.get('https://self-signed.badssl.com/');\n      expect(response.statusCode, 200);\n    },\n    testOn: '!browser',\n  );\n\n  test('DioExceptionReadableStringBuilder', () {\n    final requestOptions = RequestOptions(path: 'just/a/test', method: 'POST');\n    final exception = DioException(\n      requestOptions: requestOptions,\n      response: Response(requestOptions: requestOptions),\n      error: 'test',\n      message: 'test message',\n      stackTrace: StackTrace.current,\n    );\n    DioException.readableStringBuilder = (e) => 'Hey, Dio throws an exception: '\n        '${e.requestOptions.path}, '\n        '${e.requestOptions.method}, '\n        '${e.type}, '\n        '${e.error}, '\n        '${e.stackTrace}, '\n        '${e.message}';\n    expect(\n      exception.toString(),\n      'Hey, Dio throws an exception: '\n      'just/a/test, '\n      'POST, '\n      'DioExceptionType.unknown, '\n      'test, '\n      '${exception.stackTrace}, '\n      'test message',\n    );\n    exception.stringBuilder = (e) => 'Locally override: ${e.message}';\n    expect(exception.toString(), 'Locally override: test message');\n  });\n}\n"
  },
  {
    "path": "dio/test/formdata_test.dart",
    "content": "import 'dart:convert';\nimport 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport 'mock/adapters.dart';\n\nvoid main() async {\n  group(FormData, () {\n    test(\n      'complex',\n      () async {\n        final fm = FormData.fromMap({\n          'name': 'wendux',\n          'age': 25,\n          'path': '/图片空间/地址',\n          'file': MultipartFile.fromString(\n            'hello world.',\n            headers: {\n              'test': <String>['a'],\n            },\n          ),\n          'files': [\n            await MultipartFile.fromFile(\n              'test/mock/_testfile',\n              filename: '1.txt',\n              headers: {\n                'test': <String>['b'],\n              },\n            ),\n            MultipartFile.fromFileSync(\n              'test/mock/_testfile',\n              filename: '2.txt',\n              headers: {\n                'test': <String>['c'],\n              },\n              contentType: DioMediaType.parse('text/plain'),\n            ),\n            MultipartFile.fromBytes(\n              utf8.encode('hello world again.').toList(),\n              filename: '3.txt',\n              headers: {\n                'test': <String>['d'],\n              },\n              contentType: DioMediaType.parse('text/plain'),\n            ),\n          ],\n        });\n        final fmStr = await fm.readAsBytes();\n        final f = File('test/mock/_formdata');\n        String content = f.readAsStringSync();\n        content = content.replaceAll('--dio-boundary-3788753558', fm.boundary);\n        String actual = utf8.decode(fmStr, allowMalformed: true);\n\n        actual = actual.replaceAll('\\r\\n', '\\n');\n        content = content.replaceAll('\\r\\n', '\\n');\n\n        expect(actual, content);\n        expect(fm.readAsBytes(), throwsA(const TypeMatcher<StateError>()));\n\n        final fm1 = FormData();\n        fm1.fields.add(const MapEntry('name', 'wendux'));\n        fm1.fields.add(const MapEntry('age', '25'));\n        fm1.fields.add(const MapEntry('path', '/图片空间/地址'));\n        fm1.files.add(\n          MapEntry(\n            'file',\n            MultipartFile.fromString(\n              'hello world.',\n              headers: {\n                'test': <String>['a'],\n              },\n            ),\n          ),\n        );\n        fm1.files.add(\n          MapEntry(\n            'files',\n            await MultipartFile.fromFile(\n              'test/mock/_testfile',\n              filename: '1.txt',\n              headers: {\n                'test': <String>['b'],\n              },\n            ),\n          ),\n        );\n        fm1.files.add(\n          MapEntry(\n            'files',\n            await MultipartFile.fromFile(\n              'test/mock/_testfile',\n              filename: '2.txt',\n              headers: {\n                'test': <String>['c'],\n              },\n              contentType: DioMediaType.parse('text/plain'),\n            ),\n          ),\n        );\n        fm1.files.add(\n          MapEntry(\n            'files',\n            MultipartFile.fromBytes(\n              utf8.encode('hello world again.'),\n              filename: '3.txt',\n              headers: {\n                'test': <String>['d'],\n              },\n              contentType: DioMediaType.parse('text/plain'),\n            ),\n          ),\n        );\n        expect(fmStr.length, fm1.length);\n      },\n      testOn: 'vm',\n    );\n\n    test(\n      'complex cloning FormData object',\n      () async {\n        final fm = FormData.fromMap({\n          'name': 'wendux',\n          'age': 25,\n          'path': '/图片空间/地址',\n          'file': MultipartFile.fromString(\n            'hello world.',\n            headers: {\n              'test': <String>['a'],\n            },\n          ),\n          'files': [\n            await MultipartFile.fromFile(\n              'test/mock/_testfile',\n              filename: '1.txt',\n              headers: {\n                'test': <String>['b'],\n              },\n            ),\n            MultipartFile.fromFileSync(\n              'test/mock/_testfile',\n              filename: '2.txt',\n              headers: {\n                'test': <String>['c'],\n              },\n              contentType: DioMediaType.parse('text/plain'),\n            ),\n            MultipartFile.fromBytes(\n              utf8.encode('hello world again.'),\n              filename: '3.txt',\n              headers: {\n                'test': <String>['d'],\n              },\n              contentType: DioMediaType.parse('text/plain'),\n            ),\n          ],\n        });\n        final fmStr = await fm.readAsBytes();\n        final f = File('test/mock/_formdata');\n        String content = f.readAsStringSync();\n        content = content.replaceAll('--dio-boundary-3788753558', fm.boundary);\n        String actual = utf8.decode(fmStr, allowMalformed: true);\n\n        actual = actual.replaceAll('\\r\\n', '\\n');\n        content = content.replaceAll('\\r\\n', '\\n');\n\n        expect(actual, content);\n        expect(fm.readAsBytes(), throwsA(const TypeMatcher<StateError>()));\n\n        final fm1 = fm.clone();\n        expect(fm1.isFinalized, false);\n        final fm1Str = await fm1.readAsBytes();\n        expect(fmStr.length, fm1Str.length);\n        expect(fm1.isFinalized, true);\n        expect(fm1 != fm, true);\n        expect(fm1.files[0].value.filename, fm.files[0].value.filename);\n        expect(fm1.fields, fm.fields);\n        expect(fm1.boundary, fm.boundary);\n      },\n      testOn: 'vm',\n    );\n\n    test('encodes maps correctly', () async {\n      final fd = FormData.fromMap(\n        {\n          'items': [\n            {'name': 'foo', 'value': 1},\n            {'name': 'bar', 'value': 2},\n          ],\n          'api': {\n            'dest': '/',\n            'data': {\n              'a': 1,\n              'b': 2,\n              'c': 3,\n            },\n          },\n        },\n        ListFormat.multiCompatible,\n      );\n\n      final data = await fd.readAsBytes();\n      final result = utf8.decode(data, allowMalformed: true);\n\n      expect(result, contains('name=\"items[0][name]\"'));\n      expect(result, contains('name=\"items[0][value]\"'));\n\n      expect(result, contains('name=\"items[1][name]\"'));\n      expect(result, contains('name=\"items[1][value]\"'));\n      expect(result, contains('name=\"items[1][value]\"'));\n\n      expect(result, contains('name=\"api[dest]\"'));\n      expect(result, contains('name=\"api[data][a]\"'));\n      expect(result, contains('name=\"api[data][b]\"'));\n      expect(result, contains('name=\"api[data][c]\"'));\n    });\n\n    test('encodes dynamic Map correctly', () async {\n      final dynamicData = <dynamic, dynamic>{\n        'a': 1,\n        'b': 2,\n        'c': 3,\n      };\n\n      final request = {\n        'api': {\n          'dest': '/',\n          'data': dynamicData,\n        },\n      };\n\n      final fd = FormData.fromMap(request);\n      final data = await fd.readAsBytes();\n      final result = utf8.decode(data, allowMalformed: true);\n      expect(result, contains('name=\"api[dest]\"'));\n      expect(result, contains('name=\"api[data][a]\"'));\n      expect(result, contains('name=\"api[data][b]\"'));\n      expect(result, contains('name=\"api[data][c]\"'));\n    });\n\n    test('posts maps correctly', () async {\n      final fd = FormData.fromMap(\n        {\n          'items': [\n            {'name': 'foo', 'value': 1},\n            {'name': 'bar', 'value': 2},\n          ],\n          'api': {\n            'dest': '/',\n            'data': {\n              'a': 1,\n              'b': 2,\n              'c': 3,\n            },\n          },\n        },\n        ListFormat.multiCompatible,\n      );\n\n      final dio = Dio()\n        ..options.baseUrl = EchoAdapter.mockBase\n        ..httpClientAdapter = EchoAdapter();\n\n      final response = await dio.post(\n        '/post',\n        data: fd,\n      );\n\n      final result = response.data;\n      expect(result, contains('name=\"items[0][name]\"'));\n      expect(result, contains('name=\"items[0][value]\"'));\n\n      expect(result, contains('name=\"items[1][name]\"'));\n      expect(result, contains('name=\"items[1][value]\"'));\n      expect(result, contains('name=\"items[1][value]\"'));\n\n      expect(result, contains('name=\"api[dest]\"'));\n      expect(result, contains('name=\"api[data][a]\"'));\n      expect(result, contains('name=\"api[data][b]\"'));\n      expect(result, contains('name=\"api[data][c]\"'));\n    });\n\n    test('posts maps with a null value item correctly', () async {\n      final fd = FormData.fromMap(\n        {\n          'items': [\n            {'name': 'foo', 'value': 1},\n            {'name': 'bar', 'value': 2},\n            {'name': 'null', 'value': null},\n          ],\n        },\n        ListFormat.multiCompatible,\n      );\n\n      final dio = Dio()\n        ..options.baseUrl = EchoAdapter.mockBase\n        ..httpClientAdapter = EchoAdapter();\n\n      final response = await dio.post(\n        '/post',\n        data: fd,\n      );\n\n      expect(fd.fields[5].value, '');\n\n      final result = response.data;\n      expect(result, contains('name=\"items[0][name]\"'));\n      expect(result, contains('name=\"items[0][value]\"'));\n\n      expect(result, contains('name=\"items[1][name]\"'));\n      expect(result, contains('name=\"items[1][value]\"'));\n\n      expect(result, contains('name=\"items[2][name]\"'));\n      expect(result, contains('name=\"items[2][value]\"'));\n    });\n\n    test('has the correct boundary', () async {\n      final fd1 = FormData();\n      expect(fd1.boundary, matches(RegExp(r'dio-boundary-\\d{10}')));\n      const name = 'test-boundary';\n      final fd2 = FormData(boundaryName: name);\n      expect(fd2.boundary, matches(RegExp('$name-\\\\d{10}')));\n      expect(fd2.boundary.length, name.length + 11);\n      final fd3 = FormData.fromMap(\n        {'test-key': 'test-value'},\n        ListFormat.multi,\n        false,\n        name,\n      );\n      final fd3Data = utf8.decode(await fd3.readAsBytes()).trim();\n      expect(fd3Data, matches(RegExp('.*--$name-\\\\d{10}--\\\\s?\\$')));\n    });\n  });\n}\n"
  },
  {
    "path": "dio/test/headers_test.dart",
    "content": "import 'dart:async';\n\nimport 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group(Headers, () {\n    test('set', () {\n      final headers = Headers.fromMap({\n        'set-cookie': ['k=v', 'k1=v1'],\n        'content-length': ['200'],\n        'test': ['1', '2'],\n      });\n      headers.add('SET-COOKIE', 'k2=v2');\n      expect(headers.value('content-length'), '200');\n      expect(Future(() => headers.value('test')), throwsException);\n      expect(headers['set-cookie']?.length, 3);\n      headers.remove('set-cookie', 'k=v');\n      expect(headers['set-cookie']?.length, 2);\n      headers.removeAll('set-cookie');\n      expect(headers['set-cookie'], isNull);\n      final ls = [];\n      headers.forEach((k, list) => ls.addAll(list));\n      expect(ls.length, 3);\n      expect(headers.toString(), 'content-length: 200\\ntest: 1\\ntest: 2\\n');\n      headers.set('content-length', '300');\n      expect(headers.value('content-length'), '300');\n      headers.set('content-length', ['400']);\n      expect(headers.value('content-length'), '400');\n    });\n\n    test('clear', () {\n      final headers1 = Headers();\n      headers1.set('xx', 'v');\n      expect(headers1.value('xx'), 'v');\n      headers1.clear();\n      expect(headers1.map.isEmpty, isTrue);\n    });\n\n    test('case-sensitive', () {\n      final headers = Headers.fromMap(\n        {\n          'SET-COOKIE': ['k=v', 'k1=v1'],\n          'content-length': ['200'],\n          'Test': ['1', '2'],\n        },\n        preserveHeaderCase: true,\n      );\n      expect(headers['SET-COOKIE']?.length, 2);\n      // Although it's case-sensitive, we still use case-insensitive map.\n      expect(headers['set-cookie']?.length, 2);\n      expect(headers['content-length']?.length, 1);\n      expect(headers['Test']?.length, 2);\n    });\n  });\n}\n"
  },
  {
    "path": "dio/test/interceptor_test.dart",
    "content": "import 'dart:async';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/src/dio_mixin.dart';\nimport 'package:dio/src/interceptors/imply_content_type.dart';\nimport 'package:test/test.dart';\n\nimport 'mock/adapters.dart';\n\nclass MyInterceptor extends Interceptor {\n  int requestCount = 0;\n\n  @override\n  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {\n    requestCount++;\n    return super.onRequest(options, handler);\n  }\n}\n\nvoid main() {\n  test('Throws precise StateError for duplicate calls', () async {\n    const message = 'The `handler` has already been called, '\n        'make sure each handler gets called only once.';\n    final duplicateRequestCallsDio = Dio()\n      ..options.baseUrl = MockAdapter.mockBase\n      ..httpClientAdapter = MockAdapter()\n      ..interceptors.add(\n        InterceptorsWrapper(\n          onRequest: (options, handler) {\n            handler.next(options);\n            handler.next(options);\n          },\n        ),\n      );\n    final duplicateResponseCalls = Dio()\n      ..options.baseUrl = MockAdapter.mockBase\n      ..httpClientAdapter = MockAdapter()\n      ..interceptors.add(\n        InterceptorsWrapper(\n          onResponse: (response, handler) {\n            handler.resolve(response);\n            handler.resolve(response);\n          },\n        ),\n      );\n    final duplicateErrorCalls = Dio()\n      ..options.baseUrl = MockAdapter.mockBase\n      ..httpClientAdapter = MockAdapter()\n      ..interceptors.add(\n        InterceptorsWrapper(\n          onError: (error, handler) {\n            handler.resolve(Response(requestOptions: error.requestOptions));\n            handler.resolve(Response(requestOptions: error.requestOptions));\n          },\n        ),\n      );\n    await expectLater(\n      duplicateRequestCallsDio.get('/test'),\n      throwsA(\n        allOf([\n          isA<DioException>(),\n          (DioException e) => e.error is StateError,\n          (DioException e) => (e.error as StateError).message == message,\n        ]),\n      ),\n    );\n    await expectLater(\n      duplicateResponseCalls.get('/test'),\n      throwsA(\n        allOf([\n          isA<DioException>(),\n          (DioException e) => e.error is StateError,\n          (DioException e) => (e.error as StateError).message == message,\n        ]),\n      ),\n    );\n    await expectLater(\n      duplicateErrorCalls.get('/'),\n      throwsA(\n        allOf([\n          isA<DioException>(),\n          (DioException e) => e.error is StateError,\n          (DioException e) => (e.error as StateError).message == message,\n        ]),\n      ),\n    );\n  });\n\n  group('InterceptorState', () {\n    test('toString()', () {\n      final data = DioException(requestOptions: RequestOptions());\n      final state = InterceptorState<DioException>(data);\n      expect(\n        state.toString(),\n        'InterceptorState<DioException>('\n        'type: InterceptorResultType.next, '\n        'data: DioException [unknown]: null'\n        ')',\n      );\n    });\n  });\n\n  group('Request Interceptor', () {\n    test('interceptor chain', () async {\n      final dio = Dio();\n      dio.options.baseUrl = EchoAdapter.mockBase;\n      dio.httpClientAdapter = EchoAdapter();\n      dio.interceptors\n        ..add(\n          InterceptorsWrapper(\n            onRequest: (reqOpt, handler) {\n              switch (reqOpt.path) {\n                case '/resolve':\n                  handler.resolve(Response(requestOptions: reqOpt, data: 1));\n                  break;\n                case '/resolve-next':\n                  handler.resolve(\n                    Response(requestOptions: reqOpt, data: 2),\n                    true,\n                  );\n                  break;\n                case '/resolve-next/always':\n                  handler.resolve(\n                    Response(requestOptions: reqOpt, data: 2),\n                    true,\n                  );\n                  break;\n                case '/resolve-next/reject':\n                  handler.resolve(\n                    Response(requestOptions: reqOpt, data: 2),\n                    true,\n                  );\n                  break;\n                case '/resolve-next/reject-next':\n                  handler.resolve(\n                    Response(requestOptions: reqOpt, data: 2),\n                    true,\n                  );\n                  break;\n                case '/reject':\n                  handler\n                      .reject(DioException(requestOptions: reqOpt, error: 3));\n                  break;\n                case '/reject-next':\n                  handler.reject(\n                    DioException(requestOptions: reqOpt, error: 4),\n                    true,\n                  );\n                  break;\n                case '/reject-next/reject':\n                  handler.reject(\n                    DioException(requestOptions: reqOpt, error: 5),\n                    true,\n                  );\n                  break;\n                case '/reject-next-response':\n                  handler.reject(\n                    DioException(requestOptions: reqOpt, error: 5),\n                    true,\n                  );\n                  break;\n                default:\n                  handler.next(reqOpt); //continue\n              }\n            },\n            onResponse: (response, ResponseInterceptorHandler handler) {\n              final options = response.requestOptions;\n              switch (options.path) {\n                case '/resolve':\n                  throw 'unexpected1';\n                case '/resolve-next':\n                  response.data++;\n                  handler.resolve(response); //3\n                  break;\n                case '/resolve-next/always':\n                  response.data++;\n                  handler.next(response); //3\n                  break;\n                case '/resolve-next/reject':\n                  handler.reject(\n                    DioException(\n                      requestOptions: options,\n                      error: '/resolve-next/reject',\n                    ),\n                  );\n                  break;\n                case '/resolve-next/reject-next':\n                  handler.reject(\n                    DioException(requestOptions: options, error: ''),\n                    true,\n                  );\n                  break;\n                default:\n                  handler.next(response); //continue\n              }\n            },\n            onError: (error, handler) {\n              if (error.requestOptions.path == '/reject-next-response') {\n                handler.resolve(\n                  Response(\n                    requestOptions: error.requestOptions,\n                    data: 100,\n                  ),\n                );\n              } else if (error.requestOptions.path ==\n                  '/resolve-next/reject-next') {\n                handler.next(error.copyWith(error: 1));\n              } else {\n                if (error.requestOptions.path == '/reject-next/reject') {\n                  handler.reject(error);\n                } else {\n                  int count = error.error as int;\n                  count++;\n                  handler.next(error.copyWith(error: count));\n                }\n              }\n            },\n          ),\n        )\n        ..add(\n          InterceptorsWrapper(\n            onRequest: (options, handler) => handler.next(options),\n            onResponse: (response, handler) {\n              final options = response.requestOptions;\n              switch (options.path) {\n                case '/resolve-next/always':\n                  response.data++;\n                  handler.next(response); //4\n                  break;\n                default:\n                  handler.next(response); //continue\n              }\n            },\n            onError: (error, handler) {\n              if (error.requestOptions.path == '/resolve-next/reject-next') {\n                int count = error.error as int;\n                count++;\n                handler.next(error.copyWith(error: count));\n              } else {\n                int count = error.error as int;\n                count++;\n                handler.next(error.copyWith(error: count));\n              }\n            },\n          ),\n        );\n      Response response = await dio.get('/resolve');\n      expect(response.data, 1);\n      response = await dio.get('/resolve-next');\n\n      expect(response.data, 3);\n\n      response = await dio.get('/resolve-next/always');\n      expect(response.data, 4);\n\n      response = await dio.post('/post', data: 'xxx');\n      expect(response.data, 'xxx');\n\n      response = await dio.get('/reject-next-response');\n      expect(response.data, 100);\n\n      expect(\n        dio.get('/reject').catchError((e) => throw e.error as num),\n        throwsA(3),\n      );\n\n      expect(\n        dio.get('/reject-next').catchError((e) => throw e.error as num),\n        throwsA(6),\n      );\n\n      expect(\n        dio.get('/reject-next/reject').catchError((e) => throw e.error as num),\n        throwsA(5),\n      );\n\n      expect(\n        dio\n            .get('/resolve-next/reject')\n            .catchError((e) => throw e.error as Object),\n        throwsA('/resolve-next/reject'),\n      );\n\n      expect(\n        dio\n            .get('/resolve-next/reject-next')\n            .catchError((e) => throw e.error as num),\n        throwsA(2),\n      );\n    });\n\n    test('unexpected error', () async {\n      final dio = Dio();\n      dio.options.baseUrl = EchoAdapter.mockBase;\n      dio.httpClientAdapter = EchoAdapter();\n      dio.interceptors.add(\n        InterceptorsWrapper(\n          onRequest: (reqOpt, handler) {\n            if (reqOpt.path == '/error') {\n              throw 'unexpected';\n            }\n            handler.next(reqOpt.copyWith(path: '/xxx'));\n          },\n          onError: (error, handler) {\n            handler.next(error.copyWith(error: 'unexpected error'));\n          },\n        ),\n      );\n\n      expect(\n        dio.get('/error').catchError((e) => throw e.error as String),\n        throwsA('unexpected error'),\n      );\n\n      expect(\n        dio.get('/').then((e) => throw e.requestOptions.path),\n        throwsA('/xxx'),\n      );\n    });\n\n    test('request interceptor', () async {\n      final dio = Dio();\n      dio.options.baseUrl = MockAdapter.mockBase;\n      dio.httpClientAdapter = MockAdapter();\n      dio.interceptors.add(\n        InterceptorsWrapper(\n          onRequest: (\n            RequestOptions options,\n            RequestInterceptorHandler handler,\n          ) {\n            switch (options.path) {\n              case '/fakepath1':\n                handler.resolve(\n                  Response(\n                    requestOptions: options,\n                    data: 'fake data',\n                  ),\n                );\n                break;\n              case '/fakepath2':\n                dio\n                    .get('/test')\n                    .then(handler.resolve)\n                    .catchError((e) => handler.reject(e as DioException));\n                break;\n              case '/fakepath3':\n                handler.reject(\n                  DioException(\n                    requestOptions: options,\n                    error: 'test error',\n                  ),\n                );\n                break;\n              case '/fakepath4':\n                handler.reject(\n                  DioException(\n                    requestOptions: options,\n                    error: 'test error',\n                  ),\n                );\n                break;\n              case '/test?tag=1':\n                dio.get('/token').then((response) {\n                  options.headers['token'] = response.data['data']['token'];\n                  handler.next(options);\n                });\n                break;\n              default:\n                handler.next(options); //continue\n            }\n          },\n        ),\n      );\n\n      Response response = await dio.get('/fakepath1');\n      expect(response.data, 'fake data');\n\n      response = await dio.get('/fakepath2');\n      expect(response.data['errCode'], 0);\n\n      expect(\n        dio.get('/fakepath3'),\n        throwsA(\n          isA<DioException>()\n              .having((e) => e.message, 'message', null)\n              .having((e) => e.type, 'error type', DioExceptionType.unknown),\n        ),\n      );\n      expect(\n        dio.get('/fakepath4'),\n        throwsA(\n          isA<DioException>()\n              .having((e) => e.message, 'message', null)\n              .having((e) => e.type, 'error type', DioExceptionType.unknown),\n        ),\n      );\n\n      response = await dio.get('/test');\n      expect(response.data['errCode'], 0);\n      response = await dio.get('/test?tag=1');\n      expect(response.data['errCode'], 0);\n    });\n\n    test('Caught exceptions before handler called', () async {\n      final dio = Dio();\n      const errorMsg = 'interceptor error';\n      dio.interceptors.add(\n        InterceptorsWrapper(\n          // TODO(EVERYONE): Remove the ignorance once we migrated to a higher version of Dart.\n          // ignore: void_checks\n          onRequest: (response, handler) {\n            throw UnsupportedError(errorMsg);\n          },\n        ),\n      );\n      expect(\n        dio.get('https://www.cloudflare.com'),\n        throwsA(\n          isA<DioException>().having(\n            (dioException) => dioException.error,\n            'Exception',\n            isA<UnsupportedError>()\n                .having((e) => e.message, 'message', errorMsg),\n          ),\n        ),\n      );\n    });\n\n    group(ImplyContentTypeInterceptor, () {\n      Dio createDio() {\n        final dio = Dio();\n        dio.options.baseUrl = EchoAdapter.mockBase;\n        dio.httpClientAdapter = EchoAdapter();\n        return dio;\n      }\n\n      test('is enabled by default', () async {\n        final dio = createDio();\n        expect(\n          dio.interceptors.whereType<ImplyContentTypeInterceptor>(),\n          isNotEmpty,\n        );\n      });\n\n      test('can be removed with the helper method', () async {\n        final dio = createDio();\n        dio.interceptors.removeImplyContentTypeInterceptor();\n        expect(\n          dio.interceptors.whereType<ImplyContentTypeInterceptor>(),\n          isEmpty,\n        );\n      });\n\n      test('ignores null data', () async {\n        final dio = createDio();\n        final response = await dio.get('/echo');\n        expect(response.requestOptions.contentType, isNull);\n      });\n\n      test('does not override existing content type', () async {\n        final dio = createDio();\n        final response = await dio.get(\n          '/echo',\n          data: 'hello',\n          options: Options(headers: {'Content-Type': 'text/plain'}),\n        );\n        expect(response.requestOptions.contentType, 'text/plain');\n      });\n\n      test('ignores unsupported data type', () async {\n        final dio = createDio();\n        final response = await dio.get('/echo', data: 42);\n        expect(response.requestOptions.contentType, isNull);\n      });\n\n      test('sets application/json for String instances', () async {\n        final dio = createDio();\n        final response = await dio.get('/echo', data: 'hello');\n        expect(response.requestOptions.contentType, 'application/json');\n      });\n\n      test('sets application/json for Map instances', () async {\n        final dio = createDio();\n        final response = await dio.get('/echo', data: {'hello': 'there'});\n        expect(response.requestOptions.contentType, 'application/json');\n      });\n\n      test('sets application/json for List<Map> instances', () async {\n        final dio = createDio();\n        final response = await dio.get(\n          '/echo',\n          data: [\n            {'hello': 'here'},\n            {'hello': 'there'},\n          ],\n        );\n        expect(response.requestOptions.contentType, 'application/json');\n      });\n\n      test('sets multipart/form-data for FormData instances', () async {\n        final dio = createDio();\n        final response = await dio.get(\n          '/echo',\n          data: FormData.fromMap({'hello': 'there'}),\n        );\n        expect(\n          response.requestOptions.contentType?.split(';').first,\n          'multipart/form-data',\n        );\n      });\n    });\n  });\n\n  group('Response interceptor', () {\n    Dio dio;\n    test('Response Interceptor', () async {\n      const urlNotFound = '/404/';\n      const urlNotFound1 = '${urlNotFound}1';\n      const urlNotFound2 = '${urlNotFound}2';\n      const urlNotFound3 = '${urlNotFound}3';\n\n      dio = Dio();\n      dio.httpClientAdapter = MockAdapter();\n      dio.options.baseUrl = MockAdapter.mockBase;\n\n      dio.interceptors.add(\n        InterceptorsWrapper(\n          onResponse: (response, handler) {\n            response.data = response.data['data'];\n            handler.next(response);\n          },\n          onError: (DioException error, ErrorInterceptorHandler handler) {\n            final response = error.response;\n            if (response != null) {\n              switch (response.requestOptions.path) {\n                case urlNotFound:\n                  return handler.next(error);\n                case urlNotFound1:\n                  return handler.resolve(\n                    Response(\n                      requestOptions: error.requestOptions,\n                      data: 'fake data',\n                    ),\n                  );\n                case urlNotFound2:\n                  return handler.resolve(\n                    Response(\n                      data: 'fake data',\n                      requestOptions: error.requestOptions,\n                    ),\n                  );\n                case urlNotFound3:\n                  return handler.next(\n                    error.copyWith(\n                      error: 'custom error info [${response.statusCode}]',\n                    ),\n                  );\n              }\n            }\n            handler.next(error);\n          },\n        ),\n      );\n      Response response = await dio.get('/test');\n      expect(response.data['path'], '/test');\n      expect(\n        dio\n            .get(urlNotFound)\n            .catchError((e) => throw (e as DioException).response!.statusCode!),\n        throwsA(404),\n      );\n      response = await dio.get('${urlNotFound}1');\n      expect(response.data, 'fake data');\n      response = await dio.get('${urlNotFound}2');\n      expect(response.data, 'fake data');\n      expect(\n        dio.get('${urlNotFound}3').catchError((e) => throw e as DioException),\n        throwsA(isA<DioException>()),\n      );\n    });\n    test('multi response interceptor', () async {\n      dio = Dio();\n      dio.httpClientAdapter = MockAdapter();\n      dio.options.baseUrl = MockAdapter.mockBase;\n      dio.interceptors\n        ..add(\n          InterceptorsWrapper(\n            onResponse: (resp, handler) {\n              resp.data = resp.data['data'];\n              handler.next(resp);\n            },\n          ),\n        )\n        ..add(\n          InterceptorsWrapper(\n            onResponse: (resp, handler) {\n              resp.data['extra_1'] = 'extra';\n              handler.next(resp);\n            },\n          ),\n        )\n        ..add(\n          InterceptorsWrapper(\n            onResponse: (resp, handler) {\n              resp.data['extra_2'] = 'extra';\n              handler.next(resp);\n            },\n          ),\n        );\n      final resp = await dio.get('/test');\n      expect(resp.data['path'], '/test');\n      expect(resp.data['extra_1'], 'extra');\n      expect(resp.data['extra_2'], 'extra');\n    });\n  });\n\n  group('Error Interceptor', () {\n    test('handled when request cancelled', () async {\n      final cancelToken = CancelToken();\n      DioException? iError, qError;\n      final dio = Dio()\n        ..httpClientAdapter = MockAdapter()\n        ..options.baseUrl = MockAdapter.mockBase\n        ..interceptors.add(\n          InterceptorsWrapper(\n            onError: (DioException error, ErrorInterceptorHandler handler) {\n              iError = error;\n              handler.next(error);\n            },\n          ),\n        )\n        ..interceptors.add(\n          QueuedInterceptorsWrapper(\n            onError: (DioException error, ErrorInterceptorHandler handler) {\n              qError = error;\n              handler.next(error);\n            },\n          ),\n        );\n      Future.delayed(const Duration(seconds: 1)).then((_) {\n        cancelToken.cancel('test');\n      });\n      await dio\n          .get('/test-timeout', cancelToken: cancelToken)\n          .then((_) {}, onError: (_) {});\n      expect(iError, isA<DioException>());\n      expect(qError, isA<DioException>());\n    });\n  });\n\n  group('QueuedInterceptor', () {\n    test('requests ', () async {\n      String? csrfToken;\n      final dio = Dio();\n      int tokenRequestCounts = 0;\n      // dio instance to request token\n      final tokenDio = Dio();\n      dio.options.baseUrl = tokenDio.options.baseUrl = MockAdapter.mockBase;\n      dio.httpClientAdapter = tokenDio.httpClientAdapter = MockAdapter();\n      final myInter = MyInterceptor();\n      dio.interceptors.add(myInter);\n      dio.interceptors.add(\n        QueuedInterceptorsWrapper(\n          onRequest: (options, handler) {\n            if (csrfToken == null) {\n              tokenRequestCounts++;\n              tokenDio.get('/token').then((d) {\n                options.headers['csrfToken'] =\n                    csrfToken = d.data['data']['token'] as String;\n                handler.next(options);\n              }).catchError((e) {\n                handler.reject(e as DioException, true);\n              });\n            } else {\n              options.headers['csrfToken'] = csrfToken;\n              handler.next(options);\n            }\n          },\n        ),\n      );\n\n      int result = 0;\n      void onResult(d) {\n        if (tokenRequestCounts > 0) {\n          ++result;\n        }\n      }\n\n      await Future.wait([\n        dio.get('/test?tag=1').then(onResult),\n        dio.get('/test?tag=2').then(onResult),\n        dio.get('/test?tag=3').then(onResult),\n      ]);\n      expect(tokenRequestCounts, 1);\n      expect(result, 3);\n      expect(myInter.requestCount, predicate((int e) => e > 0));\n      // The `ImplyContentTypeInterceptor` will be replaced.\n      dio.interceptors[0] = myInter;\n      dio.interceptors.clear();\n      expect(dio.interceptors.isEmpty, true);\n    });\n\n    test('error', () async {\n      String? csrfToken;\n      final dio = Dio();\n      int tokenRequestCounts = 0;\n      // dio instance to request token\n      final tokenDio = Dio();\n      dio.options.baseUrl = tokenDio.options.baseUrl = MockAdapter.mockBase;\n      dio.httpClientAdapter = tokenDio.httpClientAdapter = MockAdapter();\n      dio.interceptors.add(\n        QueuedInterceptorsWrapper(\n          onRequest: (opt, handler) {\n            opt.headers['csrfToken'] = csrfToken;\n            handler.next(opt);\n          },\n          onError: (error, handler) {\n            // Assume 401 stands for token expired\n            if (error.response?.statusCode == 401) {\n              final options = error.response!.requestOptions;\n              // If the token has been updated, repeat directly.\n              if (csrfToken != options.headers['csrfToken']) {\n                options.headers['csrfToken'] = csrfToken;\n                //repeat\n                dio\n                    .fetch(options)\n                    .then(handler.resolve)\n                    .catchError((e) => handler.reject(e as DioException));\n                return;\n              }\n              // update token and repeat\n              tokenRequestCounts++;\n              tokenDio.get('/token').then((d) {\n                //update csrfToken\n                options.headers['csrfToken'] =\n                    csrfToken = d.data['data']['token'] as String;\n              }).then((e) {\n                //repeat\n                dio\n                    .fetch(options)\n                    .then(handler.resolve)\n                    .catchError((e) => handler.reject(e as DioException));\n              });\n            } else {\n              handler.next(error);\n            }\n          },\n        ),\n      );\n\n      int result = 0;\n      void onResult(d) {\n        if (tokenRequestCounts > 0) {\n          ++result;\n        }\n      }\n\n      await Future.wait([\n        dio.get('/test-auth?tag=1').then(onResult),\n        dio.get('/test-auth?tag=2').then(onResult),\n        dio.get('/test-auth?tag=3').then(onResult),\n      ]);\n      expect(tokenRequestCounts, 1);\n      expect(result, 3);\n    });\n  });\n\n  group('LogInterceptor', () {\n    test('requestUrl controls URL logging in requests', () async {\n      final dio = Dio();\n      dio.options.baseUrl = MockAdapter.mockBase;\n      dio.httpClientAdapter = MockAdapter();\n\n      final logs = <String>[];\n      dio.interceptors.add(\n        LogInterceptor(\n          requestUrl: true,\n          requestHeader: false,\n          requestBody: false,\n          request: false,\n          responseUrl: false,\n          responseHeader: false,\n          responseBody: false,\n          logPrint: (o) => logs.add(o.toString()),\n        ),\n      );\n\n      await dio.get('/test');\n\n      expect(logs.any((log) => log.contains('*** Request ***')), true);\n      expect(logs.any((log) => log.contains('uri:')), true);\n      expect(logs.any((log) => log.contains('/test')), true);\n    });\n\n    test('requestUrl=false prevents URL logging in requests', () async {\n      final dio = Dio();\n      dio.options.baseUrl = MockAdapter.mockBase;\n      dio.httpClientAdapter = MockAdapter();\n\n      final logs = <String>[];\n      dio.interceptors.add(\n        LogInterceptor(\n          requestUrl: false,\n          requestHeader: false,\n          requestBody: false,\n          request: false,\n          responseUrl: false,\n          responseHeader: false,\n          responseBody: false,\n          logPrint: (o) => logs.add(o.toString()),\n        ),\n      );\n\n      await dio.get('/test');\n\n      expect(logs.any((log) => log.contains('*** Request ***')), false);\n      expect(logs.any((log) => log.contains('uri:')), false);\n    });\n\n    test('responseUrl controls URL logging in responses', () async {\n      final dio = Dio();\n      dio.options.baseUrl = MockAdapter.mockBase;\n      dio.httpClientAdapter = MockAdapter();\n\n      final logs = <String>[];\n      dio.interceptors.add(\n        LogInterceptor(\n          requestUrl: false,\n          requestHeader: false,\n          requestBody: false,\n          request: false,\n          responseUrl: true,\n          responseHeader: false,\n          responseBody: false,\n          logPrint: (o) => logs.add(o.toString()),\n        ),\n      );\n\n      await dio.get('/test');\n\n      expect(logs.any((log) => log.contains('*** Response ***')), true);\n      expect(logs.any((log) => log.contains('uri:')), true);\n      expect(logs.any((log) => log.contains('/test')), true);\n    });\n\n    test('responseUrl=false prevents URL logging in responses', () async {\n      final dio = Dio();\n      dio.options.baseUrl = MockAdapter.mockBase;\n      dio.httpClientAdapter = MockAdapter();\n\n      final logs = <String>[];\n      dio.interceptors.add(\n        LogInterceptor(\n          requestUrl: false,\n          requestHeader: false,\n          requestBody: false,\n          request: false,\n          responseUrl: false,\n          responseHeader: false,\n          responseBody: false,\n          logPrint: (o) => logs.add(o.toString()),\n        ),\n      );\n\n      await dio.get('/test');\n\n      expect(logs.any((log) => log.contains('*** Response ***')), false);\n    });\n\n    test('requestUrl and responseUrl work independently', () async {\n      final dio = Dio();\n      dio.options.baseUrl = MockAdapter.mockBase;\n      dio.httpClientAdapter = MockAdapter();\n\n      // Test: requestUrl=true, responseUrl=false\n      final logs1 = <String>[];\n      dio.interceptors.clear();\n      dio.interceptors.add(\n        LogInterceptor(\n          requestUrl: true,\n          requestHeader: false,\n          requestBody: false,\n          request: false,\n          responseUrl: false,\n          responseHeader: false,\n          responseBody: false,\n          logPrint: (o) => logs1.add(o.toString()),\n        ),\n      );\n\n      await dio.get('/test');\n\n      expect(logs1.any((log) => log.contains('*** Request ***')), true);\n      expect(logs1.any((log) => log.contains('*** Response ***')), false);\n\n      // Test: requestUrl=false, responseUrl=true\n      final logs2 = <String>[];\n      dio.interceptors.clear();\n      dio.interceptors.add(\n        LogInterceptor(\n          requestUrl: false,\n          requestHeader: false,\n          requestBody: false,\n          request: false,\n          responseUrl: true,\n          responseHeader: false,\n          responseBody: false,\n          logPrint: (o) => logs2.add(o.toString()),\n        ),\n      );\n\n      await dio.get('/test');\n\n      expect(logs2.any((log) => log.contains('*** Request ***')), false);\n      expect(logs2.any((log) => log.contains('*** Response ***')), true);\n    });\n\n    test('requestUrl can be combined with other request flags', () async {\n      final dio = Dio();\n      dio.options.baseUrl = MockAdapter.mockBase;\n      dio.httpClientAdapter = MockAdapter();\n\n      final logs = <String>[];\n      dio.interceptors.add(\n        LogInterceptor(\n          requestUrl: true,\n          requestHeader: true,\n          requestBody: true,\n          request: true,\n          responseUrl: false,\n          responseHeader: false,\n          responseBody: false,\n          logPrint: (o) => logs.add(o.toString()),\n        ),\n      );\n\n      await dio.get('/test');\n\n      expect(logs.any((log) => log.contains('*** Request ***')), true);\n      expect(logs.any((log) => log.contains('uri:')), true);\n      expect(logs.any((log) => log.contains('method:')), true);\n      expect(logs.any((log) => log.contains('headers:')), true);\n    });\n\n    test('responseUrl can be combined with other response flags', () async {\n      final dio = Dio();\n      dio.options.baseUrl = MockAdapter.mockBase;\n      dio.httpClientAdapter = MockAdapter();\n\n      final logs = <String>[];\n      dio.interceptors.add(\n        LogInterceptor(\n          requestUrl: false,\n          requestHeader: false,\n          requestBody: false,\n          request: false,\n          responseUrl: true,\n          responseHeader: true,\n          responseBody: true,\n          logPrint: (o) => logs.add(o.toString()),\n        ),\n      );\n\n      await dio.get('/test');\n\n      expect(logs.any((log) => log.contains('*** Response ***')), true);\n      expect(logs.any((log) => log.contains('uri:')), true);\n      expect(logs.any((log) => log.contains('statusCode:')), true);\n      expect(logs.any((log) => log.contains('headers:')), true);\n    });\n\n    test('default values enable requestUrl and responseUrl', () {\n      final interceptor = LogInterceptor();\n      expect(interceptor.requestUrl, true);\n      expect(interceptor.responseUrl, true);\n    });\n  });\n\n  test('Size of Interceptors', () {\n    final interceptors1 = Dio().interceptors;\n    expect(interceptors1.length, equals(1));\n    expect(interceptors1, isNotEmpty);\n    interceptors1.add(InterceptorsWrapper());\n    expect(interceptors1.length, equals(2));\n    expect(interceptors1, isNotEmpty);\n    interceptors1.clear();\n    expect(interceptors1.length, equals(1));\n    expect(interceptors1.single, isA<ImplyContentTypeInterceptor>());\n    interceptors1.clear(keepImplyContentTypeInterceptor: false);\n    expect(interceptors1.length, equals(0));\n    expect(interceptors1, isEmpty);\n\n    final interceptors2 = Interceptors()..add(LogInterceptor());\n    expect(interceptors2.length, equals(2));\n    expect(interceptors2.last, isA<LogInterceptor>());\n\n    final interceptors3 = Interceptors(initialInterceptors: [LogInterceptor()]);\n    expect(interceptors3.length, equals(2));\n    expect(interceptors2.last, isA<LogInterceptor>());\n  });\n}\n"
  },
  {
    "path": "dio/test/mimetype_test.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('application/json', () {\n    expect(Transformer.isJsonMimeType('application/json'), isTrue);\n  });\n\n  test('text/json', () {\n    expect(Transformer.isJsonMimeType('text/json'), isTrue);\n  });\n\n  test('application/vnd.example.com+json', () {\n    expect(\n      Transformer.isJsonMimeType('application/vnd.example.com+json'),\n      isTrue,\n    );\n  });\n}\n"
  },
  {
    "path": "dio/test/mock/_formdata",
    "content": "----dio-boundary-3788753558\ncontent-disposition: form-data; name=\"name\"\n\nwendux\n----dio-boundary-3788753558\ncontent-disposition: form-data; name=\"age\"\n\n25\n----dio-boundary-3788753558\ncontent-disposition: form-data; name=\"path\"\n\n/图片空间/地址\n----dio-boundary-3788753558\ncontent-disposition: form-data; name=\"file\"\ncontent-type: text/plain; charset=utf-8\ntest: a\n\nhello world.\n----dio-boundary-3788753558\ncontent-disposition: form-data; name=\"files\"; filename=\"1.txt\"\ncontent-type: text/plain\ntest: b\n\n你好世界，\n我很好人类\n哈哈哈哈哈😆\n\n----dio-boundary-3788753558\ncontent-disposition: form-data; name=\"files\"; filename=\"2.txt\"\ncontent-type: text/plain\ntest: c\n\n你好世界，\n我很好人类\n哈哈哈哈哈😆\n\n----dio-boundary-3788753558\ncontent-disposition: form-data; name=\"files\"; filename=\"3.txt\"\ncontent-type: text/plain\ntest: d\n\nhello world again.\n----dio-boundary-3788753558--\n"
  },
  {
    "path": "dio/test/mock/_testfile",
    "content": "你好世界，\n我很好人类\n哈哈哈哈哈😆\n"
  },
  {
    "path": "dio/test/mock/adapters.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\n\nclass MockAdapter implements HttpClientAdapter {\n  static const mockHost = 'mockserver';\n  static const mockBase = 'https://$mockHost';\n  final _adapter = IOHttpClientAdapter();\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) async {\n    final uri = options.uri;\n    if (uri.host == mockHost) {\n      switch (uri.path) {\n        case '/test':\n          return ResponseBody.fromString(\n            jsonEncode({\n              'errCode': 0,\n              'data': {'path': uri.path},\n            }),\n            200,\n            headers: {\n              Headers.contentTypeHeader: [Headers.jsonContentType],\n            },\n          );\n        case '/test-auth':\n          return Future.delayed(const Duration(milliseconds: 300), () {\n            if (options.headers['csrfToken'] == null) {\n              return ResponseBody.fromString(\n                jsonEncode({\n                  'errCode': -1,\n                  'data': {'path': uri.path},\n                }),\n                401,\n                headers: {\n                  Headers.contentTypeHeader: [Headers.jsonContentType],\n                },\n              );\n            }\n            return ResponseBody.fromString(\n              jsonEncode({\n                'errCode': 0,\n                'data': {'path': uri.path},\n              }),\n              200,\n              headers: {\n                Headers.contentTypeHeader: [Headers.jsonContentType],\n              },\n            );\n          });\n        case '/download':\n          return Future.delayed(const Duration(milliseconds: 300), () {\n            return ResponseBody(\n              File('./README.md').openRead().cast<Uint8List>(),\n              200,\n              headers: {\n                Headers.contentLengthHeader: [\n                  File('./README.md').lengthSync().toString(),\n                ],\n              },\n            );\n          });\n        case '/token':\n          final t = 'ABCDEFGHIJKLMN'.split('')..shuffle();\n          return ResponseBody.fromBytes(\n            utf8.encode(\n              jsonEncode({\n                'errCode': 0,\n                'data': {'token': t.join()},\n              }),\n            ),\n            200,\n            headers: {\n              Headers.contentTypeHeader: [Headers.jsonContentType],\n            },\n          );\n        case '/test-plain-text-content-type':\n          return ResponseBody.fromString(\n            '{\"code\":0,\"result\":\"ok\"}',\n            200,\n            headers: {\n              Headers.contentTypeHeader: [Headers.textPlainContentType],\n            },\n          );\n        case '/test-timeout':\n          await Future.delayed(const Duration(days: 365));\n          return ResponseBody.fromString('', 200);\n        default:\n          return ResponseBody.fromString('', 404);\n      }\n    }\n    return _adapter.fetch(options, requestStream, cancelFuture);\n  }\n\n  @override\n  void close({bool force = false}) {\n    _adapter.close(force: force);\n  }\n}\n\n/// [EchoAdapter] will return the data as-is\n/// if the host is [EchoAdapter.mockHost].\nclass EchoAdapter implements HttpClientAdapter {\n  static const String mockHost = 'mockserver';\n  static const String mockBase = 'https://$mockHost';\n\n  final HttpClientAdapter _adapter = IOHttpClientAdapter();\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) async {\n    final Uri uri = options.uri;\n    if (uri.host == mockHost) {\n      final statusCode = int.tryParse(uri.path.replaceFirst('/', '')) ?? 200;\n      if (requestStream != null) {\n        return ResponseBody(requestStream, statusCode);\n      } else {\n        return ResponseBody.fromString(uri.path, statusCode);\n      }\n    }\n    return _adapter.fetch(options, requestStream, cancelFuture);\n  }\n\n  @override\n  void close({bool force = false}) {\n    _adapter.close(force: force);\n  }\n}\n"
  },
  {
    "path": "dio/test/mock/http_mock.dart",
    "content": "import 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:mockito/annotations.dart';\n\nimport 'http_mock.mocks.dart';\n\nfinal httpClientMock = MockHttpClient();\n\n@GenerateMocks(\n  [],\n  customMocks: [\n    MockSpec<HttpClient>(),\n    MockSpec<HttpClientRequest>(),\n    MockSpec<HttpClientResponse>(),\n    MockSpec<HttpHeaders>(),\n    MockSpec<Transformer>(),\n  ],\n)\nclass MockHttpOverrides extends HttpOverrides {\n  @override\n  HttpClient createHttpClient(SecurityContext? context) {\n    return httpClientMock;\n  }\n}\n"
  },
  {
    "path": "dio/test/mock/http_mock.mocks.dart",
    "content": "// Mocks generated by Mockito 5.2.0 from annotations\n// in dio/test/mock/http_mock.dart.\n// Do not manually edit this file.\n\nimport 'dart:async' as _i4;\nimport 'dart:convert' as _i3;\nimport 'dart:io' as _i2;\n\nimport 'package:dio/src/adapter.dart' as _i7;\nimport 'package:dio/src/options.dart' as _i6;\nimport 'package:dio/src/transformer.dart' as _i5;\nimport 'package:mockito/mockito.dart' as _i1;\n\n// ignore_for_file: type=lint\n// ignore_for_file: avoid_redundant_argument_values\n// ignore_for_file: avoid_setters_without_getters\n// ignore_for_file: comment_references\n// ignore_for_file: implementation_imports\n// ignore_for_file: invalid_use_of_visible_for_testing_member\n// ignore_for_file: prefer_const_constructors\n// ignore_for_file: unnecessary_parenthesis\n// ignore_for_file: camel_case_types\n\nclass _FakeDuration_0 extends _i1.Fake implements Duration {}\n\nclass _FakeHttpClientRequest_1 extends _i1.Fake\n    implements _i2.HttpClientRequest {}\n\nclass _FakeUri_2 extends _i1.Fake implements Uri {}\n\nclass _FakeHttpHeaders_3 extends _i1.Fake implements _i2.HttpHeaders {}\n\nclass _FakeHttpClientResponse_4 extends _i1.Fake\n    implements _i2.HttpClientResponse {}\n\nclass _FakeEncoding_5 extends _i1.Fake implements _i3.Encoding {}\n\nclass _FakeSocket_6 extends _i1.Fake implements _i2.Socket {}\n\nclass _FakeStreamSubscription_7<T> extends _i1.Fake\n    implements _i4.StreamSubscription<T> {}\n\n/// A class which mocks [HttpClient].\n///\n/// See the documentation for Mockito's code generation for more information.\nclass MockHttpClient extends _i1.Mock implements _i2.HttpClient {\n  MockHttpClient() {\n    _i1.throwOnMissingStub(this);\n  }\n\n  @override\n  Duration get idleTimeout =>\n      (super.noSuchMethod(Invocation.getter(#idleTimeout),\n          returnValue: _FakeDuration_0()) as Duration);\n  @override\n  set idleTimeout(Duration? _idleTimeout) =>\n      super.noSuchMethod(Invocation.setter(#idleTimeout, _idleTimeout),\n          returnValueForMissingStub: null);\n  @override\n  set connectionTimeout(Duration? _connectionTimeout) => super.noSuchMethod(\n      Invocation.setter(#connectionTimeout, _connectionTimeout),\n      returnValueForMissingStub: null);\n  @override\n  set maxConnectionsPerHost(int? _maxConnectionsPerHost) => super.noSuchMethod(\n      Invocation.setter(#maxConnectionsPerHost, _maxConnectionsPerHost),\n      returnValueForMissingStub: null);\n  @override\n  bool get autoUncompress => (super\n          .noSuchMethod(Invocation.getter(#autoUncompress), returnValue: false)\n      as bool);\n  @override\n  set autoUncompress(bool? _autoUncompress) =>\n      super.noSuchMethod(Invocation.setter(#autoUncompress, _autoUncompress),\n          returnValueForMissingStub: null);\n  @override\n  set userAgent(String? _userAgent) =>\n      super.noSuchMethod(Invocation.setter(#userAgent, _userAgent),\n          returnValueForMissingStub: null);\n  @override\n  set authenticate(_i4.Future<bool> Function(Uri, String, String?)? f) =>\n      super.noSuchMethod(Invocation.setter(#authenticate, f),\n          returnValueForMissingStub: null);\n  @override\n  set findProxy(String Function(Uri)? f) =>\n      super.noSuchMethod(Invocation.setter(#findProxy, f),\n          returnValueForMissingStub: null);\n  @override\n  set authenticateProxy(\n          _i4.Future<bool> Function(String, int, String, String?)? f) =>\n      super.noSuchMethod(Invocation.setter(#authenticateProxy, f),\n          returnValueForMissingStub: null);\n  @override\n  set badCertificateCallback(\n          bool Function(_i2.X509Certificate, String, int)? callback) =>\n      super.noSuchMethod(Invocation.setter(#badCertificateCallback, callback),\n          returnValueForMissingStub: null);\n  @override\n  _i4.Future<_i2.HttpClientRequest> open(\n          String? method, String? host, int? port, String? path) =>\n      (super.noSuchMethod(Invocation.method(#open, [method, host, port, path]),\n              returnValue: Future<_i2.HttpClientRequest>.value(\n                  _FakeHttpClientRequest_1()))\n          as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> openUrl(String? method, Uri? url) =>\n      (super.noSuchMethod(Invocation.method(#openUrl, [method, url]),\n              returnValue: Future<_i2.HttpClientRequest>.value(\n                  _FakeHttpClientRequest_1()))\n          as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> get(\n          String? host, int? port, String? path) =>\n      (super.noSuchMethod(Invocation.method(#get, [host, port, path]),\n              returnValue: Future<_i2.HttpClientRequest>.value(\n                  _FakeHttpClientRequest_1()))\n          as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> getUrl(Uri? url) => (super.noSuchMethod(\n          Invocation.method(#getUrl, [url]),\n          returnValue:\n              Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1()))\n      as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> post(\n          String? host, int? port, String? path) =>\n      (super.noSuchMethod(Invocation.method(#post, [host, port, path]),\n              returnValue: Future<_i2.HttpClientRequest>.value(\n                  _FakeHttpClientRequest_1()))\n          as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> postUrl(Uri? url) => (super.noSuchMethod(\n          Invocation.method(#postUrl, [url]),\n          returnValue:\n              Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1()))\n      as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> put(\n          String? host, int? port, String? path) =>\n      (super.noSuchMethod(Invocation.method(#put, [host, port, path]),\n              returnValue: Future<_i2.HttpClientRequest>.value(\n                  _FakeHttpClientRequest_1()))\n          as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> putUrl(Uri? url) => (super.noSuchMethod(\n          Invocation.method(#putUrl, [url]),\n          returnValue:\n              Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1()))\n      as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> delete(\n          String? host, int? port, String? path) =>\n      (super.noSuchMethod(Invocation.method(#delete, [host, port, path]),\n              returnValue: Future<_i2.HttpClientRequest>.value(\n                  _FakeHttpClientRequest_1()))\n          as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> deleteUrl(Uri? url) => (super.noSuchMethod(\n          Invocation.method(#deleteUrl, [url]),\n          returnValue:\n              Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1()))\n      as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> patch(\n          String? host, int? port, String? path) =>\n      (super.noSuchMethod(Invocation.method(#patch, [host, port, path]),\n              returnValue: Future<_i2.HttpClientRequest>.value(\n                  _FakeHttpClientRequest_1()))\n          as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> patchUrl(Uri? url) => (super.noSuchMethod(\n          Invocation.method(#patchUrl, [url]),\n          returnValue:\n              Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1()))\n      as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> head(\n          String? host, int? port, String? path) =>\n      (super.noSuchMethod(Invocation.method(#head, [host, port, path]),\n              returnValue: Future<_i2.HttpClientRequest>.value(\n                  _FakeHttpClientRequest_1()))\n          as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  _i4.Future<_i2.HttpClientRequest> headUrl(Uri? url) => (super.noSuchMethod(\n          Invocation.method(#headUrl, [url]),\n          returnValue:\n              Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1()))\n      as _i4.Future<_i2.HttpClientRequest>);\n  @override\n  void addCredentials(\n          Uri? url, String? realm, _i2.HttpClientCredentials? credentials) =>\n      super.noSuchMethod(\n          Invocation.method(#addCredentials, [url, realm, credentials]),\n          returnValueForMissingStub: null);\n  @override\n  void addProxyCredentials(String? host, int? port, String? realm,\n          _i2.HttpClientCredentials? credentials) =>\n      super.noSuchMethod(\n          Invocation.method(\n              #addProxyCredentials, [host, port, realm, credentials]),\n          returnValueForMissingStub: null);\n  @override\n  void close({bool? force = false}) =>\n      super.noSuchMethod(Invocation.method(#close, [], {#force: force}),\n          returnValueForMissingStub: null);\n}\n\n/// A class which mocks [HttpClientRequest].\n///\n/// See the documentation for Mockito's code generation for more information.\nclass MockHttpClientRequest extends _i1.Mock implements _i2.HttpClientRequest {\n  MockHttpClientRequest() {\n    _i1.throwOnMissingStub(this);\n  }\n\n  @override\n  bool get persistentConnection =>\n      (super.noSuchMethod(Invocation.getter(#persistentConnection),\n          returnValue: false) as bool);\n  @override\n  set persistentConnection(bool? _persistentConnection) => super.noSuchMethod(\n      Invocation.setter(#persistentConnection, _persistentConnection),\n      returnValueForMissingStub: null);\n  @override\n  bool get followRedirects => (super\n          .noSuchMethod(Invocation.getter(#followRedirects), returnValue: false)\n      as bool);\n  @override\n  set followRedirects(bool? _followRedirects) =>\n      super.noSuchMethod(Invocation.setter(#followRedirects, _followRedirects),\n          returnValueForMissingStub: null);\n  @override\n  int get maxRedirects =>\n      (super.noSuchMethod(Invocation.getter(#maxRedirects), returnValue: 0)\n          as int);\n  @override\n  set maxRedirects(int? _maxRedirects) =>\n      super.noSuchMethod(Invocation.setter(#maxRedirects, _maxRedirects),\n          returnValueForMissingStub: null);\n  @override\n  int get contentLength =>\n      (super.noSuchMethod(Invocation.getter(#contentLength), returnValue: 0)\n          as int);\n  @override\n  set contentLength(int? _contentLength) =>\n      super.noSuchMethod(Invocation.setter(#contentLength, _contentLength),\n          returnValueForMissingStub: null);\n  @override\n  bool get bufferOutput =>\n      (super.noSuchMethod(Invocation.getter(#bufferOutput), returnValue: false)\n          as bool);\n  @override\n  set bufferOutput(bool? _bufferOutput) =>\n      super.noSuchMethod(Invocation.setter(#bufferOutput, _bufferOutput),\n          returnValueForMissingStub: null);\n  @override\n  String get method =>\n      (super.noSuchMethod(Invocation.getter(#method), returnValue: '')\n          as String);\n  @override\n  Uri get uri =>\n      (super.noSuchMethod(Invocation.getter(#uri), returnValue: _FakeUri_2())\n          as Uri);\n  @override\n  _i2.HttpHeaders get headers =>\n      (super.noSuchMethod(Invocation.getter(#headers),\n          returnValue: _FakeHttpHeaders_3()) as _i2.HttpHeaders);\n  @override\n  List<_i2.Cookie> get cookies =>\n      (super.noSuchMethod(Invocation.getter(#cookies),\n          returnValue: <_i2.Cookie>[]) as List<_i2.Cookie>);\n  @override\n  _i4.Future<_i2.HttpClientResponse> get done => (super.noSuchMethod(\n          Invocation.getter(#done),\n          returnValue:\n              Future<_i2.HttpClientResponse>.value(_FakeHttpClientResponse_4()))\n      as _i4.Future<_i2.HttpClientResponse>);\n  @override\n  _i3.Encoding get encoding => (super.noSuchMethod(Invocation.getter(#encoding),\n      returnValue: _FakeEncoding_5()) as _i3.Encoding);\n  @override\n  set encoding(_i3.Encoding? _encoding) =>\n      super.noSuchMethod(Invocation.setter(#encoding, _encoding),\n          returnValueForMissingStub: null);\n  @override\n  _i4.Future<_i2.HttpClientResponse> close() => (super.noSuchMethod(\n          Invocation.method(#close, []),\n          returnValue:\n              Future<_i2.HttpClientResponse>.value(_FakeHttpClientResponse_4()))\n      as _i4.Future<_i2.HttpClientResponse>);\n  @override\n  void abort([Object? exception, StackTrace? stackTrace]) =>\n      super.noSuchMethod(Invocation.method(#abort, [exception, stackTrace]),\n          returnValueForMissingStub: null);\n  @override\n  void add(List<int>? data) =>\n      super.noSuchMethod(Invocation.method(#add, [data]),\n          returnValueForMissingStub: null);\n  @override\n  void write(Object? object) =>\n      super.noSuchMethod(Invocation.method(#write, [object]),\n          returnValueForMissingStub: null);\n  @override\n  void writeAll(Iterable<dynamic>? objects, [String? separator = r'']) =>\n      super.noSuchMethod(Invocation.method(#writeAll, [objects, separator]),\n          returnValueForMissingStub: null);\n  @override\n  void writeln([Object? object = r'']) =>\n      super.noSuchMethod(Invocation.method(#writeln, [object]),\n          returnValueForMissingStub: null);\n  @override\n  void writeCharCode(int? charCode) =>\n      super.noSuchMethod(Invocation.method(#writeCharCode, [charCode]),\n          returnValueForMissingStub: null);\n  @override\n  void addError(Object? error, [StackTrace? stackTrace]) =>\n      super.noSuchMethod(Invocation.method(#addError, [error, stackTrace]),\n          returnValueForMissingStub: null);\n  @override\n  _i4.Future<dynamic> addStream(_i4.Stream<List<int>>? stream) =>\n      (super.noSuchMethod(Invocation.method(#addStream, [stream]),\n          returnValue: Future<dynamic>.value()) as _i4.Future<dynamic>);\n  @override\n  _i4.Future<dynamic> flush() =>\n      (super.noSuchMethod(Invocation.method(#flush, []),\n          returnValue: Future<dynamic>.value()) as _i4.Future<dynamic>);\n}\n\n/// A class which mocks [HttpClientResponse].\n///\n/// See the documentation for Mockito's code generation for more information.\nclass MockHttpClientResponse extends _i1.Mock\n    implements _i2.HttpClientResponse {\n  MockHttpClientResponse() {\n    _i1.throwOnMissingStub(this);\n  }\n\n  @override\n  int get statusCode =>\n      (super.noSuchMethod(Invocation.getter(#statusCode), returnValue: 0)\n          as int);\n  @override\n  String get reasonPhrase =>\n      (super.noSuchMethod(Invocation.getter(#reasonPhrase), returnValue: '')\n          as String);\n  @override\n  int get contentLength =>\n      (super.noSuchMethod(Invocation.getter(#contentLength), returnValue: 0)\n          as int);\n  @override\n  _i2.HttpClientResponseCompressionState get compressionState =>\n      (super.noSuchMethod(Invocation.getter(#compressionState),\n              returnValue: _i2.HttpClientResponseCompressionState.notCompressed)\n          as _i2.HttpClientResponseCompressionState);\n  @override\n  bool get persistentConnection =>\n      (super.noSuchMethod(Invocation.getter(#persistentConnection),\n          returnValue: false) as bool);\n  @override\n  bool get isRedirect =>\n      (super.noSuchMethod(Invocation.getter(#isRedirect), returnValue: false)\n          as bool);\n  @override\n  List<_i2.RedirectInfo> get redirects =>\n      (super.noSuchMethod(Invocation.getter(#redirects),\n          returnValue: <_i2.RedirectInfo>[]) as List<_i2.RedirectInfo>);\n  @override\n  _i2.HttpHeaders get headers =>\n      (super.noSuchMethod(Invocation.getter(#headers),\n          returnValue: _FakeHttpHeaders_3()) as _i2.HttpHeaders);\n  @override\n  List<_i2.Cookie> get cookies =>\n      (super.noSuchMethod(Invocation.getter(#cookies),\n          returnValue: <_i2.Cookie>[]) as List<_i2.Cookie>);\n  @override\n  bool get isBroadcast =>\n      (super.noSuchMethod(Invocation.getter(#isBroadcast), returnValue: false)\n          as bool);\n  @override\n  _i4.Future<int> get length => (super.noSuchMethod(Invocation.getter(#length),\n      returnValue: Future<int>.value(0)) as _i4.Future<int>);\n  @override\n  _i4.Future<bool> get isEmpty =>\n      (super.noSuchMethod(Invocation.getter(#isEmpty),\n          returnValue: Future<bool>.value(false)) as _i4.Future<bool>);\n  @override\n  _i4.Future<List<int>> get first => (super.noSuchMethod(\n      Invocation.getter(#first),\n      returnValue: Future<List<int>>.value(<int>[])) as _i4.Future<List<int>>);\n  @override\n  _i4.Future<List<int>> get last => (super.noSuchMethod(\n      Invocation.getter(#last),\n      returnValue: Future<List<int>>.value(<int>[])) as _i4.Future<List<int>>);\n  @override\n  _i4.Future<List<int>> get single => (super.noSuchMethod(\n      Invocation.getter(#single),\n      returnValue: Future<List<int>>.value(<int>[])) as _i4.Future<List<int>>);\n  @override\n  _i4.Future<_i2.HttpClientResponse> redirect(\n          [String? method, Uri? url, bool? followLoops]) =>\n      (super.noSuchMethod(\n              Invocation.method(#redirect, [method, url, followLoops]),\n              returnValue: Future<_i2.HttpClientResponse>.value(\n                  _FakeHttpClientResponse_4()))\n          as _i4.Future<_i2.HttpClientResponse>);\n  @override\n  _i4.Future<_i2.Socket> detachSocket() =>\n      (super.noSuchMethod(Invocation.method(#detachSocket, []),\n              returnValue: Future<_i2.Socket>.value(_FakeSocket_6()))\n          as _i4.Future<_i2.Socket>);\n  @override\n  _i4.Stream<List<int>> asBroadcastStream(\n          {void Function(_i4.StreamSubscription<List<int>>)? onListen,\n          void Function(_i4.StreamSubscription<List<int>>)? onCancel}) =>\n      (super.noSuchMethod(\n          Invocation.method(#asBroadcastStream, [],\n              {#onListen: onListen, #onCancel: onCancel}),\n          returnValue: Stream<List<int>>.empty()) as _i4.Stream<List<int>>);\n  @override\n  _i4.StreamSubscription<List<int>> listen(void Function(List<int>)? onData,\n          {Function? onError, void Function()? onDone, bool? cancelOnError}) =>\n      (super.noSuchMethod(\n              Invocation.method(#listen, [\n                onData\n              ], {\n                #onError: onError,\n                #onDone: onDone,\n                #cancelOnError: cancelOnError\n              }),\n              returnValue: _FakeStreamSubscription_7<List<int>>())\n          as _i4.StreamSubscription<List<int>>);\n  @override\n  _i4.Stream<List<int>> where(bool Function(List<int>)? test) =>\n      (super.noSuchMethod(Invocation.method(#where, [test]),\n          returnValue: Stream<List<int>>.empty()) as _i4.Stream<List<int>>);\n  @override\n  _i4.Stream<S> map<S>(S Function(List<int>)? convert) =>\n      (super.noSuchMethod(Invocation.method(#map, [convert]),\n          returnValue: Stream<S>.empty()) as _i4.Stream<S>);\n  @override\n  _i4.Stream<E> asyncMap<E>(_i4.FutureOr<E> Function(List<int>)? convert) =>\n      (super.noSuchMethod(Invocation.method(#asyncMap, [convert]),\n          returnValue: Stream<E>.empty()) as _i4.Stream<E>);\n  @override\n  _i4.Stream<E> asyncExpand<E>(_i4.Stream<E>? Function(List<int>)? convert) =>\n      (super.noSuchMethod(Invocation.method(#asyncExpand, [convert]),\n          returnValue: Stream<E>.empty()) as _i4.Stream<E>);\n  @override\n  _i4.Stream<List<int>> handleError(Function? onError,\n          {bool Function(dynamic)? test}) =>\n      (super.noSuchMethod(\n          Invocation.method(#handleError, [onError], {#test: test}),\n          returnValue: Stream<List<int>>.empty()) as _i4.Stream<List<int>>);\n  @override\n  _i4.Stream<S> expand<S>(Iterable<S> Function(List<int>)? convert) =>\n      (super.noSuchMethod(Invocation.method(#expand, [convert]),\n          returnValue: Stream<S>.empty()) as _i4.Stream<S>);\n  @override\n  _i4.Future<dynamic> pipe(_i4.StreamConsumer<List<int>>? streamConsumer) =>\n      (super.noSuchMethod(Invocation.method(#pipe, [streamConsumer]),\n          returnValue: Future<dynamic>.value()) as _i4.Future<dynamic>);\n  @override\n  _i4.Stream<S> transform<S>(\n          _i4.StreamTransformer<List<int>, S>? streamTransformer) =>\n      (super.noSuchMethod(Invocation.method(#transform, [streamTransformer]),\n          returnValue: Stream<S>.empty()) as _i4.Stream<S>);\n  @override\n  _i4.Future<List<int>> reduce(\n          List<int> Function(List<int>, List<int>)? combine) =>\n      (super.noSuchMethod(Invocation.method(#reduce, [combine]),\n              returnValue: Future<List<int>>.value(<int>[]))\n          as _i4.Future<List<int>>);\n  @override\n  _i4.Future<S> fold<S>(S? initialValue, S Function(S, List<int>)? combine) =>\n      (super.noSuchMethod(Invocation.method(#fold, [initialValue, combine]),\n          returnValue: Future<S>.value(null)) as _i4.Future<S>);\n  @override\n  _i4.Future<String> join([String? separator = r'']) =>\n      (super.noSuchMethod(Invocation.method(#join, [separator]),\n          returnValue: Future<String>.value('')) as _i4.Future<String>);\n  @override\n  _i4.Future<bool> contains(Object? needle) =>\n      (super.noSuchMethod(Invocation.method(#contains, [needle]),\n          returnValue: Future<bool>.value(false)) as _i4.Future<bool>);\n  @override\n  _i4.Future<dynamic> forEach(void Function(List<int>)? action) =>\n      (super.noSuchMethod(Invocation.method(#forEach, [action]),\n          returnValue: Future<dynamic>.value()) as _i4.Future<dynamic>);\n  @override\n  _i4.Future<bool> every(bool Function(List<int>)? test) =>\n      (super.noSuchMethod(Invocation.method(#every, [test]),\n          returnValue: Future<bool>.value(false)) as _i4.Future<bool>);\n  @override\n  _i4.Future<bool> any(bool Function(List<int>)? test) =>\n      (super.noSuchMethod(Invocation.method(#any, [test]),\n          returnValue: Future<bool>.value(false)) as _i4.Future<bool>);\n  @override\n  _i4.Stream<R> cast<R>() => (super.noSuchMethod(Invocation.method(#cast, []),\n      returnValue: Stream<R>.empty()) as _i4.Stream<R>);\n  @override\n  _i4.Future<List<List<int>>> toList() =>\n      (super.noSuchMethod(Invocation.method(#toList, []),\n              returnValue: Future<List<List<int>>>.value(<List<int>>[]))\n          as _i4.Future<List<List<int>>>);\n  @override\n  _i4.Future<Set<List<int>>> toSet() =>\n      (super.noSuchMethod(Invocation.method(#toSet, []),\n              returnValue: Future<Set<List<int>>>.value(<List<int>>{}))\n          as _i4.Future<Set<List<int>>>);\n  @override\n  _i4.Future<E> drain<E>([E? futureValue]) =>\n      (super.noSuchMethod(Invocation.method(#drain, [futureValue]),\n          returnValue: Future<E>.value(null)) as _i4.Future<E>);\n  @override\n  _i4.Stream<List<int>> take(int? count) =>\n      (super.noSuchMethod(Invocation.method(#take, [count]),\n          returnValue: Stream<List<int>>.empty()) as _i4.Stream<List<int>>);\n  @override\n  _i4.Stream<List<int>> takeWhile(bool Function(List<int>)? test) =>\n      (super.noSuchMethod(Invocation.method(#takeWhile, [test]),\n          returnValue: Stream<List<int>>.empty()) as _i4.Stream<List<int>>);\n  @override\n  _i4.Stream<List<int>> skip(int? count) =>\n      (super.noSuchMethod(Invocation.method(#skip, [count]),\n          returnValue: Stream<List<int>>.empty()) as _i4.Stream<List<int>>);\n  @override\n  _i4.Stream<List<int>> skipWhile(bool Function(List<int>)? test) =>\n      (super.noSuchMethod(Invocation.method(#skipWhile, [test]),\n          returnValue: Stream<List<int>>.empty()) as _i4.Stream<List<int>>);\n  @override\n  _i4.Stream<List<int>> distinct(\n          [bool Function(List<int>, List<int>)? equals]) =>\n      (super.noSuchMethod(Invocation.method(#distinct, [equals]),\n          returnValue: Stream<List<int>>.empty()) as _i4.Stream<List<int>>);\n  @override\n  _i4.Future<List<int>> firstWhere(bool Function(List<int>)? test,\n          {List<int> Function()? orElse}) =>\n      (super.noSuchMethod(\n              Invocation.method(#firstWhere, [test], {#orElse: orElse}),\n              returnValue: Future<List<int>>.value(<int>[]))\n          as _i4.Future<List<int>>);\n  @override\n  _i4.Future<List<int>> lastWhere(bool Function(List<int>)? test,\n          {List<int> Function()? orElse}) =>\n      (super.noSuchMethod(\n              Invocation.method(#lastWhere, [test], {#orElse: orElse}),\n              returnValue: Future<List<int>>.value(<int>[]))\n          as _i4.Future<List<int>>);\n  @override\n  _i4.Future<List<int>> singleWhere(bool Function(List<int>)? test,\n          {List<int> Function()? orElse}) =>\n      (super.noSuchMethod(\n              Invocation.method(#singleWhere, [test], {#orElse: orElse}),\n              returnValue: Future<List<int>>.value(<int>[]))\n          as _i4.Future<List<int>>);\n  @override\n  _i4.Future<List<int>> elementAt(int? index) => (super.noSuchMethod(\n      Invocation.method(#elementAt, [index]),\n      returnValue: Future<List<int>>.value(<int>[])) as _i4.Future<List<int>>);\n  @override\n  _i4.Stream<List<int>> timeout(Duration? timeLimit,\n          {void Function(_i4.EventSink<List<int>>)? onTimeout}) =>\n      (super.noSuchMethod(\n          Invocation.method(#timeout, [timeLimit], {#onTimeout: onTimeout}),\n          returnValue: Stream<List<int>>.empty()) as _i4.Stream<List<int>>);\n}\n\n/// A class which mocks [HttpHeaders].\n///\n/// See the documentation for Mockito's code generation for more information.\nclass MockHttpHeaders extends _i1.Mock implements _i2.HttpHeaders {\n  MockHttpHeaders() {\n    _i1.throwOnMissingStub(this);\n  }\n\n  @override\n  set date(DateTime? _date) =>\n      super.noSuchMethod(Invocation.setter(#date, _date),\n          returnValueForMissingStub: null);\n  @override\n  set expires(DateTime? _expires) =>\n      super.noSuchMethod(Invocation.setter(#expires, _expires),\n          returnValueForMissingStub: null);\n  @override\n  set ifModifiedSince(DateTime? _ifModifiedSince) =>\n      super.noSuchMethod(Invocation.setter(#ifModifiedSince, _ifModifiedSince),\n          returnValueForMissingStub: null);\n  @override\n  set host(String? _host) => super.noSuchMethod(Invocation.setter(#host, _host),\n      returnValueForMissingStub: null);\n  @override\n  set port(int? _port) => super.noSuchMethod(Invocation.setter(#port, _port),\n      returnValueForMissingStub: null);\n  @override\n  set contentType(_i2.ContentType? _contentType) =>\n      super.noSuchMethod(Invocation.setter(#contentType, _contentType),\n          returnValueForMissingStub: null);\n  @override\n  int get contentLength =>\n      (super.noSuchMethod(Invocation.getter(#contentLength), returnValue: 0)\n          as int);\n  @override\n  set contentLength(int? _contentLength) =>\n      super.noSuchMethod(Invocation.setter(#contentLength, _contentLength),\n          returnValueForMissingStub: null);\n  @override\n  bool get persistentConnection =>\n      (super.noSuchMethod(Invocation.getter(#persistentConnection),\n          returnValue: false) as bool);\n  @override\n  set persistentConnection(bool? _persistentConnection) => super.noSuchMethod(\n      Invocation.setter(#persistentConnection, _persistentConnection),\n      returnValueForMissingStub: null);\n  @override\n  bool get chunkedTransferEncoding =>\n      (super.noSuchMethod(Invocation.getter(#chunkedTransferEncoding),\n          returnValue: false) as bool);\n  @override\n  set chunkedTransferEncoding(bool? _chunkedTransferEncoding) =>\n      super.noSuchMethod(\n          Invocation.setter(#chunkedTransferEncoding, _chunkedTransferEncoding),\n          returnValueForMissingStub: null);\n  @override\n  List<String>? operator [](String? name) =>\n      (super.noSuchMethod(Invocation.method(#[], [name])) as List<String>?);\n  @override\n  String? value(String? name) =>\n      (super.noSuchMethod(Invocation.method(#value, [name])) as String?);\n  @override\n  void add(String? name, Object? value, {bool? preserveHeaderCase = false}) =>\n      super.noSuchMethod(\n          Invocation.method(\n              #add, [name, value], {#preserveHeaderCase: preserveHeaderCase}),\n          returnValueForMissingStub: null);\n  @override\n  void set(String? name, Object? value, {bool? preserveHeaderCase = false}) =>\n      super.noSuchMethod(\n          Invocation.method(\n              #set, [name, value], {#preserveHeaderCase: preserveHeaderCase}),\n          returnValueForMissingStub: null);\n  @override\n  void remove(String? name, Object? value) =>\n      super.noSuchMethod(Invocation.method(#remove, [name, value]),\n          returnValueForMissingStub: null);\n  @override\n  void removeAll(String? name) =>\n      super.noSuchMethod(Invocation.method(#removeAll, [name]),\n          returnValueForMissingStub: null);\n  @override\n  void forEach(void Function(String, List<String>)? action) =>\n      super.noSuchMethod(Invocation.method(#forEach, [action]),\n          returnValueForMissingStub: null);\n  @override\n  void noFolding(String? name) =>\n      super.noSuchMethod(Invocation.method(#noFolding, [name]),\n          returnValueForMissingStub: null);\n  @override\n  void clear() => super.noSuchMethod(Invocation.method(#clear, []),\n      returnValueForMissingStub: null);\n}\n\n/// A class which mocks [Transformer].\n///\n/// See the documentation for Mockito's code generation for more information.\nclass MockTransformer extends _i1.Mock implements _i5.Transformer {\n  MockTransformer() {\n    _i1.throwOnMissingStub(this);\n  }\n\n  @override\n  _i4.Future<String> transformRequest(_i6.RequestOptions? options) =>\n      (super.noSuchMethod(Invocation.method(#transformRequest, [options]),\n          returnValue: Future<String>.value('')) as _i4.Future<String>);\n  @override\n  _i4.Future<dynamic> transformResponse(\n          _i6.RequestOptions? options, _i7.ResponseBody? responseBody) =>\n      (super.noSuchMethod(\n          Invocation.method(#transformResponse, [options, responseBody]),\n          returnValue: Future<dynamic>.value()) as _i4.Future<dynamic>);\n}\n"
  },
  {
    "path": "dio/test/multipart_file_test.dart",
    "content": "import 'dart:convert';\n\nimport 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nvoid main() async {\n  test('lookupMediaType', () {\n    final expectations = <List<String?>>[\n      ['test.txt', 'text/plain'],\n      ['image.jpg', 'image/jpeg'],\n      ['what-is-this', null],\n      ['', null],\n      [null, null],\n    ];\n    for (final e in expectations) {\n      final type = MultipartFile.lookupMediaType(e.first);\n      expect(type?.mimeType, e.last);\n    }\n  });\n\n  group(MultipartFile, () {\n    group('content-type', () {\n      test('can inferred from the filename', () {\n        final textFileFromStream = MultipartFile.fromStream(\n          () => Stream.value(utf8.encode('test')),\n          4,\n          filename: 'test.txt',\n        );\n        expect(textFileFromStream.contentType?.type, 'text');\n        expect(textFileFromStream.contentType?.subtype, 'plain');\n\n        final textFileFromString = MultipartFile.fromString(\n          'test',\n          filename: 'test.txt',\n        );\n        expect(textFileFromString.contentType?.type, 'text');\n        expect(textFileFromString.contentType?.subtype, 'plain');\n\n        final imageFileFromBytes = MultipartFile.fromBytes(\n          [1, 2, 3],\n          filename: 'image.jpg',\n        );\n        expect(imageFileFromBytes.contentType?.type, 'image');\n        expect(imageFileFromBytes.contentType?.subtype, 'jpeg');\n\n        final noExtensionFile = MultipartFile.fromBytes(\n          [1, 2, 3],\n          filename: 'what-is-this',\n        );\n        expect(noExtensionFile.contentType?.type, 'application');\n        expect(noExtensionFile.contentType?.subtype, 'octet-stream');\n\n        final emptyFilenameFile = MultipartFile.fromBytes(\n          [1, 2, 3],\n          filename: '',\n        );\n        expect(emptyFilenameFile.contentType?.type, 'application');\n        expect(emptyFilenameFile.contentType?.subtype, 'octet-stream');\n\n        final rawBytesFile = MultipartFile.fromBytes([1, 2, 3]);\n        expect(rawBytesFile.contentType?.type, 'application');\n        expect(rawBytesFile.contentType?.subtype, 'octet-stream');\n\n        final jsonFile = MultipartFile.fromBytes(\n          [1, 2, 3],\n          contentType: DioMediaType.parse('application/json'),\n        );\n        expect(jsonFile.contentType?.type, 'application');\n        expect(jsonFile.contentType?.subtype, 'json');\n      });\n\n      test(\n        'sets correctly with .fromFile',\n        () async {\n          final mediaType = DioMediaType.parse('text/plain');\n          final file = await MultipartFile.fromFile(\n            'test/mock/_testfile',\n            filename: '1.txt',\n            contentType: mediaType,\n          );\n          expect(file.contentType, mediaType);\n        },\n        testOn: 'vm',\n      );\n    });\n\n    // Cloned multipart files should be able to be read again and be the same\n    // as the original ones.\n    test(\n      'complex cloning MultipartFile',\n      () async {\n        final multipartFile1 = MultipartFile.fromString(\n          'hello world.',\n          headers: {\n            'test': <String>['a'],\n          },\n        );\n        final multipartFile2 = await MultipartFile.fromFile(\n          'test/mock/_testfile',\n          filename: '1.txt',\n          headers: {\n            'test': <String>['b'],\n          },\n        );\n        final multipartFile3 = MultipartFile.fromFileSync(\n          'test/mock/_testfile',\n          filename: '2.txt',\n          headers: {\n            'test': <String>['c'],\n          },\n        );\n\n        final fm = FormData.fromMap({\n          'name': 'wendux',\n          'age': 25,\n          'path': '/图片空间/地址',\n          'file': multipartFile1,\n          'files': [\n            multipartFile2,\n            multipartFile3,\n          ],\n        });\n        final fmStr = await fm.readAsBytes();\n\n        // Files are finalized after being read.\n        try {\n          multipartFile1.finalize();\n          fail('Should not be able to finalize a file twice.');\n        } catch (e) {\n          expect(e, isA<StateError>());\n          expect(\n            (e as StateError).message,\n            'The MultipartFile has already been finalized. '\n            'This typically means you are using the same MultipartFile '\n            'in repeated requests.\\n'\n            'Use MultipartFile.clone() or create a new MultipartFile '\n            'for further usages.',\n          );\n        }\n\n        final fm1 = FormData();\n        fm1.fields.add(const MapEntry('name', 'wendux'));\n        fm1.fields.add(const MapEntry('age', '25'));\n        fm1.fields.add(const MapEntry('path', '/图片空间/地址'));\n        fm1.files.add(\n          MapEntry(\n            'file',\n            multipartFile1.clone(),\n          ),\n        );\n        fm1.files.add(\n          MapEntry(\n            'files',\n            multipartFile2.clone(),\n          ),\n        );\n        fm1.files.add(\n          MapEntry(\n            'files',\n            multipartFile3.clone(),\n          ),\n        );\n        expect(fmStr.length, fm1.length);\n\n        // The cloned multipart files should be able to be read again.\n        expect(fm.files[0].value.isFinalized, true);\n        expect(fm.files[1].value.isFinalized, true);\n        expect(fm.files[2].value.isFinalized, true);\n        expect(fm1.files[0].value.isFinalized, false);\n        expect(fm1.files[1].value.isFinalized, false);\n        expect(fm1.files[2].value.isFinalized, false);\n\n        // The cloned multipart files' properties should be the same as the\n        // original ones.\n        expect(fm1.files[0].value.filename, multipartFile1.filename);\n        expect(fm1.files[0].value.contentType, multipartFile1.contentType);\n        expect(fm1.files[0].value.length, multipartFile1.length);\n        expect(fm1.files[0].value.headers, multipartFile1.headers);\n      },\n      testOn: 'vm',\n    );\n  });\n}\n"
  },
  {
    "path": "dio/test/options_test.dart",
    "content": "@TestOn('vm')\nimport 'dart:convert';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\nimport 'package:dio/src/utils.dart';\nimport 'package:mockito/mockito.dart';\nimport 'package:test/test.dart';\n\nimport 'mock/adapters.dart';\nimport 'mock/http_mock.mocks.dart';\n\nvoid main() {\n  test('options', () {\n    final map = {'a': '5'};\n    final mapOverride = {'b': '6'};\n    final baseOptions = BaseOptions(\n      connectTimeout: const Duration(seconds: 2),\n      receiveTimeout: const Duration(seconds: 2),\n      sendTimeout: const Duration(seconds: 2),\n      baseUrl: 'http://localhost',\n      queryParameters: map,\n      extra: map,\n      headers: map,\n      contentType: 'application/json',\n      followRedirects: false,\n      persistentConnection: false,\n    );\n    final opt1 = baseOptions.copyWith(\n      method: 'post',\n      receiveTimeout: const Duration(seconds: 3),\n      sendTimeout: const Duration(seconds: 3),\n      baseUrl: 'https://pub.dev',\n      extra: mapOverride,\n      headers: mapOverride,\n      contentType: 'text/html',\n    );\n    expect(opt1.method, 'post');\n    expect(opt1.receiveTimeout, const Duration(seconds: 3));\n    expect(opt1.connectTimeout, const Duration(seconds: 2));\n    expect(opt1.followRedirects, false);\n    expect(opt1.persistentConnection, false);\n    expect(opt1.baseUrl, 'https://pub.dev');\n    expect(opt1.headers['b'], '6');\n    expect(opt1.extra['b'], '6');\n    expect(opt1.queryParameters['b'], null);\n    expect(opt1.contentType, 'text/html');\n\n    final opt2 = Options(\n      method: 'get',\n      receiveTimeout: const Duration(seconds: 2),\n      sendTimeout: const Duration(seconds: 2),\n      extra: map,\n      headers: map,\n      contentType: 'application/json',\n      followRedirects: false,\n      persistentConnection: false,\n    );\n\n    final opt3 = opt2.copyWith(\n      method: 'post',\n      receiveTimeout: const Duration(seconds: 3),\n      sendTimeout: const Duration(seconds: 3),\n      extra: mapOverride,\n      headers: mapOverride,\n      contentType: 'text/html',\n    );\n\n    expect(opt3.method, 'post');\n    expect(opt3.receiveTimeout, const Duration(seconds: 3));\n    expect(opt3.followRedirects, false);\n    expect(opt3.persistentConnection, false);\n    expect(opt3.headers!['b'], '6');\n    expect(opt3.extra!['b'], '6');\n    expect(opt3.contentType, 'text/html');\n\n    final opt4 = RequestOptions(\n      path: '/xxx',\n      sendTimeout: const Duration(seconds: 2),\n      followRedirects: false,\n      persistentConnection: false,\n    );\n    final opt5 = opt4.copyWith(\n      method: 'post',\n      receiveTimeout: const Duration(seconds: 3),\n      sendTimeout: const Duration(seconds: 3),\n      extra: mapOverride,\n      headers: mapOverride,\n      data: 'xx=5',\n      path: '/',\n      contentType: 'text/html',\n    );\n    expect(opt5.method, 'post');\n    expect(opt5.receiveTimeout, const Duration(seconds: 3));\n    expect(opt5.followRedirects, false);\n    expect(opt5.persistentConnection, false);\n    expect(opt5.contentType, 'text/html');\n    expect(opt5.headers['b'], '6');\n    expect(opt5.extra['b'], '6');\n    expect(opt5.data, 'xx=5');\n    expect(opt5.path, '/');\n\n    // Keys of header are case-insensitive\n    expect(opt5.headers['B'], '6');\n    opt5.headers['B'] = 9;\n    expect(opt5.headers['b'], 9);\n  });\n\n  test('options connectTimeout', () {\n    // Test that connectTimeout can be set in Options\n    final opt1 = Options(\n      method: 'get',\n      connectTimeout: const Duration(seconds: 10),\n    );\n    expect(opt1.connectTimeout, const Duration(seconds: 10));\n\n    // Test that connectTimeout can be copied\n    final opt2 = opt1.copyWith(\n      connectTimeout: const Duration(seconds: 20),\n    );\n    expect(opt2.connectTimeout, const Duration(seconds: 20));\n\n    // Test that connectTimeout is preserved when not overridden\n    final opt3 = opt1.copyWith(method: 'post');\n    expect(opt3.connectTimeout, const Duration(seconds: 10));\n\n    // Test that Options connectTimeout overrides BaseOptions connectTimeout\n    final baseOptions = BaseOptions(\n      connectTimeout: const Duration(seconds: 5),\n      baseUrl: 'http://localhost',\n    );\n    final options = Options(connectTimeout: const Duration(seconds: 10));\n    final requestOptions = options.compose(baseOptions, '/test');\n    expect(requestOptions.connectTimeout, const Duration(seconds: 10));\n\n    // Test that BaseOptions connectTimeout is used when Options doesn't set it\n    final options2 = Options();\n    final requestOptions2 = options2.compose(baseOptions, '/test');\n    expect(requestOptions2.connectTimeout, const Duration(seconds: 5));\n\n    // Test that negative connectTimeout throws an error\n    expect(\n      () => Options(connectTimeout: const Duration(seconds: -1)),\n      throwsA(isA<AssertionError>()),\n    );\n\n    // Test that zero duration is allowed\n    final opt4 = Options(connectTimeout: Duration.zero);\n    expect(opt4.connectTimeout, Duration.zero);\n  });\n\n  test('options content-type', () {\n    const contentType = 'text/html';\n    const contentTypeJson = 'application/json';\n    final headers = {'content-type': contentType};\n    final jsonHeaders = {'content-type': contentTypeJson};\n\n    try {\n      BaseOptions(contentType: contentType, headers: headers);\n      expect(false, 'baseOptions1');\n    } catch (e) {\n      //\n    }\n\n    final bo1 = BaseOptions(contentType: contentType);\n    final bo2 = BaseOptions(headers: headers);\n    final bo3 = BaseOptions();\n\n    expect(bo1.headers['content-type'], contentType);\n    expect(bo2.headers['content-type'], contentType);\n    expect(bo3.headers['content-type'], null);\n\n    try {\n      bo1.copyWith(headers: headers);\n      expect(false, 'baseOptions copyWith 1');\n    } catch (e) {\n      //\n    }\n\n    try {\n      bo2.copyWith(contentType: contentType);\n      expect(false, 'baseOptions copyWith 2');\n    } catch (e) {\n      //\n    }\n\n    bo3.copyWith();\n\n    /// options\n    try {\n      Options(contentType: contentType, headers: headers);\n      expect(false, 'Options1');\n    } catch (e) {\n      //\n    }\n\n    final o1 = Options(contentType: contentType);\n    final o2 = Options(headers: headers);\n\n    try {\n      o1.copyWith(headers: headers);\n      expect(false, 'Options copyWith 1');\n    } catch (e) {\n      //\n    }\n\n    try {\n      o2.copyWith(contentType: contentType);\n      expect(false, 'Options copyWith 2');\n    } catch (e) {\n      //\n    }\n\n    expect(\n      Options(contentType: contentTypeJson).compose(bo1, '').contentType,\n      contentTypeJson,\n    );\n    expect(\n      Options(contentType: contentTypeJson).compose(bo2, '').contentType,\n      contentTypeJson,\n    );\n    expect(\n      Options(contentType: contentTypeJson).compose(bo3, '').contentType,\n      contentTypeJson,\n    );\n    expect(\n      Options(headers: jsonHeaders).compose(bo1, '').contentType,\n      contentTypeJson,\n    );\n    expect(\n      Options(headers: jsonHeaders).compose(bo2, '').contentType,\n      contentTypeJson,\n    );\n    expect(\n      Options(headers: jsonHeaders).compose(bo3, '').contentType,\n      contentTypeJson,\n    );\n\n    /// RequestOptions\n    try {\n      RequestOptions(path: '', contentType: contentType, headers: headers);\n      expect(false, 'Options1');\n    } catch (e) {\n      //\n    }\n\n    final ro1 = RequestOptions(path: '', contentType: contentType);\n    final ro2 = RequestOptions(path: '', headers: headers);\n\n    try {\n      ro1.copyWith(headers: headers);\n      expect(false, 'RequestOptions copyWith 1');\n    } catch (e) {\n      //\n    }\n\n    try {\n      ro2.copyWith(contentType: contentType);\n      expect(false, 'RequestOptions copyWith 2');\n    } catch (e) {\n      //\n    }\n\n    final ro3 = RequestOptions(path: '');\n    ro3.copyWith();\n  });\n\n  test('default content-type 2', () async {\n    final dio = Dio();\n    dio.options.baseUrl = 'https://www.example.com';\n\n    final r1 = Options(method: 'GET').compose(dio.options, '/test').copyWith(\n      headers: {Headers.contentTypeHeader: Headers.textPlainContentType},\n    );\n    expect(\n      r1.headers[Headers.contentTypeHeader],\n      Headers.textPlainContentType,\n    );\n\n    final r2 = Options(method: 'GET')\n        .compose(dio.options, '/test')\n        .copyWith(contentType: Headers.textPlainContentType);\n    expect(\n      r2.headers[Headers.contentTypeHeader],\n      Headers.textPlainContentType,\n    );\n\n    try {\n      Options(method: 'GET').compose(dio.options, '/test').copyWith(\n        headers: {Headers.contentTypeHeader: Headers.textPlainContentType},\n        contentType: Headers.formUrlEncodedContentType,\n      );\n    } catch (_) {}\n\n    final r3 = Options(method: 'GET').compose(dio.options, '/test');\n    expect(r3.uri.toString(), 'https://www.example.com/test');\n    expect(r3.headers[Headers.contentTypeHeader], null);\n  });\n\n  test('responseDecoder return null', () async {\n    final dio = Dio();\n    dio.options.responseDecoder = (_, __, ___) => null;\n    dio.options.baseUrl = EchoAdapter.mockBase;\n    dio.httpClientAdapter = EchoAdapter();\n\n    final Response response = await dio.get('');\n\n    expect(response.data, null);\n  });\n\n  test('responseDecoder can return Future<String?>', () async {\n    final dio = Dio();\n    dio.options.responseDecoder = (_, __, ___) => Future.value('example');\n    dio.options.baseUrl = EchoAdapter.mockBase;\n    dio.httpClientAdapter = EchoAdapter();\n\n    final Response response = await dio.get('');\n\n    expect(response.data, 'example');\n  });\n\n  test('responseDecoder can return String?', () async {\n    final dio = Dio();\n    dio.options.responseDecoder = (_, __, ___) => 'example';\n    dio.options.baseUrl = EchoAdapter.mockBase;\n    dio.httpClientAdapter = EchoAdapter();\n\n    final Response response = await dio.get('');\n\n    expect(response.data, 'example');\n  });\n\n  test('requestEncoder can return Future<List<int>>', () async {\n    final dio = Dio();\n    dio.options.requestEncoder = (data, _) => Future.value(utf8.encode(data));\n    dio.options.baseUrl = EchoAdapter.mockBase;\n    dio.httpClientAdapter = EchoAdapter();\n\n    final Response response = await dio.get('');\n\n    expect(response.statusCode, 200);\n  });\n\n  test('requestEncoder can return List<int>', () async {\n    final dio = Dio();\n    dio.options.requestEncoder = (data, _) => utf8.encode(data);\n    dio.options.baseUrl = EchoAdapter.mockBase;\n    dio.httpClientAdapter = EchoAdapter();\n\n    final Response response = await dio.get('');\n\n    expect(response.statusCode, 200);\n  });\n\n  test('invalid response type throws exceptions', () async {\n    final dio = Dio(\n      BaseOptions(\n        baseUrl: MockAdapter.mockBase,\n        contentType: Headers.jsonContentType,\n      ),\n    )..httpClientAdapter = MockAdapter();\n\n    // Throws nothing.\n    await dio.get<dynamic>('/test-plain-text-content-type');\n    await dio.get<String>('/test-plain-text-content-type');\n\n    // Throws a type error during cast.\n    expectLater(\n      dio.get<Map<String, dynamic>>('/test-plain-text-content-type'),\n      throwsA((e) => e is DioException && e.error is TypeError),\n    );\n  });\n\n  test('option invalid base url', () {\n    final invalidUrls = <String>[\n      'blob:http://localhost/xyz123',\n      'https://',\n      'pub.dev',\n    ];\n    final validUrls = <String>[\n      '',\n      'https://pub.dev',\n      'https://loremipsum/',\n      if (kIsWeb) 'api/',\n    ];\n    for (final url in invalidUrls) {\n      expect(() => BaseOptions(baseUrl: url), throwsA(isA<ArgumentError>()));\n    }\n    for (final url in validUrls) {\n      expect(BaseOptions(baseUrl: url), isA<BaseOptions>());\n    }\n  });\n\n  test('Throws when using invalid methods', () async {\n    final dio = Dio();\n\n    Future<void> testInvalidArgumentException(String method) async {\n      await expectLater(\n        dio.fetch(RequestOptions(path: 'http://127.0.0.1', method: method)),\n        throwsA((e) => e is DioException && e.error is ArgumentError),\n      );\n    }\n\n    const String separators = '\\t\\n\\r()<>@,;:\\\\/[]?={}';\n    for (int i = 0; i < separators.length; i++) {\n      final String separator = separators.substring(i, i + 1);\n      await testInvalidArgumentException(separator);\n      await testInvalidArgumentException('${separator}CONNECT');\n      await testInvalidArgumentException('CONN${separator}ECT');\n      await testInvalidArgumentException('CONN$separator${separator}ECT');\n      await testInvalidArgumentException('CONNECT$separator');\n    }\n  });\n\n  test('Transform data correctly with requests', () async {\n    final dio = Dio()\n      ..httpClientAdapter = EchoAdapter()\n      ..options.baseUrl = EchoAdapter.mockBase;\n    const methods = [\n      'CONNECT',\n      'HEAD',\n      'GET',\n      'POST',\n      'PUT',\n      'PATCH',\n      'DELETE',\n      'OPTIONS',\n      'TRACE',\n    ];\n    for (final method in methods) {\n      final response = await dio.request(\n        '/test',\n        data: 'test',\n        options: Options(method: method),\n      );\n      expect(response.data, 'test');\n    }\n  });\n\n  test('Headers can be case-sensitive', () async {\n    final dio = Dio();\n    final client = MockHttpClient();\n    dio.httpClientAdapter = IOHttpClientAdapter(createHttpClient: () => client);\n\n    final headerMap = caseInsensitiveKeyMap();\n    late MockHttpHeaders mockRequestHeaders;\n    when(client.openUrl(any, any)).thenAnswer((_) async {\n      final request = MockHttpClientRequest();\n      final response = MockHttpClientResponse();\n      mockRequestHeaders = MockHttpHeaders();\n      when(\n        mockRequestHeaders.set(\n          any,\n          any,\n          preserveHeaderCase: anyNamed('preserveHeaderCase'),\n        ),\n      ).thenAnswer((invocation) {\n        final args = invocation.positionalArguments.cast<String>();\n        final preserveHeaderCase =\n            invocation.namedArguments[#preserveHeaderCase] as bool;\n        headerMap[preserveHeaderCase ? args[0] : args[0].toLowerCase()] =\n            args[1];\n      });\n      when(request.headers).thenAnswer((_) => mockRequestHeaders);\n      when(request.close()).thenAnswer((_) => Future.value(response));\n      when(request.addStream(any)).thenAnswer((_) async => null);\n      when(response.headers).thenReturn(MockHttpHeaders());\n      when(response.statusCode).thenReturn(200);\n      when(response.reasonPhrase).thenReturn('OK');\n      when(response.isRedirect).thenReturn(false);\n      when(response.redirects).thenReturn([]);\n      when(response.cast()).thenAnswer((_) => const Stream<Uint8List>.empty());\n      return Future.value(request);\n    });\n\n    await dio.get(\n      '',\n      options: Options(\n        preserveHeaderCase: true,\n        headers: {'Sensitive': 'test', 'insensitive': 'test'},\n      ),\n    );\n    expect(headerMap['Sensitive'], 'test');\n    expect(headerMap['insensitive'], 'test');\n    headerMap.clear();\n\n    await dio.get(\n      '',\n      options: Options(\n        headers: {'Sensitive': 'test', 'insensitive': 'test'},\n      ),\n    );\n    expect(headerMap['sensitive'], 'test');\n    expect(headerMap['insensitive'], 'test');\n  });\n}\n"
  },
  {
    "path": "dio/test/options_timeout_integration_test.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group('Options timeout overrides', () {\n    test('Options.connectTimeout is used by adapter', () async {\n      final dio = Dio(\n        BaseOptions(\n          connectTimeout: const Duration(seconds: 30), // Long timeout in base\n        ),\n      );\n\n      // Override with a short timeout via Options\n      final startTime = DateTime.now();\n      try {\n        await dio.get(\n          'http://10.0.0.0', // Non-routable address\n          options: Options(\n            connectTimeout: const Duration(milliseconds: 100), // Short timeout\n          ),\n        );\n        fail('Should have thrown a connection timeout exception');\n      } on DioException catch (e) {\n        final elapsed = DateTime.now().difference(startTime);\n\n        // Verify it's a connection timeout\n        expect(e.type, DioExceptionType.connectionTimeout);\n\n        // Verify it used the Options timeout (100ms), not BaseOptions timeout (30s)\n        // Allow some margin for test execution overhead\n        expect(\n          elapsed.inMilliseconds,\n          lessThan(5000),\n          reason: 'Should timeout quickly (100ms + margin), not after 30s',\n        );\n      }\n    });\n\n    test('Options.connectTimeout composes correctly with BaseOptions', () {\n      final baseOptions = BaseOptions(\n        connectTimeout: const Duration(seconds: 5),\n        baseUrl: 'http://example.com',\n      );\n\n      final options = Options(\n        connectTimeout: const Duration(seconds: 10),\n        method: 'POST',\n      );\n\n      final requestOptions = options.compose(baseOptions, '/test');\n\n      // Verify Options.connectTimeout takes precedence\n      expect(requestOptions.connectTimeout, const Duration(seconds: 10));\n      expect(requestOptions.method, 'POST');\n      expect(requestOptions.baseUrl, 'http://example.com');\n    });\n\n    test('Options.sendTimeout composes correctly with BaseOptions', () {\n      final baseOptions = BaseOptions(\n        sendTimeout: const Duration(seconds: 5),\n        baseUrl: 'http://example.com',\n      );\n\n      final options = Options(\n        sendTimeout: const Duration(seconds: 10),\n        method: 'POST',\n      );\n\n      final requestOptions = options.compose(baseOptions, '/test');\n\n      // Verify Options.sendTimeout takes precedence\n      expect(requestOptions.sendTimeout, const Duration(seconds: 10));\n      expect(requestOptions.method, 'POST');\n      expect(requestOptions.baseUrl, 'http://example.com');\n    });\n\n    test('Options.receiveTimeout composes correctly with BaseOptions', () {\n      final baseOptions = BaseOptions(\n        receiveTimeout: const Duration(seconds: 5),\n        baseUrl: 'http://example.com',\n      );\n\n      final options = Options(\n        receiveTimeout: const Duration(seconds: 10),\n        method: 'POST',\n      );\n\n      final requestOptions = options.compose(baseOptions, '/test');\n\n      // Verify Options.receiveTimeout takes precedence\n      expect(requestOptions.receiveTimeout, const Duration(seconds: 10));\n      expect(requestOptions.method, 'POST');\n      expect(requestOptions.baseUrl, 'http://example.com');\n    });\n\n    test('All timeout types can be set via Options simultaneously', () {\n      final baseOptions = BaseOptions(\n        connectTimeout: const Duration(seconds: 5),\n        sendTimeout: const Duration(seconds: 5),\n        receiveTimeout: const Duration(seconds: 5),\n        baseUrl: 'http://example.com',\n      );\n\n      final options = Options(\n        connectTimeout: const Duration(seconds: 10),\n        sendTimeout: const Duration(seconds: 15),\n        receiveTimeout: const Duration(seconds: 20),\n        method: 'POST',\n      );\n\n      final requestOptions = options.compose(baseOptions, '/test');\n\n      // Verify all Options timeouts take precedence\n      expect(requestOptions.connectTimeout, const Duration(seconds: 10));\n      expect(requestOptions.sendTimeout, const Duration(seconds: 15));\n      expect(requestOptions.receiveTimeout, const Duration(seconds: 20));\n      expect(requestOptions.method, 'POST');\n      expect(requestOptions.baseUrl, 'http://example.com');\n    });\n  });\n}\n"
  },
  {
    "path": "dio/test/parameter_test.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group('ListParam', () {\n    test('param1 and param2 should be considered equal', () {\n      final param1 = const ListParam(['item1', 'item2'], ListFormat.csv);\n      final param2 = const ListParam(['item1', 'item2'], ListFormat.csv);\n      expect(param1 == param2, isTrue);\n    });\n\n    test('param1 and param3 should not be considered equal', () {\n      final param1 = const ListParam(['item1', 'item2'], ListFormat.csv);\n      final param3 = const ListParam(['item3', 'item4'], ListFormat.csv);\n      expect(param1 == param3, isFalse);\n    });\n\n    test('Order matters: param1 and param4 should not be equal', () {\n      final param1 = const ListParam(['item1', 'item2'], ListFormat.csv);\n      final param4 = const ListParam(['item2', 'item1'], ListFormat.csv);\n      expect(param1 == param4, isFalse);\n    });\n  });\n}\n"
  },
  {
    "path": "dio/test/pinning_test.dart",
    "content": "@TestOn('vm')\nimport 'dart:io';\n\nimport 'package:crypto/crypto.dart';\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  final trustedCertUrl = 'https://sha256.badssl.com/';\n  final untrustedCertUrl = 'https://wrong.host.badssl.com/';\n\n  /// NOTE: Run scripts/prepare_pinning_certs.sh\n  /// to download the current certs to the file below.\n  String fingerprint() {\n    // OpenSSL output like: SHA256 Fingerprint=EE:5C:E1:DF:A7:A4...\n    // All badssl.com hosts have the same cert, they just have TLS\n    // setting or other differences (like host name) that make them bad.\n    final lines = File('test/_pinning.txt').readAsLinesSync();\n    return lines.first.split('=').last.toLowerCase().replaceAll(':', '');\n  }\n\n  group('pinning:', () {\n    test('trusted host allowed with no approver', () async {\n      await Dio().get(trustedCertUrl);\n    });\n\n    test('untrusted host rejected with no approver', () async {\n      DioException? error;\n      try {\n        final dio = Dio();\n        await dio.get(untrustedCertUrl);\n        fail('did not throw');\n      } on DioException catch (e) {\n        error = e;\n      }\n      expect(error, isNotNull);\n    });\n\n    test('every certificate tested and rejected', () async {\n      DioException? error;\n      try {\n        final dio = Dio();\n        dio.httpClientAdapter = IOHttpClientAdapter(\n          validateCertificate: (certificate, host, port) => false,\n        );\n        await dio.get(trustedCertUrl);\n        fail('did not throw');\n      } on DioException catch (e) {\n        error = e;\n      }\n      expect(error, isNotNull);\n    });\n\n    test(\n      'trusted certificate tested and allowed',\n      () async {\n        final dio = Dio();\n        // badCertificateCallback never called for trusted certificate\n        dio.httpClientAdapter = IOHttpClientAdapter(\n          validateCertificate: (cert, host, port) =>\n              fingerprint() == sha256.convert(cert!.der).toString(),\n        );\n        final response = await dio.get(\n          trustedCertUrl,\n          options: Options(validateStatus: (status) => true),\n        );\n        expect(response, isNotNull);\n      },\n      tags: ['tls'],\n    );\n\n    test(\n      'untrusted certificate tested and allowed',\n      () async {\n        final dio = Dio();\n        // badCertificateCallback must allow the untrusted certificate through\n        dio.httpClientAdapter = IOHttpClientAdapter(\n          createHttpClient: () {\n            return HttpClient()\n              ..badCertificateCallback = (cert, host, port) => true;\n          },\n          validateCertificate: (cert, host, port) {\n            return fingerprint() == sha256.convert(cert!.der).toString();\n          },\n        );\n        final response = await dio.get(\n          untrustedCertUrl,\n          options: Options(validateStatus: (status) => true),\n        );\n        expect(response, isNotNull);\n      },\n      tags: ['tls'],\n    );\n\n    test(\n      'untrusted certificate rejected before validateCertificate',\n      () async {\n        DioException? error;\n        try {\n          final dio = Dio();\n          dio.httpClientAdapter = IOHttpClientAdapter(\n            createHttpClient: () {\n              return HttpClient(\n                context: SecurityContext(withTrustedRoots: false),\n              );\n            },\n            validateCertificate: (cert, host, port) =>\n                fail('Should not be evaluated'),\n          );\n          await dio.get(\n            untrustedCertUrl,\n            options: Options(validateStatus: (status) => true),\n          );\n          fail('did not throw');\n        } on DioException catch (e) {\n          error = e;\n        }\n        expect(error, isNotNull);\n      },\n    );\n\n    test(\n      'badCertCallback does not use leaf certificate',\n      () async {\n        DioException? error;\n        try {\n          final dio = Dio();\n          dio.httpClientAdapter = IOHttpClientAdapter(\n            createHttpClient: () {\n              final effectiveClient = HttpClient(\n                context: SecurityContext(withTrustedRoots: false),\n              );\n              // Comparison fails because fingerprint is for leaf cert, but\n              // this cert is from Let's Encrypt.\n              effectiveClient.badCertificateCallback = (cert, host, port) =>\n                  fingerprint() == sha256.convert(cert.der).toString();\n              return effectiveClient;\n            },\n          );\n          await dio.get(\n            trustedCertUrl,\n            options: Options(validateStatus: (status) => true),\n          );\n          fail('did not throw');\n        } on DioException catch (e) {\n          error = e;\n        }\n        expect(error, isNotNull);\n      },\n      tags: ['tls'],\n    );\n\n    test(\n      '2 requests == 2 approvals',\n      () async {\n        int approvalCount = 0;\n        final dio = Dio();\n        // badCertificateCallback never called for trusted certificate\n        dio.httpClientAdapter = IOHttpClientAdapter(\n          validateCertificate: (cert, host, port) {\n            approvalCount++;\n            return fingerprint() == sha256.convert(cert!.der).toString();\n          },\n        );\n        Response response = await dio.get(\n          trustedCertUrl,\n          options: Options(validateStatus: (status) => true),\n        );\n        expect(response.data, isNotNull);\n        response = await dio.get(\n          trustedCertUrl,\n          options: Options(validateStatus: (status) => true),\n        );\n        expect(response.data, isNotNull);\n        expect(approvalCount, 2);\n      },\n      tags: ['tls'],\n    );\n  });\n}\n"
  },
  {
    "path": "dio/test/queued_interceptor_test.dart",
    "content": "import 'dart:async';\nimport 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test(\n      'QueuedInterceptor should catch synchronous errors in onRequest and reject handler',\n      () async {\n    final dio = Dio();\n    dio.interceptors.add(\n      QueuedInterceptorsWrapper(\n        onRequest: (options, handler) {\n          throw Exception('Oops');\n        },\n      ),\n    );\n    dio.httpClientAdapter = _MockAdapter();\n\n    try {\n      await dio.get('https://example.com').timeout(const Duration(seconds: 1));\n      fail('Should have failed');\n    } on DioException catch (e) {\n      expect(e.error, isA<Exception>());\n      expect(e.error.toString(), contains('Oops'));\n    } catch (e) {\n      fail('Thrown unexpected error: $e');\n    }\n  });\n\n  test(\n      'QueuedInterceptor should catch synchronous errors in onResponse and reject handler',\n      () async {\n    final dio = Dio();\n    dio.interceptors.add(\n      QueuedInterceptorsWrapper(\n        onResponse: (response, handler) {\n          throw Exception('Oops in Response');\n        },\n      ),\n    );\n    dio.httpClientAdapter = _MockAdapter();\n\n    try {\n      await dio.get('https://example.com').timeout(const Duration(seconds: 1));\n      fail('Should have failed');\n    } on DioException catch (e) {\n      expect(e.error, isA<Exception>());\n      expect(e.error.toString(), contains('Oops in Response'));\n    } catch (e) {\n      fail('Thrown unexpected error: $e');\n    }\n  });\n\n  test(\n      'QueuedInterceptor should catch synchronous errors in onError and pass to next handler',\n      () async {\n    final dio = Dio();\n    dio.interceptors.add(\n      QueuedInterceptorsWrapper(\n        onError: (error, handler) {\n          throw Exception('Oops in Error Handler');\n        },\n      ),\n    );\n    dio.httpClientAdapter = _FailingMockAdapter();\n\n    try {\n      await dio.get('https://example.com').timeout(const Duration(seconds: 1));\n      fail('Should have failed');\n    } on DioException catch (e) {\n      expect(e.error, isA<Exception>());\n      expect(e.error.toString(), contains('Oops in Error Handler'));\n    } catch (e) {\n      fail('Thrown unexpected error: $e');\n    }\n  });\n\n  test('Reproduces issue #2138 scenario with QueuedInterceptor', () async {\n    final dio = Dio();\n\n    dio.interceptors.add(_QueuedInterceptorWithError());\n    dio.httpClientAdapter = _MockAdapter();\n\n    try {\n      await dio.get('https://google.com').timeout(const Duration(seconds: 1));\n      fail('Should have failed');\n    } on DioException catch (e) {\n      expect(e.error, isA<Exception>());\n      expect(e.error.toString(), contains('some error'));\n    } catch (e) {\n      fail('Thrown unexpected error: $e');\n    }\n  });\n}\n\nclass _MockAdapter implements HttpClientAdapter {\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<List<int>>? requestStream,\n    Future? cancelFuture,\n  ) async {\n    return ResponseBody.fromString(\n      '{}',\n      200,\n      headers: {\n        Headers.contentTypeHeader: [Headers.jsonContentType],\n      },\n    );\n  }\n\n  @override\n  void close({bool force = false}) {}\n}\n\nclass _FailingMockAdapter implements HttpClientAdapter {\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<List<int>>? requestStream,\n    Future? cancelFuture,\n  ) async {\n    throw DioException(\n      requestOptions: options,\n      message: 'Mock request failed',\n    );\n  }\n\n  @override\n  void close({bool force = false}) {}\n}\n\nclass _QueuedInterceptorWithError extends QueuedInterceptor {\n  @override\n  void onRequest(\n    RequestOptions options,\n    RequestInterceptorHandler handler,\n  ) {\n    throw Exception('some error');\n  }\n\n  @override\n  void onResponse(\n    Response response,\n    ResponseInterceptorHandler handler,\n  ) {\n    handler.next(response);\n  }\n\n  @override\n  void onError(\n    DioException err,\n    ErrorInterceptorHandler handler,\n  ) {\n    handler.next(err);\n  }\n}\n"
  },
  {
    "path": "dio/test/response/response_stream_test.dart",
    "content": "import 'dart:async';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/src/response/response_stream_handler.dart';\nimport 'package:dio_test/util.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group(handleResponseStream, () {\n    late StreamController<Uint8List> source;\n\n    setUp(() {\n      source = StreamController<Uint8List>();\n    });\n\n    test('completes', () async {\n      final stream = handleResponseStream(\n        RequestOptions(),\n        ResponseBody(\n          source.stream,\n          200,\n        ),\n      );\n\n      expectLater(\n        stream,\n        emitsInOrder([\n          Uint8List.fromList([0]),\n          Uint8List.fromList([1, 2]),\n          emitsDone,\n        ]),\n      );\n\n      source.add(Uint8List.fromList([0]));\n      source.add(Uint8List.fromList([1, 2]));\n      source.close();\n    });\n\n    test('unsubscribes from source on cancel', () async {\n      final cancelToken = CancelToken();\n      final stream = handleResponseStream(\n        RequestOptions(\n          cancelToken: cancelToken,\n        ),\n        ResponseBody(\n          source.stream,\n          200,\n        ),\n      );\n\n      expectLater(\n        stream,\n        emitsInOrder([\n          Uint8List.fromList([0]),\n          emitsError(\n            matchesDioException(\n              DioExceptionType.cancel,\n              stackTraceContains: 'test/response/response_stream_test.dart',\n            ),\n          ),\n          emitsDone,\n        ]),\n      );\n\n      source.add(Uint8List.fromList([0]));\n\n      expect(source.hasListener, isTrue);\n      cancelToken.cancel();\n\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        expect(source.hasListener, isFalse);\n      });\n    });\n\n    test('sends progress with total', () async {\n      int count = 0;\n      int total = 0;\n\n      final stream = handleResponseStream(\n        RequestOptions(\n          onReceiveProgress: (c, t) {\n            count = c;\n            total = t;\n          },\n        ),\n        ResponseBody(\n          source.stream,\n          200,\n          headers: {\n            Headers.contentLengthHeader: ['6'],\n          },\n        ),\n      );\n\n      expectLater(\n        stream,\n        emitsInOrder([\n          Uint8List.fromList([0]),\n          Uint8List.fromList([1, 2]),\n          Uint8List.fromList([3, 4, 5]),\n          emitsDone,\n        ]),\n      );\n\n      source.add(Uint8List.fromList([0]));\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        expect(count, 1);\n        expect(total, 6);\n      });\n\n      source.add(Uint8List.fromList([1, 2]));\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        expect(count, 3);\n        expect(total, 6);\n      });\n\n      source.add(Uint8List.fromList([3, 4, 5]));\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        expect(count, 6);\n        expect(total, 6);\n      });\n\n      source.close();\n    });\n\n    test('sends progress without total', () async {\n      int count = 0;\n      int total = 0;\n\n      final stream = handleResponseStream(\n        RequestOptions(\n          onReceiveProgress: (c, t) {\n            count = c;\n            total = t;\n          },\n        ),\n        ResponseBody(\n          source.stream,\n          200,\n        ),\n      );\n\n      expectLater(\n        stream,\n        emitsInOrder([\n          Uint8List.fromList([0]),\n          Uint8List.fromList([1, 2]),\n          Uint8List.fromList([3, 4, 5]),\n          emitsDone,\n        ]),\n      );\n\n      source.add(Uint8List.fromList([0]));\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        expect(count, 1);\n        expect(total, -1);\n      });\n\n      source.add(Uint8List.fromList([1, 2]));\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        expect(count, 3);\n        expect(total, -1);\n      });\n\n      source.add(Uint8List.fromList([3, 4, 5]));\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        expect(count, 6);\n        expect(total, -1);\n      });\n\n      source.close();\n    });\n\n    test('emits error on source error', () async {\n      final stream = handleResponseStream(\n        RequestOptions(),\n        ResponseBody(\n          source.stream,\n          200,\n        ),\n      );\n\n      expectLater(\n        stream,\n        emitsInOrder([\n          Uint8List.fromList([0]),\n          emitsError(isA<FormatException>()),\n          emitsDone,\n        ]),\n      );\n\n      source.add(Uint8List.fromList([0]));\n      source.addError(const FormatException());\n      source.close();\n\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        expect(source.hasListener, isFalse);\n      });\n    });\n\n    test('emits error on receiveTimeout', () async {\n      final stream = handleResponseStream(\n        RequestOptions(\n          receiveTimeout: const Duration(milliseconds: 100),\n        ),\n        ResponseBody(\n          source.stream,\n          200,\n        ),\n      );\n\n      expectLater(\n        stream,\n        emitsInOrder([\n          Uint8List.fromList([0]),\n          Uint8List.fromList([1]),\n          emitsError(\n            matchesDioException(\n              DioExceptionType.receiveTimeout,\n              stackTraceContains: 'test/response/response_stream_test.dart',\n            ),\n          ),\n          emitsDone,\n        ]),\n      );\n\n      source.add(Uint8List.fromList([0]));\n      await Future.delayed(const Duration(milliseconds: 90), () {\n        source.add(Uint8List.fromList([1]));\n      });\n      await Future.delayed(const Duration(milliseconds: 110), () {\n        source.add(Uint8List.fromList([2]));\n      });\n\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        expect(source.hasListener, isFalse);\n      });\n    });\n\n    test('not watching the receive timeout after cancelled', () async {\n      bool timerCancelled = false;\n      final cancelToken = CancelToken();\n      final stream = handleResponseStream(\n        RequestOptions(\n          cancelToken: cancelToken,\n          receiveTimeout: const Duration(seconds: 1),\n        ),\n        ResponseBody(source.stream, 200),\n        onReceiveTimeoutWatchCancelled: () => timerCancelled = true,\n      );\n      expect(source.hasListener, isTrue);\n      expectLater(\n        stream,\n        emitsInOrder([\n          Uint8List.fromList([0]),\n          emitsError(\n            matchesDioException(\n              DioExceptionType.cancel,\n              stackTraceContains: 'test/response/response_stream_test.dart',\n            ),\n          ),\n          emitsDone,\n        ]),\n      );\n      source.add(Uint8List.fromList([0]));\n      cancelToken.cancel();\n      await Future.microtask(() {});\n      expect(timerCancelled, isTrue);\n    });\n  });\n}\n"
  },
  {
    "path": "dio/test/stacktrace_test.dart",
    "content": "import 'dart:convert';\nimport 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\nimport 'package:dio_test/util.dart';\nimport 'package:mockito/mockito.dart';\nimport 'package:test/test.dart';\n\nimport 'mock/adapters.dart';\nimport 'mock/http_mock.dart';\nimport 'mock/http_mock.mocks.dart';\n\nvoid main() async {\n  group('$DioException.stackTrace', () {\n    test(DioExceptionType.badResponse, () async {\n      final dio = Dio()\n        ..httpClientAdapter = MockAdapter()\n        ..options.baseUrl = MockAdapter.mockBase;\n\n      await expectLater(\n        dio.get('/foo'),\n        throwsA(\n          allOf([\n            isA<DioException>(),\n            (e) => e.type == DioExceptionType.badResponse,\n            (e) =>\n                e.stackTrace.toString().contains('test/stacktrace_test.dart'),\n          ]),\n        ),\n      );\n    });\n\n    test(DioExceptionType.cancel, () async {\n      final dio = Dio()\n        ..httpClientAdapter = MockAdapter()\n        ..options.baseUrl = MockAdapter.mockBase;\n\n      final token = CancelToken();\n      Future.delayed(const Duration(milliseconds: 10), () {\n        token.cancel('cancelled');\n        dio.httpClientAdapter.close(force: true);\n      });\n\n      await expectLater(\n        dio.get('/test-timeout', cancelToken: token),\n        throwsA(\n          allOf([\n            isA<DioException>(),\n            (e) => e.type == DioExceptionType.cancel,\n            (e) =>\n                e.stackTrace.toString().contains('test/stacktrace_test.dart'),\n          ]),\n        ),\n      );\n    });\n\n    test(\n      DioExceptionType.connectionTimeout,\n      () async {\n        await HttpOverrides.runWithHttpOverrides(\n          () async {\n            final timeout = const Duration(milliseconds: 10);\n            final dio = Dio()\n              ..options.baseUrl = nonRoutableUrl\n              ..options.connectTimeout = timeout;\n\n            when(httpClientMock.openUrl('GET', any)).thenAnswer(\n              (_) async {\n                final request = MockHttpClientRequest();\n                await Future.delayed(\n                  Duration(milliseconds: timeout.inMilliseconds + 10),\n                );\n                return request;\n              },\n            );\n\n            await expectLater(\n              dio.get('/test'),\n              throwsA(\n                allOf([\n                  isA<DioException>(),\n                  (e) => e.type == DioExceptionType.connectionTimeout,\n                  (e) => e.stackTrace\n                      .toString()\n                      .contains('test/stacktrace_test.dart'),\n                ]),\n              ),\n            );\n          },\n          MockHttpOverrides(),\n        );\n      },\n      testOn: '!browser',\n    );\n\n    test(\n      DioExceptionType.receiveTimeout,\n      () async {\n        await HttpOverrides.runWithHttpOverrides(\n          () async {\n            final timeout = const Duration(milliseconds: 10);\n            final dio = Dio()\n              ..options.receiveTimeout = timeout\n              ..options.baseUrl = 'https://does.not.exist';\n\n            when(httpClientMock.openUrl('GET', any)).thenAnswer(\n              (_) async {\n                final request = MockHttpClientRequest();\n                final response = MockHttpClientResponse();\n                when(request.close()).thenAnswer(\n                  (_) => Future.delayed(\n                    Duration(milliseconds: timeout.inMilliseconds + 10),\n                    () => response,\n                  ),\n                );\n                return request;\n              },\n            );\n\n            await expectLater(\n              dio.get('/test'),\n              throwsA(\n                allOf([\n                  isA<DioException>(),\n                  (DioException e) => e.type == DioExceptionType.receiveTimeout,\n                  (DioException e) => e.stackTrace\n                      .toString()\n                      .contains('test/stacktrace_test.dart'),\n                ]),\n              ),\n            );\n          },\n          MockHttpOverrides(),\n        );\n      },\n      testOn: '!browser',\n    );\n\n    test(\n      DioExceptionType.sendTimeout,\n      () async {\n        await HttpOverrides.runWithHttpOverrides(\n          () async {\n            final timeout = const Duration(milliseconds: 10);\n            final dio = Dio()\n              ..options.sendTimeout = timeout\n              ..options.baseUrl = 'https://does.not.exist';\n\n            when(httpClientMock.openUrl('GET', any)).thenAnswer(\n              (_) async {\n                final request = MockHttpClientRequest();\n                when(request.addStream(any)).thenAnswer(\n                  (_) async => Future.delayed(\n                    Duration(milliseconds: timeout.inMilliseconds + 10),\n                  ),\n                );\n                when(request.headers).thenReturn(MockHttpHeaders());\n                return request;\n              },\n            );\n\n            await expectLater(\n              dio.get('/test', data: 'some data'),\n              throwsA(\n                allOf([\n                  isA<DioException>(),\n                  (DioException e) => e.type == DioExceptionType.sendTimeout,\n                  (DioException e) => e.stackTrace\n                      .toString()\n                      .contains('test/stacktrace_test.dart'),\n                ]),\n              ),\n            );\n          },\n          MockHttpOverrides(),\n        );\n      },\n      testOn: '!browser',\n    );\n\n    test(\n      DioExceptionType.badCertificate,\n      () async {\n        await HttpOverrides.runWithHttpOverrides(\n          () async {\n            final dio = Dio()\n              ..options.baseUrl = 'https://does.not.exist'\n              ..httpClientAdapter = IOHttpClientAdapter(\n                validateCertificate: (_, __, ___) => false,\n              );\n\n            when(httpClientMock.openUrl('GET', any)).thenAnswer(\n              (_) async {\n                final request = MockHttpClientRequest();\n                final response = MockHttpClientResponse();\n                when(request.close()).thenAnswer((_) => Future.value(response));\n                when(response.certificate).thenReturn(null);\n                return request;\n              },\n            );\n\n            await expectLater(\n              dio.get('/test'),\n              throwsA(\n                allOf([\n                  isA<DioException>(),\n                  (DioException e) => e.type == DioExceptionType.badCertificate,\n                  (DioException e) => e.stackTrace\n                      .toString()\n                      .contains('test/stacktrace_test.dart'),\n                ]),\n              ),\n            );\n          },\n          MockHttpOverrides(),\n        );\n      },\n      testOn: '!browser',\n    );\n    group('DioExceptionType.connectionError', () {\n      test(\n        'SocketException on request',\n        () async {\n          final dio = Dio()\n            ..options.baseUrl = 'https://does.not.exist'\n            ..httpClientAdapter = IOHttpClientAdapter();\n          await expectLater(\n            dio.get('/test', data: 'test'),\n            throwsA(\n              allOf([\n                isA<DioException>(),\n                (e) => e.type == DioExceptionType.connectionError,\n                (e) => e.error is SocketException,\n                (e) => (e.error as SocketException)\n                    .message\n                    .contains(\"Failed host lookup: 'does.not.exist'\"),\n                (e) => e.stackTrace\n                    .toString()\n                    .contains('test/stacktrace_test.dart'),\n              ]),\n            ),\n          );\n        },\n        testOn: 'vm',\n      );\n    });\n    group('DioExceptionType.unknown', () {\n      test(\n        JsonUnsupportedObjectError,\n        () async {\n          final dio = Dio()..options.baseUrl = 'https://does.not.exist';\n\n          await expectLater(\n            dio.get(\n              '/test',\n              options: Options(contentType: Headers.jsonContentType),\n              data: Object(),\n            ),\n            throwsA(\n              allOf([\n                isA<DioException>(),\n                (DioException e) => e.type == DioExceptionType.unknown,\n                (DioException e) => e.error is JsonUnsupportedObjectError,\n                (DioException e) => e.stackTrace\n                    .toString()\n                    .contains('test/stacktrace_test.dart'),\n              ]),\n            ),\n          );\n        },\n        testOn: '!browser',\n      );\n\n      test(\n        'SocketException on response',\n        () async {\n          final dio = Dio()\n            ..options.baseUrl = 'https://does.not.exist'\n            ..httpClientAdapter = IOHttpClientAdapter(\n              createHttpClient: () {\n                final request = MockHttpClientRequest();\n                final client = MockHttpClient();\n                when(client.openUrl(any, any)).thenAnswer((_) async => request);\n                when(request.headers).thenReturn(MockHttpHeaders());\n                when(request.addStream(any)).thenAnswer((_) => Future.value());\n                when(request.close()).thenAnswer(\n                  (_) => Future.delayed(const Duration(milliseconds: 50), () {\n                    throw const SocketException('test');\n                  }),\n                );\n                return client;\n              },\n            );\n\n          await expectLater(\n            dio.get('/test', data: 'test'),\n            throwsA(\n              allOf([\n                isA<DioException>(),\n                (e) => e.type == DioExceptionType.unknown,\n                (e) => e.error is SocketException,\n                (e) => e.stackTrace\n                    .toString()\n                    .contains('test/stacktrace_test.dart'),\n              ]),\n            ),\n          );\n        },\n        testOn: 'vm',\n      );\n    });\n\n    test('Interceptor gets stacktrace in onError', () async {\n      final dio = Dio()\n        ..options.baseUrl = EchoAdapter.mockBase\n        ..httpClientAdapter = EchoAdapter();\n\n      StackTrace? caughtStackTrace;\n      dio.interceptors.addAll([\n        InterceptorsWrapper(\n          onError: (error, handler) {\n            caughtStackTrace = error.stackTrace;\n            handler.next(error);\n          },\n        ),\n        InterceptorsWrapper(\n          onRequest: (options, handler) {\n            final error = DioException(error: Error(), requestOptions: options);\n            handler.reject(error, true);\n          },\n        ),\n      ]);\n\n      await expectLater(\n        dio.get('/error'),\n        throwsA(\n          allOf([\n            isA<DioException>(),\n            (e) => e.stackTrace == caughtStackTrace,\n            (e) =>\n                e.stackTrace.toString().contains('test/stacktrace_test.dart'),\n          ]),\n        ),\n        reason: 'Stacktrace should be available in onError',\n      );\n    });\n\n    test('QueuedInterceptor gets stacktrace in onError', () async {\n      final dio = Dio()\n        ..options.baseUrl = EchoAdapter.mockBase\n        ..httpClientAdapter = EchoAdapter();\n\n      StackTrace? caughtStackTrace;\n      dio.interceptors.addAll([\n        QueuedInterceptorsWrapper(\n          onError: (error, handler) {\n            caughtStackTrace = error.stackTrace;\n            handler.next(error);\n          },\n        ),\n        QueuedInterceptorsWrapper(\n          onRequest: (options, handler) {\n            final error = DioException(\n              error: Error(),\n              requestOptions: options,\n            );\n            handler.reject(error, true);\n          },\n        ),\n      ]);\n\n      await expectLater(\n        dio.get('/error'),\n        throwsA(\n          allOf([\n            isA<DioException>(),\n            (e) => e.stackTrace == caughtStackTrace,\n            (e) =>\n                e.stackTrace.toString().contains('test/stacktrace_test.dart'),\n          ]),\n        ),\n        reason: 'Stacktrace should be available in onError',\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "dio/test/test_suite_test.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:dio_test/tests.dart';\n\nvoid main() {\n  dioAdapterTestSuite(\n    (baseUrl) => Dio(BaseOptions(baseUrl: baseUrl)),\n  );\n}\n"
  },
  {
    "path": "dio/test/timeout_test.dart",
    "content": "import 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\nimport 'package:dio_test/util.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  late Dio dio;\n\n  setUp(() {\n    dio = Dio();\n    dio.options.baseUrl = httpbunBaseUrl;\n  });\n\n  group('Timeout exception of', () {\n    group('connectTimeout', () {\n      test(\n        'update between calls',\n        () async {\n          final client = HttpClient();\n          final dio = Dio()\n            ..options.baseUrl = nonRoutableUrl\n            ..httpClientAdapter = IOHttpClientAdapter(\n              createHttpClient: () => client,\n            );\n\n          dio.options.connectTimeout = const Duration(milliseconds: 5);\n          await dio\n              .get('/')\n              .catchError((e) => Response(requestOptions: RequestOptions()));\n          expect(client.connectionTimeout, dio.options.connectTimeout);\n          dio.options.connectTimeout = const Duration(milliseconds: 10);\n          await dio\n              .get('/')\n              .catchError((e) => Response(requestOptions: RequestOptions()));\n          expect(client.connectionTimeout, dio.options.connectTimeout);\n        },\n        testOn: 'vm',\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "dio/test/transformer_test.dart",
    "content": "import 'dart:convert';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/src/transformers/util/consolidate_bytes.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  // Regression: https://github.com/cfug/dio/issues/2256\n  test('Transformer.isJsonMimeType', () {\n    expect(Transformer.isJsonMimeType('application/json'), isTrue);\n    expect(Transformer.isJsonMimeType('application/json;charset=utf8'), isTrue);\n    expect(Transformer.isJsonMimeType('text/json'), isTrue);\n    expect(Transformer.isJsonMimeType('image/jpg'), isFalse);\n    expect(Transformer.isJsonMimeType('image/png'), isFalse);\n    expect(Transformer.isJsonMimeType('.png'), isFalse);\n    expect(Transformer.isJsonMimeType('.png;charset=utf-8'), isFalse);\n  });\n\n  group(BackgroundTransformer(), () {\n    test('transformResponse transforms the request', () async {\n      final transformer = BackgroundTransformer();\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.json),\n        ResponseBody.fromString(\n          '{\"foo\": \"bar\"}',\n          200,\n          headers: {\n            Headers.contentTypeHeader: ['application/json'],\n          },\n        ),\n      );\n      expect(response, {'foo': 'bar'});\n    });\n  });\n\n  // Regression: https://github.com/cfug/dio/issues/1834\n  test('null response body only when the response is JSON', () async {\n    final transformer = BackgroundTransformer();\n    for (final responseType in ResponseType.values) {\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: responseType),\n        ResponseBody.fromBytes([], 200),\n      );\n      switch (responseType) {\n        case ResponseType.json:\n        case ResponseType.plain:\n          expect(response, '');\n          break;\n        case ResponseType.stream:\n          expect(response, isA<ResponseBody>());\n          break;\n        case ResponseType.bytes:\n          expect(response, []);\n          break;\n        default:\n          throw AssertionError('Unknown response type: $responseType');\n      }\n    }\n    final jsonResponse = await transformer.transformResponse(\n      RequestOptions(responseType: ResponseType.json),\n      ResponseBody.fromBytes(\n        [],\n        200,\n        headers: {\n          Headers.contentTypeHeader: [Headers.jsonContentType],\n        },\n      ),\n    );\n    expect(jsonResponse, null);\n  });\n\n  group(FusedTransformer, () {\n    test(\n        'transformResponse transforms json without content-length set in response',\n        () async {\n      final transformer = FusedTransformer();\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.json),\n        ResponseBody.fromString(\n          '{\"foo\": \"bar\"}',\n          200,\n          headers: {\n            Headers.contentTypeHeader: ['application/json'],\n          },\n        ),\n      );\n      expect(response, {'foo': 'bar'});\n    });\n\n    test('transformResponse transforms json with content-length', () async {\n      final transformer = FusedTransformer();\n      const jsonString = '{\"foo\": \"bar\"}';\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.json),\n        ResponseBody.fromString(\n          jsonString,\n          200,\n          headers: {\n            Headers.contentTypeHeader: ['application/json'],\n            Headers.contentLengthHeader: [\n              utf8.encode(jsonString).length.toString(),\n            ],\n          },\n        ),\n      );\n      expect(response, {'foo': 'bar'});\n    });\n\n    test('transformResponse transforms json array', () async {\n      final transformer = FusedTransformer();\n      const jsonString = '[{\"foo\": \"bar\"}]';\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.json),\n        ResponseBody.fromString(\n          jsonString,\n          200,\n          headers: {\n            Headers.contentTypeHeader: ['application/json'],\n            Headers.contentLengthHeader: [\n              utf8.encode(jsonString).length.toString(),\n            ],\n          },\n        ),\n      );\n      expect(\n        response,\n        [\n          {'foo': 'bar'},\n        ],\n      );\n    });\n\n    test('transforms json in background isolate', () async {\n      final transformer = FusedTransformer(contentLengthIsolateThreshold: 0);\n      final jsonString = '{\"foo\": \"bar\"}';\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.json),\n        ResponseBody.fromString(\n          jsonString,\n          200,\n          headers: {\n            Headers.contentTypeHeader: ['application/json'],\n            Headers.contentLengthHeader: [\n              utf8.encode(jsonString).length.toString(),\n            ],\n          },\n        ),\n      );\n      expect(response, {'foo': 'bar'});\n    });\n\n    test('transformResponse transforms that arrives in many chunks', () async {\n      final transformer = FusedTransformer();\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.json),\n        ResponseBody(\n          Stream.fromIterable(\n              /* utf-8 encoding of {\"foo\": \"bar\"} */\n              [\n                Uint8List.fromList([123]),\n                Uint8List.fromList([34]),\n                Uint8List.fromList([102, 111, 111]),\n                Uint8List.fromList([34]),\n                Uint8List.fromList([58]),\n                Uint8List.fromList([34]),\n                Uint8List.fromList([98, 97, 114]),\n                Uint8List.fromList([34]),\n                Uint8List.fromList([125]),\n              ]),\n          200,\n          headers: {\n            Headers.contentTypeHeader: ['application/json'],\n          },\n        ),\n      );\n      expect(response, {'foo': 'bar'});\n    });\n\n    test('transformResponse handles bytes', () async {\n      final transformer = FusedTransformer();\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.bytes),\n        ResponseBody.fromBytes(\n          [1, 2, 3],\n          200,\n        ),\n      );\n      expect(response, [1, 2, 3]);\n    });\n\n    test('transformResponse handles when response stream has multiple chunks',\n        () async {\n      final transformer = FusedTransformer();\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.bytes),\n        ResponseBody(\n          Stream.fromIterable([\n            Uint8List.fromList([1, 2, 3]),\n            Uint8List.fromList([4, 5, 6]),\n            Uint8List.fromList([7, 8, 9]),\n          ]),\n          200,\n        ),\n      );\n      expect(response, [1, 2, 3, 4, 5, 6, 7, 8, 9]);\n    });\n\n    test('transformResponse handles plain text', () async {\n      final transformer = FusedTransformer();\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.plain),\n        ResponseBody.fromString(\n          'plain text',\n          200,\n          headers: {\n            Headers.contentTypeHeader: ['text/plain'],\n          },\n        ),\n      );\n      expect(response, 'plain text');\n    });\n\n    test('ResponseType.plain takes precedence over content-type', () async {\n      final transformer = FusedTransformer();\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.plain),\n        ResponseBody.fromString(\n          '{\"text\": \"plain text\"}',\n          200,\n          headers: {\n            Headers.contentTypeHeader: ['application/json'],\n          },\n        ),\n      );\n      expect(response, '{\"text\": \"plain text\"}');\n    });\n\n    test('transformResponse handles streams', () async {\n      final transformer = FusedTransformer();\n      final response = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.stream),\n        ResponseBody.fromBytes(\n          [1, 2, 3],\n          200,\n        ),\n      );\n      expect(response, isA<ResponseBody>());\n    });\n\n    test('null response body only when the response is JSON', () async {\n      final transformer = FusedTransformer();\n      for (final responseType in ResponseType.values) {\n        final response = await transformer.transformResponse(\n          RequestOptions(responseType: responseType),\n          ResponseBody.fromBytes([], 200),\n        );\n        switch (responseType) {\n          case ResponseType.json:\n          case ResponseType.plain:\n            expect(response, '');\n            break;\n          case ResponseType.stream:\n            expect(response, isA<ResponseBody>());\n            break;\n          case ResponseType.bytes:\n            expect(response, []);\n            break;\n          default:\n            throw AssertionError('Unknown response type: $responseType');\n        }\n      }\n      final jsonResponse = await transformer.transformResponse(\n        RequestOptions(responseType: ResponseType.json),\n        ResponseBody.fromBytes(\n          [],\n          200,\n          headers: {\n            Headers.contentTypeHeader: [Headers.jsonContentType],\n          },\n        ),\n      );\n      expect(jsonResponse, null);\n    });\n\n    test('transform the request using urlencode', () async {\n      final transformer = FusedTransformer();\n\n      final request = await transformer.transformRequest(\n        RequestOptions(responseType: ResponseType.json, data: {'foo': 'bar'}),\n      );\n      expect(request, 'foo=bar');\n    });\n\n    test('transform the request using json', () async {\n      final transformer = FusedTransformer();\n\n      final request = await transformer.transformRequest(\n        RequestOptions(\n          responseType: ResponseType.json,\n          data: {'foo': 'bar'},\n          headers: {'Content-Type': 'application/json'},\n        ),\n      );\n      expect(request, '{\"foo\":\"bar\"}');\n    });\n\n    test(\n      'HEAD request with content-length but empty body should not return null',\n      () async {\n        final transformer = FusedTransformer();\n        final response = await transformer.transformResponse(\n          RequestOptions(responseType: ResponseType.json, method: 'HEAD'),\n          ResponseBody(\n            Stream.value(Uint8List(0)),\n            200,\n            headers: {\n              Headers.contentTypeHeader: ['application/json'],\n              Headers.contentLengthHeader: ['123'],\n            },\n          ),\n        );\n        expect(response, null);\n      },\n    );\n\n    test(\n      'can handle status 304 responses with content-length but empty body',\n      () async {\n        final transformer = FusedTransformer();\n        final response = await transformer.transformResponse(\n          RequestOptions(responseType: ResponseType.json),\n          ResponseBody(\n            Stream.value(Uint8List(0)),\n            304,\n            headers: {\n              Headers.contentTypeHeader: ['application/json'],\n              Headers.contentLengthHeader: ['123'],\n            },\n          ),\n        );\n        expect(response, null);\n      },\n    );\n  });\n\n  group('consolidate bytes', () {\n    test('consolidates bytes from a stream', () async {\n      final stream = Stream.fromIterable([\n        Uint8List.fromList([1, 2, 3]),\n        Uint8List.fromList([4, 5, 6]),\n        Uint8List.fromList([7, 8, 9]),\n      ]);\n      final bytes = await consolidateBytes(stream);\n      expect(bytes, Uint8List.fromList([1, 2, 3, 4, 5, 6, 7, 8, 9]));\n    });\n\n    test('handles empty stream', () async {\n      const stream = Stream<Uint8List>.empty();\n      final bytes = await consolidateBytes(stream);\n      expect(bytes, Uint8List(0));\n    });\n\n    test('handles empty lists', () async {\n      final stream = Stream.value(Uint8List(0));\n      final bytes = await consolidateBytes(stream);\n      expect(bytes, Uint8List(0));\n    });\n  });\n}\n"
  },
  {
    "path": "dio/test/utils.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\n/// The current server instance.\nHttpServer? _server;\n\nEncoding requiredEncodingForCharset(String charset) =>\n    Encoding.getByName(charset) ??\n    (throw FormatException('Unsupported encoding \"$charset\".'));\n\n/// The URL for the current server instance.\nUri get serverUrl => Uri.parse('http://localhost:${_server?.port}');\n\n/// Starts a new HTTP server.\nFuture<void> startServer() async {\n  _server = (await HttpServer.bind('localhost', 0))\n    ..listen((request) async {\n      final path = request.uri.path;\n      final response = request.response;\n\n      if (path == '/error') {\n        const content = 'error';\n        response\n          ..statusCode = 400\n          ..contentLength = content.length\n          ..write(content);\n        response.close();\n        return;\n      }\n\n      if (path == '/loop') {\n        final n = int.parse(request.uri.query);\n        response\n          ..statusCode = 302\n          ..headers\n              .set('location', serverUrl.resolve('/loop?${n + 1}').toString())\n          ..contentLength = 0;\n        response.close();\n        return;\n      }\n\n      if (path == '/redirect') {\n        response\n          ..statusCode = 302\n          ..headers.set('location', serverUrl.resolve('/').toString())\n          ..contentLength = 0;\n        response.close();\n        return;\n      }\n\n      if (path == '/no-content-length') {\n        response\n          ..statusCode = 200\n          ..contentLength = -1\n          ..write('body');\n        response.close();\n        return;\n      }\n\n      if (path == '/list') {\n        response.headers.contentType = ContentType('application', 'json');\n        response\n          ..statusCode = 200\n          ..contentLength = -1\n          ..write('[1,2,3]');\n        response.close();\n        return;\n      }\n\n      if (path == '/multi-value-header') {\n        response.headers.contentType = ContentType('application', 'json');\n        response.headers.add(\n          'x-multi-value-request-header-echo',\n          request.headers.value('x-multi-value-request-header').toString(),\n        );\n        response\n          ..statusCode = 200\n          ..contentLength = -1\n          ..write('');\n        response.close();\n        return;\n      }\n\n      if (path == '/download') {\n        final count = int.parse(request.uri.queryParameters['count'] ?? '1');\n        final gap = int.parse(request.uri.queryParameters['gap'] ?? '0');\n        const content = 'I am a text file';\n        final contentBytes = utf8.encode(content);\n        response\n          ..bufferOutput = gap <= 0\n          ..contentLength = contentBytes.length * count\n          ..headers.set('content-encoding', 'plain')\n          ..statusCode = 200;\n        for (int i = 0; i < count; i++) {\n          response.add(contentBytes);\n          await response.flush();\n          if (i < count - 1 && gap > 0) {\n            await Future.delayed(Duration(seconds: gap));\n          }\n        }\n        await Future.delayed(const Duration(milliseconds: 300));\n        await response.close();\n        return;\n      }\n\n      final requestBodyBytes = await ByteStream(request).toBytes();\n      final encodingName = request.uri.queryParameters['response-encoding'];\n      final outputEncoding = encodingName == null\n          ? ascii\n          : requiredEncodingForCharset(encodingName);\n\n      response.headers.contentType =\n          ContentType('application', 'json', charset: outputEncoding.name);\n      response.headers.set('single', 'value');\n\n      dynamic requestBody;\n      if (requestBodyBytes.isEmpty) {\n        requestBody = null;\n      } else {\n        final encoding = requiredEncodingForCharset(\n          request.headers.contentType?.charset ?? 'utf-8',\n        );\n        requestBody = encoding.decode(requestBodyBytes);\n      }\n\n      final content = <String, dynamic>{\n        'method': request.method,\n        'path': request.uri.path,\n        'query': request.uri.query,\n        'headers': {},\n      };\n      if (requestBody != null) {\n        content['body'] = requestBody;\n      }\n      request.headers.forEach((name, values) {\n        // These headers are automatically generated by dart:io, so we don't\n        // want to test them here.\n        if (name == 'cookie' || name == 'host') {\n          return;\n        }\n\n        content['headers'][name] = values;\n      });\n\n      final body = json.encode(content);\n      response\n        ..contentLength = body.length\n        ..write(body);\n      response.close();\n    });\n}\n\n/// Stops the current HTTP server.\nvoid stopServer() {\n  if (_server != null) {\n    _server!.close();\n    _server = null;\n  }\n}\n\n/// A matcher for functions that throw SocketException.\nfinal Matcher throwsSocketException =\n    throwsA(const TypeMatcher<SocketException>());\n\n/// A matcher for functions that throw DioException of type connectionError.\nfinal Matcher throwsDioExceptionConnectionError = throwsA(\n  allOf([\n    isA<DioException>(),\n    (DioException e) => e.type == DioExceptionType.connectionError,\n  ]),\n);\n\n/// A stream of chunks of bytes representing a single piece of data.\nclass ByteStream extends StreamView<List<int>> {\n  ByteStream(super.stream);\n\n  /// Returns a single-subscription byte stream that will emit the given bytes\n  /// in a single chunk.\n  factory ByteStream.fromBytes(List<int> bytes) =>\n      ByteStream(Stream.fromIterable([bytes]));\n\n  /// Collects the data of this stream in a [Uint8List].\n  Future<Uint8List> toBytes() {\n    final completer = Completer<Uint8List>();\n    final sink = ByteConversionSink.withCallback(\n      (bytes) => completer.complete(Uint8List.fromList(bytes)),\n    );\n    listen(\n      sink.add,\n      onError: completer.completeError,\n      onDone: sink.close,\n      cancelOnError: true,\n    );\n    return completer.future;\n  }\n\n  /// Collect the data of this stream in a [String], decoded according to\n  /// [encoding], which defaults to `UTF8`.\n  Future<String> bytesToString([Encoding encoding = utf8]) =>\n      encoding.decodeStream(this);\n\n  Stream<String> toStringStream([Encoding encoding = utf8]) =>\n      encoding.decoder.bind(this);\n}\n"
  },
  {
    "path": "dio_test/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2024 The CFUG Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "dio_test/README.md",
    "content": "# Dio shared test package\n\nThe package gathered shared tests between Dio's packages,\nsuch as `dio` and `http2_adapter`.\n\nThe package was meant to not be published to pub.dev.\nTo use the package in tests, make the library depend like this:\n\n```yaml\ndev_dependencies:\n  # Shared test package.\n  dio_test:\n    git:\n      url: https://github.com/cfug/dio\n      path: dio_test\n```\n\nThen, use `dependency_overrides` or `pubspec_overrides.yaml`\nto override the package to a local path or somewhere else.\n\n## Copyright & License\n\nThe project is authored by\n[Chinese Flutter User Group (@cfug)](https://github.com/cfug)\nsince 2024.\n\nThe project consents [the MIT license](LICENSE).\n"
  },
  {
    "path": "dio_test/analysis_options.yaml",
    "content": "include: ../analysis_options.yaml\n\nlinter:\n  rules:\n    depend_on_referenced_packages: false\n"
  },
  {
    "path": "dio_test/dio_test.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/test\" isTestSource=\"true\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n  </component>\n</module>"
  },
  {
    "path": "dio_test/lib/src/httpbun.dart",
    "content": "const httpbunBaseUrl = 'https://httpbun.com';\n"
  },
  {
    "path": "dio_test/lib/src/matcher.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\n/// A matcher for functions that throw [DioException] of a specified type,\n/// with an optional matcher for the stackTrace containing the specified text.\nMatcher throwsDioException(\n  DioExceptionType type, {\n  String? messageContains,\n  String? stackTraceContains,\n  Object? matcher,\n}) =>\n    throwsA(\n      matchesDioException(\n        type,\n        messageContains: messageContains,\n        stackTraceContains: stackTraceContains,\n        matcher: matcher,\n      ),\n    );\n\nMatcher matchesDioException(\n  DioExceptionType type, {\n  String? messageContains,\n  String? stackTraceContains,\n  Object? matcher,\n}) {\n  TypeMatcher<DioException> base = isA<DioException>().having(\n    (e) => e.type,\n    'type',\n    equals(type),\n  );\n  if (messageContains != null) {\n    base = base.having(\n      (e) => e.message,\n      'message',\n      contains(messageContains),\n    );\n  }\n  if (stackTraceContains != null) {\n    base = base.having(\n      (e) => e.stackTrace.toString(),\n      'stackTrace',\n      contains(stackTraceContains),\n    );\n  }\n  return allOf([\n    base,\n    if (matcher != null) matcher,\n  ]);\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/basic_tests.dart",
    "content": "import 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid basicTests(\n  Dio Function(String baseUrl) create,\n) {\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  group('basic request', () {\n    test(\n      'works with non-TLS requests',\n      () => dio.get('http://flutter-io.cn/'),\n      testOn: 'vm',\n    );\n\n    test('fails with an invalid HTTP URL', () {\n      expectLater(\n        dio.get('http://does.not.exist'),\n        throwsDioException(\n          DioExceptionType.connectionError,\n          matcher: kIsWeb\n              ? null\n              : isA<DioException>().having(\n                  (e) => e.error,\n                  'inner exception',\n                  isA<SocketException>(),\n                ),\n        ),\n      );\n    });\n\n    test('fails with an invalid HTTPS URL', () {\n      expectLater(\n        () => dio.get('https://does.not.exist'),\n        throwsDioException(\n          DioExceptionType.connectionError,\n          matcher: kIsWeb\n              ? null\n              : isA<DioException>().having(\n                  (e) => e.error,\n                  'inner exception',\n                  isA<SocketException>(),\n                ),\n        ),\n      );\n    });\n\n    test('throws DioException that can be caught', () async {\n      try {\n        await dio.get('https://does.not.exist');\n        fail('did not throw');\n      } on DioException catch (e) {\n        expect(e, isNotNull);\n      }\n    });\n\n    test('POST string', () async {\n      final response = await dio.post('/post', data: 'TEST');\n      expect(response.data['data'], 'TEST');\n    });\n\n    test('POST map', () async {\n      final response = await dio.post(\n        '/post',\n        data: {'a': 1, 'b': 2, 'c': 3},\n      );\n      expect(response.data['data'], '{\"a\":1,\"b\":2,\"c\":3}');\n      expect(response.statusCode, 200);\n    });\n  });\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/cancellation_tests.dart",
    "content": "import 'dart:async';\n\nimport 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid cancellationTests(\n  Dio Function(String baseUrl) create,\n) {\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  group('cancellation', () {\n    test('basic', () {\n      final token = CancelToken();\n\n      Future.delayed(const Duration(milliseconds: 250), () {\n        token.cancel('cancelled');\n      });\n\n      expectLater(\n        dio.get('/drip-lines?delay=0', cancelToken: token),\n        throwsDioException(\n          DioExceptionType.cancel,\n          stackTraceContains: kIsWeb\n              ? 'test/test_suite_test.dart'\n              : 'test/cancellation_tests.dart',\n          matcher: allOf([\n            isA<DioException>().having(\n              (e) => e.error,\n              'error',\n              'cancelled',\n            ),\n            isA<DioException>().having(\n              (e) => e.message,\n              'message',\n              'The request was manually cancelled by the user.',\n            ),\n          ]),\n        ),\n      );\n    });\n\n    test('cancel multiple requests with single token', () async {\n      final token = CancelToken();\n\n      final receiveSuccess1 = Completer();\n      final receiveSuccess2 = Completer();\n      final futures = [\n        dio.get(\n          '/drip-lines?delay=0&duration=5&numbytes=100',\n          cancelToken: token,\n          onReceiveProgress: (count, total) {\n            if (!receiveSuccess1.isCompleted) {\n              receiveSuccess1.complete();\n            }\n          },\n        ),\n        dio.get(\n          '/drip-lines?delay=0&duration=5&numbytes=100',\n          cancelToken: token,\n          onReceiveProgress: (count, total) {\n            if (!receiveSuccess2.isCompleted) {\n              receiveSuccess2.complete();\n            }\n          },\n        ),\n      ];\n\n      for (final future in futures) {\n        expectLater(\n          future,\n          throwsDioException(\n            DioExceptionType.cancel,\n            stackTraceContains: kIsWeb\n                ? 'test/test_suite_test.dart'\n                : 'test/cancellation_tests.dart',\n            matcher: allOf([\n              isA<DioException>().having(\n                (e) => e.error,\n                'error',\n                'cancelled',\n              ),\n              isA<DioException>().having(\n                (e) => e.message,\n                'message',\n                'The request was manually cancelled by the user.',\n              ),\n            ]),\n          ),\n        );\n      }\n\n      await Future.wait([\n        receiveSuccess1.future,\n        receiveSuccess2.future,\n      ]);\n\n      token.cancel('cancelled');\n\n      expect(receiveSuccess1.isCompleted, isTrue);\n      expect(receiveSuccess2.isCompleted, isTrue);\n      expect(token.isCancelled, isTrue);\n      expect(\n        token.cancelError,\n        isA<DioException>().having(\n          (e) => e.type,\n          'type',\n          DioExceptionType.cancel,\n        ),\n      );\n    });\n\n    // Regression: https://github.com/cfug/dio/issues/2170\n    test(\n      'not closing sockets with requests that have same hosts',\n      () async {\n        final token = CancelToken();\n        await expectLater(dio.get('/get', cancelToken: token), completes);\n        expectLater(dio.get('/drip?duration=3'), completes);\n        Future.delayed(const Duration(seconds: 1), token.cancel);\n      },\n      testOn: '!browser',\n    );\n  });\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/cors_tests.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\n/// Test that browsers can correctly classify requests as\n/// either \"simple\" or \"preflighted\". Reference:\n/// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests\nvoid corsTests(\n  Dio Function(String baseUrl) create,\n) {\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  group(\n    'CORS preflight',\n    () {\n      test('empty GET is not preflighted', () async {\n        // If there is no preflight (OPTIONS) request, the main request\n        // successfully completes with status 418.\n        final response = await dio.get(\n          '/status/418',\n          options: Options(\n            validateStatus: (status) => true,\n          ),\n        );\n        expect(response.statusCode, 418);\n      });\n\n      test('GET with custom headers is preflighted', () async {\n        // If there is a preflight (OPTIONS) request, the server fails it\n        // by responding with status 418. This fails CORS, so the browser\n        // never sends the main request and this code throws.\n        expect(\n          () async {\n            final _ = await dio.get(\n              '/status/418',\n              options: Options(\n                headers: {\n                  'x-request-header': 'value',\n                },\n              ),\n            );\n          },\n          throwsDioException(\n            DioExceptionType.connectionError,\n            stackTraceContains: 'test/test_suite_test.dart',\n          ),\n        );\n      });\n\n      test('POST with text body is not preflighted', () async {\n        // If there is no preflight (OPTIONS) request, the main request\n        // successfully completes with status 418.\n        final response = await dio.post(\n          '/status/418',\n          data: 'body text',\n          options: Options(\n            validateStatus: (status) => true,\n            contentType: Headers.textPlainContentType,\n          ),\n        );\n        expect(response.statusCode, 418);\n      });\n\n      test('POST with sendTimeout is preflighted', () async {\n        // If there is a preflight (OPTIONS) request, the server fails it\n        // by responding with status 418. This fails CORS, so the browser\n        // never sends the main request and this code throws.\n        expect(\n          () async {\n            final _ = await dio.post(\n              '/status/418',\n              data: 'body text',\n              options: Options(\n                validateStatus: (status) => true,\n                contentType: Headers.textPlainContentType,\n                sendTimeout: const Duration(seconds: 1),\n              ),\n            );\n          },\n          throwsDioException(\n            DioExceptionType.connectionError,\n            stackTraceContains: 'test/test_suite_test.dart',\n          ),\n        );\n      });\n\n      test('POST with onSendProgress is preflighted', () async {\n        // If there is a preflight (OPTIONS) request, the server fails it\n        // by responding with status 418. This fails CORS, so the browser\n        // never sends the main request and this code throws.\n        expect(\n          () async {\n            final _ = await dio.post(\n              '/status/418',\n              data: 'body text',\n              options: Options(\n                validateStatus: (status) => true,\n                contentType: Headers.textPlainContentType,\n              ),\n              onSendProgress: (_, __) {},\n            );\n          },\n          throwsDioException(\n            DioExceptionType.connectionError,\n            stackTraceContains: 'test/test_suite_test.dart',\n          ),\n        );\n      });\n    },\n    testOn: 'browser',\n  );\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/download_tests.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:path/path.dart' as p;\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid downloadTests(\n  Dio Function(String baseUrl) create,\n) {\n  group(\n    'download',\n    () {\n      late Dio dio;\n      late Directory tmp;\n\n      setUp(() {\n        dio = create(httpbunBaseUrl);\n      });\n\n      setUpAll(() {\n        tmp = Directory.systemTemp.createTempSync('dio_test_');\n        addTearDown(() {\n          tmp.deleteSync(recursive: true);\n        });\n      });\n\n      test('bytes', () async {\n        final path = p.join(tmp.path, 'bytes.txt');\n\n        final size = 50;\n        int progressEventCount = 0;\n        int count = 0;\n        int total = 0;\n        await dio.download(\n          '/bytes/$size',\n          path,\n          onReceiveProgress: (c, t) {\n            count = c;\n            total = t;\n            progressEventCount++;\n          },\n        );\n\n        final f = File(path);\n        expect(count, f.readAsBytesSync().length);\n        expect(progressEventCount, greaterThanOrEqualTo(1));\n        expect(count, total);\n      });\n\n      test('cancels request', () async {\n        final cancelToken = CancelToken();\n\n        final res = await dio.get<ResponseBody>(\n          '/drip',\n          queryParameters: {'delay': '0', 'duration': '2'},\n          options: Options(responseType: ResponseType.stream),\n          cancelToken: cancelToken,\n        );\n\n        Future.delayed(const Duration(seconds: 1), () {\n          cancelToken.cancel();\n        });\n\n        final completer = Completer<Never>();\n        res.data!.stream.listen(\n          (event) {},\n          onError: (e, s) {\n            completer.completeError(e, s);\n          },\n        );\n\n        await expectLater(\n          completer.future,\n          throwsDioException(\n            DioExceptionType.cancel,\n            stackTraceContains: 'test/download_tests.dart',\n          ),\n        );\n      });\n\n      test('cancels download', () async {\n        final cancelToken = CancelToken();\n        final path = p.join(tmp.path, 'download.txt');\n\n        Future.delayed(const Duration(milliseconds: 50), () {\n          cancelToken.cancel();\n        });\n\n        await expectLater(\n          dio.download(\n            '/drip',\n            path,\n            queryParameters: {'delay': '0', 'duration': '2'},\n            cancelToken: cancelToken,\n          ),\n          throwsDioException(\n            DioExceptionType.cancel,\n            stackTraceContains: 'test/download_tests.dart',\n          ),\n        );\n\n        await Future.delayed(const Duration(milliseconds: 250), () {});\n        expect(File(path).existsSync(), false);\n      });\n\n      test('cancels streamed response mid request', () async {\n        final cancelToken = CancelToken();\n        final response = await dio.get(\n          '/drip',\n          queryParameters: {'delay': '0', 'duration': '2', 'numbytes': '20'},\n          options: Options(responseType: ResponseType.stream),\n          cancelToken: cancelToken,\n          onReceiveProgress: (c, t) {\n            if (c > 10) {\n              cancelToken.cancel();\n            }\n          },\n        );\n\n        await expectLater(\n          (response.data as ResponseBody).stream.last,\n          throwsDioException(\n            DioExceptionType.cancel,\n            stackTraceContains: 'test/download_tests.dart',\n          ),\n        );\n      });\n\n      test('cancels download mid request', () async {\n        final cancelToken = CancelToken();\n        final path = p.join(tmp.path, 'download_2.txt');\n\n        await expectLater(\n          dio.download(\n            '/drip',\n            path,\n            queryParameters: {'delay': '0', 'duration': '2', 'numbytes': '20'},\n            cancelToken: cancelToken,\n            onReceiveProgress: (c, t) {\n              if (c > 10) {\n                cancelToken.cancel();\n              }\n            },\n          ),\n          throwsDioException(\n            DioExceptionType.cancel,\n            stackTraceContains: 'test/download_tests.dart',\n          ),\n        );\n\n        await Future.delayed(const Duration(milliseconds: 250), () {});\n        expect(File(path).existsSync(), false);\n      });\n\n      test('does not change the response type', () async {\n        final savePath = p.join(tmp.path, 'download0.md');\n\n        final options = Options(responseType: ResponseType.plain);\n        await dio.download('/bytes/50', savePath, options: options);\n        expect(options.responseType, ResponseType.plain);\n      });\n\n      test('text file', () async {\n        final savePath = p.join(tmp.path, 'download.txt');\n\n        int? total;\n        int? count;\n        await dio.download(\n          '/payload',\n          savePath,\n          data: 'I am a text file',\n          options: Options(\n            contentType: Headers.textPlainContentType,\n          ),\n          onReceiveProgress: (c, t) {\n            total = t;\n            count = c;\n          },\n        );\n\n        final f = File(savePath);\n        expect(\n          f.readAsStringSync(),\n          equals('I am a text file'),\n        );\n        expect(count, f.readAsBytesSync().length);\n        expect(count, total);\n      });\n\n      test('text file 2', () async {\n        final savePath = p.join(tmp.path, 'download2.txt');\n\n        await dio.downloadUri(\n          Uri.parse(dio.options.baseUrl).replace(path: '/payload'),\n          (header) => savePath,\n          data: 'I am a text file',\n          options: Options(\n            contentType: Headers.textPlainContentType,\n          ),\n        );\n\n        final f = File(savePath);\n        expect(\n          f.readAsStringSync(),\n          equals('I am a text file'),\n        );\n      });\n\n      test('error', () async {\n        final savePath = p.join(tmp.path, 'download_error.md');\n\n        expectLater(\n          dio.download(\n            '/mix/s=400/b64=${base64Encode('error'.codeUnits)}',\n            savePath,\n          ),\n          throwsDioException(\n            DioExceptionType.badResponse,\n            stackTraceContains: 'test/download_tests.dart',\n            matcher: isA<DioException>().having(\n              (e) => e.response!.data,\n              'data',\n              'error',\n            ),\n          ),\n        );\n\n        expectLater(\n          dio.download(\n            '/mix/s=400/b64=${base64Encode('error'.codeUnits)}',\n            savePath,\n            options: Options(receiveDataWhenStatusError: false),\n          ),\n          throwsDioException(\n            DioExceptionType.badResponse,\n            stackTraceContains: 'test/download_tests.dart',\n            matcher: isA<DioException>().having(\n              (e) => e.response!.data,\n              'data',\n              isNull,\n            ),\n          ),\n        );\n      });\n\n      test('receiveTimeout triggers if gaps are too big', () {\n        expectLater(\n          dio.download(\n            '/drip',\n            p.join(tmp.path, 'download_timeout.md'),\n            queryParameters: {\n              'delay': '0',\n              'duration': '4',\n              'numbytes': '2',\n            },\n            options: Options(receiveTimeout: const Duration(seconds: 1)),\n          ),\n          throwsDioException(\n            DioExceptionType.receiveTimeout,\n            stackTraceContains: 'test/download_tests.dart',\n          ),\n        );\n      });\n\n      test(\n        'receiveTimeout does not trigger if constantly getting response bytes',\n        () {\n          expectLater(\n            dio.download(\n              '/drip',\n              p.join(tmp.path, 'download_timeout.md'),\n              queryParameters: {\n                'delay': '0',\n                'duration': '4',\n                'numbytes': '8',\n              },\n              options: Options(receiveTimeout: const Duration(seconds: 1)),\n            ),\n            completes,\n          );\n        },\n      );\n\n      test('delete on error', () async {\n        final savePath = p.join(tmp.path, 'delete_on_error.txt');\n        final f = File(savePath)..createSync(recursive: true);\n        expect(f.existsSync(), isTrue);\n\n        await expectLater(\n          dio.download(\n            '/drip',\n            savePath,\n            deleteOnError: true,\n            queryParameters: {'delay': '0', 'duration': '2'},\n            onReceiveProgress: (count, total) => throw AssertionError(),\n          ),\n          throwsDioException(\n            DioExceptionType.unknown,\n            stackTraceContains: 'test/download_tests.dart',\n            matcher: isA<DioException>().having(\n              (e) => e.error,\n              'error',\n              isA<AssertionError>(),\n            ),\n          ),\n        );\n\n        await Future.delayed(const Duration(milliseconds: 100));\n        expect(f.existsSync(), isFalse);\n      });\n\n      test('delete on cancel', () async {\n        final savePath = p.join(tmp.path, 'delete_on_cancel.md');\n        final f = File(savePath)..createSync(recursive: true);\n        expect(f.existsSync(), isTrue);\n\n        final cancelToken = CancelToken();\n\n        await expectLater(\n          dio.download(\n            '/bytes/50',\n            savePath,\n            deleteOnError: true,\n            cancelToken: cancelToken,\n            onReceiveProgress: (count, total) => cancelToken.cancel(),\n          ),\n          throwsDioException(\n            DioExceptionType.cancel,\n            stackTraceContains: 'test/download_tests.dart',\n          ),\n        );\n\n        await Future.delayed(const Duration(milliseconds: 100));\n        expect(f.existsSync(), isFalse);\n      });\n\n      test('cancel download mid stream', () async {\n        const savePath = 'test/download/_test.md';\n        final f = File(savePath)..createSync(recursive: true);\n        expect(f.existsSync(), isTrue);\n\n        final cancelToken = CancelToken();\n        final dio = Dio()..options.baseUrl = httpbunBaseUrl;\n\n        await expectLater(\n          dio.download(\n            '/drip',\n            savePath,\n            queryParameters: {'delay': '0', 'duration': '2', 'numbytes': '20'},\n            cancelToken: cancelToken,\n            deleteOnError: true,\n            onReceiveProgress: (c, t) {\n              if (c > 10) {\n                cancelToken.cancel();\n              }\n            },\n          ),\n          throwsDioException(\n            DioExceptionType.cancel,\n            stackTraceContains: 'test/download_tests.dart',\n          ),\n        );\n\n        await Future.delayed(const Duration(milliseconds: 100));\n        expect(f.existsSync(), isFalse);\n      });\n\n      test('`savePath` types', () async {\n        final testPath = p.join(tmp.path, 'savePath.txt');\n\n        await expectLater(\n          dio.download(\n            '/bytes/50',\n            testPath,\n          ),\n          completes,\n        );\n        await expectLater(\n          dio.download(\n            '/bytes/50',\n            (headers) => testPath,\n          ),\n          completes,\n        );\n        await expectLater(\n          dio.download(\n            '/bytes/50',\n            (headers) async => testPath,\n          ),\n          completes,\n        );\n      });\n\n      test('append bytes to previous download', () async {\n        final cancelToken = CancelToken();\n        final path = p.join(tmp.path, 'download_3.txt');\n        int recievedBytes1 = 0;\n        await expectLater(\n          dio.download(\n            '/drip',\n            path,\n            queryParameters: {'delay': '0', 'duration': '2', 'numbytes': '20'},\n            cancelToken: cancelToken,\n            onReceiveProgress: (c, t) {\n              if (c > 10) {\n                recievedBytes1 = c;\n                cancelToken.cancel();\n              }\n            },\n            deleteOnError: false,\n          ),\n          throwsDioException(\n            DioExceptionType.cancel,\n            stackTraceContains: 'test/download_tests.dart',\n          ),\n        );\n\n        final cancelToken2 = CancelToken();\n        int recievedBytes2 = 0;\n        expectLater(\n          dio.download(\n            '/drip',\n            path,\n            queryParameters: {'delay': '0', 'duration': '2', 'numbytes': '20'},\n            cancelToken: cancelToken2,\n            onReceiveProgress: (c, t) {\n              recievedBytes2 = c;\n              if (c > 10) {\n                cancelToken2.cancel();\n              }\n            },\n            deleteOnError: false,\n            fileAccessMode: FileAccessMode.append,\n          ),\n          throwsDioException(\n            DioExceptionType.cancel,\n            stackTraceContains: 'test/download_tests.dart',\n          ),\n        );\n        await Future.delayed(const Duration(milliseconds: 100), () {});\n        expect(File(path).lengthSync(), recievedBytes1 + recievedBytes2);\n      });\n    },\n    testOn: 'vm',\n  );\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/headers_tests.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid headerTests(\n  Dio Function(String baseUrl) create,\n) {\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  group('headers', () {\n    test('multi value headers', () async {\n      final Response response = await dio.get(\n        '/get',\n        options: Options(\n          headers: {\n            'x-multi-value-request-header': ['value1', 'value2'],\n          },\n        ),\n      );\n      expect(response.statusCode, 200);\n      expect(response.isRedirect, isFalse);\n      expect(\n        response.data['headers']['X-Multi-Value-Request-Header'],\n        equals('value1, value2'),\n      );\n    });\n\n    test('header value types implicit support', () async {\n      final res = await dio.post(\n        '/post',\n        data: 'TEST',\n        options: Options(\n          headers: {\n            'ListKey': ['1', '2'],\n            'StringKey': '1',\n            'NumKey': 2,\n            'BooleanKey': false,\n          },\n        ),\n      );\n      final content = res.data.toString();\n      expect(content, contains('TEST'));\n      expect(content, contains('Listkey: 1, 2'));\n      expect(content, contains('Stringkey: 1'));\n      expect(content, contains('Numkey: 2'));\n      expect(content, contains('Booleankey: false'));\n    });\n\n    test(\n      'headers are kept after redirects',\n      () async {\n        dio.options.headers.putIfAbsent('x-test-base', () => 'test-base');\n\n        final response = await dio.get(\n          '/redirect/3',\n          options: Options(headers: {'x-test-header': 'test-value'}),\n        );\n        expect(response.isRedirect, isTrue);\n        // The returned headers are uppercased by the server.\n        expect(\n          response.data['headers']['X-Test-Base'],\n          equals('test-base'),\n        );\n        expect(\n          response.data['headers']['X-Test-Header'],\n          equals('test-value'),\n        );\n        // The sent headers are still lowercase.\n        expect(\n          response.requestOptions.headers['x-test-base'],\n          equals('test-base'),\n        );\n        expect(\n          response.requestOptions.headers['x-test-header'],\n          equals('test-value'),\n        );\n      },\n      testOn: 'vm',\n    );\n\n    test('default content-type', () async {\n      final r1 = await dio.get('/get');\n      expect(\n        r1.requestOptions.headers[Headers.contentTypeHeader],\n        null,\n      );\n\n      final r2 = await dio.get(\n        '/get',\n        options: Options(contentType: Headers.jsonContentType),\n      );\n      expect(\n        r2.requestOptions.headers[Headers.contentTypeHeader],\n        Headers.jsonContentType,\n      );\n\n      final r3 = await dio.get(\n        '/get',\n        options: Options(\n          headers: {Headers.contentTypeHeader: Headers.jsonContentType},\n        ),\n      );\n      expect(\n        r3.requestOptions.headers[Headers.contentTypeHeader],\n        Headers.jsonContentType,\n      );\n\n      final r4 = await dio.post('/post', data: '');\n      expect(\n        r4.requestOptions.headers[Headers.contentTypeHeader],\n        Headers.jsonContentType,\n      );\n\n      final r5 = await dio.get(\n        '/get',\n        options: Options(\n          // Final result should respect this.\n          contentType: Headers.textPlainContentType,\n          // Rather than this.\n          headers: {\n            Headers.contentTypeHeader: Headers.formUrlEncodedContentType,\n          },\n        ),\n      );\n      expect(\n        r5.requestOptions.headers[Headers.contentTypeHeader],\n        Headers.textPlainContentType,\n      );\n\n      final r6 = await dio.get(\n        '/get',\n        data: '',\n        options: Options(\n          contentType: Headers.formUrlEncodedContentType,\n          headers: {Headers.contentTypeHeader: Headers.jsonContentType},\n        ),\n      );\n      expect(\n        r6.requestOptions.headers[Headers.contentTypeHeader],\n        Headers.formUrlEncodedContentType,\n      );\n\n      // Update the base option.\n      dio.options.contentType = Headers.textPlainContentType;\n      final r7 = await dio.get('/get');\n      expect(\n        r7.requestOptions.headers[Headers.contentTypeHeader],\n        Headers.textPlainContentType,\n      );\n\n      final r8 = await dio.get(\n        '/get',\n        options: Options(contentType: Headers.jsonContentType),\n      );\n      expect(\n        r8.requestOptions.headers[Headers.contentTypeHeader],\n        Headers.jsonContentType,\n      );\n\n      final r9 = await dio.get(\n        '/get',\n        options: Options(\n          headers: {Headers.contentTypeHeader: Headers.jsonContentType},\n        ),\n      );\n      expect(\n        r9.requestOptions.headers[Headers.contentTypeHeader],\n        Headers.jsonContentType,\n      );\n\n      final r10 = await dio.post('/post', data: FormData());\n      expect(\n        r10.requestOptions.contentType,\n        startsWith(Headers.multipartFormDataContentType),\n      );\n\n      // Regression: https://github.com/cfug/dio/issues/1834\n      final r11 = await dio.get('/payload');\n      expect(r11.data, '');\n      final r12 = await dio.get<Map>('/payload');\n      expect(r12.data, null);\n      final r13 = await dio.get<Map<String, Object>>('/payload');\n      expect(r13.data, null);\n    });\n  });\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/http_method_tests.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid httpMethodTests(\n  Dio Function(String baseUrl) create,\n) {\n  const data = {'content': 'I am payload'};\n\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  group('HTTP method', () {\n    group('constructed with String & query map', () {\n      test('HEAD', () async {\n        final response = await dio.head(\n          '/anything',\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n      });\n\n      test('GET', () async {\n        final response = await dio.get(\n          '/get',\n          queryParameters: {'id': '12', 'name': 'wendu'},\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'GET');\n        expect(response.data['args'], {'id': '12', 'name': 'wendu'});\n      });\n\n      test(\n        'GET with content',\n        () async {\n          final response = await dio.get(\n            '/anything',\n            queryParameters: {'id': '12', 'name': 'wendu'},\n            data: data,\n          );\n          expect(response.statusCode, 200);\n          expect(response.isRedirect, isFalse);\n          expect(response.data['method'], 'GET');\n          expect(response.data['args'], {'id': '12', 'name': 'wendu'});\n          expect(response.data['json'], data);\n          expect(\n            response.data['headers']['Content-Type'],\n            Headers.jsonContentType,\n          );\n        },\n        testOn: '!browser',\n      );\n\n      test('POST', () async {\n        final response = await dio.post(\n          '/post',\n          data: data,\n          options: Options(contentType: Headers.jsonContentType),\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'POST');\n        expect(response.data['json'], data);\n        expect(\n          response.data['headers']['Content-Type'],\n          Headers.jsonContentType,\n        );\n      });\n\n      test('PUT', () async {\n        final response = await dio.put(\n          '/put',\n          data: data,\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'PUT');\n        expect(response.data['json'], data);\n        expect(\n          response.data['headers']['Content-Type'],\n          Headers.jsonContentType,\n        );\n      });\n\n      test('PATCH', () async {\n        final response = await dio.patch(\n          '/patch',\n          data: data,\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'PATCH');\n        expect(response.data['json'], data);\n        expect(\n          response.data['headers']['Content-Type'],\n          Headers.jsonContentType,\n        );\n      });\n\n      test('DELETE', () async {\n        final response = await dio.delete(\n          '/delete',\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'DELETE');\n      });\n\n      test('DELETE with content', () async {\n        final response = await dio.delete(\n          '/delete',\n          data: data,\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'DELETE');\n        expect(response.data['json'], data);\n        expect(\n          response.data['headers']['Content-Type'],\n          Headers.jsonContentType,\n        );\n      });\n    });\n\n    group('constructed with URI', () {\n      test('HEAD', () async {\n        final response = await dio.headUri(\n          Uri.parse('/anything'),\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n      });\n\n      test('GET', () async {\n        final response = await dio.getUri(\n          Uri(path: '/get', queryParameters: {'id': '12', 'name': 'wendu'}),\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['args'], {'id': '12', 'name': 'wendu'});\n      });\n\n      // Not supported on web\n      test(\n        'GET with content',\n        () async {\n          final response = await dio.getUri(\n            Uri(\n              path: '/anything',\n              queryParameters: {'id': '12', 'name': 'wendu'},\n            ),\n            data: data,\n          );\n          expect(response.statusCode, 200);\n          expect(response.isRedirect, isFalse);\n          expect(response.data['args'], {'id': '12', 'name': 'wendu'});\n          expect(response.data['json'], data);\n          expect(\n            response.data['headers']['Content-Type'],\n            Headers.jsonContentType,\n          );\n        },\n        testOn: '!browser',\n      );\n\n      test('POST', () async {\n        final response = await dio.postUri(\n          Uri.parse('/post'),\n          data: data,\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'POST');\n        expect(response.data['json'], data);\n        expect(\n          response.data['headers']['Content-Type'],\n          Headers.jsonContentType,\n        );\n      });\n\n      test('PUT', () async {\n        final response = await dio.putUri(\n          Uri.parse('/put'),\n          data: data,\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'PUT');\n        expect(response.data['json'], data);\n        expect(\n          response.data['headers']['Content-Type'],\n          Headers.jsonContentType,\n        );\n      });\n\n      test('PATCH', () async {\n        final response = await dio.patchUri(\n          Uri.parse('/patch'),\n          data: data,\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'PATCH');\n        expect(response.data['json'], data);\n        expect(\n          response.data['headers']['Content-Type'],\n          Headers.jsonContentType,\n        );\n      });\n\n      test('DELETE', () async {\n        final response = await dio.deleteUri(\n          Uri.parse('/delete'),\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'DELETE');\n      });\n\n      test('DELETE with content', () async {\n        final response = await dio.deleteUri(\n          Uri.parse('/delete'),\n          data: data,\n        );\n        expect(response.statusCode, 200);\n        expect(response.isRedirect, isFalse);\n        expect(response.data['method'], 'DELETE');\n        expect(response.data['json'], data);\n        expect(\n          response.data['headers']['Content-Type'],\n          Headers.jsonContentType,\n        );\n      });\n    });\n  });\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/parameter_tests.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid parameterTests(\n  Dio Function(String baseUrl) create,\n) {\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  group('parameters', () {\n    group('generic parameters', () {\n      test('default (Map)', () async {\n        final response = await dio.get('/get');\n        expect(response.data, isA<Map>());\n        expect(response.data, isNotEmpty);\n      });\n\n      test('Map', () async {\n        final response = await dio.get<Map>('/get');\n        expect(response.data, isA<Map>());\n        expect(response.data, isNotEmpty);\n      });\n\n      test('String', () async {\n        final response = await dio.get<String>('/get');\n        expect(response.data, isA<String>());\n        expect(response.data, isNotEmpty);\n      });\n\n      test('List', () async {\n        final response = await dio.post<List>(\n          '/payload',\n          data: '[1,2,3]',\n        );\n        expect(response.data, isA<List>());\n        expect(response.data, isNotEmpty);\n        expect(response.data![0], 1);\n      });\n    });\n  });\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/redirect_tests.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid redirectTests(\n  Dio Function(String baseUrl) create,\n) {\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  group('redirects', () {\n    test('single', () async {\n      final response = await dio.get(\n        '/redirect/1',\n      );\n      expect(response.isRedirect, isTrue);\n\n      if (!kIsWeb) {\n        // Redirects are not supported in web.\n        // Rhe browser will follow the redirects automatically.\n        expect(response.redirects.length, 1);\n        final ri = response.redirects.first;\n        expect(ri.statusCode, 302);\n        expect(ri.location.path, '../anything');\n        expect(ri.method, 'GET');\n      }\n    });\n\n    test('multiple', () async {\n      final response = await dio.get(\n        '/redirect/3',\n      );\n      expect(response.isRedirect, isTrue);\n\n      if (!kIsWeb) {\n        // Redirects are not supported in web.\n        // The browser will follow the redirects automatically.\n        expect(response.redirects.length, 3);\n        final ri = response.redirects.first;\n        expect(ri.statusCode, 302);\n        expect(ri.method, 'GET');\n      }\n    });\n\n    test(\n      'empty location',\n      () async {\n        final response = await dio.get(\n          '/redirect/1',\n        );\n        expect(response.isRedirect, isTrue);\n\n        if (!kIsWeb) {\n          // Redirects are not supported in web.\n          // The browser will follow the redirects automatically.\n          expect(response.redirects.length, 1);\n          final ri = response.redirects.first;\n          expect(ri.statusCode, 302);\n          expect(ri.location.path, '../anything');\n          expect(ri.method, 'GET');\n        }\n      },\n      skip: 'Httpbun does not support empty location redirects',\n    );\n\n    test('request with redirect', () async {\n      final res = await dio.get('/absolute-redirect/2');\n      expect(res.statusCode, 200);\n    });\n  });\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/status_code_tests.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid statusCodeTests(\n  Dio Function(String baseUrl) create,\n) {\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  group('status code', () {\n    for (final code in [400, 401, 404, 500, 503]) {\n      test('$code', () {\n        expectLater(\n          () => dio.get('/status/$code'),\n          throwsDioException(\n            DioExceptionType.badResponse,\n            stackTraceContains: kIsWeb\n                ? 'test/test_suite_test.dart'\n                : 'test/status_code_tests.dart',\n            matcher: isA<DioException>().having(\n              (e) => e.response!.statusCode,\n              'statusCode',\n              code,\n            ),\n          ),\n        );\n      });\n    }\n  });\n\n  group(ValidateStatus, () {\n    test('200 with validateStatus => false', () {\n      expectLater(\n        () => dio.get(\n          '/status/200',\n          options: Options(validateStatus: (status) => false),\n        ),\n        throwsDioException(\n          DioExceptionType.badResponse,\n          stackTraceContains: kIsWeb\n              ? 'test/test_suite_test.dart'\n              : 'test/status_code_tests.dart',\n          matcher: isA<DioException>().having(\n            (e) => e.response!.statusCode,\n            'statusCode',\n            200,\n          ),\n        ),\n      );\n    });\n\n    test('500 with validateStatus => true', () async {\n      final response = await dio.get(\n        '/status/500',\n        options: Options(validateStatus: (status) => true),\n      );\n\n      expect(response.statusCode, 500);\n    });\n  });\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/suite.dart",
    "content": "import 'package:dio/dio.dart';\nimport '../../tests.dart';\n\ntypedef TestSuiteFunction = void Function(\n  Dio Function(String baseUrl) create,\n);\n\nconst _tests = [\n  basicTests,\n  cancellationTests,\n  corsTests,\n  downloadTests,\n  headerTests,\n  httpMethodTests,\n  parameterTests,\n  redirectTests,\n  statusCodeTests,\n  timeoutTests,\n  uploadTests,\n  urlEncodedTests,\n];\n\nvoid dioAdapterTestSuite(\n  Dio Function(String baseUrl) create, {\n  List<TestSuiteFunction> tests = _tests,\n}) {\n  for (final test in tests) {\n    test(create);\n  }\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/timeout_tests.dart",
    "content": "import 'dart:async';\n\nimport 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid timeoutTests(\n  Dio Function(String baseUrl) create,\n) {\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  group('Timeout exception of', () {\n    group('connectTimeout', () {\n      test('throws', () async {\n        dio.options.connectTimeout = const Duration(milliseconds: 3);\n        await expectLater(\n          dio.get(nonRoutableUrl),\n          throwsDioException(\n            DioExceptionType.connectionTimeout,\n            messageContains: dio.options.connectTimeout.toString(),\n          ),\n        );\n      });\n    });\n\n    group('receiveTimeout', () {\n      test('with normal response', () async {\n        dio.options.receiveTimeout = const Duration(seconds: 1);\n        await expectLater(\n          dio.get('/drip', queryParameters: {'delay': 2}),\n          throwsDioException(\n            DioExceptionType.receiveTimeout,\n            messageContains: dio.options.receiveTimeout.toString(),\n          ),\n        );\n      });\n\n      test(\n        'with streamed response',\n        () async {\n          dio.options.receiveTimeout = const Duration(seconds: 1);\n          final completer = Completer<void>();\n          final streamedResponse = await dio.get(\n            '/drip',\n            queryParameters: {'delay': 0, 'duration': 20},\n            options: Options(responseType: ResponseType.stream),\n          );\n          (streamedResponse.data as ResponseBody).stream.listen(\n            (event) {},\n            onError: (error) {\n              if (!completer.isCompleted) {\n                completer.completeError(error);\n              }\n            },\n            onDone: () {\n              if (!completer.isCompleted) {\n                completer.complete();\n              }\n            },\n          );\n          await expectLater(\n            completer.future,\n            throwsDioException(\n              DioExceptionType.receiveTimeout,\n              messageContains: dio.options.receiveTimeout.toString(),\n            ),\n          );\n        },\n        testOn: 'vm',\n      );\n    });\n  });\n\n  test('no DioException when receiveTimeout > request duration', () async {\n    dio.options.receiveTimeout = const Duration(seconds: 5);\n\n    await dio.get('/drip?delay=1&numbytes=1');\n  });\n\n  test('ignores zero duration timeouts', () async {\n    dio.options\n      ..connectTimeout = Duration.zero\n      ..receiveTimeout = Duration.zero;\n    // Ignores zero duration timeouts from the base options.\n    await dio.get('/drip-lines?delay=1');\n    // Reset the base options.\n    dio.options.receiveTimeout = const Duration(milliseconds: 1);\n    await expectLater(\n      dio.get('/drip-lines?delay=1'),\n      throwsDioException(\n        DioExceptionType.receiveTimeout,\n        messageContains: dio.options.receiveTimeout.toString(),\n      ),\n    );\n    dio.options.connectTimeout = const Duration(milliseconds: 1);\n    await expectLater(\n      dio.get(nonRoutableUrl),\n      throwsDioException(\n        DioExceptionType.connectionTimeout,\n        messageContains: dio.options.connectTimeout.toString(),\n      ),\n    );\n    dio.options.connectTimeout = Duration.zero;\n    // Override with request options.\n    await dio.get(\n      '/drip-lines?delay=1',\n      options: Options(receiveTimeout: Duration.zero),\n    );\n  });\n}\n"
  },
  {
    "path": "dio_test/lib/src/test/upload_tests.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:path/path.dart' as p;\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid uploadTests(\n  Dio Function(String baseUrl) create,\n) {\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  test('Uint8List should not be transformed', () async {\n    final bytes = Uint8List.fromList(List.generate(10, (index) => index));\n    final transformer = dio.transformer = _TestTransformer();\n    final r = await dio.put(\n      '/put',\n      data: bytes,\n    );\n    expect(transformer.requestTransformed, isFalse);\n    expect(r.statusCode, 200);\n  });\n\n  test('List<int> should be transformed', () async {\n    final ints = List.generate(10, (index) => index);\n    final transformer = dio.transformer = _TestTransformer();\n    final r = await dio.put(\n      '/put',\n      data: ints,\n    );\n    expect(transformer.requestTransformed, isTrue);\n    expect(r.data['data'], ints.toString());\n  });\n\n  test('stream', () async {\n    const str = 'hello 😌';\n    final bytes = utf8.encode(str).toList();\n    final stream = Stream.fromIterable(bytes.map((e) => [e]));\n    final r = await dio.put(\n      '/put',\n      data: stream,\n      options: Options(\n        contentType: Headers.textPlainContentType,\n        headers: {\n          Headers.contentLengthHeader: bytes.length, // set content-length\n        },\n      ),\n    );\n    expect(r.data['data'], str);\n  });\n\n  test(\n    'file stream',\n    () async {\n      final tmp = Directory.systemTemp.createTempSync('dio_test_');\n      addTearDown(() => tmp.deleteSync(recursive: true));\n\n      final f = File(p.join(tmp.path, 'flutter.png'));\n      f.createSync();\n      f.writeAsBytesSync(base64Decode(_flutterLogPngBase64));\n\n      final contentLength = f.lengthSync();\n      final r = await dio.put(\n        '/put',\n        data: f.openRead(),\n        options: Options(\n          contentType: 'image/png',\n          headers: {\n            Headers.contentLengthHeader: contentLength,\n          },\n        ),\n      );\n      expect(r.data['headers']['Content-Length'], contentLength.toString());\n\n      final img = base64Encode(f.readAsBytesSync());\n      expect(r.data['data'], img);\n    },\n    testOn: 'vm',\n  );\n\n  test(\n    'file stream<Uint8List>',\n    () async {\n      final tmp = Directory.systemTemp.createTempSync('dio_test_');\n      addTearDown(() => tmp.deleteSync(recursive: true));\n\n      final f = File(p.join(tmp.path, 'flutter.png'));\n      f.createSync();\n      f.writeAsBytesSync(base64Decode(_flutterLogPngBase64));\n\n      final contentLength = f.lengthSync();\n      final r = await dio.put(\n        '/put',\n        data: f.readAsBytes().asStream(),\n        options: Options(\n          contentType: 'image/png',\n          headers: {\n            Headers.contentLengthHeader: contentLength,\n          },\n        ),\n      );\n      expect(r.data['headers']['Content-Length'], contentLength.toString());\n\n      final img = base64Encode(f.readAsBytesSync());\n      expect(r.data['data'], img);\n    },\n    testOn: 'vm',\n  );\n\n  test('send progress', () async {\n    final data = ['aaaa', 'hello 😌', 'dio is a dart http client'];\n    final stream = Stream.fromIterable(data.map((e) => e.codeUnits));\n    final expanded = data.expand((element) => element.codeUnits);\n    bool fullFilled = false;\n    final _ = await dio.put(\n      '/put',\n      data: stream,\n      onSendProgress: (a, b) {\n        expect(b, expanded.length);\n        expect(a <= b, isTrue);\n        if (a == b) {\n          fullFilled = true;\n        }\n      },\n      options: Options(\n        contentType: Headers.textPlainContentType,\n        headers: {\n          Headers.contentLengthHeader: expanded.length, // set content-length\n        },\n      ),\n    );\n    expect(fullFilled, isTrue);\n  });\n}\n\nclass _TestTransformer extends BackgroundTransformer {\n  bool requestTransformed = false;\n\n  @override\n  Future<String> transformRequest(RequestOptions options) async {\n    requestTransformed = true;\n    return super.transformRequest(options);\n  }\n}\n\nconst _flutterLogPngBase64 =\n    'iVBORw0KGgoAAAANSUhEUgAAAMoAAAD6CAMAAADXwSg3AAAAxlBMVEX///9nt/cNR6FCpfVasvZitfebzflpuPcLRqHI4/y73fsVR5UTSJhVsPa/3/s9o/UAM5oWRpAAMJkRSJzD4fvl8v4nnfS12vuRyfkXQYIXQ4mMx/lKqfUXQH8VPHgAGDultdYALJj2+/8WOW+uvNqdrtLv9/5Fl90SMGBTrPYPLFoJI0sRNGoGEjMGHkPb7P1ztO0AL3WgrccYOHYAKHcAL4gAM5QCDC0OPYYLK1wLNHULMGoOP40qidMAGEYGMG8AJYMAPZ2vYOGbAAAE7klEQVR4nO3c6VIaQRDAcVzEeIAHaDwSyaHJEkWTaDQe5Hr/l8rswcrisMzMNvZR3Q8A9avuv7sfLBoNxFlvLYHN8hqmZH9ZimRdjER3YpuO7kQlpdHi6Um0eNvI2YlKVLI4CW7xuhOVqORlJVo8QcmuSlSyKElHjAS5+A6gRM5OVEJOgly8nE7kSLQT0RItXiVTEu3EMnLehTubqBI5nUBKcHcCWbwYiRYPJJHTiRyJFm8Z5E7kSOR0IkeixVsGt5NNMRI5nWyKkcgpXk4nciRaPEGJFm8ZLR5IIqcTORIt3jJaPJBETidyJFq8ZXA72RUjkdPJrhyJmOLldCJIIqcTORIt3jJaPJBETidyJFq8ZTrrKgGRQHaiEhgJZPFiJFo8kEROJ3IkWrxlcDtZEyPRTlSikvkDWTyyREzxoDvZV4lKhEogi9edqEQl1CUvX/zewQrYHDz97A7CTvZacLN8gCsB/MoVlVR/LIJk4roQil+QhPlO5FyXSuZ8LGonkBRkCaAFXQJmISABspCQgDwiiUgA9kJGUttCSFLTQkpSy0JMUqN9cpLgvRCUBFpISoIsRCUBFgRJy0ni3T5hiedeSEu8LMQlHhbyEmcLA4lj+46Sz3CQpdYbX4nTXlwlza2lV1AS7504WdwlYJYwyVyLq+TtVrPZ3GpBWEIlcyxeEjMAlnBJZfu+EgBLSPETlll78ehkPHV7qbOTCkuApK6lrmSGxf+6alvqS6yWQImZYAuExNJ+uCTYUq/4CUt5L0Gd1LsxKMmUpZYkzAJzXc8sda4r8PkCKZnopb7E2wJ3XSWLo+RjlcSzfWhJfmMwEq9e4CXpP4MDSXwssJ0Ulg6UxL2XxUgaja9wEkfLIq7LfRwlTu0zkTj0wkUy38JHMu/GkCVfvCSVFlY7qbSwk8zshZ9kloWjpGl9VjIrvsLCVvKsfabXlU65F86SsoXxdWVT9MJeUlgESPL2eXcynqQXETtJLbiSBtBOUss3VElj/zUYJf5+JcQSX1//kGExksOjG2TLOoQl7l8fHx7t3Lxnb8kkRzsb7C3xSb9/aJays9G+5W2Jh/1+tpSNdo+1JZOkSzGU3jZfSzw8SSXpfRkKX0s8LM4rp3C1GIlZynF2XjklYmmJB0aSLeWJwtIylpQokZkuN0siyZdS3go7SzwYnJwUf77KFF43Fp+NlzJFiSJmFiPJlmLfCiNLfD65lElKNB4mvSSSQSp5RnnCsLCkkuE8CocbM5K8lGrKKnlLfJksJb0vGyWK2FgSyfi+pintSQj5XozETjFvxtMQ2pZCUqIkLy4WB4X2N2dZ4ouMMkze7nNK8ohsmzDsFKq95JIpykZvdYaDhMW6l/jnu+K+Mkr/eKfSQbWX+CKRFBQTy1E7mguhaEkk+X2llMPRzECmB/vGpiypJKXcmwdk390REeilZEk6ySlnwzsPBg3LRPuF5Pz+rrfqKzHzgYoluy5DeRg5hW4Z7PZzi5GYOX8cBSHyIXFjieTy8W7Gq4nrUOjFdHL/UH59D7N0T5Etv37/GY16ABTTPrLl6u8oodSHmMHei7GA7CRKekG2fLoFklCwbANJCLQPaEFvH9KCvpcuGAW/F7VYLeg3pu1bB30v2ot4C/qNafvWQd+L9iLegn5j2r510PeivYi3oN+Ytm8d9L1oLzQt/+As3dP/r/sRQRwD4sIAAAAASUVORK5CYII=';\n"
  },
  {
    "path": "dio_test/lib/src/test/url_encoded_tests.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nimport '../../util.dart';\n\nvoid urlEncodedTests(\n  Dio Function(String baseUrl) create,\n) {\n  late Dio dio;\n\n  setUp(() {\n    dio = create(httpbunBaseUrl);\n  });\n\n  group('x-www-url-encoded', () {\n    test('posts maps correctly', () async {\n      final data = {\n        'spec': [6],\n        'items': [\n          {'name': 'foo', 'value': 1},\n          {'name': 'bar', 'value': 2},\n        ],\n        'api': {\n          'dest': '/',\n          'data': {\n            'a': 1,\n            'b': 2,\n            'c': 3,\n          },\n        },\n      };\n\n      final response = await dio.post(\n        '/payload',\n        data: data,\n        options: Options(\n          contentType: Headers.formUrlEncodedContentType,\n          listFormat: ListFormat.multiCompatible,\n        ),\n      );\n\n      final expected =\n          'spec%5B%5D=6&items%5B0%5D%5Bname%5D=foo&items%5B0%5D%5Bvalue%5D=1&items%5B1%5D%5Bname%5D=bar&items%5B1%5D%5Bvalue%5D=2&api%5Bdest%5D=%2F&api%5Bdata%5D%5Ba%5D=1&api%5Bdata%5D%5Bb%5D=2&api%5Bdata%5D%5Bc%5D=3';\n      final expectedDecoded =\n          'spec[]=6&items[0][name]=foo&items[0][value]=1&items[1][name]=bar&items[1][value]=2&api[dest]=/&api[data][a]=1&api[data][b]=2&api[data][c]=3';\n      expect(\n        response.data,\n        expected,\n      );\n      expect(\n        Uri.decodeQueryComponent(response.data),\n        expectedDecoded,\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "dio_test/lib/src/utils.dart",
    "content": "const _kIsWebInterop = bool.fromEnvironment('dart.library.js_interop');\nconst _kIsWebUtil = bool.fromEnvironment('dart.library.js_util');\nconst kIsWeb = _kIsWebInterop || _kIsWebUtil || identical(0, 0.0);\n\nconst nonRoutableUrl = 'http://10.0.0.0';\n\n/// https://github.com/dart-lang/sdk/blob/59add4f01ef4741e10f64db9c2c8655cfe738ccb/tests/corelib/finalizer_test.dart#L86-L101\nvoid produceGarbage() {\n  const approximateWordSize = 4;\n\n  List<dynamic> sink = [];\n  for (int i = 0; i < 500; ++i) {\n    final filler = i % 2 == 0 ? 1 : sink;\n    if (i % 250 == 1) {\n      // 2 x 25 MB in old space.\n      sink = List.filled(25 * 1024 * 1024 ~/ approximateWordSize, filler);\n    } else {\n      // 498 x 50 KB in new space\n      sink = List.filled(50 * 1024 ~/ approximateWordSize, filler);\n    }\n  }\n  print(sink.hashCode); // Ensure there's real use of the allocation.\n}\n"
  },
  {
    "path": "dio_test/lib/tests.dart",
    "content": "export 'src/test/basic_tests.dart';\nexport 'src/test/cancellation_tests.dart';\nexport 'src/test/cors_tests.dart';\nexport 'src/test/download_tests.dart';\nexport 'src/test/headers_tests.dart';\nexport 'src/test/http_method_tests.dart';\nexport 'src/test/parameter_tests.dart';\nexport 'src/test/redirect_tests.dart';\nexport 'src/test/status_code_tests.dart';\nexport 'src/test/suite.dart';\nexport 'src/test/timeout_tests.dart';\nexport 'src/test/upload_tests.dart';\nexport 'src/test/url_encoded_tests.dart';\n"
  },
  {
    "path": "dio_test/lib/util.dart",
    "content": "export 'src/httpbun.dart';\nexport 'src/matcher.dart';\nexport 'src/utils.dart';\n"
  },
  {
    "path": "dio_test/pubspec.yaml",
    "content": "name: dio_test\nversion: 1.0.0\npublish_to: none\nhomepage: https://github.com/cfug/dio\nrepository: https://github.com/cfug/dio/blob/main/dio_test\nissue_tracker: https://github.com/cfug/dio/issues\n\nenvironment:\n  sdk: '>=2.18.0 <4.0.0'\n\ndependencies:\n  dio: any\n  path: any\n\ndev_dependencies:\n  lints: any\n  test: any\n"
  },
  {
    "path": "dio_workspace.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$\" isTestSource=\"false\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example_dart/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example_dart/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example_dart/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example_flutter_app/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example_flutter_app/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example_flutter_app/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/dio/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/dio/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/dio/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/plugins/native_dio_adapter/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/plugins/native_dio_adapter/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/plugins/native_dio_adapter/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/plugins/native_dio_adapter/example/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/plugins/native_dio_adapter/example/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/plugins/native_dio_adapter/example/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/plugins/web_adapter/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/plugins/web_adapter/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/plugins/web_adapter/build\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n  </component>\n</module>"
  },
  {
    "path": "example_dart/.gitignore",
    "content": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\n\n# IntelliJ related\n*.ipr\n*.iws\n.idea/\n\n# The .vscode folder contains launch configuration and tasks you configure in\n# VS Code which you may wish to be included in version control, so this line\n# is commented out by default.\n#.vscode/\n\n# Flutter/Dart/Pub related\n**/doc/api/\n.dart_tool/\n.flutter-plugins\n.packages\n.pub-cache/\n.pub/\nbuild/\n"
  },
  {
    "path": "example_dart/analysis_options.yaml",
    "content": "include: ../analysis_options.yaml\n"
  },
  {
    "path": "example_dart/dart_test.yaml",
    "content": "file_reporters:\n  json: build/reports/test-results.json\n"
  },
  {
    "path": "example_dart/dio_example.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/test\" isTestSource=\"true\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n  </component>\n</module>"
  },
  {
    "path": "example_dart/lib/adapter.dart",
    "content": "import 'dart:async';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\n\nclass MyAdapter implements HttpClientAdapter {\n  final HttpClientAdapter _adapter = HttpClientAdapter();\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) async {\n    final uri = options.uri;\n    // Hook requests to pub.dev\n    if (uri.host == 'pub.dev') {\n      return ResponseBody.fromString('Welcome to pub.dev', 200);\n    }\n    return _adapter.fetch(options, requestStream, cancelFuture);\n  }\n\n  @override\n  void close({bool force = false}) {\n    _adapter.close(force: force);\n  }\n}\n\nvoid main() async {\n  final dio = Dio()..httpClientAdapter = MyAdapter();\n  Response response = await dio.get('https://pub.dev/');\n  print(response);\n  response = await dio.get('https://dart.dev/');\n  print(response);\n}\n"
  },
  {
    "path": "example_dart/lib/cancel_request.dart",
    "content": "import 'dart:async';\n\nimport 'package:dio/dio.dart';\n\nvoid main() async {\n  final dio = Dio();\n  dio.interceptors.add(LogInterceptor());\n  // Token can be shared with different requests.\n  final token = CancelToken();\n  // In one minute, we cancel!\n  Timer(const Duration(milliseconds: 500), () {\n    token.cancel('cancelled');\n  });\n\n  // The follow three requests with the same token.\n  final url1 = 'https://pub.dev';\n  final url2 = 'https://dart.dev';\n  final url3 = 'https://flutter.dev';\n\n  await Future.wait([\n    dio\n        .get(url1, cancelToken: token)\n        .then((response) => print('${response.requestOptions.path}: succeed!'))\n        .catchError(\n      (e) {\n        if (CancelToken.isCancel(e)) {\n          print('$url1: $e');\n        }\n      },\n    ),\n    dio\n        .get(url2, cancelToken: token)\n        .then((response) => print('${response.requestOptions.path}: succeed!'))\n        .catchError((e) {\n      if (CancelToken.isCancel(e)) {\n        print('$url2: $e');\n      }\n    }),\n    dio\n        .get(url3, cancelToken: token)\n        .then((response) => print('${response.requestOptions.path}: succeed!'))\n        .catchError((e) {\n      if (CancelToken.isCancel(e)) {\n        print('$url3: $e');\n      }\n      print(e);\n    }),\n  ]);\n}\n"
  },
  {
    "path": "example_dart/lib/certificate_pinning.dart",
    "content": "import 'dart:io';\n\nimport 'package:crypto/crypto.dart';\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\n\nvoid main() async {\n  final dio = Dio();\n\n  // TODO: always update to the latest fingerprint.\n  // openssl s_client -servername pinning-test.badssl.com \\\n  //    -connect pinning-test.badssl.com:443 < /dev/null 2>/dev/null \\\n  //    | openssl x509 -noout -fingerprint -sha256\n  final fingerprint =\n      // 'update-with-latest-sha256-hex-ee5ce1dfa7a53657c545c62b65802e4272';\n      // should look like this:\n      'ee5ce1dfa7a53657c545c62b65802e4272878dabd65c0aadcf85783ebb0b4d5c';\n\n  // Don't trust any certificate just because their root cert is trusted\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    createHttpClient: () {\n      final client = HttpClient(\n        context: SecurityContext(withTrustedRoots: false),\n      );\n      // You can test the intermediate / root cert here. We just ignore it.\n      client.badCertificateCallback = (cert, host, port) => true;\n      return client;\n    },\n    validateCertificate: (cert, host, port) {\n      // Check that the cert fingerprint matches the one we expect\n      // We definitely require _some_ certificate\n      if (cert == null) {\n        return false;\n      }\n      // Validate it any way you want. Here we only check that\n      // the fingerprint matches the OpenSSL SHA256.\n      final f = sha256.convert(cert.der).toString();\n      print(f);\n      return fingerprint == f;\n    },\n  );\n\n  Response? response;\n\n  // Normally this certificate would normally be accepted, but all\n  // certs are refused initially, and it is still checked.\n  response = await dio.get('https://sha256.badssl.com/');\n  print(response.data);\n  response = null;\n\n  // Normally this certificate would be rejected because its host isn't covered in the certificate.\n  response = await dio.get('https://wrong.host.badssl.com/');\n  print(response.data);\n  response = null;\n\n  try {\n    // This certificate doesn't have the same fingerprint.\n    response = await dio.get('https://bad.host.badssl.com/');\n    print(response.data);\n  } on DioException catch (e) {\n    print(e.message);\n    print(response?.data);\n    dio.close(force: true);\n  }\n}\n"
  },
  {
    "path": "example_dart/lib/cookie_mgr.dart",
    "content": "import 'package:cookie_jar/cookie_jar.dart';\nimport 'package:dio/dio.dart';\nimport 'package:dio_cookie_manager/dio_cookie_manager.dart';\n\nvoid main() async {\n  final dio = Dio();\n  final cookieJar = CookieJar();\n  dio.interceptors\n    ..add(LogInterceptor())\n    ..add(CookieManager(cookieJar));\n  await dio.get('https://baidu.com/');\n  // Print cookies\n  print(cookieJar.loadForRequest(Uri.parse('https://baidu.com/')));\n  // second request with the cookie\n  await dio.get('https://baidu.com/');\n}\n"
  },
  {
    "path": "example_dart/lib/custom_cache_interceptor.dart",
    "content": "import 'package:dio/dio.dart';\n\nclass CacheInterceptor extends Interceptor {\n  CacheInterceptor();\n\n  final _cache = <Uri, Response>{};\n\n  @override\n  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {\n    final response = _cache[options.uri];\n    if (options.extra['refresh'] == true) {\n      print('${options.uri}: force refresh, ignore cache! \\n');\n      return handler.next(options);\n    } else if (response != null) {\n      print('cache hit: ${options.uri} \\n');\n      return handler.resolve(response);\n    }\n    super.onRequest(options, handler);\n  }\n\n  @override\n  void onResponse(Response response, ResponseInterceptorHandler handler) {\n    _cache[response.requestOptions.uri] = response;\n    super.onResponse(response, handler);\n  }\n\n  @override\n  void onError(DioException err, ErrorInterceptorHandler handler) {\n    print('onError: $err');\n    super.onError(err, handler);\n  }\n}\n\nvoid main() async {\n  final dio = Dio();\n  dio.options.baseUrl = 'https://pub.dev';\n  dio.interceptors\n    ..add(CacheInterceptor())\n    ..add(LogInterceptor(requestHeader: false, responseHeader: false));\n\n  await dio.get('/'); // second request\n  await dio.get('/'); // Will hit cache\n  // Force refresh\n  await dio.get('/', options: Options(extra: {'refresh': true}));\n}\n"
  },
  {
    "path": "example_dart/lib/dio.dart",
    "content": "import 'dart:io';\n\nimport 'package:dio/dio.dart';\n\nvoid main() async {\n  final dio = Dio();\n  dio.options\n    ..baseUrl = 'https://httpbin.org/'\n    ..connectTimeout = const Duration(seconds: 5)\n    ..receiveTimeout = const Duration(seconds: 5)\n    ..validateStatus = (int? status) {\n      return status != null && status > 0;\n    }\n    ..headers = {\n      HttpHeaders.userAgentHeader: 'dio',\n      'common-header': 'xx',\n    };\n\n  // Or you can create dio instance and config it as follow:\n  //  final dio = Dio(BaseOptions(\n  //    baseUrl: \"http://www.dtworkroom.com/doris/1/2.0.0/\",\n  //    connectTimeout: const Duration(seconds: 5),\n  //    receiveTimeout: const Duration(seconds: 5),\n  //    headers: {\n  //      HttpHeaders.userAgentHeader: 'dio',\n  //      'common-header': 'xx',\n  //    },\n  //  ));\n  dio.interceptors\n    ..add(\n      InterceptorsWrapper(\n        onRequest: (options, handler) {\n          // return handler.resolve( Response(data:\"xxx\"));\n          // return handler.reject( DioException(message: \"eh\"));\n          return handler.next(options);\n        },\n      ),\n    )\n    ..add(LogInterceptor(responseBody: false)); //Open log;\n\n  Response response = await dio.get('https://pub.dev/');\n\n  // Download a file\n  response = await dio.download(\n    'https://pub.dev/',\n    './example/xx.html',\n    queryParameters: {'a': 1},\n    onReceiveProgress: (received, total) {\n      print('received: $received, total: $total');\n    },\n  );\n\n  // Create a FormData\n  final formData = FormData.fromMap({\n    'age': 25,\n    'file': await MultipartFile.fromFile(\n      './example/upload.txt',\n      filename: 'upload.txt',\n    ),\n  });\n\n  // Send FormData\n  response = await dio.post('/test', data: formData);\n  print(response);\n\n  // post data with \"application/x-www-form-urlencoded\" format\n  response = await dio.post(\n    '/test',\n    data: {\n      'id': 8,\n      'info': {\n        'name': 'wendux',\n        'age': 25,\n      },\n    },\n    options: Options(\n      contentType: Headers.formUrlEncodedContentType,\n    ),\n  );\n  print(response.data);\n}\n"
  },
  {
    "path": "example_dart/lib/download.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:dio/dio.dart';\n\n// In this example we download a image and listen the downloading progress.\nvoid main() async {\n  final dio = Dio();\n  dio.interceptors.add(LogInterceptor());\n  // Assure the value of total argument of onReceiveProgress is not -1.\n  dio.options.headers = {HttpHeaders.acceptEncodingHeader: '*'};\n  final url = 'https://pub.dev/static/hash-rhob5slb/img/pub-dev-logo.svg';\n  await download1(dio, url, './example/pub-dev-logo.svg');\n  await download1(dio, url, (headers) => './example/pub-dev-logo-1.svg');\n  await download1(dio, url, (headers) async => './example/pub-dev-logo-2.svg');\n}\n\nFuture download1(Dio dio, String url, savePath) async {\n  final cancelToken = CancelToken();\n  try {\n    await dio.download(\n      url,\n      savePath,\n      onReceiveProgress: showDownloadProgress,\n      cancelToken: cancelToken,\n    );\n  } catch (e) {\n    print(e);\n  }\n}\n\n//Another way to downloading small file\nFuture download2(Dio dio, String url, String savePath) async {\n  try {\n    final response = await dio.get(\n      url,\n      onReceiveProgress: showDownloadProgress,\n      //Received data with List<int>\n      options: Options(\n        responseType: ResponseType.bytes,\n        followRedirects: false,\n        receiveTimeout: Duration.zero,\n      ),\n    );\n    print(response.headers);\n    final file = File(savePath);\n    final raf = file.openSync(mode: FileMode.write);\n    // response.data is List<int> type\n    raf.writeFromSync(response.data);\n    await raf.close();\n  } catch (e) {\n    print(e);\n  }\n}\n\nvoid showDownloadProgress(int received, int total) {\n  if (total <= 0) {\n    return;\n  }\n  print('percentage: ${(received / total * 100).toStringAsFixed(0)}%');\n}\n"
  },
  {
    "path": "example_dart/lib/download_with_trunks.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:dio/dio.dart';\n\nvoid main() async {\n  final url = 'https://avatars.githubusercontent.com/u/0';\n  final savePath = './example/avatar.png';\n\n  await downloadWithChunks(\n    url,\n    savePath,\n    onReceiveProgress: (received, total) {\n      if (total <= 0) {\n        return;\n      }\n      print('${(received / total * 100).floor()}%');\n    },\n  );\n}\n\n/// Downloading by splitting as file in chunks\nFuture downloadWithChunks(\n  String url,\n  String savePath, {\n  ProgressCallback? onReceiveProgress,\n}) async {\n  const firstChunkSize = 102;\n  const maxChunk = 3;\n\n  int total = 0;\n  final dio = Dio();\n  final progress = <int>[];\n\n  void Function(int, int) createCallback(no) {\n    return (int received, int _) {\n      progress[no] = received;\n      if (onReceiveProgress != null && total != 0) {\n        onReceiveProgress(progress.reduce((a, b) => a + b), total);\n      }\n    };\n  }\n\n  Future<Response> downloadChunk(url, start, end, no) async {\n    progress.add(0);\n    --end;\n    return dio.download(\n      url,\n      '${savePath}temp$no',\n      onReceiveProgress: createCallback(no),\n      options: Options(\n        headers: {'range': 'bytes=$start-$end'},\n      ),\n    );\n  }\n\n  Future mergeTempFiles(chunk) async {\n    final f = File('${savePath}temp0');\n    final ioSink = f.openWrite(mode: FileMode.writeOnlyAppend);\n    for (int i = 1; i < chunk; ++i) {\n      final file = File('${savePath}temp$i');\n      await ioSink.addStream(file.openRead());\n      await file.delete();\n    }\n    await ioSink.close();\n    await f.rename(savePath);\n  }\n\n  final response = await downloadChunk(url, 0, firstChunkSize, 0);\n  if (response.statusCode == 206) {\n    total = int.parse(\n      response.headers.value(HttpHeaders.contentRangeHeader)!.split('/').last,\n    );\n    final reserved =\n        total - int.parse(response.headers.value(Headers.contentLengthHeader)!);\n    int chunk = (reserved / firstChunkSize).ceil() + 1;\n    if (chunk > 1) {\n      int chunkSize = firstChunkSize;\n      if (chunk > maxChunk + 1) {\n        chunk = maxChunk + 1;\n        chunkSize = (reserved / maxChunk).ceil();\n      }\n      final futures = <Future>[];\n      for (int i = 0; i < maxChunk; ++i) {\n        final start = firstChunkSize + i * chunkSize;\n        futures.add(downloadChunk(url, start, start + chunkSize, i + 1));\n      }\n      await Future.wait(futures);\n    }\n    await mergeTempFiles(chunk);\n  }\n}\n"
  },
  {
    "path": "example_dart/lib/extend_dio.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\n\nclass HttpService extends DioForNative {\n  HttpService([super.baseOptions]) {\n    options\n      ..baseUrl = 'https://httpbin.org/'\n      ..contentType = Headers.jsonContentType;\n  }\n\n  Future<String> echo(String data) {\n    return post('/post', data: data).then((resp) => resp.data['data']);\n  }\n}\n\nvoid main() async {\n  final httpService = HttpService();\n  final res = await httpService.echo('hello server!');\n  print(res);\n}\n"
  },
  {
    "path": "example_dart/lib/formdata.dart",
    "content": "import 'dart:convert';\nimport 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\n\nFuture<FormData> formData1() async {\n  return FormData.fromMap({\n    'name': 'wendux',\n    'age': 25,\n    'file': await MultipartFile.fromFile(\n      './example/xx.png',\n      filename: 'xx.png',\n    ),\n    'files': [\n      await MultipartFile.fromFile(\n        './example/upload.txt',\n        filename: 'upload.txt',\n      ),\n      MultipartFile.fromFileSync(\n        './example/upload.txt',\n        filename: 'upload.txt',\n      ),\n    ],\n  });\n}\n\nFuture<FormData> formData2() async {\n  final formData = FormData();\n\n  formData.fields\n    ..add(\n      const MapEntry(\n        'name',\n        'wendux',\n      ),\n    )\n    ..add(\n      const MapEntry(\n        'age',\n        '25',\n      ),\n    );\n\n  formData.files.add(\n    MapEntry(\n      'file',\n      await MultipartFile.fromFile(\n        './example/xx.png',\n        filename: 'xx.png',\n      ),\n    ),\n  );\n\n  formData.files.addAll([\n    MapEntry(\n      'files',\n      await MultipartFile.fromFile(\n        './example/upload.txt',\n        filename: 'upload.txt',\n      ),\n    ),\n    MapEntry(\n      'files',\n      MultipartFile.fromFileSync(\n        './example/upload.txt',\n        filename: 'upload.txt',\n      ),\n    ),\n  ]);\n  return formData;\n}\n\nFuture<FormData> formData3() async {\n  return FormData.fromMap({\n    'file': await MultipartFile.fromFile(\n      './example/upload.txt',\n      filename: 'uploadfile',\n    ),\n  });\n}\n\n/// FormData will create readable \"multipart/form-data\" streams.\n/// It can be used to submit forms and file uploads to http server.\nvoid main() async {\n  final dio = Dio();\n  dio.options.baseUrl = 'http://localhost:3000/';\n  dio.interceptors.add(LogInterceptor());\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    createHttpClient: () {\n      final client = HttpClient();\n      client.findProxy = (uri) {\n        // Proxy all request to localhost:8888\n        return 'PROXY localhost:8888';\n      };\n      client.badCertificateCallback = (cert, host, port) => true;\n      return client;\n    },\n  );\n  Response response;\n\n  final data1 = await formData1();\n  final data2 = await formData2();\n  final bytes1 = await data1.readAsBytes();\n  final bytes2 = await data2.readAsBytes();\n  assert(bytes1.length == bytes2.length);\n\n  final data3 = await formData3();\n  print(utf8.decode(await data3.readAsBytes()));\n\n  response = await dio.post(\n    'http://localhost:3000/upload',\n    data: data3,\n    onSendProgress: (sent, total) {\n      if (total <= 0) {\n        return;\n      }\n      print('percentage: ${(sent / total * 100).toStringAsFixed(0)}%');\n    },\n  );\n  print(response);\n}\n"
  },
  {
    "path": "example_dart/lib/generic.dart",
    "content": "import 'package:dio/dio.dart';\n\nvoid main() async {\n  final dio = Dio(\n    BaseOptions(\n      baseUrl: 'https://httpbin.org/',\n      method: 'GET',\n    ),\n  );\n\n  Response response;\n  // No generic type, the ResponseType will work.\n  response = await dio.get('/get');\n  print(response.data is Map);\n  // Specify the generic type(Map)\n  response = await dio.get<Map>('/get');\n  print(response.data is Map);\n\n  // Specify the generic type(String)\n  response = await dio.get<String>('/get');\n  print(response.data is String);\n  // Specify the ResponseType as ResponseType.plain\n  response = await dio.get(\n    '/get',\n    options: Options(responseType: ResponseType.plain),\n  );\n  print(response.data is String);\n\n  // the content of \"https://baidu.com\" is a html file, So it can't be convert to Map type,\n  // it will cause a Error (type 'String' is not a subtype of type 'Map<dynamic, dynamic>')\n  try {\n    response = await dio.get<Map>('https://baidu.com');\n  } on DioException catch (e) {\n    print(e.message);\n  }\n\n  // This works well.\n  response = await dio.get('https://baidu.com');\n\n  // This works well too.\n  response = await dio.get<String>('https://baidu.com');\n\n  // This is the recommended way.\n  final r = await dio.get<String>('https://baidu.com');\n  print(r.data?.length);\n}\n"
  },
  {
    "path": "example_dart/lib/http2_adapter.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:dio_http2_adapter/dio_http2_adapter.dart';\n\nvoid main() async {\n  final dio = Dio()\n    ..options.baseUrl = 'https://pub.dev'\n    ..interceptors.add(LogInterceptor())\n    ..httpClientAdapter = Http2Adapter(\n      ConnectionManager(idleTimeout: const Duration(seconds: 10)),\n    );\n\n  Response<String> response;\n  response = await dio.get('/?xx=6');\n  for (final e in response.redirects) {\n    print('redirect: ${e.statusCode} ${e.location}');\n  }\n  print(response.data);\n}\n"
  },
  {
    "path": "example_dart/lib/options.dart",
    "content": "import 'dart:io';\n\nimport 'package:dio/dio.dart';\n\nvoid main() async {\n  final dio = Dio(\n    BaseOptions(\n      baseUrl: 'https://httpbin.org/',\n      connectTimeout: const Duration(seconds: 5),\n      receiveTimeout: const Duration(seconds: 10),\n      // 5s\n      headers: {\n        HttpHeaders.userAgentHeader: 'dio',\n        'api': '1.0.0',\n      },\n      contentType: Headers.jsonContentType,\n      // Transform the response data to a String encoded with UTF8.\n      // The default value is [ResponseType.JSON].\n      responseType: ResponseType.plain,\n    ),\n  );\n\n  Response response;\n\n  response = await dio.get('/get');\n  print(response.data);\n\n  final responseMap = await dio.get(\n    '/get',\n    // Transform response data to Json Map\n    options: Options(responseType: ResponseType.json),\n  );\n  print(responseMap.data);\n  response = await dio.post(\n    '/post',\n    data: {\n      'id': 8,\n      'info': {'name': 'wendux', 'age': 25},\n    },\n    // Send data with \"application/x-www-form-urlencoded\" format\n    options: Options(\n      contentType: Headers.formUrlEncodedContentType,\n    ),\n  );\n  print(response.data);\n\n  response = await dio.fetch(\n    RequestOptions(path: 'https://baidu.com/'),\n  );\n  print(response.data);\n}\n"
  },
  {
    "path": "example_dart/lib/post_stream_and_bytes.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\n\nimport 'package:dio/dio.dart';\n\nvoid main() async {\n  final dio = Dio(\n    BaseOptions(\n      connectTimeout: const Duration(seconds: 5),\n      baseUrl: 'https://httpbin.org/',\n    ),\n  );\n\n  dio.interceptors.add(LogInterceptor(responseBody: true));\n\n  // final file = File('./example/bee.mp4');\n  //\n  // // Sending stream\n  // await dio.post('post',\n  //   data: file.openRead(),\n  //   options: Options(\n  //     headers: {\n  //       HttpHeaders.contentTypeHeader: ContentType.text.toString(),\n  //       HttpHeaders.contentLengthHeader: file.lengthSync(),\n  //      // HttpHeaders.authorizationHeader: 'Bearer $token',\n  //     },\n  //   ),\n  // );\n\n  // Sending bytes with Stream(Just an example, you can send json(Map) directly in action)\n  final postData = utf8.encode('{\"userName\":\"wendux\"}');\n  await dio.post(\n    'post',\n    data: Stream.fromIterable([postData]),\n    onSendProgress: (a, b) => print(a),\n    options: Options(\n      headers: {\n        HttpHeaders.contentLengthHeader: postData.length, // Set content-length\n      },\n    ),\n  );\n}\n"
  },
  {
    "path": "example_dart/lib/proxy.dart",
    "content": "import 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\n\nvoid main() async {\n  final dio = Dio();\n  dio.options\n    ..headers['user-agent'] = 'xxx'\n    ..contentType = 'text';\n  dio.httpClientAdapter = IOHttpClientAdapter(\n    createHttpClient: () {\n      final client = HttpClient();\n      client.findProxy = (uri) {\n        // Proxy all request to localhost:8888.\n        // Be aware, the proxy should went through you running device,\n        // not the host platform.\n        return 'PROXY localhost:8888';\n      };\n      client.badCertificateCallback =\n          (X509Certificate cert, String host, int port) => true;\n      return client;\n    },\n  );\n\n  Response<String> response;\n  response = await dio.get('https://www.baidu.com');\n  print(response.statusCode);\n  response = await dio.get('https://www.baidu.com');\n  print(response.statusCode);\n}\n"
  },
  {
    "path": "example_dart/lib/queue_interceptors.dart",
    "content": "import 'package:dio/dio.dart';\n\nvoid main() async {\n  final dio = Dio();\n  dio.options.baseUrl = 'https://httpbin.org/status/';\n  dio.interceptors.add(\n    InterceptorsWrapper(\n      onRequest: (\n        RequestOptions requestOptions,\n        RequestInterceptorHandler handler,\n      ) {\n        print(requestOptions.uri);\n        Future.delayed(const Duration(seconds: 2), () {\n          handler.next(requestOptions);\n        });\n      },\n    ),\n  );\n  print(\n    'All of the requests enter the interceptor at once, rather than executing sequentially.',\n  );\n  await makeRequests(dio);\n  print(\n    'All of the requests enter the interceptor sequentially by QueuedInterceptors',\n  );\n  dio.interceptors\n    ..clear()\n    ..add(\n      QueuedInterceptorsWrapper(\n        onRequest: (\n          RequestOptions requestOptions,\n          RequestInterceptorHandler handler,\n        ) {\n          print(requestOptions.uri);\n          Future.delayed(const Duration(seconds: 2), () {\n            handler.next(requestOptions);\n          });\n        },\n      ),\n    );\n  await makeRequests(dio);\n}\n\nFuture makeRequests(Dio dio) async {\n  try {\n    await Future.wait([\n      dio.get('/200'),\n      dio.get('/201'),\n      dio.get('/201'),\n    ]);\n  } catch (e) {\n    print(e);\n  }\n}\n"
  },
  {
    "path": "example_dart/lib/queued_interceptor_crsftoken.dart",
    "content": "import 'dart:convert';\nimport 'dart:math';\n\nimport 'package:dio/dio.dart';\n\nvoid main() async {\n  final tokenManager = TokenManager();\n\n  final dio = Dio(\n    BaseOptions(\n      baseUrl: 'https://httpbun.com',\n    ),\n  );\n\n  dio.interceptors.add(\n    QueuedInterceptorsWrapper(\n      onRequest: (requestOptions, handler) {\n        print(\n          '''\n[onRequest] ${requestOptions.hashCode} / time: ${DateTime.now().toIso8601String()}\n\\tPath: ${requestOptions.path}\n\\tHeaders: ${requestOptions.headers}\n          ''',\n        );\n\n        // In case, you have 'refresh_token' and needs to refresh your 'access_token',\n        // request a new 'access_token' and update from here.\n\n        if (tokenManager.accessToken != null) {\n          requestOptions.headers['Authorization'] =\n              'Bearer ${tokenManager.accessToken}';\n        }\n\n        return handler.next(requestOptions);\n      },\n      onResponse: (response, handler) {\n        print('''\n[onResponse] ${response.requestOptions.hashCode} / time: ${DateTime.now().toIso8601String()}\n\\tStatus: ${response.statusCode}\n\\tData: ${response.data}\n        ''');\n\n        return handler.resolve(response);\n      },\n      onError: (error, handler) async {\n        final statusCode = error.response?.statusCode;\n        print(\n          '''\n[onError] ${error.requestOptions.hashCode} / time: ${DateTime.now().toIso8601String()}\n\\tStatus: $statusCode\n          ''',\n        );\n\n        // This example only handles the '401' status code,\n        // The more complex scenario should handle more status codes e.g. '403', '404', etc.\n        if (statusCode != 401) {\n          return handler.resolve(error.response!);\n        }\n\n        // To prevent repeated requests to the 'Authentication Server'\n        // to update our 'access_token' with parallel requests,\n        // we need to compare with the previously requested 'access_token'.\n        final requestedAccessToken =\n            error.requestOptions.headers['Authorization'];\n        if (requestedAccessToken == tokenManager.accessToken) {\n          final tokenRefreshDio = Dio()\n            ..options.baseUrl = 'https://httpbun.com';\n\n          final response = await tokenRefreshDio.post(\n            '/mix/s=201/b64=${base64.encode(\n              jsonEncode(AuthenticationServer.generate()).codeUnits,\n            )}',\n          );\n          tokenRefreshDio.close();\n\n          // Treat codes other than 2XX as rejected.\n          if (response.statusCode == null || response.statusCode! ~/ 100 != 2) {\n            return handler.reject(error);\n          }\n\n          final body = jsonDecode(response.data) as Map<String, Object?>;\n          if (!body.containsKey('access_token')) {\n            return handler.reject(error);\n          }\n\n          final token = body['access_token'] as String;\n          tokenManager.setAccessToken(token, error.requestOptions.hashCode);\n        }\n\n        /// The authorization has been resolved so and try again with the request.\n        final retried = await dio.fetch(\n          error.requestOptions\n            ..path = '/mix/s=200'\n            ..headers = {\n              'Authorization': 'Bearer ${tokenManager.accessToken}',\n            },\n        );\n\n        // Treat codes other than 2XX as rejected.\n        if (retried.statusCode == null || retried.statusCode! ~/ 100 != 2) {\n          return handler.reject(error);\n        }\n\n        return handler.resolve(error.response!);\n      },\n    ),\n  );\n\n  await Future.wait([\n    dio.post('/mix/s=401'),\n    dio.post('/mix/s=401'),\n    dio.post('/mix/s=200'),\n  ]);\n\n  tokenManager.printHistory();\n\n  dio.close();\n}\n\ntypedef TokenHistory = ({\n  String? previous,\n  String? current,\n  DateTime updatedAt,\n  int updatedBy,\n});\n\n/// Pretend as 'Authentication Server' that generates access token and refresh token\nclass AuthenticationServer {\n  static Map<String, String> generate() => <String, String>{\n        'access_token': _generateUuid(),\n        'refresh_token': _generateUuid(),\n      };\n\n  static String _generateUuid() {\n    final random = Random.secure();\n    final bytes = List<int>.generate(8, (_) => random.nextInt(256));\n    return bytes.map((b) => b.toRadixString(16).padLeft(2, '0')).join();\n  }\n}\n\nclass TokenManager {\n  static String? _accessToken;\n\n  static final List<TokenHistory> _history = <TokenHistory>[];\n\n  String? get accessToken => _accessToken;\n\n  void printHistory() {\n    print('=== Token History ===');\n    for (int i = 0; i < _history.length; i++) {\n      final entry = _history[i];\n      print('''\n[$i]\\tupdated token: ${entry.previous} → ${entry.current}\n\\tupdated at: ${entry.updatedAt.toIso8601String()}\n\\tupdated by: ${entry.updatedBy}\n      ''');\n    }\n  }\n\n  void setAccessToken(String? token, int instanceId) {\n    final previous = _accessToken;\n    _accessToken = token;\n    _history.add(\n      (\n        previous: previous,\n        current: _accessToken,\n        updatedAt: DateTime.now(),\n        updatedBy: instanceId,\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example_dart/lib/request_interceptors.dart",
    "content": "import 'package:dio/dio.dart';\n\nvoid main() async {\n  final dio = Dio();\n  dio.options.baseUrl = 'https://httpbin.org/';\n  dio.options.connectTimeout = const Duration(seconds: 5);\n  dio.interceptors.add(\n    InterceptorsWrapper(\n      onRequest: (options, handler) {\n        switch (options.path) {\n          case '/fakepath1':\n            return handler.resolve(\n              Response(\n                requestOptions: options,\n                data: 'fake data',\n              ),\n            );\n          case '/fakepath2':\n            dio\n                .get('/get')\n                .then(handler.resolve)\n                .catchError((e) => handler.reject(e));\n          case '/fakepath3':\n            return handler.reject(\n              DioException(\n                requestOptions: options,\n                error: 'test error',\n              ),\n            );\n          default:\n            return handler.next(options); //continue\n        }\n      },\n    ),\n  );\n  Response response;\n  response = await dio.get('/fakepath1');\n  assert(response.data == 'fake data');\n  response = await dio.get('/fakepath2');\n  assert(response.data['headers'] is Map);\n  try {\n    response = await dio.get('/fakepath3');\n  } on DioException catch (e) {\n    assert(e.message == 'test error');\n    assert(e.response == null);\n  }\n  response = await dio.get('/get');\n  assert(response.data['headers'] is Map);\n  try {\n    await dio.get('/status/404');\n  } on DioException catch (e) {\n    assert(e.response!.statusCode == 404);\n  }\n}\n"
  },
  {
    "path": "example_dart/lib/response_interceptor.dart",
    "content": "import 'dart:convert';\n\nimport 'package:dio/dio.dart';\n\nvoid main() async {\n  const urlNotFound = 'https://wendux.github.io/xxxxx/';\n  const urlNotFound1 = '${urlNotFound}1';\n  const urlNotFound2 = '${urlNotFound}2';\n  const urlNotFound3 = '${urlNotFound}3';\n  final dio = Dio();\n  dio.options.baseUrl = 'https://httpbin.org/';\n  dio.interceptors.add(\n    InterceptorsWrapper(\n      onResponse: (response, handler) {\n        response.data = json.decode(response.data['data']);\n        handler.next(response);\n      },\n      onError: (DioException error, ErrorInterceptorHandler handler) {\n        final response = error.response;\n        if (response != null) {\n          switch (response.requestOptions.path) {\n            case urlNotFound:\n              return handler.next(error);\n            case urlNotFound1:\n              return handler.resolve(\n                Response(\n                  requestOptions: error.requestOptions,\n                  data: 'fake data',\n                ),\n              );\n            case urlNotFound2:\n              return handler.resolve(\n                Response(\n                  requestOptions: error.requestOptions,\n                  data: 'fake data',\n                ),\n              );\n            case urlNotFound3:\n              return handler.next(\n                error.copyWith(\n                  error: 'custom error info [${response.statusCode}]',\n                ),\n              );\n          }\n        }\n        handler.next(error);\n      },\n    ),\n  );\n\n  Response response;\n  response = await dio.post('/post', data: {'a': 5});\n  print(response.headers);\n  assert(response.data['a'] == 5);\n  try {\n    await dio.get(urlNotFound);\n  } on DioException catch (e) {\n    assert(e.response!.statusCode == 404);\n  }\n  response = await dio.get('${urlNotFound}1');\n  assert(response.data == 'fake data');\n  response = await dio.get('${urlNotFound}2');\n  assert(response.data == 'fake data');\n  try {\n    await dio.get('${urlNotFound}3');\n  } on DioException catch (e) {\n    assert(e.message == 'custom error info [404]');\n  }\n}\n"
  },
  {
    "path": "example_dart/lib/test.dart",
    "content": "import 'package:dio/dio.dart';\n\n// void getHttp() async {\n//   final dio = Dio();\n//   dio.interceptors.add(LogInterceptor(responseBody: true));\n//   dio.options.baseUrl = 'https://httpbin.org';\n//   dio.options.headers = {'Authorization': 'Bearer '};\n//   //dio.options.baseUrl = \"http://localhost:3000\";\n//   final response = await dio.post(\n//     '/post',\n//     data: null,\n//     options: Options(\n//       contentType: Headers.jsonContentType,\n//     ),\n//   );\n//   print(response);\n// }\n//\n// void main() async {\n//   getHttp();\n// }\n\nvoid main() async {\n  final dio = Dio()..interceptors.add(ProblemInterceptor());\n  await dio.get('https://baidu.com/');\n}\n\nclass ProblemInterceptor extends Interceptor {\n  @override\n  void onResponse(Response response, ResponseInterceptorHandler handler) {\n    throw Exception('Unexpected problem inside onResponse');\n  }\n}\n"
  },
  {
    "path": "example_dart/lib/transformer.dart",
    "content": "import 'dart:async';\n\nimport 'package:dio/dio.dart';\n\n/// If the request data is a `List` type, the [BackgroundTransformer] will send data\n/// by calling its `toString()` method. However, normally the List object is\n/// not expected for request data( mostly need Map ). So we provide a custom\n/// [Transformer] that will throw error when request data is a `List` type.\n\nclass MyTransformer extends BackgroundTransformer {\n  @override\n  Future<String> transformRequest(RequestOptions options) async {\n    if (options.data is List<String>) {\n      throw DioException(\n        error: \"Can't send List to sever directly\",\n        requestOptions: options,\n      );\n    } else {\n      return super.transformRequest(options);\n    }\n  }\n\n  /// The [Options] doesn't contain the cookie info. we add the cookie\n  /// info to [Options.extra], and you can retrieve it in [ResponseInterceptor]\n  /// and [Response] with `response.request.extra[\"cookies\"]`.\n  @override\n  Future transformResponse(\n    RequestOptions options,\n    ResponseBody responseBody,\n  ) async {\n    options.extra['self'] = 'XX';\n    return super.transformResponse(options, responseBody);\n  }\n}\n\nvoid main() async {\n  final dio = Dio();\n  // Use custom Transformer\n  dio.transformer = MyTransformer();\n\n  final response = await dio.get('https://www.baidu.com');\n  print(response.requestOptions.extra['self']);\n\n  try {\n    await dio.post('https://www.baidu.com', data: ['1', '2']);\n  } catch (e) {\n    print(e);\n  }\n}\n"
  },
  {
    "path": "example_dart/lib/upload.txt",
    "content": "你好， 世界\n&\n$\n%  U。想 。。\n\n"
  },
  {
    "path": "example_dart/pubspec.yaml",
    "content": "name: dio_example\ndescription: The example snippets for Dio.\nversion: 0.0.1\npublish_to: \"none\"\n\nenvironment:\n  sdk: \">=3.0.0 <4.0.0\"\n\ndependencies:\n  cookie_jar:\n  crypto:\n  dio:\n  dio_cookie_manager:\n  dio_http2_adapter:\n\ndependency_overrides:\n  dio:\n    path: ../dio\n  dio_cookie_manager:\n    path: ../plugins/cookie_manager\n  dio_http2_adapter:\n    path: ../plugins/http2_adapter\n\ndev_dependencies:\n  lints: any\n"
  },
  {
    "path": "example_flutter_app/.gitignore",
    "content": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\n\n# IntelliJ related\n*.ipr\n*.iws\n.idea/\n\n# The .vscode folder contains launch configuration and tasks you configure in\n# VS Code which you may wish to be included in version control, so this line\n# is commented out by default.\n#.vscode/\n\n# Flutter/Dart/Pub related\n**/doc/api/\n**/ios/Flutter/.last_build_id\n.dart_tool/\n.flutter-plugins\n.flutter-plugins-dependencies\n.packages\n.pub-cache/\n.pub/\n/build/\n\n# Web related\nlib/generated_plugin_registrant.dart\n\n# Symbolication related\napp.*.symbols\n\n# Obfuscation related\napp.*.map.json\n\n# Android Studio will place build artifacts here\n/android/app/debug\n/android/app/profile\n/android/app/release\n"
  },
  {
    "path": "example_flutter_app/.metadata",
    "content": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrades etc.\n#\n# This file should be version controlled and should not be manually edited.\n\nversion:\n  revision: \"edada7c56edf4a183c1735310e123c7f923584f1\"\n  channel: \"stable\"\n\nproject_type: app\n\n# Tracks metadata for the flutter migrate command\nmigration:\n  platforms:\n    - platform: root\n      create_revision: edada7c56edf4a183c1735310e123c7f923584f1\n      base_revision: edada7c56edf4a183c1735310e123c7f923584f1\n    - platform: android\n      create_revision: edada7c56edf4a183c1735310e123c7f923584f1\n      base_revision: edada7c56edf4a183c1735310e123c7f923584f1\n    - platform: ios\n      create_revision: edada7c56edf4a183c1735310e123c7f923584f1\n      base_revision: edada7c56edf4a183c1735310e123c7f923584f1\n    - platform: linux\n      create_revision: edada7c56edf4a183c1735310e123c7f923584f1\n      base_revision: edada7c56edf4a183c1735310e123c7f923584f1\n    - platform: macos\n      create_revision: edada7c56edf4a183c1735310e123c7f923584f1\n      base_revision: edada7c56edf4a183c1735310e123c7f923584f1\n    - platform: web\n      create_revision: edada7c56edf4a183c1735310e123c7f923584f1\n      base_revision: edada7c56edf4a183c1735310e123c7f923584f1\n    - platform: windows\n      create_revision: edada7c56edf4a183c1735310e123c7f923584f1\n      base_revision: edada7c56edf4a183c1735310e123c7f923584f1\n\n  # User provided section\n\n  # List of Local paths (relative to this file) that should be\n  # ignored by the migrate tool.\n  #\n  # Files that are not part of the templates will be ignored by default.\n  unmanaged_files:\n    - 'lib/main.dart'\n    - 'ios/Runner.xcodeproj/project.pbxproj'\n"
  },
  {
    "path": "example_flutter_app/README.md",
    "content": "# flutter_app\n\nA new Flutter application for dio test.\n\n## Getting Started\n\nThis project is a starting point for a Flutter application.\n\nA few resources to get you started if this is your first Flutter project:\n\n- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)\n- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)\n\nFor help getting started with Flutter, view our\n[online documentation](https://flutter.dev/docs), which offers tutorials,\nsamples, guidance on mobile development, and a full API reference.\n"
  },
  {
    "path": "example_flutter_app/analysis_options.yaml",
    "content": "include: ../analysis_options.yaml\n"
  },
  {
    "path": "example_flutter_app/android/.gitignore",
    "content": "gradle-wrapper.jar\n/.gradle\n/.kotlin\n/captures/\n/gradlew\n/gradlew.bat\n/local.properties\nGeneratedPluginRegistrant.java\n.cxx/\n\n# Remember to never publicly share your keystore.\n# See https://flutter.dev/to/reference-keystore\nkey.properties\n**/*.keystore\n**/*.jks\n"
  },
  {
    "path": "example_flutter_app/android/app/build.gradle.kts",
    "content": "plugins {\n    id(\"com.android.application\")\n    id(\"kotlin-android\")\n    // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.\n    id(\"dev.flutter.flutter-gradle-plugin\")\n}\n\nandroid {\n    namespace = \"cn.flutter.dio_flutter_example\"\n    compileSdk = flutter.compileSdkVersion\n    ndkVersion = flutter.ndkVersion\n\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_11\n        targetCompatibility = JavaVersion.VERSION_11\n    }\n\n    kotlinOptions {\n        jvmTarget = JavaVersion.VERSION_11.toString()\n    }\n\n    defaultConfig {\n        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).\n        applicationId = \"cn.flutter.dio_flutter_example\"\n        // You can update the following values to match your application needs.\n        // For more information, see: https://flutter.dev/to/review-gradle-config.\n        minSdk = flutter.minSdkVersion\n        targetSdk = flutter.targetSdkVersion\n        versionCode = flutter.versionCode\n        versionName = flutter.versionName\n    }\n\n    buildTypes {\n        release {\n            // TODO: Add your own signing config for the release build.\n            // Signing with the debug keys for now, so `flutter run --release` works.\n            signingConfig = signingConfigs.getByName(\"debug\")\n        }\n    }\n}\n\nflutter {\n    source = \"../..\"\n}\n"
  },
  {
    "path": "example_flutter_app/android/app/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <uses-permission android:name=\"android.permission.INTERNET\"/>\n    <application\n        android:label=\"dio_flutter_example\"\n        android:name=\"${applicationName}\"\n        android:icon=\"@mipmap/ic_launcher\">\n        <activity\n            android:name=\".MainActivity\"\n            android:exported=\"true\"\n            android:launchMode=\"singleTop\"\n            android:taskAffinity=\"\"\n            android:theme=\"@style/LaunchTheme\"\n            android:configChanges=\"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode\"\n            android:hardwareAccelerated=\"true\"\n            android:windowSoftInputMode=\"adjustResize\">\n            <!-- Specifies an Android theme to apply to this Activity as soon as\n                 the Android process has started. This theme is visible to the user\n                 while the Flutter UI initializes. After that, this theme continues\n                 to determine the Window background behind the Flutter UI. -->\n            <meta-data\n              android:name=\"io.flutter.embedding.android.NormalTheme\"\n              android:resource=\"@style/NormalTheme\"\n              />\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\"/>\n                <category android:name=\"android.intent.category.LAUNCHER\"/>\n            </intent-filter>\n        </activity>\n        <!-- Don't delete the meta-data below.\n             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->\n        <meta-data\n            android:name=\"flutterEmbedding\"\n            android:value=\"2\" />\n    </application>\n    <!-- Required to query activities that can process text, see:\n         https://developer.android.com/training/package-visibility and\n         https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.\n\n         In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->\n    <queries>\n        <intent>\n            <action android:name=\"android.intent.action.PROCESS_TEXT\"/>\n            <data android:mimeType=\"text/plain\"/>\n        </intent>\n    </queries>\n</manifest>\n"
  },
  {
    "path": "example_flutter_app/android/app/src/main/kotlin/cn/flutter/dio_flutter_example/MainActivity.kt",
    "content": "package cn.flutter.dio_flutter_example\n\nimport io.flutter.embedding.android.FlutterActivity\n\nclass MainActivity : FlutterActivity()\n"
  },
  {
    "path": "example_flutter_app/android/app/src/main/res/drawable/launch_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"@android:color/white\" />\n\n    <!-- You can insert your own image assets here -->\n    <!-- <item>\n        <bitmap\n            android:gravity=\"center\"\n            android:src=\"@mipmap/launch_image\" />\n    </item> -->\n</layer-list>\n"
  },
  {
    "path": "example_flutter_app/android/app/src/main/res/drawable-v21/launch_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"?android:colorBackground\" />\n\n    <!-- You can insert your own image assets here -->\n    <!-- <item>\n        <bitmap\n            android:gravity=\"center\"\n            android:src=\"@mipmap/launch_image\" />\n    </item> -->\n</layer-list>\n"
  },
  {
    "path": "example_flutter_app/android/app/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->\n    <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Light.NoTitleBar\">\n        <!-- Show a splash screen on the activity. Automatically removed when\n             the Flutter engine draws its first frame -->\n        <item name=\"android:windowBackground\">@drawable/launch_background</item>\n    </style>\n    <!-- Theme applied to the Android Window as soon as the process has started.\n         This theme determines the color of the Android Window while your\n         Flutter UI initializes, as well as behind your Flutter UI while its\n         running.\n\n         This Theme is only used starting with V2 of Flutter's Android embedding. -->\n    <style name=\"NormalTheme\" parent=\"@android:style/Theme.Light.NoTitleBar\">\n        <item name=\"android:windowBackground\">?android:colorBackground</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "example_flutter_app/android/app/src/main/res/values-night/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->\n    <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Black.NoTitleBar\">\n        <!-- Show a splash screen on the activity. Automatically removed when\n             the Flutter engine draws its first frame -->\n        <item name=\"android:windowBackground\">@drawable/launch_background</item>\n    </style>\n    <!-- Theme applied to the Android Window as soon as the process has started.\n         This theme determines the color of the Android Window while your\n         Flutter UI initializes, as well as behind your Flutter UI while its\n         running.\n\n         This Theme is only used starting with V2 of Flutter's Android embedding. -->\n    <style name=\"NormalTheme\" parent=\"@android:style/Theme.Black.NoTitleBar\">\n        <item name=\"android:windowBackground\">?android:colorBackground</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "example_flutter_app/android/build.gradle.kts",
    "content": "allprojects {\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n\nval newBuildDir: Directory = rootProject.layout.buildDirectory.dir(\"../../build\").get()\nrootProject.layout.buildDirectory.value(newBuildDir)\n\nsubprojects {\n    val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)\n    project.layout.buildDirectory.value(newSubprojectBuildDir)\n}\nsubprojects {\n    project.evaluationDependsOn(\":app\")\n}\n\ntasks.register<Delete>(\"clean\") {\n    delete(rootProject.layout.buildDirectory)\n}\n"
  },
  {
    "path": "example_flutter_app/android/dio_flutter_example_android.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n  <component name=\"FacetManager\">\n    <facet type=\"android\" name=\"Android\">\n      <configuration>\n        <option name=\"ALLOW_USER_CONFIGURATION\" value=\"false\" />\n        <option name=\"GEN_FOLDER_RELATIVE_PATH_APT\" value=\"/gen\" />\n        <option name=\"GEN_FOLDER_RELATIVE_PATH_AIDL\" value=\"/gen\" />\n        <option name=\"MANIFEST_FILE_RELATIVE_PATH\" value=\"/app/src/main/AndroidManifest.xml\" />\n        <option name=\"RES_FOLDER_RELATIVE_PATH\" value=\"/app/src/main/res\" />\n        <option name=\"ASSETS_FOLDER_RELATIVE_PATH\" value=\"/app/src/main/assets\" />\n        <option name=\"LIBS_FOLDER_RELATIVE_PATH\" value=\"/app/src/main/libs\" />\n        <option name=\"PROGUARD_LOGS_FOLDER_RELATIVE_PATH\" value=\"/app/src/main/proguard_logs\" />\n      </configuration>\n    </facet>\n  </component>\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$/app/src/main/java\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/app/src/main/kotlin\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/gen\" isTestSource=\"false\" generated=\"true\" />\n    </content>\n    <orderEntry type=\"jdk\" jdkName=\"Android API 29 Platform\" jdkType=\"Android SDK\" />\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Flutter for Android\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"KotlinJavaRuntime\" level=\"project\" />\n  </component>\n</module>\n"
  },
  {
    "path": "example_flutter_app/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.14.3-all.zip\n"
  },
  {
    "path": "example_flutter_app/android/gradle.properties",
    "content": "org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n"
  },
  {
    "path": "example_flutter_app/android/settings.gradle.kts",
    "content": "pluginManagement {\n    val flutterSdkPath = run {\n        val properties = java.util.Properties()\n        file(\"local.properties\").inputStream().use { properties.load(it) }\n        val flutterSdkPath = properties.getProperty(\"flutter.sdk\")\n        require(flutterSdkPath != null) { \"flutter.sdk not set in local.properties\" }\n        flutterSdkPath\n    }\n\n    includeBuild(\"$flutterSdkPath/packages/flutter_tools/gradle\")\n\n    repositories {\n        google()\n        mavenCentral()\n        gradlePluginPortal()\n    }\n}\n\nplugins {\n    id(\"dev.flutter.flutter-plugin-loader\") version \"1.0.0\"\n    id(\"com.android.application\") version \"8.13.0\" apply false\n    id(\"org.jetbrains.kotlin.android\") version \"2.2.20\" apply false\n}\n\ninclude(\":app\")\n"
  },
  {
    "path": "example_flutter_app/dio_flutter_example.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/test\" isTestSource=\"true\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.idea\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/android/.gradle\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/android/.idea\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/ios/Flutter\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/ios/Pods\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/ios/.symlinks\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/macos/Flutter\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/macos/Pods\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/macos/.symlinks\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Flutter Plugins\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n  </component>\n</module>\n"
  },
  {
    "path": "example_flutter_app/example_flutter_app.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$/lib\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/test\" isTestSource=\"true\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.idea\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Flutter Plugins\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n  </component>\n</module>\n"
  },
  {
    "path": "example_flutter_app/ios/.gitignore",
    "content": "**/dgph\n*.mode1v3\n*.mode2v3\n*.moved-aside\n*.pbxuser\n*.perspectivev3\n**/*sync/\n.sconsign.dblite\n.tags*\n**/.vagrant/\n**/DerivedData/\nIcon?\n**/Pods/\n**/.symlinks/\nprofile\nxcuserdata\n**/.generated/\nFlutter/App.framework\nFlutter/Flutter.framework\nFlutter/Flutter.podspec\nFlutter/Generated.xcconfig\nFlutter/ephemeral/\nFlutter/app.flx\nFlutter/app.zip\nFlutter/flutter_assets/\nFlutter/flutter_export_environment.sh\nServiceDefinitions.json\nRunner/GeneratedPluginRegistrant.*\n\n# Exceptions to above rules.\n!default.mode1v3\n!default.mode2v3\n!default.pbxuser\n!default.perspectivev3\n"
  },
  {
    "path": "example_flutter_app/ios/Flutter/AppFrameworkInfo.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n  <key>CFBundleDevelopmentRegion</key>\n  <string>en</string>\n  <key>CFBundleExecutable</key>\n  <string>App</string>\n  <key>CFBundleIdentifier</key>\n  <string>io.flutter.flutter.app</string>\n  <key>CFBundleInfoDictionaryVersion</key>\n  <string>6.0</string>\n  <key>CFBundleName</key>\n  <string>App</string>\n  <key>CFBundlePackageType</key>\n  <string>FMWK</string>\n  <key>CFBundleShortVersionString</key>\n  <string>1.0</string>\n  <key>CFBundleSignature</key>\n  <string>????</string>\n  <key>CFBundleVersion</key>\n  <string>1.0</string>\n  <key>MinimumOSVersion</key>\n  <string>12.0</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/ios/Flutter/Debug.xcconfig",
    "content": "#include \"Generated.xcconfig\"\n"
  },
  {
    "path": "example_flutter_app/ios/Flutter/Release.xcconfig",
    "content": "#include \"Generated.xcconfig\"\n"
  },
  {
    "path": "example_flutter_app/ios/Runner/AppDelegate.swift",
    "content": "import Flutter\nimport UIKit\n\n@main\n@objc class AppDelegate: FlutterAppDelegate {\n  override func application(\n    _ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?\n  ) -> Bool {\n    GeneratedPluginRegistrant.register(with: self)\n    return super.application(application, didFinishLaunchingWithOptions: launchOptions)\n  }\n}\n"
  },
  {
    "path": "example_flutter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-20x20@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-20x20@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-29x29@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-29x29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-29x29@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-40x40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-40x40@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-60x60@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-60x60@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-20x20@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-20x20@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-29x29@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-29x29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-40x40@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-40x40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-76x76@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-76x76@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"83.5x83.5\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-83.5x83.5@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"1024x1024\",\n      \"idiom\" : \"ios-marketing\",\n      \"filename\" : \"Icon-App-1024x1024@1x.png\",\n      \"scale\" : \"1x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}\n"
  },
  {
    "path": "example_flutter_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchImage.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchImage@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchImage@3x.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}\n"
  },
  {
    "path": "example_flutter_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md",
    "content": "# Launch Screen Assets\n\nYou can customize the launch screen with your own desired assets by replacing the image files in this directory.\n\nYou can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images."
  },
  {
    "path": "example_flutter_app/ios/Runner/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"12121\" systemVersion=\"16G29\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"12089\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Ydg-fD-yQy\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"xbc-2k-c8Z\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <imageView opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" image=\"LaunchImage\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"YRO-k0-Ey4\">\n                            </imageView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"YRO-k0-Ey4\" firstAttribute=\"centerX\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"centerX\" id=\"1a2-6s-vTC\"/>\n                            <constraint firstItem=\"YRO-k0-Ey4\" firstAttribute=\"centerY\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"centerY\" id=\"4X2-HB-R7a\"/>\n                        </constraints>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"LaunchImage\" width=\"168\" height=\"185\"/>\n    </resources>\n</document>\n"
  },
  {
    "path": "example_flutter_app/ios/Runner/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15F34\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" initialViewController=\"BYZ-38-t0r\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"10085\"/>\n    </dependencies>\n    <scenes>\n        <!--Flutter View Controller-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController id=\"BYZ-38-t0r\" customClass=\"FlutterViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"y3c-jy-aDJ\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"wfy-db-euE\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"600\" height=\"600\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "example_flutter_app/ios/Runner/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>Dio Flutter Example</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>dio_flutter_example</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>$(FLUTTER_BUILD_NAME)</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(FLUTTER_BUILD_NUMBER)</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>NSAppTransportSecurity</key>\n\t<dict>\n\t\t<key>NSAllowsArbitraryLoads</key>\n\t\t<true/>\n\t</dict>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>CADisableMinimumFrameDurationOnPhone</key>\n\t<true/>\n\t<key>UIApplicationSupportsIndirectInputEvents</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/ios/Runner/Runner-Bridging-Header.h",
    "content": "#import \"GeneratedPluginRegistrant.h\"\n"
  },
  {
    "path": "example_flutter_app/ios/Runner.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 54;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };\n\t\t331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };\n\t\t3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };\n\t\t74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };\n\t\t97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };\n\t\t97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };\n\t\t97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 97C146E61CF9000F007C117D /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 97C146ED1CF9000F007C117D;\n\t\t\tremoteInfo = Runner;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t9705A1C41CF9048500538489 /* Embed Frameworks */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tname = \"Embed Frameworks\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = \"<group>\"; };\n\t\t1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = \"<group>\"; };\n\t\t331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = \"<group>\"; };\n\t\t331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = \"<group>\"; };\n\t\t74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = \"Runner-Bridging-Header.h\"; sourceTree = \"<group>\"; };\n\t\t74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = \"<group>\"; };\n\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = \"<group>\"; };\n\t\t9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = \"<group>\"; };\n\t\t97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\t97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\t97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t97C146EB1CF9000F007C117D /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t331C8082294A63A400263BE5 /* RunnerTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t331C807B294A618700263BE5 /* RunnerTests.swift */,\n\t\t\t);\n\t\t\tpath = RunnerTests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9740EEB11CF90186004384FC /* Flutter */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,\n\t\t\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */,\n\t\t\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */,\n\t\t\t\t9740EEB31CF90195004384FC /* Generated.xcconfig */,\n\t\t\t);\n\t\t\tname = Flutter;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146E51CF9000F007C117D = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9740EEB11CF90186004384FC /* Flutter */,\n\t\t\t\t97C146F01CF9000F007C117D /* Runner */,\n\t\t\t\t97C146EF1CF9000F007C117D /* Products */,\n\t\t\t\t331C8082294A63A400263BE5 /* RunnerTests */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146EF1CF9000F007C117D /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t97C146EE1CF9000F007C117D /* Runner.app */,\n\t\t\t\t331C8081294A63A400263BE5 /* RunnerTests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146F01CF9000F007C117D /* Runner */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t97C146FA1CF9000F007C117D /* Main.storyboard */,\n\t\t\t\t97C146FD1CF9000F007C117D /* Assets.xcassets */,\n\t\t\t\t97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,\n\t\t\t\t97C147021CF9000F007C117D /* Info.plist */,\n\t\t\t\t1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,\n\t\t\t\t1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,\n\t\t\t\t74858FAE1ED2DC5600515810 /* AppDelegate.swift */,\n\t\t\t\t74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,\n\t\t\t);\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t331C8080294A63A400263BE5 /* RunnerTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget \"RunnerTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t331C807D294A63A400263BE5 /* Sources */,\n\t\t\t\t331C807F294A63A400263BE5 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t331C8086294A63A400263BE5 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = RunnerTests;\n\t\t\tproductName = RunnerTests;\n\t\t\tproductReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n\t\t97C146ED1CF9000F007C117D /* Runner */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget \"Runner\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t9740EEB61CF901F6004384FC /* Run Script */,\n\t\t\t\t97C146EA1CF9000F007C117D /* Sources */,\n\t\t\t\t97C146EB1CF9000F007C117D /* Frameworks */,\n\t\t\t\t97C146EC1CF9000F007C117D /* Resources */,\n\t\t\t\t9705A1C41CF9048500538489 /* Embed Frameworks */,\n\t\t\t\t3B06AD1E1E4923F5004D2608 /* Thin Binary */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = Runner;\n\t\t\tproductName = Runner;\n\t\t\tproductReference = 97C146EE1CF9000F007C117D /* Runner.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t97C146E61CF9000F007C117D /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = YES;\n\t\t\t\tLastUpgradeCheck = 1510;\n\t\t\t\tORGANIZATIONNAME = \"\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t331C8080294A63A400263BE5 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 14.0;\n\t\t\t\t\t\tTestTargetID = 97C146ED1CF9000F007C117D;\n\t\t\t\t\t};\n\t\t\t\t\t97C146ED1CF9000F007C117D = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 7.3.1;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject \"Runner\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 97C146E51CF9000F007C117D;\n\t\t\tproductRefGroup = 97C146EF1CF9000F007C117D /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t97C146ED1CF9000F007C117D /* Runner */,\n\t\t\t\t331C8080294A63A400263BE5 /* RunnerTests */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t331C807F294A63A400263BE5 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t97C146EC1CF9000F007C117D /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,\n\t\t\t\t97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,\n\t\t\t\t97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\talwaysOutOfDate = 1;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\",\n\t\t\t);\n\t\t\tname = \"Thin Binary\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"/bin/sh \\\"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\\\" embed_and_thin\";\n\t\t};\n\t\t9740EEB61CF901F6004384FC /* Run Script */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\talwaysOutOfDate = 1;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"Run Script\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"/bin/sh \\\"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\\\" build\";\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t331C807D294A63A400263BE5 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t97C146EA1CF9000F007C117D /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,\n\t\t\t\t1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t331C8086294A63A400263BE5 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 97C146ED1CF9000F007C117D /* Runner */;\n\t\t\ttargetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin PBXVariantGroup section */\n\t\t97C146FA1CF9000F007C117D /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t97C146FB1CF9000F007C117D /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t97C147001CF9000F007C117D /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t249021D3217E4FDB00AE95B9 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 12.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSUPPORTED_PLATFORMS = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t249021D4217E4FDB00AE95B9 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = \"$(FLUTTER_BUILD_NUMBER)\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = cn.flutter.dioFlutterExample;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"Runner/Runner-Bridging-Header.h\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t331C8088294A63A400263BE5 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = cn.flutter.dioFlutterExample.RunnerTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t331C8089294A63A400263BE5 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = cn.flutter.dioFlutterExample.RunnerTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t331C808A294A63A400263BE5 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = cn.flutter.dioFlutterExample.RunnerTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t97C147031CF9000F007C117D /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 12.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t97C147041CF9000F007C117D /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 12.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSUPPORTED_PLATFORMS = iphoneos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t97C147061CF9000F007C117D /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = \"$(FLUTTER_BUILD_NUMBER)\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = cn.flutter.dioFlutterExample;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"Runner/Runner-Bridging-Header.h\";\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t97C147071CF9000F007C117D /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = \"$(FLUTTER_BUILD_NUMBER)\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = cn.flutter.dioFlutterExample;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"Runner/Runner-Bridging-Header.h\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget \"RunnerTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t331C8088294A63A400263BE5 /* Debug */,\n\t\t\t\t331C8089294A63A400263BE5 /* Release */,\n\t\t\t\t331C808A294A63A400263BE5 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t97C146E91CF9000F007C117D /* Build configuration list for PBXProject \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t97C147031CF9000F007C117D /* Debug */,\n\t\t\t\t97C147041CF9000F007C117D /* Release */,\n\t\t\t\t249021D3217E4FDB00AE95B9 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t97C147061CF9000F007C117D /* Debug */,\n\t\t\t\t97C147071CF9000F007C117D /* Release */,\n\t\t\t\t249021D4217E4FDB00AE95B9 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 97C146E61CF9000F007C117D /* Project object */;\n}\n"
  },
  {
    "path": "example_flutter_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "example_flutter_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>PreviewsEnabled</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1510\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n               BuildableName = \"Runner.app\"\n               BlueprintName = \"Runner\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      customLLDBInitFile = \"$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n            BuildableName = \"Runner.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <Testables>\n         <TestableReference\n            skipped = \"NO\"\n            parallelizable = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"331C8080294A63A400263BE5\"\n               BuildableName = \"RunnerTests.xctest\"\n               BlueprintName = \"RunnerTests\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </TestableReference>\n      </Testables>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      customLLDBInitFile = \"$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      enableGPUValidationMode = \"1\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n            BuildableName = \"Runner.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Profile\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n            BuildableName = \"Runner.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "example_flutter_app/ios/Runner.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:Runner.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "example_flutter_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>PreviewsEnabled</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/ios/RunnerTests/RunnerTests.swift",
    "content": "import Flutter\nimport UIKit\nimport XCTest\n\nclass RunnerTests: XCTestCase {\n\n  func testExample() {\n    // If you add code to the Runner application, consider adding tests here.\n    // See https://developer.apple.com/documentation/xctest for more information about using XCTest.\n  }\n\n}\n"
  },
  {
    "path": "example_flutter_app/lib/http.dart",
    "content": "import 'package:dio/dio.dart';\n\nfinal dio = Dio(\n  BaseOptions(\n    connectTimeout: const Duration(seconds: 3),\n  ),\n);\n"
  },
  {
    "path": "example_flutter_app/lib/main.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:flutter/material.dart';\n\nimport 'http.dart'; // make dio as global top-level variable\nimport 'routes/request.dart';\n\nvoid main() {\n  dio.interceptors.add(LogInterceptor());\n  runApp(MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  // This widget is the root of your application.\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'Flutter Demo',\n      theme: ThemeData(\n        primarySwatch: Colors.blue,\n      ),\n      home: MyHomePage(title: 'Flutter Demo Home Page'),\n    );\n  }\n}\n\nclass MyHomePage extends StatefulWidget {\n  MyHomePage({\n    super.key,\n    this.title = '',\n  });\n\n  final String title;\n\n  @override\n  State<MyHomePage> createState() => _MyHomePageState();\n}\n\nclass _MyHomePageState extends State<MyHomePage> {\n  String _text = '';\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: Text(widget.title),\n      ),\n      body: Container(\n        padding: const EdgeInsets.all(16),\n        child: Column(\n          children: [\n            ElevatedButton(\n              child: const Text('Request'),\n              onPressed: () async {\n                try {\n                  await dio\n                      .get<String>('https://httpbin.org/status/404')\n                      .then((r) {\n                    setState(() {\n                      print(r.data);\n                      _text = r.data!.replaceAll(RegExp(r'\\s'), '');\n                    });\n                  });\n                } catch (e) {\n                  print(e);\n                }\n              },\n            ),\n            ElevatedButton(\n              child: const Text('Open new page5'),\n              onPressed: () {\n                Navigator.push(\n                  context,\n                  MaterialPageRoute(\n                    builder: (context) {\n                      return RequestRoute();\n                    },\n                  ),\n                );\n              },\n            ),\n            Expanded(\n              child: SingleChildScrollView(\n                child: Text(_text),\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example_flutter_app/lib/routes/request.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:flutter/material.dart';\n\nimport '../http.dart';\n\nclass RequestRoute extends StatefulWidget {\n  @override\n  State<RequestRoute> createState() => _RequestRouteState();\n}\n\nclass _RequestRouteState extends State<RequestRoute> {\n  String _text = '';\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: const Text('New Page'),\n      ),\n      body: Container(\n        padding: const EdgeInsets.all(16),\n        child: Column(\n          children: [\n            ElevatedButton(\n              child: const Text('get'),\n              onPressed: () {\n                dio.get<String>('https://httpbin.org/get').then((r) {\n                  setState(() {\n                    _text = r.data!;\n                  });\n                });\n              },\n            ),\n            ElevatedButton(\n              child: const Text('post'),\n              onPressed: () {\n                final formData = FormData.fromMap({\n                  'file': MultipartFile.fromString('x' * 1024 * 1024),\n                });\n\n                dio\n                    .post(\n                  'https://httpbin.org/post',\n                  data: formData,\n                  options: Options(\n                    sendTimeout: const Duration(seconds: 2),\n                    receiveTimeout: const Duration(seconds: 0),\n                  ),\n                  onSendProgress: (a, b) => print('send ${a / b}'),\n                  onReceiveProgress: (a, b) => print('received ${a / b}'),\n                )\n                    .then((r) {\n                  setState(() {\n                    _text = r.headers.toString();\n                  });\n                });\n              },\n            ),\n            Expanded(\n              child: SingleChildScrollView(\n                child: Text(_text),\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example_flutter_app/linux/.gitignore",
    "content": "flutter/ephemeral\n"
  },
  {
    "path": "example_flutter_app/linux/CMakeLists.txt",
    "content": "# Project-level configuration.\ncmake_minimum_required(VERSION 3.13)\nproject(runner LANGUAGES CXX)\n\n# The name of the executable created for the application. Change this to change\n# the on-disk name of your application.\nset(BINARY_NAME \"dio_flutter_example\")\n# The unique GTK application identifier for this application. See:\n# https://wiki.gnome.org/HowDoI/ChooseApplicationID\nset(APPLICATION_ID \"cn.flutter.dio_flutter_example\")\n\n# Explicitly opt in to modern CMake behaviors to avoid warnings with recent\n# versions of CMake.\ncmake_policy(SET CMP0063 NEW)\n\n# Load bundled libraries from the lib/ directory relative to the binary.\nset(CMAKE_INSTALL_RPATH \"$ORIGIN/lib\")\n\n# Root filesystem for cross-building.\nif(FLUTTER_TARGET_PLATFORM_SYSROOT)\n  set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})\n  set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})\n  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n  set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)\n  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\nendif()\n\n# Define build configuration options.\nif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n  set(CMAKE_BUILD_TYPE \"Debug\" CACHE\n    STRING \"Flutter build mode\" FORCE)\n  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS\n    \"Debug\" \"Profile\" \"Release\")\nendif()\n\n# Compilation settings that should be applied to most targets.\n#\n# Be cautious about adding new options here, as plugins use this function by\n# default. In most cases, you should add new options to specific targets instead\n# of modifying this function.\nfunction(APPLY_STANDARD_SETTINGS TARGET)\n  target_compile_features(${TARGET} PUBLIC cxx_std_14)\n  target_compile_options(${TARGET} PRIVATE -Wall -Werror)\n  target_compile_options(${TARGET} PRIVATE \"$<$<NOT:$<CONFIG:Debug>>:-O3>\")\n  target_compile_definitions(${TARGET} PRIVATE \"$<$<NOT:$<CONFIG:Debug>>:NDEBUG>\")\nendfunction()\n\n# Flutter library and tool build rules.\nset(FLUTTER_MANAGED_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/flutter\")\nadd_subdirectory(${FLUTTER_MANAGED_DIR})\n\n# System-level dependencies.\nfind_package(PkgConfig REQUIRED)\npkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)\n\n# Application build; see runner/CMakeLists.txt.\nadd_subdirectory(\"runner\")\n\n# Run the Flutter tool portions of the build. This must not be removed.\nadd_dependencies(${BINARY_NAME} flutter_assemble)\n\n# Only the install-generated bundle's copy of the executable will launch\n# correctly, since the resources must in the right relative locations. To avoid\n# people trying to run the unbundled copy, put it in a subdirectory instead of\n# the default top-level location.\nset_target_properties(${BINARY_NAME}\n  PROPERTIES\n  RUNTIME_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/intermediates_do_not_run\"\n)\n\n\n# Generated plugin build rules, which manage building the plugins and adding\n# them to the application.\ninclude(flutter/generated_plugins.cmake)\n\n\n# === Installation ===\n# By default, \"installing\" just makes a relocatable bundle in the build\n# directory.\nset(BUILD_BUNDLE_DIR \"${PROJECT_BINARY_DIR}/bundle\")\nif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)\n  set(CMAKE_INSTALL_PREFIX \"${BUILD_BUNDLE_DIR}\" CACHE PATH \"...\" FORCE)\nendif()\n\n# Start with a clean build bundle directory every time.\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${BUILD_BUNDLE_DIR}/\\\")\n  \" COMPONENT Runtime)\n\nset(INSTALL_BUNDLE_DATA_DIR \"${CMAKE_INSTALL_PREFIX}/data\")\nset(INSTALL_BUNDLE_LIB_DIR \"${CMAKE_INSTALL_PREFIX}/lib\")\n\ninstall(TARGETS ${BINARY_NAME} RUNTIME DESTINATION \"${CMAKE_INSTALL_PREFIX}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_ICU_DATA_FILE}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\nforeach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})\n  install(FILES \"${bundled_library}\"\n    DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendforeach(bundled_library)\n\n# Copy the native assets provided by the build.dart from all packages.\nset(NATIVE_ASSETS_DIR \"${PROJECT_BUILD_DIR}native_assets/linux/\")\ninstall(DIRECTORY \"${NATIVE_ASSETS_DIR}\"\n   DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n   COMPONENT Runtime)\n\n# Fully re-copy the assets directory on each build to avoid having stale files\n# from a previous install.\nset(FLUTTER_ASSET_DIR_NAME \"flutter_assets\")\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\\\")\n  \" COMPONENT Runtime)\ninstall(DIRECTORY \"${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}\"\n  DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\" COMPONENT Runtime)\n\n# Install the AOT library on non-Debug builds only.\nif(NOT CMAKE_BUILD_TYPE MATCHES \"Debug\")\n  install(FILES \"${AOT_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendif()\n"
  },
  {
    "path": "example_flutter_app/linux/flutter/CMakeLists.txt",
    "content": "# This file controls Flutter-level build steps. It should not be edited.\ncmake_minimum_required(VERSION 3.10)\n\nset(EPHEMERAL_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/ephemeral\")\n\n# Configuration provided via flutter tool.\ninclude(${EPHEMERAL_DIR}/generated_config.cmake)\n\n# TODO: Move the rest of this into files in ephemeral. See\n# https://github.com/flutter/flutter/issues/57146.\n\n# Serves the same purpose as list(TRANSFORM ... PREPEND ...),\n# which isn't available in 3.10.\nfunction(list_prepend LIST_NAME PREFIX)\n    set(NEW_LIST \"\")\n    foreach(element ${${LIST_NAME}})\n        list(APPEND NEW_LIST \"${PREFIX}${element}\")\n    endforeach(element)\n    set(${LIST_NAME} \"${NEW_LIST}\" PARENT_SCOPE)\nendfunction()\n\n# === Flutter Library ===\n# System-level dependencies.\nfind_package(PkgConfig REQUIRED)\npkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)\npkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)\npkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)\n\nset(FLUTTER_LIBRARY \"${EPHEMERAL_DIR}/libflutter_linux_gtk.so\")\n\n# Published to parent scope for install step.\nset(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)\nset(FLUTTER_ICU_DATA_FILE \"${EPHEMERAL_DIR}/icudtl.dat\" PARENT_SCOPE)\nset(PROJECT_BUILD_DIR \"${PROJECT_DIR}/build/\" PARENT_SCOPE)\nset(AOT_LIBRARY \"${PROJECT_DIR}/build/lib/libapp.so\" PARENT_SCOPE)\n\nlist(APPEND FLUTTER_LIBRARY_HEADERS\n  \"fl_basic_message_channel.h\"\n  \"fl_binary_codec.h\"\n  \"fl_binary_messenger.h\"\n  \"fl_dart_project.h\"\n  \"fl_engine.h\"\n  \"fl_json_message_codec.h\"\n  \"fl_json_method_codec.h\"\n  \"fl_message_codec.h\"\n  \"fl_method_call.h\"\n  \"fl_method_channel.h\"\n  \"fl_method_codec.h\"\n  \"fl_method_response.h\"\n  \"fl_plugin_registrar.h\"\n  \"fl_plugin_registry.h\"\n  \"fl_standard_message_codec.h\"\n  \"fl_standard_method_codec.h\"\n  \"fl_string_codec.h\"\n  \"fl_value.h\"\n  \"fl_view.h\"\n  \"flutter_linux.h\"\n)\nlist_prepend(FLUTTER_LIBRARY_HEADERS \"${EPHEMERAL_DIR}/flutter_linux/\")\nadd_library(flutter INTERFACE)\ntarget_include_directories(flutter INTERFACE\n  \"${EPHEMERAL_DIR}\"\n)\ntarget_link_libraries(flutter INTERFACE \"${FLUTTER_LIBRARY}\")\ntarget_link_libraries(flutter INTERFACE\n  PkgConfig::GTK\n  PkgConfig::GLIB\n  PkgConfig::GIO\n)\nadd_dependencies(flutter flutter_assemble)\n\n# === Flutter tool backend ===\n# _phony_ is a non-existent file to force this command to run every time,\n# since currently there's no way to get a full input/output list from the\n# flutter tool.\nadd_custom_command(\n  OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}\n    ${CMAKE_CURRENT_BINARY_DIR}/_phony_\n  COMMAND ${CMAKE_COMMAND} -E env\n    ${FLUTTER_TOOL_ENVIRONMENT}\n    \"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh\"\n      ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}\n  VERBATIM\n)\nadd_custom_target(flutter_assemble DEPENDS\n  \"${FLUTTER_LIBRARY}\"\n  ${FLUTTER_LIBRARY_HEADERS}\n)\n"
  },
  {
    "path": "example_flutter_app/linux/flutter/generated_plugin_registrant.cc",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#include \"generated_plugin_registrant.h\"\n\n\nvoid fl_register_plugins(FlPluginRegistry* registry) {\n}\n"
  },
  {
    "path": "example_flutter_app/linux/flutter/generated_plugin_registrant.h",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#ifndef GENERATED_PLUGIN_REGISTRANT_\n#define GENERATED_PLUGIN_REGISTRANT_\n\n#include <flutter_linux/flutter_linux.h>\n\n// Registers Flutter plugins.\nvoid fl_register_plugins(FlPluginRegistry* registry);\n\n#endif  // GENERATED_PLUGIN_REGISTRANT_\n"
  },
  {
    "path": "example_flutter_app/linux/flutter/generated_plugins.cmake",
    "content": "#\n# Generated file, do not edit.\n#\n\nlist(APPEND FLUTTER_PLUGIN_LIST\n)\n\nlist(APPEND FLUTTER_FFI_PLUGIN_LIST\n)\n\nset(PLUGIN_BUNDLED_LIBRARIES)\n\nforeach(plugin ${FLUTTER_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})\n  target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})\nendforeach(plugin)\n\nforeach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})\nendforeach(ffi_plugin)\n"
  },
  {
    "path": "example_flutter_app/linux/runner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.13)\nproject(runner LANGUAGES CXX)\n\n# Define the application target. To change its name, change BINARY_NAME in the\n# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer\n# work.\n#\n# Any new source files that you add to the application should be added here.\nadd_executable(${BINARY_NAME}\n  \"main.cc\"\n  \"my_application.cc\"\n  \"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc\"\n)\n\n# Apply the standard set of build settings. This can be removed for applications\n# that need different build settings.\napply_standard_settings(${BINARY_NAME})\n\n# Add preprocessor definitions for the application ID.\nadd_definitions(-DAPPLICATION_ID=\"${APPLICATION_ID}\")\n\n# Add dependency libraries. Add any application-specific dependencies here.\ntarget_link_libraries(${BINARY_NAME} PRIVATE flutter)\ntarget_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)\n\ntarget_include_directories(${BINARY_NAME} PRIVATE \"${CMAKE_SOURCE_DIR}\")\n"
  },
  {
    "path": "example_flutter_app/linux/runner/main.cc",
    "content": "#include \"my_application.h\"\n\nint main(int argc, char** argv) {\n  g_autoptr(MyApplication) app = my_application_new();\n  return g_application_run(G_APPLICATION(app), argc, argv);\n}\n"
  },
  {
    "path": "example_flutter_app/linux/runner/my_application.cc",
    "content": "#include \"my_application.h\"\n\n#include <flutter_linux/flutter_linux.h>\n#ifdef GDK_WINDOWING_X11\n#include <gdk/gdkx.h>\n#endif\n\n#include \"flutter/generated_plugin_registrant.h\"\n\nstruct _MyApplication {\n  GtkApplication parent_instance;\n  char** dart_entrypoint_arguments;\n};\n\nG_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)\n\n// Implements GApplication::activate.\nstatic void my_application_activate(GApplication* application) {\n  MyApplication* self = MY_APPLICATION(application);\n  GtkWindow* window =\n      GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));\n\n  // Use a header bar when running in GNOME as this is the common style used\n  // by applications and is the setup most users will be using (e.g. Ubuntu\n  // desktop).\n  // If running on X and not using GNOME then just use a traditional title bar\n  // in case the window manager does more exotic layout, e.g. tiling.\n  // If running on Wayland assume the header bar will work (may need changing\n  // if future cases occur).\n  gboolean use_header_bar = TRUE;\n#ifdef GDK_WINDOWING_X11\n  GdkScreen* screen = gtk_window_get_screen(window);\n  if (GDK_IS_X11_SCREEN(screen)) {\n    const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);\n    if (g_strcmp0(wm_name, \"GNOME Shell\") != 0) {\n      use_header_bar = FALSE;\n    }\n  }\n#endif\n  if (use_header_bar) {\n    GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());\n    gtk_widget_show(GTK_WIDGET(header_bar));\n    gtk_header_bar_set_title(header_bar, \"dio_flutter_example\");\n    gtk_header_bar_set_show_close_button(header_bar, TRUE);\n    gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));\n  } else {\n    gtk_window_set_title(window, \"dio_flutter_example\");\n  }\n\n  gtk_window_set_default_size(window, 1280, 720);\n  gtk_widget_show(GTK_WIDGET(window));\n\n  g_autoptr(FlDartProject) project = fl_dart_project_new();\n  fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);\n\n  FlView* view = fl_view_new(project);\n  gtk_widget_show(GTK_WIDGET(view));\n  gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));\n\n  fl_register_plugins(FL_PLUGIN_REGISTRY(view));\n\n  gtk_widget_grab_focus(GTK_WIDGET(view));\n}\n\n// Implements GApplication::local_command_line.\nstatic gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {\n  MyApplication* self = MY_APPLICATION(application);\n  // Strip out the first argument as it is the binary name.\n  self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);\n\n  g_autoptr(GError) error = nullptr;\n  if (!g_application_register(application, nullptr, &error)) {\n     g_warning(\"Failed to register: %s\", error->message);\n     *exit_status = 1;\n     return TRUE;\n  }\n\n  g_application_activate(application);\n  *exit_status = 0;\n\n  return TRUE;\n}\n\n// Implements GApplication::startup.\nstatic void my_application_startup(GApplication* application) {\n  //MyApplication* self = MY_APPLICATION(object);\n\n  // Perform any actions required at application startup.\n\n  G_APPLICATION_CLASS(my_application_parent_class)->startup(application);\n}\n\n// Implements GApplication::shutdown.\nstatic void my_application_shutdown(GApplication* application) {\n  //MyApplication* self = MY_APPLICATION(object);\n\n  // Perform any actions required at application shutdown.\n\n  G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application);\n}\n\n// Implements GObject::dispose.\nstatic void my_application_dispose(GObject* object) {\n  MyApplication* self = MY_APPLICATION(object);\n  g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);\n  G_OBJECT_CLASS(my_application_parent_class)->dispose(object);\n}\n\nstatic void my_application_class_init(MyApplicationClass* klass) {\n  G_APPLICATION_CLASS(klass)->activate = my_application_activate;\n  G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;\n  G_APPLICATION_CLASS(klass)->startup = my_application_startup;\n  G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown;\n  G_OBJECT_CLASS(klass)->dispose = my_application_dispose;\n}\n\nstatic void my_application_init(MyApplication* self) {}\n\nMyApplication* my_application_new() {\n  // Set the program name to the application ID, which helps various systems\n  // like GTK and desktop environments map this running application to its\n  // corresponding .desktop file. This ensures better integration by allowing\n  // the application to be recognized beyond its binary name.\n  g_set_prgname(APPLICATION_ID);\n\n  return MY_APPLICATION(g_object_new(my_application_get_type(),\n                                     \"application-id\", APPLICATION_ID,\n                                     \"flags\", G_APPLICATION_NON_UNIQUE,\n                                     nullptr));\n}\n"
  },
  {
    "path": "example_flutter_app/linux/runner/my_application.h",
    "content": "#ifndef FLUTTER_MY_APPLICATION_H_\n#define FLUTTER_MY_APPLICATION_H_\n\n#include <gtk/gtk.h>\n\nG_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,\n                     GtkApplication)\n\n/**\n * my_application_new:\n *\n * Creates a new Flutter-based application.\n *\n * Returns: a new #MyApplication.\n */\nMyApplication* my_application_new();\n\n#endif  // FLUTTER_MY_APPLICATION_H_\n"
  },
  {
    "path": "example_flutter_app/macos/.gitignore",
    "content": "# Flutter-related\n**/Flutter/ephemeral/\n**/Pods/\n\n# Xcode-related\n**/dgph\n**/xcuserdata/\n"
  },
  {
    "path": "example_flutter_app/macos/Flutter/Flutter-Debug.xcconfig",
    "content": "#include \"ephemeral/Flutter-Generated.xcconfig\"\n"
  },
  {
    "path": "example_flutter_app/macos/Flutter/Flutter-Release.xcconfig",
    "content": "#include \"ephemeral/Flutter-Generated.xcconfig\"\n"
  },
  {
    "path": "example_flutter_app/macos/Flutter/GeneratedPluginRegistrant.swift",
    "content": "//\n//  Generated file. Do not edit.\n//\n\nimport FlutterMacOS\nimport Foundation\n\n\nfunc RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {\n}\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/AppDelegate.swift",
    "content": "import Cocoa\nimport FlutterMacOS\n\n@main\nclass AppDelegate: FlutterAppDelegate {\n  override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {\n    return true\n  }\n\n  override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {\n    return true\n  }\n}\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"16x16\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_16.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"16x16\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_32.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"32x32\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_32.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"32x32\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_64.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"128x128\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_128.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"128x128\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_256.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"256x256\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_256.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"256x256\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_512.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"512x512\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_512.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"512x512\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_1024.png\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/Base.lproj/MainMenu.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"14490.70\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"14490.70\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"NSApplication\">\n            <connections>\n                <outlet property=\"delegate\" destination=\"Voe-Tx-rLC\" id=\"GzC-gU-4Uq\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customObject id=\"Voe-Tx-rLC\" customClass=\"AppDelegate\" customModule=\"Runner\" customModuleProvider=\"target\">\n            <connections>\n                <outlet property=\"applicationMenu\" destination=\"uQy-DD-JDr\" id=\"XBo-yE-nKs\"/>\n                <outlet property=\"mainFlutterWindow\" destination=\"QvC-M9-y7g\" id=\"gIp-Ho-8D9\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"YLy-65-1bz\" customClass=\"NSFontManager\"/>\n        <menu title=\"Main Menu\" systemMenu=\"main\" id=\"AYu-sK-qS6\">\n            <items>\n                <menuItem title=\"APP_NAME\" id=\"1Xt-HY-uBw\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"APP_NAME\" systemMenu=\"apple\" id=\"uQy-DD-JDr\">\n                        <items>\n                            <menuItem title=\"About APP_NAME\" id=\"5kV-Vb-QxS\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"orderFrontStandardAboutPanel:\" target=\"-1\" id=\"Exp-CZ-Vem\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"VOq-y0-SEH\"/>\n                            <menuItem title=\"Preferences…\" keyEquivalent=\",\" id=\"BOF-NM-1cW\"/>\n                            <menuItem isSeparatorItem=\"YES\" id=\"wFC-TO-SCJ\"/>\n                            <menuItem title=\"Services\" id=\"NMo-om-nkz\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Services\" systemMenu=\"services\" id=\"hz9-B4-Xy5\"/>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"4je-JR-u6R\"/>\n                            <menuItem title=\"Hide APP_NAME\" keyEquivalent=\"h\" id=\"Olw-nP-bQN\">\n                                <connections>\n                                    <action selector=\"hide:\" target=\"-1\" id=\"PnN-Uc-m68\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Hide Others\" keyEquivalent=\"h\" id=\"Vdr-fp-XzO\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"hideOtherApplications:\" target=\"-1\" id=\"VT4-aY-XCT\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Show All\" id=\"Kd2-mp-pUS\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"unhideAllApplications:\" target=\"-1\" id=\"Dhg-Le-xox\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"kCx-OE-vgT\"/>\n                            <menuItem title=\"Quit APP_NAME\" keyEquivalent=\"q\" id=\"4sb-4s-VLi\">\n                                <connections>\n                                    <action selector=\"terminate:\" target=\"-1\" id=\"Te7-pn-YzF\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Edit\" id=\"5QF-Oa-p0T\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Edit\" id=\"W48-6f-4Dl\">\n                        <items>\n                            <menuItem title=\"Undo\" keyEquivalent=\"z\" id=\"dRJ-4n-Yzg\">\n                                <connections>\n                                    <action selector=\"undo:\" target=\"-1\" id=\"M6e-cu-g7V\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Redo\" keyEquivalent=\"Z\" id=\"6dh-zS-Vam\">\n                                <connections>\n                                    <action selector=\"redo:\" target=\"-1\" id=\"oIA-Rs-6OD\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"WRV-NI-Exz\"/>\n                            <menuItem title=\"Cut\" keyEquivalent=\"x\" id=\"uRl-iY-unG\">\n                                <connections>\n                                    <action selector=\"cut:\" target=\"-1\" id=\"YJe-68-I9s\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Copy\" keyEquivalent=\"c\" id=\"x3v-GG-iWU\">\n                                <connections>\n                                    <action selector=\"copy:\" target=\"-1\" id=\"G1f-GL-Joy\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Paste\" keyEquivalent=\"v\" id=\"gVA-U4-sdL\">\n                                <connections>\n                                    <action selector=\"paste:\" target=\"-1\" id=\"UvS-8e-Qdg\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Paste and Match Style\" keyEquivalent=\"V\" id=\"WeT-3V-zwk\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"pasteAsPlainText:\" target=\"-1\" id=\"cEh-KX-wJQ\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Delete\" id=\"pa3-QI-u2k\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"delete:\" target=\"-1\" id=\"0Mk-Ml-PaM\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Select All\" keyEquivalent=\"a\" id=\"Ruw-6m-B2m\">\n                                <connections>\n                                    <action selector=\"selectAll:\" target=\"-1\" id=\"VNm-Mi-diN\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"uyl-h8-XO2\"/>\n                            <menuItem title=\"Find\" id=\"4EN-yA-p0u\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Find\" id=\"1b7-l0-nxx\">\n                                    <items>\n                                        <menuItem title=\"Find…\" tag=\"1\" keyEquivalent=\"f\" id=\"Xz5-n4-O0W\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"cD7-Qs-BN4\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find and Replace…\" tag=\"12\" keyEquivalent=\"f\" id=\"YEy-JH-Tfz\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"WD3-Gg-5AJ\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find Next\" tag=\"2\" keyEquivalent=\"g\" id=\"q09-fT-Sye\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"NDo-RZ-v9R\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find Previous\" tag=\"3\" keyEquivalent=\"G\" id=\"OwM-mh-QMV\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"HOh-sY-3ay\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Use Selection for Find\" tag=\"7\" keyEquivalent=\"e\" id=\"buJ-ug-pKt\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"U76-nv-p5D\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Jump to Selection\" keyEquivalent=\"j\" id=\"S0p-oC-mLd\">\n                                            <connections>\n                                                <action selector=\"centerSelectionInVisibleArea:\" target=\"-1\" id=\"IOG-6D-g5B\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Spelling and Grammar\" id=\"Dv1-io-Yv7\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Spelling\" id=\"3IN-sU-3Bg\">\n                                    <items>\n                                        <menuItem title=\"Show Spelling and Grammar\" keyEquivalent=\":\" id=\"HFo-cy-zxI\">\n                                            <connections>\n                                                <action selector=\"showGuessPanel:\" target=\"-1\" id=\"vFj-Ks-hy3\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Document Now\" keyEquivalent=\";\" id=\"hz2-CU-CR7\">\n                                            <connections>\n                                                <action selector=\"checkSpelling:\" target=\"-1\" id=\"fz7-VC-reM\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"bNw-od-mp5\"/>\n                                        <menuItem title=\"Check Spelling While Typing\" id=\"rbD-Rh-wIN\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleContinuousSpellChecking:\" target=\"-1\" id=\"7w6-Qz-0kB\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Grammar With Spelling\" id=\"mK6-2p-4JG\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleGrammarChecking:\" target=\"-1\" id=\"muD-Qn-j4w\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Correct Spelling Automatically\" id=\"78Y-hA-62v\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticSpellingCorrection:\" target=\"-1\" id=\"2lM-Qi-WAP\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Substitutions\" id=\"9ic-FL-obx\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Substitutions\" id=\"FeM-D8-WVr\">\n                                    <items>\n                                        <menuItem title=\"Show Substitutions\" id=\"z6F-FW-3nz\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"orderFrontSubstitutionsPanel:\" target=\"-1\" id=\"oku-mr-iSq\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"gPx-C9-uUO\"/>\n                                        <menuItem title=\"Smart Copy/Paste\" id=\"9yt-4B-nSM\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleSmartInsertDelete:\" target=\"-1\" id=\"3IJ-Se-DZD\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Quotes\" id=\"hQb-2v-fYv\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticQuoteSubstitution:\" target=\"-1\" id=\"ptq-xd-QOA\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Dashes\" id=\"rgM-f4-ycn\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticDashSubstitution:\" target=\"-1\" id=\"oCt-pO-9gS\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Links\" id=\"cwL-P1-jid\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticLinkDetection:\" target=\"-1\" id=\"Gip-E3-Fov\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Data Detectors\" id=\"tRr-pd-1PS\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticDataDetection:\" target=\"-1\" id=\"R1I-Nq-Kbl\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Text Replacement\" id=\"HFQ-gK-NFA\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticTextReplacement:\" target=\"-1\" id=\"DvP-Fe-Py6\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Transformations\" id=\"2oI-Rn-ZJC\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Transformations\" id=\"c8a-y6-VQd\">\n                                    <items>\n                                        <menuItem title=\"Make Upper Case\" id=\"vmV-6d-7jI\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"uppercaseWord:\" target=\"-1\" id=\"sPh-Tk-edu\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Make Lower Case\" id=\"d9M-CD-aMd\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"lowercaseWord:\" target=\"-1\" id=\"iUZ-b5-hil\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Capitalize\" id=\"UEZ-Bs-lqG\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"capitalizeWord:\" target=\"-1\" id=\"26H-TL-nsh\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Speech\" id=\"xrE-MZ-jX0\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Speech\" id=\"3rS-ZA-NoH\">\n                                    <items>\n                                        <menuItem title=\"Start Speaking\" id=\"Ynk-f8-cLZ\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"startSpeaking:\" target=\"-1\" id=\"654-Ng-kyl\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Stop Speaking\" id=\"Oyz-dy-DGm\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"stopSpeaking:\" target=\"-1\" id=\"dX8-6p-jy9\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"View\" id=\"H8h-7b-M4v\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"View\" id=\"HyV-fh-RgO\">\n                        <items>\n                            <menuItem title=\"Enter Full Screen\" keyEquivalent=\"f\" id=\"4J7-dP-txa\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" control=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"toggleFullScreen:\" target=\"-1\" id=\"dU3-MA-1Rq\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Window\" id=\"aUF-d1-5bR\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Window\" systemMenu=\"window\" id=\"Td7-aD-5lo\">\n                        <items>\n                            <menuItem title=\"Minimize\" keyEquivalent=\"m\" id=\"OY7-WF-poV\">\n                                <connections>\n                                    <action selector=\"performMiniaturize:\" target=\"-1\" id=\"VwT-WD-YPe\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Zoom\" id=\"R4o-n2-Eq4\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"performZoom:\" target=\"-1\" id=\"DIl-cC-cCs\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"eu3-7i-yIM\"/>\n                            <menuItem title=\"Bring All to Front\" id=\"LE2-aR-0XJ\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"arrangeInFront:\" target=\"-1\" id=\"DRN-fu-gQh\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Help\" id=\"EPT-qC-fAb\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Help\" systemMenu=\"help\" id=\"rJ0-wn-3NY\"/>\n                </menuItem>\n            </items>\n            <point key=\"canvasLocation\" x=\"142\" y=\"-258\"/>\n        </menu>\n        <window title=\"APP_NAME\" allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" releasedWhenClosed=\"NO\" animationBehavior=\"default\" id=\"QvC-M9-y7g\" customClass=\"MainFlutterWindow\" customModule=\"Runner\" customModuleProvider=\"target\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <rect key=\"contentRect\" x=\"335\" y=\"390\" width=\"800\" height=\"600\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"2560\" height=\"1577\"/>\n            <view key=\"contentView\" wantsLayer=\"YES\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"800\" height=\"600\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n            </view>\n        </window>\n    </objects>\n</document>\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/Configs/AppInfo.xcconfig",
    "content": "// Application-level settings for the Runner target.\n//\n// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the\n// future. If not, the values below would default to using the project name when this becomes a\n// 'flutter create' template.\n\n// The application's name. By default this is also the title of the Flutter window.\nPRODUCT_NAME = dio_flutter_example\n\n// The application's bundle identifier\nPRODUCT_BUNDLE_IDENTIFIER = cn.flutter.dioFlutterExample\n\n// The copyright displayed in application information\nPRODUCT_COPYRIGHT = Copyright © 2024 cn.flutter. All rights reserved.\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/Configs/Debug.xcconfig",
    "content": "#include \"../../Flutter/Flutter-Debug.xcconfig\"\n#include \"Warnings.xcconfig\"\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/Configs/Release.xcconfig",
    "content": "#include \"../../Flutter/Flutter-Release.xcconfig\"\n#include \"Warnings.xcconfig\"\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/Configs/Warnings.xcconfig",
    "content": "WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings\nGCC_WARN_UNDECLARED_SELECTOR = YES\nCLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES\nCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE\nCLANG_WARN__DUPLICATE_METHOD_MATCH = YES\nCLANG_WARN_PRAGMA_PACK = YES\nCLANG_WARN_STRICT_PROTOTYPES = YES\nCLANG_WARN_COMMA = YES\nGCC_WARN_STRICT_SELECTOR_MATCH = YES\nCLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES\nCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES\nGCC_WARN_SHADOW = YES\nCLANG_WARN_UNREACHABLE_CODE = YES\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/DebugProfile.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>com.apple.security.app-sandbox</key>\n\t<true/>\n\t<key>com.apple.security.cs.allow-jit</key>\n\t<true/>\n\t<key>com.apple.security.network.client</key>\n\t<true/>\n\t<key>com.apple.security.network.server</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIconFile</key>\n\t<string></string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>$(FLUTTER_BUILD_NAME)</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(FLUTTER_BUILD_NUMBER)</string>\n\t<key>LSMinimumSystemVersion</key>\n\t<string>$(MACOSX_DEPLOYMENT_TARGET)</string>\n\t<key>NSHumanReadableCopyright</key>\n\t<string>$(PRODUCT_COPYRIGHT)</string>\n\t<key>NSMainNibFile</key>\n\t<string>MainMenu</string>\n\t<key>NSPrincipalClass</key>\n\t<string>NSApplication</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/MainFlutterWindow.swift",
    "content": "import Cocoa\nimport FlutterMacOS\n\nclass MainFlutterWindow: NSWindow {\n  override func awakeFromNib() {\n    let flutterViewController = FlutterViewController()\n    let windowFrame = self.frame\n    self.contentViewController = flutterViewController\n    self.setFrame(windowFrame, display: true)\n\n    RegisterGeneratedPlugins(registry: flutterViewController)\n\n    super.awakeFromNib()\n  }\n}\n"
  },
  {
    "path": "example_flutter_app/macos/Runner/Release.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>com.apple.security.app-sandbox</key>\n\t<true/>\n\t<key>com.apple.security.network.client</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/macos/Runner.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 54;\n\tobjects = {\n\n/* Begin PBXAggregateTarget section */\n\t\t33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {\n\t\t\tisa = PBXAggregateTarget;\n\t\t\tbuildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget \"Flutter Assemble\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t33CC111E2044C6BF0003C045 /* ShellScript */,\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = \"Flutter Assemble\";\n\t\t\tproductName = FLX;\n\t\t};\n/* End PBXAggregateTarget section */\n\n/* Begin PBXBuildFile section */\n\t\t331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };\n\t\t335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };\n\t\t33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };\n\t\t33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };\n\t\t33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };\n\t\t33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 33CC10E52044A3C60003C045 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 33CC10EC2044A3C60003C045;\n\t\t\tremoteInfo = Runner;\n\t\t};\n\t\t33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 33CC10E52044A3C60003C045 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 33CC111A2044C6BA0003C045;\n\t\t\tremoteInfo = FLX;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t33CC110E2044A8840003C045 /* Bundle Framework */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tname = \"Bundle Framework\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = \"<group>\"; };\n\t\t333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = \"<group>\"; };\n\t\t335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = \"<group>\"; };\n\t\t33CC10ED2044A3C60003C045 /* dio_flutter_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"dio_flutter_example.app\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = \"<group>\"; };\n\t\t33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = \"<group>\"; };\n\t\t33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = \"<group>\"; };\n\t\t33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = \"Flutter-Debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = \"Flutter-Release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = \"Flutter-Generated.xcconfig\"; path = \"ephemeral/Flutter-Generated.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = \"<group>\"; };\n\t\t33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = \"<group>\"; };\n\t\t33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = \"<group>\"; };\n\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = \"<group>\"; };\n\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t331C80D2294CF70F00263BE5 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t33CC10EA2044A3C60003C045 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t331C80D6294CF71000263BE5 /* RunnerTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t331C80D7294CF71000263BE5 /* RunnerTests.swift */,\n\t\t\t);\n\t\t\tpath = RunnerTests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33BA886A226E78AF003329D5 /* Configs */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33E5194F232828860026EE4D /* AppInfo.xcconfig */,\n\t\t\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */,\n\t\t\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */,\n\t\t\t\t333000ED22D3DE5D00554162 /* Warnings.xcconfig */,\n\t\t\t);\n\t\t\tpath = Configs;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC10E42044A3C60003C045 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33FAB671232836740065AC1E /* Runner */,\n\t\t\t\t33CEB47122A05771004F2AC0 /* Flutter */,\n\t\t\t\t331C80D6294CF71000263BE5 /* RunnerTests */,\n\t\t\t\t33CC10EE2044A3C60003C045 /* Products */,\n\t\t\t\tD73912EC22F37F3D000D13A0 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC10EE2044A3C60003C045 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10ED2044A3C60003C045 /* dio_flutter_example.app */,\n\t\t\t\t331C80D5294CF71000263BE5 /* RunnerTests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC11242044D66E0003C045 /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F22044A3C60003C045 /* Assets.xcassets */,\n\t\t\t\t33CC10F42044A3C60003C045 /* MainMenu.xib */,\n\t\t\t\t33CC10F72044A3C60003C045 /* Info.plist */,\n\t\t\t);\n\t\t\tname = Resources;\n\t\t\tpath = ..;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CEB47122A05771004F2AC0 /* Flutter */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,\n\t\t\t\t33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,\n\t\t\t\t33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,\n\t\t\t\t33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,\n\t\t\t);\n\t\t\tpath = Flutter;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33FAB671232836740065AC1E /* Runner */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F02044A3C60003C045 /* AppDelegate.swift */,\n\t\t\t\t33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,\n\t\t\t\t33E51913231747F40026EE4D /* DebugProfile.entitlements */,\n\t\t\t\t33E51914231749380026EE4D /* Release.entitlements */,\n\t\t\t\t33CC11242044D66E0003C045 /* Resources */,\n\t\t\t\t33BA886A226E78AF003329D5 /* Configs */,\n\t\t\t);\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tD73912EC22F37F3D000D13A0 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t331C80D4294CF70F00263BE5 /* RunnerTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget \"RunnerTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t331C80D1294CF70F00263BE5 /* Sources */,\n\t\t\t\t331C80D2294CF70F00263BE5 /* Frameworks */,\n\t\t\t\t331C80D3294CF70F00263BE5 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t331C80DA294CF71000263BE5 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = RunnerTests;\n\t\t\tproductName = RunnerTests;\n\t\t\tproductReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n\t\t33CC10EC2044A3C60003C045 /* Runner */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget \"Runner\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t33CC10E92044A3C60003C045 /* Sources */,\n\t\t\t\t33CC10EA2044A3C60003C045 /* Frameworks */,\n\t\t\t\t33CC10EB2044A3C60003C045 /* Resources */,\n\t\t\t\t33CC110E2044A8840003C045 /* Bundle Framework */,\n\t\t\t\t3399D490228B24CF009A79C7 /* ShellScript */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t33CC11202044C79F0003C045 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = Runner;\n\t\t\tproductName = Runner;\n\t\t\tproductReference = 33CC10ED2044A3C60003C045 /* dio_flutter_example.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t33CC10E52044A3C60003C045 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = YES;\n\t\t\t\tLastSwiftUpdateCheck = 0920;\n\t\t\t\tLastUpgradeCheck = 1510;\n\t\t\t\tORGANIZATIONNAME = \"\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t331C80D4294CF70F00263BE5 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 14.0;\n\t\t\t\t\t\tTestTargetID = 33CC10EC2044A3C60003C045;\n\t\t\t\t\t};\n\t\t\t\t\t33CC10EC2044A3C60003C045 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t\tSystemCapabilities = {\n\t\t\t\t\t\t\tcom.apple.Sandbox = {\n\t\t\t\t\t\t\t\tenabled = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\t33CC111A2044C6BA0003C045 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tProvisioningStyle = Manual;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject \"Runner\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 33CC10E42044A3C60003C045;\n\t\t\tproductRefGroup = 33CC10EE2044A3C60003C045 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t33CC10EC2044A3C60003C045 /* Runner */,\n\t\t\t\t331C80D4294CF70F00263BE5 /* RunnerTests */,\n\t\t\t\t33CC111A2044C6BA0003C045 /* Flutter Assemble */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t331C80D3294CF70F00263BE5 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t33CC10EB2044A3C60003C045 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,\n\t\t\t\t33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t3399D490228B24CF009A79C7 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\talwaysOutOfDate = 1;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"echo \\\"$PRODUCT_NAME.app\\\" > \\\"$PROJECT_DIR\\\"/Flutter/ephemeral/.app_filename && \\\"$FLUTTER_ROOT\\\"/packages/flutter_tools/bin/macos_assemble.sh embed\\n\";\n\t\t};\n\t\t33CC111E2044C6BF0003C045 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t\tFlutter/ephemeral/FlutterInputs.xcfilelist,\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\tFlutter/ephemeral/tripwire,\n\t\t\t);\n\t\t\toutputFileListPaths = (\n\t\t\t\tFlutter/ephemeral/FlutterOutputs.xcfilelist,\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"$FLUTTER_ROOT\\\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire\";\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t331C80D1294CF70F00263BE5 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t33CC10E92044A3C60003C045 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,\n\t\t\t\t33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,\n\t\t\t\t335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t331C80DA294CF71000263BE5 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 33CC10EC2044A3C60003C045 /* Runner */;\n\t\t\ttargetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */;\n\t\t};\n\t\t33CC11202044C79F0003C045 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;\n\t\t\ttargetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin PBXVariantGroup section */\n\t\t33CC10F42044A3C60003C045 /* MainMenu.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F52044A3C60003C045 /* Base */,\n\t\t\t);\n\t\t\tname = MainMenu.xib;\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t331C80DB294CF71000263BE5 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = cn.flutter.dioFlutterExample.RunnerTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/dio_flutter_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dio_flutter_example\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t331C80DC294CF71000263BE5 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = cn.flutter.dioFlutterExample.RunnerTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/dio_flutter_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dio_flutter_example\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t331C80DD294CF71000263BE5 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = cn.flutter.dioFlutterExample.RunnerTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/dio_flutter_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/dio_flutter_example\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t338D0CE9231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.14;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t338D0CEA231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t338D0CEB231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t33CC10F92044A3C60003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.14;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC10FA2044A3C60003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.14;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t33CC10FC2044A3C60003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC10FD2044A3C60003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t33CC111C2044C6BA0003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC111D2044C6BA0003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget \"RunnerTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t331C80DB294CF71000263BE5 /* Debug */,\n\t\t\t\t331C80DC294CF71000263BE5 /* Release */,\n\t\t\t\t331C80DD294CF71000263BE5 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t33CC10E82044A3C60003C045 /* Build configuration list for PBXProject \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC10F92044A3C60003C045 /* Debug */,\n\t\t\t\t33CC10FA2044A3C60003C045 /* Release */,\n\t\t\t\t338D0CE9231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC10FC2044A3C60003C045 /* Debug */,\n\t\t\t\t33CC10FD2044A3C60003C045 /* Release */,\n\t\t\t\t338D0CEA231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget \"Flutter Assemble\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC111C2044C6BA0003C045 /* Debug */,\n\t\t\t\t33CC111D2044C6BA0003C045 /* Release */,\n\t\t\t\t338D0CEB231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 33CC10E52044A3C60003C045 /* Project object */;\n}\n"
  },
  {
    "path": "example_flutter_app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1510\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n               BuildableName = \"dio_flutter_example.app\"\n               BlueprintName = \"Runner\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"dio_flutter_example.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <Testables>\n         <TestableReference\n            skipped = \"NO\"\n            parallelizable = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"331C80D4294CF70F00263BE5\"\n               BuildableName = \"RunnerTests.xctest\"\n               BlueprintName = \"RunnerTests\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </TestableReference>\n      </Testables>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      enableGPUValidationMode = \"1\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"dio_flutter_example.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Profile\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"dio_flutter_example.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "example_flutter_app/macos/Runner.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:Runner.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "example_flutter_app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example_flutter_app/macos/RunnerTests/RunnerTests.swift",
    "content": "import Cocoa\nimport FlutterMacOS\nimport XCTest\n\nclass RunnerTests: XCTestCase {\n\n  func testExample() {\n    // If you add code to the Runner application, consider adding tests here.\n    // See https://developer.apple.com/documentation/xctest for more information about using XCTest.\n  }\n\n}\n"
  },
  {
    "path": "example_flutter_app/pubspec.yaml",
    "content": "name: dio_flutter_example\ndescription:  Demonstrates how to use the dio package.\npublish_to: 'none'\n\nenvironment:\n  sdk: \">=2.18.0 <4.0.0\"\n\ndependencies:\n  flutter:\n    sdk: flutter\n  dio:\n    path: ../dio\n\ndev_dependencies:\n  lints: any\n\nflutter:\n  uses-material-design: true\n"
  },
  {
    "path": "example_flutter_app/web/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n  <!--\n    If you are serving your web app in a path other than the root, change the\n    href value below to reflect the base path you are serving from.\n\n    The path provided below has to start and end with a slash \"/\" in order for\n    it to work correctly.\n\n    For more details:\n    * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base\n\n    This is a placeholder for base href that will be replaced by the value of\n    the `--base-href` argument provided to `flutter build`.\n  -->\n  <base href=\"$FLUTTER_BASE_HREF\">\n\n  <meta charset=\"UTF-8\">\n  <meta content=\"IE=Edge\" http-equiv=\"X-UA-Compatible\">\n  <meta name=\"description\" content=\"A new Flutter project.\">\n\n  <!-- iOS meta tags & icons -->\n  <meta name=\"mobile-web-app-capable\" content=\"yes\">\n  <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\n  <meta name=\"apple-mobile-web-app-title\" content=\"dio_flutter_example\">\n  <link rel=\"apple-touch-icon\" href=\"icons/Icon-192.png\">\n\n  <!-- Favicon -->\n  <link rel=\"icon\" type=\"image/png\" href=\"favicon.png\"/>\n\n  <title>dio_flutter_example</title>\n  <link rel=\"manifest\" href=\"manifest.json\">\n</head>\n<body>\n  <script src=\"flutter_bootstrap.js\" async></script>\n</body>\n</html>\n"
  },
  {
    "path": "example_flutter_app/web/manifest.json",
    "content": "{\n    \"name\": \"dio_flutter_example\",\n    \"short_name\": \"dio_flutter_example\",\n    \"start_url\": \".\",\n    \"display\": \"standalone\",\n    \"background_color\": \"#0175C2\",\n    \"theme_color\": \"#0175C2\",\n    \"description\": \"A new Flutter project.\",\n    \"orientation\": \"portrait-primary\",\n    \"prefer_related_applications\": false,\n    \"icons\": [\n        {\n            \"src\": \"icons/Icon-192.png\",\n            \"sizes\": \"192x192\",\n            \"type\": \"image/png\"\n        },\n        {\n            \"src\": \"icons/Icon-512.png\",\n            \"sizes\": \"512x512\",\n            \"type\": \"image/png\"\n        },\n        {\n            \"src\": \"icons/Icon-maskable-192.png\",\n            \"sizes\": \"192x192\",\n            \"type\": \"image/png\",\n            \"purpose\": \"maskable\"\n        },\n        {\n            \"src\": \"icons/Icon-maskable-512.png\",\n            \"sizes\": \"512x512\",\n            \"type\": \"image/png\",\n            \"purpose\": \"maskable\"\n        }\n    ]\n}\n"
  },
  {
    "path": "example_flutter_app/windows/.gitignore",
    "content": "flutter/ephemeral/\n\n# Visual Studio user-specific files.\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# Visual Studio build-related files.\nx64/\nx86/\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n"
  },
  {
    "path": "example_flutter_app/windows/CMakeLists.txt",
    "content": "# Project-level configuration.\ncmake_minimum_required(VERSION 3.14)\nproject(dio_flutter_example LANGUAGES CXX)\n\n# The name of the executable created for the application. Change this to change\n# the on-disk name of your application.\nset(BINARY_NAME \"dio_flutter_example\")\n\n# Explicitly opt in to modern CMake behaviors to avoid warnings with recent\n# versions of CMake.\ncmake_policy(VERSION 3.14...3.25)\n\n# Define build configuration option.\nget_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)\nif(IS_MULTICONFIG)\n  set(CMAKE_CONFIGURATION_TYPES \"Debug;Profile;Release\"\n    CACHE STRING \"\" FORCE)\nelse()\n  if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n    set(CMAKE_BUILD_TYPE \"Debug\" CACHE\n      STRING \"Flutter build mode\" FORCE)\n    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS\n      \"Debug\" \"Profile\" \"Release\")\n  endif()\nendif()\n# Define settings for the Profile build mode.\nset(CMAKE_EXE_LINKER_FLAGS_PROFILE \"${CMAKE_EXE_LINKER_FLAGS_RELEASE}\")\nset(CMAKE_SHARED_LINKER_FLAGS_PROFILE \"${CMAKE_SHARED_LINKER_FLAGS_RELEASE}\")\nset(CMAKE_C_FLAGS_PROFILE \"${CMAKE_C_FLAGS_RELEASE}\")\nset(CMAKE_CXX_FLAGS_PROFILE \"${CMAKE_CXX_FLAGS_RELEASE}\")\n\n# Use Unicode for all projects.\nadd_definitions(-DUNICODE -D_UNICODE)\n\n# Compilation settings that should be applied to most targets.\n#\n# Be cautious about adding new options here, as plugins use this function by\n# default. In most cases, you should add new options to specific targets instead\n# of modifying this function.\nfunction(APPLY_STANDARD_SETTINGS TARGET)\n  target_compile_features(${TARGET} PUBLIC cxx_std_17)\n  target_compile_options(${TARGET} PRIVATE /W4 /WX /wd\"4100\")\n  target_compile_options(${TARGET} PRIVATE /EHsc)\n  target_compile_definitions(${TARGET} PRIVATE \"_HAS_EXCEPTIONS=0\")\n  target_compile_definitions(${TARGET} PRIVATE \"$<$<CONFIG:Debug>:_DEBUG>\")\nendfunction()\n\n# Flutter library and tool build rules.\nset(FLUTTER_MANAGED_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/flutter\")\nadd_subdirectory(${FLUTTER_MANAGED_DIR})\n\n# Application build; see runner/CMakeLists.txt.\nadd_subdirectory(\"runner\")\n\n\n# Generated plugin build rules, which manage building the plugins and adding\n# them to the application.\ninclude(flutter/generated_plugins.cmake)\n\n\n# === Installation ===\n# Support files are copied into place next to the executable, so that it can\n# run in place. This is done instead of making a separate bundle (as on Linux)\n# so that building and running from within Visual Studio will work.\nset(BUILD_BUNDLE_DIR \"$<TARGET_FILE_DIR:${BINARY_NAME}>\")\n# Make the \"install\" step default, as it's required to run.\nset(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)\nif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)\n  set(CMAKE_INSTALL_PREFIX \"${BUILD_BUNDLE_DIR}\" CACHE PATH \"...\" FORCE)\nendif()\n\nset(INSTALL_BUNDLE_DATA_DIR \"${CMAKE_INSTALL_PREFIX}/data\")\nset(INSTALL_BUNDLE_LIB_DIR \"${CMAKE_INSTALL_PREFIX}\")\n\ninstall(TARGETS ${BINARY_NAME} RUNTIME DESTINATION \"${CMAKE_INSTALL_PREFIX}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_ICU_DATA_FILE}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\nif(PLUGIN_BUNDLED_LIBRARIES)\n  install(FILES \"${PLUGIN_BUNDLED_LIBRARIES}\"\n    DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendif()\n\n# Copy the native assets provided by the build.dart from all packages.\nset(NATIVE_ASSETS_DIR \"${PROJECT_BUILD_DIR}native_assets/windows/\")\ninstall(DIRECTORY \"${NATIVE_ASSETS_DIR}\"\n   DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n   COMPONENT Runtime)\n\n# Fully re-copy the assets directory on each build to avoid having stale files\n# from a previous install.\nset(FLUTTER_ASSET_DIR_NAME \"flutter_assets\")\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\\\")\n  \" COMPONENT Runtime)\ninstall(DIRECTORY \"${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}\"\n  DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\" COMPONENT Runtime)\n\n# Install the AOT library on non-Debug builds only.\ninstall(FILES \"${AOT_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  CONFIGURATIONS Profile;Release\n  COMPONENT Runtime)\n"
  },
  {
    "path": "example_flutter_app/windows/flutter/CMakeLists.txt",
    "content": "# This file controls Flutter-level build steps. It should not be edited.\ncmake_minimum_required(VERSION 3.14)\n\nset(EPHEMERAL_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/ephemeral\")\n\n# Configuration provided via flutter tool.\ninclude(${EPHEMERAL_DIR}/generated_config.cmake)\n\n# TODO: Move the rest of this into files in ephemeral. See\n# https://github.com/flutter/flutter/issues/57146.\nset(WRAPPER_ROOT \"${EPHEMERAL_DIR}/cpp_client_wrapper\")\n\n# Set fallback configurations for older versions of the flutter tool.\nif (NOT DEFINED FLUTTER_TARGET_PLATFORM)\n  set(FLUTTER_TARGET_PLATFORM \"windows-x64\")\nendif()\n\n# === Flutter Library ===\nset(FLUTTER_LIBRARY \"${EPHEMERAL_DIR}/flutter_windows.dll\")\n\n# Published to parent scope for install step.\nset(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)\nset(FLUTTER_ICU_DATA_FILE \"${EPHEMERAL_DIR}/icudtl.dat\" PARENT_SCOPE)\nset(PROJECT_BUILD_DIR \"${PROJECT_DIR}/build/\" PARENT_SCOPE)\nset(AOT_LIBRARY \"${PROJECT_DIR}/build/windows/app.so\" PARENT_SCOPE)\n\nlist(APPEND FLUTTER_LIBRARY_HEADERS\n  \"flutter_export.h\"\n  \"flutter_windows.h\"\n  \"flutter_messenger.h\"\n  \"flutter_plugin_registrar.h\"\n  \"flutter_texture_registrar.h\"\n)\nlist(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND \"${EPHEMERAL_DIR}/\")\nadd_library(flutter INTERFACE)\ntarget_include_directories(flutter INTERFACE\n  \"${EPHEMERAL_DIR}\"\n)\ntarget_link_libraries(flutter INTERFACE \"${FLUTTER_LIBRARY}.lib\")\nadd_dependencies(flutter flutter_assemble)\n\n# === Wrapper ===\nlist(APPEND CPP_WRAPPER_SOURCES_CORE\n  \"core_implementations.cc\"\n  \"standard_codec.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND \"${WRAPPER_ROOT}/\")\nlist(APPEND CPP_WRAPPER_SOURCES_PLUGIN\n  \"plugin_registrar.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND \"${WRAPPER_ROOT}/\")\nlist(APPEND CPP_WRAPPER_SOURCES_APP\n  \"flutter_engine.cc\"\n  \"flutter_view_controller.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND \"${WRAPPER_ROOT}/\")\n\n# Wrapper sources needed for a plugin.\nadd_library(flutter_wrapper_plugin STATIC\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_PLUGIN}\n)\napply_standard_settings(flutter_wrapper_plugin)\nset_target_properties(flutter_wrapper_plugin PROPERTIES\n  POSITION_INDEPENDENT_CODE ON)\nset_target_properties(flutter_wrapper_plugin PROPERTIES\n  CXX_VISIBILITY_PRESET hidden)\ntarget_link_libraries(flutter_wrapper_plugin PUBLIC flutter)\ntarget_include_directories(flutter_wrapper_plugin PUBLIC\n  \"${WRAPPER_ROOT}/include\"\n)\nadd_dependencies(flutter_wrapper_plugin flutter_assemble)\n\n# Wrapper sources needed for the runner.\nadd_library(flutter_wrapper_app STATIC\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_APP}\n)\napply_standard_settings(flutter_wrapper_app)\ntarget_link_libraries(flutter_wrapper_app PUBLIC flutter)\ntarget_include_directories(flutter_wrapper_app PUBLIC\n  \"${WRAPPER_ROOT}/include\"\n)\nadd_dependencies(flutter_wrapper_app flutter_assemble)\n\n# === Flutter tool backend ===\n# _phony_ is a non-existent file to force this command to run every time,\n# since currently there's no way to get a full input/output list from the\n# flutter tool.\nset(PHONY_OUTPUT \"${CMAKE_CURRENT_BINARY_DIR}/_phony_\")\nset_source_files_properties(\"${PHONY_OUTPUT}\" PROPERTIES SYMBOLIC TRUE)\nadd_custom_command(\n  OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}\n    ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}\n    ${CPP_WRAPPER_SOURCES_APP}\n    ${PHONY_OUTPUT}\n  COMMAND ${CMAKE_COMMAND} -E env\n    ${FLUTTER_TOOL_ENVIRONMENT}\n    \"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat\"\n      ${FLUTTER_TARGET_PLATFORM} $<CONFIG>\n  VERBATIM\n)\nadd_custom_target(flutter_assemble DEPENDS\n  \"${FLUTTER_LIBRARY}\"\n  ${FLUTTER_LIBRARY_HEADERS}\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_PLUGIN}\n  ${CPP_WRAPPER_SOURCES_APP}\n)\n"
  },
  {
    "path": "example_flutter_app/windows/flutter/generated_plugin_registrant.cc",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#include \"generated_plugin_registrant.h\"\n\n\nvoid RegisterPlugins(flutter::PluginRegistry* registry) {\n}\n"
  },
  {
    "path": "example_flutter_app/windows/flutter/generated_plugin_registrant.h",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#ifndef GENERATED_PLUGIN_REGISTRANT_\n#define GENERATED_PLUGIN_REGISTRANT_\n\n#include <flutter/plugin_registry.h>\n\n// Registers Flutter plugins.\nvoid RegisterPlugins(flutter::PluginRegistry* registry);\n\n#endif  // GENERATED_PLUGIN_REGISTRANT_\n"
  },
  {
    "path": "example_flutter_app/windows/flutter/generated_plugins.cmake",
    "content": "#\n# Generated file, do not edit.\n#\n\nlist(APPEND FLUTTER_PLUGIN_LIST\n)\n\nlist(APPEND FLUTTER_FFI_PLUGIN_LIST\n)\n\nset(PLUGIN_BUNDLED_LIBRARIES)\n\nforeach(plugin ${FLUTTER_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})\n  target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})\nendforeach(plugin)\n\nforeach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})\nendforeach(ffi_plugin)\n"
  },
  {
    "path": "example_flutter_app/windows/runner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.14)\nproject(runner LANGUAGES CXX)\n\n# Define the application target. To change its name, change BINARY_NAME in the\n# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer\n# work.\n#\n# Any new source files that you add to the application should be added here.\nadd_executable(${BINARY_NAME} WIN32\n  \"flutter_window.cpp\"\n  \"main.cpp\"\n  \"utils.cpp\"\n  \"win32_window.cpp\"\n  \"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc\"\n  \"Runner.rc\"\n  \"runner.exe.manifest\"\n)\n\n# Apply the standard set of build settings. This can be removed for applications\n# that need different build settings.\napply_standard_settings(${BINARY_NAME})\n\n# Add preprocessor definitions for the build version.\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION=\\\"${FLUTTER_VERSION}\\\"\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}\")\n\n# Disable Windows macros that collide with C++ standard library functions.\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"NOMINMAX\")\n\n# Add dependency libraries and include directories. Add any application-specific\n# dependencies here.\ntarget_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)\ntarget_link_libraries(${BINARY_NAME} PRIVATE \"dwmapi.lib\")\ntarget_include_directories(${BINARY_NAME} PRIVATE \"${CMAKE_SOURCE_DIR}\")\n\n# Run the Flutter tool portions of the build. This must not be removed.\nadd_dependencies(${BINARY_NAME} flutter_assemble)\n"
  },
  {
    "path": "example_flutter_app/windows/runner/Runner.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#pragma code_page(65001)\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#include \"winres.h\"\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (United States) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE\nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE\nBEGIN\n    \"#include \"\"winres.h\"\"\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE\nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDI_APP_ICON            ICON                    \"resources\\\\app_icon.ico\"\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Version\n//\n\n#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)\n#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD\n#else\n#define VERSION_AS_NUMBER 1,0,0,0\n#endif\n\n#if defined(FLUTTER_VERSION)\n#define VERSION_AS_STRING FLUTTER_VERSION\n#else\n#define VERSION_AS_STRING \"1.0.0\"\n#endif\n\nVS_VERSION_INFO VERSIONINFO\n FILEVERSION VERSION_AS_NUMBER\n PRODUCTVERSION VERSION_AS_NUMBER\n FILEFLAGSMASK VS_FFI_FILEFLAGSMASK\n#ifdef _DEBUG\n FILEFLAGS VS_FF_DEBUG\n#else\n FILEFLAGS 0x0L\n#endif\n FILEOS VOS__WINDOWS32\n FILETYPE VFT_APP\n FILESUBTYPE 0x0L\nBEGIN\n    BLOCK \"StringFileInfo\"\n    BEGIN\n        BLOCK \"040904e4\"\n        BEGIN\n            VALUE \"CompanyName\", \"cn.flutter\" \"\\0\"\n            VALUE \"FileDescription\", \"dio_flutter_example\" \"\\0\"\n            VALUE \"FileVersion\", VERSION_AS_STRING \"\\0\"\n            VALUE \"InternalName\", \"dio_flutter_example\" \"\\0\"\n            VALUE \"LegalCopyright\", \"Copyright (C) 2024 cn.flutter. All rights reserved.\" \"\\0\"\n            VALUE \"OriginalFilename\", \"dio_flutter_example.exe\" \"\\0\"\n            VALUE \"ProductName\", \"dio_flutter_example\" \"\\0\"\n            VALUE \"ProductVersion\", VERSION_AS_STRING \"\\0\"\n        END\n    END\n    BLOCK \"VarFileInfo\"\n    BEGIN\n        VALUE \"Translation\", 0x409, 1252\n    END\nEND\n\n#endif    // English (United States) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n"
  },
  {
    "path": "example_flutter_app/windows/runner/flutter_window.cpp",
    "content": "#include \"flutter_window.h\"\n\n#include <optional>\n\n#include \"flutter/generated_plugin_registrant.h\"\n\nFlutterWindow::FlutterWindow(const flutter::DartProject& project)\n    : project_(project) {}\n\nFlutterWindow::~FlutterWindow() {}\n\nbool FlutterWindow::OnCreate() {\n  if (!Win32Window::OnCreate()) {\n    return false;\n  }\n\n  RECT frame = GetClientArea();\n\n  // The size here must match the window dimensions to avoid unnecessary surface\n  // creation / destruction in the startup path.\n  flutter_controller_ = std::make_unique<flutter::FlutterViewController>(\n      frame.right - frame.left, frame.bottom - frame.top, project_);\n  // Ensure that basic setup of the controller was successful.\n  if (!flutter_controller_->engine() || !flutter_controller_->view()) {\n    return false;\n  }\n  RegisterPlugins(flutter_controller_->engine());\n  SetChildContent(flutter_controller_->view()->GetNativeWindow());\n\n  flutter_controller_->engine()->SetNextFrameCallback([&]() {\n    this->Show();\n  });\n\n  // Flutter can complete the first frame before the \"show window\" callback is\n  // registered. The following call ensures a frame is pending to ensure the\n  // window is shown. It is a no-op if the first frame hasn't completed yet.\n  flutter_controller_->ForceRedraw();\n\n  return true;\n}\n\nvoid FlutterWindow::OnDestroy() {\n  if (flutter_controller_) {\n    flutter_controller_ = nullptr;\n  }\n\n  Win32Window::OnDestroy();\n}\n\nLRESULT\nFlutterWindow::MessageHandler(HWND hwnd, UINT const message,\n                              WPARAM const wparam,\n                              LPARAM const lparam) noexcept {\n  // Give Flutter, including plugins, an opportunity to handle window messages.\n  if (flutter_controller_) {\n    std::optional<LRESULT> result =\n        flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,\n                                                      lparam);\n    if (result) {\n      return *result;\n    }\n  }\n\n  switch (message) {\n    case WM_FONTCHANGE:\n      flutter_controller_->engine()->ReloadSystemFonts();\n      break;\n  }\n\n  return Win32Window::MessageHandler(hwnd, message, wparam, lparam);\n}\n"
  },
  {
    "path": "example_flutter_app/windows/runner/flutter_window.h",
    "content": "#ifndef RUNNER_FLUTTER_WINDOW_H_\n#define RUNNER_FLUTTER_WINDOW_H_\n\n#include <flutter/dart_project.h>\n#include <flutter/flutter_view_controller.h>\n\n#include <memory>\n\n#include \"win32_window.h\"\n\n// A window that does nothing but host a Flutter view.\nclass FlutterWindow : public Win32Window {\n public:\n  // Creates a new FlutterWindow hosting a Flutter view running |project|.\n  explicit FlutterWindow(const flutter::DartProject& project);\n  virtual ~FlutterWindow();\n\n protected:\n  // Win32Window:\n  bool OnCreate() override;\n  void OnDestroy() override;\n  LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,\n                         LPARAM const lparam) noexcept override;\n\n private:\n  // The project to run.\n  flutter::DartProject project_;\n\n  // The Flutter instance hosted by this window.\n  std::unique_ptr<flutter::FlutterViewController> flutter_controller_;\n};\n\n#endif  // RUNNER_FLUTTER_WINDOW_H_\n"
  },
  {
    "path": "example_flutter_app/windows/runner/main.cpp",
    "content": "#include <flutter/dart_project.h>\n#include <flutter/flutter_view_controller.h>\n#include <windows.h>\n\n#include \"flutter_window.h\"\n#include \"utils.h\"\n\nint APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,\n                      _In_ wchar_t *command_line, _In_ int show_command) {\n  // Attach to console when present (e.g., 'flutter run') or create a\n  // new console when running with a debugger.\n  if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {\n    CreateAndAttachConsole();\n  }\n\n  // Initialize COM, so that it is available for use in the library and/or\n  // plugins.\n  ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);\n\n  flutter::DartProject project(L\"data\");\n\n  std::vector<std::string> command_line_arguments =\n      GetCommandLineArguments();\n\n  project.set_dart_entrypoint_arguments(std::move(command_line_arguments));\n\n  FlutterWindow window(project);\n  Win32Window::Point origin(10, 10);\n  Win32Window::Size size(1280, 720);\n  if (!window.Create(L\"dio_flutter_example\", origin, size)) {\n    return EXIT_FAILURE;\n  }\n  window.SetQuitOnClose(true);\n\n  ::MSG msg;\n  while (::GetMessage(&msg, nullptr, 0, 0)) {\n    ::TranslateMessage(&msg);\n    ::DispatchMessage(&msg);\n  }\n\n  ::CoUninitialize();\n  return EXIT_SUCCESS;\n}\n"
  },
  {
    "path": "example_flutter_app/windows/runner/resource.h",
    "content": "//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by Runner.rc\n//\n#define IDI_APP_ICON                    101\n\n// Next default values for new objects\n//\n#ifdef APSTUDIO_INVOKED\n#ifndef APSTUDIO_READONLY_SYMBOLS\n#define _APS_NEXT_RESOURCE_VALUE        102\n#define _APS_NEXT_COMMAND_VALUE         40001\n#define _APS_NEXT_CONTROL_VALUE         1001\n#define _APS_NEXT_SYMED_VALUE           101\n#endif\n#endif\n"
  },
  {
    "path": "example_flutter_app/windows/runner/runner.exe.manifest",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">\n  <application xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n    <windowsSettings>\n      <dpiAwareness xmlns=\"http://schemas.microsoft.com/SMI/2016/WindowsSettings\">PerMonitorV2</dpiAwareness>\n    </windowsSettings>\n  </application>\n  <compatibility xmlns=\"urn:schemas-microsoft-com:compatibility.v1\">\n    <application>\n      <!-- Windows 10 and Windows 11 -->\n      <supportedOS Id=\"{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}\"/>\n    </application>\n  </compatibility>\n</assembly>\n"
  },
  {
    "path": "example_flutter_app/windows/runner/utils.cpp",
    "content": "#include \"utils.h\"\n\n#include <flutter_windows.h>\n#include <io.h>\n#include <stdio.h>\n#include <windows.h>\n\n#include <iostream>\n\nvoid CreateAndAttachConsole() {\n  if (::AllocConsole()) {\n    FILE *unused;\n    if (freopen_s(&unused, \"CONOUT$\", \"w\", stdout)) {\n      _dup2(_fileno(stdout), 1);\n    }\n    if (freopen_s(&unused, \"CONOUT$\", \"w\", stderr)) {\n      _dup2(_fileno(stdout), 2);\n    }\n    std::ios::sync_with_stdio();\n    FlutterDesktopResyncOutputStreams();\n  }\n}\n\nstd::vector<std::string> GetCommandLineArguments() {\n  // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.\n  int argc;\n  wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);\n  if (argv == nullptr) {\n    return std::vector<std::string>();\n  }\n\n  std::vector<std::string> command_line_arguments;\n\n  // Skip the first argument as it's the binary name.\n  for (int i = 1; i < argc; i++) {\n    command_line_arguments.push_back(Utf8FromUtf16(argv[i]));\n  }\n\n  ::LocalFree(argv);\n\n  return command_line_arguments;\n}\n\nstd::string Utf8FromUtf16(const wchar_t* utf16_string) {\n  if (utf16_string == nullptr) {\n    return std::string();\n  }\n  unsigned int target_length = ::WideCharToMultiByte(\n      CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,\n      -1, nullptr, 0, nullptr, nullptr)\n    -1; // remove the trailing null character\n  int input_length = (int)wcslen(utf16_string);\n  std::string utf8_string;\n  if (target_length == 0 || target_length > utf8_string.max_size()) {\n    return utf8_string;\n  }\n  utf8_string.resize(target_length);\n  int converted_length = ::WideCharToMultiByte(\n      CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,\n      input_length, utf8_string.data(), target_length, nullptr, nullptr);\n  if (converted_length == 0) {\n    return std::string();\n  }\n  return utf8_string;\n}\n"
  },
  {
    "path": "example_flutter_app/windows/runner/utils.h",
    "content": "#ifndef RUNNER_UTILS_H_\n#define RUNNER_UTILS_H_\n\n#include <string>\n#include <vector>\n\n// Creates a console for the process, and redirects stdout and stderr to\n// it for both the runner and the Flutter library.\nvoid CreateAndAttachConsole();\n\n// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string\n// encoded in UTF-8. Returns an empty std::string on failure.\nstd::string Utf8FromUtf16(const wchar_t* utf16_string);\n\n// Gets the command line arguments passed in as a std::vector<std::string>,\n// encoded in UTF-8. Returns an empty std::vector<std::string> on failure.\nstd::vector<std::string> GetCommandLineArguments();\n\n#endif  // RUNNER_UTILS_H_\n"
  },
  {
    "path": "example_flutter_app/windows/runner/win32_window.cpp",
    "content": "#include \"win32_window.h\"\n\n#include <dwmapi.h>\n#include <flutter_windows.h>\n\n#include \"resource.h\"\n\nnamespace {\n\n/// Window attribute that enables dark mode window decorations.\n///\n/// Redefined in case the developer's machine has a Windows SDK older than\n/// version 10.0.22000.0.\n/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute\n#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE\n#define DWMWA_USE_IMMERSIVE_DARK_MODE 20\n#endif\n\nconstexpr const wchar_t kWindowClassName[] = L\"FLUTTER_RUNNER_WIN32_WINDOW\";\n\n/// Registry key for app theme preference.\n///\n/// A value of 0 indicates apps should use dark mode. A non-zero or missing\n/// value indicates apps should use light mode.\nconstexpr const wchar_t kGetPreferredBrightnessRegKey[] =\n  L\"Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Themes\\\\Personalize\";\nconstexpr const wchar_t kGetPreferredBrightnessRegValue[] = L\"AppsUseLightTheme\";\n\n// The number of Win32Window objects that currently exist.\nstatic int g_active_window_count = 0;\n\nusing EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);\n\n// Scale helper to convert logical scaler values to physical using passed in\n// scale factor\nint Scale(int source, double scale_factor) {\n  return static_cast<int>(source * scale_factor);\n}\n\n// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.\n// This API is only needed for PerMonitor V1 awareness mode.\nvoid EnableFullDpiSupportIfAvailable(HWND hwnd) {\n  HMODULE user32_module = LoadLibraryA(\"User32.dll\");\n  if (!user32_module) {\n    return;\n  }\n  auto enable_non_client_dpi_scaling =\n      reinterpret_cast<EnableNonClientDpiScaling*>(\n          GetProcAddress(user32_module, \"EnableNonClientDpiScaling\"));\n  if (enable_non_client_dpi_scaling != nullptr) {\n    enable_non_client_dpi_scaling(hwnd);\n  }\n  FreeLibrary(user32_module);\n}\n\n}  // namespace\n\n// Manages the Win32Window's window class registration.\nclass WindowClassRegistrar {\n public:\n  ~WindowClassRegistrar() = default;\n\n  // Returns the singleton registrar instance.\n  static WindowClassRegistrar* GetInstance() {\n    if (!instance_) {\n      instance_ = new WindowClassRegistrar();\n    }\n    return instance_;\n  }\n\n  // Returns the name of the window class, registering the class if it hasn't\n  // previously been registered.\n  const wchar_t* GetWindowClass();\n\n  // Unregisters the window class. Should only be called if there are no\n  // instances of the window.\n  void UnregisterWindowClass();\n\n private:\n  WindowClassRegistrar() = default;\n\n  static WindowClassRegistrar* instance_;\n\n  bool class_registered_ = false;\n};\n\nWindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;\n\nconst wchar_t* WindowClassRegistrar::GetWindowClass() {\n  if (!class_registered_) {\n    WNDCLASS window_class{};\n    window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);\n    window_class.lpszClassName = kWindowClassName;\n    window_class.style = CS_HREDRAW | CS_VREDRAW;\n    window_class.cbClsExtra = 0;\n    window_class.cbWndExtra = 0;\n    window_class.hInstance = GetModuleHandle(nullptr);\n    window_class.hIcon =\n        LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));\n    window_class.hbrBackground = 0;\n    window_class.lpszMenuName = nullptr;\n    window_class.lpfnWndProc = Win32Window::WndProc;\n    RegisterClass(&window_class);\n    class_registered_ = true;\n  }\n  return kWindowClassName;\n}\n\nvoid WindowClassRegistrar::UnregisterWindowClass() {\n  UnregisterClass(kWindowClassName, nullptr);\n  class_registered_ = false;\n}\n\nWin32Window::Win32Window() {\n  ++g_active_window_count;\n}\n\nWin32Window::~Win32Window() {\n  --g_active_window_count;\n  Destroy();\n}\n\nbool Win32Window::Create(const std::wstring& title,\n                         const Point& origin,\n                         const Size& size) {\n  Destroy();\n\n  const wchar_t* window_class =\n      WindowClassRegistrar::GetInstance()->GetWindowClass();\n\n  const POINT target_point = {static_cast<LONG>(origin.x),\n                              static_cast<LONG>(origin.y)};\n  HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);\n  UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);\n  double scale_factor = dpi / 96.0;\n\n  HWND window = CreateWindow(\n      window_class, title.c_str(), WS_OVERLAPPEDWINDOW,\n      Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),\n      Scale(size.width, scale_factor), Scale(size.height, scale_factor),\n      nullptr, nullptr, GetModuleHandle(nullptr), this);\n\n  if (!window) {\n    return false;\n  }\n\n  UpdateTheme(window);\n\n  return OnCreate();\n}\n\nbool Win32Window::Show() {\n  return ShowWindow(window_handle_, SW_SHOWNORMAL);\n}\n\n// static\nLRESULT CALLBACK Win32Window::WndProc(HWND const window,\n                                      UINT const message,\n                                      WPARAM const wparam,\n                                      LPARAM const lparam) noexcept {\n  if (message == WM_NCCREATE) {\n    auto window_struct = reinterpret_cast<CREATESTRUCT*>(lparam);\n    SetWindowLongPtr(window, GWLP_USERDATA,\n                     reinterpret_cast<LONG_PTR>(window_struct->lpCreateParams));\n\n    auto that = static_cast<Win32Window*>(window_struct->lpCreateParams);\n    EnableFullDpiSupportIfAvailable(window);\n    that->window_handle_ = window;\n  } else if (Win32Window* that = GetThisFromHandle(window)) {\n    return that->MessageHandler(window, message, wparam, lparam);\n  }\n\n  return DefWindowProc(window, message, wparam, lparam);\n}\n\nLRESULT\nWin32Window::MessageHandler(HWND hwnd,\n                            UINT const message,\n                            WPARAM const wparam,\n                            LPARAM const lparam) noexcept {\n  switch (message) {\n    case WM_DESTROY:\n      window_handle_ = nullptr;\n      Destroy();\n      if (quit_on_close_) {\n        PostQuitMessage(0);\n      }\n      return 0;\n\n    case WM_DPICHANGED: {\n      auto newRectSize = reinterpret_cast<RECT*>(lparam);\n      LONG newWidth = newRectSize->right - newRectSize->left;\n      LONG newHeight = newRectSize->bottom - newRectSize->top;\n\n      SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth,\n                   newHeight, SWP_NOZORDER | SWP_NOACTIVATE);\n\n      return 0;\n    }\n    case WM_SIZE: {\n      RECT rect = GetClientArea();\n      if (child_content_ != nullptr) {\n        // Size and position the child window.\n        MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,\n                   rect.bottom - rect.top, TRUE);\n      }\n      return 0;\n    }\n\n    case WM_ACTIVATE:\n      if (child_content_ != nullptr) {\n        SetFocus(child_content_);\n      }\n      return 0;\n\n    case WM_DWMCOLORIZATIONCOLORCHANGED:\n      UpdateTheme(hwnd);\n      return 0;\n  }\n\n  return DefWindowProc(window_handle_, message, wparam, lparam);\n}\n\nvoid Win32Window::Destroy() {\n  OnDestroy();\n\n  if (window_handle_) {\n    DestroyWindow(window_handle_);\n    window_handle_ = nullptr;\n  }\n  if (g_active_window_count == 0) {\n    WindowClassRegistrar::GetInstance()->UnregisterWindowClass();\n  }\n}\n\nWin32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept {\n  return reinterpret_cast<Win32Window*>(\n      GetWindowLongPtr(window, GWLP_USERDATA));\n}\n\nvoid Win32Window::SetChildContent(HWND content) {\n  child_content_ = content;\n  SetParent(content, window_handle_);\n  RECT frame = GetClientArea();\n\n  MoveWindow(content, frame.left, frame.top, frame.right - frame.left,\n             frame.bottom - frame.top, true);\n\n  SetFocus(child_content_);\n}\n\nRECT Win32Window::GetClientArea() {\n  RECT frame;\n  GetClientRect(window_handle_, &frame);\n  return frame;\n}\n\nHWND Win32Window::GetHandle() {\n  return window_handle_;\n}\n\nvoid Win32Window::SetQuitOnClose(bool quit_on_close) {\n  quit_on_close_ = quit_on_close;\n}\n\nbool Win32Window::OnCreate() {\n  // No-op; provided for subclasses.\n  return true;\n}\n\nvoid Win32Window::OnDestroy() {\n  // No-op; provided for subclasses.\n}\n\nvoid Win32Window::UpdateTheme(HWND const window) {\n  DWORD light_mode;\n  DWORD light_mode_size = sizeof(light_mode);\n  LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey,\n                               kGetPreferredBrightnessRegValue,\n                               RRF_RT_REG_DWORD, nullptr, &light_mode,\n                               &light_mode_size);\n\n  if (result == ERROR_SUCCESS) {\n    BOOL enable_dark_mode = light_mode == 0;\n    DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE,\n                          &enable_dark_mode, sizeof(enable_dark_mode));\n  }\n}\n"
  },
  {
    "path": "example_flutter_app/windows/runner/win32_window.h",
    "content": "#ifndef RUNNER_WIN32_WINDOW_H_\n#define RUNNER_WIN32_WINDOW_H_\n\n#include <windows.h>\n\n#include <functional>\n#include <memory>\n#include <string>\n\n// A class abstraction for a high DPI-aware Win32 Window. Intended to be\n// inherited from by classes that wish to specialize with custom\n// rendering and input handling\nclass Win32Window {\n public:\n  struct Point {\n    unsigned int x;\n    unsigned int y;\n    Point(unsigned int x, unsigned int y) : x(x), y(y) {}\n  };\n\n  struct Size {\n    unsigned int width;\n    unsigned int height;\n    Size(unsigned int width, unsigned int height)\n        : width(width), height(height) {}\n  };\n\n  Win32Window();\n  virtual ~Win32Window();\n\n  // Creates a win32 window with |title| that is positioned and sized using\n  // |origin| and |size|. New windows are created on the default monitor. Window\n  // sizes are specified to the OS in physical pixels, hence to ensure a\n  // consistent size this function will scale the inputted width and height as\n  // as appropriate for the default monitor. The window is invisible until\n  // |Show| is called. Returns true if the window was created successfully.\n  bool Create(const std::wstring& title, const Point& origin, const Size& size);\n\n  // Show the current window. Returns true if the window was successfully shown.\n  bool Show();\n\n  // Release OS resources associated with window.\n  void Destroy();\n\n  // Inserts |content| into the window tree.\n  void SetChildContent(HWND content);\n\n  // Returns the backing Window handle to enable clients to set icon and other\n  // window properties. Returns nullptr if the window has been destroyed.\n  HWND GetHandle();\n\n  // If true, closing this window will quit the application.\n  void SetQuitOnClose(bool quit_on_close);\n\n  // Return a RECT representing the bounds of the current client area.\n  RECT GetClientArea();\n\n protected:\n  // Processes and route salient window messages for mouse handling,\n  // size change and DPI. Delegates handling of these to member overloads that\n  // inheriting classes can handle.\n  virtual LRESULT MessageHandler(HWND window,\n                                 UINT const message,\n                                 WPARAM const wparam,\n                                 LPARAM const lparam) noexcept;\n\n  // Called when CreateAndShow is called, allowing subclass window-related\n  // setup. Subclasses should return false if setup fails.\n  virtual bool OnCreate();\n\n  // Called when Destroy is called.\n  virtual void OnDestroy();\n\n private:\n  friend class WindowClassRegistrar;\n\n  // OS callback called by message pump. Handles the WM_NCCREATE message which\n  // is passed when the non-client area is being created and enables automatic\n  // non-client DPI scaling so that the non-client area automatically\n  // responds to changes in DPI. All other messages are handled by\n  // MessageHandler.\n  static LRESULT CALLBACK WndProc(HWND const window,\n                                  UINT const message,\n                                  WPARAM const wparam,\n                                  LPARAM const lparam) noexcept;\n\n  // Retrieves a class instance pointer for |window|\n  static Win32Window* GetThisFromHandle(HWND const window) noexcept;\n\n  // Update the window frame's theme to match the system theme.\n  static void UpdateTheme(HWND const window);\n\n  bool quit_on_close_ = false;\n\n  // window handle for top level window.\n  HWND window_handle_ = nullptr;\n\n  // window handle for hosted content.\n  HWND child_content_ = nullptr;\n};\n\n#endif  // RUNNER_WIN32_WINDOW_H_\n"
  },
  {
    "path": "melos.yaml",
    "content": "name: dio_workspace\nrepository: https://github.com/cfug/dio\n\npackages:\n  - 'dio'\n  - 'plugins/*'\n  - 'plugins/**/example*'\n  - 'example*'\n  - 'dio_test'\n\nide:\n  intellij:\n    enabled: true\n    moduleNamePrefix: ''\n\ncommand:\n  bootstrap:\n    runPubGetInParallel: false\n    hooks:\n      # Check bootstrappable packages.\n      pre: |\n        dart ./scripts/melos_packages.dart\n  clean:\n    hooks:\n      # Clean all coverage files\n      post: |\n        rm -rf coverage\n        rm -rf pubspec.lock\n        melos exec --dir-exists coverage -- \"rm -rf coverage\"\n\nscripts:\n  analyze:\n    description: Analyze all packages\n    exec: dart analyze --fatal-infos\n  format:\n    description: Format check all packages\n    exec: dart format --set-exit-if-changed .\n  format:fix:\n    description: Format all packages\n    exec: dart format .\n  publish-dry-run:\n    description: Publish dry-run all packages\n    exec: dart pub publish --dry-run\n    packageFilters:\n      noPrivate: true\n  httpbun:local:\n    description: Run httpbun locally\n    run: echo \"const httpbunBaseUrl = 'https://httpbun.local';\" > dio_test/lib/src/httpbun.dart\n  httpbun:com:\n    description: Run httpbun locally\n    run: echo \"const httpbunBaseUrl = 'https://httpbun.com';\" > dio_test/lib/src/httpbun.dart\n\n  test:\n    name: All tests\n    run: |\n      melos run test:vm\n      TEST_PLATFORM=chrome melos run test:web\n      TEST_PLATFORM=firefox melos run test:web\n      melos run test:flutter\n  test:vm:\n    name: Dart VM tests\n    exec: |\n      if [ \"$TARGET_DART_SDK\" = \"min\" ]; then\n        dart test --preset=${TEST_PRESET:-default},${TARGET_DART_SDK:-stable} --chain-stack-traces\n      else\n        dart test --preset=${TEST_PRESET:-default},${TARGET_DART_SDK:-stable} --coverage=coverage/vm --chain-stack-traces\n      fi\n    packageFilters:\n      flutter: false\n      dirExists: test\n      fileExists: .melos_package\n      ignore:\n        - 'dio_web_adapter'\n  test:web:\n    name: Dart Web tests\n    run: |\n      melos run test:web:chrome\n      melos run test:web:firefox\n  test:web:chrome:\n    name: Dart Web tests in chrome\n    run: melos run test:web:single\n    env:\n      TEST_PLATFORM: chrome\n      WITH_WASM: true\n  test:web:firefox:\n    name: Dart Web tests in firefox\n    run: melos run test:web:single\n    env:\n      TEST_PLATFORM: firefox\n      WITH_WASM: false\n  test:web:single:\n    name: Dart Web tests in a browser\n    exec: |\n      if [ \"$TARGET_DART_SDK\" = \"min\" ]; then\n        dart test --platform ${TEST_PLATFORM} --preset=${TEST_PRESET:-default},${TARGET_DART_SDK:-stable} --chain-stack-traces\n      else\n        dart test --platform ${TEST_PLATFORM} --coverage=coverage/${TEST_PLATFORM} --preset=${TEST_PRESET:-default},${TARGET_DART_SDK:-stable} --chain-stack-traces\n        if [ \"$WITH_WASM\" = \"true\" ]; then\n          dart test --platform ${TEST_PLATFORM} --coverage=coverage/${TEST_PLATFORM} --preset=${TEST_PRESET:-default},${TARGET_DART_SDK:-stable} --chain-stack-traces --compiler=dart2wasm\n        fi\n      fi\n    packageFilters:\n      flutter: false\n      dirExists: test\n      fileExists: .melos_package\n      ignore:\n        - '*http2*'\n        - '*cookie*'\n  test:flutter:\n    name: Flutter tests\n    exec: flutter test --coverage\n    packageFilters:\n      flutter: true\n      dirExists: test\n      fileExists: .melos_package\n      ignore:\n        - '*example*'\n  test:coverage:\n    name: Run all tests and display coverage\n    run: |\n      melos run test\n      melos run coverage:format\n      melos run coverage:show\n\n  upgrade:dart:\n    name: Upgrade Dart package deps\n    exec: dart pub upgrade\n    packageFilters:\n      flutter: false\n  upgrade:flutter:\n    name: Upgrade Flutter package deps\n    exec: flutter pub upgrade\n    packageFilters:\n      flutter: true\n  build:example:apk:\n    run: |\n      cd example_flutter_app\n      flutter build apk --debug\n\n  coverage:clean:\n    name: Clear coverage\n    exec: rm -rf coverage\n  coverage:format:\n    name: Format coverage\n    run: |\n      dart pub global activate coverage\n      melos run coverage:format:package\n  coverage:format:package:\n    name: Format coverage for each package\n    exec: dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib\n    packageFilters:\n      flutter: false\n      dirExists: coverage\n  coverage:combine:\n    name: Combine & convert coverage report\n    run: |\n      rm -rf coverage\n      dart pub global activate combine_coverage\n      dart pub global activate cobertura\n      melos run coverage:format\n      dart pub global run combine_coverage --repo-path=$pwd\n      dart pub global run cobertura convert --pubspec dio/pubspec.yaml\n  coverage:show:\n    name: Show coverage report\n    run: |\n      melos run coverage:combine\n      dart pub global run cobertura show\n"
  },
  {
    "path": "plugins/compatibility_layer/.gitignore",
    "content": "# https://dart.dev/guides/libraries/private-files\n# Created by `dart pub`\n.dart_tool/\n\n# Avoid committing pubspec.lock for library packages; see\n# https://dart.dev/guides/libraries/private-files#pubspeclock.\npubspec.lock\n\ncoverage\n"
  },
  {
    "path": "plugins/compatibility_layer/CHANGELOG.md",
    "content": "# CHANGELOG\n\n## Unreleased\n\n*None.*\n\n## 0.1.1\n\n- Fixes `kIsWeb` across different Flutter SDKs.\n\n## 0.1.0\n\n- Initial version.\n"
  },
  {
    "path": "plugins/compatibility_layer/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2023 The CFUG Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "plugins/compatibility_layer/README.md",
    "content": "# dio_compatibility_layer\n\n[![pub package](https://img.shields.io/pub/v/dio_compatibility_layer.svg)](https://pub.dev/packages/dio_compatibility_layer)\n[![likes](https://img.shields.io/pub/likes/dio_compatibility_layer)](https://pub.dev/packages/dio_compatibility_layer/score)\n[![popularity](https://img.shields.io/pub/popularity/dio_compatibility_layer)](https://pub.dev/packages/dio_compatibility_layer/score)\n[![pub points](https://img.shields.io/pub/points/dio_compatibility_layer)](https://pub.dev/packages/dio_compatibility_layer/score)\n\nIf you encounter bugs, consider fixing it by opening a PR or at least contribute a failing test case.\n\nThis package contains adapters for [Dio](https://pub.dev/packages/dio)\nwhich enables you to make use of other HTTP clients as the underlying implementation.\n\nCurrently, it supports compatibility with\n- [`http`](https://pub.dev/packages/http)\n\n## Get started\n\n### Install\n\nAdd the `dio_compatibility_layer` package to your\n[pubspec dependencies](https://pub.dev/packages/dio_compatibility_layer/install).\n\n### Example\n\nTo use the `http` compatibility:\n\n```dart\nimport 'package:dio/dio.dart';\nimport 'package:dio_compatibility_layer/dio_compatibility_layer.dart';\nimport 'package:http/http.dart';\n\nvoid main() async {\n  // Start in the `http` world. You can use `http`, `cronet_http`,\n  // `cupertino_http` and other `http` compatible packages.\n  final httpClient = Client();\n\n  // Make the `httpClient` compatible via the `ConversionLayerAdapter` class.\n  final dioAdapter = ConversionLayerAdapter(httpClient);\n\n  // Make dio use the `httpClient` via the conversion layer.\n  final dio = Dio()..httpClientAdapter = dioAdapter;\n\n  // Make a request\n  final response = await dio.get('https://dart.dev');\n  print(response);\n}\n```\n"
  },
  {
    "path": "plugins/compatibility_layer/analysis_options.yaml",
    "content": "include: ../../analysis_options.yaml\n\nanalyzer:\n  language:\n    strict-raw-types: true\n    strict-casts: true\n    strict-inference: true\n"
  },
  {
    "path": "plugins/compatibility_layer/dart_test.yaml",
    "content": "presets:\n  # empty placeholders required in CI scripts\n  all:\n  default:\n  min:\n  stable:\n  beta:\n\noverride_platforms:\n  chrome:\n    settings:\n      headless: true\n  firefox:\n    settings:\n      # headless argument has to be set explicitly for non-chrome browsers\n      arguments: --headless\n      executable:\n        # https://github.com/dart-lang/test/pull/2195\n        mac_os: '/Applications/Firefox.app/Contents/MacOS/firefox'\n"
  },
  {
    "path": "plugins/compatibility_layer/dio_compatibility_layer.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/test\" isTestSource=\"true\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n  </component>\n</module>\n"
  },
  {
    "path": "plugins/compatibility_layer/example/conversion_layer_example.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:dio_compatibility_layer/dio_compatibility_layer.dart';\nimport 'package:http/http.dart';\n\nvoid main() async {\n  // Start in the `http` world. You can use `http`, `cronet_http`,\n  // `cupertino_http` and other `http` compatible packages.\n  final httpClient = Client();\n\n  // Make the `httpClient` compatible via the `ConversionLayerAdapter` class.\n  final dioAdapter = ConversionLayerAdapter(httpClient);\n\n  // Make dio use the `httpClient` via the conversion layer.\n  final dio = Dio()..httpClientAdapter = dioAdapter;\n\n  // Make a request.\n  final response = await dio.get<dynamic>('https://dart.dev');\n  print(response);\n}\n"
  },
  {
    "path": "plugins/compatibility_layer/lib/dio_compatibility_layer.dart",
    "content": "library dio_compatibility_layer;\n\nexport 'src/conversion_layer_adapter.dart';\n"
  },
  {
    "path": "plugins/compatibility_layer/lib/src/conversion_layer_adapter.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:http/http.dart' as http;\n\nconst _kIsWebInterop = bool.fromEnvironment('dart.library.js_interop');\nconst _kIsWebUtil = bool.fromEnvironment('dart.library.js_util');\nconst _kIsWeb = _kIsWebInterop || _kIsWebUtil || identical(0, 0.0);\n\n/// A conversion layer which translates [Dio] requests to\n/// [`http`](https://pub.dev/packages/http) compatible requests.\n/// This enables you to use\n/// [`cronet_http`](https://pub.dev/packages/cronet_http),\n/// [`cupertino_http`](https://pub.dev/packages/cupertino_http),\n/// and other `http` compatible packages with [Dio].\nclass ConversionLayerAdapter implements HttpClientAdapter {\n  ConversionLayerAdapter(this.client);\n\n  /// The client instance from the `http` package.\n  final http.Client client;\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<dynamic>? cancelFuture,\n  ) async {\n    final request = await _fromOptionsAndStream(options, requestStream);\n    final response = await client.send(request);\n    return ResponseBody(\n      response.stream.cast<Uint8List>(),\n      response.statusCode,\n      statusMessage: response.reasonPhrase,\n      isRedirect: response.isRedirect,\n      headers: Map.fromEntries(\n        response.headers.entries.map((e) => MapEntry(e.key, [e.value])),\n      ),\n    );\n  }\n\n  @override\n  void close({bool force = false}) => client.close();\n\n  Future<http.BaseRequest> _fromOptionsAndStream(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n  ) async {\n    final http.BaseRequest request;\n    if (_kIsWeb && requestStream != null) {\n      final normalRequest = request = http.Request(\n        options.method,\n        options.uri,\n      );\n      final completer = Completer<Uint8List>();\n      final sink = ByteConversionSink.withCallback(\n        (bytes) => completer.complete(\n          bytes is Uint8List ? bytes : Uint8List.fromList(bytes),\n        ),\n      );\n      requestStream.listen(\n        sink.add,\n        onError: completer.completeError,\n        onDone: sink.close,\n        cancelOnError: true,\n      );\n      final bytes = await completer.future;\n      normalRequest.bodyBytes = bytes;\n    } else if (requestStream != null) {\n      final streamedRequest = request = http.StreamedRequest(\n        options.method,\n        options.uri,\n      );\n      requestStream.listen(\n        streamedRequest.sink.add,\n        onError: streamedRequest.sink.addError,\n        onDone: streamedRequest.sink.close,\n        cancelOnError: true,\n      );\n    } else {\n      request = http.Request(options.method, options.uri);\n    }\n    request.headers.addAll(\n      Map.fromEntries(\n        options.headers.entries.map(\n          (e) => MapEntry(e.key, e.value.toString().trim()),\n        ),\n      ),\n    );\n    request\n      ..followRedirects = options.followRedirects\n      ..maxRedirects = options.maxRedirects\n      ..persistentConnection = options.persistentConnection;\n    return request;\n  }\n}\n"
  },
  {
    "path": "plugins/compatibility_layer/pubspec.yaml",
    "content": "name: dio_compatibility_layer\nversion: 0.1.1\n\ndescription: Enables dio to make use of http packages.\ntopics:\n  - dio\n  - http\n  - network\n  - native\n  - cronet\nhomepage: https://github.com/cfug/dio\nrepository: https://github.com/cfug/dio/blob/main/plugins/compatibility_layer\nissue_tracker: https://github.com/cfug/dio/issues\n\nenvironment:\n  sdk: ^3.0.0\n\ndependencies:\n  dio: ^5.2.0\n  http: ^1.0.0\n\ndev_dependencies:\n  lints: any\n  test: any\n"
  },
  {
    "path": "plugins/compatibility_layer/test/client_mock.dart",
    "content": "import 'package:http/http.dart';\n\nclass CloseClientMock implements Client {\n  bool closeWasCalled = false;\n\n  @override\n  void close() {\n    closeWasCalled = true;\n  }\n\n  @override\n  dynamic noSuchMethod(Invocation i) => super.noSuchMethod(i);\n}\n\nclass ClientMock implements Client {\n  StreamedResponse? response;\n  BaseRequest? request;\n\n  @override\n  Future<StreamedResponse> send(BaseRequest request) async {\n    this.request = request;\n    return response!;\n  }\n\n  @override\n  dynamic noSuchMethod(Invocation i) => super.noSuchMethod(i);\n}\n"
  },
  {
    "path": "plugins/compatibility_layer/test/conversion_layer_adapter_test.dart",
    "content": "import 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio_compatibility_layer/dio_compatibility_layer.dart';\nimport 'package:http/http.dart';\nimport 'package:test/test.dart';\n\nimport 'client_mock.dart';\n\nvoid main() {\n  test('close', () {\n    final mock = CloseClientMock();\n    final cla = ConversionLayerAdapter(mock);\n\n    cla.close();\n\n    expect(mock.closeWasCalled, true);\n  });\n\n  test('close with force', () {\n    final mock = CloseClientMock();\n    final cla = ConversionLayerAdapter(mock);\n\n    cla.close(force: true);\n\n    expect(mock.closeWasCalled, true);\n  });\n\n  test('headers', () async {\n    final mock = ClientMock()\n      ..response = StreamedResponse(const Stream.empty(), 200);\n    final cla = ConversionLayerAdapter(mock);\n\n    await cla.fetch(\n      RequestOptions(path: '', headers: {'foo': 'bar'}),\n      const Stream.empty(),\n      null,\n    );\n\n    expect(mock.request?.headers, {'foo': 'bar'});\n  });\n\n  test('download stream', () async {\n    final mock = ClientMock()\n      ..response = StreamedResponse(\n        Stream.fromIterable(<Uint8List>[\n          Uint8List.fromList([10, 1]),\n          Uint8List.fromList([1, 4]),\n          Uint8List.fromList([5, 1]),\n          Uint8List.fromList([1, 1]),\n          Uint8List.fromList([2, 4]),\n        ]),\n        200,\n      );\n    final cla = ConversionLayerAdapter(mock);\n\n    final resp = await cla.fetch(\n      RequestOptions(path: ''),\n      null,\n      null,\n    );\n\n    expect(await resp.stream.length, 5);\n  });\n}\n"
  },
  {
    "path": "plugins/cookie_manager/.gitignore",
    "content": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\n\n# IntelliJ related\n*.ipr\n*.iws\n.idea/\n\n# The .vscode folder contains launch configuration and tasks you configure in\n# VS Code which you may wish to be included in version control, so this line\n# is commented out by default.\n#.vscode/\n\n# Flutter/Dart/Pub related\n**/doc/api/\n.dart_tool/\n.flutter-plugins\n.packages\n.pub-cache/\n.pub/\nbuild/\n\ncoverage\n"
  },
  {
    "path": "plugins/cookie_manager/.metadata",
    "content": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrades etc.\n#\n# This file should be version controlled and should not be manually edited.\n\nversion:\n  revision: 32c946f31bfff6c766229d7b85ef0ae70de2c89a\n  channel: master\n\nproject_type: package\n"
  },
  {
    "path": "plugins/cookie_manager/CHANGELOG.md",
    "content": "# CHANGELOG\n\n## Unreleased\n\n*None.*\n\n## 3.4.0\n\n- Fixes `kIsWeb` across different Flutter SDKs.\n- Introduce `CookieManager.ignoreInvalidCookies`.\n\n## 3.3.0\n\n- Proceed better `DioException`s from the cookie manager.\n  Now `CookieManagerLoadException` and `CookieManagerSaveException` are including in the `DioException`.\n- Expose `loadCookies` and `saveCookies` for `CookieManager`.\n\n## 3.2.0\n\n- Raise the min Dart SDK version to 2.18.0 (implied by the `dio` package).\n\n## 3.1.1\n\n- Fix `FileSystemException` when saving redirect cookies without a proper `host`.\n\n## 3.1.0+1\n\n- Add topics to packages.\n\n## 3.1.0\n\n- Replace `DioError` with `DioException`.\n\n## 3.0.0\n\n### Breaking changes\n\n- Bump cookie_jar from 3.0.0 to 4.0.0.\n  Upgrading to this version will lose all previous cookies.\n\n## 2.1.4\n\n- Fix cookie not applied to the original destination during redirect handling.\n- Resolves the location for cookies during redirect handling.\n\n## 2.1.3\n\n- Allow `Set-Cookie` to be parsed in redirect responses.\n- Fix new cookies being replaced by old cookies with the same name.\n- Sort the cookie by path (longer path first).\n\n## 2.1.2\n\n- Fix empty cookie parsing and header value set.\n- Improve code formats according to linter rules.\n\n## 2.1.1\n\n- Fix #1651\n- Fix #1674\n\n## 2.1.0\n\n- For the `dio`'s 5.0 release.\n\n## 2.0.0\n\n- support dio 4.0.0\n\n## 2.0.0-beta1\n\n- support nullsafety\n\n## 1.0.0 - 2019.9.18\n\n- First stable version\n\n## 0.0.1 - 2019.9.17\n\n- A cookie manager for Dio.\n"
  },
  {
    "path": "plugins/cookie_manager/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Wen Du (wendux)\nCopyright (c) 2022 The CFUG Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "plugins/cookie_manager/README.md",
    "content": "# dio_cookie_manager\n\n[![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg)](https://pub.dev/packages/dio_cookie_manager)\n\nA cookie manager combines `cookie_jar` and `dio`, based on the interceptor algorithm.\n\n## Getting Started\n\n### Install\n\nAdd the `dio_cookie_manager` package to your\n[pubspec dependencies](https://pub.dev/packages/dio_cookie_manager/install).\n\n## Usage\n\n```dart\nimport 'package:cookie_jar/cookie_jar.dart';\nimport 'package:dio/dio.dart';\nimport 'package:dio_cookie_manager/dio_cookie_manager.dart';\n\nvoid main() async {\n  final dio = Dio();\n  final cookieJar = CookieJar();\n  dio.interceptors.add(CookieManager(cookieJar));\n  // First request, and save cookies (CookieManager do it).\n  await dio.get(\"https://dart.dev\");\n  // Print cookies\n  print(await cookieJar.loadForRequest(Uri.parse(\"https://dart.dev\")));\n  // Second request with the cookies\n  await dio.get('https://dart.dev');\n}\n```\n\n### Creates a `CookieManager`\n\n`CookieManager` is an interceptor that can help you to manage cookies automatically.\n`CookieManager` depends on the `cookie_jar` package:\n\n> The dio_cookie_manager manage API is based on the\n> [cookie_jar](https://github.com/flutterchina/cookie_jar).\n\n`CookieJar` manages cookies automatically, and it's memory-based.\nIf you want to persist cookies, you can use the `PersistCookieJar` class,\n`PersistCookieJar` persists the cookies in local files,\nthe cookies always exist unless `delete` is called explicitly.\n\n> [!NOTE]\n> The path for `PersistCookieJar` must be existed on devices and with write access when running in Flutter.\n> Use [path_provider](https://pub.dev/packages/path_provider) package to get a valid path.\n\nIn Flutter:\n```dart\nimport 'package:cookie_jar/cookie_jar.dart';\nimport 'package:dio/dio.dart';\nimport 'package:dio_cookie_manager/dio_cookie_manager.dart';\nimport 'package:path/path' as path;\n\nFuture<void> prepareCookieManager() async {\n  final directory = await getApplicationDocumentsDirectory();\n  final cookieJar = PersistCookieJar(\n    ignoreExpires: true,\n    storage: FileStorage(path.join(directory.path, \"/.cookies/\")),\n  );\n  dio.interceptors.add(CookieManager(cookieJar));\n}\n```\n\n### Handling Cookies with redirect requests\n\nRedirect requests require extra configuration to parse cookies correctly.\nIn shortly:\n- Set `followRedirects` to `false`.\n- Allow `statusCode` from `300` to `399` responses predicated as succeed.\n- Make further requests using the `HttpHeaders.locationHeader`.\n\nFor example:\n```dart\nvoid main() async {\n  final cookieJar = CookieJar();\n  final dio = Dio()\n    ..interceptors.add(CookieManager(cookieJar))\n    ..options.followRedirects = false\n    ..options.validateStatus =\n        (status) => status != null && status >= 200 && status < 400;\n  final redirected = await dio.get('/redirection');\n  final response = await dio.get(\n    redirected.headers.value(HttpHeaders.locationHeader)!,\n  );\n}\n```\n\n### Ignores invalid cookies\n\nBy default, the `CookieManager` will throw an error when parsing invalid cookies.\nYou can enable the `ignoreInvalidCookies` option to ignore them instead.\n\n```dart\nfinal cookieManager = CookieManager(cookieJar, ignoreInvalidCookies: true);\n// Or update it later.\ncookieManager.ignoreInvalidCookies = true;\n```\n"
  },
  {
    "path": "plugins/cookie_manager/analysis_options.yaml",
    "content": "include: ../../analysis_options.yaml\n"
  },
  {
    "path": "plugins/cookie_manager/dart_test.yaml",
    "content": "file_reporters:\n  json: build/reports/test-results.json\n\npresets:\n  # empty placeholders required in CI scripts\n  all:\n  default:\n  min:\n  stable:\n  beta:\n"
  },
  {
    "path": "plugins/cookie_manager/dio_cookie_manager.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/test\" isTestSource=\"true\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n  </component>\n</module>"
  },
  {
    "path": "plugins/cookie_manager/example/example.dart",
    "content": "import 'package:cookie_jar/cookie_jar.dart';\nimport 'package:dio/dio.dart';\nimport 'package:dio_cookie_manager/dio_cookie_manager.dart';\n\nvoid main() async {\n  final dio = Dio();\n  final cookieJar = CookieJar();\n  dio.interceptors.add(CookieManager(cookieJar));\n  await dio.get('https://baidu.com/');\n  // Print cookies\n  print(cookieJar.loadForRequest(Uri.parse('https://baidu.com/')));\n  // second request with the cookie\n  await dio.get('https://baidu.com/');\n}\n"
  },
  {
    "path": "plugins/cookie_manager/lib/dio_cookie_manager.dart",
    "content": "library dio_cookie_manager;\n\nexport 'src/cookie_mgr.dart';\nexport 'src/exception.dart';\n"
  },
  {
    "path": "plugins/cookie_manager/lib/src/cookie_mgr.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:cookie_jar/cookie_jar.dart';\nimport 'package:dio/dio.dart';\n\nimport 'exception.dart';\n\nconst _kIsWebInterop = bool.fromEnvironment('dart.library.js_interop');\nconst _kIsWebUtil = bool.fromEnvironment('dart.library.js_util');\nconst _kIsWeb = _kIsWebInterop || _kIsWebUtil || identical(0, 0.0);\n\n/// - `(?<=)` is a positive lookbehind assertion that matches a comma (\",\")\n/// only if it's preceded by a specific pattern. In this case, the lookbehind\n/// assertion is empty, which means it matches any comma that's preceded by any character.\n/// - `(,)` captures the comma as a group.\n/// - `(?=[^;]+?=)` is a positive lookahead assertion that matches a comma only\n/// if it's followed by a specific pattern. In this case, it matches any comma\n/// that's followed by one or more characters that are not semicolons (\";\") and\n/// then an equals sign (\"=\"). This ensures that the comma is not part of a cookie\n/// attribute like \"expires=Sun, 19 Feb 3000 01:43:15 GMT\", which could also contain commas.\nfinal _setCookieReg = RegExp('(?<=)(,)(?=[^;]+?=)');\n\n/// Cookie manager for HTTP requests based on [CookieJar].\nclass CookieManager extends Interceptor {\n  CookieManager(\n    this.cookieJar, {\n    this.ignoreInvalidCookies = false,\n  }) : assert(!_kIsWeb, \"Don't use the manager in Web environments.\");\n\n  /// The cookie jar used to load and save cookies.\n  ///\n  /// See also:\n  /// * [CookieJar]\n  /// * [PersistCookieJar]\n  final CookieJar cookieJar;\n\n  /// Whether to ignore invalid cookies during parsing or saving.\n  bool ignoreInvalidCookies;\n\n  /// Merge cookies into a Cookie string.\n  /// Cookies with longer paths are listed before cookies with shorter paths.\n  static String getCookies(List<Cookie> cookies) {\n    // Sort cookies by path (longer path first).\n    cookies.sort((a, b) {\n      if (a.path == null && b.path == null) {\n        return 0;\n      } else if (a.path == null) {\n        return -1;\n      } else if (b.path == null) {\n        return 1;\n      } else {\n        return b.path!.length.compareTo(a.path!.length);\n      }\n    });\n    return cookies.map((cookie) => '${cookie.name}=${cookie.value}').join('; ');\n  }\n\n  @override\n  Future<void> onRequest(\n    RequestOptions options,\n    RequestInterceptorHandler handler,\n  ) async {\n    try {\n      final cookies = await loadCookies(options);\n      options.headers[HttpHeaders.cookieHeader] =\n          cookies.isNotEmpty ? cookies : null;\n      handler.next(options);\n    } catch (e, s) {\n      final exception = DioException(\n        requestOptions: options,\n        type: DioExceptionType.unknown,\n        error: CookieManagerLoadException(error: e, stackTrace: s),\n        message: 'Failed to load cookies for the request.',\n      );\n      handler.reject(exception, true);\n    }\n  }\n\n  @override\n  Future<void> onResponse(\n    Response response,\n    ResponseInterceptorHandler handler,\n  ) async {\n    try {\n      await saveCookies(response);\n      handler.next(response);\n    } catch (e, s) {\n      final exception = DioException(\n        requestOptions: response.requestOptions,\n        response: response,\n        type: DioExceptionType.unknown,\n        error: CookieManagerSaveException(\n          response: response,\n          error: e,\n          stackTrace: s,\n          dioException: null,\n        ),\n        stackTrace: s,\n      );\n      handler.reject(exception, true);\n    }\n  }\n\n  @override\n  Future<void> onError(\n    DioException err,\n    ErrorInterceptorHandler handler,\n  ) async {\n    final response = err.response;\n    if (response == null) {\n      handler.next(err);\n      return;\n    }\n\n    try {\n      await saveCookies(response);\n      handler.next(err);\n    } catch (e, s) {\n      final exception = DioException(\n        requestOptions: response.requestOptions,\n        response: response,\n        type: DioExceptionType.unknown,\n        error: CookieManagerSaveException(\n          response: response,\n          error: e,\n          stackTrace: s,\n          dioException: err,\n        ),\n        stackTrace: s,\n      );\n      handler.next(exception);\n    }\n  }\n\n  Cookie? _fromSetCookieValue(String value) {\n    try {\n      return Cookie.fromSetCookieValue(value);\n    } on HttpException catch (_) {\n      if (ignoreInvalidCookies) {\n        return null;\n      }\n      rethrow;\n    }\n  }\n\n  /// Load cookies in cookie string for the request.\n  Future<String> loadCookies(RequestOptions options) async {\n    final savedCookies = await cookieJar.loadForRequest(options.uri);\n    final previousCookies =\n        options.headers[HttpHeaders.cookieHeader] as String?;\n    final cookies = getCookies([\n      ...?previousCookies\n          ?.split(';')\n          .where((e) => e.isNotEmpty)\n          .map((c) => _fromSetCookieValue(c))\n          .whereType<Cookie>(), // Use .nonNulls when the minimum SDK is 3.0.\n      ...savedCookies,\n    ]);\n    return cookies;\n  }\n\n  /// Save cookies from the response including redirected requests.\n  Future<void> saveCookies(Response response) async {\n    final setCookies = response.headers[HttpHeaders.setCookieHeader];\n    if (setCookies == null || setCookies.isEmpty) {\n      return;\n    }\n\n    final List<Cookie> cookies = setCookies\n        .map((str) => str.split(_setCookieReg))\n        .expand((cookie) => cookie)\n        .where((cookie) => cookie.isNotEmpty)\n        .map((str) => _fromSetCookieValue(str))\n        .whereType<Cookie>() // Use .nonNulls when the minimum SDK is 3.0.\n        .toList();\n\n    // Saving cookies for the original site.\n    // Spec: https://www.rfc-editor.org/rfc/rfc7231#section-7.1.2.\n    final originalUri = response.requestOptions.uri;\n    final realUri = originalUri.resolveUri(response.realUri);\n    await cookieJar.saveFromResponse(realUri, cookies);\n\n    // Handle `Set-Cookie` when `followRedirects` is false\n    // and the response returns a redirect status code.\n    final statusCode = response.statusCode ?? 0;\n    // 300 indicates the URL has multiple choices, so here we use list literal.\n    final locations = response.headers[HttpHeaders.locationHeader] ?? [];\n    // We don't want to explicitly consider recursive redirections\n    // cookie handling here, because when `followRedirects` is set to false,\n    // users will be available to handle cookies themselves.\n    final redirected = statusCode >= 300 && statusCode < 400;\n    if (redirected && locations.isNotEmpty) {\n      final originalUri = response.realUri;\n      await Future.wait(\n        locations.map(\n          (location) => cookieJar.saveFromResponse(\n            // Resolves the location based on the current Uri.\n            originalUri.resolve(location),\n            cookies,\n          ),\n        ),\n      );\n    }\n  }\n}\n"
  },
  {
    "path": "plugins/cookie_manager/lib/src/exception.dart",
    "content": "import 'package:dio/dio.dart';\n\n/// Thrown when the cookie manager fails to load cookies.\nclass CookieManagerLoadException implements Exception {\n  CookieManagerLoadException({\n    required this.error,\n    required this.stackTrace,\n  });\n\n  final Object error;\n  final StackTrace stackTrace;\n\n  @override\n  String toString() => 'CookieManagerLoadException: $error';\n}\n\n/// Thrown when the cookie manager fails to save cookies.\nclass CookieManagerSaveException implements Exception {\n  CookieManagerSaveException({\n    required this.response,\n    required this.error,\n    required this.stackTrace,\n    required this.dioException,\n  });\n\n  final Response response;\n  final Object error;\n  final StackTrace stackTrace;\n  final DioException? dioException;\n\n  @override\n  String toString() => 'CookieManagerSaveException: $error';\n}\n"
  },
  {
    "path": "plugins/cookie_manager/pubspec.yaml",
    "content": "name: dio_cookie_manager\nversion: 3.4.0\n\ndescription: A cookie manager combines cookie_jar and dio, based on the interceptor algorithm.\ntopics:\n  - dio\n  - cookie\n  - network\n  - storage\n  - persistence\nhomepage: https://github.com/cfug/dio\nrepository: https://github.com/cfug/dio/blob/main/plugins/cookie_manager\nissue_tracker: https://github.com/cfug/dio/issues\n\nenvironment:\n  sdk: \">=2.18.0 <4.0.0\"\n\ndependencies:\n  cookie_jar: ^4.0.0\n  dio: ^5.2.0\n\ndev_dependencies:\n  lints: any\n  test: ^1.16.4\n"
  },
  {
    "path": "plugins/cookie_manager/test/basic_test.dart",
    "content": "@TestOn('vm')\nimport 'package:cookie_jar/cookie_jar.dart';\nimport 'package:dio/dio.dart';\nimport 'package:dio_cookie_manager/dio_cookie_manager.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('cookie-jar', () async {\n    final dio = Dio();\n    final cookieJar = CookieJar();\n    dio.interceptors.add(CookieManager(cookieJar));\n    await dio.get('https://pub.dev/');\n    // second request with the cookie\n    await dio.get('https://pub.dev/');\n  });\n}\n"
  },
  {
    "path": "plugins/cookie_manager/test/cookies_persistance_test.dart",
    "content": "@TestOn('vm')\nimport 'dart:collection';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:cookie_jar/cookie_jar.dart';\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\nimport 'package:dio_cookie_manager/dio_cookie_manager.dart';\nimport 'package:test/fake.dart';\nimport 'package:test/test.dart';\n\ntypedef _FetchCallback = Future<ResponseBody> Function(\n  RequestOptions options,\n  Stream<Uint8List>? requestStream,\n  Future<void>? cancelFuture,\n);\n\nclass _TestAdapter implements HttpClientAdapter {\n  _TestAdapter({required _FetchCallback fetch}) : _fetch = fetch;\n\n  final _FetchCallback _fetch;\n  final HttpClientAdapter _adapter = IOHttpClientAdapter();\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) =>\n      _fetch(options, requestStream, cancelFuture);\n\n  @override\n  void close({bool force = false}) {\n    _adapter.close(force: force);\n  }\n}\n\nclass _SaveCall {\n  _SaveCall(this.uri, this.cookies);\n\n  final String uri;\n  final String cookies;\n\n  @override\n  bool operator ==(Object other) =>\n      identical(this, other) ||\n      other is _SaveCall &&\n          runtimeType == other.runtimeType &&\n          uri == other.uri &&\n          cookies == other.cookies;\n\n  @override\n  int get hashCode => uri.hashCode ^ cookies.hashCode;\n\n  @override\n  String toString() {\n    return '_SaveCall{uri: $uri, cookies: $cookies}';\n  }\n}\n\nclass _FakeCookieJar extends Fake implements CookieJar {\n  final _saveCalls = <_SaveCall>[];\n\n  List<_SaveCall> get saveCalls => UnmodifiableListView(_saveCalls);\n\n  @override\n  Future<List<Cookie>> loadForRequest(Uri uri) async {\n    return const [];\n  }\n\n  @override\n  Future<void> saveFromResponse(Uri uri, List<Cookie> cookies) async {\n    _saveCalls.add(\n      _SaveCall(\n        uri.toString(),\n        cookies.join('; '),\n      ),\n    );\n  }\n}\n\nvoid main() {\n  group('CookieJar.saveFromResponse()', () {\n    test(\n      'is called with a full Uri for requests that had relative redirects',\n      () async {\n        final cookieJar = _FakeCookieJar();\n        final dio = Dio()\n          ..httpClientAdapter = _TestAdapter(\n            fetch: (options, requestStream, cancelFuture) async => ResponseBody(\n              Stream.value(Uint8List.fromList(utf8.encode(''))),\n              HttpStatus.ok,\n              redirects: [\n                RedirectRecord(\n                  HttpStatus.found,\n                  'GET',\n                  Uri(path: 'redirect'),\n                ),\n              ],\n              headers: {\n                HttpHeaders.setCookieHeader: ['Cookie1=value1; Path=/'],\n              },\n            ),\n          )\n          ..interceptors.add(CookieManager(cookieJar))\n          ..options.validateStatus =\n              (status) => status != null && status >= 200 && status < 400;\n\n        await dio.get('https://test.com');\n        expect(cookieJar.saveCalls, [\n          _SaveCall(\n            'https://test.com/redirect',\n            'Cookie1=value1; Path=/',\n          ),\n        ]);\n      },\n    );\n\n    test(\n      'saves cookies only for final destination upon non-relative redirects',\n      () async {\n        final cookieJar = _FakeCookieJar();\n        final dio = Dio()\n          ..httpClientAdapter = _TestAdapter(\n            fetch: (options, requestStream, cancelFuture) async => ResponseBody(\n              Stream.value(Uint8List.fromList(utf8.encode(''))),\n              HttpStatus.ok,\n              redirects: [\n                RedirectRecord(\n                  HttpStatus.found,\n                  'GET',\n                  Uri.parse('https://example.com/redirect'),\n                ),\n              ],\n              headers: {\n                HttpHeaders.setCookieHeader: ['Cookie1=value1; Path=/'],\n              },\n            ),\n          )\n          ..interceptors.add(CookieManager(cookieJar))\n          ..options.validateStatus =\n              (status) => status != null && status >= 200 && status < 400;\n\n        await dio.get('https://test.com');\n        expect(cookieJar.saveCalls, [\n          _SaveCall(\n            'https://example.com/redirect',\n            'Cookie1=value1; Path=/',\n          ),\n        ]);\n      },\n    );\n  });\n}\n"
  },
  {
    "path": "plugins/cookie_manager/test/cookies_test.dart",
    "content": "@TestOn('vm')\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:cookie_jar/cookie_jar.dart';\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\nimport 'package:dio_cookie_manager/dio_cookie_manager.dart';\nimport 'package:test/test.dart';\n\nclass MockRequestInterceptorHandler extends RequestInterceptorHandler {\n  MockRequestInterceptorHandler(this.expectResult);\n\n  final String expectResult;\n\n  @override\n  void next(RequestOptions requestOptions) {\n    final c = requestOptions.headers[HttpHeaders.cookieHeader];\n    expect(c == expectResult, true);\n    super.next(requestOptions);\n  }\n}\n\nclass MockResponseInterceptorHandler extends ResponseInterceptorHandler {}\n\nclass _MockRejectRequestInterceptorHandler extends RequestInterceptorHandler {\n  _MockRejectRequestInterceptorHandler(this.matcher);\n\n  final Matcher matcher;\n\n  @override\n  void reject(\n    DioException error, [\n    bool callFollowingErrorInterceptor = false,\n  ]) {\n    expect(error, matcher);\n  }\n}\n\nclass _MockRejectResponseInterceptorHandler extends ResponseInterceptorHandler {\n  _MockRejectResponseInterceptorHandler(this.matcher);\n\n  final Matcher matcher;\n\n  @override\n  void reject(\n    DioException error, [\n    bool callFollowingErrorInterceptor = false,\n  ]) {\n    expect(error, matcher);\n  }\n}\n\nclass _MockRejectErrorInterceptorHandler extends ErrorInterceptorHandler {\n  _MockRejectErrorInterceptorHandler(this.matcher);\n\n  final Matcher matcher;\n\n  @override\n  void next(DioException error) {\n    expect(error, matcher);\n  }\n}\n\nclass _MockNextErrorInterceptorHandler extends ErrorInterceptorHandler {\n  _MockNextErrorInterceptorHandler(this.onNext);\n\n  final void Function() onNext;\n\n  @override\n  void next(DioException error) {\n    onNext();\n  }\n}\n\nclass _OverrideCookieManager extends CookieManager {\n  _OverrideCookieManager(super.cookieJar);\n\n  @override\n  Future<String> loadCookies(RequestOptions options) async {\n    await Future.microtask(() {});\n    throw 'unexpected load';\n  }\n\n  @override\n  Future<void> saveCookies(Response response) async {\n    await Future.microtask(() {});\n    throw 'unexpected save';\n  }\n}\n\nvoid main() {\n  test('testing merge cookies', () async {\n    const List<String> mockFirstRequestCookies = [\n      'foo=bar; Path=/',\n      'a=c; Path=/',\n    ];\n    const exampleUrl = 'https://example.com';\n    const String mockSecondRequestCookies = 'd=e;e=f';\n\n    final expectResult = 'd=e; e=f; foo=bar; a=c';\n\n    final cookieJar = CookieJar();\n    final cookieManager = CookieManager(cookieJar);\n\n    // Saving mock cookies.\n    final firstRequestOptions = RequestOptions(baseUrl: exampleUrl);\n    final mockResponse = Response(\n      requestOptions: firstRequestOptions,\n      headers: Headers.fromMap(\n        {HttpHeaders.setCookieHeader: mockFirstRequestCookies},\n      ),\n    );\n    final mockResponseInterceptorHandler = MockResponseInterceptorHandler();\n    await cookieManager.onResponse(\n      mockResponse,\n      mockResponseInterceptorHandler,\n    );\n\n    // Verify mock cookies.\n    final mockRequestInterceptorHandler =\n        MockRequestInterceptorHandler(expectResult);\n    final options = RequestOptions(\n      baseUrl: exampleUrl,\n      headers: {\n        HttpHeaders.cookieHeader: mockSecondRequestCookies,\n      },\n    );\n    await cookieManager.onRequest(\n      options,\n      mockRequestInterceptorHandler,\n    );\n  });\n\n  group('Set-Cookie', () {\n    test('can be parsed correctly', () async {\n      const List<String> mockResponseCookies = [\n        'key=value; expires=Sun, 19 Feb 3000 00:42:14 GMT; path=/; HttpOnly; secure; SameSite=Lax',\n        'key1=value1; expires=Sun, 19 Feb 3000 01:43:15 GMT; path=/; HttpOnly; secure; SameSite=Lax, '\n            'key2=value2; expires=Sat, 20 May 3000 00:43:15 GMT; path=/; HttpOnly; secure; SameSite=Lax',\n      ];\n      const exampleUrl = 'https://example.com';\n\n      final expectResult = 'key=value; key1=value1; key2=value2';\n\n      final cookieJar = CookieJar();\n      final cookieManager = CookieManager(cookieJar);\n\n      // Saving mock cookies.\n      final requestOptions = RequestOptions(baseUrl: exampleUrl);\n      final mockResponse = Response(\n        requestOptions: requestOptions,\n        headers: Headers.fromMap(\n          {HttpHeaders.setCookieHeader: mockResponseCookies},\n        ),\n      );\n      final mockResponseInterceptorHandler = MockResponseInterceptorHandler();\n      await cookieManager.onResponse(\n        mockResponse,\n        mockResponseInterceptorHandler,\n      );\n\n      // Verify mock cookies.\n      final options = RequestOptions(baseUrl: exampleUrl);\n      final mockRequestInterceptorHandler =\n          MockRequestInterceptorHandler(expectResult);\n      await cookieManager.onRequest(\n        options,\n        mockRequestInterceptorHandler,\n      );\n    });\n\n    test('can be saved to the location', () async {\n      final cookieJar = CookieJar();\n      final dio = Dio()\n        ..httpClientAdapter = _RedirectAdapter()\n        ..interceptors.add(CookieManager(cookieJar))\n        ..options.followRedirects = false\n        ..options.validateStatus =\n            (status) => status != null && status >= 200 && status < 400;\n      await Future.wait(\n        ['/redirection', '/redirection1', '/redirection2', '/redirection3'].map(\n          (url) async {\n            final response1 = await dio.get(url);\n            expect(response1.realUri.path, url);\n            final cookies1 = await cookieJar.loadForRequest(response1.realUri);\n            expect(cookies1.length, 3);\n            final location1 = response1.realUri\n                .resolve(response1.headers.value(HttpHeaders.locationHeader)!)\n                .toString();\n            final response2 = await dio.get(location1);\n            expect(response2.realUri.toString(), location1);\n            final cookies2 = await cookieJar.loadForRequest(response2.realUri);\n            expect(cookies2.length, 3);\n            expect(\n              response2.requestOptions.headers[HttpHeaders.cookieHeader],\n              'key=value; key1=value1; key2=value2',\n            );\n          },\n        ),\n      );\n    });\n  });\n\n  group('Empty cookies', () {\n    test('not produced by default', () async {\n      final dio = Dio();\n      dio.interceptors.add(CookieManager(CookieJar()));\n      final response = await dio.get('http://www.gstatic.com/generate_204');\n      expect(response.requestOptions.headers[HttpHeaders.cookieHeader], null);\n    });\n\n    test('can be parsed', () async {\n      final dio = Dio();\n      dio.interceptors\n        ..add(\n          InterceptorsWrapper(\n            onRequest: (options, handler) {\n              // Write an empty cookie header.\n              options.headers[HttpHeaders.cookieHeader] = '';\n              handler.next(options);\n            },\n          ),\n        )\n        ..add(CookieManager(CookieJar()));\n      final response = await dio.get('http://www.gstatic.com/generate_204');\n      expect(response.requestOptions.headers[HttpHeaders.cookieHeader], null);\n    });\n  });\n\n  test('cookies replacement', () async {\n    final cookies = [\n      Cookie('foo', 'bar')..path = '/',\n      Cookie('a', 'c')..path = '/',\n    ];\n    final previousCookies = [\n      Cookie('foo', 'oldbar'),\n      Cookie('d', 'e'),\n      Cookie('e', 'f'),\n    ];\n    final newCookies = CookieManager.getCookies(\n      [\n        ...previousCookies,\n        ...cookies,\n      ],\n    );\n    expect(newCookies, 'foo=oldbar; d=e; e=f; foo=bar; a=c');\n  });\n\n  test('RFC6265 5.4 #2 sorting', () async {\n    // To test cookies with longer paths are listed before\n    // cookies with shorter paths.\n    final cookies = [\n      Cookie('a', 'k'),\n      Cookie('a', 'b')..path = '/',\n      Cookie('c', 'd')..path = '/foo',\n      Cookie('e', 'f')..path = '/foo/bar',\n      Cookie('g', 'h')..path = '/foo/bar/baz',\n      Cookie('i', 'j'),\n    ];\n    final newCookies = CookieManager.getCookies(cookies);\n    expect(newCookies, 'a=k; i=j; g=h; e=f; c=d; a=b');\n  });\n\n  group('ignoreInvalidCookies', () {\n    const exampleUrl = 'https://example.com';\n\n    // \"Secure\" is an invalid Set-Cookie value since it has no name=value pair,\n    // which is the exact scenario from issue #2492.\n    const invalidSetCookie = 'Secure';\n    const validSetCookie = 'valid=cookie; path=/';\n\n    test('throws by default when Set-Cookie header is invalid', () async {\n      final cookieJar = CookieJar();\n      final cookieManager = CookieManager(cookieJar);\n\n      final requestOptions = RequestOptions(baseUrl: exampleUrl);\n      final mockResponse = Response(\n        requestOptions: requestOptions,\n        headers: Headers.fromMap({\n          HttpHeaders.setCookieHeader: [invalidSetCookie],\n        }),\n      );\n\n      final handler = _MockRejectResponseInterceptorHandler(\n        isA<DioException>()\n            .having((e) => e.type, 'type', equals(DioExceptionType.unknown))\n            .having(\n              (e) => e.error,\n              'error',\n              isA<CookieManagerSaveException>(),\n            ),\n      );\n      await cookieManager.onResponse(mockResponse, handler);\n    });\n\n    test('ignores invalid Set-Cookie header when enabled', () async {\n      final cookieJar = CookieJar();\n      final cookieManager = CookieManager(\n        cookieJar,\n        ignoreInvalidCookies: true,\n      );\n\n      final requestOptions = RequestOptions(baseUrl: exampleUrl);\n      final mockResponse = Response(\n        requestOptions: requestOptions,\n        headers: Headers.fromMap({\n          HttpHeaders.setCookieHeader: [invalidSetCookie],\n        }),\n      );\n\n      final handler = MockResponseInterceptorHandler();\n      await cookieManager.onResponse(mockResponse, handler);\n\n      final savedCookies =\n          await cookieJar.loadForRequest(Uri.parse(exampleUrl));\n      expect(savedCookies, isEmpty);\n    });\n\n    test('preserves valid cookies alongside invalid ones when enabled',\n        () async {\n      final cookieJar = CookieJar();\n      final cookieManager = CookieManager(\n        cookieJar,\n        ignoreInvalidCookies: true,\n      );\n\n      final requestOptions = RequestOptions(baseUrl: exampleUrl);\n      final mockResponse = Response(\n        requestOptions: requestOptions,\n        headers: Headers.fromMap(\n          {\n            HttpHeaders.setCookieHeader: [validSetCookie, invalidSetCookie],\n          },\n        ),\n      );\n\n      final handler = MockResponseInterceptorHandler();\n      await cookieManager.onResponse(mockResponse, handler);\n\n      final savedCookies =\n          await cookieJar.loadForRequest(Uri.parse(exampleUrl));\n      expect(savedCookies.length, 1);\n      expect(savedCookies.first.name, 'valid');\n      expect(savedCookies.first.value, 'cookie');\n    });\n\n    test('ignores invalid Set-Cookie header in onError when enabled', () async {\n      final cookieJar = CookieJar();\n      final cookieManager = CookieManager(\n        cookieJar,\n        ignoreInvalidCookies: true,\n      );\n\n      final requestOptions = RequestOptions(baseUrl: exampleUrl);\n      final mockResponse = Response(\n        requestOptions: requestOptions,\n        headers: Headers.fromMap(\n          {\n            HttpHeaders.setCookieHeader: [validSetCookie, invalidSetCookie],\n          },\n        ),\n      );\n      final error = DioException(\n        requestOptions: requestOptions,\n        response: mockResponse,\n      );\n\n      bool nextCalled = false;\n      final handler = _MockNextErrorInterceptorHandler(() {\n        nextCalled = true;\n      });\n      await cookieManager.onError(error, handler);\n\n      expect(nextCalled, isTrue);\n      final savedCookies =\n          await cookieJar.loadForRequest(Uri.parse(exampleUrl));\n      expect(savedCookies.length, 1);\n      expect(savedCookies.first.name, 'valid');\n    });\n  });\n\n  test('throws as expected', () async {\n    final cookieManager = _OverrideCookieManager(CookieJar());\n\n    final loadExceptionMatcher = isA<DioException>()\n        .having((e) => e.type, 'type', equals(DioExceptionType.unknown))\n        .having(\n          (e) => e.error,\n          'error',\n          isA<CookieManagerLoadException>()\n              .having((e) => e.error, 'error', 'unexpected load'),\n        );\n\n    final saveExceptionMatcher = isA<DioException>()\n        .having((e) => e.type, 'type', equals(DioExceptionType.unknown))\n        .having(\n          (e) => e.error,\n          'error',\n          isA<CookieManagerSaveException>()\n              .having((e) => e.error, 'error', 'unexpected save'),\n        );\n\n    final mockRequestInterceptorHandler = _MockRejectRequestInterceptorHandler(\n      loadExceptionMatcher,\n    );\n    final options = RequestOptions();\n    await cookieManager.onRequest(\n      options,\n      mockRequestInterceptorHandler,\n    );\n\n    final mockResponseInterceptorHandler =\n        _MockRejectResponseInterceptorHandler(saveExceptionMatcher);\n    final requestOptions = RequestOptions();\n    final response = Response(requestOptions: requestOptions);\n    await cookieManager.onResponse(\n      response,\n      mockResponseInterceptorHandler,\n    );\n\n    final mockErrorInterceptorHandler =\n        _MockRejectErrorInterceptorHandler(saveExceptionMatcher);\n    final error =\n        DioException(requestOptions: requestOptions, response: response);\n    await cookieManager.onError(error, mockErrorInterceptorHandler);\n  });\n}\n\nclass _RedirectAdapter implements HttpClientAdapter {\n  final HttpClientAdapter _adapter = IOHttpClientAdapter();\n\n  static const List<String> _setCookieHeaders = [\n    'key=value; expires=Sun, 19 Feb 3000 00:42:14 GMT; path=/; HttpOnly; secure; SameSite=Lax, '\n        'key1=value1; expires=Sun, 19 Feb 3000 01:43:15 GMT; path=/; HttpOnly; secure; SameSite=Lax, '\n        'key2=value2; expires=Sat, 20 May 3000 00:43:15 GMT; path=/; HttpOnly; secure; SameSite=Lax',\n  ];\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) async {\n    final Uri uri = options.uri;\n    final int statusCode = HttpStatus.found;\n    switch (uri.path) {\n      case '/redirection':\n        return ResponseBody.fromString(\n          '',\n          statusCode,\n          headers: {\n            HttpHeaders.locationHeader: [\n              uri.replace(path: '/destination').toString(),\n            ],\n            HttpHeaders.setCookieHeader: _setCookieHeaders,\n          },\n        );\n      case '/redirection1':\n        return ResponseBody.fromString(\n          '',\n          statusCode,\n          headers: {\n            HttpHeaders.locationHeader: ['/destination'],\n            HttpHeaders.setCookieHeader: _setCookieHeaders,\n          },\n        );\n      case '/redirection2':\n        return ResponseBody.fromString(\n          '',\n          statusCode,\n          headers: {\n            HttpHeaders.locationHeader: ['destination?param1=true'],\n            HttpHeaders.setCookieHeader: _setCookieHeaders,\n          },\n        );\n      case '/redirection3':\n        return ResponseBody.fromString(\n          '',\n          statusCode,\n          headers: {\n            HttpHeaders.locationHeader: ['www.google.com/test-path'],\n            HttpHeaders.setCookieHeader: _setCookieHeaders,\n          },\n        );\n      default:\n        return ResponseBody.fromString('', HttpStatus.ok);\n    }\n  }\n\n  @override\n  void close({bool force = false}) {\n    _adapter.close(force: force);\n  }\n}\n"
  },
  {
    "path": "plugins/http2_adapter/.gitignore",
    "content": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\n\n# IntelliJ related\n*.ipr\n*.iws\n.idea/\n\n# The .vscode folder contains launch configuration and tasks you configure in\n# VS Code which you may wish to be included in version control, so this line\n# is commented out by default.\n#.vscode/\n\n# Flutter/Dart/Pub related\n**/doc/api/\n.dart_tool/\n.flutter-plugins\n.packages\n.pub-cache/\n.pub/\nbuild/\n\ncoverage\n\ntest/_pinning_http2.txt\n"
  },
  {
    "path": "plugins/http2_adapter/.metadata",
    "content": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrades etc.\n#\n# This file should be version controlled and should not be manually edited.\n\nversion:\n  revision: 32c946f31bfff6c766229d7b85ef0ae70de2c89a\n  channel: master\n\nproject_type: package\n"
  },
  {
    "path": "plugins/http2_adapter/CHANGELOG.md",
    "content": "# CHANGELOG\n\n**Before you upgrade: Breaking changes might happen in major and minor versions of packages.<br/>\nSee the [Migration Guide][] for the complete breaking changes list.**\n\n## Unreleased\n\n*None.*\n\n## 2.7.0\n\n- Fix inconsistent cache key format in `_ConnectionManager` between `getConnection()` and `_connect()`,\n  which caused `_transportsMap.remove()` to fail silently during idle timeout cleanup and led to memory leaks.\n- Add `handshakeTimeout` (defaults to 15 seconds) to the `ConnectionManager` to prevent long waiting\n  if there's something wrong with the handshake procedure.\n- Provides `httpVersion` in `Response.extra`.\n\n## 2.6.0\n\n- Make cached connections respect redirections and scheme.\n\n## 2.5.3\n\n- Improves memory allocating when using `CancelToken`.\n\n## 2.5.2\n\n- Remove client stream termination in `Http2Adapter`.\n\n## 2.5.1\n\n- Wrap `SocketException` in `DioExceptionType.connectionError`\n  instead of `DioExceptionType.unknown`.\n\n## 2.5.0\n\n- Fix cancellation for streamed responses and downloads.\n- Fix progress for streamed responses and downloads.\n- Bump minimum Dart SDK to 3.0.0 as required by the `http2` package.\n- Allows `HTTP/1.0` when connecting to proxies.\n- Add the ability to use a fallback `HttpClientAdapter`\n  when HTTP/2 is unavailable for the current request.\n\n## 2.4.0\n\n- Support non-TLS connection requests.\n- Improve the implementation of `receiveTimeout`.\n- Add more header value types implicit support.\n\n## 2.3.2\n\n- Implement `sendTimeout` and `receiveTimeout` for the adapter.\n- Fix redirect not working when requestStream is null.\n- Ignores `Duration.zero` timeouts.\n\n## 2.3.1+1\n\n- Add topics to packages.\n\n## 2.3.1\n\n- Fix cached `initFuture` not remove when throw exception.\n\n## 2.3.0\n\n- Replace `DioError` with `DioException`.\n\n## 2.2.0\n\n- Support proxy for the adapter.\n- Improve code formats according to linter rules.\n\n## 2.1.0\n\n- For the `dio`'s 5.0 release.\n- Add `validateCertificate` for `ClientSetting`.\n\n## 2.0.0\n\n- support dio 4.0.0\n\n## 2.0.0-beta2\n\n- support null-safety\n- support dio 4.x\n\n## 1.0.1 - 2020.8.7\n\n- merge #760\n\n## 1.0.0 - 2019.9.18\n\n- Support redirect\n\n## 0.0.2 - 2019.9.17\n\n- A Dio HttpAdapter which support Http/2.0.\n\n[Migration Guide]: doc/migration_guide.md\n"
  },
  {
    "path": "plugins/http2_adapter/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Wen Du (wendux)\nCopyright (c) 2022 The CFUG Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "plugins/http2_adapter/README.md",
    "content": "# dio_http2_adapter\n\n[![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg)](https://pub.dev/packages/dio_http2_adapter)\n\nAn adapter that combines HTTP/2 and dio. Supports reusing connections, header compression, etc.\n\n## Getting Started\n\n### Install\n\nAdd the `dio_http2_adapter` package to your\n[pubspec dependencies](https://pub.dev/packages/dio_http2_adapter/install).\n\n### Usage\n\n```dart\nimport 'package:dio/dio.dart';\nimport 'package:dio_http2_adapter/dio_http2_adapter.dart';\n\nvoid main() async {\n  final dio = Dio()\n    ..options.baseUrl = 'https://pub.dev'\n    ..interceptors.add(LogInterceptor())\n    ..httpClientAdapter = Http2Adapter(\n      ConnectionManager(idleTimeout: Duration(seconds: 10)),\n    );\n\n  Response<String> response;\n  response = await dio.get('/?xx=6');\n  for (final e in response.redirects) {\n    print('redirect: ${e.statusCode} ${e.location}');\n  }\n  print(response.data);\n}\n```\n\n### Ignoring a bad certificate\n\n```dart\nvoid main() async {\n  final dio = Dio()\n    ..options.baseUrl = 'https://pub.dev'\n    ..interceptors.add(LogInterceptor())\n    ..httpClientAdapter = Http2Adapter(\n      ConnectionManager(\n        idleTimeout: Duration(seconds: 10),\n        onClientCreate: (_, config) => config.onBadCertificate = (_) => true,\n      ),\n    );\n}\n```\n\n### Configuring the proxy\n\n```dart\nvoid main() async {\n  final dio = Dio()\n    ..options.baseUrl = 'https://pub.dev'\n    ..interceptors.add(LogInterceptor())\n    ..httpClientAdapter = Http2Adapter(\n      ConnectionManager(\n        idleTimeout: Duration(seconds: 10),\n        onClientCreate: (_, config) =>\n            config.proxy = Uri.parse('http://login:password@192.168.0.1:8888'),\n      ),\n    );\n}\n```\n"
  },
  {
    "path": "plugins/http2_adapter/analysis_options.yaml",
    "content": "include: ../../analysis_options.yaml\n"
  },
  {
    "path": "plugins/http2_adapter/dart_test.yaml",
    "content": "file_reporters:\n  json: build/reports/test-results.json\n\npresets:\n  # empty placeholders required in CI scripts\n  all:\n  default:\n  min:\n  stable:\n  beta:\n\ntags:\n  tls:\n    skip: \"Skipping TLS test with specific setup requirements by default. Use '-P all' to run all tests.\"\n    presets:\n      all:\n        skip: false\n      default:\n        skip: true\n  proxy:\n    skip: \"Skipping proxy test with specific setup requirements by default. Use '-P all' to run all tests.\"\n    presets:\n      all:\n        skip: false\n      default:\n        skip: true\n"
  },
  {
    "path": "plugins/http2_adapter/dio_http2_adapter.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/test\" isTestSource=\"true\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n  </component>\n</module>"
  },
  {
    "path": "plugins/http2_adapter/doc/migration_guide.md",
    "content": "# Migration Guide\n\nThis document gathered all breaking changes and migrations requirement between versions.\n\n<!--\nWhen new content need to be added to the migration guide, make sure they're following the format:\n1. Add a version in the *Breaking versions* section, with a version anchor.\n2. Use *Summary* and *Details* to introduce the migration.\n-->\n\n## Breaking versions\n\n- [2.6.0](#260)\n\n## 2.6.0\n\n### Summary\n\n- `ConnectionManager.getConnection` now requires redirection records as a parameter.\n\n### Details\n\n#### `ConnectionManager.getConnection`\n\n```diff\n /// Get the connection(may reuse) for each request.\n Future<ClientTransportConnection> getConnection(\n   RequestOptions options,\n+  List<RedirectRecord> redirects,\n );\n```\n"
  },
  {
    "path": "plugins/http2_adapter/example/example.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:dio_http2_adapter/dio_http2_adapter.dart';\n\nvoid main() async {\n  final dio = Dio()\n    ..options.baseUrl = 'https://pub.dev'\n    ..interceptors.add(LogInterceptor())\n    ..httpClientAdapter = Http2Adapter(\n      ConnectionManager(idleTimeout: const Duration(seconds: 10)),\n    );\n\n  Response<String> response;\n  response = await dio.get('/?xx=6');\n  for (final e in response.redirects) {\n    print('redirect: ${e.statusCode} ${e.location}');\n  }\n  print(response.data);\n}\n"
  },
  {
    "path": "plugins/http2_adapter/lib/dio_http2_adapter.dart",
    "content": "library dio_http2_adapter;\n\nexport 'src/http2_adapter.dart';\n"
  },
  {
    "path": "plugins/http2_adapter/lib/src/client_setting.dart",
    "content": "part of 'http2_adapter.dart';\n\ntypedef ValidateCertificate = bool Function(\n  X509Certificate? certificate,\n  String host,\n  int port,\n);\n\nclass ClientSetting {\n  /// The certificate provided by the server is checked\n  /// using the trusted certificates set in the SecurityContext object.\n  /// The default SecurityContext object contains a built-in set of trusted\n  /// root certificates for well-known certificate authorities.\n  SecurityContext? context;\n\n  /// [onBadCertificate] is an optional handler for unverifiable certificates.\n  /// The handler receives the [X509Certificate], and can inspect it and\n  /// decide (or let the user decide) whether to accept\n  /// the connection or not.  The handler should return true\n  /// to continue the [SecureSocket] connection.\n  bool Function(X509Certificate certificate)? onBadCertificate;\n\n  /// Allows the user to decide if the response certificate is good.\n  /// If this function is missing, then the certificate is allowed.\n  /// This method is called only if both the [SecurityContext] and\n  /// [badCertificateCallback] accept the certificate chain. Those\n  /// methods evaluate the root or intermediate certificate, while\n  /// [validateCertificate] evaluates the leaf certificate.\n  ValidateCertificate? validateCertificate;\n\n  /// Create clients with the given [proxy] setting.\n  /// When it's set, all HTTP/2 traffic from [Dio] will go through the proxy tunnel.\n  /// This setting uses [Uri] to correctly pass the scheme, address, and port of the proxy.\n  Uri? proxy;\n}\n"
  },
  {
    "path": "plugins/http2_adapter/lib/src/connection_manager.dart",
    "content": "part of 'http2_adapter.dart';\n\n/// {@template dio_http2_adapter.ConnectionManager}\n/// Manages the connections that should be reusable.\n/// It implements a connection reuse strategy for HTTP/2.\n/// {@endtemplate}\nabstract class ConnectionManager {\n  factory ConnectionManager({\n    Duration idleTimeout = const Duration(seconds: 15),\n    Duration handshakeTimout = const Duration(seconds: 15),\n    void Function(Uri uri, ClientSetting)? onClientCreate,\n    ProxyConnectedPredicate proxyConnectedPredicate =\n        defaultProxyConnectedPredicate,\n  }) =>\n      _ConnectionManager(\n        idleTimeout: idleTimeout,\n        handshakeTimeout: handshakeTimout,\n        onClientCreate: onClientCreate,\n        proxyConnectedPredicate: proxyConnectedPredicate,\n      );\n\n  /// Get the connection(may reuse) for each request.\n  Future<ClientTransportConnection> getConnection(\n    RequestOptions options,\n    List<RedirectRecord> redirects,\n  );\n\n  void removeConnection(ClientTransportConnection transport);\n\n  void close({bool force = false});\n\n  /// Returns the number of cached connections.\n  ///\n  /// This is exposed for testing purposes to verify that connections\n  /// are properly cleaned up after idle timeout.\n  @visibleForTesting\n  int get cachedConnectionsCount;\n}\n\n/// {@template dio_http2_adapter.ProxyConnectedPredicate}\n/// Checks whether the proxy has been connected through the given [status].\n/// {@endtemplate}\ntypedef ProxyConnectedPredicate = bool Function(String protocol, String status);\n\n/// Accepts HTTP/1.x connections for proxies.\nbool defaultProxyConnectedPredicate(String protocol, String status) {\n  return status.startsWith(RegExp(r'HTTP/1+\\.\\d 200'));\n}\n"
  },
  {
    "path": "plugins/http2_adapter/lib/src/connection_manager_imp.dart",
    "content": "part of 'http2_adapter.dart';\n\n/// Default implementation of ConnectionManager\nclass _ConnectionManager implements ConnectionManager {\n  _ConnectionManager({\n    Duration? idleTimeout,\n    Duration? handshakeTimeout,\n    this.onClientCreate,\n    this.proxyConnectedPredicate = defaultProxyConnectedPredicate,\n  })  : _idleTimeout = idleTimeout ?? const Duration(seconds: 1),\n        _handshakeTimeout = handshakeTimeout ?? const Duration(seconds: 15);\n\n  /// Callback when socket created.\n  ///\n  /// We can set trusted certificates and handler\n  /// for unverifiable certificates.\n  final void Function(Uri uri, ClientSetting)? onClientCreate;\n\n  /// {@macro dio_http2_adapter.ProxyConnectedPredicate}\n  final ProxyConnectedPredicate proxyConnectedPredicate;\n\n  /// Sets the idle timeout(milliseconds) of non-active persistent\n  /// connections. For the sake of socket reuse feature with http/2,\n  /// the value should not be less than 1 second.\n  final Duration _idleTimeout;\n\n  /// Sets the handshake timeout for secure socket connections.\n  ///\n  /// This timeout is applied to a future returned by [RawSecureSocket.secure],\n  /// which actually is a handshake future.\n  final Duration _handshakeTimeout;\n\n  /// Saving the reusable connections\n  final _transportsMap = <String, _ClientTransportConnectionState>{};\n\n  /// Saving the connecting futures\n  final _connectFutures = <String, Future<_ClientTransportConnectionState>>{};\n\n  bool _closed = false;\n  bool _forceClosed = false;\n\n  @override\n  @visibleForTesting\n  int get cachedConnectionsCount => _transportsMap.length;\n\n  /// Generates a consistent cache key for the given [uri].\n  ///\n  /// The key format is `scheme://host:port` (e.g., `https://example.com:443`).\n  /// This ensures consistency between storing and removing connections\n  /// from [_transportsMap].\n  String _getCacheKey(Uri uri) => '${uri.scheme}://${uri.host}:${uri.port}';\n\n  @override\n  Future<ClientTransportConnection> getConnection(\n    RequestOptions options,\n    List<RedirectRecord> redirects,\n  ) async {\n    if (_closed) {\n      throw Exception(\n        \"Can't establish connection after [ConnectionManager] closed!\",\n      );\n    }\n    Uri uri = options.uri;\n    if (redirects.isNotEmpty) {\n      uri = Http2Adapter.resolveRedirectUri(uri, redirects.last.location);\n    }\n    // Identify whether the connection can be reused.\n    // [Uri.scheme] is required when redirecting from non-TLS to TLS connection.\n    final transportCacheKey = _getCacheKey(uri);\n    _ClientTransportConnectionState? transportState =\n        _transportsMap[transportCacheKey];\n    if (transportState == null) {\n      Future<_ClientTransportConnectionState>? initFuture =\n          _connectFutures[transportCacheKey];\n      if (initFuture == null) {\n        _connectFutures[transportCacheKey] =\n            initFuture = _connect(options, redirects);\n      }\n      try {\n        transportState = await initFuture;\n      } catch (e) {\n        _connectFutures.remove(transportCacheKey);\n        rethrow;\n      }\n      if (_forceClosed) {\n        transportState.dispose();\n      } else {\n        _transportsMap[transportCacheKey] = transportState;\n        final _ = _connectFutures.remove(transportCacheKey);\n      }\n    } else {\n      // Check whether the connection is terminated, if it is, reconnecting.\n      if (!transportState.transport.isOpen) {\n        transportState.dispose();\n        _transportsMap[transportCacheKey] =\n            transportState = await _connect(options, redirects);\n      }\n    }\n    return transportState.activeTransport;\n  }\n\n  Future<_ClientTransportConnectionState> _connect(\n    RequestOptions options,\n    List<RedirectRecord> redirects,\n  ) async {\n    Uri uri = options.uri;\n    if (redirects.isNotEmpty) {\n      uri = Http2Adapter.resolveRedirectUri(uri, redirects.last.location);\n    }\n    final domain = _getCacheKey(uri);\n    final clientConfig = ClientSetting();\n    if (onClientCreate != null) {\n      onClientCreate!(uri, clientConfig);\n    }\n\n    // Allow [Socket] for non-TLS connections\n    // or [SecureSocket] for TLS connections.\n    late final Socket socket;\n    try {\n      socket = await _createSocket(uri, options, clientConfig);\n    } on SocketException catch (e) {\n      if (e.osError == null) {\n        if (e.message.contains('timed out')) {\n          throw DioException.connectionTimeout(\n            timeout: options.connectTimeout ?? Duration.zero,\n            requestOptions: options,\n          );\n        }\n      }\n      rethrow;\n    }\n\n    if (clientConfig.validateCertificate != null) {\n      final certificate =\n          socket is SecureSocket ? socket.peerCertificate : null;\n      final isCertApproved = clientConfig.validateCertificate!(\n        certificate,\n        uri.host,\n        uri.port,\n      );\n      if (!isCertApproved) {\n        // TODO(EVERYONE): Replace with DioException.badCertificate once upgrade dependencies Dio above 5.4.2.\n        throw DioException(\n          requestOptions: options,\n          type: DioExceptionType.badCertificate,\n          error: certificate,\n          message: 'The certificate of the response is not approved.',\n        );\n      }\n    }\n\n    // Config a ClientTransportConnection and save it\n    final transport = ClientTransportConnection.viaSocket(socket);\n    final transportState = _ClientTransportConnectionState(transport);\n    transport.onActiveStateChanged = (bool isActive) {\n      transportState.isActive = isActive;\n      if (!isActive) {\n        transportState.latestIdleTimeStamp = DateTime.now();\n      }\n    };\n\n    transportState.delayClose(\n      _closed ? const Duration(milliseconds: 50) : _idleTimeout,\n      () {\n        _transportsMap.remove(domain);\n        transportState.transport.finish();\n      },\n    );\n    return transportState;\n  }\n\n  Future<Socket> _createSocket(\n    Uri target,\n    RequestOptions options,\n    ClientSetting clientConfig,\n  ) async {\n    final timeout = (options.connectTimeout ?? Duration.zero) > Duration.zero\n        ? options.connectTimeout!\n        : null;\n    final proxy = clientConfig.proxy;\n\n    if (proxy == null) {\n      if (target.scheme != 'https') {\n        return Socket.connect(\n          target.host,\n          target.port,\n          timeout: timeout,\n        );\n      }\n      final socket = await SecureSocket.connect(\n        target.host,\n        target.port,\n        timeout: timeout,\n        context: clientConfig.context,\n        onBadCertificate: clientConfig.onBadCertificate,\n        supportedProtocols: ['h2'],\n      ).timeout(_handshakeTimeout);\n      _throwIfH2NotSelected(target, socket);\n      return socket;\n    }\n\n    final proxySocket = await Socket.connect(\n      proxy.host,\n      proxy.port,\n      timeout: timeout,\n    );\n\n    final String credentialsProxy = base64Encode(utf8.encode(proxy.userInfo));\n\n    // Create http tunnel proxy https://www.ietf.org/rfc/rfc2817.txt\n\n    // Use CRLF as the end of the line https://www.ietf.org/rfc/rfc2616.txt\n    const crlf = '\\r\\n';\n\n    // TODO(EVERYONE): Figure out why we can only use an HTTP/1.x proxy here.\n    const proxyProtocol = 'HTTP/1.1';\n    proxySocket.write('CONNECT ${target.host}:${target.port} $proxyProtocol');\n    proxySocket.write(crlf);\n    proxySocket.write('Host: ${target.host}:${target.port}');\n\n    if (credentialsProxy.isNotEmpty) {\n      proxySocket.write(crlf);\n      proxySocket.write('Proxy-Authorization: Basic $credentialsProxy');\n    }\n\n    proxySocket.write(crlf);\n    proxySocket.write(crlf);\n\n    final completerProxyInitialization = Completer<void>();\n\n    Never onProxyError(Object? error, StackTrace stackTrace) {\n      throw DioException(\n        requestOptions: options,\n        error: error,\n        type: DioExceptionType.connectionError,\n        stackTrace: stackTrace,\n      );\n    }\n\n    completerProxyInitialization.future.onError(onProxyError);\n\n    final proxySubscription = proxySocket.listen(\n      (event) {\n        final response = ascii.decode(event);\n        final lines = response.split(crlf);\n        final statusLine = lines.first;\n        if (!completerProxyInitialization.isCompleted) {\n          if (proxyConnectedPredicate(proxyProtocol, statusLine)) {\n            completerProxyInitialization.complete();\n          } else {\n            completerProxyInitialization.completeError(\n              SocketException(\n                'Proxy cannot be initialized with status = [$statusLine], '\n                'host = ${target.host}, port = ${target.port}',\n              ),\n            );\n          }\n        }\n      },\n      onError: (e, s) {\n        if (!completerProxyInitialization.isCompleted) {\n          completerProxyInitialization.completeError(e, s);\n        }\n      },\n    );\n    await completerProxyInitialization.future;\n\n    final socket = await SecureSocket.secure(\n      proxySocket,\n      host: target.host,\n      context: clientConfig.context,\n      onBadCertificate: clientConfig.onBadCertificate,\n      supportedProtocols: ['h2'],\n    ).timeout(_handshakeTimeout);\n    _throwIfH2NotSelected(target, socket);\n\n    proxySubscription.cancel();\n\n    return socket;\n  }\n\n  @override\n  void removeConnection(ClientTransportConnection transport) {\n    _ClientTransportConnectionState? transportState;\n    _transportsMap.removeWhere((_, state) {\n      if (state.transport == transport) {\n        transportState = state;\n        return true;\n      }\n      return false;\n    });\n    transportState?.dispose();\n  }\n\n  @override\n  void close({bool force = false}) {\n    _closed = true;\n    _forceClosed = force;\n    if (force) {\n      _transportsMap.forEach((key, value) => value.dispose());\n    }\n  }\n\n  void _throwIfH2NotSelected(Uri target, SecureSocket socket) {\n    if (socket.selectedProtocol != 'h2') {\n      throw DioH2NotSupportedException(target, socket.selectedProtocol);\n    }\n  }\n}\n\nclass _ClientTransportConnectionState {\n  _ClientTransportConnectionState(this.transport);\n\n  final ClientTransportConnection transport;\n\n  bool isActive = true;\n  late DateTime latestIdleTimeStamp;\n  Timer? _timer;\n\n  ClientTransportConnection get activeTransport {\n    isActive = true;\n    latestIdleTimeStamp = DateTime.now();\n    return transport;\n  }\n\n  void delayClose(Duration idleTimeout, void Function() callback) {\n    const duration = Duration(milliseconds: 100);\n    idleTimeout = idleTimeout < duration ? duration : idleTimeout;\n    _startTimer(callback, idleTimeout, idleTimeout);\n  }\n\n  void dispose() {\n    _timer?.cancel();\n    transport.finish();\n  }\n\n  void _startTimer(\n    void Function() callback,\n    Duration duration,\n    Duration idleTimeout,\n  ) {\n    _timer = Timer(duration, () {\n      if (!isActive) {\n        final interval = DateTime.now().difference(latestIdleTimeStamp);\n        if (interval >= duration) {\n          return callback();\n        }\n        return _startTimer(callback, duration - interval, idleTimeout);\n      }\n      // if active\n      _startTimer(callback, idleTimeout, idleTimeout);\n    });\n  }\n}\n"
  },
  {
    "path": "plugins/http2_adapter/lib/src/http2_adapter.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\nimport 'package:http2/http2.dart';\nimport 'package:meta/meta.dart';\n\npart 'client_setting.dart';\n\npart 'connection_manager.dart';\n\npart 'connection_manager_imp.dart';\n\n/// The signature of [Http2Adapter.onNotSupported].\ntypedef H2NotSupportedCallback = Future<ResponseBody> Function(\n  RequestOptions options,\n  Stream<Uint8List>? requestStream,\n  Future<void>? cancelFuture,\n  DioH2NotSupportedException exception,\n);\n\n/// A Dio HttpAdapter which implements Http/2.0.\nclass Http2Adapter implements HttpClientAdapter {\n  Http2Adapter(\n    ConnectionManager? connectionManager, {\n    HttpClientAdapter? fallbackAdapter,\n    this.onNotSupported,\n  })  : connectionManager = connectionManager ?? ConnectionManager(),\n        fallbackAdapter = fallbackAdapter ?? IOHttpClientAdapter();\n\n  /// {@macro dio_http2_adapter.ConnectionManager}\n  ConnectionManager connectionManager;\n\n  /// {@macro dio.HttpClientAdapter}\n  HttpClientAdapter fallbackAdapter;\n\n  /// Handles [DioH2NotSupportedException] and returns a [ResponseBody].\n  H2NotSupportedCallback? onNotSupported;\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) {\n    // Recursive fetching.\n    final redirects = <RedirectRecord>[];\n    return _fetch(options, requestStream, cancelFuture, redirects);\n  }\n\n  Future<ResponseBody> _fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n    List<RedirectRecord> redirects,\n  ) async {\n    late final ClientTransportConnection transport;\n    try {\n      transport = await connectionManager.getConnection(options, redirects);\n    } on DioH2NotSupportedException catch (e) {\n      // Fallback to use the callback\n      // or to another adapter (typically IOHttpClientAdapter)\n      // since the request can have a better handle by it.\n      if (onNotSupported != null) {\n        return onNotSupported!(options, requestStream, cancelFuture, e);\n      }\n      return fallbackAdapter.fetch(options, requestStream, cancelFuture);\n    } on SocketException catch (e) {\n      if (e.message.contains('timed out')) {\n        final Duration effectiveTimeout;\n        if (options.connectTimeout != null &&\n            options.connectTimeout! > Duration.zero) {\n          effectiveTimeout = options.connectTimeout!;\n        } else {\n          effectiveTimeout = Duration.zero;\n        }\n        throw DioException.connectionTimeout(\n          requestOptions: options,\n          timeout: effectiveTimeout,\n          error: e,\n        );\n      }\n      throw DioException.connectionError(\n        requestOptions: options,\n        reason: e.message,\n        error: e,\n      );\n    }\n\n    final uri = options.uri;\n    String path = uri.path;\n    const excludeMethods = ['PUT', 'POST', 'PATCH'];\n\n    if (path.isEmpty || !path.startsWith('/')) {\n      path = '/$path';\n    }\n    if (uri.query.trim().isNotEmpty) {\n      path += '?${uri.query}';\n    }\n    final headers = [\n      Header.ascii(':method', options.method),\n      Header.ascii(':path', path),\n      Header.ascii(':scheme', uri.scheme),\n      Header.ascii(':authority', uri.host),\n    ];\n\n    // Add custom headers\n    headers.addAll(\n      options.headers.entries.map(\n        (entry) {\n          final String v;\n          if (entry.value is Iterable) {\n            v = entry.value.join(', ');\n          } else {\n            v = '${entry.value}';\n          }\n          return Header.ascii(entry.key.toLowerCase(), v);\n        },\n      ).toList(),\n    );\n\n    // Creates a new outgoing stream.\n    final stream = transport.makeRequest(headers);\n    final streamWR = WeakReference<ClientTransportStream>(stream);\n\n    final hasRequestData = requestStream != null;\n    if (hasRequestData && cancelFuture != null) {\n      cancelFuture.whenComplete(() {\n        streamWR.target?.outgoingMessages.close();\n      });\n    }\n\n    List<Uint8List>? list;\n    if (!excludeMethods.contains(options.method) && hasRequestData) {\n      list = await requestStream.toList();\n      requestStream = Stream.fromIterable(list);\n    }\n\n    if (hasRequestData) {\n      Future<dynamic> requestStreamFuture = requestStream!.listen((data) {\n        //TODO(EVERYONE): Investigate why this statement can cause \"StateError: Bad state: Cannot add event after closing\"\n        stream.outgoingMessages.add(DataStreamMessage(data));\n      }).asFuture();\n      final sendTimeout = options.sendTimeout ?? Duration.zero;\n      if (sendTimeout > Duration.zero) {\n        requestStreamFuture = requestStreamFuture.timeout(\n          sendTimeout,\n          onTimeout: () {\n            stream.outgoingMessages.close().catchError((_) {});\n            throw DioException.sendTimeout(\n              timeout: sendTimeout,\n              requestOptions: options,\n            );\n          },\n        );\n      }\n      await requestStreamFuture;\n    }\n    await stream.outgoingMessages.close();\n\n    final responseSink = StreamController<Uint8List>();\n    final responseHeaders = Headers();\n    final responseCompleter = Completer();\n    late StreamSubscription responseSubscription;\n    bool needRedirect = false;\n    bool needResponse = false;\n\n    final receiveTimeout = options.receiveTimeout ?? Duration.zero;\n\n    late int statusCode;\n    responseSubscription = stream.incomingMessages.listen(\n      (StreamMessage message) async {\n        if (message is HeadersStreamMessage) {\n          for (final header in message.headers) {\n            final name = utf8.decode(header.name);\n            final value = utf8.decode(header.value);\n            responseHeaders.add(name, value);\n          }\n\n          final status = responseHeaders.value(':status');\n          if (status != null) {\n            statusCode = int.parse(status);\n            responseHeaders.removeAll(':status');\n            needRedirect = _needRedirect(options, statusCode);\n            needResponse =\n                !needRedirect && options.validateStatus(statusCode) ||\n                    options.receiveDataWhenStatusError;\n            responseCompleter.complete();\n          }\n        } else if (message is DataStreamMessage) {\n          if (needResponse) {\n            responseSink.add(\n              message.bytes is Uint8List\n                  ? message.bytes as Uint8List\n                  : Uint8List.fromList(message.bytes),\n            );\n          } else {\n            responseSubscription.cancel().whenComplete(() {\n              responseSink.close();\n            });\n          }\n        }\n      },\n      onError: (Object error, StackTrace stackTrace) {\n        // If connection is being forcefully terminated, remove the connection.\n        if (error is TransportConnectionException) {\n          connectionManager.removeConnection(transport);\n        }\n        if (!responseCompleter.isCompleted) {\n          responseCompleter.completeError(error, stackTrace);\n        } else {\n          responseSink.addError(error, stackTrace);\n        }\n        responseSubscription.cancel();\n        responseSink.close();\n      },\n      onDone: () {\n        responseSubscription.cancel();\n        responseSink.close();\n      },\n      cancelOnError: true,\n    );\n\n    Future<dynamic> responseFuture = responseCompleter.future;\n    if (receiveTimeout > Duration.zero) {\n      responseFuture = responseFuture.timeout(\n        receiveTimeout,\n        onTimeout: () {\n          responseSubscription\n              .cancel()\n              .catchError((_) {})\n              .whenComplete(() => responseSink.close().catchError((_) {}));\n          throw DioException.receiveTimeout(\n            timeout: receiveTimeout,\n            requestOptions: options,\n          );\n        },\n      );\n    }\n    await responseFuture;\n\n    // Handle redirection.\n    if (needRedirect) {\n      if (responseHeaders['location'] == null) {\n        // Redirect without location is illegal.\n        throw DioException.connectionError(\n          requestOptions: options,\n          reason: 'Received redirect without location header.',\n        );\n      }\n      final url = responseHeaders.value('location');\n      // An empty `location` header is considered a self redirect.\n      final uri = Uri.parse(url ?? '');\n      redirects.add(RedirectRecord(statusCode, options.method, uri));\n      final String path = resolveRedirectUri(options.uri, uri).toString();\n      return _fetch(\n        options.copyWith(\n          path: path,\n          maxRedirects: --options.maxRedirects,\n        ),\n        list != null ? Stream.fromIterable(list) : null,\n        cancelFuture,\n        redirects,\n      );\n    }\n    return ResponseBody(\n      responseSink.stream,\n      statusCode,\n      headers: responseHeaders.map,\n      redirects: redirects,\n      isRedirect: redirects.isNotEmpty,\n      onClose: () {\n        responseSubscription.cancel();\n        responseSink.close();\n        streamWR.target?.outgoingMessages.close();\n      },\n    )..extra[HttpClientAdapter.extraKeyHttpVersion] ??= '2.0';\n  }\n\n  bool _needRedirect(RequestOptions options, int status) {\n    const statusCodes = [301, 302, 303, 307, 308];\n    return options.followRedirects &&\n        options.maxRedirects > 0 &&\n        statusCodes.contains(status);\n  }\n\n  static Uri resolveRedirectUri(Uri currentUri, Uri redirectUri) {\n    if (redirectUri.hasScheme) {\n      // This is a full URL which has to be redirected to as is.\n      return redirectUri;\n    }\n\n    // This is relative with or without leading slash and is resolved against\n    // the URL of the original request.\n    return currentUri.resolveUri(redirectUri);\n  }\n\n  @override\n  void close({bool force = false}) {\n    connectionManager.close(force: force);\n  }\n}\n\n/// The exception when a connected socket for the [uri] does not support HTTP/2.\nclass DioH2NotSupportedException extends SocketException {\n  const DioH2NotSupportedException(\n    this.uri,\n    this.selectedProtocol,\n  ) : super('h2 protocol not supported');\n\n  final Uri uri;\n  final String? selectedProtocol;\n\n  @override\n  String toString() {\n    final sb = StringBuffer();\n    sb.write('DioH2NotSupportedException');\n    if (message.isNotEmpty) {\n      sb.write(': $message');\n      if (osError != null) {\n        sb.write(' ($osError)');\n      }\n    } else if (osError != null) {\n      sb.write(': $osError');\n    }\n    if (address != null) {\n      sb.write(', address = ${address!.host}');\n    }\n    if (port != null) {\n      sb.write(', port = $port');\n    }\n    return sb.toString();\n  }\n}\n"
  },
  {
    "path": "plugins/http2_adapter/pubspec.yaml",
    "content": "name: dio_http2_adapter\nversion: 2.7.0\n\ndescription: An adapter that combines HTTP/2 and dio. Supports reusing connections, header compression, etc.\ntopics:\n  - dio\n  - http2\n  - native\n  - network\nhomepage: https://github.com/cfug/dio\nrepository: https://github.com/cfug/dio/blob/main/plugins/http2_adapter\nissue_tracker: https://github.com/cfug/dio/issues\n\nenvironment:\n  sdk: \">=3.0.0 <4.0.0\"\n\ndependencies:\n  dio: ^5.2.0\n  http2: ^2.1.0\n  meta: ^1.9.1\n\ndev_dependencies:\n  lints: any\n  test: ^1.16.4\n  crypto: ^3.0.2\n  path: ^1.8.0\n\n  # Shared test package.\n  dio_test:\n    git:\n      url: https://github.com/cfug/dio\n      path: dio_test\n"
  },
  {
    "path": "plugins/http2_adapter/test/http2_test.dart",
    "content": "import 'dart:async';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio_http2_adapter/dio_http2_adapter.dart';\nimport 'package:dio_test/util.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('httpVersion is set to 2.0 for HTTP/2 connections', () async {\n    final dio = Dio()\n      ..options.baseUrl = httpbunBaseUrl\n      ..httpClientAdapter = Http2Adapter(ConnectionManager());\n    final response = await dio.get('/get');\n    final httpVersion = response.extra[HttpClientAdapter.extraKeyHttpVersion];\n    expect(httpVersion, equals('2.0'));\n  });\n\n  test('handles gracefully if H2 is not supported', () async {\n    const destinationHost = 'www.baidu.com';\n    final destination = Uri.https(destinationHost);\n    final dioWithNothing = Dio()\n      ..httpClientAdapter = Http2Adapter(ConnectionManager());\n    await expectLater(\n      await dioWithNothing.getUri(destination),\n      allOf([\n        isA<Response>(),\n        (Response r) => r.realUri.host == destinationHost,\n      ]),\n    );\n    final dioWithCallback = Dio()\n      ..httpClientAdapter = Http2Adapter(\n        ConnectionManager(),\n        onNotSupported: (_, __, ___, e) {\n          return Future.value(ResponseBody.fromString('', 200));\n        },\n      );\n    await expectLater(\n      await dioWithCallback.getUri(destination),\n      allOf([\n        isA<Response>(),\n        (Response r) => r.data == '',\n      ]),\n    );\n    final dioWithThrows = Dio()\n      ..httpClientAdapter = Http2Adapter(\n        ConnectionManager(),\n        onNotSupported: (_, __, ___, e) => throw e,\n      );\n    await expectLater(\n      dioWithThrows.getUri(destination),\n      throwsA(\n        allOf([\n          isA<DioException>(),\n          (e) => e.error is DioH2NotSupportedException,\n          (e) =>\n              (e.error as DioH2NotSupportedException).uri.host ==\n              destinationHost,\n        ]),\n      ),\n    );\n  });\n\n  test(\n    'request with payload via proxy',\n    () async {\n      final dio = Dio()\n        ..options.baseUrl = httpbunBaseUrl\n        ..httpClientAdapter = Http2Adapter(\n          ConnectionManager(\n            idleTimeout: const Duration(milliseconds: 10),\n            onClientCreate: (uri, settings) =>\n                settings.proxy = Uri.parse('http://localhost:3128'),\n          ),\n        );\n\n      final res = await dio.post('/post', data: 'TEST');\n      expect(res.data.toString(), contains('TEST'));\n    },\n    tags: ['proxy'],\n  );\n\n  test('request without network and restore', () async {\n    bool needProxy = true;\n    final dio = Dio()\n      ..options.baseUrl = httpbunBaseUrl\n      ..httpClientAdapter = Http2Adapter(\n        ConnectionManager(\n          idleTimeout: const Duration(milliseconds: 10),\n          onClientCreate: (uri, settings) {\n            if (needProxy) {\n              // first request use bad proxy to simulate network error\n              settings.proxy = Uri.parse('http://localhost:1234');\n              needProxy = false;\n            } else {\n              // remove proxy to restore network\n              settings.proxy = null;\n            }\n          },\n        ),\n      );\n    try {\n      // will throw SocketException\n      await dio.post('/post', data: 'TEST');\n    } on DioException {\n      // ignore\n    }\n    final res = await dio.post('/post', data: 'TEST');\n    expect(res.data.toString(), contains('TEST'));\n  });\n\n  group(ConnectionManager, () {\n    test('returns correct connection', () async {\n      final manager = ConnectionManager();\n      final tlsConnection = await manager.getConnection(\n        RequestOptions(path: 'https://flutter.cn'),\n        [],\n      );\n      final tlsWithSameHostRedirects = await manager.getConnection(\n        RequestOptions(path: 'https://flutter.cn'),\n        [\n          RedirectRecord(301, 'GET', Uri.parse('https://flutter.cn/404')),\n        ],\n      );\n      final tlsDifferentHostRedirects = await manager.getConnection(\n        RequestOptions(path: 'https://flutter.cn'),\n        [\n          RedirectRecord(301, 'GET', Uri.parse('https://flutter.dev')),\n        ],\n      );\n      final tlsDifferentHostsRedirects = await manager.getConnection(\n        RequestOptions(path: 'https://flutter.cn'),\n        [\n          RedirectRecord(301, 'GET', Uri.parse('https://flutter.dev')),\n          RedirectRecord(301, 'GET', Uri.parse('https://flutter.dev/404')),\n        ],\n      );\n      final nonTLSConnection = await manager.getConnection(\n        RequestOptions(path: 'http://flutter.cn'),\n        [],\n      );\n      final nonTLSConnectionWithTLSRedirects = await manager.getConnection(\n        RequestOptions(path: 'http://flutter.cn'),\n        [\n          RedirectRecord(301, 'GET', Uri.parse('https://flutter.cn/')),\n        ],\n      );\n      final differentHostConnection = await manager.getConnection(\n        RequestOptions(path: 'https://flutter.dev'),\n        [],\n      );\n      expect(tlsConnection == tlsWithSameHostRedirects, true);\n      expect(tlsConnection == tlsDifferentHostRedirects, false);\n      expect(tlsConnection == tlsDifferentHostsRedirects, false);\n      expect(tlsConnection == nonTLSConnection, false);\n      expect(tlsConnection == nonTLSConnectionWithTLSRedirects, true);\n      expect(tlsConnection == differentHostConnection, false);\n      expect(tlsDifferentHostRedirects == differentHostConnection, true);\n      expect(tlsDifferentHostsRedirects == differentHostConnection, true);\n      expect(nonTLSConnection == nonTLSConnectionWithTLSRedirects, false);\n    });\n\n    test('throws TimeoutException on handshakeTimeout set', () async {\n      const handshakeTimeout = Duration(microseconds: 1);\n      final dio = Dio()\n        ..options.baseUrl = httpbunBaseUrl\n        ..httpClientAdapter = Http2Adapter(\n          ConnectionManager(\n            handshakeTimout: handshakeTimeout,\n          ),\n        );\n\n      await expectLater(\n        dio.post('/post', data: 'TEST'),\n        throwsA(\n          allOf([\n            isA<DioException>(),\n            (e) => e.error is TimeoutException,\n            (e) => (e.error as TimeoutException).duration == handshakeTimeout,\n          ]),\n        ),\n      );\n    });\n\n    // Regression test for https://github.com/cfug/dio/pull/2481\n    // Verifies that connections are properly removed from cache after idle\n    // timeout. Previously, there was an inconsistency in cache key format:\n    // - getConnection used 'scheme://host:port' (e.g., 'https://example.com:443')\n    // - _connect used 'host:port' (e.g., 'example.com:443')\n    // This caused _transportsMap.remove() to fail, leading to memory leaks.\n    test('removes connection from cache after idle timeout', () async {\n      final manager = ConnectionManager(\n        idleTimeout: const Duration(milliseconds: 500),\n      );\n      final dio = Dio()\n        ..options.baseUrl = httpbunBaseUrl\n        ..httpClientAdapter = Http2Adapter(manager);\n\n      // Make a request to establish a connection\n      await dio.get('/get');\n\n      // Verify connection is cached\n      expect(manager.cachedConnectionsCount, equals(1));\n\n      // Wait for idle timeout to trigger (500ms + buffer)\n      // The connection becomes inactive after the request completes,\n      // then the idle timer will remove it from the cache.\n      await Future<void>.delayed(const Duration(milliseconds: 5000));\n\n      // Verify connection has been removed from cache\n      expect(manager.cachedConnectionsCount, equals(0));\n\n      manager.close(force: true);\n    });\n  });\n\n  group(ProxyConnectedPredicate, () {\n    group('defaultProxyConnectedPredicate', () {\n      test(\n        'accepts HTTP/1.x for HTTP/1.1 proxy',\n        () {\n          expect(\n            defaultProxyConnectedPredicate('HTTP/1.1', 'HTTP/1.1 200'),\n            true,\n          );\n          expect(\n            defaultProxyConnectedPredicate('HTTP/1.1', 'HTTP/1.0 200'),\n            true,\n          );\n        },\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "plugins/http2_adapter/test/pinning_test.dart",
    "content": "import 'dart:io';\n\nimport 'package:crypto/crypto.dart';\nimport 'package:dio/dio.dart';\nimport 'package:dio_http2_adapter/dio_http2_adapter.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  /// NOTE: Run scripts/prepare_pinning_certs.sh\n  /// to download the current certs to the file below.\n  String fingerprint() {\n    // OpenSSL output like: SHA256 Fingerprint=EE:5C:E1:DF:A7:A4...\n    // All badssl.com hosts have the same cert, they just have TLS\n    // setting or other differences (like host name) that make them bad.\n    final lines = File('test/_pinning_http2.txt').readAsLinesSync();\n    return lines.first.split('=').last.toLowerCase().replaceAll(':', '');\n  }\n\n  group('SSL pinning', () {\n    final Dio dio = Dio()\n      ..options.baseUrl = 'https://httpbun.com/'\n      ..interceptors.add(\n        QueuedInterceptorsWrapper(\n          onRequest: (options, handler) async {\n            // Delay 1 second before requests to avoid request too frequently.\n            await Future.delayed(const Duration(seconds: 1));\n            handler.next(options);\n          },\n        ),\n      );\n    final expectedHostString = 'httpbun.com';\n\n    test('trusted host allowed with no approver', () async {\n      dio.httpClientAdapter = Http2Adapter(\n        ConnectionManager(\n          idleTimeout: const Duration(seconds: 10),\n        ),\n      );\n\n      final res = await dio.get('get');\n      expect(res, isNotNull);\n      expect(res.data, isNotNull);\n      expect(res.data.toString(), contains(expectedHostString));\n    });\n\n    test('untrusted host rejected with no approver', () async {\n      DioException? error;\n      try {\n        dio.httpClientAdapter = Http2Adapter(\n          ConnectionManager(\n            idleTimeout: const Duration(seconds: 10),\n            onClientCreate: (url, config) {\n              // Consider all hosts untrusted\n              config.context = SecurityContext(withTrustedRoots: false);\n            },\n          ),\n        );\n        await dio.get('get');\n        fail('did not throw');\n      } on DioException catch (e) {\n        error = e;\n      }\n      expect(error, isNotNull);\n    });\n\n    test('trusted certificate tested and allowed', () async {\n      bool approved = false;\n      dio.httpClientAdapter = Http2Adapter(\n        ConnectionManager(\n          idleTimeout: const Duration(seconds: 10),\n          onClientCreate: (url, config) {\n            config.validateCertificate = (certificate, host, port) {\n              approved = true;\n              return true;\n            };\n          },\n        ),\n      );\n      final res = await dio.get('get');\n      expect(approved, true);\n      expect(res, isNotNull);\n      expect(res.data, isNotNull);\n      expect(res.data.toString(), contains(expectedHostString));\n    });\n\n    test('untrusted certificate tested and allowed', () async {\n      bool badCert = false;\n      bool approved = false;\n      dio.httpClientAdapter = Http2Adapter(\n        ConnectionManager(\n          idleTimeout: const Duration(seconds: 10),\n          onClientCreate: (url, config) {\n            config.context = SecurityContext(withTrustedRoots: false);\n            config.onBadCertificate = (certificate) {\n              badCert = true;\n              return true;\n            };\n            config.validateCertificate = (certificate, host, port) {\n              approved = true;\n              return true;\n            };\n          },\n        ),\n      );\n\n      final res = await dio.get('get');\n      expect(badCert, true);\n      expect(approved, true);\n      expect(res, isNotNull);\n      expect(res.data, isNotNull);\n      expect(res.data.toString(), contains(expectedHostString));\n    });\n\n    test(\n      'untrusted certificate tested and allowed #2',\n      () async {\n        bool badCert = false;\n        bool approved = false;\n        String? badCertSubject;\n        String? approverSubject;\n        String? badCertSha256;\n        String? approverSha256;\n\n        dio.httpClientAdapter = Http2Adapter(\n          ConnectionManager(\n            idleTimeout: const Duration(seconds: 10),\n            onClientCreate: (url, config) {\n              config.context = SecurityContext(withTrustedRoots: false);\n              config.onBadCertificate = (certificate) {\n                badCert = true;\n                badCertSubject = certificate.subject.toString();\n                badCertSha256 = sha256.convert(certificate.der).toString();\n                return true;\n              };\n              config.validateCertificate = (certificate, host, port) {\n                if (certificate == null) {\n                  fail('must include a certificate');\n                }\n                approved = true;\n                approverSubject = certificate.subject.toString();\n                approverSha256 = sha256.convert(certificate.der).toString();\n                return true;\n              };\n            },\n          ),\n        );\n\n        final res = await dio.get('get');\n        expect(badCert, true);\n        expect(approved, true);\n        expect(badCertSubject, isNotNull);\n        expect(badCertSubject, isNot(contains(expectedHostString)));\n        expect(badCertSha256, isNot(fingerprint()));\n        expect(approverSubject, isNotNull);\n        expect(approverSubject, contains(expectedHostString));\n        expect(approverSha256, fingerprint());\n        expect(approverSubject, isNot(badCertSubject));\n        expect(approverSha256, isNot(badCertSha256));\n        expect(res, isNotNull);\n        expect(res.data, isNotNull);\n        expect(res.data.toString(), contains(expectedHostString));\n      },\n      tags: ['tls'],\n    );\n\n    test('2 requests == 1 approval', () async {\n      int approvalCount = 0;\n      dio.httpClientAdapter = Http2Adapter(\n        ConnectionManager(\n          // allow connection reuse\n          idleTimeout: const Duration(seconds: 20),\n          onClientCreate: (url, config) {\n            config.validateCertificate = (certificate, host, port) {\n              approvalCount++;\n              return true;\n            };\n          },\n        ),\n      );\n\n      Response res = await dio.get('get');\n      final firstTime = res.headers['date'];\n      expect(approvalCount, 1);\n      expect(res.data, isNotNull);\n      expect(res.data.toString(), contains(expectedHostString));\n      await Future.delayed(const Duration(seconds: 1));\n      res = await dio.get('get');\n      final secondTime = res.headers['date'];\n      expect(approvalCount, 1);\n      expect(firstTime, isNot(secondTime));\n      expect(res.data, isNotNull);\n      expect(res.data.toString(), contains(expectedHostString));\n    });\n  });\n}\n"
  },
  {
    "path": "plugins/http2_adapter/test/redirect_test.dart",
    "content": "import 'package:dio_http2_adapter/dio_http2_adapter.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group('Http2Adapter.resolveRedirectUri', () {\n    test('empty location', () async {\n      final current = Uri.parse('https://example.com');\n      final result = Http2Adapter.resolveRedirectUri(\n        current,\n        Uri.parse(''),\n      );\n      expect(result.toString(), current.toString());\n    });\n\n    test('relative location 1', () async {\n      final result = Http2Adapter.resolveRedirectUri(\n        Uri.parse('https://example.com/foo'),\n        Uri.parse('/bar'),\n      );\n\n      expect(result.toString(), 'https://example.com/bar');\n    });\n\n    test('relative location 2', () async {\n      final result = Http2Adapter.resolveRedirectUri(\n        Uri.parse('https://example.com/foo'),\n        Uri.parse('../bar'),\n      );\n      expect(result.toString(), 'https://example.com/bar');\n    });\n\n    test('different location', () async {\n      final current = Uri.parse('https://example.com/foo');\n      final target = 'https://somewhere.com/bar';\n      final result = Http2Adapter.resolveRedirectUri(\n        current,\n        Uri.parse(target),\n      );\n      expect(result.toString(), target);\n    });\n  });\n}\n"
  },
  {
    "path": "plugins/http2_adapter/test/test_suite_test.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:dio_http2_adapter/dio_http2_adapter.dart';\nimport 'package:dio_test/tests.dart';\n\nvoid main() {\n  dioAdapterTestSuite(\n    (baseUrl) => Dio(BaseOptions(baseUrl: baseUrl))\n      ..httpClientAdapter = Http2Adapter(ConnectionManager()),\n  );\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/.gitignore",
    "content": "# Flutter/Dart/Pub related\n**/doc/api/\n**/ios/Flutter/.last_build_id\n.dart_tool/\n.flutter-plugins\n.flutter-plugins-dependencies\n.packages\n.pub-cache/\n.pub/\n/build/\n\n# IntelliJ related\n*.ipr\n*.iws\n.idea/\n\n# Omit committing pubspec.lock for library packages; see\n# https://dart.dev/guides/libraries/private-files#pubspeclock.\npubspec.lock\n.DS_Store\n\ncoverage\n"
  },
  {
    "path": "plugins/native_dio_adapter/CHANGELOG.md",
    "content": "# CHANGELOG\n\n## Unreleased\n\n*None.*\n\n## 1.5.1\n\n- Support request cancellation for native HTTP clients via use of `AbortableRequest` (introduced in http package from version 1.5.0)\n- Add timeout handling for `sendTimeout`, `connectTimeout`, and `receiveTimeout` in `ConversionLayerAdapter`\n\n## 1.5.0\n\n- Close the `CronetEngine` when closing the `CronetClient` by default.\n- Expose underlying adapters from all adapters.\n\n## 1.4.0\n\n- Support `cupertino_http` 2.0.0\n\n## 1.3.0\n\n- Provide fix suggestions for `dart fix`.\n- Bump cronet_http version to `>=0.4.0 <=2.0.0`.\n\n## 1.2.0\n\n- Adds `createCronetEngine` and `createCupertinoConfiguration`\n  to deprecate `cronetEngine` and `cupertinoConfiguration`\n  for the `NativeAdapter`, to avoid platform exceptions.\n- Improve the request stream byte conversion.\n\n## 1.1.1\n\n- Adds the missing `flutter` dependency.\n\n## 1.1.0\n\n- Bump `cronet_http` version.\n- Minimal required Dart version is now 3.1.\n- Minimal required Flutter version is now 3.13.0.\n- Allow case-sensitive header keys with the `preserveHeaderCase` flag through options.\n\n## 1.0.0+2\n\n- Add topics to packages.\n\n## 1.0.0+1\n\n- Update dependencies to make use of stable versions.\n- Replace `DioError` with `DioException`.\n- Fix `onReceiveProgress` callback.\n\n## 0.1.0\n\n- Bump cupertino_http and cronet_http versions.\n- Improve code formats according to linter rules.\n\n## 0.0.1\n\n- Initial version.\n"
  },
  {
    "path": "plugins/native_dio_adapter/LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2022 Jonas Uekötter\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License."
  },
  {
    "path": "plugins/native_dio_adapter/README.md",
    "content": "# Native Dio Adapter\n\n[![pub package](https://img.shields.io/pub/v/native_dio_adapter.svg)](https://pub.dev/packages/native_dio_adapter)\n[![likes](https://img.shields.io/pub/likes/native_dio_adapter)](https://pub.dev/packages/native_dio_adapter/score)\n[![popularity](https://img.shields.io/pub/popularity/native_dio_adapter)](https://pub.dev/packages/native_dio_adapter/score)\n[![pub points](https://img.shields.io/pub/points/native_dio_adapter)](https://pub.dev/packages/native_dio_adapter/score)\n\n> Note: This uses the native http implementation on macOS, iOS and Android.\n> Other platforms still use the Dart http stack.\n\nIf you encounter bugs, consider fixing it by opening a PR or at least contribute a failing test case.\n\nA client for [Dio](https://pub.dev/packages/dio) which makes use of\n[`cupertino_http`](https://pub.dev/packages/cupertino_http) and\n[`cronet_http`](https://pub.dev/packages/cronet_http)\nto delegate HTTP requests to the native platform instead of the `dart:io` platforms.\n\nInspired by the [Dart 2.18 release blog](https://medium.com/dartlang/dart-2-18-f4b3101f146c).\n\n## Motivation\n\nUsing the native platform implementation, rather than the socket-based\n[`dart:io` HttpClient](https://api.dart.dev/stable/dart-io/HttpClient-class.html) implementation,\nhas several advantages:\n\n- It automatically supports platform features such VPNs and HTTP proxies.\n- It supports many more configuration options such as only allowing access through WiFi and blocking cookies.\n- It supports more HTTP features such as HTTP/3 and custom redirect handling.\n\n## Get started\n\n### Install\n\nAdd the `native_dio_adapter` package to your\n[pubspec dependencies](https://pub.dev/packages/native_dio_adapter/install).\n\n### Example\n\n```dart\nfinal dioClient = Dio();\ndioClient.httpClientAdapter = NativeAdapter();\n```\n\n### Use embedded Cronet\n\nStarting from `cronet_http` v1.2.0,\nyou can to use the embedded Cronet implementation\nusing a simple configuration with `dart-define`.\nSee https://pub.dev/packages/cronet_http#use-embedded-cronet\nfor more details.\n\n## 📣 About the author\n\n- [![Twitter Follow](https://img.shields.io/twitter/follow/ue_man?style=social)](https://twitter.com/ue_man)\n- [![GitHub followers](https://img.shields.io/github/followers/ueman?style=social)](https://github.com/ueman)\n"
  },
  {
    "path": "plugins/native_dio_adapter/analysis_options.yaml",
    "content": "include: ../../analysis_options.yaml\n\nanalyzer:\n  language:\n    strict-raw-types: true\n    strict-casts: true\n    strict-inference: true\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/.gitignore",
    "content": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\nmigrate_working_dir/\n\n# IntelliJ related\n*.iml\n*.ipr\n*.iws\n.idea/\n\n# The .vscode folder contains launch configuration and tasks you configure in\n# VS Code which you may wish to be included in version control, so this line\n# is commented out by default.\n#.vscode/\n\n# Flutter/Dart/Pub related\n**/doc/api/\n**/ios/Flutter/.last_build_id\n.dart_tool/\n.flutter-plugins\n.flutter-plugins-dependencies\n.packages\n.pub-cache/\n.pub/\n/build/\n\n# Symbolication related\napp.*.symbols\n\n# Obfuscation related\napp.*.map.json\n\n# Android Studio will place build artifacts here\n/android/app/debug\n/android/app/profile\n/android/app/release\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/analysis_options.yaml",
    "content": "# This file configures the analyzer, which statically analyzes Dart code to\n# check for errors, warnings, and lints.\n#\n# The issues identified by the analyzer are surfaced in the UI of Dart-enabled\n# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be\n# invoked from the command line by running `flutter analyze`.\n\n# The following line activates a set of recommended lints for Flutter apps,\n# packages, and plugins designed to encourage good coding practices.\ninclude: package:flutter_lints/flutter.yaml\n\nlinter:\n  # The lint rules applied to this project can be customized in the\n  # section below to disable rules from the `package:flutter_lints/flutter.yaml`\n  # included above or to enable additional rules. A list of all available lints\n  # and their documentation is published at\n  # https://dart-lang.github.io/linter/lints/index.html.\n  #\n  # Instead of disabling a lint rule for the entire project in the\n  # section below, it can also be suppressed for a single line of code\n  # or a specific dart file by using the `// ignore: name_of_lint` and\n  # `// ignore_for_file: name_of_lint` syntax on the line or in the file\n  # producing the lint.\n  rules:\n    # avoid_print: false  # Uncomment to disable the `avoid_print` rule\n    # prefer_single_quotes: true  # Uncomment to enable the `prefer_single_quotes` rule\n\n# Additional information about this file can be found at\n# https://dart.dev/guides/language/analysis-options\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/.gitignore",
    "content": "gradle-wrapper.jar\n/.gradle\n/captures/\n/gradlew\n/gradlew.bat\n/local.properties\nGeneratedPluginRegistrant.java\n\n# Remember to never publicly share your keystore.\n# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app\nkey.properties\n**/*.keystore\n**/*.jks\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/app/build.gradle",
    "content": "def localProperties = new Properties()\ndef localPropertiesFile = rootProject.file('local.properties')\nif (localPropertiesFile.exists()) {\n    localPropertiesFile.withReader('UTF-8') { reader ->\n        localProperties.load(reader)\n    }\n}\n\ndef flutterRoot = localProperties.getProperty('flutter.sdk')\nif (flutterRoot == null) {\n    throw new GradleException(\"Flutter SDK not found. Define location with flutter.sdk in the local.properties file.\")\n}\n\ndef flutterVersionCode = localProperties.getProperty('flutter.versionCode')\nif (flutterVersionCode == null) {\n    flutterVersionCode = '1'\n}\n\ndef flutterVersionName = localProperties.getProperty('flutter.versionName')\nif (flutterVersionName == null) {\n    flutterVersionName = '1.0'\n}\n\napply plugin: 'com.android.application'\napply plugin: 'kotlin-android'\napply from: \"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle\"\n\nandroid {\n    compileSdkVersion flutter.compileSdkVersion\n    ndkVersion flutter.ndkVersion\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n\n    kotlinOptions {\n        jvmTarget = '1.8'\n    }\n\n    sourceSets {\n        main.java.srcDirs += 'src/main/kotlin'\n    }\n\n    defaultConfig {\n        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).\n        applicationId \"com.example.example\"\n        // You can update the following values to match your application needs.\n        // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.\n        minSdkVersion flutter.minSdkVersion\n        targetSdkVersion flutter.targetSdkVersion\n        versionCode flutterVersionCode.toInteger()\n        versionName flutterVersionName\n    }\n\n    buildTypes {\n        release {\n            // TODO: Add your own signing config for the release build.\n            // Signing with the debug keys for now, so `flutter run --release` works.\n            signingConfig signingConfigs.debug\n        }\n    }\n}\n\nflutter {\n    source '../..'\n}\n\ndependencies {\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version\"\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/app/src/debug/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.example\">\n    <!-- The INTERNET permission is required for development. Specifically,\n         the Flutter tool needs it to communicate with the running application\n         to allow setting breakpoints, to provide hot reload, etc.\n    -->\n    <uses-permission android:name=\"android.permission.INTERNET\"/>\n</manifest>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/app/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.example\">\n   <application\n        android:label=\"example\"\n        android:name=\"${applicationName}\"\n        android:icon=\"@mipmap/ic_launcher\">\n        <activity\n            android:name=\".MainActivity\"\n            android:exported=\"true\"\n            android:launchMode=\"singleTop\"\n            android:theme=\"@style/LaunchTheme\"\n            android:configChanges=\"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode\"\n            android:hardwareAccelerated=\"true\"\n            android:windowSoftInputMode=\"adjustResize\">\n            <!-- Specifies an Android theme to apply to this Activity as soon as\n                 the Android process has started. This theme is visible to the user\n                 while the Flutter UI initializes. After that, this theme continues\n                 to determine the Window background behind the Flutter UI. -->\n            <meta-data\n              android:name=\"io.flutter.embedding.android.NormalTheme\"\n              android:resource=\"@style/NormalTheme\"\n              />\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\"/>\n                <category android:name=\"android.intent.category.LAUNCHER\"/>\n            </intent-filter>\n        </activity>\n        <!-- Don't delete the meta-data below.\n             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->\n        <meta-data\n            android:name=\"flutterEmbedding\"\n            android:value=\"2\" />\n    </application>\n</manifest>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt",
    "content": "package com.example.example\n\nimport io.flutter.embedding.android.FlutterActivity\n\nclass MainActivity: FlutterActivity() {\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/app/src/main/res/drawable/launch_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"@android:color/white\" />\n\n    <!-- You can insert your own image assets here -->\n    <!-- <item>\n        <bitmap\n            android:gravity=\"center\"\n            android:src=\"@mipmap/launch_image\" />\n    </item> -->\n</layer-list>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/app/src/main/res/drawable-v21/launch_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"?android:colorBackground\" />\n\n    <!-- You can insert your own image assets here -->\n    <!-- <item>\n        <bitmap\n            android:gravity=\"center\"\n            android:src=\"@mipmap/launch_image\" />\n    </item> -->\n</layer-list>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/app/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->\n    <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Light.NoTitleBar\">\n        <!-- Show a splash screen on the activity. Automatically removed when\n             the Flutter engine draws its first frame -->\n        <item name=\"android:windowBackground\">@drawable/launch_background</item>\n    </style>\n    <!-- Theme applied to the Android Window as soon as the process has started.\n         This theme determines the color of the Android Window while your\n         Flutter UI initializes, as well as behind your Flutter UI while its\n         running.\n\n         This Theme is only used starting with V2 of Flutter's Android embedding. -->\n    <style name=\"NormalTheme\" parent=\"@android:style/Theme.Light.NoTitleBar\">\n        <item name=\"android:windowBackground\">?android:colorBackground</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/app/src/main/res/values-night/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->\n    <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Black.NoTitleBar\">\n        <!-- Show a splash screen on the activity. Automatically removed when\n             the Flutter engine draws its first frame -->\n        <item name=\"android:windowBackground\">@drawable/launch_background</item>\n    </style>\n    <!-- Theme applied to the Android Window as soon as the process has started.\n         This theme determines the color of the Android Window while your\n         Flutter UI initializes, as well as behind your Flutter UI while its\n         running.\n\n         This Theme is only used starting with V2 of Flutter's Android embedding. -->\n    <style name=\"NormalTheme\" parent=\"@android:style/Theme.Black.NoTitleBar\">\n        <item name=\"android:windowBackground\">?android:colorBackground</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/app/src/profile/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.example\">\n    <!-- The INTERNET permission is required for development. Specifically,\n         the Flutter tool needs it to communicate with the running application\n         to allow setting breakpoints, to provide hot reload, etc.\n    -->\n    <uses-permission android:name=\"android.permission.INTERNET\"/>\n</manifest>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/build.gradle",
    "content": "buildscript {\n    ext.kotlin_version = '1.6.10'\n    repositories {\n        google()\n        mavenCentral()\n    }\n\n    dependencies {\n        classpath 'com.android.tools.build:gradle:7.1.2'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n\nrootProject.buildDir = '../build'\nsubprojects {\n    project.buildDir = \"${rootProject.buildDir}/${project.name}\"\n}\nsubprojects {\n    project.evaluationDependsOn(':app')\n}\n\ntasks.register(\"clean\", Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-7.4-all.zip\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/gradle.properties",
    "content": "org.gradle.jvmargs=-Xmx1536M\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/android/settings.gradle",
    "content": "include ':app'\n\ndef localPropertiesFile = new File(rootProject.projectDir, \"local.properties\")\ndef properties = new Properties()\n\nassert localPropertiesFile.exists()\nlocalPropertiesFile.withReader(\"UTF-8\") { reader -> properties.load(reader) }\n\ndef flutterSdkPath = properties.getProperty(\"flutter.sdk\")\nassert flutterSdkPath != null, \"flutter.sdk not set in local.properties\"\napply from: \"$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle\"\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/.gitignore",
    "content": "**/dgph\n*.mode1v3\n*.mode2v3\n*.moved-aside\n*.pbxuser\n*.perspectivev3\n**/*sync/\n.sconsign.dblite\n.tags*\n**/.vagrant/\n**/DerivedData/\nIcon?\n**/Pods/\n**/.symlinks/\nprofile\nxcuserdata\n**/.generated/\nFlutter/App.framework\nFlutter/Flutter.framework\nFlutter/Flutter.podspec\nFlutter/Generated.xcconfig\nFlutter/ephemeral/\nFlutter/app.flx\nFlutter/app.zip\nFlutter/flutter_assets/\nFlutter/flutter_export_environment.sh\nServiceDefinitions.json\nRunner/GeneratedPluginRegistrant.*\n\n# Exceptions to above rules.\n!default.mode1v3\n!default.mode2v3\n!default.pbxuser\n!default.perspectivev3\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Flutter/AppFrameworkInfo.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n  <key>CFBundleDevelopmentRegion</key>\n  <string>en</string>\n  <key>CFBundleExecutable</key>\n  <string>App</string>\n  <key>CFBundleIdentifier</key>\n  <string>io.flutter.flutter.app</string>\n  <key>CFBundleInfoDictionaryVersion</key>\n  <string>6.0</string>\n  <key>CFBundleName</key>\n  <string>App</string>\n  <key>CFBundlePackageType</key>\n  <string>FMWK</string>\n  <key>CFBundleShortVersionString</key>\n  <string>1.0</string>\n  <key>CFBundleSignature</key>\n  <string>????</string>\n  <key>CFBundleVersion</key>\n  <string>1.0</string>\n  <key>MinimumOSVersion</key>\n  <string>11.0</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Flutter/Debug.xcconfig",
    "content": "#include? \"Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"\n#include \"Generated.xcconfig\"\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Flutter/Release.xcconfig",
    "content": "#include? \"Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"\n#include \"Generated.xcconfig\"\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Podfile",
    "content": "# Uncomment this line to define a global platform for your project\n# platform :ios, '11.0'\n\n# CocoaPods analytics sends network stats synchronously affecting flutter build latency.\nENV['COCOAPODS_DISABLE_STATS'] = 'true'\n\nproject 'Runner', {\n  'Debug' => :debug,\n  'Profile' => :release,\n  'Release' => :release,\n}\n\ndef flutter_root\n  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)\n  unless File.exist?(generated_xcode_build_settings_path)\n    raise \"#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first\"\n  end\n\n  File.foreach(generated_xcode_build_settings_path) do |line|\n    matches = line.match(/FLUTTER_ROOT\\=(.*)/)\n    return matches[1].strip if matches\n  end\n  raise \"FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get\"\nend\n\nrequire File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)\n\nflutter_ios_podfile_setup\n\ntarget 'Runner' do\n  use_frameworks!\n  use_modular_headers!\n\n  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))\nend\n\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    flutter_additional_ios_build_settings(target)\n  end\nend\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner/AppDelegate.swift",
    "content": "import UIKit\nimport Flutter\n\n@UIApplicationMain\n@objc class AppDelegate: FlutterAppDelegate {\n  override func application(\n    _ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?\n  ) -> Bool {\n    GeneratedPluginRegistrant.register(with: self)\n    return super.application(application, didFinishLaunchingWithOptions: launchOptions)\n  }\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-20x20@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-20x20@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-29x29@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-29x29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-29x29@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-40x40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-40x40@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-60x60@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-60x60@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-20x20@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-20x20@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-29x29@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-29x29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-40x40@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-40x40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-76x76@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-76x76@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"83.5x83.5\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-83.5x83.5@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"1024x1024\",\n      \"idiom\" : \"ios-marketing\",\n      \"filename\" : \"Icon-App-1024x1024@1x.png\",\n      \"scale\" : \"1x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchImage.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchImage@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchImage@3x.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md",
    "content": "# Launch Screen Assets\n\nYou can customize the launch screen with your own desired assets by replacing the image files in this directory.\n\nYou can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images."
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"12121\" systemVersion=\"16G29\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"12089\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Ydg-fD-yQy\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"xbc-2k-c8Z\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <imageView opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" image=\"LaunchImage\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"YRO-k0-Ey4\">\n                            </imageView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"YRO-k0-Ey4\" firstAttribute=\"centerX\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"centerX\" id=\"1a2-6s-vTC\"/>\n                            <constraint firstItem=\"YRO-k0-Ey4\" firstAttribute=\"centerY\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"centerY\" id=\"4X2-HB-R7a\"/>\n                        </constraints>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"LaunchImage\" width=\"168\" height=\"185\"/>\n    </resources>\n</document>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15F34\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" initialViewController=\"BYZ-38-t0r\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"10085\"/>\n    </dependencies>\n    <scenes>\n        <!--Flutter View Controller-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController id=\"BYZ-38-t0r\" customClass=\"FlutterViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"y3c-jy-aDJ\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"wfy-db-euE\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"600\" height=\"600\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>Example</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>example</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>$(FLUTTER_BUILD_NAME)</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(FLUTTER_BUILD_NUMBER)</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UIViewControllerBasedStatusBarAppearance</key>\n\t<false/>\n\t<key>CADisableMinimumFrameDurationOnPhone</key>\n\t<true/>\n\t<key>UIApplicationSupportsIndirectInputEvents</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner/Runner-Bridging-Header.h",
    "content": "#import \"GeneratedPluginRegistrant.h\"\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 50;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t0C2452B3A9CF2D14A95B52FA /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845376AD8A8E5A9729AE526B /* Pods_Runner.framework */; };\n\t\t1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };\n\t\t3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };\n\t\t74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };\n\t\t97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };\n\t\t97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };\n\t\t97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t9705A1C41CF9048500538489 /* Embed Frameworks */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tname = \"Embed Frameworks\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t0CA4ACE4AB950856B5028166 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.debug.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = \"<group>\"; };\n\t\t1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = \"<group>\"; };\n\t\t3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = \"<group>\"; };\n\t\t74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = \"Runner-Bridging-Header.h\"; sourceTree = \"<group>\"; };\n\t\t74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = \"<group>\"; };\n\t\t845376AD8A8E5A9729AE526B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t94C6C7744AE3DBD52F430081 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.profile.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = \"<group>\"; };\n\t\t9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = \"<group>\"; };\n\t\t97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\t97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\t97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tC52B93A3D8E8E9978DD7E90F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.release.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t97C146EB1CF9000F007C117D /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0C2452B3A9CF2D14A95B52FA /* Pods_Runner.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t1EB0F5293326CFA2D007AC8F /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0CA4ACE4AB950856B5028166 /* Pods-Runner.debug.xcconfig */,\n\t\t\t\tC52B93A3D8E8E9978DD7E90F /* Pods-Runner.release.xcconfig */,\n\t\t\t\t94C6C7744AE3DBD52F430081 /* Pods-Runner.profile.xcconfig */,\n\t\t\t);\n\t\t\tname = Pods;\n\t\t\tpath = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4750CFFFC11052529D8B77F8 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t845376AD8A8E5A9729AE526B /* Pods_Runner.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9740EEB11CF90186004384FC /* Flutter */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,\n\t\t\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */,\n\t\t\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */,\n\t\t\t\t9740EEB31CF90195004384FC /* Generated.xcconfig */,\n\t\t\t);\n\t\t\tname = Flutter;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146E51CF9000F007C117D = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9740EEB11CF90186004384FC /* Flutter */,\n\t\t\t\t97C146F01CF9000F007C117D /* Runner */,\n\t\t\t\t97C146EF1CF9000F007C117D /* Products */,\n\t\t\t\t1EB0F5293326CFA2D007AC8F /* Pods */,\n\t\t\t\t4750CFFFC11052529D8B77F8 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146EF1CF9000F007C117D /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t97C146EE1CF9000F007C117D /* Runner.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146F01CF9000F007C117D /* Runner */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t97C146FA1CF9000F007C117D /* Main.storyboard */,\n\t\t\t\t97C146FD1CF9000F007C117D /* Assets.xcassets */,\n\t\t\t\t97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,\n\t\t\t\t97C147021CF9000F007C117D /* Info.plist */,\n\t\t\t\t1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,\n\t\t\t\t1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,\n\t\t\t\t74858FAE1ED2DC5600515810 /* AppDelegate.swift */,\n\t\t\t\t74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,\n\t\t\t);\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t97C146ED1CF9000F007C117D /* Runner */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget \"Runner\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t1DBD6671E662FAA038B9F173 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t9740EEB61CF901F6004384FC /* Run Script */,\n\t\t\t\t97C146EA1CF9000F007C117D /* Sources */,\n\t\t\t\t97C146EB1CF9000F007C117D /* Frameworks */,\n\t\t\t\t97C146EC1CF9000F007C117D /* Resources */,\n\t\t\t\t9705A1C41CF9048500538489 /* Embed Frameworks */,\n\t\t\t\t3B06AD1E1E4923F5004D2608 /* Thin Binary */,\n\t\t\t\t019355C00AB08E39CE955AFD /* [CP] Embed Pods Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = Runner;\n\t\t\tproductName = Runner;\n\t\t\tproductReference = 97C146EE1CF9000F007C117D /* Runner.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t97C146E61CF9000F007C117D /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 1300;\n\t\t\t\tORGANIZATIONNAME = \"\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t97C146ED1CF9000F007C117D = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 7.3.1;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject \"Runner\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 97C146E51CF9000F007C117D;\n\t\t\tproductRefGroup = 97C146EF1CF9000F007C117D /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t97C146ED1CF9000F007C117D /* Runner */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t97C146EC1CF9000F007C117D /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,\n\t\t\t\t97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,\n\t\t\t\t97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t019355C00AB08E39CE955AFD /* [CP] Embed Pods Frameworks */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist\",\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t1DBD6671E662FAA038B9F173 /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"Thin Binary\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"/bin/sh \\\"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\\\" embed_and_thin\";\n\t\t};\n\t\t9740EEB61CF901F6004384FC /* Run Script */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"Run Script\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"/bin/sh \\\"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\\\" build\";\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t97C146EA1CF9000F007C117D /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,\n\t\t\t\t1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t97C146FA1CF9000F007C117D /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t97C146FB1CF9000F007C117D /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t97C147001CF9000F007C117D /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t249021D3217E4FDB00AE95B9 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSUPPORTED_PLATFORMS = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t249021D4217E4FDB00AE95B9 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = \"$(FLUTTER_BUILD_NUMBER)\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.example.example;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"Runner/Runner-Bridging-Header.h\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t97C147031CF9000F007C117D /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t97C147041CF9000F007C117D /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSUPPORTED_PLATFORMS = iphoneos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t97C147061CF9000F007C117D /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = \"$(FLUTTER_BUILD_NUMBER)\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.example.example;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"Runner/Runner-Bridging-Header.h\";\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t97C147071CF9000F007C117D /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = \"$(FLUTTER_BUILD_NUMBER)\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.example.example;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"Runner/Runner-Bridging-Header.h\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t97C146E91CF9000F007C117D /* Build configuration list for PBXProject \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t97C147031CF9000F007C117D /* Debug */,\n\t\t\t\t97C147041CF9000F007C117D /* Release */,\n\t\t\t\t249021D3217E4FDB00AE95B9 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t97C147061CF9000F007C117D /* Debug */,\n\t\t\t\t97C147071CF9000F007C117D /* Release */,\n\t\t\t\t249021D4217E4FDB00AE95B9 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 97C146E61CF9000F007C117D /* Project object */;\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>PreviewsEnabled</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1300\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n               BuildableName = \"Runner.app\"\n               BlueprintName = \"Runner\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n            BuildableName = \"Runner.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <Testables>\n      </Testables>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n            BuildableName = \"Runner.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Profile\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n            BuildableName = \"Runner.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:Runner.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>PreviewsEnabled</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/lib/main.dart",
    "content": "// ignore_for_file: use_build_context_synchronously\n\nimport 'dart:convert';\n\nimport 'package:dio/dio.dart';\nimport 'package:flutter/material.dart';\nimport 'package:native_dio_adapter/native_dio_adapter.dart';\n\nvoid main() {\n  runApp(const MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'Flutter Demo',\n      theme: ThemeData(\n        primarySwatch: Colors.blue,\n      ),\n      home: const MyHomePage(title: 'Flutter Demo Home Page'),\n    );\n  }\n}\n\nclass MyHomePage extends StatefulWidget {\n  const MyHomePage({super.key, required this.title});\n\n  final String title;\n\n  @override\n  State<MyHomePage> createState() => _MyHomePageState();\n}\n\nclass _MyHomePageState extends State<MyHomePage> {\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: Text(widget.title),\n      ),\n      body: Column(\n        crossAxisAlignment: CrossAxisAlignment.stretch,\n        mainAxisSize: MainAxisSize.max,\n        children: [\n          ElevatedButton(\n            onPressed: _doGetRequest,\n            child: const Text('make get request'),\n          ),\n          ElevatedButton(\n            onPressed: _doPostRequest,\n            child: const Text('make post request'),\n          ),\n          ElevatedButton(\n            onPressed: _doHttpClientRequest,\n            child: const Text('make client request'),\n          ),\n          ElevatedButton(\n            onPressed: _doHttpClientPostRequest,\n            child: const Text('make client post request'),\n          ),\n        ],\n      ),\n    );\n  }\n\n  void _doGetRequest() async {\n    final dio = Dio();\n\n    dio.httpClientAdapter = NativeAdapter(\n      createCupertinoConfiguration: () =>\n          URLSessionConfiguration.ephemeralSessionConfiguration()\n            ..allowsCellularAccess = false\n            ..allowsConstrainedNetworkAccess = false\n            ..allowsExpensiveNetworkAccess = false,\n    );\n    final response = await dio.get<String>('https://flutter.dev');\n\n    await showDialog<void>(\n      context: context,\n      builder: (context) {\n        return AlertDialog(\n          title: Text('Response ${response.statusCode}'),\n          content: SingleChildScrollView(\n            child: Text(response.data ?? 'No response'),\n          ),\n          actions: [\n            MaterialButton(\n              onPressed: () => Navigator.pop(context),\n              child: const Text('Close'),\n            )\n          ],\n        );\n      },\n    );\n  }\n\n  void _doPostRequest() async {\n    final dio = Dio();\n\n    dio.httpClientAdapter = NativeAdapter(\n      createCupertinoConfiguration: () =>\n          URLSessionConfiguration.ephemeralSessionConfiguration()\n            ..allowsCellularAccess = false\n            ..allowsConstrainedNetworkAccess = false\n            ..allowsExpensiveNetworkAccess = false,\n    );\n    final response = await dio.post<String>(\n      'https://httpbin.org/post',\n      queryParameters: <String, dynamic>{'foo': 'bar'},\n      data: jsonEncode(<String, dynamic>{'foo': 'bar'}),\n      options: Options(headers: <String, dynamic>{'foo': 'bar'}),\n    );\n\n    await showDialog<void>(\n      context: context,\n      builder: (context) {\n        return AlertDialog(\n          title: Text('Response ${response.statusCode}'),\n          content: SingleChildScrollView(\n            child: Text(response.data ?? 'No response'),\n          ),\n          actions: [\n            MaterialButton(\n              onPressed: () => Navigator.pop(context),\n              child: const Text('Close'),\n            )\n          ],\n        );\n      },\n    );\n  }\n\n  void _doHttpClientRequest() async {\n    final config = URLSessionConfiguration.ephemeralSessionConfiguration()\n      ..allowsCellularAccess = false\n      ..allowsConstrainedNetworkAccess = false\n      ..allowsExpensiveNetworkAccess = false;\n    final client = CupertinoClient.fromSessionConfiguration(config);\n    final response = await client.get(Uri.parse('https://flutter.dev/'));\n    await showDialog<void>(\n      context: context,\n      builder: (context) {\n        return AlertDialog(\n          title: Text('Response ${response.statusCode}'),\n          content: SingleChildScrollView(\n            child: Text(response.body),\n          ),\n          actions: [\n            MaterialButton(\n              onPressed: () => Navigator.pop(context),\n              child: const Text('Close'),\n            )\n          ],\n        );\n      },\n    );\n  }\n\n  void _doHttpClientPostRequest() async {\n    final config = URLSessionConfiguration.ephemeralSessionConfiguration()\n      ..allowsCellularAccess = false\n      ..allowsConstrainedNetworkAccess = false\n      ..allowsExpensiveNetworkAccess = false;\n    final client = CupertinoClient.fromSessionConfiguration(config);\n\n    final response = await client.post(\n      Uri.parse('https://httpbin.org/post'),\n      body: jsonEncode(<String, dynamic>{'foo': 'bar'}),\n    );\n\n    await showDialog<void>(\n      context: context,\n      builder: (context) {\n        return AlertDialog(\n          title: Text('Response ${response.statusCode}'),\n          content: SingleChildScrollView(\n            child: Text(response.body),\n          ),\n          actions: [\n            MaterialButton(\n              onPressed: () => Navigator.pop(context),\n              child: const Text('Close'),\n            )\n          ],\n        );\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/linux/.gitignore",
    "content": "flutter/ephemeral\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/linux/CMakeLists.txt",
    "content": "# Project-level configuration.\ncmake_minimum_required(VERSION 3.10)\nproject(runner LANGUAGES CXX)\n\n# The name of the executable created for the application. Change this to change\n# the on-disk name of your application.\nset(BINARY_NAME \"example\")\n# The unique GTK application identifier for this application. See:\n# https://wiki.gnome.org/HowDoI/ChooseApplicationID\nset(APPLICATION_ID \"com.example.example\")\n\n# Explicitly opt in to modern CMake behaviors to avoid warnings with recent\n# versions of CMake.\ncmake_policy(SET CMP0063 NEW)\n\n# Load bundled libraries from the lib/ directory relative to the binary.\nset(CMAKE_INSTALL_RPATH \"$ORIGIN/lib\")\n\n# Root filesystem for cross-building.\nif(FLUTTER_TARGET_PLATFORM_SYSROOT)\n  set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})\n  set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})\n  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n  set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)\n  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\nendif()\n\n# Define build configuration options.\nif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n  set(CMAKE_BUILD_TYPE \"Debug\" CACHE\n    STRING \"Flutter build mode\" FORCE)\n  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS\n    \"Debug\" \"Profile\" \"Release\")\nendif()\n\n# Compilation settings that should be applied to most targets.\n#\n# Be cautious about adding new options here, as plugins use this function by\n# default. In most cases, you should add new options to specific targets instead\n# of modifying this function.\nfunction(APPLY_STANDARD_SETTINGS TARGET)\n  target_compile_features(${TARGET} PUBLIC cxx_std_14)\n  target_compile_options(${TARGET} PRIVATE -Wall -Werror)\n  target_compile_options(${TARGET} PRIVATE \"$<$<NOT:$<CONFIG:Debug>>:-O3>\")\n  target_compile_definitions(${TARGET} PRIVATE \"$<$<NOT:$<CONFIG:Debug>>:NDEBUG>\")\nendfunction()\n\n# Flutter library and tool build rules.\nset(FLUTTER_MANAGED_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/flutter\")\nadd_subdirectory(${FLUTTER_MANAGED_DIR})\n\n# System-level dependencies.\nfind_package(PkgConfig REQUIRED)\npkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)\n\nadd_definitions(-DAPPLICATION_ID=\"${APPLICATION_ID}\")\n\n# Define the application target. To change its name, change BINARY_NAME above,\n# not the value here, or `flutter run` will no longer work.\n#\n# Any new source files that you add to the application should be added here.\nadd_executable(${BINARY_NAME}\n  \"main.cc\"\n  \"my_application.cc\"\n  \"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc\"\n)\n\n# Apply the standard set of build settings. This can be removed for applications\n# that need different build settings.\napply_standard_settings(${BINARY_NAME})\n\n# Add dependency libraries. Add any application-specific dependencies here.\ntarget_link_libraries(${BINARY_NAME} PRIVATE flutter)\ntarget_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)\n\n# Run the Flutter tool portions of the build. This must not be removed.\nadd_dependencies(${BINARY_NAME} flutter_assemble)\n\n# Only the install-generated bundle's copy of the executable will launch\n# correctly, since the resources must in the right relative locations. To avoid\n# people trying to run the unbundled copy, put it in a subdirectory instead of\n# the default top-level location.\nset_target_properties(${BINARY_NAME}\n  PROPERTIES\n  RUNTIME_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/intermediates_do_not_run\"\n)\n\n# Generated plugin build rules, which manage building the plugins and adding\n# them to the application.\ninclude(flutter/generated_plugins.cmake)\n\n\n# === Installation ===\n# By default, \"installing\" just makes a relocatable bundle in the build\n# directory.\nset(BUILD_BUNDLE_DIR \"${PROJECT_BINARY_DIR}/bundle\")\nif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)\n  set(CMAKE_INSTALL_PREFIX \"${BUILD_BUNDLE_DIR}\" CACHE PATH \"...\" FORCE)\nendif()\n\n# Start with a clean build bundle directory every time.\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${BUILD_BUNDLE_DIR}/\\\")\n  \" COMPONENT Runtime)\n\nset(INSTALL_BUNDLE_DATA_DIR \"${CMAKE_INSTALL_PREFIX}/data\")\nset(INSTALL_BUNDLE_LIB_DIR \"${CMAKE_INSTALL_PREFIX}/lib\")\n\ninstall(TARGETS ${BINARY_NAME} RUNTIME DESTINATION \"${CMAKE_INSTALL_PREFIX}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_ICU_DATA_FILE}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\nforeach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})\n  install(FILES \"${bundled_library}\"\n    DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendforeach(bundled_library)\n\n# Fully re-copy the assets directory on each build to avoid having stale files\n# from a previous install.\nset(FLUTTER_ASSET_DIR_NAME \"flutter_assets\")\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\\\")\n  \" COMPONENT Runtime)\ninstall(DIRECTORY \"${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}\"\n  DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\" COMPONENT Runtime)\n\n# Install the AOT library on non-Debug builds only.\nif(NOT CMAKE_BUILD_TYPE MATCHES \"Debug\")\n  install(FILES \"${AOT_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendif()\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/linux/flutter/CMakeLists.txt",
    "content": "# This file controls Flutter-level build steps. It should not be edited.\ncmake_minimum_required(VERSION 3.10)\n\nset(EPHEMERAL_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/ephemeral\")\n\n# Configuration provided via flutter tool.\ninclude(${EPHEMERAL_DIR}/generated_config.cmake)\n\n# TODO: Move the rest of this into files in ephemeral. See\n# https://github.com/flutter/flutter/issues/57146.\n\n# Serves the same purpose as list(TRANSFORM ... PREPEND ...),\n# which isn't available in 3.10.\nfunction(list_prepend LIST_NAME PREFIX)\n    set(NEW_LIST \"\")\n    foreach(element ${${LIST_NAME}})\n        list(APPEND NEW_LIST \"${PREFIX}${element}\")\n    endforeach(element)\n    set(${LIST_NAME} \"${NEW_LIST}\" PARENT_SCOPE)\nendfunction()\n\n# === Flutter Library ===\n# System-level dependencies.\nfind_package(PkgConfig REQUIRED)\npkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)\npkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)\npkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)\n\nset(FLUTTER_LIBRARY \"${EPHEMERAL_DIR}/libflutter_linux_gtk.so\")\n\n# Published to parent scope for install step.\nset(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)\nset(FLUTTER_ICU_DATA_FILE \"${EPHEMERAL_DIR}/icudtl.dat\" PARENT_SCOPE)\nset(PROJECT_BUILD_DIR \"${PROJECT_DIR}/build/\" PARENT_SCOPE)\nset(AOT_LIBRARY \"${PROJECT_DIR}/build/lib/libapp.so\" PARENT_SCOPE)\n\nlist(APPEND FLUTTER_LIBRARY_HEADERS\n  \"fl_basic_message_channel.h\"\n  \"fl_binary_codec.h\"\n  \"fl_binary_messenger.h\"\n  \"fl_dart_project.h\"\n  \"fl_engine.h\"\n  \"fl_json_message_codec.h\"\n  \"fl_json_method_codec.h\"\n  \"fl_message_codec.h\"\n  \"fl_method_call.h\"\n  \"fl_method_channel.h\"\n  \"fl_method_codec.h\"\n  \"fl_method_response.h\"\n  \"fl_plugin_registrar.h\"\n  \"fl_plugin_registry.h\"\n  \"fl_standard_message_codec.h\"\n  \"fl_standard_method_codec.h\"\n  \"fl_string_codec.h\"\n  \"fl_value.h\"\n  \"fl_view.h\"\n  \"flutter_linux.h\"\n)\nlist_prepend(FLUTTER_LIBRARY_HEADERS \"${EPHEMERAL_DIR}/flutter_linux/\")\nadd_library(flutter INTERFACE)\ntarget_include_directories(flutter INTERFACE\n  \"${EPHEMERAL_DIR}\"\n)\ntarget_link_libraries(flutter INTERFACE \"${FLUTTER_LIBRARY}\")\ntarget_link_libraries(flutter INTERFACE\n  PkgConfig::GTK\n  PkgConfig::GLIB\n  PkgConfig::GIO\n)\nadd_dependencies(flutter flutter_assemble)\n\n# === Flutter tool backend ===\n# _phony_ is a non-existent file to force this command to run every time,\n# since currently there's no way to get a full input/output list from the\n# flutter tool.\nadd_custom_command(\n  OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}\n    ${CMAKE_CURRENT_BINARY_DIR}/_phony_\n  COMMAND ${CMAKE_COMMAND} -E env\n    ${FLUTTER_TOOL_ENVIRONMENT}\n    \"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh\"\n      ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}\n  VERBATIM\n)\nadd_custom_target(flutter_assemble DEPENDS\n  \"${FLUTTER_LIBRARY}\"\n  ${FLUTTER_LIBRARY_HEADERS}\n)\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/linux/flutter/generated_plugin_registrant.cc",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#include \"generated_plugin_registrant.h\"\n\n\nvoid fl_register_plugins(FlPluginRegistry* registry) {\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/linux/flutter/generated_plugin_registrant.h",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#ifndef GENERATED_PLUGIN_REGISTRANT_\n#define GENERATED_PLUGIN_REGISTRANT_\n\n#include <flutter_linux/flutter_linux.h>\n\n// Registers Flutter plugins.\nvoid fl_register_plugins(FlPluginRegistry* registry);\n\n#endif  // GENERATED_PLUGIN_REGISTRANT_\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/linux/flutter/generated_plugins.cmake",
    "content": "#\n# Generated file, do not edit.\n#\n\nlist(APPEND FLUTTER_PLUGIN_LIST\n)\n\nlist(APPEND FLUTTER_FFI_PLUGIN_LIST\n  jni\n)\n\nset(PLUGIN_BUNDLED_LIBRARIES)\n\nforeach(plugin ${FLUTTER_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})\n  target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})\nendforeach(plugin)\n\nforeach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})\nendforeach(ffi_plugin)\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/linux/main.cc",
    "content": "#include \"my_application.h\"\n\nint main(int argc, char** argv) {\n  g_autoptr(MyApplication) app = my_application_new();\n  return g_application_run(G_APPLICATION(app), argc, argv);\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/linux/my_application.cc",
    "content": "#include \"my_application.h\"\n\n#include <flutter_linux/flutter_linux.h>\n#ifdef GDK_WINDOWING_X11\n#include <gdk/gdkx.h>\n#endif\n\n#include \"flutter/generated_plugin_registrant.h\"\n\nstruct _MyApplication {\n  GtkApplication parent_instance;\n  char** dart_entrypoint_arguments;\n};\n\nG_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)\n\n// Implements GApplication::activate.\nstatic void my_application_activate(GApplication* application) {\n  MyApplication* self = MY_APPLICATION(application);\n  GtkWindow* window =\n      GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));\n\n  // Use a header bar when running in GNOME as this is the common style used\n  // by applications and is the setup most users will be using (e.g. Ubuntu\n  // desktop).\n  // If running on X and not using GNOME then just use a traditional title bar\n  // in case the window manager does more exotic layout, e.g. tiling.\n  // If running on Wayland assume the header bar will work (may need changing\n  // if future cases occur).\n  gboolean use_header_bar = TRUE;\n#ifdef GDK_WINDOWING_X11\n  GdkScreen* screen = gtk_window_get_screen(window);\n  if (GDK_IS_X11_SCREEN(screen)) {\n    const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);\n    if (g_strcmp0(wm_name, \"GNOME Shell\") != 0) {\n      use_header_bar = FALSE;\n    }\n  }\n#endif\n  if (use_header_bar) {\n    GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());\n    gtk_widget_show(GTK_WIDGET(header_bar));\n    gtk_header_bar_set_title(header_bar, \"example\");\n    gtk_header_bar_set_show_close_button(header_bar, TRUE);\n    gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));\n  } else {\n    gtk_window_set_title(window, \"example\");\n  }\n\n  gtk_window_set_default_size(window, 1280, 720);\n  gtk_widget_show(GTK_WIDGET(window));\n\n  g_autoptr(FlDartProject) project = fl_dart_project_new();\n  fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);\n\n  FlView* view = fl_view_new(project);\n  gtk_widget_show(GTK_WIDGET(view));\n  gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));\n\n  fl_register_plugins(FL_PLUGIN_REGISTRY(view));\n\n  gtk_widget_grab_focus(GTK_WIDGET(view));\n}\n\n// Implements GApplication::local_command_line.\nstatic gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {\n  MyApplication* self = MY_APPLICATION(application);\n  // Strip out the first argument as it is the binary name.\n  self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);\n\n  g_autoptr(GError) error = nullptr;\n  if (!g_application_register(application, nullptr, &error)) {\n     g_warning(\"Failed to register: %s\", error->message);\n     *exit_status = 1;\n     return TRUE;\n  }\n\n  g_application_activate(application);\n  *exit_status = 0;\n\n  return TRUE;\n}\n\n// Implements GObject::dispose.\nstatic void my_application_dispose(GObject* object) {\n  MyApplication* self = MY_APPLICATION(object);\n  g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);\n  G_OBJECT_CLASS(my_application_parent_class)->dispose(object);\n}\n\nstatic void my_application_class_init(MyApplicationClass* klass) {\n  G_APPLICATION_CLASS(klass)->activate = my_application_activate;\n  G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;\n  G_OBJECT_CLASS(klass)->dispose = my_application_dispose;\n}\n\nstatic void my_application_init(MyApplication* self) {}\n\nMyApplication* my_application_new() {\n  return MY_APPLICATION(g_object_new(my_application_get_type(),\n                                     \"application-id\", APPLICATION_ID,\n                                     \"flags\", G_APPLICATION_NON_UNIQUE,\n                                     nullptr));\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/linux/my_application.h",
    "content": "#ifndef FLUTTER_MY_APPLICATION_H_\n#define FLUTTER_MY_APPLICATION_H_\n\n#include <gtk/gtk.h>\n\nG_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,\n                     GtkApplication)\n\n/**\n * my_application_new:\n *\n * Creates a new Flutter-based application.\n *\n * Returns: a new #MyApplication.\n */\nMyApplication* my_application_new();\n\n#endif  // FLUTTER_MY_APPLICATION_H_\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/.gitignore",
    "content": "# Flutter-related\n**/Flutter/ephemeral/\n**/Pods/\n\n# Xcode-related\n**/dgph\n**/xcuserdata/\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Flutter/Flutter-Debug.xcconfig",
    "content": "#include? \"Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"\n#include \"ephemeral/Flutter-Generated.xcconfig\"\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Flutter/Flutter-Release.xcconfig",
    "content": "#include? \"Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"\n#include \"ephemeral/Flutter-Generated.xcconfig\"\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Flutter/GeneratedPluginRegistrant.swift",
    "content": "//\n//  Generated file. Do not edit.\n//\n\nimport FlutterMacOS\nimport Foundation\n\n\nfunc RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Podfile",
    "content": "platform :osx, '10.11'\n\n# CocoaPods analytics sends network stats synchronously affecting flutter build latency.\nENV['COCOAPODS_DISABLE_STATS'] = 'true'\n\nproject 'Runner', {\n  'Debug' => :debug,\n  'Profile' => :release,\n  'Release' => :release,\n}\n\ndef flutter_root\n  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)\n  unless File.exist?(generated_xcode_build_settings_path)\n    raise \"#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \\\"flutter pub get\\\" is executed first\"\n  end\n\n  File.foreach(generated_xcode_build_settings_path) do |line|\n    matches = line.match(/FLUTTER_ROOT\\=(.*)/)\n    return matches[1].strip if matches\n  end\n  raise \"FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \\\"flutter pub get\\\"\"\nend\n\nrequire File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)\n\nflutter_macos_podfile_setup\n\ntarget 'Runner' do\n  use_frameworks!\n  use_modular_headers!\n\n  flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))\nend\n\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    flutter_additional_macos_build_settings(target)\n  end\nend\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/AppDelegate.swift",
    "content": "import Cocoa\nimport FlutterMacOS\n\n@NSApplicationMain\nclass AppDelegate: FlutterAppDelegate {\n  override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {\n    return true\n  }\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"16x16\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_16.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"16x16\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_32.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"32x32\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_32.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"32x32\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_64.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"128x128\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_128.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"128x128\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_256.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"256x256\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_256.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"256x256\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_512.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"512x512\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_512.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"512x512\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_1024.png\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/Base.lproj/MainMenu.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"14490.70\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"14490.70\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"NSApplication\">\n            <connections>\n                <outlet property=\"delegate\" destination=\"Voe-Tx-rLC\" id=\"GzC-gU-4Uq\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customObject id=\"Voe-Tx-rLC\" customClass=\"AppDelegate\" customModule=\"Runner\" customModuleProvider=\"target\">\n            <connections>\n                <outlet property=\"applicationMenu\" destination=\"uQy-DD-JDr\" id=\"XBo-yE-nKs\"/>\n                <outlet property=\"mainFlutterWindow\" destination=\"QvC-M9-y7g\" id=\"gIp-Ho-8D9\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"YLy-65-1bz\" customClass=\"NSFontManager\"/>\n        <menu title=\"Main Menu\" systemMenu=\"main\" id=\"AYu-sK-qS6\">\n            <items>\n                <menuItem title=\"APP_NAME\" id=\"1Xt-HY-uBw\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"APP_NAME\" systemMenu=\"apple\" id=\"uQy-DD-JDr\">\n                        <items>\n                            <menuItem title=\"About APP_NAME\" id=\"5kV-Vb-QxS\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"orderFrontStandardAboutPanel:\" target=\"-1\" id=\"Exp-CZ-Vem\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"VOq-y0-SEH\"/>\n                            <menuItem title=\"Preferences…\" keyEquivalent=\",\" id=\"BOF-NM-1cW\"/>\n                            <menuItem isSeparatorItem=\"YES\" id=\"wFC-TO-SCJ\"/>\n                            <menuItem title=\"Services\" id=\"NMo-om-nkz\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Services\" systemMenu=\"services\" id=\"hz9-B4-Xy5\"/>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"4je-JR-u6R\"/>\n                            <menuItem title=\"Hide APP_NAME\" keyEquivalent=\"h\" id=\"Olw-nP-bQN\">\n                                <connections>\n                                    <action selector=\"hide:\" target=\"-1\" id=\"PnN-Uc-m68\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Hide Others\" keyEquivalent=\"h\" id=\"Vdr-fp-XzO\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"hideOtherApplications:\" target=\"-1\" id=\"VT4-aY-XCT\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Show All\" id=\"Kd2-mp-pUS\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"unhideAllApplications:\" target=\"-1\" id=\"Dhg-Le-xox\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"kCx-OE-vgT\"/>\n                            <menuItem title=\"Quit APP_NAME\" keyEquivalent=\"q\" id=\"4sb-4s-VLi\">\n                                <connections>\n                                    <action selector=\"terminate:\" target=\"-1\" id=\"Te7-pn-YzF\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Edit\" id=\"5QF-Oa-p0T\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Edit\" id=\"W48-6f-4Dl\">\n                        <items>\n                            <menuItem title=\"Undo\" keyEquivalent=\"z\" id=\"dRJ-4n-Yzg\">\n                                <connections>\n                                    <action selector=\"undo:\" target=\"-1\" id=\"M6e-cu-g7V\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Redo\" keyEquivalent=\"Z\" id=\"6dh-zS-Vam\">\n                                <connections>\n                                    <action selector=\"redo:\" target=\"-1\" id=\"oIA-Rs-6OD\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"WRV-NI-Exz\"/>\n                            <menuItem title=\"Cut\" keyEquivalent=\"x\" id=\"uRl-iY-unG\">\n                                <connections>\n                                    <action selector=\"cut:\" target=\"-1\" id=\"YJe-68-I9s\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Copy\" keyEquivalent=\"c\" id=\"x3v-GG-iWU\">\n                                <connections>\n                                    <action selector=\"copy:\" target=\"-1\" id=\"G1f-GL-Joy\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Paste\" keyEquivalent=\"v\" id=\"gVA-U4-sdL\">\n                                <connections>\n                                    <action selector=\"paste:\" target=\"-1\" id=\"UvS-8e-Qdg\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Paste and Match Style\" keyEquivalent=\"V\" id=\"WeT-3V-zwk\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"pasteAsPlainText:\" target=\"-1\" id=\"cEh-KX-wJQ\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Delete\" id=\"pa3-QI-u2k\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"delete:\" target=\"-1\" id=\"0Mk-Ml-PaM\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Select All\" keyEquivalent=\"a\" id=\"Ruw-6m-B2m\">\n                                <connections>\n                                    <action selector=\"selectAll:\" target=\"-1\" id=\"VNm-Mi-diN\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"uyl-h8-XO2\"/>\n                            <menuItem title=\"Find\" id=\"4EN-yA-p0u\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Find\" id=\"1b7-l0-nxx\">\n                                    <items>\n                                        <menuItem title=\"Find…\" tag=\"1\" keyEquivalent=\"f\" id=\"Xz5-n4-O0W\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"cD7-Qs-BN4\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find and Replace…\" tag=\"12\" keyEquivalent=\"f\" id=\"YEy-JH-Tfz\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"WD3-Gg-5AJ\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find Next\" tag=\"2\" keyEquivalent=\"g\" id=\"q09-fT-Sye\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"NDo-RZ-v9R\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find Previous\" tag=\"3\" keyEquivalent=\"G\" id=\"OwM-mh-QMV\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"HOh-sY-3ay\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Use Selection for Find\" tag=\"7\" keyEquivalent=\"e\" id=\"buJ-ug-pKt\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"U76-nv-p5D\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Jump to Selection\" keyEquivalent=\"j\" id=\"S0p-oC-mLd\">\n                                            <connections>\n                                                <action selector=\"centerSelectionInVisibleArea:\" target=\"-1\" id=\"IOG-6D-g5B\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Spelling and Grammar\" id=\"Dv1-io-Yv7\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Spelling\" id=\"3IN-sU-3Bg\">\n                                    <items>\n                                        <menuItem title=\"Show Spelling and Grammar\" keyEquivalent=\":\" id=\"HFo-cy-zxI\">\n                                            <connections>\n                                                <action selector=\"showGuessPanel:\" target=\"-1\" id=\"vFj-Ks-hy3\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Document Now\" keyEquivalent=\";\" id=\"hz2-CU-CR7\">\n                                            <connections>\n                                                <action selector=\"checkSpelling:\" target=\"-1\" id=\"fz7-VC-reM\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"bNw-od-mp5\"/>\n                                        <menuItem title=\"Check Spelling While Typing\" id=\"rbD-Rh-wIN\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleContinuousSpellChecking:\" target=\"-1\" id=\"7w6-Qz-0kB\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Grammar With Spelling\" id=\"mK6-2p-4JG\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleGrammarChecking:\" target=\"-1\" id=\"muD-Qn-j4w\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Correct Spelling Automatically\" id=\"78Y-hA-62v\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticSpellingCorrection:\" target=\"-1\" id=\"2lM-Qi-WAP\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Substitutions\" id=\"9ic-FL-obx\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Substitutions\" id=\"FeM-D8-WVr\">\n                                    <items>\n                                        <menuItem title=\"Show Substitutions\" id=\"z6F-FW-3nz\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"orderFrontSubstitutionsPanel:\" target=\"-1\" id=\"oku-mr-iSq\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"gPx-C9-uUO\"/>\n                                        <menuItem title=\"Smart Copy/Paste\" id=\"9yt-4B-nSM\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleSmartInsertDelete:\" target=\"-1\" id=\"3IJ-Se-DZD\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Quotes\" id=\"hQb-2v-fYv\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticQuoteSubstitution:\" target=\"-1\" id=\"ptq-xd-QOA\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Dashes\" id=\"rgM-f4-ycn\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticDashSubstitution:\" target=\"-1\" id=\"oCt-pO-9gS\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Links\" id=\"cwL-P1-jid\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticLinkDetection:\" target=\"-1\" id=\"Gip-E3-Fov\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Data Detectors\" id=\"tRr-pd-1PS\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticDataDetection:\" target=\"-1\" id=\"R1I-Nq-Kbl\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Text Replacement\" id=\"HFQ-gK-NFA\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticTextReplacement:\" target=\"-1\" id=\"DvP-Fe-Py6\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Transformations\" id=\"2oI-Rn-ZJC\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Transformations\" id=\"c8a-y6-VQd\">\n                                    <items>\n                                        <menuItem title=\"Make Upper Case\" id=\"vmV-6d-7jI\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"uppercaseWord:\" target=\"-1\" id=\"sPh-Tk-edu\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Make Lower Case\" id=\"d9M-CD-aMd\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"lowercaseWord:\" target=\"-1\" id=\"iUZ-b5-hil\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Capitalize\" id=\"UEZ-Bs-lqG\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"capitalizeWord:\" target=\"-1\" id=\"26H-TL-nsh\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Speech\" id=\"xrE-MZ-jX0\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Speech\" id=\"3rS-ZA-NoH\">\n                                    <items>\n                                        <menuItem title=\"Start Speaking\" id=\"Ynk-f8-cLZ\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"startSpeaking:\" target=\"-1\" id=\"654-Ng-kyl\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Stop Speaking\" id=\"Oyz-dy-DGm\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"stopSpeaking:\" target=\"-1\" id=\"dX8-6p-jy9\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"View\" id=\"H8h-7b-M4v\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"View\" id=\"HyV-fh-RgO\">\n                        <items>\n                            <menuItem title=\"Enter Full Screen\" keyEquivalent=\"f\" id=\"4J7-dP-txa\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" control=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"toggleFullScreen:\" target=\"-1\" id=\"dU3-MA-1Rq\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Window\" id=\"aUF-d1-5bR\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Window\" systemMenu=\"window\" id=\"Td7-aD-5lo\">\n                        <items>\n                            <menuItem title=\"Minimize\" keyEquivalent=\"m\" id=\"OY7-WF-poV\">\n                                <connections>\n                                    <action selector=\"performMiniaturize:\" target=\"-1\" id=\"VwT-WD-YPe\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Zoom\" id=\"R4o-n2-Eq4\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"performZoom:\" target=\"-1\" id=\"DIl-cC-cCs\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"eu3-7i-yIM\"/>\n                            <menuItem title=\"Bring All to Front\" id=\"LE2-aR-0XJ\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"arrangeInFront:\" target=\"-1\" id=\"DRN-fu-gQh\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Help\" id=\"EPT-qC-fAb\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Help\" systemMenu=\"help\" id=\"rJ0-wn-3NY\"/>\n                </menuItem>\n            </items>\n            <point key=\"canvasLocation\" x=\"142\" y=\"-258\"/>\n        </menu>\n        <window title=\"APP_NAME\" allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" releasedWhenClosed=\"NO\" animationBehavior=\"default\" id=\"QvC-M9-y7g\" customClass=\"MainFlutterWindow\" customModule=\"Runner\" customModuleProvider=\"target\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <rect key=\"contentRect\" x=\"335\" y=\"390\" width=\"800\" height=\"600\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"2560\" height=\"1577\"/>\n            <view key=\"contentView\" wantsLayer=\"YES\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"800\" height=\"600\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n            </view>\n        </window>\n    </objects>\n</document>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/Configs/AppInfo.xcconfig",
    "content": "// Application-level settings for the Runner target.\n//\n// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the\n// future. If not, the values below would default to using the project name when this becomes a\n// 'flutter create' template.\n\n// The application's name. By default this is also the title of the Flutter window.\nPRODUCT_NAME = example\n\n// The application's bundle identifier\nPRODUCT_BUNDLE_IDENTIFIER = com.example.example\n\n// The copyright displayed in application information\nPRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved.\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/Configs/Debug.xcconfig",
    "content": "#include \"../../Flutter/Flutter-Debug.xcconfig\"\n#include \"Warnings.xcconfig\"\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/Configs/Release.xcconfig",
    "content": "#include \"../../Flutter/Flutter-Release.xcconfig\"\n#include \"Warnings.xcconfig\"\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/Configs/Warnings.xcconfig",
    "content": "WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings\nGCC_WARN_UNDECLARED_SELECTOR = YES\nCLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES\nCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE\nCLANG_WARN__DUPLICATE_METHOD_MATCH = YES\nCLANG_WARN_PRAGMA_PACK = YES\nCLANG_WARN_STRICT_PROTOTYPES = YES\nCLANG_WARN_COMMA = YES\nGCC_WARN_STRICT_SELECTOR_MATCH = YES\nCLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES\nCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES\nGCC_WARN_SHADOW = YES\nCLANG_WARN_UNREACHABLE_CODE = YES\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/DebugProfile.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>com.apple.security.app-sandbox</key>\n\t<true/>\n\t<key>com.apple.security.cs.allow-jit</key>\n\t<true/>\n\t<key>com.apple.security.network.server</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIconFile</key>\n\t<string></string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>$(FLUTTER_BUILD_NAME)</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(FLUTTER_BUILD_NUMBER)</string>\n\t<key>LSMinimumSystemVersion</key>\n\t<string>$(MACOSX_DEPLOYMENT_TARGET)</string>\n\t<key>NSHumanReadableCopyright</key>\n\t<string>$(PRODUCT_COPYRIGHT)</string>\n\t<key>NSMainNibFile</key>\n\t<string>MainMenu</string>\n\t<key>NSPrincipalClass</key>\n\t<string>NSApplication</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/MainFlutterWindow.swift",
    "content": "import Cocoa\nimport FlutterMacOS\n\nclass MainFlutterWindow: NSWindow {\n  override func awakeFromNib() {\n    let flutterViewController = FlutterViewController.init()\n    let windowFrame = self.frame\n    self.contentViewController = flutterViewController\n    self.setFrame(windowFrame, display: true)\n\n    RegisterGeneratedPlugins(registry: flutterViewController)\n\n    super.awakeFromNib()\n  }\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner/Release.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>com.apple.security.app-sandbox</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 51;\n\tobjects = {\n\n/* Begin PBXAggregateTarget section */\n\t\t33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {\n\t\t\tisa = PBXAggregateTarget;\n\t\t\tbuildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget \"Flutter Assemble\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t33CC111E2044C6BF0003C045 /* ShellScript */,\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = \"Flutter Assemble\";\n\t\t\tproductName = FLX;\n\t\t};\n/* End PBXAggregateTarget section */\n\n/* Begin PBXBuildFile section */\n\t\t335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };\n\t\t33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };\n\t\t33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };\n\t\t33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };\n\t\t33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 33CC10E52044A3C60003C045 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 33CC111A2044C6BA0003C045;\n\t\t\tremoteInfo = FLX;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t33CC110E2044A8840003C045 /* Bundle Framework */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tname = \"Bundle Framework\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = \"<group>\"; };\n\t\t335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = \"<group>\"; };\n\t\t33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"example.app\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = \"<group>\"; };\n\t\t33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = \"<group>\"; };\n\t\t33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = \"<group>\"; };\n\t\t33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = \"Flutter-Debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = \"Flutter-Release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = \"Flutter-Generated.xcconfig\"; path = \"ephemeral/Flutter-Generated.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = \"<group>\"; };\n\t\t33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = \"<group>\"; };\n\t\t33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = \"<group>\"; };\n\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = \"<group>\"; };\n\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t33CC10EA2044A3C60003C045 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t33BA886A226E78AF003329D5 /* Configs */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33E5194F232828860026EE4D /* AppInfo.xcconfig */,\n\t\t\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */,\n\t\t\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */,\n\t\t\t\t333000ED22D3DE5D00554162 /* Warnings.xcconfig */,\n\t\t\t);\n\t\t\tpath = Configs;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC10E42044A3C60003C045 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33FAB671232836740065AC1E /* Runner */,\n\t\t\t\t33CEB47122A05771004F2AC0 /* Flutter */,\n\t\t\t\t33CC10EE2044A3C60003C045 /* Products */,\n\t\t\t\tD73912EC22F37F3D000D13A0 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC10EE2044A3C60003C045 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10ED2044A3C60003C045 /* example.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC11242044D66E0003C045 /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F22044A3C60003C045 /* Assets.xcassets */,\n\t\t\t\t33CC10F42044A3C60003C045 /* MainMenu.xib */,\n\t\t\t\t33CC10F72044A3C60003C045 /* Info.plist */,\n\t\t\t);\n\t\t\tname = Resources;\n\t\t\tpath = ..;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CEB47122A05771004F2AC0 /* Flutter */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,\n\t\t\t\t33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,\n\t\t\t\t33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,\n\t\t\t\t33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,\n\t\t\t);\n\t\t\tpath = Flutter;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33FAB671232836740065AC1E /* Runner */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F02044A3C60003C045 /* AppDelegate.swift */,\n\t\t\t\t33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,\n\t\t\t\t33E51913231747F40026EE4D /* DebugProfile.entitlements */,\n\t\t\t\t33E51914231749380026EE4D /* Release.entitlements */,\n\t\t\t\t33CC11242044D66E0003C045 /* Resources */,\n\t\t\t\t33BA886A226E78AF003329D5 /* Configs */,\n\t\t\t);\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tD73912EC22F37F3D000D13A0 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t33CC10EC2044A3C60003C045 /* Runner */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget \"Runner\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t33CC10E92044A3C60003C045 /* Sources */,\n\t\t\t\t33CC10EA2044A3C60003C045 /* Frameworks */,\n\t\t\t\t33CC10EB2044A3C60003C045 /* Resources */,\n\t\t\t\t33CC110E2044A8840003C045 /* Bundle Framework */,\n\t\t\t\t3399D490228B24CF009A79C7 /* ShellScript */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t33CC11202044C79F0003C045 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = Runner;\n\t\t\tproductName = Runner;\n\t\t\tproductReference = 33CC10ED2044A3C60003C045 /* example.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t33CC10E52044A3C60003C045 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0920;\n\t\t\t\tLastUpgradeCheck = 1300;\n\t\t\t\tORGANIZATIONNAME = \"\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t33CC10EC2044A3C60003C045 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t\tSystemCapabilities = {\n\t\t\t\t\t\t\tcom.apple.Sandbox = {\n\t\t\t\t\t\t\t\tenabled = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\t33CC111A2044C6BA0003C045 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tProvisioningStyle = Manual;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject \"Runner\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 33CC10E42044A3C60003C045;\n\t\t\tproductRefGroup = 33CC10EE2044A3C60003C045 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t33CC10EC2044A3C60003C045 /* Runner */,\n\t\t\t\t33CC111A2044C6BA0003C045 /* Flutter Assemble */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t33CC10EB2044A3C60003C045 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,\n\t\t\t\t33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t3399D490228B24CF009A79C7 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"echo \\\"$PRODUCT_NAME.app\\\" > \\\"$PROJECT_DIR\\\"/Flutter/ephemeral/.app_filename && \\\"$FLUTTER_ROOT\\\"/packages/flutter_tools/bin/macos_assemble.sh embed\\n\";\n\t\t};\n\t\t33CC111E2044C6BF0003C045 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t\tFlutter/ephemeral/FlutterInputs.xcfilelist,\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\tFlutter/ephemeral/tripwire,\n\t\t\t);\n\t\t\toutputFileListPaths = (\n\t\t\t\tFlutter/ephemeral/FlutterOutputs.xcfilelist,\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"$FLUTTER_ROOT\\\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire\";\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t33CC10E92044A3C60003C045 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,\n\t\t\t\t33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,\n\t\t\t\t335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t33CC11202044C79F0003C045 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;\n\t\t\ttargetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin PBXVariantGroup section */\n\t\t33CC10F42044A3C60003C045 /* MainMenu.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F52044A3C60003C045 /* Base */,\n\t\t\t);\n\t\t\tname = MainMenu.xib;\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t338D0CE9231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.11;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t338D0CEA231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t338D0CEB231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t33CC10F92044A3C60003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.11;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC10FA2044A3C60003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.11;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t33CC10FC2044A3C60003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC10FD2044A3C60003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t33CC111C2044C6BA0003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC111D2044C6BA0003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t33CC10E82044A3C60003C045 /* Build configuration list for PBXProject \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC10F92044A3C60003C045 /* Debug */,\n\t\t\t\t33CC10FA2044A3C60003C045 /* Release */,\n\t\t\t\t338D0CE9231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC10FC2044A3C60003C045 /* Debug */,\n\t\t\t\t33CC10FD2044A3C60003C045 /* Release */,\n\t\t\t\t338D0CEA231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget \"Flutter Assemble\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC111C2044C6BA0003C045 /* Debug */,\n\t\t\t\t33CC111D2044C6BA0003C045 /* Release */,\n\t\t\t\t338D0CEB231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 33CC10E52044A3C60003C045 /* Project object */;\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1300\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n               BuildableName = \"example.app\"\n               BlueprintName = \"Runner\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"example.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <Testables>\n      </Testables>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"example.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Profile\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"example.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:Runner.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/pubspec.yaml",
    "content": "name: native_dio_adapter_example\npublish_to: 'none'\n\nversion: 1.0.0+1\n\nenvironment:\n  sdk: '>=3.1.0 <4.0.0'\n\ndependencies:\n  flutter:\n    sdk: flutter\n  cupertino_icons: ^1.0.2\n  dio: ^5.0.0\n  native_dio_adapter:\n    path:\n      ../\n\ndev_dependencies:\n  flutter_test:\n    sdk: flutter\n  flutter_lints: ^2.0.0\n\nflutter:\n  uses-material-design: true"
  },
  {
    "path": "plugins/native_dio_adapter/example/web/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n  <!--\n    If you are serving your web app in a path other than the root, change the\n    href value below to reflect the base path you are serving from.\n\n    The path provided below has to start and end with a slash \"/\" in order for\n    it to work correctly.\n\n    For more details:\n    * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base\n\n    This is a placeholder for base href that will be replaced by the value of\n    the `--base-href` argument provided to `flutter build`.\n  -->\n  <base href=\"$FLUTTER_BASE_HREF\">\n\n  <meta charset=\"UTF-8\">\n  <meta content=\"IE=Edge\" http-equiv=\"X-UA-Compatible\">\n  <meta name=\"description\" content=\"A new Flutter project.\">\n\n  <!-- iOS meta tags & icons -->\n  <meta name=\"apple-mobile-web-app-capable\" content=\"yes\">\n  <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\n  <meta name=\"apple-mobile-web-app-title\" content=\"example\">\n  <link rel=\"apple-touch-icon\" href=\"icons/Icon-192.png\">\n\n  <!-- Favicon -->\n  <link rel=\"icon\" type=\"image/png\" href=\"favicon.png\"/>\n\n  <title>example</title>\n  <link rel=\"manifest\" href=\"manifest.json\">\n\n  <script>\n    // The value below is injected by flutter build, do not touch.\n    var serviceWorkerVersion = null;\n  </script>\n  <!-- This script adds the flutter initialization JS code -->\n  <script src=\"flutter.js\" defer></script>\n</head>\n<body>\n  <script>\n    window.addEventListener('load', function(ev) {\n      // Download main.dart.js\n      _flutter.loader.loadEntrypoint({\n        serviceWorker: {\n          serviceWorkerVersion: serviceWorkerVersion,\n        }\n      }).then(function(engineInitializer) {\n        return engineInitializer.initializeEngine();\n      }).then(function(appRunner) {\n        return appRunner.runApp();\n      });\n    });\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/web/manifest.json",
    "content": "{\n    \"name\": \"example\",\n    \"short_name\": \"example\",\n    \"start_url\": \".\",\n    \"display\": \"standalone\",\n    \"background_color\": \"#0175C2\",\n    \"theme_color\": \"#0175C2\",\n    \"description\": \"A new Flutter project.\",\n    \"orientation\": \"portrait-primary\",\n    \"prefer_related_applications\": false,\n    \"icons\": [\n        {\n            \"src\": \"icons/Icon-192.png\",\n            \"sizes\": \"192x192\",\n            \"type\": \"image/png\"\n        },\n        {\n            \"src\": \"icons/Icon-512.png\",\n            \"sizes\": \"512x512\",\n            \"type\": \"image/png\"\n        },\n        {\n            \"src\": \"icons/Icon-maskable-192.png\",\n            \"sizes\": \"192x192\",\n            \"type\": \"image/png\",\n            \"purpose\": \"maskable\"\n        },\n        {\n            \"src\": \"icons/Icon-maskable-512.png\",\n            \"sizes\": \"512x512\",\n            \"type\": \"image/png\",\n            \"purpose\": \"maskable\"\n        }\n    ]\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/.gitignore",
    "content": "flutter/ephemeral/\n\n# Visual Studio user-specific files.\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# Visual Studio build-related files.\nx64/\nx86/\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/CMakeLists.txt",
    "content": "# Project-level configuration.\ncmake_minimum_required(VERSION 3.14)\nproject(example LANGUAGES CXX)\n\n# The name of the executable created for the application. Change this to change\n# the on-disk name of your application.\nset(BINARY_NAME \"example\")\n\n# Explicitly opt in to modern CMake behaviors to avoid warnings with recent\n# versions of CMake.\ncmake_policy(SET CMP0063 NEW)\n\n# Define build configuration option.\nget_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)\nif(IS_MULTICONFIG)\n  set(CMAKE_CONFIGURATION_TYPES \"Debug;Profile;Release\"\n    CACHE STRING \"\" FORCE)\nelse()\n  if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n    set(CMAKE_BUILD_TYPE \"Debug\" CACHE\n      STRING \"Flutter build mode\" FORCE)\n    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS\n      \"Debug\" \"Profile\" \"Release\")\n  endif()\nendif()\n# Define settings for the Profile build mode.\nset(CMAKE_EXE_LINKER_FLAGS_PROFILE \"${CMAKE_EXE_LINKER_FLAGS_RELEASE}\")\nset(CMAKE_SHARED_LINKER_FLAGS_PROFILE \"${CMAKE_SHARED_LINKER_FLAGS_RELEASE}\")\nset(CMAKE_C_FLAGS_PROFILE \"${CMAKE_C_FLAGS_RELEASE}\")\nset(CMAKE_CXX_FLAGS_PROFILE \"${CMAKE_CXX_FLAGS_RELEASE}\")\n\n# Use Unicode for all projects.\nadd_definitions(-DUNICODE -D_UNICODE)\n\n# Compilation settings that should be applied to most targets.\n#\n# Be cautious about adding new options here, as plugins use this function by\n# default. In most cases, you should add new options to specific targets instead\n# of modifying this function.\nfunction(APPLY_STANDARD_SETTINGS TARGET)\n  target_compile_features(${TARGET} PUBLIC cxx_std_17)\n  target_compile_options(${TARGET} PRIVATE /W4 /WX /wd\"4100\")\n  target_compile_options(${TARGET} PRIVATE /EHsc)\n  target_compile_definitions(${TARGET} PRIVATE \"_HAS_EXCEPTIONS=0\")\n  target_compile_definitions(${TARGET} PRIVATE \"$<$<CONFIG:Debug>:_DEBUG>\")\nendfunction()\n\n# Flutter library and tool build rules.\nset(FLUTTER_MANAGED_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/flutter\")\nadd_subdirectory(${FLUTTER_MANAGED_DIR})\n\n# Application build; see runner/CMakeLists.txt.\nadd_subdirectory(\"runner\")\n\n# Generated plugin build rules, which manage building the plugins and adding\n# them to the application.\ninclude(flutter/generated_plugins.cmake)\n\n\n# === Installation ===\n# Support files are copied into place next to the executable, so that it can\n# run in place. This is done instead of making a separate bundle (as on Linux)\n# so that building and running from within Visual Studio will work.\nset(BUILD_BUNDLE_DIR \"$<TARGET_FILE_DIR:${BINARY_NAME}>\")\n# Make the \"install\" step default, as it's required to run.\nset(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)\nif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)\n  set(CMAKE_INSTALL_PREFIX \"${BUILD_BUNDLE_DIR}\" CACHE PATH \"...\" FORCE)\nendif()\n\nset(INSTALL_BUNDLE_DATA_DIR \"${CMAKE_INSTALL_PREFIX}/data\")\nset(INSTALL_BUNDLE_LIB_DIR \"${CMAKE_INSTALL_PREFIX}\")\n\ninstall(TARGETS ${BINARY_NAME} RUNTIME DESTINATION \"${CMAKE_INSTALL_PREFIX}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_ICU_DATA_FILE}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\nif(PLUGIN_BUNDLED_LIBRARIES)\n  install(FILES \"${PLUGIN_BUNDLED_LIBRARIES}\"\n    DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendif()\n\n# Fully re-copy the assets directory on each build to avoid having stale files\n# from a previous install.\nset(FLUTTER_ASSET_DIR_NAME \"flutter_assets\")\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\\\")\n  \" COMPONENT Runtime)\ninstall(DIRECTORY \"${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}\"\n  DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\" COMPONENT Runtime)\n\n# Install the AOT library on non-Debug builds only.\ninstall(FILES \"${AOT_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  CONFIGURATIONS Profile;Release\n  COMPONENT Runtime)\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/flutter/CMakeLists.txt",
    "content": "# This file controls Flutter-level build steps. It should not be edited.\ncmake_minimum_required(VERSION 3.14)\n\nset(EPHEMERAL_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/ephemeral\")\n\n# Configuration provided via flutter tool.\ninclude(${EPHEMERAL_DIR}/generated_config.cmake)\n\n# TODO: Move the rest of this into files in ephemeral. See\n# https://github.com/flutter/flutter/issues/57146.\nset(WRAPPER_ROOT \"${EPHEMERAL_DIR}/cpp_client_wrapper\")\n\n# === Flutter Library ===\nset(FLUTTER_LIBRARY \"${EPHEMERAL_DIR}/flutter_windows.dll\")\n\n# Published to parent scope for install step.\nset(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)\nset(FLUTTER_ICU_DATA_FILE \"${EPHEMERAL_DIR}/icudtl.dat\" PARENT_SCOPE)\nset(PROJECT_BUILD_DIR \"${PROJECT_DIR}/build/\" PARENT_SCOPE)\nset(AOT_LIBRARY \"${PROJECT_DIR}/build/windows/app.so\" PARENT_SCOPE)\n\nlist(APPEND FLUTTER_LIBRARY_HEADERS\n  \"flutter_export.h\"\n  \"flutter_windows.h\"\n  \"flutter_messenger.h\"\n  \"flutter_plugin_registrar.h\"\n  \"flutter_texture_registrar.h\"\n)\nlist(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND \"${EPHEMERAL_DIR}/\")\nadd_library(flutter INTERFACE)\ntarget_include_directories(flutter INTERFACE\n  \"${EPHEMERAL_DIR}\"\n)\ntarget_link_libraries(flutter INTERFACE \"${FLUTTER_LIBRARY}.lib\")\nadd_dependencies(flutter flutter_assemble)\n\n# === Wrapper ===\nlist(APPEND CPP_WRAPPER_SOURCES_CORE\n  \"core_implementations.cc\"\n  \"standard_codec.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND \"${WRAPPER_ROOT}/\")\nlist(APPEND CPP_WRAPPER_SOURCES_PLUGIN\n  \"plugin_registrar.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND \"${WRAPPER_ROOT}/\")\nlist(APPEND CPP_WRAPPER_SOURCES_APP\n  \"flutter_engine.cc\"\n  \"flutter_view_controller.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND \"${WRAPPER_ROOT}/\")\n\n# Wrapper sources needed for a plugin.\nadd_library(flutter_wrapper_plugin STATIC\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_PLUGIN}\n)\napply_standard_settings(flutter_wrapper_plugin)\nset_target_properties(flutter_wrapper_plugin PROPERTIES\n  POSITION_INDEPENDENT_CODE ON)\nset_target_properties(flutter_wrapper_plugin PROPERTIES\n  CXX_VISIBILITY_PRESET hidden)\ntarget_link_libraries(flutter_wrapper_plugin PUBLIC flutter)\ntarget_include_directories(flutter_wrapper_plugin PUBLIC\n  \"${WRAPPER_ROOT}/include\"\n)\nadd_dependencies(flutter_wrapper_plugin flutter_assemble)\n\n# Wrapper sources needed for the runner.\nadd_library(flutter_wrapper_app STATIC\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_APP}\n)\napply_standard_settings(flutter_wrapper_app)\ntarget_link_libraries(flutter_wrapper_app PUBLIC flutter)\ntarget_include_directories(flutter_wrapper_app PUBLIC\n  \"${WRAPPER_ROOT}/include\"\n)\nadd_dependencies(flutter_wrapper_app flutter_assemble)\n\n# === Flutter tool backend ===\n# _phony_ is a non-existent file to force this command to run every time,\n# since currently there's no way to get a full input/output list from the\n# flutter tool.\nset(PHONY_OUTPUT \"${CMAKE_CURRENT_BINARY_DIR}/_phony_\")\nset_source_files_properties(\"${PHONY_OUTPUT}\" PROPERTIES SYMBOLIC TRUE)\nadd_custom_command(\n  OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}\n    ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}\n    ${CPP_WRAPPER_SOURCES_APP}\n    ${PHONY_OUTPUT}\n  COMMAND ${CMAKE_COMMAND} -E env\n    ${FLUTTER_TOOL_ENVIRONMENT}\n    \"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat\"\n      windows-x64 $<CONFIG>\n  VERBATIM\n)\nadd_custom_target(flutter_assemble DEPENDS\n  \"${FLUTTER_LIBRARY}\"\n  ${FLUTTER_LIBRARY_HEADERS}\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_PLUGIN}\n  ${CPP_WRAPPER_SOURCES_APP}\n)\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/flutter/generated_plugin_registrant.cc",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#include \"generated_plugin_registrant.h\"\n\n\nvoid RegisterPlugins(flutter::PluginRegistry* registry) {\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/flutter/generated_plugin_registrant.h",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#ifndef GENERATED_PLUGIN_REGISTRANT_\n#define GENERATED_PLUGIN_REGISTRANT_\n\n#include <flutter/plugin_registry.h>\n\n// Registers Flutter plugins.\nvoid RegisterPlugins(flutter::PluginRegistry* registry);\n\n#endif  // GENERATED_PLUGIN_REGISTRANT_\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/flutter/generated_plugins.cmake",
    "content": "#\n# Generated file, do not edit.\n#\n\nlist(APPEND FLUTTER_PLUGIN_LIST\n)\n\nlist(APPEND FLUTTER_FFI_PLUGIN_LIST\n  jni\n)\n\nset(PLUGIN_BUNDLED_LIBRARIES)\n\nforeach(plugin ${FLUTTER_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})\n  target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})\nendforeach(plugin)\n\nforeach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})\nendforeach(ffi_plugin)\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.14)\nproject(runner LANGUAGES CXX)\n\n# Define the application target. To change its name, change BINARY_NAME in the\n# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer\n# work.\n#\n# Any new source files that you add to the application should be added here.\nadd_executable(${BINARY_NAME} WIN32\n  \"flutter_window.cpp\"\n  \"main.cpp\"\n  \"utils.cpp\"\n  \"win32_window.cpp\"\n  \"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc\"\n  \"Runner.rc\"\n  \"runner.exe.manifest\"\n)\n\n# Apply the standard set of build settings. This can be removed for applications\n# that need different build settings.\napply_standard_settings(${BINARY_NAME})\n\n# Add preprocessor definitions for the build version.\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION=\\\"${FLUTTER_VERSION}\\\"\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}\")\n\n# Disable Windows macros that collide with C++ standard library functions.\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"NOMINMAX\")\n\n# Add dependency libraries and include directories. Add any application-specific\n# dependencies here.\ntarget_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)\ntarget_include_directories(${BINARY_NAME} PRIVATE \"${CMAKE_SOURCE_DIR}\")\n\n# Run the Flutter tool portions of the build. This must not be removed.\nadd_dependencies(${BINARY_NAME} flutter_assemble)\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/Runner.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#pragma code_page(65001)\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#include \"winres.h\"\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (United States) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE\nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE\nBEGIN\n    \"#include \"\"winres.h\"\"\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE\nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDI_APP_ICON            ICON                    \"resources\\\\app_icon.ico\"\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Version\n//\n\n#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)\n#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD\n#else\n#define VERSION_AS_NUMBER 1,0,0,0\n#endif\n\n#if defined(FLUTTER_VERSION)\n#define VERSION_AS_STRING FLUTTER_VERSION\n#else\n#define VERSION_AS_STRING \"1.0.0\"\n#endif\n\nVS_VERSION_INFO VERSIONINFO\n FILEVERSION VERSION_AS_NUMBER\n PRODUCTVERSION VERSION_AS_NUMBER\n FILEFLAGSMASK VS_FFI_FILEFLAGSMASK\n#ifdef _DEBUG\n FILEFLAGS VS_FF_DEBUG\n#else\n FILEFLAGS 0x0L\n#endif\n FILEOS VOS__WINDOWS32\n FILETYPE VFT_APP\n FILESUBTYPE 0x0L\nBEGIN\n    BLOCK \"StringFileInfo\"\n    BEGIN\n        BLOCK \"040904e4\"\n        BEGIN\n            VALUE \"CompanyName\", \"com.example\" \"\\0\"\n            VALUE \"FileDescription\", \"example\" \"\\0\"\n            VALUE \"FileVersion\", VERSION_AS_STRING \"\\0\"\n            VALUE \"InternalName\", \"example\" \"\\0\"\n            VALUE \"LegalCopyright\", \"Copyright (C) 2022 com.example. All rights reserved.\" \"\\0\"\n            VALUE \"OriginalFilename\", \"example.exe\" \"\\0\"\n            VALUE \"ProductName\", \"example\" \"\\0\"\n            VALUE \"ProductVersion\", VERSION_AS_STRING \"\\0\"\n        END\n    END\n    BLOCK \"VarFileInfo\"\n    BEGIN\n        VALUE \"Translation\", 0x409, 1252\n    END\nEND\n\n#endif    // English (United States) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/flutter_window.cpp",
    "content": "#include \"flutter_window.h\"\n\n#include <optional>\n\n#include \"flutter/generated_plugin_registrant.h\"\n\nFlutterWindow::FlutterWindow(const flutter::DartProject& project)\n    : project_(project) {}\n\nFlutterWindow::~FlutterWindow() {}\n\nbool FlutterWindow::OnCreate() {\n  if (!Win32Window::OnCreate()) {\n    return false;\n  }\n\n  RECT frame = GetClientArea();\n\n  // The size here must match the window dimensions to avoid unnecessary surface\n  // creation / destruction in the startup path.\n  flutter_controller_ = std::make_unique<flutter::FlutterViewController>(\n      frame.right - frame.left, frame.bottom - frame.top, project_);\n  // Ensure that basic setup of the controller was successful.\n  if (!flutter_controller_->engine() || !flutter_controller_->view()) {\n    return false;\n  }\n  RegisterPlugins(flutter_controller_->engine());\n  SetChildContent(flutter_controller_->view()->GetNativeWindow());\n  return true;\n}\n\nvoid FlutterWindow::OnDestroy() {\n  if (flutter_controller_) {\n    flutter_controller_ = nullptr;\n  }\n\n  Win32Window::OnDestroy();\n}\n\nLRESULT\nFlutterWindow::MessageHandler(HWND hwnd, UINT const message,\n                              WPARAM const wparam,\n                              LPARAM const lparam) noexcept {\n  // Give Flutter, including plugins, an opportunity to handle window messages.\n  if (flutter_controller_) {\n    std::optional<LRESULT> result =\n        flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,\n                                                      lparam);\n    if (result) {\n      return *result;\n    }\n  }\n\n  switch (message) {\n    case WM_FONTCHANGE:\n      flutter_controller_->engine()->ReloadSystemFonts();\n      break;\n  }\n\n  return Win32Window::MessageHandler(hwnd, message, wparam, lparam);\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/flutter_window.h",
    "content": "#ifndef RUNNER_FLUTTER_WINDOW_H_\n#define RUNNER_FLUTTER_WINDOW_H_\n\n#include <flutter/dart_project.h>\n#include <flutter/flutter_view_controller.h>\n\n#include <memory>\n\n#include \"win32_window.h\"\n\n// A window that does nothing but host a Flutter view.\nclass FlutterWindow : public Win32Window {\n public:\n  // Creates a new FlutterWindow hosting a Flutter view running |project|.\n  explicit FlutterWindow(const flutter::DartProject& project);\n  virtual ~FlutterWindow();\n\n protected:\n  // Win32Window:\n  bool OnCreate() override;\n  void OnDestroy() override;\n  LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,\n                         LPARAM const lparam) noexcept override;\n\n private:\n  // The project to run.\n  flutter::DartProject project_;\n\n  // The Flutter instance hosted by this window.\n  std::unique_ptr<flutter::FlutterViewController> flutter_controller_;\n};\n\n#endif  // RUNNER_FLUTTER_WINDOW_H_\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/main.cpp",
    "content": "#include <flutter/dart_project.h>\n#include <flutter/flutter_view_controller.h>\n#include <windows.h>\n\n#include \"flutter_window.h\"\n#include \"utils.h\"\n\nint APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,\n                      _In_ wchar_t *command_line, _In_ int show_command) {\n  // Attach to console when present (e.g., 'flutter run') or create a\n  // new console when running with a debugger.\n  if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {\n    CreateAndAttachConsole();\n  }\n\n  // Initialize COM, so that it is available for use in the library and/or\n  // plugins.\n  ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);\n\n  flutter::DartProject project(L\"data\");\n\n  std::vector<std::string> command_line_arguments =\n      GetCommandLineArguments();\n\n  project.set_dart_entrypoint_arguments(std::move(command_line_arguments));\n\n  FlutterWindow window(project);\n  Win32Window::Point origin(10, 10);\n  Win32Window::Size size(1280, 720);\n  if (!window.CreateAndShow(L\"example\", origin, size)) {\n    return EXIT_FAILURE;\n  }\n  window.SetQuitOnClose(true);\n\n  ::MSG msg;\n  while (::GetMessage(&msg, nullptr, 0, 0)) {\n    ::TranslateMessage(&msg);\n    ::DispatchMessage(&msg);\n  }\n\n  ::CoUninitialize();\n  return EXIT_SUCCESS;\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/resource.h",
    "content": "//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by Runner.rc\n//\n#define IDI_APP_ICON                    101\n\n// Next default values for new objects\n//\n#ifdef APSTUDIO_INVOKED\n#ifndef APSTUDIO_READONLY_SYMBOLS\n#define _APS_NEXT_RESOURCE_VALUE        102\n#define _APS_NEXT_COMMAND_VALUE         40001\n#define _APS_NEXT_CONTROL_VALUE         1001\n#define _APS_NEXT_SYMED_VALUE           101\n#endif\n#endif\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/runner.exe.manifest",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">\n  <application xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n    <windowsSettings>\n      <dpiAwareness xmlns=\"http://schemas.microsoft.com/SMI/2016/WindowsSettings\">PerMonitorV2</dpiAwareness>\n    </windowsSettings>\n  </application>\n  <compatibility xmlns=\"urn:schemas-microsoft-com:compatibility.v1\">\n    <application>\n      <!-- Windows 10 and Windows 11 -->\n      <supportedOS Id=\"{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}\"/>\n      <!-- Windows 8.1 -->\n      <supportedOS Id=\"{1f676c76-80e1-4239-95bb-83d0f6d0da78}\"/>\n      <!-- Windows 8 -->\n      <supportedOS Id=\"{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}\"/>\n      <!-- Windows 7 -->\n      <supportedOS Id=\"{35138b9a-5d96-4fbd-8e2d-a2440225f93a}\"/>\n    </application>\n  </compatibility>\n</assembly>\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/utils.cpp",
    "content": "#include \"utils.h\"\n\n#include <flutter_windows.h>\n#include <io.h>\n#include <stdio.h>\n#include <windows.h>\n\n#include <iostream>\n\nvoid CreateAndAttachConsole() {\n  if (::AllocConsole()) {\n    FILE *unused;\n    if (freopen_s(&unused, \"CONOUT$\", \"w\", stdout)) {\n      _dup2(_fileno(stdout), 1);\n    }\n    if (freopen_s(&unused, \"CONOUT$\", \"w\", stderr)) {\n      _dup2(_fileno(stdout), 2);\n    }\n    std::ios::sync_with_stdio();\n    FlutterDesktopResyncOutputStreams();\n  }\n}\n\nstd::vector<std::string> GetCommandLineArguments() {\n  // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.\n  int argc;\n  wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);\n  if (argv == nullptr) {\n    return std::vector<std::string>();\n  }\n\n  std::vector<std::string> command_line_arguments;\n\n  // Skip the first argument as it's the binary name.\n  for (int i = 1; i < argc; i++) {\n    command_line_arguments.push_back(Utf8FromUtf16(argv[i]));\n  }\n\n  ::LocalFree(argv);\n\n  return command_line_arguments;\n}\n\nstd::string Utf8FromUtf16(const wchar_t* utf16_string) {\n  if (utf16_string == nullptr) {\n    return std::string();\n  }\n  int target_length = ::WideCharToMultiByte(\n      CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,\n      -1, nullptr, 0, nullptr, nullptr);\n  std::string utf8_string;\n  if (target_length == 0 || target_length > utf8_string.max_size()) {\n    return utf8_string;\n  }\n  utf8_string.resize(target_length);\n  int converted_length = ::WideCharToMultiByte(\n      CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,\n      -1, utf8_string.data(),\n      target_length, nullptr, nullptr);\n  if (converted_length == 0) {\n    return std::string();\n  }\n  return utf8_string;\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/utils.h",
    "content": "#ifndef RUNNER_UTILS_H_\n#define RUNNER_UTILS_H_\n\n#include <string>\n#include <vector>\n\n// Creates a console for the process, and redirects stdout and stderr to\n// it for both the runner and the Flutter library.\nvoid CreateAndAttachConsole();\n\n// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string\n// encoded in UTF-8. Returns an empty std::string on failure.\nstd::string Utf8FromUtf16(const wchar_t* utf16_string);\n\n// Gets the command line arguments passed in as a std::vector<std::string>,\n// encoded in UTF-8. Returns an empty std::vector<std::string> on failure.\nstd::vector<std::string> GetCommandLineArguments();\n\n#endif  // RUNNER_UTILS_H_\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/win32_window.cpp",
    "content": "#include \"win32_window.h\"\n\n#include <flutter_windows.h>\n\n#include \"resource.h\"\n\nnamespace {\n\nconstexpr const wchar_t kWindowClassName[] = L\"FLUTTER_RUNNER_WIN32_WINDOW\";\n\n// The number of Win32Window objects that currently exist.\nstatic int g_active_window_count = 0;\n\nusing EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);\n\n// Scale helper to convert logical scaler values to physical using passed in\n// scale factor\nint Scale(int source, double scale_factor) {\n  return static_cast<int>(source * scale_factor);\n}\n\n// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.\n// This API is only needed for PerMonitor V1 awareness mode.\nvoid EnableFullDpiSupportIfAvailable(HWND hwnd) {\n  HMODULE user32_module = LoadLibraryA(\"User32.dll\");\n  if (!user32_module) {\n    return;\n  }\n  auto enable_non_client_dpi_scaling =\n      reinterpret_cast<EnableNonClientDpiScaling*>(\n          GetProcAddress(user32_module, \"EnableNonClientDpiScaling\"));\n  if (enable_non_client_dpi_scaling != nullptr) {\n    enable_non_client_dpi_scaling(hwnd);\n    FreeLibrary(user32_module);\n  }\n}\n\n}  // namespace\n\n// Manages the Win32Window's window class registration.\nclass WindowClassRegistrar {\n public:\n  ~WindowClassRegistrar() = default;\n\n  // Returns the singleton registar instance.\n  static WindowClassRegistrar* GetInstance() {\n    if (!instance_) {\n      instance_ = new WindowClassRegistrar();\n    }\n    return instance_;\n  }\n\n  // Returns the name of the window class, registering the class if it hasn't\n  // previously been registered.\n  const wchar_t* GetWindowClass();\n\n  // Unregisters the window class. Should only be called if there are no\n  // instances of the window.\n  void UnregisterWindowClass();\n\n private:\n  WindowClassRegistrar() = default;\n\n  static WindowClassRegistrar* instance_;\n\n  bool class_registered_ = false;\n};\n\nWindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;\n\nconst wchar_t* WindowClassRegistrar::GetWindowClass() {\n  if (!class_registered_) {\n    WNDCLASS window_class{};\n    window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);\n    window_class.lpszClassName = kWindowClassName;\n    window_class.style = CS_HREDRAW | CS_VREDRAW;\n    window_class.cbClsExtra = 0;\n    window_class.cbWndExtra = 0;\n    window_class.hInstance = GetModuleHandle(nullptr);\n    window_class.hIcon =\n        LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));\n    window_class.hbrBackground = 0;\n    window_class.lpszMenuName = nullptr;\n    window_class.lpfnWndProc = Win32Window::WndProc;\n    RegisterClass(&window_class);\n    class_registered_ = true;\n  }\n  return kWindowClassName;\n}\n\nvoid WindowClassRegistrar::UnregisterWindowClass() {\n  UnregisterClass(kWindowClassName, nullptr);\n  class_registered_ = false;\n}\n\nWin32Window::Win32Window() {\n  ++g_active_window_count;\n}\n\nWin32Window::~Win32Window() {\n  --g_active_window_count;\n  Destroy();\n}\n\nbool Win32Window::CreateAndShow(const std::wstring& title,\n                                const Point& origin,\n                                const Size& size) {\n  Destroy();\n\n  const wchar_t* window_class =\n      WindowClassRegistrar::GetInstance()->GetWindowClass();\n\n  const POINT target_point = {static_cast<LONG>(origin.x),\n                              static_cast<LONG>(origin.y)};\n  HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);\n  UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);\n  double scale_factor = dpi / 96.0;\n\n  HWND window = CreateWindow(\n      window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE,\n      Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),\n      Scale(size.width, scale_factor), Scale(size.height, scale_factor),\n      nullptr, nullptr, GetModuleHandle(nullptr), this);\n\n  if (!window) {\n    return false;\n  }\n\n  return OnCreate();\n}\n\n// static\nLRESULT CALLBACK Win32Window::WndProc(HWND const window,\n                                      UINT const message,\n                                      WPARAM const wparam,\n                                      LPARAM const lparam) noexcept {\n  if (message == WM_NCCREATE) {\n    auto window_struct = reinterpret_cast<CREATESTRUCT*>(lparam);\n    SetWindowLongPtr(window, GWLP_USERDATA,\n                     reinterpret_cast<LONG_PTR>(window_struct->lpCreateParams));\n\n    auto that = static_cast<Win32Window*>(window_struct->lpCreateParams);\n    EnableFullDpiSupportIfAvailable(window);\n    that->window_handle_ = window;\n  } else if (Win32Window* that = GetThisFromHandle(window)) {\n    return that->MessageHandler(window, message, wparam, lparam);\n  }\n\n  return DefWindowProc(window, message, wparam, lparam);\n}\n\nLRESULT\nWin32Window::MessageHandler(HWND hwnd,\n                            UINT const message,\n                            WPARAM const wparam,\n                            LPARAM const lparam) noexcept {\n  switch (message) {\n    case WM_DESTROY:\n      window_handle_ = nullptr;\n      Destroy();\n      if (quit_on_close_) {\n        PostQuitMessage(0);\n      }\n      return 0;\n\n    case WM_DPICHANGED: {\n      auto newRectSize = reinterpret_cast<RECT*>(lparam);\n      LONG newWidth = newRectSize->right - newRectSize->left;\n      LONG newHeight = newRectSize->bottom - newRectSize->top;\n\n      SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth,\n                   newHeight, SWP_NOZORDER | SWP_NOACTIVATE);\n\n      return 0;\n    }\n    case WM_SIZE: {\n      RECT rect = GetClientArea();\n      if (child_content_ != nullptr) {\n        // Size and position the child window.\n        MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,\n                   rect.bottom - rect.top, TRUE);\n      }\n      return 0;\n    }\n\n    case WM_ACTIVATE:\n      if (child_content_ != nullptr) {\n        SetFocus(child_content_);\n      }\n      return 0;\n  }\n\n  return DefWindowProc(window_handle_, message, wparam, lparam);\n}\n\nvoid Win32Window::Destroy() {\n  OnDestroy();\n\n  if (window_handle_) {\n    DestroyWindow(window_handle_);\n    window_handle_ = nullptr;\n  }\n  if (g_active_window_count == 0) {\n    WindowClassRegistrar::GetInstance()->UnregisterWindowClass();\n  }\n}\n\nWin32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept {\n  return reinterpret_cast<Win32Window*>(\n      GetWindowLongPtr(window, GWLP_USERDATA));\n}\n\nvoid Win32Window::SetChildContent(HWND content) {\n  child_content_ = content;\n  SetParent(content, window_handle_);\n  RECT frame = GetClientArea();\n\n  MoveWindow(content, frame.left, frame.top, frame.right - frame.left,\n             frame.bottom - frame.top, true);\n\n  SetFocus(child_content_);\n}\n\nRECT Win32Window::GetClientArea() {\n  RECT frame;\n  GetClientRect(window_handle_, &frame);\n  return frame;\n}\n\nHWND Win32Window::GetHandle() {\n  return window_handle_;\n}\n\nvoid Win32Window::SetQuitOnClose(bool quit_on_close) {\n  quit_on_close_ = quit_on_close;\n}\n\nbool Win32Window::OnCreate() {\n  // No-op; provided for subclasses.\n  return true;\n}\n\nvoid Win32Window::OnDestroy() {\n  // No-op; provided for subclasses.\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/example/windows/runner/win32_window.h",
    "content": "#ifndef RUNNER_WIN32_WINDOW_H_\n#define RUNNER_WIN32_WINDOW_H_\n\n#include <windows.h>\n\n#include <functional>\n#include <memory>\n#include <string>\n\n// A class abstraction for a high DPI-aware Win32 Window. Intended to be\n// inherited from by classes that wish to specialize with custom\n// rendering and input handling\nclass Win32Window {\n public:\n  struct Point {\n    unsigned int x;\n    unsigned int y;\n    Point(unsigned int x, unsigned int y) : x(x), y(y) {}\n  };\n\n  struct Size {\n    unsigned int width;\n    unsigned int height;\n    Size(unsigned int width, unsigned int height)\n        : width(width), height(height) {}\n  };\n\n  Win32Window();\n  virtual ~Win32Window();\n\n  // Creates and shows a win32 window with |title| and position and size using\n  // |origin| and |size|. New windows are created on the default monitor. Window\n  // sizes are specified to the OS in physical pixels, hence to ensure a\n  // consistent size to will treat the width height passed in to this function\n  // as logical pixels and scale to appropriate for the default monitor. Returns\n  // true if the window was created successfully.\n  bool CreateAndShow(const std::wstring& title,\n                     const Point& origin,\n                     const Size& size);\n\n  // Release OS resources associated with window.\n  void Destroy();\n\n  // Inserts |content| into the window tree.\n  void SetChildContent(HWND content);\n\n  // Returns the backing Window handle to enable clients to set icon and other\n  // window properties. Returns nullptr if the window has been destroyed.\n  HWND GetHandle();\n\n  // If true, closing this window will quit the application.\n  void SetQuitOnClose(bool quit_on_close);\n\n  // Return a RECT representing the bounds of the current client area.\n  RECT GetClientArea();\n\n protected:\n  // Processes and route salient window messages for mouse handling,\n  // size change and DPI. Delegates handling of these to member overloads that\n  // inheriting classes can handle.\n  virtual LRESULT MessageHandler(HWND window,\n                                 UINT const message,\n                                 WPARAM const wparam,\n                                 LPARAM const lparam) noexcept;\n\n  // Called when CreateAndShow is called, allowing subclass window-related\n  // setup. Subclasses should return false if setup fails.\n  virtual bool OnCreate();\n\n  // Called when Destroy is called.\n  virtual void OnDestroy();\n\n private:\n  friend class WindowClassRegistrar;\n\n  // OS callback called by message pump. Handles the WM_NCCREATE message which\n  // is passed when the non-client area is being created and enables automatic\n  // non-client DPI scaling so that the non-client area automatically\n  // responsponds to changes in DPI. All other messages are handled by\n  // MessageHandler.\n  static LRESULT CALLBACK WndProc(HWND const window,\n                                  UINT const message,\n                                  WPARAM const wparam,\n                                  LPARAM const lparam) noexcept;\n\n  // Retrieves a class instance pointer for |window|\n  static Win32Window* GetThisFromHandle(HWND const window) noexcept;\n\n  bool quit_on_close_ = false;\n\n  // window handle for top level window.\n  HWND window_handle_ = nullptr;\n\n  // window handle for hosted content.\n  HWND child_content_ = nullptr;\n};\n\n#endif  // RUNNER_WIN32_WINDOW_H_\n"
  },
  {
    "path": "plugins/native_dio_adapter/lib/fix_data/fix.yaml",
    "content": "version: 1\n\ntransforms:\n  # Changes made in https://github.com/cfug/dio/pull/2040\n  - title: \"Migrate to create configuration\"\n    date: 2023-11-25\n    element:\n      uris: ['native_dio_adapter.dart', 'src/native_adapter.dart']\n      constructor: ''\n      inClass: 'NativeAdapter'\n    changes:\n      - kind: 'renameParameter'\n        oldName: 'androidCronetEngine'\n        newName: 'createCronetEngine'\n      - kind: 'renameParameter'\n        oldName: 'cupertinoConfiguration'\n        newName: 'createCupertinoConfiguration'\n"
  },
  {
    "path": "plugins/native_dio_adapter/lib/native_dio_adapter.dart",
    "content": "library native_dio_adapter;\n\nexport 'package:cronet_http/cronet_http.dart';\nexport 'package:cupertino_http/cupertino_http.dart';\n\nexport 'src/conversion_layer_adapter.dart';\nexport 'src/cronet_adapter.dart';\nexport 'src/cupertino_adapter.dart';\nexport 'src/native_adapter.dart';\n"
  },
  {
    "path": "plugins/native_dio_adapter/lib/src/conversion_layer_adapter.dart",
    "content": "import 'dart:async' show Completer;\nimport 'dart:convert' show ByteConversionSink;\nimport 'dart:typed_data' show Uint8List;\n\nimport 'package:dio/dio.dart';\nimport 'package:http/http.dart';\n\n/// A conversion layer which translates Dio HTTP requests to\n/// [http](https://pub.dev/packages/http) compatible requests.\n/// This way there's no need to implement custom [HttpClientAdapter]\n/// for each platform. Therefore, the required effort to add tests is kept\n/// to a minimum. Since `CupertinoClient` and `CronetClient` depend anyway on\n/// `http` this also doesn't add any additional dependency.\nclass ConversionLayerAdapter implements HttpClientAdapter {\n  ConversionLayerAdapter(this.client);\n\n  /// The underlying http client.\n  final Client client;\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) async {\n    final timeoutCompleter = Completer<void>();\n\n    final cancelToken = cancelFuture != null\n        ? Future.any([cancelFuture, timeoutCompleter.future])\n        : timeoutCompleter.future;\n    final requestFuture = _fromOptionsAndStream(\n      options,\n      requestStream,\n      cancelToken,\n    );\n\n    final sendTimeout = options.sendTimeout ?? Duration.zero;\n    final BaseRequest request;\n    if (sendTimeout == Duration.zero) {\n      request = await requestFuture;\n    } else {\n      request = await requestFuture.timeout(\n        sendTimeout,\n        onTimeout: () {\n          timeoutCompleter.complete();\n          throw DioException.sendTimeout(\n            timeout: sendTimeout,\n            requestOptions: options,\n          );\n        },\n      );\n    }\n\n    // http package doesn't separate connect and receive phases,\n    // so we combine both timeouts for client.send()\n    final connectTimeout = options.connectTimeout ?? Duration.zero;\n    final receiveTimeout = options.receiveTimeout ?? Duration.zero;\n    final totalTimeout = connectTimeout + receiveTimeout;\n    final StreamedResponse response;\n    if (totalTimeout == Duration.zero) {\n      response = await client.send(request);\n    } else {\n      response = await client.send(request).timeout(\n        totalTimeout,\n        onTimeout: () {\n          timeoutCompleter.complete();\n          throw DioException.receiveTimeout(\n            timeout: totalTimeout,\n            requestOptions: options,\n          );\n        },\n      );\n    }\n\n    return response.toDioResponseBody(options);\n  }\n\n  @override\n  void close({bool force = false}) => client.close();\n\n  Future<BaseRequest> _fromOptionsAndStream(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void> cancelFuture,\n  ) async {\n    final request = AbortableRequest(\n      options.method,\n      options.uri,\n      abortTrigger: cancelFuture,\n    );\n\n    request.headers.addAll(\n      Map.fromEntries(\n        options.headers.entries.map(\n          (e) => MapEntry(\n            options.preserveHeaderCase ? e.key : e.key.toLowerCase(),\n            e.value.toString(),\n          ),\n        ),\n      ),\n    );\n\n    request.followRedirects = options.followRedirects;\n    request.maxRedirects = options.maxRedirects;\n\n    if (requestStream != null) {\n      final completer = Completer<Uint8List>();\n      final sink = ByteConversionSink.withCallback(\n        (bytes) => completer.complete(\n          bytes is Uint8List ? bytes : Uint8List.fromList(bytes),\n        ),\n      );\n      requestStream.listen(\n        sink.add,\n        onError: completer.completeError,\n        onDone: sink.close,\n        cancelOnError: true,\n      );\n      final bytes = await completer.future;\n      request.bodyBytes = bytes;\n    }\n    return request;\n  }\n}\n\nextension on StreamedResponse {\n  ResponseBody toDioResponseBody(RequestOptions options) {\n    final dioHeaders = headers.entries.map(\n      (e) => MapEntry(\n        options.preserveHeaderCase ? e.key : e.key.toLowerCase(),\n        [e.value],\n      ),\n    );\n    return ResponseBody(\n      stream.cast<Uint8List>(),\n      statusCode,\n      headers: Map.fromEntries(dioHeaders),\n      isRedirect: isRedirect,\n      statusMessage: reasonPhrase,\n    );\n  }\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/lib/src/cronet_adapter.dart",
    "content": "import 'dart:typed_data' show Uint8List;\n\nimport 'package:cronet_http/cronet_http.dart';\nimport 'package:dio/dio.dart';\nimport 'conversion_layer_adapter.dart';\n\n/// A [HttpClientAdapter] for Dio which delegates HTTP requests\n/// to the native platform by making use of\n/// [cronet_http](https://pub.dev/packages/cronet_http).\nclass CronetAdapter implements HttpClientAdapter {\n  CronetAdapter(\n    CronetEngine? engine, {\n    bool closeEngine = true,\n  }) : _conversionLayer = ConversionLayerAdapter(\n          engine == null\n              ? CronetClient.defaultCronetEngine()\n              : CronetClient.fromCronetEngine(engine, closeEngine: closeEngine),\n        );\n\n  final ConversionLayerAdapter _conversionLayer;\n\n  /// The underlying conversion layer adapter.\n  ConversionLayerAdapter get adapter => _conversionLayer;\n\n  @override\n  void close({bool force = false}) => _conversionLayer.close(force: force);\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<dynamic>? cancelFuture,\n  ) =>\n      _conversionLayer.fetch(options, requestStream, cancelFuture);\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/lib/src/cupertino_adapter.dart",
    "content": "import 'dart:typed_data' show Uint8List;\n\nimport 'package:cupertino_http/cupertino_http.dart';\nimport 'package:dio/dio.dart';\nimport 'conversion_layer_adapter.dart';\n\n/// A [HttpClientAdapter] for Dio which delegates HTTP requests\n/// to the native platform by making use of\n/// [cupertino_http](https://pub.dev/packages/cupertino_http).\nclass CupertinoAdapter implements HttpClientAdapter {\n  CupertinoAdapter(\n    URLSessionConfiguration configuration,\n  ) : _conversionLayer = ConversionLayerAdapter(\n          CupertinoClient.fromSessionConfiguration(configuration),\n        );\n\n  final ConversionLayerAdapter _conversionLayer;\n\n  /// The underlying conversion layer adapter.\n  ConversionLayerAdapter get adapter => _conversionLayer;\n\n  @override\n  void close({bool force = false}) => _conversionLayer.close(force: force);\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<dynamic>? cancelFuture,\n  ) =>\n      _conversionLayer.fetch(options, requestStream, cancelFuture);\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/lib/src/native_adapter.dart",
    "content": "import 'dart:io' show Platform;\nimport 'dart:typed_data' show Uint8List;\n\nimport 'package:cronet_http/cronet_http.dart';\nimport 'package:cupertino_http/cupertino_http.dart';\nimport 'package:dio/dio.dart';\n\nimport 'cronet_adapter.dart';\nimport 'cupertino_adapter.dart';\n\n/// A [HttpClientAdapter] for Dio which delegates HTTP requests\n/// to the native platform, where possible.\n///\n/// On iOS and macOS this uses [cupertino_http](https://pub.dev/packages/cupertino_http)\n/// to make HTTP requests.\n///\n/// On Android this uses [cronet_http](https://pub.dev/packages/cronet_http) to\n/// make HTTP requests.\nclass NativeAdapter implements HttpClientAdapter {\n  NativeAdapter({\n    CronetEngine Function()? createCronetEngine,\n    URLSessionConfiguration Function()? createCupertinoConfiguration,\n    @Deprecated(\n      'Use createCronetEngine instead. '\n      'This will cause platform exception on iOS/macOS platforms. '\n      'This will be removed in v2.0.0',\n    )\n    CronetEngine? androidCronetEngine,\n    @Deprecated(\n      'Use createCupertinoConfiguration instead. '\n      'This will cause platform exception on the Android platform. '\n      'This will be removed in v2.0.0',\n    )\n    URLSessionConfiguration? cupertinoConfiguration,\n  }) {\n    if (Platform.isAndroid) {\n      _adapter = CronetAdapter(\n        createCronetEngine?.call() ?? androidCronetEngine,\n      );\n    } else if (Platform.isIOS || Platform.isMacOS) {\n      _adapter = CupertinoAdapter(\n        createCupertinoConfiguration?.call() ??\n            cupertinoConfiguration ??\n            URLSessionConfiguration.defaultSessionConfiguration(),\n      );\n    } else {\n      _adapter = HttpClientAdapter();\n    }\n  }\n\n  late final HttpClientAdapter _adapter;\n\n  /// The underlying client adapter.\n  HttpClientAdapter get adapter => _adapter;\n\n  @override\n  void close({bool force = false}) => _adapter.close(force: force);\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<dynamic>? cancelFuture,\n  ) =>\n      _adapter.fetch(options, requestStream, cancelFuture);\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/native_dio_adapter.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$/example/android/app/src/main/kotlin\" isTestSource=\"false\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/linux/flutter/ephemeral/.plugin_symlinks/jni/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/linux/flutter/ephemeral/.plugin_symlinks/jni/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/linux/flutter/ephemeral/.plugin_symlinks/jni/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/linux/flutter/ephemeral/.plugin_symlinks/jni/example/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/linux/flutter/ephemeral/.plugin_symlinks/jni/example/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/linux/flutter/ephemeral/.plugin_symlinks/jni/example/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/windows/flutter/ephemeral/.plugin_symlinks/jni/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/windows/flutter/ephemeral/.plugin_symlinks/jni/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/windows/flutter/ephemeral/.plugin_symlinks/jni/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/windows/flutter/ephemeral/.plugin_symlinks/jni/example/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/windows/flutter/ephemeral/.plugin_symlinks/jni/example/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/windows/flutter/ephemeral/.plugin_symlinks/jni/example/build\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Flutter Plugins\" level=\"project\" />\n  </component>\n</module>"
  },
  {
    "path": "plugins/native_dio_adapter/pubspec.yaml",
    "content": "name: native_dio_adapter\nversion: 1.5.1\n\ndescription: A client for dio which makes use of cupertino_http and cronet_http to delegate HTTP requests to the native platform.\ntopics:\n  - dio\n  - http\n  - native\n  - network\n  - cronet\nhomepage: https://github.com/cfug/dio\nrepository: https://github.com/cfug/dio/blob/main/plugins/native_dio_adapter\nissue_tracker: https://github.com/cfug/dio/issues\n\nenvironment:\n  sdk: '>=3.1.0 <4.0.0'\n  flutter: '>=3.13.0'\n\ndependencies:\n  flutter:\n    sdk: flutter\n\n  dio: ^5.4.0\n  cupertino_http: ^2.3.0\n  cronet_http: ^1.5.0\n  http: ^1.5.0\n\ndev_dependencies:\n  lints: ^2.0.0\n  flutter_test:\n    sdk: flutter\n  async: # transitive\n\nplatforms:\n  android:\n  ios:\n  linux:\n  macos:\n  windows:\n"
  },
  {
    "path": "plugins/native_dio_adapter/test/client_mock.dart",
    "content": "import 'package:async/async.dart' show CancelableOperation;\nimport 'package:http/http.dart';\n\nclass CloseClientMock implements Client {\n  bool closeWasCalled = false;\n\n  @override\n  void close() {\n    closeWasCalled = true;\n  }\n\n  @override\n  void noSuchMethod(Invocation invocation) {\n    throw UnimplementedError();\n  }\n}\n\nclass ClientMock implements Client {\n  StreamedResponse? response;\n\n  BaseRequest? request;\n\n  @override\n  Future<StreamedResponse> send(BaseRequest request) async {\n    this.request = request;\n    return response!;\n  }\n\n  @override\n  void noSuchMethod(Invocation invocation) {\n    throw UnimplementedError();\n  }\n}\n\nclass AbortClientMock implements Client {\n  bool isRequestCanceled = false;\n\n  @override\n  Future<StreamedResponse> send(BaseRequest request) async {\n    final cancellable = CancelableOperation.fromFuture(\n      Future<void>.delayed(const Duration(seconds: 5)),\n    );\n\n    if (request is Abortable) {\n      request.abortTrigger?.whenComplete(\n        () {\n          cancellable.cancel();\n          isRequestCanceled = true;\n        },\n      );\n    }\n\n    await cancellable.valueOrCancellation();\n\n    if (cancellable.isCanceled) {\n      throw AbortedError();\n    }\n\n    return StreamedResponse(Stream.fromIterable([]), 200);\n  }\n\n  @override\n  void noSuchMethod(Invocation invocation) {\n    throw UnimplementedError();\n  }\n}\n\nclass AbortedError extends Error {}\n\nclass DelayedClientMock implements Client {\n  DelayedClientMock({\n    required this.duration,\n  });\n\n  final Duration duration;\n\n  @override\n  Future<StreamedResponse> send(BaseRequest request) async {\n    await Future<void>.delayed(duration);\n\n    return StreamedResponse(\n      Stream.fromIterable([]),\n      200,\n    );\n  }\n\n  @override\n  void noSuchMethod(Invocation invocation) {\n    throw UnimplementedError();\n  }\n}\n"
  },
  {
    "path": "plugins/native_dio_adapter/test/conversion_layer_adapter_test.dart",
    "content": "import 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:http/http.dart';\nimport 'package:native_dio_adapter/src/conversion_layer_adapter.dart';\n\nimport 'client_mock.dart';\n\nvoid main() {\n  test('close', () {\n    final mock = CloseClientMock();\n    final cla = ConversionLayerAdapter(mock);\n\n    cla.close();\n\n    expect(mock.closeWasCalled, true);\n  });\n\n  test('close with force', () {\n    final mock = CloseClientMock();\n    final cla = ConversionLayerAdapter(mock);\n\n    cla.close(force: true);\n\n    expect(mock.closeWasCalled, true);\n  });\n\n  test('headers', () async {\n    final mock = ClientMock()\n      ..response = StreamedResponse(const Stream.empty(), 200);\n    final cla = ConversionLayerAdapter(mock);\n\n    await cla.fetch(\n      RequestOptions(path: '', headers: {'foo': 'bar'}),\n      const Stream.empty(),\n      null,\n    );\n\n    expect(mock.request?.headers, {'foo': 'bar'});\n  });\n\n  test('download stream', () async {\n    final mock = ClientMock()\n      ..response = StreamedResponse(\n        Stream.fromIterable(<Uint8List>[\n          Uint8List.fromList([10, 1]),\n          Uint8List.fromList([1, 4]),\n          Uint8List.fromList([5, 1]),\n          Uint8List.fromList([1, 1]),\n          Uint8List.fromList([2, 4]),\n        ]),\n        200,\n      );\n    final cla = ConversionLayerAdapter(mock);\n\n    final resp = await cla.fetch(\n      RequestOptions(path: ''),\n      null,\n      null,\n    );\n\n    expect(await resp.stream.length, 5);\n  });\n\n  test('request cancellation', () async {\n    final mock = AbortClientMock();\n    final cla = ConversionLayerAdapter(mock);\n    final cancelToken = CancelToken();\n\n    Future<void>.delayed(const Duration(seconds: 1)).then(\n      (value) {\n        cancelToken.cancel();\n      },\n    );\n\n    await expectLater(\n      () => cla.fetch(\n        RequestOptions(path: ''),\n        null,\n        cancelToken.whenCancel,\n      ),\n      throwsA(isA<AbortedError>()),\n    );\n  });\n\n  test('request cancellation with Dio', () async {\n    final mock = AbortClientMock();\n    final cla = ConversionLayerAdapter(mock);\n    final dio = Dio();\n    dio.httpClientAdapter = cla;\n\n    final cancelToken = CancelToken();\n\n    Future<void>.delayed(const Duration(seconds: 1)).then(\n      (value) {\n        cancelToken.cancel();\n      },\n    );\n\n    await expectLater(\n      () => dio.get<ResponseBody>('', cancelToken: cancelToken),\n      throwsA(\n        isA<DioException>().having(\n          (e) => e.type,\n          'type',\n          DioExceptionType.cancel,\n        ),\n      ),\n    );\n    expect(mock.isRequestCanceled, true);\n  });\n\n  group('Timeout tests', () {\n    test('sendTimeout throws DioException.sendTimeout', () async {\n      final mock = ClientMock()\n        ..response = StreamedResponse(const Stream.empty(), 200);\n      final cla = ConversionLayerAdapter(mock);\n\n      final delayedStream = Stream<Uint8List>.periodic(\n        const Duration(milliseconds: 10),\n        (count) => Uint8List.fromList([count]),\n      );\n\n      try {\n        await cla.fetch(\n          RequestOptions(\n            path: '',\n            sendTimeout: const Duration(milliseconds: 1),\n          ),\n          delayedStream,\n          null,\n        );\n        fail('Should have thrown DioException');\n      } on DioException catch (e) {\n        expect(e.type, DioExceptionType.sendTimeout);\n        expect(e.message, contains('1'));\n      }\n    });\n\n    test('receiveTimeout throws DioException.receiveTimeout', () async {\n      final mock = DelayedClientMock(\n        duration: const Duration(milliseconds: 10),\n      );\n      final cla = ConversionLayerAdapter(mock);\n\n      try {\n        await cla.fetch(\n          RequestOptions(\n            path: '',\n            receiveTimeout: const Duration(milliseconds: 1),\n          ),\n          null,\n          null,\n        );\n        fail('Should have thrown DioException');\n      } on DioException catch (e) {\n        expect(e.type, DioExceptionType.receiveTimeout);\n        expect(e.message, contains('1'));\n      }\n    });\n\n    test('connectTimeout and receiveTimeout are combined', () async {\n      final mock = DelayedClientMock(\n        duration: const Duration(milliseconds: 10),\n      );\n      final cla = ConversionLayerAdapter(mock);\n\n      try {\n        await cla.fetch(\n          RequestOptions(\n            path: '',\n            connectTimeout: const Duration(milliseconds: 1),\n            receiveTimeout: const Duration(milliseconds: 1),\n          ),\n          null,\n          null,\n        );\n        fail('Should have thrown DioException');\n      } on DioException catch (e) {\n        expect(e.type, DioExceptionType.receiveTimeout);\n        expect(e.message, contains('2'));\n      }\n    });\n\n    test('AbortableRequest is triggered on receiveTimeout', () async {\n      final mock = AbortClientMock();\n      final cla = ConversionLayerAdapter(mock);\n\n      try {\n        await cla.fetch(\n          RequestOptions(\n            path: '',\n            receiveTimeout: const Duration(milliseconds: 1),\n          ),\n          null,\n          null,\n        );\n        fail('Should have thrown DioException');\n      } on DioException catch (e) {\n        expect(e.type, DioExceptionType.receiveTimeout);\n        // Give delay for the abortTrigger callback to execute\n        await Future<void>.delayed(Duration.zero);\n        expect(mock.isRequestCanceled, isTrue);\n      }\n    });\n  });\n}\n"
  },
  {
    "path": "plugins/web_adapter/.gitignore",
    "content": "# https://dart.dev/guides/libraries/private-files\n# Created by `dart pub`\n.dart_tool/\n\n# Avoid committing pubspec.lock for library packages; see\n# https://dart.dev/guides/libraries/private-files#pubspeclock.\npubspec.lock\n"
  },
  {
    "path": "plugins/web_adapter/CHANGELOG.md",
    "content": "# CHANGELOG\n\n## Unreleased\n\n*None.*\n\n## 2.1.2\n\n- Fix inaccurate timeout type detection using `xhr.readyState` instead of timer existence.\n\n## 2.1.1\n\n- Move all source Dart files to `*_impl.dart` to avoid naming collision.\n  This is a workaround of https://github.com/dart-lang/sdk/issues/56498.\n\n## 2.1.0\n\n- Support `FileAccessMode` in `Dio.download` and `Dio.downloadUri` to change download file opening mode.\n\n## 2.0.0\n\n- Supports the WASM environment. Users should upgrade the adapter with\n  `dart pub upgrade` or `flutter pub upgrade` to use the WASM-supported version.\n\n## 1.0.1\n\n- Improves warning logs on the Web platform.\n\n## 1.0.0\n\n- Split the Web ability from the `package:dio`.\n"
  },
  {
    "path": "plugins/web_adapter/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Wen Du (wendux)\nCopyright (c) 2022 The CFUG Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "plugins/web_adapter/README.md",
    "content": "# dio_web_adapter\n\n[![pub package](https://img.shields.io/pub/v/dio_web_adapter.svg)](https://pub.dev/packages/dio_web_adapter)\n[![likes](https://img.shields.io/pub/likes/dio_web_adapter)](https://pub.dev/packages/dio_web_adapter/score)\n[![popularity](https://img.shields.io/pub/popularity/dio_web_adapter)](https://pub.dev/packages/dio_web_adapter/score)\n[![pub points](https://img.shields.io/pub/points/dio_web_adapter)](https://pub.dev/packages/dio_web_adapter/score)\n\nIf you encounter bugs, consider fixing it by opening a PR or at least contribute a failing test case.\n\nThis package contains adapters for [Dio](https://pub.dev/packages/dio)\nwhich enables you to use the library on the Web platform.\n\n## Versions compatibility\n\n| Version | Dart (min) | Flutter (min) |\n|---------|------------|---------------|\n| 1.x     | 2.18.0     | 3.3.0         |\n| 2.x     | 3.3.0      | 3.19.0        |\n\n> Note: the resolvable version will be determined by the SDK you are using.\n> Run `dart pub upgrade` or `flutter pub upgrade` to get the latest resolvable version.\n\n## Get started\n\nThe package is embedded into the `package:dio`.\nYou don't need to explicitly install the package unless you have other concerns.\n\n### Install\n\nAdd the `dio_web_adapter` package to your\n[pubspec dependencies](https://pub.dev/packages/dio_web_adapter/install).\n\n### Example\n\n\n```dart\nimport 'package:dio/dio.dart';\n// The import is not required and could produce lints.\n// import 'package:dio_web_adapter/dio_web_adapter.dart';\n\nvoid main() async {\n  final dio = Dio();\n  dio.httpClientAdapter = BrowserHttpClientAdapter(withCredentials: true);\n\n  // Make a request.\n  final response = await dio.get('https://dart.dev');\n  print(response);\n}\n```\n"
  },
  {
    "path": "plugins/web_adapter/analysis_options.yaml",
    "content": "include: ../../analysis_options.yaml\n\nlinter:\n  rules:\n    implementation_imports: false\n"
  },
  {
    "path": "plugins/web_adapter/dart_test.yaml",
    "content": "presets:\n  # empty placeholders required in CI scripts\n  all:\n  default:\n  min:\n  stable:\n  beta:\n\noverride_platforms:\n  chrome:\n    settings:\n      headless: true\n  firefox:\n    settings:\n      # headless argument has to be set explicitly for non-chrome browsers\n      arguments: --headless\n      executable:\n        # https://github.com/dart-lang/test/pull/2195\n        mac_os: '/Applications/Firefox.app/Contents/MacOS/firefox'\n"
  },
  {
    "path": "plugins/web_adapter/dio_web_adapter.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$\" isTestSource=\"false\" />\n      <sourceFolder url=\"file://$MODULE_DIR$/test\" isTestSource=\"true\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n    </content>\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Dart Packages\" level=\"project\" />\n  </component>\n</module>"
  },
  {
    "path": "plugins/web_adapter/example/main.dart",
    "content": "import 'package:dio/dio.dart';\nimport 'package:dio_web_adapter/dio_web_adapter.dart';\n\nvoid main() {\n  final dio = Dio();\n  dio.httpClientAdapter = BrowserHttpClientAdapter(withCredentials: true);\n  dio.interceptors.add(LogInterceptor());\n  dio.get('https://httpbun.com/status/200');\n}\n"
  },
  {
    "path": "plugins/web_adapter/lib/dio_web_adapter.dart",
    "content": "library dio_web_adapter;\n\nexport 'src/adapter_impl.dart';\nexport 'src/compute_impl.dart';\nexport 'src/dio_impl.dart';\nexport 'src/multipart_file_impl.dart';\nexport 'src/progress_stream_impl.dart';\n"
  },
  {
    "path": "plugins/web_adapter/lib/src/adapter.dart",
    "content": "@Deprecated(\n  'Import adapter_impl.dart instead. '\n  'See https://github.com/dart-lang/sdk/issues/56498',\n)\nexport 'adapter_impl.dart';\n"
  },
  {
    "path": "plugins/web_adapter/lib/src/adapter_impl.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:js_interop';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/src/utils.dart';\nimport 'package:meta/meta.dart';\nimport 'package:web/web.dart' as web;\n\nBrowserHttpClientAdapter createAdapter() => BrowserHttpClientAdapter();\n\n/// The default [HttpClientAdapter] for Web platforms.\nclass BrowserHttpClientAdapter implements HttpClientAdapter {\n  BrowserHttpClientAdapter({this.withCredentials = false});\n\n  /// These are aborted if the client is closed.\n  @visibleForTesting\n  final xhrs = <web.XMLHttpRequest>{};\n\n  /// Whether to send credentials such as cookies or authorization headers for\n  /// cross-site requests.\n  ///\n  /// Defaults to `false`.\n  ///\n  /// You can also override this value using `Options.extra['withCredentials']`\n  /// for each request.\n  bool withCredentials;\n\n  @override\n  Future<ResponseBody> fetch(\n    RequestOptions options,\n    Stream<Uint8List>? requestStream,\n    Future<void>? cancelFuture,\n  ) async {\n    final xhr = web.XMLHttpRequest();\n    xhrs.add(xhr);\n    xhr\n      ..open(options.method, '${options.uri}')\n      ..responseType = 'arraybuffer';\n\n    final withCredentialsOption = options.extra['withCredentials'];\n    if (withCredentialsOption != null) {\n      xhr.withCredentials = withCredentialsOption == true;\n    } else {\n      xhr.withCredentials = withCredentials;\n    }\n\n    options.headers.remove(Headers.contentLengthHeader);\n    options.headers.forEach((key, v) {\n      if (v is Iterable) {\n        xhr.setRequestHeader(key, v.join(', '));\n      } else {\n        xhr.setRequestHeader(key, v.toString());\n      }\n    });\n\n    final onSendProgress = options.onSendProgress;\n    final sendTimeout = options.sendTimeout ?? Duration.zero;\n    final connectTimeout = options.connectTimeout ?? Duration.zero;\n    final receiveTimeout = options.receiveTimeout ?? Duration.zero;\n\n    final xhrTimeout = (connectTimeout + receiveTimeout).inMilliseconds;\n    xhr.timeout = xhrTimeout;\n\n    final completer = Completer<ResponseBody>();\n\n    xhr.onLoad.first.then((_) {\n      final ByteBuffer body = (xhr.response as JSArrayBuffer).toDart;\n      completer.complete(\n        ResponseBody.fromBytes(\n          body.asUint8List(),\n          xhr.status,\n          headers: xhr.getResponseHeaders(),\n          statusMessage: xhr.statusText,\n          isRedirect: xhr.status == 302 ||\n              xhr.status == 301 ||\n              options.uri.toString() != xhr.responseURL,\n        ),\n      );\n    });\n\n    Timer? connectTimeoutTimer;\n    if (connectTimeout > Duration.zero) {\n      connectTimeoutTimer = Timer(\n        connectTimeout,\n        () {\n          connectTimeoutTimer = null;\n          if (completer.isCompleted) {\n            // connectTimeout is triggered after the fetch has been completed.\n            return;\n          }\n          // Only treat as connection timeout if headers have not been received.\n          // readyState < HEADERS_RECEIVED means the connection is not yet\n          // established, so this is a genuine connection timeout.\n          // If headers were already received, the receive timeout timer\n          // will handle the timeout instead.\n          if (xhr.readyState < web.XMLHttpRequest.HEADERS_RECEIVED) {\n            xhr.abort();\n            completer.completeError(\n              DioException.connectionTimeout(\n                requestOptions: options,\n                timeout: connectTimeout,\n              ),\n              StackTrace.current,\n            );\n          }\n        },\n      );\n    }\n\n    // This code is structured to call `xhr.upload.onProgress.listen` only when\n    // absolutely necessary, because registering an xhr upload listener prevents\n    // the request from being classified as a \"simple request\" by the CORS spec.\n    // Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests\n    // Upload progress events only get triggered if the request body exists,\n    // so we can check it beforehand.\n    if (requestStream != null) {\n      final xhrUploadProgressStream =\n          web.EventStreamProviders.progressEvent.forTarget(xhr.upload);\n\n      if (connectTimeoutTimer != null) {\n        xhrUploadProgressStream.listen((_) {\n          connectTimeoutTimer?.cancel();\n          connectTimeoutTimer = null;\n        });\n      }\n\n      if (sendTimeout > Duration.zero) {\n        final uploadStopwatch = Stopwatch();\n        xhrUploadProgressStream.listen((_) {\n          if (!uploadStopwatch.isRunning) {\n            uploadStopwatch.start();\n          }\n          final duration = uploadStopwatch.elapsed;\n          if (duration > sendTimeout) {\n            uploadStopwatch.stop();\n            completer.completeError(\n              DioException.sendTimeout(\n                timeout: sendTimeout,\n                requestOptions: options,\n              ),\n              StackTrace.current,\n            );\n            xhr.abort();\n          }\n        });\n      }\n\n      if (onSendProgress != null) {\n        xhrUploadProgressStream.listen((event) {\n          onSendProgress(event.loaded, event.total);\n        });\n      }\n    } else {\n      if (sendTimeout > Duration.zero) {\n        warningLog(\n          'sendTimeout cannot be used without a request body to send on Web',\n          StackTrace.current,\n        );\n      }\n      if (onSendProgress != null) {\n        warningLog(\n          'onSendProgress cannot be used without a request body to send on Web',\n          StackTrace.current,\n        );\n      }\n    }\n\n    final receiveStopwatch = Stopwatch();\n    Timer? receiveTimer;\n\n    void stopWatchReceiveTimeout() {\n      receiveTimer?.cancel();\n      receiveTimer = null;\n      receiveStopwatch.stop();\n    }\n\n    void watchReceiveTimeout() {\n      if (receiveTimeout <= Duration.zero) {\n        return;\n      }\n      receiveStopwatch.reset();\n      if (!receiveStopwatch.isRunning) {\n        receiveStopwatch.start();\n      }\n      receiveTimer?.cancel();\n      receiveTimer = Timer(receiveTimeout, () {\n        if (!completer.isCompleted) {\n          xhr.abort();\n          completer.completeError(\n            DioException.receiveTimeout(\n              timeout: receiveTimeout,\n              requestOptions: options,\n            ),\n            StackTrace.current,\n          );\n        }\n        stopWatchReceiveTimeout();\n      });\n    }\n\n    xhr.onProgress.listen(\n      (event) {\n        if (connectTimeoutTimer != null) {\n          connectTimeoutTimer!.cancel();\n          connectTimeoutTimer = null;\n        }\n        watchReceiveTimeout();\n        if (options.onReceiveProgress != null) {\n          options.onReceiveProgress!(event.loaded, event.total);\n        }\n      },\n      onDone: () => stopWatchReceiveTimeout(),\n    );\n\n    xhr.onError.first.then((_) {\n      connectTimeoutTimer?.cancel();\n      // Unfortunately, the underlying XMLHttpRequest API doesn't expose any\n      // specific information about the error itself.\n      // See also: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequestEventTarget/onerror\n      completer.completeError(\n        DioException.connectionError(\n          requestOptions: options,\n          reason: 'The XMLHttpRequest onError callback was called. '\n              'This typically indicates an error on the network layer.',\n        ),\n        StackTrace.current,\n      );\n    });\n\n    web.EventStreamProviders.timeoutEvent.forTarget(xhr).first.then((_) {\n      connectTimeoutTimer?.cancel();\n      if (!completer.isCompleted) {\n        // Use readyState to determine the actual phase of the request\n        // rather than relying on timer existence which can be inaccurate.\n        if (xhr.readyState < web.XMLHttpRequest.HEADERS_RECEIVED) {\n          completer.completeError(\n            DioException.connectionTimeout(\n              timeout: connectTimeout,\n              requestOptions: options,\n            ),\n            StackTrace.current,\n          );\n        } else {\n          completer.completeError(\n            DioException.receiveTimeout(\n              timeout: receiveTimeout,\n              requestOptions: options,\n            ),\n            StackTrace.current,\n          );\n        }\n      }\n    });\n\n    cancelFuture?.then((_) {\n      if (xhr.readyState < web.XMLHttpRequest.DONE &&\n          xhr.readyState > web.XMLHttpRequest.UNSENT) {\n        connectTimeoutTimer?.cancel();\n        try {\n          xhr.abort();\n        } catch (_) {}\n        if (!completer.isCompleted) {\n          completer.completeError(\n            DioException.requestCancelled(\n              requestOptions: options,\n              reason: 'The XMLHttpRequest was aborted.',\n            ),\n          );\n        }\n      }\n    });\n\n    if (requestStream != null) {\n      if (options.method == 'GET') {\n        warningLog(\n          'GET request with a body data are not support on the '\n          'web platform. Use POST/PUT instead.',\n          StackTrace.current,\n        );\n      }\n      final completer = Completer<Uint8List>();\n      final sink = ByteConversionSink.withCallback(\n        (bytes) => completer.complete(\n          bytes is Uint8List ? bytes : Uint8List.fromList(bytes),\n        ),\n      );\n      requestStream.listen(\n        sink.add,\n        onError: (Object e, StackTrace s) => completer.completeError(e, s),\n        onDone: sink.close,\n        cancelOnError: true,\n      );\n      final bytes = await completer.future;\n      xhr.send(bytes.toJS);\n    } else {\n      xhr.send();\n    }\n    return completer.future.whenComplete(() {\n      xhrs.remove(xhr);\n    });\n  }\n\n  /// Closes the client.\n  ///\n  /// This terminates all active requests.\n  @override\n  void close({bool force = false}) {\n    if (force) {\n      for (final xhr in xhrs) {\n        xhr.abort();\n      }\n    }\n    xhrs.clear();\n  }\n}\n\nextension on web.XMLHttpRequest {\n  Map<String, List<String>> getResponseHeaders() {\n    final headersString = getAllResponseHeaders();\n    final headers = <String, List<String>>{};\n    if (headersString.isEmpty) {\n      return headers;\n    }\n    final headersList = headersString.split('\\r\\n');\n    for (final header in headersList) {\n      if (header.isEmpty) {\n        continue;\n      }\n\n      final splitIdx = header.indexOf(': ');\n      if (splitIdx == -1) {\n        continue;\n      }\n      final key = header.substring(0, splitIdx).toLowerCase();\n      final value = header.substring(splitIdx + 2);\n      (headers[key] ??= []).add(value);\n    }\n    return headers;\n  }\n}\n"
  },
  {
    "path": "plugins/web_adapter/lib/src/compute.dart",
    "content": "@Deprecated(\n  'Import compute_impl.dart instead. '\n  'See https://github.com/dart-lang/sdk/issues/56498',\n)\nexport 'compute_impl.dart';\n"
  },
  {
    "path": "plugins/web_adapter/lib/src/compute_impl.dart",
    "content": "// Copyright 2014 The Flutter Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// This file corresponds to Flutter's\n// [`foundation/_isolates_web.dart`](https://github.com/flutter/flutter/blob/stable/packages/flutter/lib/src/foundation/_isolates_web.dart).\n//\n// Changes are only synced with the `stable` branch.\n//\n// Last synced commit:\n// [978a2e7](https://github.com/flutter/flutter/commit/978a2e7bf6a2ed287130af8dbd94cef019fb7bef)\n//\n// The changes are currently manually synced. If you noticed that the Flutter's\n// original `compute` function (and any of the related files) have changed\n// on the `stable` branch and you would like to see those changes in the `compute` package\n// please open an [issue](https://github.com/dartsidedev/compute/issues),\n// and I'll try my best to \"merge\".\n//\n// The file is intentionally not refactored so that it is easier to keep the\n// compute package up to date with Flutter's implementation.\n\nimport 'package:dio/src/compute/compute.dart' as c;\n\n/// The dart:html implementation of [c.compute].\nFuture<R> compute<Q, R>(\n  c.ComputeCallback<Q, R> callback,\n  Q message, {\n  String? debugLabel,\n}) async {\n  // To avoid blocking the UI immediately for an expensive function call, we\n  // pump a single frame to allow the framework to complete the current set\n  // of work.\n  await null;\n  return callback(message);\n}\n"
  },
  {
    "path": "plugins/web_adapter/lib/src/dio_impl.dart",
    "content": "import 'package:dio/dio.dart';\n\nimport 'adapter_impl.dart';\n\n/// Create the [Dio] instance for Web platforms.\nDio createDio([BaseOptions? options]) => DioForBrowser(options);\n\n/// Implements features for [Dio] on Web platforms.\nclass DioForBrowser with DioMixin implements Dio {\n  /// Create Dio instance with default [Options].\n  /// It's mostly just one Dio instance in your application.\n  DioForBrowser([BaseOptions? baseOptions]) {\n    options = baseOptions ?? BaseOptions();\n    httpClientAdapter = BrowserHttpClientAdapter();\n  }\n\n  @override\n  Future<Response> download(\n    String urlPath,\n    dynamic savePath, {\n    ProgressCallback? onReceiveProgress,\n    Map<String, dynamic>? queryParameters,\n    CancelToken? cancelToken,\n    bool deleteOnError = true,\n    FileAccessMode fileAccessMode = FileAccessMode.write,\n    String lengthHeader = Headers.contentLengthHeader,\n    Object? data,\n    Options? options,\n  }) {\n    throw UnsupportedError(\n      'The download method is not available in the Web environment.',\n    );\n  }\n}\n"
  },
  {
    "path": "plugins/web_adapter/lib/src/multipart_file.dart",
    "content": "@Deprecated(\n  'Import multipart_file_impl.dart instead. '\n  'See https://github.com/dart-lang/sdk/issues/56498',\n)\nexport 'multipart_file_impl.dart';\n"
  },
  {
    "path": "plugins/web_adapter/lib/src/multipart_file_impl.dart",
    "content": "import 'package:http_parser/http_parser.dart';\n\nfinal _err = UnsupportedError(\n  'MultipartFile is only supported where dart:io is available.',\n);\n\nNever multipartFileFromPath(\n  String filePath, {\n  String? filename,\n  MediaType? contentType,\n  final Map<String, List<String>>? headers,\n}) =>\n    throw _err;\n\nNever multipartFileFromPathSync(\n  String filePath, {\n  String? filename,\n  MediaType? contentType,\n  final Map<String, List<String>>? headers,\n}) =>\n    throw _err;\n"
  },
  {
    "path": "plugins/web_adapter/lib/src/progress_stream.dart",
    "content": "@Deprecated(\n  'Import progress_stream_impl.dart instead. '\n  'See https://github.com/dart-lang/sdk/issues/56498',\n)\nexport 'progress_stream_impl.dart';\n"
  },
  {
    "path": "plugins/web_adapter/lib/src/progress_stream_impl.dart",
    "content": "import 'dart:async';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\n\nStream<Uint8List> addProgress(\n  Stream<List<int>> stream,\n  int? length,\n  RequestOptions options,\n) {\n  if (stream is Stream<Uint8List>) {\n    return stream;\n  }\n  final streamTransformer = _transform<List<int>>(stream, length, options);\n  return stream.transform<Uint8List>(streamTransformer);\n}\n\nStreamTransformer<S, Uint8List> _transform<S extends List<int>>(\n  Stream<S> stream,\n  int? length,\n  RequestOptions options,\n) {\n  return StreamTransformer<S, Uint8List>.fromHandlers(\n    handleData: (S data, sink) {\n      final cancelToken = options.cancelToken;\n      if (cancelToken != null && cancelToken.isCancelled) {\n        cancelToken.requestOptions = options;\n        sink\n          ..addError(cancelToken.cancelError!)\n          ..close();\n      } else {\n        if (data is Uint8List) {\n          sink.add(data);\n        } else {\n          sink.add(Uint8List.fromList(data));\n        }\n      }\n    },\n  );\n}\n"
  },
  {
    "path": "plugins/web_adapter/pubspec.yaml",
    "content": "name: dio_web_adapter\nversion: 2.1.2\n\ndescription: An adapter that supports Dio on Web.\ntopics:\n  - dio\n  - http\n  - network\n  - web\n  - wasm\nhomepage: https://github.com/cfug/dio\nrepository: https://github.com/cfug/dio/blob/main/plugins/web_adapter\nissue_tracker: https://github.com/cfug/dio/issues\n\nenvironment:\n  sdk: ^3.3.0\n\ndependencies:\n  dio: ^5.8.0\n  http_parser: ^4.0.0\n  meta: ^1.5.0\n  web: '>=0.5.0 <2.0.0'\n\ndev_dependencies:\n  lints: any\n  test: ^1.5.0\n"
  },
  {
    "path": "plugins/web_adapter/test/browser_test.dart",
    "content": "@TestOn('browser')\nimport 'dart:typed_data';\n\nimport 'package:dio/browser.dart';\nimport 'package:dio/dio.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('with credentials', () async {\n    final browserAdapter = BrowserHttpClientAdapter(withCredentials: true);\n    final opts = RequestOptions();\n    final testStream = Stream<Uint8List>.periodic(\n      const Duration(seconds: 1),\n      (x) => Uint8List(x),\n    );\n    final cancelFuture = opts.cancelToken?.whenCancel;\n\n    browserAdapter.fetch(opts, testStream, cancelFuture);\n    expect(browserAdapter.xhrs.every((e) => e.withCredentials == true), isTrue);\n  });\n}\n"
  },
  {
    "path": "pubspec.yaml",
    "content": "name: dio_workspace\npublish_to: 'none'\nrepository: https://github.com/cfug/dio\n\nenvironment:\n  sdk: '>=2.18.0 <4.0.0'\n\ndev_dependencies:\n  lints: any\n  melos: '>=3.0.0 <7.0.0'\n  cli_util: any # Required by custom melos command.\n  path: any # Required by custom melos command.\n  pub_semver: any # Required by custom melos command.\n  yaml: any # Required by custom melos command.\n"
  },
  {
    "path": "scripts/melos_packages.dart",
    "content": "import 'dart:io';\n\nimport 'package:cli_util/cli_logging.dart' show Logger;\nimport 'package:melos/melos.dart'\n    show MelosLogger, MelosWorkspace, MelosWorkspaceConfig, Package;\nimport 'package:path/path.dart' as p;\nimport 'package:pub_semver/pub_semver.dart';\nimport 'package:yaml/yaml.dart';\n\n/// Writes a `.melos_packages` file to the root of the workspace with the\n/// packages that are compatible with the current Dart SDK version.\n///\n/// Additionally creates a `.melos_package` file in each package directory\n/// which is compatible with the current Dart SDK version. This is required\n/// until the minimum Dart SDK can be updated to a version that allows\n/// to run at least melos 4.1.0 - this seems to be Dart 3.0.0.\n///\n/// This is useful for CI scripts that need to know which packages to run\n/// melos for using the `MELOS_PACKAGES` environment variable.\nvoid main() async {\n  final root =\n      Platform.environment['MELOS_ROOT_PATH'] ?? Directory.current.path;\n  final config = MelosWorkspaceConfig.fromYaml(\n    loadYamlNode(\n      File('$root/melos.yaml').readAsStringSync(),\n    ).toPlainObject() as Map,\n    path: root,\n  );\n  final workspace = await MelosWorkspace.fromConfig(\n    config,\n    logger: MelosLogger(Logger.standard()),\n  );\n  final packages = workspace.filteredPackages.values;\n\n  // Delete old melos marker files\n  for (final package in packages) {\n    final marker = File(p.join(package.path, '.melos_package'));\n    if (marker.existsSync()) {\n      marker.deleteSync();\n    }\n  }\n\n  final currentDart = Version.parse(\n    RegExp(r'\\d*\\.\\d*\\.\\d*').firstMatch(Platform.version)!.group(0)!,\n  );\n  final overridePackages = <Package>[];\n  final ignoredPackages = <Package>[];\n  for (final e in packages) {\n    final dynamic package = e as dynamic;\n    bool allows;\n    try {\n      // Compatible with melos v6.3.\n      allows = package.pubspec.environment['sdk']!.allows(currentDart);\n    } on NoSuchMethodError {\n      // Fallback to previous melos.\n      allows = package.pubSpec.environment!.sdkConstraint!.allows(currentDart);\n    }\n    if (allows) {\n      overridePackages.add(e);\n    } else {\n      ignoredPackages.add(e);\n    }\n  }\n\n  // Create melos marker files.\n  for (final package in overridePackages) {\n    File(p.join(package.path, '.melos_package')).createSync();\n  }\n\n  final overridePackagesString = overridePackages.map((p) => p.name).join(',');\n  final ignoredPackagesString = ignoredPackages.map((p) => p.name).join(',');\n  print(\n    'Checked valid packages: \\n'\n    '  [override]: $overridePackagesString\\n'\n    '  [ignored]:  $ignoredPackagesString',\n  );\n  File('$root/.melos_packages')\n      .writeAsStringSync('MELOS_PACKAGES=$overridePackagesString');\n}\n\nextension YamlUtils on YamlNode {\n  /// Converts a YAML node to a regular mutable Dart object.\n  Object? toPlainObject() {\n    final node = this;\n    if (node is YamlScalar) {\n      return node.value;\n    }\n    if (node is YamlMap) {\n      return {\n        for (final entry in node.nodes.entries)\n          (entry.key as YamlNode).toPlainObject(): entry.value.toPlainObject(),\n      };\n    }\n    if (node is YamlList) {\n      return node.nodes.map((node) => node.toPlainObject()).toList();\n    }\n    throw FormatException(\n      'Unsupported YAML node type encountered: ${node.runtimeType}',\n      this,\n    );\n  }\n}\n"
  },
  {
    "path": "scripts/prepare_pinning_certs.sh",
    "content": "# For dio pinning tests\nopenssl s_client \\\n  -servername badssl.com \\\n  -connect badssl.com:443 < /dev/null 2>/dev/null \\\n  | openssl x509 -noout -fingerprint -sha256 > dio/test/_pinning.txt 2>/dev/null\n\n# For http2_adapter pinning tests\nopenssl s_client \\\n  -servername httpbun.com \\\n  -connect httpbun.com:443 < /dev/null 2>/dev/null \\\n  | openssl x509 -noout -fingerprint -sha256 > plugins/http2_adapter/test/_pinning_http2.txt 2>/dev/null\n"
  }
]