[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[**/*.dart]\nmax_line_length = 120"
  },
  {
    "path": ".github/workflows/analyze_and_test.yml",
    "content": "name: Analyze and test\non:\n  pull_request:\n    types: [ opened, synchronize, reopened ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - uses: subosito/flutter-action@v2\n        with:\n          flutter-version: '3.19.3'\n          channel: stable\n\n      - name: Install Dependencies\n        run: flutter pub get\n        working-directory: ./example\n\n      - name: Run static analysis\n        run: flutter analyze .\n\n      - name: Run tests\n        run: flutter test"
  },
  {
    "path": ".github/workflows/lint_pr_title.yml",
    "content": "name: \"Lint PR\"\n\non:\n  pull_request_target:\n    types:\n      - opened\n      - edited\n      - synchronize\n\njobs:\n  main:\n    name: Validate PR title\n    runs-on: ubuntu-latest\n    steps:\n      - uses: amannn/action-semantic-pull-request@v5\n        id: lint_pr_title\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - uses: marocchino/sticky-pull-request-comment@v2\n        # When the previous steps fails, the workflow would stop. By adding this\n        # condition you can continue the execution with the populated error message.\n        if: always() && (steps.lint_pr_title.outputs.error_message != null)\n        with:\n          header: pr-title-lint-error\n          message: |\n            Hey there and thank you for opening this pull request! 👋🏼\n            \n            We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.\n\n            Details:\n            \n            ```\n            ${{ steps.lint_pr_title.outputs.error_message }}\n            ```\n\n      # Delete a previous comment when the issue has been resolved\n      - if: ${{ steps.lint_pr_title.outputs.error_message == null }}\n        uses: marocchino/sticky-pull-request-comment@v2\n        with:   \n          header: pr-title-lint-error\n          delete: true\n"
  },
  {
    "path": ".github/workflows/publish.yml",
    "content": "name: Publish to pub.dev\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  publish:\n    if: \"${{ contains(github.event.head_commit.message, 'chore(main): release') }}\"\n    permissions:\n      id-token: write\n\n    runs-on: ubuntu-latest\n    \n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Publish\n        uses: k-paxian/dart-package-publisher@v1.6\n        with:\n          credentialJson: ${{ secrets.CREDENTIAL_JSON }}\n          flutter: true\n          skipTests: true\n          force: true"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: release-please\n\non:\n  push:\n    branches:\n      - main\njobs:\n  release-please:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: google-github-actions/release-please-action@v3\n        id: release\n        with:\n          release-type: \"dart\"\n          command: manifest\n    outputs:\n      release_created: ${{ steps.release.outputs.release_created }}\n      release_tag_name: ${{ steps.release.outputs.tag_name }}\n\n"
  },
  {
    "path": ".github/workflows/s3_deploy.yml",
    "content": "name: Deploy to S3\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  build:\n    if: \"${{ contains(github.event.head_commit.message, 'chore(main): release') }}\"\n    runs-on: ubuntu-latest\n\n    env:\n      AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n      AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - uses: subosito/flutter-action@v2\n        with:\n          flutter-version: '3.19.3'\n          channel: stable\n\n      - name: Install Dependencies\n        run: flutter pub get\n        working-directory: ./example\n\n      - name: Run static analysis\n        run: flutter analyze .\n\n      - name: Run tests\n        run: flutter test\n\n      - name: Build Web\n        run: flutter build web --web-renderer canvaskit --release\n        working-directory: ./example\n        \n      - name: Deploy\n        uses: reggionick/s3-deploy@v3\n        with:\n          folder: example/build/web\n          bucket: ${{ secrets.S3_BUCKET }}\n          bucket-region: ${{ secrets.S3_BUCKET_REGION }}\n          invalidation: /\n          delete-removed: true\n          no-cache: true\n          private: true\n          filesToInclude: \".*/*,*/*,**\"\n"
  },
  {
    "path": ".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# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.\n/pubspec.lock\n**/doc/api/\n.dart_tool/\n.packages\nbuild/\n\n.fvm/\n"
  },
  {
    "path": ".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: 135454af32477f815a7525073027a3ff9eff1bfd\n  channel: stable\n\nproject_type: package\n"
  },
  {
    "path": ".release-please-manifest.json",
    "content": "{\n  \".\": \"1.1.0\"\n}"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n  // Use IntelliSense to learn about possible attributes.\n  // Hover to view descriptions of existing attributes.\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n  \"version\": \"0.3.0\",\n  \"dart.lineLength\": 120,\n    \"dart.flutterSdkPath\": \".fvm/flutter_sdk\",\n    // Remove .fvm files from search\n    \"search.exclude\": {\n        \"**/.fvm\": true\n    },\n    // Remove from file watching\n    \"files.watcherExclude\": {\n        \"**/.fvm\": true\n    },\n  \"configurations\": [\n    {\n      \"name\": \"moon_flutter\",\n      \"request\": \"launch\",\n      \"type\": \"dart\"\n    },\n    {\n      \"name\": \"moon_flutter (profile mode)\",\n      \"request\": \"launch\",\n      \"type\": \"dart\",\n      \"flutterMode\": \"profile\"\n    },\n    {\n      \"name\": \"moon_flutter (release mode)\",\n      \"request\": \"launch\",\n      \"type\": \"dart\",\n      \"flutterMode\": \"release\"\n    },\n    {\n      \"name\": \"example\",\n      \"cwd\": \"example\",\n      \"request\": \"launch\",\n      \"type\": \"dart\"\n    },\n    {\n      \"name\": \"example (profile mode)\",\n      \"cwd\": \"example\",\n      \"request\": \"launch\",\n      \"type\": \"dart\",\n      \"flutterMode\": \"profile\"\n    },\n    {\n      \"name\": \"example (release mode)\",\n      \"cwd\": \"example\",\n      \"request\": \"launch\",\n      \"type\": \"dart\",\n      \"flutterMode\": \"release\"\n    }\n  ]\n}"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"dart.flutterSdkPath\": \".fvm/flutter_sdk\",\n  // Remove .fvm files from search\n  \"search.exclude\": {\n    \"**/.fvm\": true\n  },\n  // Remove from file watching\n  \"files.watcherExclude\": {\n    \"**/.fvm\": true\n  }\n}"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\n## [1.1.0](https://github.com/coingaming/moon_flutter/compare/v1.0.7...v1.1.0) (2025-01-23)\n\n\n### Features\n\n* [MDS-1487] Bump moon_flutter to use the latest moon_flutter_icons ([#458](https://github.com/coingaming/moon_flutter/issues/458)) ([3065ce2](https://github.com/coingaming/moon_flutter/commit/3065ce2a207d92136596b7ea83d29310adfbdc38))\n\n## [1.0.7](https://github.com/coingaming/moon_flutter/compare/v1.0.6...v1.0.7) (2024-11-27)\n\n\n### Bug Fixes\n\n* [MDS-1415] Update dependencies ([#451](https://github.com/coingaming/moon_flutter/issues/451)) ([cffceac](https://github.com/coingaming/moon_flutter/commit/cffceac0ae93471db57084507bc59c8ce8102e49))\n\n## [1.0.6](https://github.com/coingaming/moon_flutter/compare/v1.0.5...v1.0.6) (2024-10-09)\n\n\n### Bug Fixes\n\n* [MDS-1351] Fix input assertions. ([#444](https://github.com/coingaming/moon_flutter/issues/444)) ([034059f](https://github.com/coingaming/moon_flutter/commit/034059f956335b224310c687302dea66d79b023f))\n\n## [1.0.5](https://github.com/coingaming/moon_flutter/compare/v1.0.4...v1.0.5) (2024-09-25)\n\n\n### Bug Fixes\n\n* [MDS-1331] Dispose animation controllers for tooltip and popover ([#441](https://github.com/coingaming/moon_flutter/issues/441)) ([3466cfd](https://github.com/coingaming/moon_flutter/commit/3466cfda9e96940661e77d6aaacfafd072299da4))\n\n## [1.0.4](https://github.com/coingaming/moon_flutter/compare/v1.0.3...v1.0.4) (2024-08-30)\n\n\n### Bug Fixes\n\n* [MDS-1318] Fix Accordion clip behavior ([#439](https://github.com/coingaming/moon_flutter/issues/439)) ([2c33904](https://github.com/coingaming/moon_flutter/commit/2c33904790ee518e0e0dc98b715474336aa7d24a))\n\n## [1.0.3](https://github.com/coingaming/moon_flutter/compare/v1.0.2...v1.0.3) (2024-08-09)\n\n\n### Bug Fixes\n\n* revert back to MIT license ([372bc1a](https://github.com/coingaming/moon_flutter/commit/372bc1a1c1ea7357bbb482de612fe03efd8471d8))\n\n## [1.0.2](https://github.com/coingaming/moon_flutter/compare/v1.0.1...v1.0.2) (2024-08-08)\n\n\n### Bug Fixes\n\n* add license link to footer [MDS-1279] ([#435](https://github.com/coingaming/moon_flutter/issues/435)) ([deaa1a0](https://github.com/coingaming/moon_flutter/commit/deaa1a0cfa90357dc36d6f613148f0cef126a4ca))\n\n## [1.0.1](https://github.com/coingaming/moon_flutter/compare/v1.0.0...v1.0.1) (2024-08-08)\n\n\n### Bug Fixes\n\n* update license ([2a678cd](https://github.com/coingaming/moon_flutter/commit/2a678cd26fbed732e381a1aa2035fcbd8caff619))\n\n## [1.0.0](https://github.com/coingaming/moon_flutter/compare/v0.59.3...v1.0.0) (2024-08-02)\n\n\n### ⚠ BREAKING CHANGES\n\n* [MDS-1264] Release v1.0.0 ([#432](https://github.com/coingaming/moon_flutter/issues/432))\n\n### Features\n\n* [MDS-1264] Release v1.0.0 ([#432](https://github.com/coingaming/moon_flutter/issues/432)) ([a7c8713](https://github.com/coingaming/moon_flutter/commit/a7c8713efa61d97ce570d2aca42ba3d3c5d0c1bc))\n\n## [0.59.3](https://github.com/coingaming/moon_flutter/compare/v0.59.2...v0.59.3) (2024-07-17)\n\n\n### Bug Fixes\n\n* [MDS-1244] General fixes and improvements ([#426](https://github.com/coingaming/moon_flutter/issues/426)) ([7edc0c4](https://github.com/coingaming/moon_flutter/commit/7edc0c4960ae603f26f6a91affc7f8a995aeaa95))\n\n## [0.59.2](https://github.com/coingaming/moon_flutter/compare/v0.59.1...v0.59.2) (2024-07-05)\n\n\n### Bug Fixes\n\n* [MDS-1231] Fix Accordion absorbing children actions ([#423](https://github.com/coingaming/moon_flutter/issues/423)) ([c119d15](https://github.com/coingaming/moon_flutter/commit/c119d158958e4c41004b8bd69f545c6aab22c86b))\n\n## [0.59.1](https://github.com/coingaming/moon_flutter/compare/v0.59.0...v0.59.1) (2024-06-07)\n\n\n### Bug Fixes\n\n* [MDS-1176] Fix input components context menu ([#417](https://github.com/coingaming/moon_flutter/issues/417)) ([ff6cf21](https://github.com/coingaming/moon_flutter/commit/ff6cf2150d303b16ab19c813608e65fd9fe82adc))\n\n## [0.59.0](https://github.com/coingaming/moon_flutter/compare/v0.58.0...v0.59.0) (2024-06-05)\n\n\n### Features\n\n* [MDS-1173] Add inputFormatters property to AuthCode ([#415](https://github.com/coingaming/moon_flutter/issues/415)) ([b1e0102](https://github.com/coingaming/moon_flutter/commit/b1e010203cf3e3e485cf05b852182e21b3e8b7bc))\n\n## [0.58.0](https://github.com/coingaming/moon_flutter/compare/v0.57.0...v0.58.0) (2024-06-05)\n\n\n### Features\n\n* [MDS-1172] Create typography page ([#412](https://github.com/coingaming/moon_flutter/issues/412)) ([88bd6a7](https://github.com/coingaming/moon_flutter/commit/88bd6a7946dd354e440cd828e83eeb36ea2db328))\n\n## [0.57.0](https://github.com/coingaming/moon_flutter/compare/v0.56.0...v0.57.0) (2024-05-24)\n\n\n### Features\n\n* [MDS-1140] Create Colors page ([#404](https://github.com/coingaming/moon_flutter/issues/404)) ([95e1c47](https://github.com/coingaming/moon_flutter/commit/95e1c47885819bb27fe9efd96ad1f98f47b768cb))\n\n## [0.56.0](https://github.com/coingaming/moon_flutter/compare/v0.55.0...v0.56.0) (2024-05-20)\n\n\n### Features\n\n* [MDS-1096] Create home page ([#402](https://github.com/coingaming/moon_flutter/issues/402)) ([8fce52c](https://github.com/coingaming/moon_flutter/commit/8fce52c35ca898cf48ca8a266583377284c571f2))\n\n## [0.55.0](https://github.com/coingaming/moon_flutter/compare/v0.54.0...v0.55.0) (2024-05-14)\n\n\n### Features\n\n* [MDS-1129] Deprecate Tag uppercase property ([#400](https://github.com/coingaming/moon_flutter/issues/400)) ([cbd666b](https://github.com/coingaming/moon_flutter/commit/cbd666bed42edb2b7172f166626e740860cb88e7))\n\n## [0.54.0](https://github.com/coingaming/moon_flutter/compare/v0.53.0...v0.54.0) (2024-04-25)\n\n\n### Features\n\n* [MDS-1093] Add pages functionality ([#397](https://github.com/coingaming/moon_flutter/issues/397)) ([78eccf9](https://github.com/coingaming/moon_flutter/commit/78eccf972d0d73689a7933ec1d29855be66f8427))\n\n## [0.53.0](https://github.com/coingaming/moon_flutter/compare/v0.52.3...v0.53.0) (2024-04-19)\n\n\n### Features\n\n* [MDS-1091] Storybook UI update ([#395](https://github.com/coingaming/moon_flutter/issues/395)) ([12887d3](https://github.com/coingaming/moon_flutter/commit/12887d3c6f93ba2747f5d6ae8ef5b30c57cc0e46))\n\n## [0.52.3](https://github.com/coingaming/moon_flutter/compare/v0.52.2...v0.52.3) (2024-04-05)\n\n\n### Bug Fixes\n\n* [MDS-1080] Fix MoonTooltip not showing on init ([#392](https://github.com/coingaming/moon_flutter/issues/392)) ([5514dd5](https://github.com/coingaming/moon_flutter/commit/5514dd5f154875c60480a1533a0cbdc900e10021))\n\n## [0.52.2](https://github.com/coingaming/moon_flutter/compare/v0.52.1...v0.52.2) (2024-04-01)\n\n\n### Bug Fixes\n\n* [MDS-1060] Fix Tag icon alignment ([#389](https://github.com/coingaming/moon_flutter/issues/389)) ([5eac85b](https://github.com/coingaming/moon_flutter/commit/5eac85ba971840a7606d971a36f1075a4dae4dd7))\n\n## [0.52.1](https://github.com/coingaming/moon_flutter/compare/v0.52.0...v0.52.1) (2024-04-01)\n\n\n### Bug Fixes\n\n* [MDS-1057] Fix moon_icons icon font glyphs vertical misalignment ([#387](https://github.com/coingaming/moon_flutter/issues/387)) ([459172d](https://github.com/coingaming/moon_flutter/commit/459172d46b7caa8fffb9ec0e74f48aaf61d1786e))\n\n## [0.52.0](https://github.com/coingaming/moon_flutter/compare/v0.51.1...v0.52.0) (2024-03-20)\n\n\n### Features\n\n* [MDS-1034] Create search component ([#384](https://github.com/coingaming/moon_flutter/issues/384)) ([955c039](https://github.com/coingaming/moon_flutter/commit/955c039bc070f363b67c04082a940577b61ed73c))\n\n## [0.51.1](https://github.com/coingaming/moon_flutter/compare/v0.51.0...v0.51.1) (2024-03-13)\n\n\n### Bug Fixes\n\n* [MDS-1033] Fix popover closing automatically on tap outside. ([#381](https://github.com/coingaming/moon_flutter/issues/381)) ([e696219](https://github.com/coingaming/moon_flutter/commit/e696219d3d2f671909ce3e593596f962cf7086e6))\n\n## [0.51.0](https://github.com/coingaming/moon_flutter/compare/v0.50.0...v0.51.0) (2024-03-13)\n\n\n### Features\n\n* [MDS-1032] Add onTapAlwaysCalled and cursorErrorColor to Input widgets props ([#379](https://github.com/coingaming/moon_flutter/issues/379)) ([82b0f13](https://github.com/coingaming/moon_flutter/commit/82b0f13ed002ca6d1a9357cdc1ab48fc21bd1cff))\n\n## [0.50.0](https://github.com/coingaming/moon_flutter/compare/v0.49.8...v0.50.0) (2024-03-12)\n\n\n### Features\n\n* [MDS-1031] Bump minimum Flutter version to 3.19.3 ([#377](https://github.com/coingaming/moon_flutter/issues/377)) ([b25c5a0](https://github.com/coingaming/moon_flutter/commit/b25c5a0453ccf5c24498dbb021a2ca733c5a50da))\n\n## [0.49.8](https://github.com/coingaming/moon_flutter/compare/v0.49.7...v0.49.8) (2024-03-08)\n\n\n### Bug Fixes\n\n* [MDS-1020] Carousel fixes ([#375](https://github.com/coingaming/moon_flutter/issues/375)) ([99b45db](https://github.com/coingaming/moon_flutter/commit/99b45db66a32f72697b7e2d3ba947033c1dd9d8a))\n\n## [0.49.7](https://github.com/coingaming/moon_flutter/compare/v0.49.6...v0.49.7) (2024-03-06)\n\n\n### Bug Fixes\n\n* [MDS-1019] Fix carousel bugs ([#373](https://github.com/coingaming/moon_flutter/issues/373)) ([dc7f93f](https://github.com/coingaming/moon_flutter/commit/dc7f93f98ab9677a218eda6803c612ae64e28f5f))\n\n## [0.49.6](https://github.com/coingaming/moon_flutter/compare/v0.49.5...v0.49.6) (2024-02-26)\n\n\n### Bug Fixes\n\n* [MDS-1010] Fix modal and combobox code snippets ([#370](https://github.com/coingaming/moon_flutter/issues/370)) ([1badea7](https://github.com/coingaming/moon_flutter/commit/1badea77346e718007a253e707a63014d56d5906))\n\n## [0.49.5](https://github.com/coingaming/moon_flutter/compare/v0.49.4...v0.49.5) (2024-02-26)\n\n\n### Bug Fixes\n\n* [MDS-1009] Fix Tag uppercase vertical misalignment ([#369](https://github.com/coingaming/moon_flutter/issues/369)) ([b2e049a](https://github.com/coingaming/moon_flutter/commit/b2e049a05bd85932684048486615a5f48301bb1c))\n\n## [0.49.4](https://github.com/coingaming/moon_flutter/compare/v0.49.3...v0.49.4) (2024-02-26)\n\n\n### Bug Fixes\n\n* [MDS-1008] Fix open modal giving error on Storybook navigation ([#367](https://github.com/coingaming/moon_flutter/issues/367)) ([170173a](https://github.com/coingaming/moon_flutter/commit/170173a3ab87382851b8befa1a54c6b1470eb854))\n\n## [0.49.3](https://github.com/coingaming/moon_flutter/compare/v0.49.2...v0.49.3) (2024-02-26)\n\n\n### Bug Fixes\n\n* [MDS-1006] Fix bottom sheet not closing on Storybook navigation ([#365](https://github.com/coingaming/moon_flutter/issues/365)) ([d1f1584](https://github.com/coingaming/moon_flutter/commit/d1f158484806a483a55faa8ead74b80eb618097b))\n\n## [0.49.2](https://github.com/coingaming/moon_flutter/compare/v0.49.1...v0.49.2) (2024-02-26)\n\n\n### Bug Fixes\n\n* [MDS-1007] Fix Storybook story selection and knobs not updating on we… ([#363](https://github.com/coingaming/moon_flutter/issues/363)) ([5f1e934](https://github.com/coingaming/moon_flutter/commit/5f1e9347ffaf3b2a23405a8824fd014a0e5ae65e))\n\n## [0.49.1](https://github.com/coingaming/moon_flutter/compare/v0.49.0...v0.49.1) (2024-02-23)\n\n\n### Bug Fixes\n\n* [NO-TASK] Hotfix for clearing input ([#361](https://github.com/coingaming/moon_flutter/issues/361)) ([991a6ba](https://github.com/coingaming/moon_flutter/commit/991a6ba9aea4c0e1e53a0d952961a2d24d362fbd))\n\n## [0.49.0](https://github.com/coingaming/moon_flutter/compare/v0.48.5...v0.49.0) (2024-02-23)\n\n\n### Features\n\n* [MDS-990] Combobox component ([#359](https://github.com/coingaming/moon_flutter/issues/359)) ([ee2f3b6](https://github.com/coingaming/moon_flutter/commit/ee2f3b6baf2939e96f00ff7e02e4e8a810fe309a))\n\n## [0.48.5](https://github.com/coingaming/moon_flutter/compare/v0.48.4...v0.48.5) (2024-02-19)\n\n\n### Bug Fixes\n\n* [MDS-1003] Fix TextInput overflow issues ([#355](https://github.com/coingaming/moon_flutter/issues/355)) ([058042c](https://github.com/coingaming/moon_flutter/commit/058042cb12e78e6860a82c94a8e17b5b35b31e35))\n\n## [0.48.4](https://github.com/coingaming/moon_flutter/compare/v0.48.3...v0.48.4) (2024-02-19)\n\n\n### Bug Fixes\n\n* [MDS-1002] Fix Storybook focusing bug ([#356](https://github.com/coingaming/moon_flutter/issues/356)) ([d3181ac](https://github.com/coingaming/moon_flutter/commit/d3181ac5dcb027b67ca34ba2d1d11974bb805179))\n\n## [0.48.3](https://github.com/coingaming/moon_flutter/compare/v0.48.2...v0.48.3) (2024-02-15)\n\n\n### Bug Fixes\n\n* [MDS-998] Pin storybook_flutter temporarily to previous commit ([#353](https://github.com/coingaming/moon_flutter/issues/353)) ([5a3f14b](https://github.com/coingaming/moon_flutter/commit/5a3f14b41b942047fad7487981264c7cfebf46b4))\n\n## [0.48.2](https://github.com/coingaming/moon_flutter/compare/v0.48.1...v0.48.2) (2024-02-15)\n\n\n### Bug Fixes\n\n* [MDS-997] Fix MoonTextInputGroup not being interactable and minor story fixes ([#351](https://github.com/coingaming/moon_flutter/issues/351)) ([ee9e0cc](https://github.com/coingaming/moon_flutter/commit/ee9e0ccaeb0dc7006aef2f965acfc698e6a3a740))\n\n## [0.48.1](https://github.com/coingaming/moon_flutter/compare/v0.48.0...v0.48.1) (2024-02-14)\n\n\n### Bug Fixes\n\n* [MDS-993] Bottomsheet route pop hotfix ([#349](https://github.com/coingaming/moon_flutter/issues/349)) ([218cbe0](https://github.com/coingaming/moon_flutter/commit/218cbe042227286daca4c88d9fe8199bc5d45093))\n\n## [0.48.0](https://github.com/coingaming/moon_flutter/compare/v0.47.3...v0.48.0) (2024-02-14)\n\n\n### Features\n\n* [MDS-991] Bump minimum Flutter version to 3.16.8 ([#347](https://github.com/coingaming/moon_flutter/issues/347)) ([4b946e4](https://github.com/coingaming/moon_flutter/commit/4b946e434dc95bd0f9fe978d6a0214b0be378f24))\n\n## [0.47.3](https://github.com/coingaming/moon_flutter/compare/v0.47.2...v0.47.3) (2024-02-14)\n\n\n### Bug Fixes\n\n* [MDS-985] Deprecate Checkbox and Radio label constructor and replace usages with MenuItem ([#345](https://github.com/coingaming/moon_flutter/issues/345)) ([e9a1c84](https://github.com/coingaming/moon_flutter/commit/e9a1c84cd22462469647bb9ec3599234d1910b88))\n\n## [0.47.2](https://github.com/coingaming/moon_flutter/compare/v0.47.1...v0.47.2) (2024-02-09)\n\n\n### Bug Fixes\n\n* [MDS-942] Improve documentation ([#340](https://github.com/coingaming/moon_flutter/issues/340)) ([c7caf16](https://github.com/coingaming/moon_flutter/commit/c7caf1679a4137686b27bab52ca08c80da331d0b))\n\n## [0.47.1](https://github.com/coingaming/moon_flutter/compare/v0.47.0...v0.47.1) (2024-02-05)\n\n\n### Bug Fixes\n\n* [MDS-984] Update LinearProgress according to design ([#342](https://github.com/coingaming/moon_flutter/issues/342)) ([2294a0b](https://github.com/coingaming/moon_flutter/commit/2294a0b147f11b785d303f35e854dd0462ff995e))\n\n## [0.47.0](https://github.com/coingaming/moon_flutter/compare/v0.46.0...v0.47.0) (2024-01-19)\n\n\n### Features\n\n* [MDS-924] Add breadcrumb widget ([#334](https://github.com/coingaming/moon_flutter/issues/334)) ([6767d86](https://github.com/coingaming/moon_flutter/commit/6767d868c5b118a6d7106a6c801674f38a244f33))\n\n## [0.46.0](https://github.com/coingaming/moon_flutter/compare/v0.45.0...v0.46.0) (2024-01-11)\n\n\n### Features\n\n* [MDS-946] Add search functionality to Icons story ([#337](https://github.com/coingaming/moon_flutter/issues/337)) ([b6cf11a](https://github.com/coingaming/moon_flutter/commit/b6cf11aa99bb569162e996c2ba8b71f71ee0ed0e))\n\n## [0.45.0](https://github.com/coingaming/moon_flutter/compare/v0.44.2...v0.45.0) (2024-01-09)\n\n\n### Features\n\n* [MDS-941] Change property names ([#335](https://github.com/coingaming/moon_flutter/issues/335)) ([ef79d4e](https://github.com/coingaming/moon_flutter/commit/ef79d4ea15109dc2c63321a42b85a068b3e49a6d))\n\n## [0.44.2](https://github.com/coingaming/moon_flutter/compare/v0.44.1...v0.44.2) (2024-01-02)\n\n\n### Bug Fixes\n\n* [MDS-923] Fix semibold fontWeight from 600 to 500 ([#331](https://github.com/coingaming/moon_flutter/issues/331)) ([bcbae9a](https://github.com/coingaming/moon_flutter/commit/bcbae9aac8d217c4417919a92d1c74611684475b))\n\n## [0.44.1](https://github.com/coingaming/moon_flutter/compare/v0.44.0...v0.44.1) (2023-12-22)\n\n\n### Bug Fixes\n\n* [MDS-920] Fix AuthCode validation ([#328](https://github.com/coingaming/moon_flutter/issues/328)) ([f25dbe0](https://github.com/coingaming/moon_flutter/commit/f25dbe00d363dca0e4559b9680a518afec8e45e0))\n\n## [0.44.0](https://github.com/coingaming/moon_flutter/compare/v0.43.0...v0.44.0) (2023-12-21)\n\n\n### Features\n\n* [MDS-917] Refactor TabBar and SegmentedControl components ([#325](https://github.com/coingaming/moon_flutter/issues/325)) ([13256fc](https://github.com/coingaming/moon_flutter/commit/13256fcdf9dc481fa8e7571a7c7be08d4cf531d8))\n\n## [0.43.0](https://github.com/coingaming/moon_flutter/compare/v0.42.0...v0.43.0) (2023-12-21)\n\n\n### Features\n\n* [MDS-916] Change code snippet text font family ([#324](https://github.com/coingaming/moon_flutter/issues/324)) ([8c9f851](https://github.com/coingaming/moon_flutter/commit/8c9f851f167e2dfdf83c04829748e2f2febcf585))\n\n## [0.42.0](https://github.com/coingaming/moon_flutter/compare/v0.41.0...v0.42.0) (2023-12-21)\n\n\n### Features\n\n* [MDS-915] Modify MoonToast to align with design ([#320](https://github.com/coingaming/moon_flutter/issues/320)) ([7837be9](https://github.com/coingaming/moon_flutter/commit/7837be910bd51523045d5da48e8e57afc8e4ea54))\n\n## [0.41.0](https://github.com/coingaming/moon_flutter/compare/v0.40.1...v0.41.0) (2023-12-21)\n\n\n### Features\n\n* [MDS-914] Modify filled and outlined versions of MoonAlert to align with design ([#319](https://github.com/coingaming/moon_flutter/issues/319)) ([7cb4440](https://github.com/coingaming/moon_flutter/commit/7cb4440e9f302af3b4c050a6fd1ee72b26625599))\n\n## [0.40.1](https://github.com/coingaming/moon_flutter/compare/v0.40.0...v0.40.1) (2023-12-20)\n\n\n### Bug Fixes\n\n* [MDS-913] Bump moon_icons_flutter dependency to 0.4.0 ([#317](https://github.com/coingaming/moon_flutter/issues/317)) ([5a429b6](https://github.com/coingaming/moon_flutter/commit/5a429b65e085a9f2a3d4cd7fe183c2cbc172924b))\n\n## [0.40.0](https://github.com/coingaming/moon_flutter/compare/v0.39.0...v0.40.0) (2023-12-19)\n\n\n### Features\n\n* [MDS-742] Enable code plugin and add code snippets ([#315](https://github.com/coingaming/moon_flutter/issues/315)) ([0887fd7](https://github.com/coingaming/moon_flutter/commit/0887fd7edf1ee189650f0ef190c8e2b6180a0af6))\n\n## [0.39.0](https://github.com/coingaming/moon_flutter/compare/v0.38.0...v0.39.0) (2023-12-15)\n\n\n### Features\n\n* [MDS-912] Add moon_tokens as dependency of moon_flutter ([#313](https://github.com/coingaming/moon_flutter/issues/313)) ([3ae5f93](https://github.com/coingaming/moon_flutter/commit/3ae5f935f0b0ab114fb2ee352744b1f273c467e6))\n\n## [0.38.0](https://github.com/coingaming/moon_flutter/compare/v0.37.0...v0.38.0) (2023-12-15)\n\n\n### Features\n\n* [MDS-910] Rename color tokens to align more with design variables ([#311](https://github.com/coingaming/moon_flutter/issues/311)) ([3c54130](https://github.com/coingaming/moon_flutter/commit/3c541304ee74a4239ad25d5c80a892a2b868fe51))\n\n## [0.37.0](https://github.com/coingaming/moon_flutter/compare/v0.36.1...v0.37.0) (2023-12-08)\n\n\n### Features\n\n* [MDS-896] Pin storybook_flutter temporarily to previous commit ([#309](https://github.com/coingaming/moon_flutter/issues/309)) ([1ba24e0](https://github.com/coingaming/moon_flutter/commit/1ba24e0627a5cd3b8179de89d883cde59dd18676))\n\n## [0.36.1](https://github.com/coingaming/moon_flutter/compare/v0.36.0...v0.36.1) (2023-12-01)\n\n\n### Bug Fixes\n\n* [MDS-844] Adjust Input helper text padding ([#307](https://github.com/coingaming/moon_flutter/issues/307)) ([b453a71](https://github.com/coingaming/moon_flutter/commit/b453a715fde01c7dac930cc088474c205a8b4097))\n\n## [0.36.0](https://github.com/coingaming/moon_flutter/compare/v0.35.0...v0.36.0) (2023-11-24)\n\n\n### Features\n\n* [MDS-833] Create an example of multi-select Dropdown ([43070b6](https://github.com/coingaming/moon_flutter/commit/43070b671c35da9c17c4f08f64c9f3ca8c85337e))\n\n\n### Bug Fixes\n\n* [NO-TASK] Add actual code for multi-select Dropdown ([9ef71b9](https://github.com/coingaming/moon_flutter/commit/9ef71b9fccb855aabb91e85d17adfd1093d8b9f6))\n* [NO-TASK] Upload actual Dropdown changes ([0957268](https://github.com/coingaming/moon_flutter/commit/0957268c887357e91db4e789c3f9701bb4364833))\n* [NO-TASK] Upload actual Dropdown changes ([ff309b1](https://github.com/coingaming/moon_flutter/commit/ff309b14c0b966c7b34a8d220bc6dc8f7b6b33c6))\n\n## [0.35.0](https://github.com/coingaming/moon_flutter/compare/v0.34.7...v0.35.0) (2023-11-24)\n\n\n### Features\n\n* [MDS-833] Create an example of multi-select Dropdown ([#302](https://github.com/coingaming/moon_flutter/issues/302)) ([bd520b4](https://github.com/coingaming/moon_flutter/commit/bd520b4f1e7ffad35f59a4ac15d0bc4e496e3c38))\n\n## [0.34.7](https://github.com/coingaming/moon_flutter/compare/v0.34.6...v0.34.7) (2023-11-24)\n\n\n### Bug Fixes\n\n* [NO-TASK] Revert deploy workflow version ([5452bf8](https://github.com/coingaming/moon_flutter/commit/5452bf8aec3114e647984aaf1c3c32ae8b1fffd1))\n\n## [0.34.6](https://github.com/coingaming/moon_flutter/compare/v0.34.5...v0.34.6) (2023-11-22)\n\n\n### Bug Fixes\n\n* [MDS-830] Reduce the amount of RepaintBoundary's in use ([#299](https://github.com/coingaming/moon_flutter/issues/299)) ([a712571](https://github.com/coingaming/moon_flutter/commit/a712571c07d1f2f660fff664ac63cec8c2e83fa4))\n\n## [0.34.5](https://github.com/coingaming/moon_flutter/compare/v0.34.4...v0.34.5) (2023-11-21)\n\n\n### Bug Fixes\n\n* [MDS-827] Add sm version for MoonTag ([#297](https://github.com/coingaming/moon_flutter/issues/297)) ([ad0f1ef](https://github.com/coingaming/moon_flutter/commit/ad0f1ef194260360a44bfe7c61b9fe7081003a41))\n\n## [0.34.4](https://github.com/coingaming/moon_flutter/compare/v0.34.3...v0.34.4) (2023-11-21)\n\n\n### Bug Fixes\n\n* [MDS-828] Adjust MDS color scheme to latest ([#295](https://github.com/coingaming/moon_flutter/issues/295)) ([e5285fe](https://github.com/coingaming/moon_flutter/commit/e5285fec4d0e17e8a1cea80bf08086eca25574b5))\n\n## [0.34.3](https://github.com/coingaming/moon_flutter/compare/v0.34.2...v0.34.3) (2023-11-19)\n\n\n### Bug Fixes\n\n* [MDS-818] Fix storybook_flutter icons display issues on mobile browsers ([#293](https://github.com/coingaming/moon_flutter/issues/293)) ([069a8f6](https://github.com/coingaming/moon_flutter/commit/069a8f67ae71fc1ab420fd20e56bd2e977fc63fe))\n\n## [0.34.2](https://github.com/coingaming/moon_flutter/compare/v0.34.1...v0.34.2) (2023-11-13)\n\n\n### Bug Fixes\n\n* [MDS-804] Export moon_flutter_icons from moon_flutter ([#291](https://github.com/coingaming/moon_flutter/issues/291)) ([cc9ef2f](https://github.com/coingaming/moon_flutter/commit/cc9ef2f98912b6df7eb307a9eca94f6a9f11c446))\n\n## [0.34.1](https://github.com/coingaming/moon_flutter/compare/v0.34.0...v0.34.1) (2023-11-13)\n\n\n### Bug Fixes\n\n* [MDS-801] Bump moon_flutter_icons version ([#289](https://github.com/coingaming/moon_flutter/issues/289)) ([fa6b0c5](https://github.com/coingaming/moon_flutter/commit/fa6b0c5995de475b3b450ff546b21fbc7c66de47))\n\n## [0.34.0](https://github.com/coingaming/moon_flutter/compare/v0.33.3...v0.34.0) (2023-11-12)\n\n\n### Features\n\n* [MDS-800] Make relevant changes to use the latest moon_icons_flutter library in moon_flutter ([#287](https://github.com/coingaming/moon_flutter/issues/287)) ([4c9d572](https://github.com/coingaming/moon_flutter/commit/4c9d572833ba3cd802bb9a99b0ae6f90f768a494))\n\n## [0.33.3](https://github.com/coingaming/moon_flutter/compare/v0.33.2...v0.33.3) (2023-11-01)\n\n\n### Bug Fixes\n\n* [MDS-774] Add Icons to Storybook ([#285](https://github.com/coingaming/moon_flutter/issues/285)) ([7e8b56d](https://github.com/coingaming/moon_flutter/commit/7e8b56dde178eadb82351f20af1ff703f67eea50))\n\n## [0.33.2](https://github.com/coingaming/moon_flutter/compare/v0.33.1...v0.33.2) (2023-10-30)\n\n\n### Bug Fixes\n\n* [NO-TASK] Add routing dependency ([#283](https://github.com/coingaming/moon_flutter/issues/283)) ([1f396a5](https://github.com/coingaming/moon_flutter/commit/1f396a58e6e186a152030b67bc48d5257bb8ffff))\n\n## [0.33.1](https://github.com/coingaming/moon_flutter/compare/v0.33.0...v0.33.1) (2023-10-30)\n\n\n### Bug Fixes\n\n* [MDS-767] Change url error image format ([#281](https://github.com/coingaming/moon_flutter/issues/281)) ([d07e196](https://github.com/coingaming/moon_flutter/commit/d07e1961c351cc105ecd5c8938ea4036cf5cbb66))\n\n## [0.33.0](https://github.com/coingaming/moon_flutter/compare/v0.32.2...v0.33.0) (2023-10-30)\n\n\n### Features\n\n* [MDS-766] Change storybook routing library ([#279](https://github.com/coingaming/moon_flutter/issues/279)) ([1d74da0](https://github.com/coingaming/moon_flutter/commit/1d74da0789e069091e725eb7f737dd98aa508ad3))\n\n## [0.32.2](https://github.com/coingaming/moon_flutter/compare/v0.32.1...v0.32.2) (2023-10-25)\n\n\n### Bug Fixes\n\n* [NO-TASK] Pin storybook_flutter temporarily to previous commit ([#277](https://github.com/coingaming/moon_flutter/issues/277)) ([72969b8](https://github.com/coingaming/moon_flutter/commit/72969b859a8c4910ab2fa731c55bcfef4872eee2))\n\n## [0.32.1](https://github.com/coingaming/moon_flutter/compare/v0.32.0...v0.32.1) (2023-10-23)\n\n\n### Bug Fixes\n\n* [NO-TASK] CI token verification ([e3530fc](https://github.com/coingaming/moon_flutter/commit/e3530fce95171952b28c8db41cc1694eeecf2f2b))\n\n## [0.32.0](https://github.com/coingaming/moon_flutter/compare/v0.31.5...v0.32.0) (2023-10-20)\n\n\n### Features\n\n* [MDS-741] Add routing for stories ([#274](https://github.com/coingaming/moon_flutter/issues/274)) ([6db4ca5](https://github.com/coingaming/moon_flutter/commit/6db4ca5f55346b5139fb8f30b6b6efbf8b7f261d))\n\n## [0.31.5](https://github.com/coingaming/moon_flutter/compare/v0.31.4...v0.31.5) (2023-10-20)\n\n\n### Bug Fixes\n\n* [MDS-758] Pin storybook_flutter temporarily to previous commit again ([#272](https://github.com/coingaming/moon_flutter/issues/272)) ([66712b5](https://github.com/coingaming/moon_flutter/commit/66712b5bcced705eba3dc4e24a769f3af7347c1e))\n\n## [0.31.4](https://github.com/coingaming/moon_flutter/compare/v0.31.3...v0.31.4) (2023-10-18)\n\n\n### Bug Fixes\n\n* [MDS-756] Use moon_flutter_icons package for icons ([#270](https://github.com/coingaming/moon_flutter/issues/270)) ([78d7735](https://github.com/coingaming/moon_flutter/commit/78d7735b1a8b14a92a1d7d91a9dbd8bff30741d1))\n\n## [0.31.3](https://github.com/coingaming/moon_flutter/compare/v0.31.2...v0.31.3) (2023-10-16)\n\n\n### Bug Fixes\n\n* [MDS-739] Update code after Storybook fork changes ([#268](https://github.com/coingaming/moon_flutter/issues/268)) ([e9affcb](https://github.com/coingaming/moon_flutter/commit/e9affcb73f0cab0509b08912137fa4e770f2ba1c))\n\n## [0.31.2](https://github.com/coingaming/moon_flutter/compare/v0.31.1...v0.31.2) (2023-10-12)\n\n\n### Bug Fixes\n\n* [MDS-743] Pin storybook_flutter temporarily to previous commit ([#266](https://github.com/coingaming/moon_flutter/issues/266)) ([5d110c8](https://github.com/coingaming/moon_flutter/commit/5d110c892ad6aa3528ab2073b50ed3a5f499ec4a))\n\n## [0.31.1](https://github.com/coingaming/moon_flutter/compare/v0.31.0...v0.31.1) (2023-10-06)\n\n\n### Bug Fixes\n\n* Table width fix ([#264](https://github.com/coingaming/moon_flutter/issues/264)) ([91bcb92](https://github.com/coingaming/moon_flutter/commit/91bcb92a181d11f1ee7f76a5541037e80af3b219))\n\n## [0.31.0](https://github.com/coingaming/moon_flutter/compare/v0.30.2...v0.31.0) (2023-10-05)\n\n\n### Features\n\n* [MDS-649] Create Table component ([#262](https://github.com/coingaming/moon_flutter/issues/262)) ([5ad503f](https://github.com/coingaming/moon_flutter/commit/5ad503fa936b6b12750f0ed250afdf6a425d16af))\n\n## [0.30.2](https://github.com/coingaming/moon_flutter/compare/v0.30.1...v0.30.2) (2023-10-03)\n\n\n### Bug Fixes\n\n* [MDS-728] Bump minimum Flutter version to 3.13.5 ([#260](https://github.com/coingaming/moon_flutter/issues/260)) ([5c3ff61](https://github.com/coingaming/moon_flutter/commit/5c3ff61f8b53619299777f051fae6e7b8977f5b7))\n\n## [0.30.1](https://github.com/coingaming/moon_flutter/compare/v0.30.0...v0.30.1) (2023-09-25)\n\n\n### Bug Fixes\n\n* [MDS-696] Swap light gohan and goku colors ([#258](https://github.com/coingaming/moon_flutter/issues/258)) ([0fb1750](https://github.com/coingaming/moon_flutter/commit/0fb1750b299452476f70dccac53eec5be7e565b6))\n\n## [0.30.0](https://github.com/coingaming/moon_flutter/compare/v0.29.5...v0.30.0) (2023-09-22)\n\n\n### Features\n\n* [MDS-592] Create Dropdown component ([#256](https://github.com/coingaming/moon_flutter/issues/256)) ([adee0d1](https://github.com/coingaming/moon_flutter/commit/adee0d19fd23696a2b45a57ffac67de05b355143))\n\n## [0.29.5](https://github.com/coingaming/moon_flutter/compare/v0.29.4...v0.29.5) (2023-09-14)\n\n\n### Bug Fixes\n\n* [MDS-682] Fix InputGroup auto validate mode ([#254](https://github.com/coingaming/moon_flutter/issues/254)) ([81bcf3d](https://github.com/coingaming/moon_flutter/commit/81bcf3dff063d69cdccf599ad243e0482049fccb))\n\n## [0.29.4](https://github.com/coingaming/moon_flutter/compare/v0.29.3...v0.29.4) (2023-09-12)\n\n\n### Bug Fixes\n\n* [MDS-675] Add missing container border and helper animations for InputGroup ([#252](https://github.com/coingaming/moon_flutter/issues/252)) ([e254b16](https://github.com/coingaming/moon_flutter/commit/e254b16d0593b9cd89fcbbb0640c879d2949c66f))\n\n## [0.29.3](https://github.com/coingaming/moon_flutter/compare/v0.29.2...v0.29.3) (2023-09-12)\n\n\n### Bug Fixes\n\n* [MDS-669] Fix InputGroup bugs ([#250](https://github.com/coingaming/moon_flutter/issues/250)) ([f7a6759](https://github.com/coingaming/moon_flutter/commit/f7a6759bb3ded699629f4e7b43beff224aa0067a))\n\n## [0.29.2](https://github.com/coingaming/moon_flutter/compare/v0.29.1...v0.29.2) (2023-09-08)\n\n\n### Bug Fixes\n\n* [MDS-665] Fix Input bugs and add border animations ([#248](https://github.com/coingaming/moon_flutter/issues/248)) ([2f22b29](https://github.com/coingaming/moon_flutter/commit/2f22b29cfa193fd2883b57f64a37f38f8fd2dcdc))\n\n## [0.29.1](https://github.com/coingaming/moon_flutter/compare/v0.29.0...v0.29.1) (2023-09-06)\n\n\n### Bug Fixes\n\n* [MDS-664] Update icon font and MDS text font ([#246](https://github.com/coingaming/moon_flutter/issues/246)) ([95aed8e](https://github.com/coingaming/moon_flutter/commit/95aed8e34e13db01e797d57d617c94a1181bdf9e))\n\n## [0.29.0](https://github.com/coingaming/moon_flutter/compare/v0.28.1...v0.29.0) (2023-09-06)\n\n\n### Features\n\n* [MDS-617] Refactor Input to align with Flutter 3.10.x changes and create InputGroup component ([#239](https://github.com/coingaming/moon_flutter/issues/239)) ([32ec1c7](https://github.com/coingaming/moon_flutter/commit/32ec1c79588239167ac559ef8aceab445c6b33d2))\n\n## [0.28.1](https://github.com/coingaming/moon_flutter/compare/v0.28.0...v0.28.1) (2023-08-11)\n\n\n### Bug Fixes\n\n* [MDS-643] Fix progress bar clipping bug ([#242](https://github.com/coingaming/moon_flutter/issues/242)) ([b5d650b](https://github.com/coingaming/moon_flutter/commit/b5d650bcffbbec5a5222ba1c3125d3d70d560f1e))\n\n## [0.28.0](https://github.com/coingaming/moon_flutter/compare/v0.27.2...v0.28.0) (2023-08-11)\n\n\n### Features\n\n* [MDS-629] Add pin for linear progress ([#240](https://github.com/coingaming/moon_flutter/issues/240)) ([7f81e38](https://github.com/coingaming/moon_flutter/commit/7f81e3870f273ad2f162872fc0863e104b3a46ab))\n\n## [0.27.2](https://github.com/coingaming/moon_flutter/compare/v0.27.1...v0.27.2) (2023-08-09)\n\n\n### Bug Fixes\n\n* [MDS-631] Components API changes ([#237](https://github.com/coingaming/moon_flutter/issues/237)) ([6e56792](https://github.com/coingaming/moon_flutter/commit/6e56792625c51c231eec37fa9f21319d334951ce))\n\n## [0.27.1](https://github.com/coingaming/moon_flutter/compare/v0.27.0...v0.27.1) (2023-08-03)\n\n\n### Bug Fixes\n\n* Padding fixes ([#235](https://github.com/coingaming/moon_flutter/issues/235)) ([821da7b](https://github.com/coingaming/moon_flutter/commit/821da7b024f030d24aa31568e3ccb1aabad1c810))\n\n## [0.27.0](https://github.com/coingaming/moon_flutter/compare/v0.26.19...v0.27.0) (2023-08-02)\n\n\n### Features\n\n* [MDS-618] Menu item component ([#233](https://github.com/coingaming/moon_flutter/issues/233)) ([41ee0e1](https://github.com/coingaming/moon_flutter/commit/41ee0e1fa29406e1226e62148522001223fc0259))\n\n## [0.26.19](https://github.com/coingaming/moon_flutter/compare/v0.26.18...v0.26.19) (2023-08-02)\n\n\n### Bug Fixes\n\n* [MDS-624] Fix Accordion content outside version focus and hover ([#231](https://github.com/coingaming/moon_flutter/issues/231)) ([96585a3](https://github.com/coingaming/moon_flutter/commit/96585a3278e0a9835363b7cc24899e091e53b163))\n\n## [0.26.18](https://github.com/coingaming/moon_flutter/compare/v0.26.17...v0.26.18) (2023-07-28)\n\n\n### Bug Fixes\n\n* Publish fix ([4cb38dc](https://github.com/coingaming/moon_flutter/commit/4cb38dcd56291619f5a9473945d9551dca0144f9))\n\n## [0.26.5](https://github.com/coingaming/moon_flutter/compare/v0.26.4...v0.26.5) (2023-07-26)\n\n\n### Bug Fixes\n\n* [MDS-602] Fix Bottomsheet bugs ([#216](https://github.com/coingaming/moon_flutter/issues/216)) ([9743bc3](https://github.com/coingaming/moon_flutter/commit/9743bc3e8cb27693cb71d5d400d3d41a3cf6e14e))\n\n## [0.26.4](https://github.com/coingaming/moon_flutter/compare/v0.26.3...v0.26.4) (2023-07-25)\n\n\n### Bug Fixes\n\n* [MDS-611] Fix Toast queueing mechanism and add more properties ([#214](https://github.com/coingaming/moon_flutter/issues/214)) ([4470593](https://github.com/coingaming/moon_flutter/commit/4470593c181384e8fa557fb7ba2d558893234513))\n\n## [0.26.3](https://github.com/coingaming/moon_flutter/compare/v0.26.2...v0.26.3) (2023-07-19)\n\n\n### Bug Fixes\n\n* [MDS-594] Carousel edge case fixes and story expansion ([#212](https://github.com/coingaming/moon_flutter/issues/212)) ([74d82ee](https://github.com/coingaming/moon_flutter/commit/74d82eec2126e81d432927de2332937effa8147a))\n\n## [0.26.2](https://github.com/coingaming/moon_flutter/compare/v0.26.1...v0.26.2) (2023-07-18)\n\n\n### Bug Fixes\n\n* [MDS-596] Refactor theming for extensibility ([#210](https://github.com/coingaming/moon_flutter/issues/210)) ([2c1cd27](https://github.com/coingaming/moon_flutter/commit/2c1cd279616ae3ef168f2cb402dcc2d97261c639))\n\n## [0.26.1](https://github.com/coingaming/moon_flutter/compare/v0.26.0...v0.26.1) (2023-07-13)\n\n\n### Bug Fixes\n\n* [MDS-601] Refactor components properties ([#208](https://github.com/coingaming/moon_flutter/issues/208)) ([598f9ae](https://github.com/coingaming/moon_flutter/commit/598f9ae54d89a9342681f69ea71772d814db399b))\n\n## [0.26.0](https://github.com/coingaming/moon_flutter/compare/v0.25.1...v0.26.0) (2023-07-10)\n\n\n### Features\n\n* [MDS-590] Create Drawer widget ([#204](https://github.com/coingaming/moon_flutter/issues/204)) ([df73463](https://github.com/coingaming/moon_flutter/commit/df73463e843fa95130807d03d1634500e5376288))\n\n## [0.25.1](https://github.com/coingaming/moon_flutter/compare/v0.25.0...v0.25.1) (2023-07-10)\n\n\n### Bug Fixes\n\n* [MDS-593] Upgrade Flutter to 3.10.5 ([#205](https://github.com/coingaming/moon_flutter/issues/205)) ([a469868](https://github.com/coingaming/moon_flutter/commit/a4698685f9bac6f40f604cbb4a0132c9c29ab8b3))\n\n## [0.25.0](https://github.com/coingaming/moon_flutter/compare/v0.24.0...v0.25.0) (2023-07-07)\n\n\n### Features\n\n* [MDS-565] Create Carousel widget ([#200](https://github.com/coingaming/moon_flutter/issues/200)) ([fc6534b](https://github.com/coingaming/moon_flutter/commit/fc6534b7796c45d681f79a4cf3e1c287e5598ca6))\n\n## [0.24.0](https://github.com/coingaming/moon_flutter/compare/v0.23.0...v0.24.0) (2023-07-03)\n\n\n### Features\n\n* [MDS-576] Create DotIndicator widget ([#201](https://github.com/coingaming/moon_flutter/issues/201)) ([41b0ab9](https://github.com/coingaming/moon_flutter/commit/41b0ab993187fc424c41eaaf6082693c1f67346b))\n\n## [0.23.0](https://github.com/coingaming/moon_flutter/compare/v0.22.9...v0.23.0) (2023-06-21)\n\n\n### Features\n\n* [MDS-552] Create BottomSheet widget ([#198](https://github.com/coingaming/moon_flutter/issues/198)) ([d0ec518](https://github.com/coingaming/moon_flutter/commit/d0ec518815280b54f375c87cae52737ebe620f95))\n\n## [0.22.9](https://github.com/coingaming/moon_flutter/compare/v0.22.8...v0.22.9) (2023-06-20)\n\n\n### Bug Fixes\n\n* [MDS-564] Remove vector_math transitive dependency ([#196](https://github.com/coingaming/moon_flutter/issues/196)) ([fa8490a](https://github.com/coingaming/moon_flutter/commit/fa8490adc54cbf9e32d7de4324fb107be143aa9e))\n\n## [0.22.8](https://github.com/coingaming/moon_flutter/compare/v0.22.7...v0.22.8) (2023-06-20)\n\n\n### Bug Fixes\n\n* [MDS-562] Update the icon font ([#194](https://github.com/coingaming/moon_flutter/issues/194)) ([af43608](https://github.com/coingaming/moon_flutter/commit/af43608b20f4a4efcaa8cfd798ca875145346e86))\n\n## [0.22.7](https://github.com/coingaming/moon_flutter/compare/v0.22.6...v0.22.7) (2023-06-14)\n\n\n### Bug Fixes\n\n* [MDS-551] Add default theming for icons ([#192](https://github.com/coingaming/moon_flutter/issues/192)) ([fc476a0](https://github.com/coingaming/moon_flutter/commit/fc476a0ade1684b2b12e24a5d78f98451db6e1ca))\n\n## [0.22.6](https://github.com/coingaming/moon_flutter/compare/v0.22.5...v0.22.6) (2023-06-07)\n\n\n### Bug Fixes\n\n* [MDS-539] Fix theme switching issues ([#190](https://github.com/coingaming/moon_flutter/issues/190)) ([7a0d179](https://github.com/coingaming/moon_flutter/commit/7a0d1798c8f0a6616424362f6467c34761fbfed7))\n\n## [0.22.5](https://github.com/coingaming/moon_flutter/compare/v0.22.4...v0.22.5) (2023-05-31)\n\n\n### Bug Fixes\n\n* [MDS-538] Remove computeLuminace method ([#188](https://github.com/coingaming/moon_flutter/issues/188)) ([bc4ebd7](https://github.com/coingaming/moon_flutter/commit/bc4ebd7b65f0e9a467b08370fc625a1720a3f552))\n\n## [0.22.4](https://github.com/coingaming/moon_flutter/compare/v0.22.3...v0.22.4) (2023-05-29)\n\n\n### Bug Fixes\n\n* Fix accordion missing text style ([#186](https://github.com/coingaming/moon_flutter/issues/186)) ([b61d5af](https://github.com/coingaming/moon_flutter/commit/b61d5afc1c58f46da1171698d3fcb5fd1003b4be))\n\n## [0.22.3](https://github.com/coingaming/moon_flutter/compare/v0.22.2...v0.22.3) (2023-05-26)\n\n\n### Bug Fixes\n\n* Fix tabBar and segmentedControl animation ([#184](https://github.com/coingaming/moon_flutter/issues/184)) ([af64b94](https://github.com/coingaming/moon_flutter/commit/af64b9486999f96ae602177a77179d42f4aa4975))\n\n## [0.22.2](https://github.com/coingaming/moon_flutter/compare/v0.22.1...v0.22.2) (2023-05-26)\n\n\n### Bug Fixes\n\n* [MDS-510] Fix theme switching color being out of sync in widgets - Part 1 ([#178](https://github.com/coingaming/moon_flutter/issues/178)) ([0e58cd1](https://github.com/coingaming/moon_flutter/commit/0e58cd168b30c50c1058ce375074e76bd4081f66))\n\n## [0.22.1](https://github.com/coingaming/moon_flutter/compare/v0.22.0...v0.22.1) (2023-05-26)\n\n\n### Bug Fixes\n\n* Add selected tab pill text color ([#181](https://github.com/coingaming/moon_flutter/issues/181)) ([1ce39cf](https://github.com/coingaming/moon_flutter/commit/1ce39cfc8439801bf83d8b925f250b2fd1918d4b))\n\n## [0.22.0](https://github.com/coingaming/moon_flutter/compare/v0.21.3...v0.22.0) (2023-05-26)\n\n\n### Features\n\n* [MDS-535] Create MoonTabBar component ([#179](https://github.com/coingaming/moon_flutter/issues/179)) ([cf19d9f](https://github.com/coingaming/moon_flutter/commit/cf19d9ff061932390ff791d10ba4a7a4b1f97777))\n\n## [0.21.3](https://github.com/coingaming/moon_flutter/compare/v0.21.2...v0.21.3) (2023-05-22)\n\n\n### Bug Fixes\n\n* [MDS-534] Replace Color.lerp with premul one where possible ([#176](https://github.com/coingaming/moon_flutter/issues/176)) ([e87e103](https://github.com/coingaming/moon_flutter/commit/e87e103dff231696f814577d5c5b9bc420fe1d03))\n\n## [0.21.2](https://github.com/coingaming/moon_flutter/compare/v0.21.1...v0.21.2) (2023-05-22)\n\n\n### Bug Fixes\n\n* [MDS-527] Extract out figma_squircle logic and fix various issues ([#172](https://github.com/coingaming/moon_flutter/issues/172)) ([08e7752](https://github.com/coingaming/moon_flutter/commit/08e7752bb61665b269d22a3cee7b2fc7d41a367c))\n\n## [0.21.1](https://github.com/coingaming/moon_flutter/compare/v0.21.0...v0.21.1) (2023-05-22)\n\n\n### Bug Fixes\n\n* [MDS-532] Add ShapeDecoration as props to every widget where it makes sense ([#173](https://github.com/coingaming/moon_flutter/issues/173)) ([b4eba9c](https://github.com/coingaming/moon_flutter/commit/b4eba9c7945bc930007c239ecd287e6b653d8ada))\n\n## [0.21.0](https://github.com/coingaming/moon_flutter/compare/v0.20.3...v0.21.0) (2023-05-17)\n\n\n### Features\n\n* [MDS-518] Create MoonSegmentedControl component ([#170](https://github.com/coingaming/moon_flutter/issues/170)) ([04cb654](https://github.com/coingaming/moon_flutter/commit/04cb654ace91bb96fbd1f616f4237f11fd3ce750))\n\n## [0.20.3](https://github.com/coingaming/moon_flutter/compare/v0.20.2...v0.20.3) (2023-05-17)\n\n\n### Bug Fixes\n\n* [MDS-525] Fix EdgeInsetsGeometry behaviour that is passed in as props ([#166](https://github.com/coingaming/moon_flutter/issues/166)) ([c7552e3](https://github.com/coingaming/moon_flutter/commit/c7552e3164ed2362a58e88e7c24526c2bcbd9464))\n\n## [0.20.2](https://github.com/coingaming/moon_flutter/compare/v0.20.1...v0.20.2) (2023-05-17)\n\n\n### Bug Fixes\n\n* [MDS-526] Replace custom outside Popover tapping logic with inbuilt TapRegion ([#167](https://github.com/coingaming/moon_flutter/issues/167)) ([8717282](https://github.com/coingaming/moon_flutter/commit/871728255401d7b2527b5fc7049b9a6c349c6005))\n\n## [0.20.1](https://github.com/coingaming/moon_flutter/compare/v0.20.0...v0.20.1) (2023-05-15)\n\n\n### Bug Fixes\n\n* [MDS-517] Fix TextInput and TextArea bugs ([#164](https://github.com/coingaming/moon_flutter/issues/164)) ([abcb01c](https://github.com/coingaming/moon_flutter/commit/abcb01c04d019a357566f35dc333abcc85bfad3a))\n\n## [0.20.0](https://github.com/coingaming/moon_flutter/compare/v0.19.9...v0.20.0) (2023-05-05)\n\n\n### Features\n\n* [MDS-503] Create Input widget ([#144](https://github.com/coingaming/moon_flutter/issues/144)) ([fc5cd2a](https://github.com/coingaming/moon_flutter/commit/fc5cd2a7514097b688ffe3fe088447f4eb8156b9))\n\n## [0.19.9](https://github.com/coingaming/moon_flutter/compare/v0.19.8...v0.19.9) (2023-05-02)\n\n\n### Bug Fixes\n\n* [MDS-514] Recreate icon font once more and fix scaling and platform alignment problems ([#161](https://github.com/coingaming/moon_flutter/issues/161)) ([1fd1c47](https://github.com/coingaming/moon_flutter/commit/1fd1c474ab623727deae39dc6b280c17dfcbf493))\n\n## [0.19.8](https://github.com/coingaming/moon_flutter/compare/v0.19.7...v0.19.8) (2023-05-02)\n\n\n### Bug Fixes\n\n* [NO-TASK] Add icon font config.json ([4ca90f4](https://github.com/coingaming/moon_flutter/commit/4ca90f47e5e31e0eb39e9d5ce8817c40fd717472))\n\n## [0.19.7](https://github.com/coingaming/moon_flutter/compare/v0.19.6...v0.19.7) (2023-04-28)\n\n\n### Bug Fixes\n\n* [MDS-513] Replace BorderRadius with BorderRadiusGeometry ([#158](https://github.com/coingaming/moon_flutter/issues/158)) ([d91418f](https://github.com/coingaming/moon_flutter/commit/d91418f6012e4a7b16f32496a348af39b2e80d4b))\n\n## [0.19.6](https://github.com/coingaming/moon_flutter/compare/v0.19.5...v0.19.6) (2023-04-27)\n\n\n### Bug Fixes\n\n* [MDS-512] Storybook naming ([#156](https://github.com/coingaming/moon_flutter/issues/156)) ([6dc9cbd](https://github.com/coingaming/moon_flutter/commit/6dc9cbdb5dfe88e6e664d847a9bf5a871f1b0607))\n\n## [0.19.5](https://github.com/coingaming/moon_flutter/compare/v0.19.4...v0.19.5) (2023-04-25)\n\n\n### Bug Fixes\n\n* [MDS-508] Props check and ordering ([#154](https://github.com/coingaming/moon_flutter/issues/154)) ([cc6025f](https://github.com/coingaming/moon_flutter/commit/cc6025f27cffac02b48cb708da83c7b4aecac5bf))\n\n## [0.19.4](https://github.com/coingaming/moon_flutter/compare/v0.19.3...v0.19.4) (2023-04-25)\n\n\n### Bug Fixes\n\n* [MDS-511] Fix disappearing widgets in mobile web / PWA ([#152](https://github.com/coingaming/moon_flutter/issues/152)) ([7b96ea5](https://github.com/coingaming/moon_flutter/commit/7b96ea54d0b6105cf5fe8af2f48142f97707a958))\n\n## [0.19.3](https://github.com/coingaming/moon_flutter/compare/v0.19.2...v0.19.3) (2023-04-24)\n\n\n### Bug Fixes\n\n* [MDS-509] Fix Avatar clipping with uneven height and width combinations ([#150](https://github.com/coingaming/moon_flutter/issues/150)) ([87f8b72](https://github.com/coingaming/moon_flutter/commit/87f8b72f3d8f5042370e4ecbacfda4b335fac96d))\n\n## [0.19.2](https://github.com/coingaming/moon_flutter/compare/v0.19.1...v0.19.2) (2023-04-24)\n\n\n### Bug Fixes\n\n* [MDS-504] Fork storybook_flutter, create extra functionality and add it as dependency. ([#148](https://github.com/coingaming/moon_flutter/issues/148)) ([c92a516](https://github.com/coingaming/moon_flutter/commit/c92a5167dee698da8366c5a9d43ae0a89fdc6cca))\n\n## [0.19.1](https://github.com/coingaming/moon_flutter/compare/v0.19.0...v0.19.1) (2023-04-19)\n\n\n### Bug Fixes\n\n* [MDS-502] Add additional storybook knobs to components ([#145](https://github.com/coingaming/moon_flutter/issues/145)) ([53523fe](https://github.com/coingaming/moon_flutter/commit/53523fe82353a812b731ec83b40dd98a61910293))\n\n## [0.19.0](https://github.com/coingaming/moon_flutter/compare/v0.18.3...v0.19.0) (2023-04-18)\n\n\n### Features\n\n* [MDS-491] Create TextArea widget ([#140](https://github.com/coingaming/moon_flutter/issues/140)) ([6c00719](https://github.com/coingaming/moon_flutter/commit/6c00719de846f68bb60d84b08c02d349d526afae))\n\n## [0.18.3](https://github.com/coingaming/moon_flutter/compare/v0.18.2...v0.18.3) (2023-04-18)\n\n\n### Bug Fixes\n\n* [MDS-501] RepaintBoundary and mounted usage ([#141](https://github.com/coingaming/moon_flutter/issues/141)) ([a7e555f](https://github.com/coingaming/moon_flutter/commit/a7e555fd7d0b106432bf172565ce105f1b50a10b))\n\n## [0.18.2](https://github.com/coingaming/moon_flutter/compare/v0.18.1...v0.18.2) (2023-04-17)\n\n\n### Bug Fixes\n\n* [MDS-499] Refactor EdgeInsets and Alignment to use Geometry variants ([#138](https://github.com/coingaming/moon_flutter/issues/138)) ([7b88df7](https://github.com/coingaming/moon_flutter/commit/7b88df7f1c6ed55e7959fae234aafbe04b8ed3a7))\n* [MDS-500] Convert borderRadiusValue usage to BorderRadius ([#137](https://github.com/coingaming/moon_flutter/issues/137)) ([755bbb9](https://github.com/coingaming/moon_flutter/commit/755bbb9a154ad038e2b071de736a984d178e600e))\n\n## [0.18.1](https://github.com/coingaming/moon_flutter/compare/v0.18.0...v0.18.1) (2023-04-14)\n\n\n### Bug Fixes\n\n* [MDS-498] Add missing Semantics and semanticLabels ([#135](https://github.com/coingaming/moon_flutter/issues/135)) ([10478f4](https://github.com/coingaming/moon_flutter/commit/10478f4454cd8913c82f1b97c1d1a72d0393e02b))\n\n## [0.18.0](https://github.com/coingaming/moon_flutter/compare/v0.17.1...v0.18.0) (2023-04-12)\n\n\n### Features\n\n* [MDS-489] Create MoonAuthCode component  ([#109](https://github.com/coingaming/moon_flutter/issues/109)) ([59d72b7](https://github.com/coingaming/moon_flutter/commit/59d72b790edb2b75b75fdb4505ed2608bbdcfab1))\n\n## [0.17.1](https://github.com/coingaming/moon_flutter/compare/v0.17.0...v0.17.1) (2023-04-10)\n\n\n### Bug Fixes\n\n* [NO-TASK] Resize Icons story icons ([#107](https://github.com/coingaming/moon_flutter/issues/107)) ([acdcc9d](https://github.com/coingaming/moon_flutter/commit/acdcc9d8c491d1d972ea4dd9b0c039b201037eee))\n\n## [0.17.0](https://github.com/coingaming/moon_flutter/compare/v0.16.1...v0.17.0) (2023-04-10)\n\n\n### Features\n\n* [MDS-447] Create Toast component ([#103](https://github.com/coingaming/moon_flutter/issues/103)) ([191fc13](https://github.com/coingaming/moon_flutter/commit/191fc1374c5624ecd4ac7eff5e719c3313a58636))\n\n## [0.16.1](https://github.com/coingaming/moon_flutter/compare/v0.16.0...v0.16.1) (2023-04-10)\n\n\n### Bug Fixes\n\n* [MDS-488] Recreate icon font due to glyphs being slightly off-center ([#104](https://github.com/coingaming/moon_flutter/issues/104)) ([01e5bf2](https://github.com/coingaming/moon_flutter/commit/01e5bf206d7f762d673a5fdf5930bca6f72e8f1d))\n\n## [0.16.0](https://github.com/coingaming/moon_flutter/compare/v0.15.6...v0.16.0) (2023-04-03)\n\n\n### Features\n\n* [MDS-463] Create Alert widget ([#97](https://github.com/coingaming/moon_flutter/issues/97)) ([a491dc7](https://github.com/coingaming/moon_flutter/commit/a491dc735b1717b2e4099c0a53f8b7c9c81a33b7))\n\n## [0.15.6](https://github.com/coingaming/moon_flutter/compare/v0.15.5...v0.15.6) (2023-03-30)\n\n\n### Bug Fixes\n\n* [MDS-465] Fix Accordion disappearing titles and color transitions ([#100](https://github.com/coingaming/moon_flutter/issues/100)) ([9392330](https://github.com/coingaming/moon_flutter/commit/939233073621afd67cef9556a7ad957f8a7b5549))\n\n## [0.15.5](https://github.com/coingaming/moon_flutter/compare/v0.15.4...v0.15.5) (2023-03-28)\n\n\n### Bug Fixes\n\n* [MDS-461] Make widgets accept BorderRadius instead of SmoothBorderRadius ([#98](https://github.com/coingaming/moon_flutter/issues/98)) ([f855f70](https://github.com/coingaming/moon_flutter/commit/f855f7046558b43780c8936d29ab5e35340ec0e5))\n\n## [0.15.4](https://github.com/coingaming/moon_flutter/compare/v0.15.3...v0.15.4) (2023-03-24)\n\n\n### Bug Fixes\n\n* [MDS-460] Various minor bug fixes ([#95](https://github.com/coingaming/moon_flutter/issues/95)) ([4e1772b](https://github.com/coingaming/moon_flutter/commit/4e1772bd9b6ce18f632d44bc929cea57b1a0c6ab))\n\n## [0.15.3](https://github.com/coingaming/moon_flutter/compare/v0.15.2...v0.15.3) (2023-03-23)\n\n\n### Bug Fixes\n\n* [MDS-453] Chip types should be separated via intrinsic properties ([#93](https://github.com/coingaming/moon_flutter/issues/93)) ([99d0c08](https://github.com/coingaming/moon_flutter/commit/99d0c08d91fd4bf5a946059d4186f0a867646cbd))\n\n## [0.15.2](https://github.com/coingaming/moon_flutter/compare/v0.15.1...v0.15.2) (2023-03-23)\n\n\n### Bug Fixes\n\n* [MDS-451] Button types should be separated via intrinsic properties ([#91](https://github.com/coingaming/moon_flutter/issues/91)) ([a87dadc](https://github.com/coingaming/moon_flutter/commit/a87dadcd780ffb609c9e81086b58f17aa75aef4e))\n\n## [0.15.1](https://github.com/coingaming/moon_flutter/compare/v0.15.0...v0.15.1) (2023-03-23)\n\n\n### Bug Fixes\n\n* [MDS-450] Accordion functionality fixes ([#89](https://github.com/coingaming/moon_flutter/issues/89)) ([2f84351](https://github.com/coingaming/moon_flutter/commit/2f8435109b1382020657bd1d3c0ef636f8e7f1d8))\n\n## [0.15.0](https://github.com/coingaming/moon_flutter/compare/v0.14.0...v0.15.0) (2023-03-22)\n\n\n### Features\n\n* [MDS-448] Create Modal widget ([#87](https://github.com/coingaming/moon_flutter/issues/87)) ([1eb9562](https://github.com/coingaming/moon_flutter/commit/1eb95620e9175c6199e354d268d7461c267f97db))\n\n## [0.14.0](https://github.com/coingaming/moon_flutter/compare/v0.13.0...v0.14.0) (2023-03-20)\n\n\n### Features\n\n* [MDS-442] Create Radio widget ([#85](https://github.com/coingaming/moon_flutter/issues/85)) ([1c4f674](https://github.com/coingaming/moon_flutter/commit/1c4f674cf09b8eccef6507617e0d40376be3204a))\n\n## [0.13.0](https://github.com/coingaming/moon_flutter/compare/v0.12.0...v0.13.0) (2023-03-18)\n\n\n### Features\n\n* [MDS-404] Create Accordion widget ([#83](https://github.com/coingaming/moon_flutter/issues/83)) ([3170b92](https://github.com/coingaming/moon_flutter/commit/3170b929d0ec44d649697e1dc6ba5193d38baa13))\n\n## [0.12.0](https://github.com/coingaming/moon_flutter/compare/v0.11.1...v0.12.0) (2023-03-15)\n\n\n### Features\n\n* [MDS-436] Create Checkbox component ([#81](https://github.com/coingaming/moon_flutter/issues/81)) ([21a66dd](https://github.com/coingaming/moon_flutter/commit/21a66dddad90942864ebe6fa8b4621d935b7563c))\n\n## [0.11.1](https://github.com/coingaming/moon_flutter/compare/v0.11.0...v0.11.1) (2023-03-15)\n\n\n### Bug Fixes\n\n* [MDS-437 Fix specific components theming naming and Storybook story weights ([#79](https://github.com/coingaming/moon_flutter/issues/79)) ([f01999f](https://github.com/coingaming/moon_flutter/commit/f01999f7f0af6fffa428d97cea4da26ff3e9472b))\n\n## [0.11.0](https://github.com/coingaming/moon_flutter/compare/v0.10.1...v0.11.0) (2023-03-14)\n\n\n### Features\n\n* [MDS-431] Create Switch widget ([#77](https://github.com/coingaming/moon_flutter/issues/77)) ([434fb73](https://github.com/coingaming/moon_flutter/commit/434fb73bb36095adcff7948fe1228ff4f031390c))\n\n## [0.10.1](https://github.com/coingaming/moon_flutter/compare/v0.10.0...v0.10.1) (2023-03-11)\n\n\n### Bug Fixes\n\n* Hotfix Tooltip and Popover RTL position error ([270b4eb](https://github.com/coingaming/moon_flutter/commit/270b4ebcc410a1cd628e6109229aba3163c509c9))\n\n## [0.10.0](https://github.com/coingaming/moon_flutter/compare/v0.9.6...v0.10.0) (2023-03-11)\n\n\n### Features\n\n* [MDS-429] Create Popover component ([#74](https://github.com/coingaming/moon_flutter/issues/74)) ([33ec0c9](https://github.com/coingaming/moon_flutter/commit/33ec0c9dfed52148af61dd6a074142ef510617ef))\n\n## [0.9.6](https://github.com/coingaming/moon_flutter/compare/v0.9.5...v0.9.6) (2023-03-10)\n\n\n### Bug Fixes\n\n* [MDS-430] Fix Chip border properties inconsistencies ([#72](https://github.com/coingaming/moon_flutter/issues/72)) ([781d0e8](https://github.com/coingaming/moon_flutter/commit/781d0e86ef13de85c6ba305c3e7fd830ab7eaf27))\n\n## [0.9.5](https://github.com/coingaming/moon_flutter/compare/v0.9.4...v0.9.5) (2023-03-09)\n\n\n### Bug Fixes\n\n* [MDS-409] Improve theming ([#70](https://github.com/coingaming/moon_flutter/issues/70)) ([a8523a5](https://github.com/coingaming/moon_flutter/commit/a8523a5c92d37c8b92349690d8f82efcea44dc46))\n\n## [0.9.4](https://github.com/coingaming/moon_flutter/compare/v0.9.3...v0.9.4) (2023-03-08)\n\n\n### Bug Fixes\n\n* [MDS-408] Rewrite Tooltip to add ordinal directions functionality ([#68](https://github.com/coingaming/moon_flutter/issues/68)) ([5cbed50](https://github.com/coingaming/moon_flutter/commit/5cbed5021be69dadf555b1828e25d21cb4fe4de7))\n\n## [0.9.3](https://github.com/coingaming/moon_flutter/compare/v0.9.2...v0.9.3) (2023-03-02)\n\n\n### Bug Fixes\n\n* [MDS-410] Button fullWidth property bugs out in some conditions ([#66](https://github.com/coingaming/moon_flutter/issues/66)) ([52ed9b7](https://github.com/coingaming/moon_flutter/commit/52ed9b74d9f4d4aa38ce9fe8fd39d8f8218025d1))\n\n## [0.9.2](https://github.com/coingaming/moon_flutter/compare/v0.9.1...v0.9.2) (2023-03-01)\n\n\n### Bug Fixes\n\n* [MDS-411] Update icons and extract them to separate thematic fonts ([#64](https://github.com/coingaming/moon_flutter/issues/64)) ([39f7063](https://github.com/coingaming/moon_flutter/commit/39f7063d86ff786936a5bb31806ba86990720bfc))\n\n## [0.9.1](https://github.com/coingaming/moon_flutter/compare/v0.9.0...v0.9.1) (2023-02-28)\n\n\n### Bug Fixes\n\n* [MDS-407] Fix Chip not handling some colors with opacity properly ([#62](https://github.com/coingaming/moon_flutter/issues/62)) ([a62ba9b](https://github.com/coingaming/moon_flutter/commit/a62ba9b17bb9699e532ed525d9de565bf224a827))\n\n## [0.9.0](https://github.com/coingaming/moon_flutter/compare/v0.8.0...v0.9.0) (2023-02-27)\n\n\n### Features\n\n* [MDS-412] Create LinearProgress and LinearLoader widgets ([#60](https://github.com/coingaming/moon_flutter/issues/60)) ([000de10](https://github.com/coingaming/moon_flutter/commit/000de10f4e6479e42a22e64e758fd26195b86292))\n\n## [0.8.0](https://github.com/coingaming/moon_flutter/compare/v0.7.0...v0.8.0) (2023-02-23)\n\n\n### Features\n\n* [MDS-405] Create CircularProgress widget ([#58](https://github.com/coingaming/moon_flutter/issues/58)) ([03d8832](https://github.com/coingaming/moon_flutter/commit/03d88323e758e612d6834743d24bea91226360d5))\n\n## [0.7.0](https://github.com/coingaming/moon_flutter/compare/v0.6.0...v0.7.0) (2023-02-23)\n\n\n### Features\n\n* [MDS-389] Create MoonLoader ([#56](https://github.com/coingaming/moon_flutter/issues/56)) ([1f5b025](https://github.com/coingaming/moon_flutter/commit/1f5b02565bd30cd82986c0f81a5af2befb8c63c0))\n\n## [0.6.0](https://github.com/coingaming/moon_flutter/compare/v0.5.6...v0.6.0) (2023-02-23)\n\n\n### Features\n\n* [MDS-390] Add MoonTooltip ([#53](https://github.com/coingaming/moon_flutter/issues/53)) ([96a13a6](https://github.com/coingaming/moon_flutter/commit/96a13a6529be9d055c83f1d0e084291bed737931))\n\n## [0.5.6](https://github.com/coingaming/moon_flutter/compare/v0.5.5...v0.5.6) (2023-02-20)\n\n\n### Bug Fixes\n\n* avatar and button to capitalize in Storybook ([#52](https://github.com/coingaming/moon_flutter/issues/52)) ([db95d21](https://github.com/coingaming/moon_flutter/commit/db95d21b39feb82e9a3b7eda3aa430b46000bf98))\n\n## [0.5.5](https://github.com/coingaming/moon_flutter/compare/v0.5.4...v0.5.5) (2023-02-20)\n\n\n### Bug Fixes\n\n* chip to Chip in Storybook [MDS-398] ([#48](https://github.com/coingaming/moon_flutter/issues/48)) ([0ef0871](https://github.com/coingaming/moon_flutter/commit/0ef08710852137e4958440319ff0ab100860d5b3))\n\n## [0.5.4](https://github.com/coingaming/moon_flutter/compare/v0.5.3...v0.5.4) (2023-02-20)\n\n\n### Bug Fixes\n\n* Fix MDS logo ([#49](https://github.com/coingaming/moon_flutter/issues/49)) ([2eccb18](https://github.com/coingaming/moon_flutter/commit/2eccb18bf6195946ac708a3509a6d5d5665676a8))\n\n## [0.5.3](https://github.com/coingaming/moon_flutter/compare/v0.5.2...v0.5.3) (2023-02-20)\n\n\n### Bug Fixes\n\n* Add AnimatedIconTheme to MoonButton ([#46](https://github.com/coingaming/moon_flutter/issues/46)) ([7c99334](https://github.com/coingaming/moon_flutter/commit/7c993341146b57be24ee288cd11a79b308f75f2a))\n\n## [0.5.2](https://github.com/coingaming/moon_flutter/compare/v0.5.1...v0.5.2) (2023-02-20)\n\n\n### Bug Fixes\n\n* Convert AnimatedIconTheme to ImplicitlyAnimatedWidget ([#43](https://github.com/coingaming/moon_flutter/issues/43)) ([c1a5216](https://github.com/coingaming/moon_flutter/commit/c1a5216340f540ffde4e2e2d80d4b945021a4e27))\n\n## [0.5.1](https://github.com/coingaming/moon_flutter/compare/v0.5.0...v0.5.1) (2023-02-19)\n\n\n### Bug Fixes\n\n* Create AnimatedIconTheme ([#41](https://github.com/coingaming/moon_flutter/issues/41)) ([1c24eca](https://github.com/coingaming/moon_flutter/commit/1c24ecab3143ee68afe711a468b0961c1c252245))\n\n## [0.5.0](https://github.com/coingaming/moon_flutter/compare/v0.4.3...v0.5.0) (2023-02-17)\n\n\n### Features\n\n* [MDS-387] Add/convert MDS icons to the project ([#39](https://github.com/coingaming/moon_flutter/issues/39)) ([2074f9a](https://github.com/coingaming/moon_flutter/commit/2074f9a01d5af650ed2227fcdf505003bdbd451c))\n\n## [0.4.3](https://github.com/coingaming/moon_flutter/compare/v0.4.2...v0.4.3) (2023-02-15)\n\n\n### Bug Fixes\n\n* Add letter spacing to upper case MoonTag ([1454be1](https://github.com/coingaming/moon_flutter/commit/1454be18271f2838f0061d30ea7bf2fd2cf664f8))\n\n## [0.4.2](https://github.com/coingaming/moon_flutter/compare/v0.4.1...v0.4.2) (2023-02-14)\n\n\n### Bug Fixes\n\n* Add semantics to MoonTag ([#36](https://github.com/coingaming/moon_flutter/issues/36)) ([e83bea2](https://github.com/coingaming/moon_flutter/commit/e83bea230801d6307b84a88aea35548c516e9211))\n\n## [0.4.1](https://github.com/coingaming/moon_flutter/compare/v0.4.0...v0.4.1) (2023-02-14)\n\n\n### Bug Fixes\n\n* Correct MoonChip padding ([f14eb2d](https://github.com/coingaming/moon_flutter/commit/f14eb2d5444330cf5a89d911c541988c63cca8a9))\n\n## [0.4.0](https://github.com/coingaming/moon_flutter/compare/v0.3.0...v0.4.0) (2023-02-14)\n\n\n### Features\n\n* [MDS-378] Create Chip widget ([#33](https://github.com/coingaming/moon_flutter/issues/33)) ([4f41fcd](https://github.com/coingaming/moon_flutter/commit/4f41fcddef034d78c8b13c0a177d3f501c21ffa8))\n\n## [0.3.0](https://github.com/coingaming/moon_flutter/compare/v0.2.4...v0.3.0) (2023-02-10)\n\n\n### Features\n\n* [MDS-379] Finalize the MoonTag ([#31](https://github.com/coingaming/moon_flutter/issues/31)) ([95ecf31](https://github.com/coingaming/moon_flutter/commit/95ecf31f7ee38a07fdbfc0782b6687b04dfa7369))\n\n## [0.2.4](https://github.com/coingaming/moon_flutter/compare/v0.2.3...v0.2.4) (2023-02-10)\n\n\n### Bug Fixes\n\n* hotfix page title in storybook ([8d1d24d](https://github.com/coingaming/moon_flutter/commit/8d1d24d8a2198bcab4ee7b3f441efa68fca35a76))\n\n## [0.2.3](https://github.com/coingaming/moon_flutter/compare/v0.2.2...v0.2.3) (2023-02-10)\n\n\n### Bug Fixes\n\n* RTL and web title fixes ([#28](https://github.com/coingaming/moon_flutter/issues/28)) ([25619e5](https://github.com/coingaming/moon_flutter/commit/25619e56d20c3adb60c14615c5c4b40e22466fe1))\n\n## [0.2.2](https://github.com/coingaming/moon_flutter/compare/v0.2.1...v0.2.2) (2023-02-10)\n\n\n### Bug Fixes\n\n* Changelog fix ([#26](https://github.com/coingaming/moon_flutter/issues/26)) ([aa428ba](https://github.com/coingaming/moon_flutter/commit/aa428ba61baeedbe7d484157ce08a39f8aca01e8))\n\n## [0.2.1](https://github.com/coingaming/moon_flutter/compare/v0.2.0...v0.2.1) (2023-02-10)\n\n\n### Bug Fixes\n\n* Fix placeholder asset path ([#24](https://github.com/coingaming/moon_flutter/issues/24)) ([e884b86](https://github.com/coingaming/moon_flutter/commit/e884b860e882cb83e71615de0c46f30c0572dfb1))\n\n## [0.2.0](https://github.com/coingaming/moon_flutter/compare/v0.1.5...v0.2.0) (2023-02-10)\n\n\n### Features\n\n* [MDS-377] Create avatar widget ([#22](https://github.com/coingaming/moon_flutter/issues/22)) ([57d0a0d](https://github.com/coingaming/moon_flutter/commit/57d0a0d2db6afbb25193b4080b2166e59d718f70))\n\n## [0.1.5](https://github.com/coingaming/moon_flutter/compare/v0.1.4...v0.1.5) (2023-02-09)\n\n\n### Bug Fixes\n\n* Add MoonButton.icon constructor ([#16](https://github.com/coingaming/moon_flutter/issues/16)) ([a94f79d](https://github.com/coingaming/moon_flutter/commit/a94f79d0b1d9683296670c1591bb04fb9ad290ab))\n\n## [0.1.4](https://github.com/coingaming/moon_flutter/compare/v0.1.3...v0.1.4) (2023-02-08)\n\n\n### Bug Fixes\n\n* release-please config changes ([393ec4a](https://github.com/coingaming/moon_flutter/commit/393ec4a93f7be23fcd235e24cb1063c613ad55fd))\n\n## [0.1.3](https://github.com/coingaming/moon_flutter/compare/moon_design-v0.1.2...moon_design-v0.1.3) (2023-02-08)\n\n\n### Bug Fixes\n\n* Color staleness in the example ([#11](https://github.com/coingaming/moon_flutter/issues/11)) ([e979150](https://github.com/coingaming/moon_flutter/commit/e979150034b657288be446c6702d40f4ad96189b))\n\n## [0.1.2](https://github.com/coingaming/moon_flutter/compare/v0.1.1...v0.1.2) (2023-02-07)\n\n\n### Bug Fixes\n\n* Retry dynamic version fix in storybook ([316c11a](https://github.com/coingaming/moon_flutter/commit/316c11a172a8142e85e6748baf16b189b913fc0b))\n\n## [0.1.1](https://github.com/coingaming/moon_flutter/compare/v0.1.0...v0.1.1) (2023-02-07)\n\n\n### Bug Fixes\n\n* Get MDS version dynamically ([#7](https://github.com/coingaming/moon_flutter/issues/7)) ([568092c](https://github.com/coingaming/moon_flutter/commit/568092c1adb846dfff00bdc72e3a270928136165))\n\n## [0.1.0](https://github.com/coingaming/moon_flutter/pull/5) (2023-02-07)\n\n\n### Features\n\n* [MDS-351] Create Buttons ([57bf4cb](https://github.com/coingaming/moon_flutter/commit/57bf4cba1d41adc2d463a5f54b323c13645a94e0))\n\n## 0.0.1 (2023-01-16)\n\n* Initial project setup.\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2024 Yolo Group\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.md",
    "content": "# Moon Design System\n\n[![Version](https://img.shields.io/pub/v/moon_design.svg)](https://pub.dev/packages/moon_design) ![Build](https://github.com/coingaming/moon_flutter/actions/workflows/analyze_and_test.yml/badge.svg) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)\n\n<img width=\"644\" alt=\"Moon Design System\" src=\"https://user-images.githubusercontent.com/232199/133601344-e63bd62f-dd0f-47a1-9d1e-b5cb065e5a90.png\">\n\n_Note: This project uses **[Release Please](https://github.com/googleapis/release-please)** and **[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)** spec, please follow the conventions or consider using **[Commitizen](https://github.com/commitizen/cz-cli)**\nto write commit messages._\n\n## Disclaimer\n\nThe current major release, v1.0.0, will be maintained as-is and will not receive further updates, except for patches. The v1 theming is based on the soon-to-be deprecated Moon Design Figma v1 and lacks flexibility. For greater control over theming with v1 of moon_flutter, it is recommended to create custom wrapper widgets around the moon_flutter widgets that align with your project's specific theming requirements.\n\nThere is ongoing background work for v2 which aims to be more modular, scalable and themable.\n\n## Resources\n\n- 📱 [Playground](https://flutter.moon.io)\n\n## Applying theming and overrides\n\n- Declare tokens variable and optionally override values:\n\n```dart\nfinal lightTokens = MoonTokens.light.copyWith(\n  colors: MoonColors.light.copyWith(\n    piccolo: Colors.blue,\n    textPrimary: Colors.amber,\n  ),\n  typography: MoonTypography.typography.copyWith(\n    heading: MoonTypography.typography.heading.apply(\n      // Using variable font and bumping down the font weight compared to the\n      // baseline 600 for heading.\n      fontFamily: \"DMSans\",\n      fontWeightDelta: -1,\n      fontVariations: [const FontVariation('wght', 500)],\n    ),\n  ),\n);\n\nfinal lightTheme = ThemeData.light().copyWith(\n    extensions: <ThemeExtension<dynamic>>[MoonTheme(tokens: lightTokens)],\n  );\n```\n\n- Or if needed override widget theming:\n\n```dart\nfinal lightTheme = ThemeData.light().copyWith(\n  extensions: <ThemeExtension<dynamic>>[\n    MoonTheme(tokens: lightTokens).copyWith(\n      accordionTheme: MoonAccordionTheme(tokens: lightTokens).copyWith(\n        colors: MoonAccordionTheme(tokens: lightTokens).colors.copyWith(\n              backgroundColor: Colors.green,\n            ),\n      ),\n    ),\n  ],\n);\n```\n\n- Apply the declared theme:\n\n```dart\nreturn MaterialApp(\n      title: 'Moon Design System example',\n      theme: lightTheme,\n      home: const HomePage(),\n );\n```\n"
  },
  {
    "path": "analysis_options.yaml",
    "content": "include: package:lint/analysis_options.yaml\n\nanalyzer:\n  language:\n    strict-casts: true\n    strict-inference: true\n    strict-raw-types: true\n  exclude:\n    - \"lib/generated/**\"\n    - \"lib/generated_*\"\n    - \"lib/i18n/messages_*.dart\"\n    - \"lib/gen-l10n/**\"\n    - \"lib/gen/**\"\n    - \"**/*.freezed.dart\"\n    - \"**/*.g.dart\"\n    - \"**/*.graphql.dart\"\n    - \"**/*.mocks.dart\"\n    - \"/pubspec.lock\"\n  errors:\n    deprecated_member_use: info\n\nlinter:\n  rules:\n    depend_on_referenced_packages: false\n    use_setters_to_change_properties: false\n    avoid_classes_with_only_static_members: false\n"
  },
  {
    "path": "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/pubspec.lock\n/android/app/debug\n/android/app/profile\n/android/app/release\n\n/pubspec.lock\n"
  },
  {
    "path": "example/.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.\n\nversion:\n  revision: 135454af32477f815a7525073027a3ff9eff1bfd\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: 135454af32477f815a7525073027a3ff9eff1bfd\n      base_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n    - platform: android\n      create_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n      base_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n    - platform: ios\n      create_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n      base_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n    - platform: linux\n      create_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n      base_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n    - platform: macos\n      create_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n      base_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n    - platform: web\n      create_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n      base_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n    - platform: windows\n      create_revision: 135454af32477f815a7525073027a3ff9eff1bfd\n      base_revision: 135454af32477f815a7525073027a3ff9eff1bfd\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/README.md",
    "content": "# example\n\nA new Flutter project.\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://docs.flutter.dev/get-started/codelab)\n- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)\n\nFor help getting started with Flutter development, view the\n[online documentation](https://docs.flutter.dev/), which offers tutorials,\nsamples, guidance on mobile development, and a full API reference.\n"
  },
  {
    "path": "example/analysis_options.yaml",
    "content": "include: package:lint/analysis_options.yaml\n\nanalyzer:\n  language:\n    strict-casts: true\n    strict-inference: true\n    strict-raw-types: true\n  exclude:\n    - \"lib/generated/**\"\n    - \"lib/generated_*\"\n    - \"lib/i18n/messages_*.dart\"\n    - \"lib/gen-l10n/**\"\n    - \"lib/gen/**\"\n    - \"**/*.freezed.dart\"\n    - \"**/*.g.dart\"\n    - \"**/*.graphql.dart\"\n    - \"**/*.mocks.dart\"\n    - \"/pubspec.lock\"\n  errors:\n    deprecated_member_use: info\n\nlinter:\n  rules:\n    depend_on_referenced_packages: false\n"
  },
  {
    "path": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "example/android/gradle.properties",
    "content": "org.gradle.jvmargs=-Xmx1536M\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n"
  },
  {
    "path": "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": "example/assets/code_snippets/accordion.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nenum AccordionItems { first, second }\n\nclass Accordion extends StatefulWidget {\n  const Accordion({super.key});\n\n  @override\n  State<Accordion> createState() => _AccordionState();\n}\n\nclass _AccordionState extends State<Accordion> {\n  AccordionItems? _currentlyOpenAccordionItem = AccordionItems.first;\n\n  @override\n  Widget build(BuildContext context) {\n    const String contentText = \n      \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, \"\n      \"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, \"\n      \"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\";\n\n    return Column(\n      children: [\n        MoonAccordion<AccordionItems>(\n          // The identityValue and groupIdentityValue can be used to control the \n          // auto collapse behaviour of the accordion.\n          identityValue: AccordionItems.first,\n          groupIdentityValue: _currentlyOpenAccordionItem,\n          accordionSize: MoonAccordionSize.sm,\n          childrenPadding: const EdgeInsets.all(12),\n          onExpansionChanged: (AccordionItems? value) => setState(\n            () => _currentlyOpenAccordionItem = value,\n          ),\n          leading: const Icon(MoonIcons.other_frame_24_light),\n          label: const Text(\"Grouped MoonAccordion item #1\"),\n          children: const [\n            Text(contentText),\n          ],\n        ),\n        MoonAccordion<AccordionItems>(\n          // The identityValue and groupIdentityValue can be used to control the \n          // auto collapse behaviour of the accordion.\n          identityValue: AccordionItems.second,\n          groupIdentityValue: _currentlyOpenAccordionItem,\n          accordionSize: MoonAccordionSize.sm,\n          hasContentOutside: true,\n          childrenPadding: const EdgeInsets.all(12),\n          onExpansionChanged: (AccordionItems? value) => setState(\n            () => _currentlyOpenAccordionItem = value,\n          ),\n          leading: const Icon(MoonIcons.other_frame_24_light),\n          label: const Text(\"Grouped MoonAccordion item #2\"),\n          children: const [\n            Text(contentText),\n          ],\n        ),\n      ],\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/alert.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Alert extends StatelessWidget {\n  const Alert({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        MoonAlert(\n          show: true,\n          leading: const Icon(MoonIcons.other_frame_24_light),\n          label: const Text(\"Base MoonAlert\"),\n          trailing: MoonButton.icon(\n            buttonSize: MoonButtonSize.xs,\n            onTap: () => {},\n            icon: const Icon(MoonIcons.controls_close_24_light),\n          ),\n          content: const Text(\"Here goes MoonAlert content\"),\n        ),\n        MoonAlert.filled(\n          show: true,\n          color: context.moonColors!.chichi,\n          backgroundColor: context.moonColors!.chichi10,\n          leading: const Icon(MoonIcons.notifications_alert_24_light),\n          label: const Text(\"Filled error MoonAlert\"),\n          trailing: MoonButton.icon(\n            buttonSize: MoonButtonSize.xs,\n            onTap: () {},\n            icon: Icon(\n              MoonIcons.controls_close_small_24_light,\n              color: context.moonColors!.chichi,\n            ),\n          ),\n        ),\n        MoonAlert.outlined(\n          show: true,\n          color: context.moonColors!.roshi,\n          borderColor: context.moonColors!.roshi,\n          leading: const Icon(MoonIcons.generic_check_rounded_24_light),\n          label: const Text(\"Outlined success MoonAlert\"),\n          trailing: MoonButton.icon(\n            buttonSize: MoonButtonSize.xs,\n            onTap: () {},\n            icon: Icon(\n              MoonIcons.controls_close_small_24_light,\n              color: context.moonColors!.roshi,\n            ),\n          ),\n        ),\n      ],\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/auth_code.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass AuthCode extends StatelessWidget {\n  const AuthCode({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return SizedBox(\n      height: 95, // To avoid widget jumping with error text, use a fixed-height wrapper.\n      child: MoonAuthCode(\n        validator: (String? pin) {\n          if (pin != null && pin != '000000' && pin.length == 6) {\n            return 'The input must be exactly \"000000\".';\n          } else {\n            return null;\n          }\n        },\n        errorBuilder: (BuildContext context, String? errorText) {\n          return Align(\n            child: Padding(\n              padding: const EdgeInsets.only(top: 8),\n              child: Text(errorText ?? ''),\n            ),\n          );\n        },\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/avatar.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Avatar extends StatelessWidget {\n  const Avatar({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return const MoonAvatar(\n      avatarSize: MoonAvatarSize.sm,\n      showBadge: true,\n      content: Text('MD'),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/bottom_sheet.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass BottomSheet extends StatelessWidget {\n  const BottomSheet({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    Future<dynamic> bottomSheetBuilder(BuildContext context) {\n      return showMoonModalBottomSheet(\n        context: context,\n        enableDrag: true,\n        height: MediaQuery.of(context).size.height * 0.7,\n        builder: (BuildContext context) => Column(\n          children: [\n            // Drag handle for the bottom sheet.\n            Container(\n              height: 4,\n              width: 40,\n              margin: const EdgeInsets.symmetric(vertical: 8),\n              decoration: ShapeDecoration(\n                color: context.moonColors!.beerus,\n                shape: MoonSquircleBorder(\n                  borderRadius: BorderRadius.circular(16).squircleBorderRadius(context),\n                ),\n              ),\n            ),\n            const Expanded(\n              child: Align(\n                child: Text('MoonBottomSheet example'),\n              ),\n            ),\n          ],\n        ),\n      );\n    }\n\n    return Center(\n      child: MoonFilledButton(\n        onTap: () => bottomSheetBuilder(context),\n        label: const Text(\"Tap me\"),\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/breadcrumb.md",
    "content": "import 'package:flutter/gestures.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass BreadcrumbStory extends StatefulWidget {\n  const BreadcrumbStory({super.key});\n\n  @override\n  State<BreadcrumbStory> createState() => _BreadcrumbStoryState();\n}\n\nclass _BreadcrumbStoryState extends State<BreadcrumbStory> {\n  bool _showDropdown = false;\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      mainAxisAlignment: MainAxisAlignment.center,\n      children: [\n        // The default MoonBreadcrumb. \n        // Expands horizontally to the full path when the indicated show more item is tapped.\n        Column(\n          children: [\n            MoonBreadcrumb(\n              items: List.generate(\n                6,\n                (int index) {\n                  return MoonBreadcrumbItem(\n                    onTap: () {},\n                    label: Text('Page $index'),\n                  );\n                },\n              ),\n            ),\n            // Provides an explicit method to restore the expanded breadcrumb path \n            // to its collapsed state, enabling external control.\n            // By default, the state is automatically restored during rebuild.\n            MoonButton(\n              onTap: () => setState(() => {}),\n              label: const Text('Reset'),\n            ),\n          ],\n        ),\n\n        // MoonBreadcrumb with the MoonDropdown and a custom showMoreWidget.\n        MoonBreadcrumb(\n          divider: Icon(\n            Directionality.of(context) == TextDirection.ltr\n                ? MoonIcons.controls_chevron_right_small_16_light\n                : MoonIcons.controls_chevron_left_small_16_light,\n          ),\n          showMoreWidget: MoonBreadcrumbItem(\n            onTap: () => setState(() => _showDropdown = !_showDropdown),\n            label: MoonDropdown(\n              show: _showDropdown,\n              onTapOutside: () => setState(() => _showDropdown = false),\n              content: Column(\n                children: List.generate(\n                  3,\n                  (int index) => MoonMenuItem(\n                    onTap: () {},\n                    label: Text('Page ${index + 1}'),\n                  ),\n                ),\n              ),\n              child: const Icon(MoonIcons.generic_burger_regular_16_light),\n            ),\n          ),\n          items: List.generate(\n            6,\n            (int index) {\n              return MoonBreadcrumbItem(\n                onTap: () {},\n                label: Text('Page $index'),\n              );\n            },\n          ),\n        ),\n      ],\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/button.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Button extends StatelessWidget {\n  const Button({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        MoonButton(\n          buttonSize: MoonButtonSize.sm,\n          onTap: () {},\n          leading: const Icon(MoonIcons.other_frame_24_light),\n          label: const Text('MoonButton'),\n          trailing: const Icon(MoonIcons.other_frame_24_light),\n        ),\n        MoonButton.icon(\n          buttonSize: MoonButtonSize.sm,\n          onTap: () {},\n          icon: const Icon(MoonIcons.other_frame_24_light),\n        ),\n        MoonFilledButton(\n          buttonSize: MoonButtonSize.sm,\n          onTap: () {},\n          leading: const Icon(MoonIcons.other_frame_24_light),\n          label: const Text(\"MoonFilledButton\"),\n          trailing: const Icon(MoonIcons.other_frame_24_light),\n        ),\n        MoonOutlinedButton(\n          buttonSize: MoonButtonSize.sm,\n          onTap: () {},\n          leading: const Icon(MoonIcons.other_frame_24_light),\n          label: const Text(\"MoonOutlinedButton\"),\n          trailing: const Icon(MoonIcons.other_frame_24_light),\n        ),\n        MoonTextButton(\n          buttonSize: MoonButtonSize.sm,\n          onTap: () {},\n          leading: const Icon(MoonIcons.other_frame_24_light),\n          label: const Text(\"MoonTextButton\"),\n          trailing: const Icon(MoonIcons.other_frame_24_light),\n        ),\n      ],\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/carousel.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Carousel extends StatefulWidget {\n  const Carousel({super.key});\n\n  @override\n  State<Carousel> createState() => _CarouselState();\n}\n\nclass _CarouselState extends State<Carousel> {\n  int selectedDot = 0;\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        // Default MoonCarousel.\n        SizedBox(\n          height: 110,\n          child: OverflowBox(\n            maxWidth: MediaQuery.of(context).size.width,\n            child: MoonCarousel(\n              itemCount: 10,\n              itemExtent: 110,\n              itemBuilder: (BuildContext context, int itemIndex, int _) => Container(\n                decoration: ShapeDecoration(\n                  color: context.moonColors!.goku,\n                  shape: MoonSquircleBorder(\n                    borderRadius: BorderRadius.circular(12).squircleBorderRadius(context),\n                  ),\n                ),\n                child: Center(\n                  child: Text(\"${itemIndex + 1}\"),\n                ),\n              ),\n            ),\n          ),\n        ),\n\n        // Full width MoonCarousel with MoonDotIndicator.\n        Column(\n          children: [\n            SizedBox(\n              height: 180,\n              child: OverflowBox(\n                maxWidth: MediaQuery.of(context).size.width,\n                child: MoonCarousel(\n                  gap: 32,\n                  itemCount: 5,\n                  itemExtent: MediaQuery.of(context).size.width - 32,\n                  physics: const PageScrollPhysics(),\n                  onIndexChanged: (int index) => setState(() => selectedDot = index),\n                  itemBuilder: (BuildContext context, int itemIndex, int _) => Container(\n                    decoration: ShapeDecoration(\n                      color: context.moonColors!.goku,\n                      shape: MoonSquircleBorder(\n                        borderRadius: BorderRadius.circular(12).squircleBorderRadius(context),\n                      ),\n                    ),\n                    child: Center(\n                      child: Text(\"${itemIndex + 1}\"),\n                    ),\n                  ),\n                ),\n              ),\n            ),\n            MoonDotIndicator(\n              selectedDot: selectedDot,\n              dotCount: 5,\n            ),\n          ],\n        ),\n      ],\n    );\n  }\n}\n"
  },
  {
    "path": "example/assets/code_snippets/checkbox.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Checkbox extends StatefulWidget {\n  const Checkbox({super.key});\n\n  @override\n  State<Checkbox> createState() => _CheckboxState();\n}\n\nclass _CheckboxState extends State<Checkbox> {\n  bool? checkboxValue = false;\n  bool checkboxWithLabelValue = false;\n  bool? tristateCheckboxWithLabelValue = false;\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        MoonCheckbox(\n          value: checkboxValue,\n          onChanged: (bool? newValue) => setState(() => checkboxValue = newValue),\n        ),\n        MoonMenuItem(\n          absorbGestures: true,\n          onTap: () => setState(() => checkboxWithLabelValue = !checkboxWithLabelValue),\n          label: const Text(\"MoonCheckbox with label\"),\n          trailing: MoonCheckbox(\n            value: checkboxWithLabelValue,\n            tapAreaSizeValue: 0,\n            onChanged: (_) => {},\n          ),\n        ),\n        MoonMenuItem(\n          absorbGestures: true,\n          onTap: () => setState(\n            () => switch (tristateCheckboxWithLabelValue) {\n              true => tristateCheckboxWithLabelValue = null,\n              null => tristateCheckboxWithLabelValue = false,\n              false => tristateCheckboxWithLabelValue = true,\n            },\n          ),\n          label: const Text(\"Tristate MoonCheckbox with label\"),\n          trailing: MoonCheckbox(\n            value: tristateCheckboxWithLabelValue,\n            tapAreaSizeValue: 0,\n            onChanged: (_) => {},\n          ),\n        ),\n      ],\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/chip.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Chip extends StatelessWidget {\n  const Chip({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return const Column(\n      children: [\n        MoonChip(\n          chipSize: MoonChipSize.sm,\n          leading: Icon(MoonIcons.other_frame_24_light),\n          label: Text('MoonChip'),\n          trailing: Icon(MoonIcons.other_frame_24_light),\n        ),\n        MoonChip.text(\n          chipSize: MoonChipSize.sm,\n          leading: Icon(MoonIcons.other_frame_24_light),\n          label: Text('MoonChip with text'),\n          trailing: Icon(MoonIcons.other_frame_24_light),\n        ),\n      ],\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/circular_loader.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass CircularLoader extends StatelessWidget {\n  const CircularLoader({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return const MoonCircularLoader(\n      circularLoaderSize: MoonCircularLoaderSize.sm,\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/circular_progress.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass CircularProgress extends StatelessWidget {\n  const CircularProgress({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return const MoonCircularProgress(\n      value: 0.75,\n      circularProgressSize: MoonCircularProgressSize.sm,\n    );\n  }\n}\n\n"
  },
  {
    "path": "example/assets/code_snippets/combobox_multi_select.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nenum Options {\n  accordion,\n  alert,\n  bottomSheet,\n  button,\n  carousel,\n  chip,\n  dropdown,\n  menuItem,\n  tag,\n  tooltip;\n\n  String get name {\n    final String rawName = toString().split('.').last;\n    return rawName[0].toUpperCase() + rawName.substring(1);\n  }\n}\n\nclass ComboboxMultiSelect extends StatefulWidget {\n  const ComboboxMultiSelect({super.key});\n\n  @override\n  State<ComboboxMultiSelect> createState() => _ComboboxMultiSelectState();\n}\n\nclass _ComboboxMultiSelectState extends State<ComboboxMultiSelect> {\n  final FocusNode _focusNode = FocusNode();\n  final TextEditingController _searchController = TextEditingController();\n  final Map<Options, bool> _selectedOptions = {};\n  final List<Options> _optionsList = Options.values;\n\n  List<Options> _filteredOptionsList = [];\n  bool _showDropdown = false;\n\n  String get _inputValue => _searchController.text.trim().toLowerCase();\n\n  void _performSearch() {\n    setState(() {\n      _filteredOptionsList = _\n          optionsList.where((Options option) => option.name.toLowerCase().contains(_inputValue)).toList();\n      _showDropdown = true;\n    });\n  }\n\n  void _handleSelect(Options option, bool isSelected) {\n    setState(() => isSelected ? _selectedOptions[option] = true : _selectedOptions.remove(option));\n  }\n\n  void _showAllOptionsList() {\n    setState(() {\n      _filteredOptionsList = _optionsList;\n      _showDropdown = !_showDropdown;\n    });\n  }\n\n  void _handleDropdownTapOutside() {\n    setState(() {\n      _showDropdown = false;\n      _searchController.clear();\n      _focusNode.unfocus();\n    });\n  }\n\n  void _handleInputTapOutside() {\n    if (_focusNode.hasFocus && !_showDropdown) {\n      _searchController.clear();\n      _focusNode.unfocus();\n    }\n  }\n\n  @override\n  void dispose() {\n    _searchController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Center(\n      child: MoonDropdown(\n        show: _showDropdown,\n        constrainWidthToChild: true,\n        onTapOutside: () => _handleDropdownTapOutside(),\n        content: ConstrainedBox(\n          constraints: const BoxConstraints(maxHeight: 200),\n          child: _filteredOptionsList.isEmpty\n              ? const MoonMenuItem(\n                  label: Text('Nothing found.'),\n                )\n              : ListView.builder(\n                  shrinkWrap: true,\n                  padding: EdgeInsets.zero,\n                  itemCount: _filteredOptionsList.length,\n                  itemBuilder: (BuildContext _, int index) {\n                    if (index >= _filteredOptionsList.length) return const SizedBox.shrink();\n                    final Options currentOption = _filteredOptionsList[index];\n                    final bool isSelected = _selectedOptions.containsKey(currentOption);\n\n                    return MoonMenuItem(\n                      absorbGestures: true,\n                      onTap: () => _handleSelect(currentOption, !isSelected),\n                      label: Text(currentOption.name),\n                      trailing: MoonCheckbox(\n                        value: isSelected,\n                        tapAreaSizeValue: 0,\n                        onChanged: (bool? _) {},\n                      ),\n                    );\n                  },\n                ),\n        ),\n        child: MoonTextInput(\n          focusNode: _focusNode,\n          hintText: \"Select multiple components\",\n          controller: _searchController,\n          // The onTap() and onChanged() properties are used instead of a listener to initiate search on every input tap.\n          // Listener only triggers on input change.            \n          onTap: () => _performSearch(),\n          onTapOutside: (PointerDownEvent _) => _handleInputTapOutside(),\n          onChanged: (String _) => _performSearch(),\n          leading: _selectedOptions.isNotEmpty\n              ? Center(\n                  child: GestureDetector(\n                    onTap: () => setState(() => _selectedOptions.clear()),\n                    child: MoonTag(\n                      tagSize: MoonTagSize.xs,\n                      backgroundColor: context.moonColors!.bulma,\n                      label: Text(\n                        \"${_selectedOptions.keys.length}\",\n                        style: TextStyle(color: context.moonColors!.gohan),\n                      ),\n                      trailing: Icon(\n                        MoonIcons.controls_close_small_16_light,\n                        color: context.moonColors!.gohan,\n                      ),\n                    ),\n                  ),\n                )\n              : null,\n          trailing: MoonButton.icon(\n            buttonSize: MoonButtonSize.xs,\n            hoverEffectColor: Colors.transparent,\n            onTap: () => _showAllOptionsList(),\n            icon: AnimatedRotation(\n              duration: const Duration(milliseconds: 200),\n              turns: _showDropdown ? -0.5 : 0,\n              child: const Icon(MoonIcons.controls_chevron_down_16_light),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/combobox_single_select.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nenum Options {\n  accordion,\n  alert,\n  bottomSheet,\n  button,\n  carousel,\n  chip,\n  dropdown,\n  menuItem,\n  tag,\n  tooltip;\n\n  String get name {\n    final String rawName = toString().split('.').last;\n    return rawName[0].toUpperCase() + rawName.substring(1);\n  }\n}\n\nclass ComboboxSingleSelect extends StatefulWidget {\n  const ComboboxSingleSelect({super.key});\n\n  @override\n  State<ComboboxSingleSelect> createState() => _ComboboxSingleSelectState();\n}\n\nclass _ComboboxSingleSelectState extends State<ComboboxSingleSelect> {\n  final FocusNode _focusNode = FocusNode();\n  final TextEditingController _searchController = TextEditingController();\n  final List<Options> _optionsList = Options.values;\n\n  List<Options> _filteredOptionsList = [];\n  Options? _selectedOption;\n  bool _showDropdown = false;\n\n  bool get _optionIsSelected => _selectedOption?.name == _searchController.text;\n  \n  String get _inputValue => _searchController.text.trim().toLowerCase();\n\n  void _performSearch() {\n    setState(() {\n      if (!_optionIsSelected && _selectedOption != null) _selectedOption = null;\n\n      _filteredOptionsList = \n          _optionsList.where((Options option) => option.name.toLowerCase().contains(_inputValue)).toList();\n      _showDropdown = true;\n    });\n  }\n\n  void _handleSelect(Options option) {\n    setState(() {\n      _showDropdown = false;\n      _searchController.text = option.name;\n      _selectedOption = option;\n      _focusNode.unfocus();\n    });\n  }\n\n  void _showAllOptionsList() {\n    setState(() {\n      _filteredOptionsList = _optionsList;\n      _showDropdown = !_showDropdown;\n    });\n  }\n\n  void _handleDropdownTapOutside() {\n    setState(() {\n      _showDropdown = false;\n      if (!_optionIsSelected) _searchController.clear();\n      _focusNode.unfocus();\n    });\n  }\n\n  void _handleInputTapOutside() {\n    if (_focusNode.hasFocus && !_showDropdown) {\n      if (!_optionIsSelected) _searchController.clear();\n      _focusNode.unfocus();\n    }\n  }\n\n  @override\n  void dispose() {\n    _searchController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Center(\n      child: MoonDropdown(\n        show: _showDropdown,\n        constrainWidthToChild: true,\n        onTapOutside: () => _handleDropdownTapOutside(),\n        content: ConstrainedBox(\n          constraints: const BoxConstraints(maxHeight: 200),\n          child: _filteredOptionsList.isEmpty\n              ? const MoonMenuItem(\n                  label: Text('No results found.'),\n                )\n              : ListView.builder(\n                  shrinkWrap: true,\n                  padding: EdgeInsets.zero,\n                  itemCount: _filteredOptionsList.length,\n                  itemBuilder: (BuildContext _, int index) {\n                    if (index >= _filteredOptionsList.length) return const SizedBox.shrink();\n                    final Options option = _filteredOptionsList[index];\n\n                    return MoonMenuItem(\n                      onTap: () => _handleSelect(option),\n                      label: Text(option.name),\n                    );\n                  },\n                ),\n        ),\n        child: MoonTextInput(\n          focusNode: _focusNode,\n          hintText: \"Select single component\",\n          controller: _searchController,\n          // The onTap() and onChanged() properties are used instead of a listener to initiate search on every input tap. \n          // Listener only triggers on input change.\n          onTap: () => _performSearch(),\n          onTapOutside: (PointerDownEvent _) => _handleInputTapOutside(),\n          onChanged: (String _) => _performSearch(),\n          trailing: MoonButton.icon(\n            buttonSize: MoonButtonSize.xs,\n            hoverEffectColor: Colors.transparent,\n            onTap: () => _showAllOptionsList(),\n            icon: AnimatedRotation(\n              duration: const Duration(milliseconds: 200),\n              turns: _showDropdown ? -0.5 : 0,\n              child: const Icon(MoonIcons.controls_chevron_down_16_light),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/dot_indicator.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass DotIndicator extends StatelessWidget {\n  const DotIndicator({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return const MoonDotIndicator(\n      dotCount: 4,\n      selectedDot: 2,\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/drawer.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Drawer extends StatelessWidget {\n  const Drawer({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return OverflowBox(\n      maxHeight: MediaQuery.of(context).size.height,\n      maxWidth: MediaQuery.of(context).size.width,\n      child: Scaffold(\n        drawer: MoonDrawer(\n          width: MediaQuery.of(context).size.width * 0.4,\n          child: const Align(\n            child: Text(\"MoonDrawer\"),\n          ),\n        ),\n        body: Builder(\n          builder: (BuildContext context) {\n            return Center(\n              child: MoonFilledButton(\n                onTap: () => Scaffold.of(context).openDrawer(),\n                label: const Text(\"Open MoonDrawer\"),\n              ),\n            );\n          },\n        ),\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/dropdown.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst String _groupId = \"dropdown\";\n\nenum Choices {\n  first,\n  second;\n\n  String get name {\n    return switch (this) {\n      Choices.first => \"Choice #1\",\n      Choices.second => \"Choice #2\",\n    };\n  }\n}\n\nclass Dropdown extends StatefulWidget {\n  const Dropdown({super.key});\n\n  @override\n  State<Dropdown> createState() => _DropdownState();\n}\n\nclass _DropdownState extends State<Dropdown> {\n  final Map<Choices, bool> _availableChoices = {\n    Choices.first: false,\n    Choices.second: false,\n  };\n\n  bool _showChoices = false;\n  bool _showMenu = false;\n  bool _showMenuInner = false;\n  Color? _buttonColor;\n  String _buttonName = \"Piccolo\";\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        // MoonDropdown with multiple choices.\n        MoonDropdown(\n          show: _showChoices,\n          constrainWidthToChild: true,\n          onTapOutside: () => setState(() => _showChoices = false),\n          content: Column(\n            children: List.generate(\n              2,\n              (int index) => MoonMenuItem(\n                absorbGestures: true,\n                onTap: () => setState(\n                  () => _availableChoices[Choices.values[index]] =\n                      !_availableChoices[Choices.values[index]]!,\n                ),\n                label: Text(Choices.values[index].name),\n                trailing: MoonCheckbox(\n                  value: _availableChoices[Choices.values[index]],\n                  tapAreaSizeValue: 0,\n                  onChanged: (_) {},\n                ),\n              ),\n            ),\n          ),\n          child: MoonTextInput(\n            width: 250,\n            readOnly: true,\n            canRequestFocus: false,\n            mouseCursor: MouseCursor.defer,\n            hintText: \"Choose an option\",\n            onTap: () => setState(() => _showChoices = !_showChoices),\n            leading: _availableChoices.values.any((element) => element == true)\n                ? Center(\n                    child: MoonTag(\n                      tagSize: MoonTagSize.xs,\n                      backgroundColor: context.moonColors!.bulma,\n                      onTap: () => setState(() => _availableChoices.updateAll((key, value) => false)),\n                      label: Text(\n                        \"${_availableChoices.values.where((element) => element == true).length}\",\n                        style: TextStyle(color: context.moonColors!.gohan),\n                      ),\n                      trailing: Icon(\n                        MoonIcons.controls_close_small_16_light,\n                        color: context.moonColors!.gohan,\n                      ),\n                    ),\n                  )\n                : null,\n            trailing: Center(\n              child: AnimatedRotation(\n                duration: const Duration(milliseconds: 200),\n                turns: _showChoices ? -0.5 : 0,\n                child: const Icon(MoonIcons.controls_chevron_down_small_16_light),\n              ),\n            ),\n          ),\n        ),\n\n        // MoonDropdown as a menu.\n        MoonDropdown(\n          show: _showMenu,\n          groupId: _groupId,\n          constrainWidthToChild: true,\n          onTapOutside: () => setState(() {\n            _showMenu = false;\n            _showMenuInner = false;\n          }),\n          content: Column(\n            children: [\n              MoonMenuItem(\n                onTap: () => setState(() {\n                  _showMenu = false;\n                  _buttonName = \"Piccolo\";\n                  _buttonColor = context.moonColors!.piccolo;\n                }),\n                label: const Text(\"Piccolo\"),\n              ),\n              MoonDropdown(\n                show: _showMenuInner,\n                groupId: _groupId,\n                constrainWidthToChild: true,\n                followerAnchor: Alignment.topLeft,\n                targetAnchor: Alignment.topRight,\n                offset: const Offset(8, 0),\n                content: Column(\n                  children: [\n                    MoonMenuItem(\n                      onTap: () => setState(() {\n                        _showMenu = false;\n                        _showMenuInner = false;\n                        _buttonName = \"Roshi\";\n                        _buttonColor = context.moonColors!.roshi;\n                      }),\n                      label: const Text(\"Roshi\"),\n                    ),\n                    MoonMenuItem(\n                      onTap: () => setState(() {\n                        _showMenu = false;\n                        _showMenuInner = false;\n                        _buttonName = \"Roshi60\";\n                        _buttonColor = context.moonColors!.roshi60;\n                      }),\n                      label: const Text(\"Roshi60\"),\n                    ),\n                    MoonMenuItem(\n                      onTap: () => setState(() {\n                        _showMenu = false;\n                        _showMenuInner = false;\n                        _buttonName = \"Roshi10\";\n                        _buttonColor = context.moonColors!.roshi10;\n                      }),\n                      label: const Text(\"Roshi10\"),\n                    ),\n                  ],\n                ),\n                child: MoonMenuItem(\n                  backgroundColor: _showMenuInner ? context.moonColors!.heles : null,\n                  onTap: () => setState(() => _showMenuInner = !_showMenuInner),\n                  label: const Text(\"Roshi\"),\n                  trailing: const Icon(\n                    MoonIcons.controls_chevron_right_16_light,\n                    size: 16,\n                  ),\n                ),\n              ),\n            ],\n          ),\n          child: MoonFilledButton(\n            width: 120,\n            backgroundColor: _buttonColor,\n            onTap: () => setState(() => _showMenu = !_showMenu),\n            label: Text(_buttonName),\n          ),\n        ),\n      ],\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/icons.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Icons extends StatelessWidget {\n  const Icons({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return const Icon(MoonIcons.other_frame_24_light);\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/linear_loader.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass LinearLoader extends StatelessWidget {\n  const LinearLoader({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return const MoonLinearLoader(\n      linearLoaderSize: MoonLinearLoaderSize.x4s,\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/linear_progress.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass LinearProgress extends StatelessWidget {\n  const LinearProgress({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return const MoonLinearProgress(\n      value: 0.75,\n      linearProgressSize: MoonLinearProgressSize.x4s,\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/menu_item.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass MenuItem extends StatefulWidget {\n  const MenuItem({super.key});\n\n  @override\n  State<MenuItem> createState() => _MenuItemState();\n}\n\nclass _MenuItemState extends State<MenuItem> {\n  @override\n  Widget build(BuildContext context) {\n    return MoonMenuItem(\n      onTap: () {},\n      label: const Text(\"Menu Item\"),\n      leading: const Icon(MoonIcons.notifications_activity_32_regular),\n      trailing: const Icon(MoonIcons.controls_chevron_right_24_light),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/modal.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Modal extends StatelessWidget {\n  const Modal({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    Future<void> modalBuilder(BuildContext context) {\n      return showMoonModal<void>(\n        context: context,\n        builder: (BuildContext context) {\n          return MoonModal(\n            child: SizedBox(\n              height: 150,\n              width: MediaQuery.of(context).size.width - 64,\n              child: const Center(\n                child: Text(\"This is MoonModal.\"),\n              ),\n            ),\n          );\n        },\n      );\n    }\n\n    return Center(\n      child: Builder(\n        builder: (BuildContext context) {\n          return MoonFilledButton(\n            label: const Text(\"Open MoonModal\"),\n            onTap: () => modalBuilder(context),\n          );\n        },\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/popover.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Popover extends StatefulWidget {\n  const Popover({super.key});\n\n  @override\n  State<Popover> createState() => _PopoverState();\n}\n\nclass _PopoverState extends State<Popover> {\n  bool show = false;\n\n  @override\n  Widget build(BuildContext context) {\n    return MoonPopover(\n      show: show,\n      onTapOutside: () => setState(() => show = false),\n      content: const Text('This is MoonPopover'),\n      child: MoonFilledButton(\n        onTap: () => setState(() => show = !show),\n        label: const Text(\"Show MoonPopover\"),\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/radio.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nenum RadioSelection { first, second }\n\nclass Radio extends StatefulWidget {\n  const Radio({super.key});\n\n  @override\n  State<Radio> createState() => _RadioState();\n}\n\nclass _RadioState extends State<Radio> {\n  RadioSelection? radioSelection = RadioSelection.first;\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        MoonRadio(\n          value: RadioSelection.first,\n          groupValue: radioSelection,\n          onChanged: (RadioSelection? selection) => setState(() => radioSelection = selection),\n        ),\n        MoonMenuItem(\n          absorbGestures: true,\n          onTap: () => setState(() => radioSelection = RadioSelection.second),\n          label: const Text(\"MoonRadio with label\"),\n          trailing: MoonRadio(\n            value: RadioSelection.second,\n            groupValue: radioSelection,\n            tapAreaSizeValue: 0,\n            onChanged: (_) {},\n          ),\n        ),\n      ],\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/search_with_dropdown.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nenum Options {\n  accordion,\n  alert,\n  bottomSheet,\n  button,\n  carousel,\n  chip,\n  dropdown,\n  menuItem,\n  tag,\n  tooltip;\n\n  String get name {\n    final String rawName = toString().split('.').last;\n    return rawName[0].toUpperCase() + rawName.substring(1);\n  }\n}\n\nclass SearchWithDropdown extends StatefulWidget {\n  const SearchWithDropdown({super.key});\n\n  @override\n  State<SearchWithDropdown> createState() => _SearchWithDropdownState();\n}\n\nclass _SearchWithDropdownState extends State<SearchWithDropdown> {\n  final TextEditingController _searchController = TextEditingController();\n  final List<Options> _optionsList = Options.values;\n\n  List<Options> _filteredOptionsList = [];\n  Options? _selectedOption;\n  bool _showDropdown = false;\n\n  bool get _optionIsSelected => _selectedOption?.name == _searchController.text;\n\n  String get _inputValue => _searchController.text.trim().toLowerCase();\n\n  void _performSearch() {\n    setState(() {\n      if (!_optionIsSelected && _selectedOption != null) _selectedOption = null;\n\n      _filteredOptionsList = \n          _optionsList.where((Options option) => option.name.toLowerCase().contains(_inputValue)).toList();\n      _showDropdown = true;\n    });\n  }\n\n  void _handleSelect(Options option) {\n    setState(() {\n      _showDropdown = false;\n      _searchController.text = option.name;\n      _selectedOption = option;\n      FocusManager.instance.primaryFocus?.unfocus();\n    });\n  }\n  \n  void _handleClearButton() {\n    setState(() {\n      _searchController.clear();\n      _filteredOptionsList = _optionsList;\n    });\n  }\n\n  void _handleDropdownTapOutside() {\n    setState(() {\n      _showDropdown = false;\n      if (!_optionIsSelected) _searchController.clear();\n      FocusManager.instance.primaryFocus?.unfocus();\n    });  \n  }\n  \n  @override\n  void dispose() {\n    _searchController.dispose();\n  \n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Center(\n      child: MoonDropdown(\n        show: _showDropdown,\n        distanceToTarget: 0,\n        constrainWidthToChild: true,\n        decoration: BoxDecoration(\n          color: context.moonColors!.goku,\n          borderRadius: const BorderRadius.vertical(bottom: Radius.circular(8.0)),\n          border: Border(\n            left: BorderSide(color: context.moonColors!.beerus),\n            right: BorderSide(color: context.moonColors!.beerus),\n            bottom: BorderSide(color: context.moonColors!.beerus),\n          ),\n        ),\n        onTapOutside: () => _handleDropdownTapOutside(),\n        content: ConstrainedBox(\n          constraints: const BoxConstraints(maxHeight: 200),\n          child: _filteredOptionsList.isEmpty\n              ? const MoonMenuItem(\n                  label: Text('No results found.'),\n                )\n              : ListView.builder(\n                  shrinkWrap: true,\n                  padding: EdgeInsets.zero,\n                  itemCount: _filteredOptionsList.length,\n                  itemBuilder: (BuildContext _, int index) {\n                    if (index >= _filteredOptionsList.length) return const SizedBox.shrink();\n                    final Options option = _filteredOptionsList[index];\n\n                    return MoonMenuItem(\n                      onTap: () => _handleSelect(option),\n                      label: Text(option.name),\n                    );\n                  },\n                ),\n        ),\n        child: MoonTextInput(\n          hintText: \"Search components\",\n          controller: _searchController,\n          borderRadius: _showDropdown ? const BorderRadius.vertical(top: Radius.circular(8)) : null,\n          // The onTap() and onChanged() properties are used instead of a listener to initiate search \n          // on every input tap. Listener only triggers on input change.          \n          onTap: () => _performSearch(),\n          onChanged: (String _) => _performSearch(),\n          leading: const Icon(MoonIcons.generic_search_24_light),\n          trailing: MoonButton(\n            padding: EdgeInsets.zero,\n            hoverEffectColor: Colors.transparent,\n            onTap: () => _handleClearButton(),\n            label: Text(\n              'Clear',\n              style: TextStyle(color: context.moonColors!.trunks),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/search_with_list.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nenum Options {\n  accordion,\n  alert,\n  bottomSheet,\n  button,\n  carousel,\n  chip,\n  dropdown,\n  menuItem,\n  tag,\n  tooltip;\n\n  String get name {\n    final String rawName = toString().split('.').last;\n    return rawName[0].toUpperCase() + rawName.substring(1);\n  }\n}\n\nclass SearchWithList extends StatefulWidget {\n  const SearchWithList({super.key});\n\n  @override\n  State<SearchWithList> createState() => _SearchWithListState();\n}\n\nclass _SearchWithListState extends State<SearchWithList> {\n  final TextEditingController _searchController = TextEditingController();\n  final List<Options> _optionsList = Options.values;\n\n  List<Options> _filteredOptionsList = [];\n  bool _showSearchResults = false;\n  \n  String get _inputValue => _searchController.text.trim().toLowerCase();\n\n  void _performSearch() {\n    setState(() {\n      _filteredOptionsList = \n          _optionsList.where((Options option) => option.name.toLowerCase().contains(_inputValue)).toList();\n      _showSearchResults = true;\n    });\n  }\n  \n  void _handleCloseButton() {\n    setState(() {\n      _searchController.clear();\n      _filteredOptionsList = _optionsList;\n      _showSearchResults = false;\n      FocusManager.instance.primaryFocus?.unfocus();\n    });\n  }\n  \n  @override\n  void dispose() {\n    _searchController.dispose();\n  \n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Stack(\n      children: [\n        Column(\n          children: [\n            MoonTextInput(\n              hintText: \"Search components\",\n              controller: _searchController,\n              // The onTap() and onChanged() properties are used instead of a listener to initiate search on every input tap.\n              // Listener only triggers on input change.\n              onTap: () => _performSearch(),\n              onChanged: (String _) => _performSearch(),\n              leading: const Icon(MoonIcons.generic_search_24_light),\n              trailing: MoonButton.icon(\n                buttonSize: MoonButtonSize.xs,\n                hoverEffectColor: Colors.transparent,\n                onTap: () => _handleCloseButton(),\n                icon: const Icon(MoonIcons.controls_close_16_light),\n              ),\n            ),\n            if (_showSearchResults && _filteredOptionsList.isNotEmpty)\n              Expanded(\n                child: ListView.builder(\n                  shrinkWrap: true,\n                  padding: const EdgeInsets.only(top: 8.0),\n                  itemCount: _filteredOptionsList.length,\n                  itemBuilder: (BuildContext _, int index) {\n                    if (index >= _filteredOptionsList.length) return const SizedBox.shrink();\n                    final Options option = _filteredOptionsList[index];\n  \n                    return MoonMenuItem(\n                      onTap: () => {},\n                      label: Text(option.name),\n                    );\n                  },\n                ),\n              ),\n          ],\n        ),\n        if (_showSearchResults && _filteredOptionsList.isEmpty)\n          const Align(\n            child: Text('No results found.'),\n          ),\n      ],\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/segmented_control.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass SegmentedControl extends StatelessWidget {\n  const SegmentedControl({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MoonSegmentedControl(\n      segmentedControlSize: MoonSegmentedControlSize.sm,\n      segments: List.generate(\n        3,\n        (int index) => Segment(\n          leading: const Icon(MoonIcons.other_frame_24_light),\n          label: Text('Tab${index + 1}'),\n          trailing: const Icon(MoonIcons.other_frame_24_light),\n        ),\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/switch.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Switch extends StatefulWidget {\n  const Switch({super.key});\n\n  @override\n  State<Switch> createState() => _SwitchState();\n}\n\nclass _SwitchState extends State<Switch> {\n  bool switchValue = false;\n\n  @override\n  Widget build(BuildContext context) {\n    return MoonSwitch(\n      value: switchValue,\n      switchSize: MoonSwitchSize.sm,\n      onChanged: (bool newValue) => setState(() => switchValue = newValue),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/tab_bar.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass TabBar extends StatefulWidget {\n  const TabBar({super.key});\n\n  @override\n  State<TabBar> createState() => _TabBarState();\n}\n\nclass _TabBarState extends State<TabBar> with SingleTickerProviderStateMixin {\n  late TabController _tabController;\n\n  @override\n  void initState() {\n    super.initState();\n\n    _tabController = TabController(length: 3, vsync: this);\n  }\n  \n  @override\n  void dispose() {\n    _tabController.dispose();\n  \n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        MoonTabBar(\n          tabBarSize: MoonTabBarSize.sm,\n          tabs: List.generate(\n            3,\n            (int index) => MoonTab(\n              leading: const Icon(MoonIcons.other_frame_24_light),\n              label: Text('Tab${index + 1}'),\n              trailing: const Icon(MoonIcons.other_frame_24_light),\n            ),\n          ),\n        ),\n        MoonTabBar.pill(\n          tabBarSize: MoonTabBarSize.sm,\n          pillTabs: List.generate(\n            3,\n            (int index) => MoonPillTab(\n              leading: const Icon(MoonIcons.other_frame_24_light),\n              label: Text('Tab${index + 1}'),\n              trailing: const Icon(MoonIcons.other_frame_24_light),\n            ),\n          ),\n        ),\n\n        // MoonTabBar with TabBarView.\n        MoonTabBar(\n          isExpanded: true,\n          tabController: _tabController,\n          tabs: List.generate(\n            3,\n            (int index) => MoonTab(\n              label: Text('Tab${index + 1}'),\n            ),\n          ),\n        ),\n        SizedBox(\n          height: 112,\n          child: TabBarView(\n            controller: _tabController,\n            children: [\n              Container(\n                color: context.moonColors!.whis60,\n                padding: const EdgeInsets.all(16),\n                child: Stack(\n                  children: [\n                    const Align(\n                      child: Text('Tab1'),\n                    ),\n                    Align(\n                      alignment: Alignment.centerRight,\n                      child: MoonButton.icon(\n                        onTap: () => _tabController.animateTo(1),\n                        icon: const Icon(MoonIcons.controls_chevron_right_24_light),\n                      ),                    \n                    ),\n                  ],\n                ),\n              ),\n              Container(\n                color: context.moonColors!.frieza60,\n                padding: const EdgeInsets.all(16),\n                child: Row(\n                  mainAxisAlignment: MainAxisAlignment.spaceBetween,\n                  children: [\n                    MoonButton.icon(\n                      onTap: () => _tabController.animateTo(0),\n                      icon: const Icon(MoonIcons.controls_chevron_left_24_light),\n                    ),                    \n                    const Text('Tab2'),\n                    MoonButton.icon(\n                      onTap: () => _tabController.animateTo(2),\n                      icon: const Icon(MoonIcons.controls_chevron_right_24_light),\n                    ),                  \n                  ],\n                ),\n              ),\n              Container(\n                color: context.moonColors!.whis60,\n                padding: const EdgeInsets.all(16),\n                child: Stack(\n                  children: [\n                    const Align(\n                      child: Text('Tab3'),\n                    ),\n                    Align(\n                      alignment: Alignment.centerLeft,\n                      child: MoonButton.icon(\n                        onTap: () => _tabController.animateTo(1),\n                        icon: const Icon(\n                          MoonIcons.controls_chevron_left_24_light,\n                        ),\n                      ),\n                    ),\n                  ],\n                ),\n              ),\n            ],\n          ),\n        ),\n      ],\n    );\n  }\n}\n"
  },
  {
    "path": "example/assets/code_snippets/table.md",
    "content": "import 'dart:math';\n\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst int _rowsCount = 50;\n\nclass Table extends StatefulWidget {\n  const Table({super.key});\n\n  @override\n  State<Table> createState() => _TableState();\n}\n\nclass _TableState extends State<Table> {\n  late List<_TableData> _tableData;\n\n  final List<String> _columnNames = ['ID', 'First name', 'Last name', 'Age', 'Activity'];\n  final List<bool> _columnSorting = List.generate(5, (int _) => true);\n\n  bool _sortAscending = true;\n  int _sortColumnIndex = 0;\n\n  List<_TableData> _generateTableData() {\n    return List<_TableData>.generate(\n      _rowsCount,\n      (int index) => _TableData(\n        id: index,\n        selected: false,\n        firstName: 'Test$index',\n        lastName: 'Subject$index',\n        age: Random().nextInt(81),\n        activity: Random().nextInt(100),\n      ),\n    );\n  }\n\n  void _onSort(int columnIndex, bool sortAscending) {\n    if (_sortColumnIndex == columnIndex || _sortAscending != sortAscending) {\n      setState(() {\n        if (columnIndex == _sortColumnIndex) {\n          _sortAscending = _columnSorting[columnIndex] = sortAscending;\n        } else {\n          _sortColumnIndex = columnIndex;\n          _sortAscending = _columnSorting[columnIndex];\n        }\n\n        switch (columnIndex) {\n          case 0: _tableData.sort((a, b) => a.id.compareTo(b.id));\n          case 1: _tableData.sort((a, b) => a.firstName.compareTo(b.firstName));\n          case 2: _tableData.sort((a, b) => a.lastName.compareTo(b.lastName));\n          case 3: _tableData.sort((a, b) => a.age.compareTo(b.age));\n          case 4: _tableData.sort((a, b) => a.activity.compareTo(b.activity));\n        }\n\n        if (!_sortAscending) _tableData = _tableData.reversed.toList();\n      });\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _tableData = _generateTableData();\n  }\n\n  MoonTableHeader _generateTableHeader() {\n    return MoonTableHeader(\n      columns: List.generate(\n        5,\n        (int index) => MoonTableColumn(\n          onSort: (int columnIndex, bool sortAscending) => _onSort(columnIndex, sortAscending),\n          cell: Text(_columnNames[index]),\n        ),\n      ),\n    );\n  }\n\n  List<MoonTableRow> _generateTableRows() {\n    return List.generate(\n      _rowsCount,\n      (int index) => MoonTableRow(\n        cells: [\n          Text(_tableData[index].id.toString()),\n          Text(_tableData[index].firstName),\n          Text(_tableData[index].lastName),\n          Text(_tableData[index].age.toString()),\n          Text(_tableData[index].activity.toString()),\n        ],\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return OverflowBox(\n      maxWidth: MediaQuery.of(context).size.width,\n      child: MoonTable(\n        columnsCount: 5,\n        width: 564,\n        rowSize: MoonTableRowSize.sm,\n        tablePadding: const EdgeInsets.symmetric(horizontal: 16),\n        sortAscending: _sortAscending,\n        sortColumnIndex: _sortColumnIndex,\n        header: _generateTableHeader(),\n        rows: _generateTableRows(),\n      ),\n    );\n  }\n}\n\nclass _TableData {\n  bool selected;\n  int age;\n  int activity;\n  int id;\n  String firstName;\n  String lastName;\n\n  _TableData({\n    required this.selected,\n    required this.age,\n    required this.activity,\n    required this.id,\n    required this.firstName,\n    required this.lastName,\n  });\n}\n"
  },
  {
    "path": "example/assets/code_snippets/tag.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Tag extends StatelessWidget {\n  const Tag({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MoonTag(\n      tagSize: MoonTagSize.sm,\n      onTap: () {},\n      leading: const Icon(MoonIcons.controls_close_small_16_light),\n      label: const Text('This is MoonTag'),\n      trailing: const Icon(MoonIcons.controls_close_small_16_light),\n    );\n  }\n}\n"
  },
  {
    "path": "example/assets/code_snippets/text_area.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass TextArea extends StatelessWidget {\n  const TextArea({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Form(\n      child: Builder(\n        builder: (BuildContext context) {\n          return Column(\n            children: [\n              MoonTextArea(\n                height: 200,\n                validator: (String? value) => value?.length != null && value!.length < 5 \n                  ? \"The text should be longer than 5 characters.\" \n                  : null,\n              ),\n              MoonFilledButton(\n                onTap: () => Form.of(context).validate(),\n                label: const Text(\"Submit\"),\n              ),\n            ],\n          );\n        },\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/text_input.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass TextInput extends StatefulWidget {\n  const TextInput({super.key});\n\n  @override\n  State<TextInput> createState() => _TextInputState();\n}\n\nclass _TextInputState extends State<TextInput> {\n  final TextEditingController _textController = TextEditingController();\n\n  @override\n  Widget build(BuildContext context) {\n    return Form(\n      child: Builder(\n        builder: (BuildContext context) {\n          return Column(\n            children: [\n              MoonFormTextInput(\n                controller: _textController,\n                validator: (String? value) => value != null && value.length < 5 \n                  ? \"The text should be longer than 5 characters.\" \n                  : null,\n                onTap: () => _textController.clear(),\n                leading: const Icon(MoonIcons.generic_search_24_light),\n                trailing: GestureDetector(\n                  child: const Icon(MoonIcons.controls_close_small_24_light),\n                ),\n              ),\n              MoonFilledButton(\n                onTap: () => Form.of(context).validate(),\n                label: const Text(\"Submit\"),\n              ),\n            ],\n          );\n        },\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/text_input_group.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass TextInputGroup extends StatefulWidget {\n  const TextInputGroup({super.key});\n\n  @override\n  State<TextInputGroup> createState() => _TextInputGroupState();\n}\n\nclass _TextInputGroupState extends State<TextInputGroup> {\n  final TextEditingController _textController = TextEditingController();\n  final TextEditingController _passwordController = TextEditingController();\n\n  bool _hidePassword = true;\n\n  @override\n  Widget build(BuildContext context) {\n    return Form(\n      child: Builder(\n        builder: (context) {\n          return Column(\n            children: [\n              MoonTextInputGroup(\n                children: [\n                  MoonFormTextInput(\n                    textInputSize: MoonTextInputSize.xl,\n                    controller: _textController,\n                    validator: (String? value) => value?.length != null && value!.length < 5\n                      ? \"The text should be longer than 5 characters.\"\n                      : null,\n                    leading: const Icon(MoonIcons.generic_search_24_light),\n                    trailing: GestureDetector(\n                      onTap: () => _textController.clear(),\n                      child: const Icon(MoonIcons.controls_close_small_24_light),\n                    ),\n                  ),\n                  MoonFormTextInput(\n                    textInputSize: MoonTextInputSize.xl,\n                    obscureText: _hidePassword,\n                    controller: _passwordController,\n                    validator: (String? value) => value != \"123\" ? \"Wrong password.\" : null,\n                    leading: const Icon(MoonIcons.security_password_24_light),\n                    trailing: GestureDetector(\n                      onTap: () => setState(() => _hidePassword = !_hidePassword),\n                      child: Align(\n                        child: Text(_hidePassword ? \"Show\" : \"Hide\"),\n                      ),\n                    ),\n                  ),\n                ],\n              ),\n              MoonFilledButton(\n                onTap: () => Form.of(context).validate(),\n                label: const Text(\"Submit\"),\n              ),\n            ],\n          );\n        },\n      ),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/toast.md",
    "content": "import 'package:flutter/material.dart'; \nimport 'package:moon_design/moon_design.dart';\n\nclass Toast extends StatelessWidget { \n  const Toast({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MoonFilledButton(\n      onTap: () => MoonToast.show(\n        context,\n        label: const Text('This is MoonToast'),\n      ),\n      label: const Text(\"Show MoonToast\"),\n    );\n  }\n}"
  },
  {
    "path": "example/assets/code_snippets/tooltip.md",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass Tooltip extends StatefulWidget {\n  const Tooltip({super.key});\n\n  @override\n  State<Tooltip> createState() => _TooltipState();\n}\n\nclass _TooltipState extends State<Tooltip> {\n  bool showOnTap = false;\n\n  @override\n  Widget build(BuildContext context) {\n    return MoonTooltip(\n      show: showOnTap,\n      content: const Text('This is MoonTooltip'),\n      child: MoonFilledButton(\n        buttonSize: MoonButtonSize.sm,\n        onTap: () => setState(() => showOnTap = true),\n        label: const Text(\"Show MoonTooltip\"),\n      ),\n    );\n  }\n}"
  },
  {
    "path": "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": "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": "example/ios/Flutter/Debug.xcconfig",
    "content": "#include? \"Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"\n#include \"Generated.xcconfig\"\n"
  },
  {
    "path": "example/ios/Flutter/Release.xcconfig",
    "content": "#include? \"Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"\n#include \"Generated.xcconfig\"\n"
  },
  {
    "path": "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": "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": "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": "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": "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": "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": "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": "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": "example/ios/Runner/Runner-Bridging-Header.h",
    "content": "#import \"GeneratedPluginRegistrant.h\"\n"
  },
  {
    "path": "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\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\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\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\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);\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\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\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\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": "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": "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": "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": "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": "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</Workspace>\n"
  },
  {
    "path": "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": "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": "example/lib/main.dart",
    "content": "import 'package:example/src/storybook/storybook.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:flutter_web_plugins/url_strategy.dart';\nimport 'package:moon_design/moon_design.dart';\n\nvoid main() async {\n  usePathUrlStrategy();\n\n  WidgetsFlutterBinding.ensureInitialized();\n\n  await SystemChrome.setPreferredOrientations(\n    [DeviceOrientation.portraitUp],\n  );\n\n  runApp(const MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  bool get _isInStorybookMode => true;\n\n  @override\n  Widget build(BuildContext context) {\n    return _isInStorybookMode\n        ? const StorybookPage()\n        : MaterialApp(\n            theme: ThemeData.light().copyWith(\n              extensions: <ThemeExtension<dynamic>>[\n                MoonTheme(tokens: MoonTokens.light),\n              ],\n            ),\n            darkTheme: ThemeData.dark().copyWith(\n              extensions: <ThemeExtension<dynamic>>[\n                MoonTheme(tokens: MoonTokens.dark),\n              ],\n            ),\n            home: Scaffold(\n              body: Center(\n                child: Text(\n                  \"Moon Design for Flutter\",\n                  style: TextStyle(\n                    fontSize: MediaQuery.of(context).size.width > 800 ? 72 : 32,\n                  ),\n                ),\n              ),\n            ),\n          );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/color_options.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nenum MoonColor {\n  piccolo,\n  hit,\n  beerus,\n  goku,\n  gohan,\n  bulma,\n  trunks,\n  goten,\n  popo,\n  jiren,\n  heles,\n  zeno,\n  krillin,\n  krillin60,\n  krillin10,\n  chichi,\n  chichi60,\n  chichi10,\n  roshi,\n  roshi60,\n  roshi10,\n  frieza,\n  frieza60,\n  frieza10,\n  dodoria,\n  dodoria60,\n  dodoria10,\n  cell,\n  cell60,\n  cell10,\n  raditz,\n  raditz60,\n  raditz10,\n  nappa,\n  nappa60,\n  nappa10,\n  whis,\n  whis60,\n  whis10,\n}\n\nList<MoonColor> mainColorsList = [\n  MoonColor.piccolo,\n  MoonColor.hit,\n  MoonColor.beerus,\n  MoonColor.goku,\n  MoonColor.gohan,\n  MoonColor.bulma,\n  MoonColor.trunks,\n  MoonColor.goten,\n  MoonColor.popo,\n  MoonColor.jiren,\n  MoonColor.heles,\n  MoonColor.zeno,\n];\n\nList<MoonColor> supportiveColorsList = [\n  MoonColor.krillin,\n  MoonColor.krillin60,\n  MoonColor.krillin10,\n  MoonColor.chichi,\n  MoonColor.chichi60,\n  MoonColor.chichi10,\n  MoonColor.roshi,\n  MoonColor.roshi60,\n  MoonColor.roshi10,\n  MoonColor.cell,\n  MoonColor.cell60,\n  MoonColor.cell10,\n  MoonColor.dodoria,\n  MoonColor.dodoria60,\n  MoonColor.dodoria10,\n  MoonColor.frieza,\n  MoonColor.frieza60,\n  MoonColor.frieza10,\n  MoonColor.nappa,\n  MoonColor.nappa60,\n  MoonColor.nappa10,\n  MoonColor.raditz,\n  MoonColor.raditz60,\n  MoonColor.raditz10,\n  MoonColor.whis,\n  MoonColor.whis60,\n  MoonColor.whis10,\n];\n\nColor getColor(BuildContext context, MoonColor color) => switch (color) {\n      MoonColor.piccolo => context.moonColors!.piccolo,\n      MoonColor.hit => context.moonColors!.hit,\n      MoonColor.beerus => context.moonColors!.beerus,\n      MoonColor.goku => context.moonColors!.goku,\n      MoonColor.gohan => context.moonColors!.gohan,\n      MoonColor.bulma => context.moonColors!.bulma,\n      MoonColor.trunks => context.moonColors!.trunks,\n      MoonColor.goten => context.moonColors!.goten,\n      MoonColor.popo => context.moonColors!.popo,\n      MoonColor.jiren => context.moonColors!.jiren,\n      MoonColor.heles => context.moonColors!.heles,\n      MoonColor.zeno => context.moonColors!.zeno,\n      MoonColor.krillin => context.moonColors!.krillin,\n      MoonColor.krillin60 => context.moonColors!.krillin60,\n      MoonColor.krillin10 => context.moonColors!.krillin10,\n      MoonColor.chichi => context.moonColors!.chichi,\n      MoonColor.chichi60 => context.moonColors!.chichi60,\n      MoonColor.chichi10 => context.moonColors!.chichi10,\n      MoonColor.roshi => context.moonColors!.roshi,\n      MoonColor.roshi60 => context.moonColors!.roshi60,\n      MoonColor.roshi10 => context.moonColors!.roshi10,\n      MoonColor.frieza => context.moonColors!.frieza,\n      MoonColor.frieza60 => context.moonColors!.frieza60,\n      MoonColor.frieza10 => context.moonColors!.frieza10,\n      MoonColor.dodoria => context.moonColors!.dodoria,\n      MoonColor.dodoria60 => context.moonColors!.dodoria60,\n      MoonColor.dodoria10 => context.moonColors!.dodoria10,\n      MoonColor.cell => context.moonColors!.cell,\n      MoonColor.cell60 => context.moonColors!.cell60,\n      MoonColor.cell10 => context.moonColors!.cell10,\n      MoonColor.raditz => context.moonColors!.raditz,\n      MoonColor.raditz60 => context.moonColors!.raditz60,\n      MoonColor.raditz10 => context.moonColors!.raditz10,\n      MoonColor.nappa => context.moonColors!.nappa,\n      MoonColor.nappa60 => context.moonColors!.nappa60,\n      MoonColor.nappa10 => context.moonColors!.nappa10,\n      MoonColor.whis => context.moonColors!.whis,\n      MoonColor.whis60 => context.moonColors!.whis60,\n      MoonColor.whis10 => context.moonColors!.whis10,\n    };\n\n/// The index of the color options.\nList<Option<int>> colorOptions = [\n  ...MoonColor.values.map(\n    (MoonColor color) => Option(label: color.name, value: color.index),\n  ),\n  Option(label: 'transparent', value: MoonColor.values.length),\n];\n\n// The combination of \"indexes\" and colors in the colorTable() look-up table\n// (LUT) is designed to circumvent the issue of a stale closure that would\n// occur with the knob otherwise.\n\n/// The look-up table for the color options.\nList<Color?> colorTable(BuildContext context) => [\n      ...MoonColor.values.map((MoonColor color) => getColor(context, color)),\n      Colors.transparent,\n      null,\n    ];\n"
  },
  {
    "path": "example/lib/src/storybook/common/colors_page_options.dart",
    "content": "enum ColorsPageSection {\n  header,\n  mainColors,\n  supportiveColors;\n\n  String get titleText => switch (this) {\n        header => 'Colors',\n        mainColors => 'Main colors',\n        supportiveColors => 'Supportive colors',\n      };\n\n  String get bodyText => switch (this) {\n        header =>\n          'Moon Design System is decentralized and intended to support multiple '\n              'products. The use of different-color naming conventions and '\n              'numbers makes maintenance more difficult. We decided to give '\n              'each of our colors a distinct name, adopting the Dragon Ball Z '\n              'approach. Each color name is assigned for a specific purpose, '\n              'and the values vary according to the product. Please do not use '\n              'hex values; they will not change if you need theme support.',\n        mainColors =>\n          'The main colors serve a specific purpose. piccolo and hit are used '\n              'for accent colors; beerus for borders and lines; goku and gohan '\n              'for backgrounds; bulma and trunks for text and icons; goten and '\n              'popo for forced theme-less colors; and jiren, heles, and zeno '\n              'for semi-transparent overlays.',\n        supportiveColors =>\n          'Every HEX color in all supportive colors is represented by three '\n              'shades. The difference between shades is in their transparency '\n              'levels. Some colors may have a semantic purpose. krillin is '\n              'usually used for warnings, chichi for errors, and roshi for '\n              'success colors. Other colors are used for variety of secondary '\n              'reasons.'\n      };\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/component_options.dart",
    "content": "import 'package:example/src/storybook/stories/composites/combobox_single_select.dart';\nimport 'package:example/src/storybook/stories/composites/search_with_list.dart';\nimport 'package:example/src/storybook/stories/primitives/accordion.dart';\nimport 'package:example/src/storybook/stories/primitives/alert.dart';\nimport 'package:example/src/storybook/stories/primitives/auth_code.dart';\nimport 'package:example/src/storybook/stories/primitives/avatar.dart';\nimport 'package:example/src/storybook/stories/primitives/bottom_sheet.dart';\nimport 'package:example/src/storybook/stories/primitives/breadcrumb.dart';\nimport 'package:example/src/storybook/stories/primitives/button.dart';\nimport 'package:example/src/storybook/stories/primitives/carousel.dart';\nimport 'package:example/src/storybook/stories/primitives/checkbox.dart';\nimport 'package:example/src/storybook/stories/primitives/chip.dart';\nimport 'package:example/src/storybook/stories/primitives/circular_loader.dart';\nimport 'package:example/src/storybook/stories/primitives/circular_progress.dart';\nimport 'package:example/src/storybook/stories/primitives/dot_indicator.dart';\nimport 'package:example/src/storybook/stories/primitives/drawer.dart';\nimport 'package:example/src/storybook/stories/primitives/dropdown.dart';\nimport 'package:example/src/storybook/stories/primitives/icons.dart';\nimport 'package:example/src/storybook/stories/primitives/linear_loader.dart';\nimport 'package:example/src/storybook/stories/primitives/linear_progress.dart';\nimport 'package:example/src/storybook/stories/primitives/menu_item.dart';\nimport 'package:example/src/storybook/stories/primitives/modal.dart';\nimport 'package:example/src/storybook/stories/primitives/popover.dart';\nimport 'package:example/src/storybook/stories/primitives/radio.dart';\nimport 'package:example/src/storybook/stories/primitives/segmented_control.dart';\nimport 'package:example/src/storybook/stories/primitives/switch.dart';\nimport 'package:example/src/storybook/stories/primitives/tab_bar.dart';\nimport 'package:example/src/storybook/stories/primitives/table.dart';\nimport 'package:example/src/storybook/stories/primitives/tag.dart';\nimport 'package:example/src/storybook/stories/primitives/text_area.dart';\nimport 'package:example/src/storybook/stories/primitives/text_input.dart';\nimport 'package:example/src/storybook/stories/primitives/text_input_group.dart';\nimport 'package:example/src/storybook/stories/primitives/toast.dart';\nimport 'package:example/src/storybook/stories/primitives/tooltip.dart';\n\nenum Component {\n  accordion,\n  alert,\n  authCode,\n  avatar,\n  bottomSheet,\n  breadcrumb,\n  button,\n  carousel,\n  checkbox,\n  chip,\n  circularLoader,\n  circularProgress,\n  combobox,\n  dotIndicator,\n  drawer,\n  dropdown,\n  icons,\n  linearLoader,\n  linearProgress,\n  menuItem,\n  modal,\n  popover,\n  radio,\n  search,\n  segmentedControl,\n  switchX,\n  tabBar,\n  table,\n  tag,\n  textArea,\n  textInput,\n  textInputGroup,\n  toast,\n  tooltip;\n\n  String get name {\n    String rawName = toString().split('.').last;\n    if (this == switchX) rawName = rawName.substring(0, rawName.length - 1);\n\n    return rawName[0].toUpperCase() + rawName.substring(1);\n  }\n\n  String get description => switch (this) {\n        accordion =>\n          \"Accordion is a clickable list that toggles detailed content on header tap.\",\n        alert =>\n          \"Alert is a way of informing a user of important changes in a prominent way.\",\n        authCode =>\n          \"One-time password (OTP) is a unique code generated for secure logins.\",\n        avatar =>\n          \"Avatars typically display images, icons, or initials for people or entities.\",\n        bottomSheet =>\n          \"Bottom sheet is a modified dialog that slides from the bottom of the screen.\",\n        breadcrumb =>\n          \"A list of links indicating the current location in the navigation hierarchy.\",\n        button =>\n          \"Buttons communicate actions that users can take with a single tap.\",\n        carousel =>\n          \"Carousel displays multiple images or content in a swipeable format.\",\n        checkbox =>\n          \"Checkbox allows to select multiple options from a limited set of choices.\",\n        chip =>\n          \"Chip is used to filter or trigger actions in a clickable format.\",\n        circularLoader =>\n          \"Loaders provide visual feedback for in-progress tasks.\",\n        circularProgress =>\n          \"Progress indicator visually tracks a user’s progress through a set of steps.\",\n        combobox =>\n          \"Combination of dropdown and free text input for filtering options.\",\n        dotIndicator =>\n          'Dot indicator visually tracks a user’s position in a series of items or pages.',\n        drawer =>\n          'Drawer is a panel that slides out from the edge of the screen.',\n        dropdown =>\n          \"Dropdown list allows users to choose one value from a menu by clicking.\",\n        icons =>\n          'Commonly used interface icons provided by Moon Design System.',\n        linearLoader =>\n          \"Loaders provide visual feedback for in-progress tasks.\",\n        linearProgress =>\n          \"Progress indicator visually tracks a user’s progress through a set of steps.\",\n        menuItem =>\n          \"Menu item is a selectable option within a menu or container.\",\n        modal =>\n          \"Modal appears above content, requiring user interaction before returning.\",\n        popover =>\n          \"Popover displays additional content or actions in response to user input.\",\n        radio =>\n          'Radio buttons represent a group of choices with single selection.',\n        search =>\n          'Search allows users to input a word or phrase to find relevant content.',\n        segmentedControl =>\n          'Segmented control lets user choose from multiple options displayed in segments.',\n        switchX => 'Switch is a control used to toggle between two states.',\n        tabBar =>\n          'Tabs allow users to navigate easily between views within the same context.',\n        table =>\n          'Table is used to display large amounts of data in rows and columns.',\n        tag =>\n          \"Tags are interactive keywords used to organize and categorize objects.\",\n        textArea => 'A form control for entering and editing multi-line text.',\n        textInput => 'Text input fields allow users to enter text.',\n        textInputGroup =>\n          'Combine different types of inputs into groups to save vertical space on designs.',\n        toast =>\n          \"Toast provides brief feedback message without interrupting the interface.\",\n        tooltip => 'Tooltip displays additional information about an element.',\n      };\n\n  String get urlPath => switch (this) {\n        accordion => AccordionStory.path,\n        alert => AlertStory.path,\n        authCode => AuthCodeStory.path,\n        avatar => AvatarStory.path,\n        bottomSheet => BottomSheetStory.path,\n        button => ButtonStory.path,\n        breadcrumb => BreadcrumbStory.path,\n        carousel => CarouselStory.path,\n        checkbox => CheckboxStory.path,\n        chip => ChipStory.path,\n        circularLoader => CircularLoaderStory.path,\n        circularProgress => CircularProgressStory.path,\n        combobox => ComboboxSingleSelectStory.path,\n        dotIndicator => DotIndicatorStory.path,\n        drawer => DrawerStory.path,\n        dropdown => DropdownStory.path,\n        icons => IconsStory.path,\n        linearLoader => LinearLoaderStory.path,\n        linearProgress => LinearProgressStory.path,\n        menuItem => MenuItemStory.path,\n        modal => ModalStory.path,\n        popover => PopoverStory.path,\n        radio => RadioStory.path,\n        search => SearchWithListStory.path,\n        segmentedControl => SegmentedControlStory.path,\n        switchX => SwitchStory.path,\n        tabBar => TabBarStory.path,\n        table => TableStory.path,\n        tag => TagStory.path,\n        textArea => TextAreaStory.path,\n        textInput => TextInputStory.path,\n        textInputGroup => TextInputGroupStory.path,\n        toast => ToastStory.path,\n        tooltip => TooltipStory.path,\n      };\n\n  String get imagePath {\n    final name = toString().split('.').last;\n\n    final formattedName = this == switchX\n        ? 'switch'\n        : name.replaceAllMapped(\n            RegExp('[A-Z]'),\n            (Match match) => '_${match.group(0)!.toLowerCase()}',\n          );\n\n    return 'assets/components/$formattedName.png';\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/constants.dart",
    "content": "// Layout constants.\nconst double extraSmallScreenWidth = 385;\nconst double smallScreenWidth = 576;\nconst double mediumScreenWidth = 768;\nconst double largeScreenWidth = 1600;\n\nconst double storybookAutoLayoutThreshold = 1024;\n"
  },
  {
    "path": "example/lib/src/storybook/common/home_page_options.dart",
    "content": "enum HomePageContentType {\n  headerTitle,\n  headerSubtitle,\n  bodyTitle;\n\n  String get text => switch (this) {\n        headerTitle => 'Moon Design System',\n        headerSubtitle => 'Moon is Yolo Group product design system that helps'\n            ' us maintain the integrity of their user experience and optimize '\n            'design and development resources.',\n        bodyTitle => 'Accelerate your mobile development journey with Flutter '\n            'moon components.',\n      };\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/methods/navigation.dart",
    "content": "import 'package:url_launcher/url_launcher.dart';\n\nFuture<void> launchURL(String url) async {\n  final Uri uri = Uri.parse(url);\n\n  if (await canLaunchUrl(uri)) {\n    await launchUrl(uri, webOnlyWindowName: '_blank');\n  } else {\n    throw 'Could not launch $uri';\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/pages/colors_page.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/colors_page_options.dart';\nimport 'package:example/src/storybook/common/constants.dart';\nimport 'package:example/src/storybook/common/widgets/page_footer.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_svg/svg.dart';\nimport 'package:moon_design/moon_design.dart';\n\ntypedef ItemsPerRow = int Function(int);\n\nclass ColorsPage extends StatelessWidget {\n  static const path = '/colors';\n\n  const ColorsPage({super.key});\n\n  static const int _defaultColorContainersInRow = 3;\n  static const double _colorContainerSizeValue = 128.0;\n  static const double _colorContainerGap = 24.0;\n\n  Widget _buildMainColorsSection(BuildContext context) {\n    return _buildColorsSection(\n      context: context,\n      rows: 6,\n      itemsPerRow: (int rowIndex) => switch (rowIndex) {\n        1 => 1,\n        5 => _defaultColorContainersInRow,\n        _ => 2,\n      },\n      section: ColorsPageSection.mainColors,\n      colors: mainColorsList,\n    );\n  }\n\n  Widget _buildSupportiveColorsSection(BuildContext context) {\n    return _buildColorsSection(\n      context: context,\n      rows: 9,\n      itemsPerRow: (int _) => _defaultColorContainersInRow,\n      section: ColorsPageSection.supportiveColors,\n      colors: supportiveColorsList,\n    );\n  }\n\n  double _getFooterWidth(BuildContext context) {\n    return MediaQuery.of(context).size.width < storybookAutoLayoutThreshold\n        ? mediumScreenWidth\n        : _colorContainerSizeValue * _defaultColorContainersInRow +\n            (_defaultColorContainersInRow - 1) * _colorContainerGap;\n  }\n\n  int _getColorIndex(int rowIndex, int childIndex, ItemsPerRow getItemsPerRow) {\n    int colorIndex = 0;\n\n    for (int i = 0; i < rowIndex; i++) {\n      colorIndex += getItemsPerRow(i);\n    }\n\n    return colorIndex + childIndex;\n  }\n\n  Widget _highlightedBodyText(BuildContext context, String text) {\n    if (text.isEmpty) return const Text('');\n\n    final TextStyle textStyle = context.moonTypography!.body.text16;\n\n    final String pattern =\n        MoonColor.values.map((color) => color.name).toList().join('|');\n    final regex = RegExp(pattern, caseSensitive: false);\n\n    final List<InlineSpan> spans = <InlineSpan>[];\n    int start = 0;\n\n    for (final match in regex.allMatches(text)) {\n      if (start == match.start) continue;\n\n      spans.addAll([\n        TextSpan(\n          text: text.substring(start, match.start),\n          style: textStyle,\n        ),\n        WidgetSpan(\n          alignment: PlaceholderAlignment.baseline,\n          baseline: TextBaseline.alphabetic,\n          child: Container(\n            padding: const EdgeInsets.symmetric(horizontal: 6.0),\n            decoration: BoxDecoration(\n              color: context.moonColors!.gohan,\n              border: Border.all(\n                color: context.moonColors!.goten,\n                width: 0,\n              ),\n              borderRadius: BorderRadius.circular(4.0),\n            ),\n            child: Text(\n              match.group(0)!,\n              style: textStyle,\n            ),\n          ),\n        ),\n      ]);\n\n      start = match.end;\n    }\n\n    spans.add(\n      TextSpan(\n        text: text.substring(start),\n        style: textStyle,\n      ),\n    );\n\n    return Text.rich(\n      TextSpan(\n        style: textStyle,\n        children: spans,\n      ),\n    );\n  }\n\n  Widget _buildSectionHeader(BuildContext context, ColorsPageSection section) {\n    final bool isHeader = section == ColorsPageSection.header;\n    final bool showLogo =\n        MediaQuery.of(context).size.width < storybookAutoLayoutThreshold;\n\n    return Column(\n      crossAxisAlignment: CrossAxisAlignment.start,\n      children: [\n        if (isHeader && showLogo)\n          Padding(\n            padding: const EdgeInsets.only(left: 12.0, bottom: 24.0),\n            child: SvgPicture.asset(\n              'assets/svg/moon-logo-long.svg',\n              height: 16.0,\n            ),\n          ),\n        Text(\n          section.titleText,\n          style: isHeader\n              ? context.moonTypography!.heading.text40\n              : context.moonTypography!.heading.text24,\n        ),\n        const SizedBox(height: 24),\n        _highlightedBodyText(context, section.bodyText),\n        const SizedBox(height: 24),\n      ],\n    );\n  }\n\n  Widget _buildColorsSection({\n    required BuildContext context,\n    required int rows,\n    required ItemsPerRow itemsPerRow,\n    required ColorsPageSection section,\n    required List<MoonColor> colors,\n  }) {\n    return ListView.builder(\n      shrinkWrap: true,\n      itemCount: rows * 2 - 1,\n      itemBuilder: (BuildContext context, int rowIndex) {\n        final int derivedRowIndex = rowIndex ~/ 2;\n        final int itemsInRow = itemsPerRow(derivedRowIndex);\n\n        return rowIndex.isEven\n            ? Row(\n                children: List.generate(\n                  _defaultColorContainersInRow * 2 - 1,\n                  (int rowItemIndex) {\n                    if (rowItemIndex.isEven) {\n                      final int derivedItemIndex = rowItemIndex ~/ 2;\n\n                      if (derivedItemIndex < itemsInRow) {\n                        final int colorIndex = _getColorIndex(\n                          derivedRowIndex,\n                          derivedItemIndex,\n                          itemsPerRow,\n                        );\n\n                        final MoonColor moonColor =\n                            colors[colorIndex % colors.length];\n\n                        return _buildColorContainer(context, moonColor);\n                      } else {\n                        return const Flexible(\n                          child: SizedBox(\n                            height: _colorContainerSizeValue,\n                            width: _colorContainerSizeValue,\n                          ),\n                        );\n                      }\n                    } else {\n                      return const SizedBox(width: _colorContainerGap);\n                    }\n                  },\n                ),\n              )\n            : const SizedBox(height: _colorContainerGap);\n      },\n    );\n  }\n\n  Widget _buildColorContainer(BuildContext context, MoonColor moonColor) {\n    final double colorContainerWidth =\n        MediaQuery.of(context).size.width < storybookAutoLayoutThreshold\n            ? double.infinity\n            : _colorContainerSizeValue;\n\n    return Flexible(\n      child: Column(\n        children: [\n          Container(\n            height: _colorContainerSizeValue,\n            width: colorContainerWidth,\n            decoration: BoxDecoration(\n              borderRadius: BorderRadius.circular(16.0),\n              border: Border.all(color: context.moonColors!.beerus),\n            ),\n            child: DecoratedBox(\n              decoration: BoxDecoration(\n                color: getColor(context, moonColor),\n                borderRadius: BorderRadius.circular(15.0),\n              ),\n            ),\n          ),\n          const SizedBox(height: 8.0),\n          Text(moonColor.name),\n        ],\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final bool showLogo =\n        MediaQuery.of(context).size.width < storybookAutoLayoutThreshold;\n\n    return Scaffold(\n      backgroundColor: Colors.white,\n      body: SingleChildScrollView(\n        padding: EdgeInsets.only(\n          top: showLogo ? 40.0 : 80,\n          left: 24,\n          right: 24,\n          bottom: 16.0,\n        ),\n        child: Center(\n          child: SizedBox(\n            width: largeScreenWidth,\n            child: Column(\n              crossAxisAlignment: CrossAxisAlignment.start,\n              children: [\n                ConstrainedBox(\n                  constraints: const BoxConstraints(\n                    maxWidth: mediumScreenWidth,\n                  ),\n                  child: Column(\n                    children: [\n                      _buildSectionHeader(\n                        context,\n                        ColorsPageSection.header,\n                      ),\n                      const SizedBox(height: 24.0),\n                      _buildSectionHeader(\n                        context,\n                        ColorsPageSection.mainColors,\n                      ),\n                      _buildMainColorsSection(context),\n                      const SizedBox(height: 48.0),\n                      _buildSectionHeader(\n                        context,\n                        ColorsPageSection.supportiveColors,\n                      ),\n                      _buildSupportiveColorsSection(context),\n                    ],\n                  ),\n                ),\n                ConstrainedBox(\n                  constraints: BoxConstraints(\n                    maxWidth: _getFooterWidth(context),\n                  ),\n                  child: const Center(\n                    child: PageFooter(),\n                  ),\n                ),\n              ],\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/pages/home_page.dart",
    "content": "import 'dart:math';\n\nimport 'package:example/src/storybook/common/component_options.dart';\nimport 'package:example/src/storybook/common/constants.dart';\nimport 'package:example/src/storybook/common/home_page_options.dart';\nimport 'package:example/src/storybook/common/methods/navigation.dart';\nimport 'package:example/src/storybook/common/social_media_options.dart';\nimport 'package:example/src/storybook/common/widgets/page_footer.dart';\nimport 'package:example/src/storybook/routing/app_router.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_svg/svg.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass HomePage extends StatelessWidget {\n  static const path = '/';\n\n  const HomePage({super.key});\n\n  double _getCardWidth(BuildContext context, double gap, double layoutWidth) {\n    const double cardMaxWidth = 448.0;\n\n    final int itemsInRow = switch (MediaQuery.of(context).size.width) {\n      < mediumScreenWidth => 1,\n      >= mediumScreenWidth && < largeScreenWidth => 2,\n      _ => 3,\n    };\n\n    final double effectiveLayoutWidth =\n        itemsInRow == 3 ? layoutWidth * 0.85 : layoutWidth;\n\n    final double totalGap = gap * (itemsInRow - 1);\n\n    return min((effectiveLayoutWidth - totalGap) / itemsInRow, cardMaxWidth);\n  }\n\n  Widget _buildHeaderSection(BuildContext context, bool showLogo) {\n    final MoonTypography typography = context.moonTypography!;\n\n    return ConstrainedBox(\n      constraints: const BoxConstraints(maxWidth: mediumScreenWidth),\n      child: Column(\n        mainAxisAlignment: MainAxisAlignment.center,\n        crossAxisAlignment: CrossAxisAlignment.start,\n        children: [\n          if (showLogo)\n            Padding(\n              padding: const EdgeInsets.only(left: 12.0, bottom: 24.0),\n              child: SvgPicture.asset(\n                'assets/svg/moon-logo-long.svg',\n                height: 16.0,\n              ),\n            ),\n          Text(\n            HomePageContentType.headerTitle.text,\n            style: typography.heading.text64,\n          ),\n          const SizedBox(height: 24.0),\n          Text(\n            HomePageContentType.headerSubtitle.text,\n            style: typography.heading.text24,\n          ),\n          const SizedBox(height: 48.0),\n          _buildHeaderButtons(context),\n          const SizedBox(height: 72.0),\n          Text(\n            HomePageContentType.bodyTitle.text,\n            style: typography.heading.text40,\n          ),\n        ],\n      ),\n    );\n  }\n\n  Widget _buildHeaderButtons(BuildContext context) {\n    const double buttonGap = 12.0;\n\n    return MediaQuery.of(context).size.width < smallScreenWidth\n        ? Column(\n            children: [\n              _buildButton(context, SocialMedia.gitHub),\n              const SizedBox(height: buttonGap),\n              _buildButton(context, SocialMedia.figma),\n            ],\n          )\n        : Row(\n            children: [\n              Flexible(child: _buildButton(context, SocialMedia.gitHub)),\n              const SizedBox(width: buttonGap),\n              Flexible(child: _buildButton(context, SocialMedia.figma)),\n            ],\n          );\n  }\n\n  Widget _buildButton(BuildContext context, SocialMedia socialMedia) {\n    final bool isGitHub = socialMedia == SocialMedia.gitHub;\n\n    return MoonButton(\n      width: double.infinity,\n      backgroundColor:\n          isGitHub ? context.moonColors!.piccolo : context.moonColors!.krillin,\n      onTap: () => launchURL(socialMedia.url),\n      leading: SvgPicture.asset(\n        socialMedia.buttonIconPath,\n        width: 20.0,\n      ),\n      label: Flexible(\n        child: SizedBox(\n          width: 56,\n          child: Text(\n            socialMedia.name,\n            style:\n                isGitHub ? TextStyle(color: context.moonColors!.goten) : null,\n          ),\n        ),\n      ),\n    );\n  }\n\n  Widget _buildCards(BuildContext context, double layoutWidth) {\n    const double cardGap = 24.0;\n    const double cardHeight = 346.0;\n    const double cardImageHeight = 208.0;\n\n    final BorderRadiusGeometry borderRadius = BorderRadius.circular(16);\n\n    final double cardWidth = _getCardWidth(context, cardGap, layoutWidth);\n\n    final bool isExtraSmallScreen =\n        MediaQuery.of(context).size.width < extraSmallScreenWidth;\n\n    return Wrap(\n      spacing: cardGap,\n      runSpacing: cardGap,\n      alignment: layoutWidth < mediumScreenWidth\n          ? WrapAlignment.center\n          : WrapAlignment.start,\n      children: List.generate(\n        Component.values.length,\n        (int index) {\n          final Component component = Component.values[index];\n\n          return MoonBaseControl(\n            borderRadius: borderRadius,\n            onTap: () => router.go(component.urlPath),\n            builder: (BuildContext context, _, bool isHovered, __, ___) {\n              return Container(\n                height: cardHeight,\n                width: cardWidth,\n                decoration: BoxDecoration(\n                  color: context.moonColors!.goten,\n                  borderRadius: borderRadius,\n                  border: Border.all(color: context.moonColors!.beerus),\n                  boxShadow: isHovered\n                      ? [\n                          BoxShadow(\n                            color: context.moonColors!.trunks.withOpacity(.4),\n                            blurRadius: 6.0,\n                            spreadRadius: -3.0,\n                            offset: const Offset(0, 4),\n                          ),\n                        ]\n                      : null,\n                ),\n                child: Column(\n                  crossAxisAlignment: CrossAxisAlignment.start,\n                  children: [\n                    Container(\n                      height: cardImageHeight,\n                      width: cardWidth,\n                      margin: const EdgeInsets.all(8.0),\n                      clipBehavior: Clip.hardEdge,\n                      decoration: BoxDecoration(borderRadius: borderRadius),\n                      child: Image.asset(\n                        colorBlendMode: BlendMode.saturation,\n                        color: isHovered ? Colors.transparent : Colors.grey,\n                        component.imagePath,\n                        fit: BoxFit.cover,\n                      ),\n                    ),\n                    Padding(\n                      padding: EdgeInsets.only(\n                        left: 24.0,\n                        right: 24.0,\n                        top: isExtraSmallScreen ? 8.0 : 16.0,\n                      ),\n                      child: Column(\n                        mainAxisAlignment: MainAxisAlignment.center,\n                        crossAxisAlignment: CrossAxisAlignment.start,\n                        children: [\n                          Text(\n                            component.name,\n                            overflow: TextOverflow.ellipsis,\n                            style: context.moonTypography!.heading.text20,\n                          ),\n                          SizedBox(height: isExtraSmallScreen ? 4.0 : 8.0),\n                          Text(\n                            component.description,\n                            maxLines: isExtraSmallScreen ? 3 : 2,\n                            overflow: TextOverflow.ellipsis,\n                            style: context.moonTypography!.heading.text14,\n                          ),\n                        ],\n                      ),\n                    ),\n                  ],\n                ),\n              );\n            },\n          );\n        },\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final double layoutWidth = MediaQuery.of(context).size.width;\n\n    final bool showLogo = layoutWidth < storybookAutoLayoutThreshold;\n\n    return Scaffold(\n      backgroundColor: Colors.white,\n      body: SingleChildScrollView(\n        padding: EdgeInsets.only(\n          top: showLogo ? 40.0 : 80,\n          left: 24,\n          right: 24,\n          bottom: 16.0,\n        ),\n        child: Center(\n          child: SizedBox(\n            width: largeScreenWidth,\n            child: Column(\n              crossAxisAlignment: layoutWidth > mediumScreenWidth\n                  ? CrossAxisAlignment.start\n                  : CrossAxisAlignment.center,\n              children: [\n                _buildHeaderSection(context, showLogo),\n                const SizedBox(height: 48.0),\n                LayoutBuilder(\n                  builder: (BuildContext context, BoxConstraints constraints) {\n                    return Column(\n                      children: [\n                        _buildCards(context, constraints.maxWidth),\n                        const PageFooter(),\n                      ],\n                    );\n                  },\n                ),\n              ],\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/pages/typography_page.dart",
    "content": "import 'package:example/src/storybook/common/constants.dart';\nimport 'package:example/src/storybook/common/typography_page_options.dart';\nimport 'package:example/src/storybook/common/widgets/page_footer.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_svg/svg.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass TypographyPage extends StatelessWidget {\n  static const path = '/typography';\n\n  const TypographyPage({super.key});\n\n  Widget _buildSectionHeader(\n    BuildContext context,\n    TypographyPageSection section,\n  ) {\n    final bool isHeader = section == TypographyPageSection.typography;\n    final bool showLogo =\n        MediaQuery.of(context).size.width < storybookAutoLayoutThreshold;\n\n    return Column(\n      crossAxisAlignment: CrossAxisAlignment.start,\n      children: [\n        if (isHeader && showLogo)\n          Padding(\n            padding: const EdgeInsets.only(left: 12.0, bottom: 24.0),\n            child: SvgPicture.asset(\n              'assets/svg/moon-logo-long.svg',\n              height: 16.0,\n            ),\n          ),\n        Text(\n          section.titleText,\n          style: isHeader\n              ? context.moonTypography!.heading.text40\n              : context.moonTypography!.heading.text24,\n        ),\n        const SizedBox(height: 24),\n        if (section.bodyText.isNotEmpty)\n          Text(\n            section.bodyText,\n            style: context.moonTypography!.body.text16,\n          ),\n      ],\n    );\n  }\n\n  Widget _buildTypographyContainer(BuildContext context, MoonTextStyle style) {\n    return Container(\n      width: double.infinity,\n      padding: const EdgeInsets.all(24.0),\n      decoration: BoxDecoration(\n        color: context.moonColors!.gohan,\n        borderRadius: BorderRadius.circular(16.0),\n      ),\n      child: Column(\n        crossAxisAlignment: CrossAxisAlignment.start,\n        children: List.generate(\n          MoonTextSize.values.length * 2 - 1,\n          (int index) {\n            final int derivedIndex = index ~/ 2;\n\n            return index.isEven\n                ? Text(\n                    MoonTextSize.values[derivedIndex].name,\n                    style: style == MoonTextStyle.body\n                        ? getBodyTextStyle(\n                            context,\n                            MoonTextSize.values[derivedIndex],\n                          )\n                        : getHeadingTextStyle(\n                            context,\n                            MoonTextSize.values[derivedIndex],\n                          ),\n                  )\n                : const SizedBox(height: 8.0);\n          },\n        ),\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final bool showLogo =\n        MediaQuery.of(context).size.width < storybookAutoLayoutThreshold;\n\n    return Scaffold(\n      backgroundColor: Colors.white,\n      body: SingleChildScrollView(\n        padding: EdgeInsets.only(\n          top: showLogo ? 40.0 : 80,\n          left: 24,\n          right: 24,\n          bottom: 16.0,\n        ),\n        child: Center(\n          child: SizedBox(\n            width: largeScreenWidth,\n            child: Column(\n              crossAxisAlignment: CrossAxisAlignment.start,\n              children: [\n                ConstrainedBox(\n                  constraints: const BoxConstraints(\n                    maxWidth: mediumScreenWidth,\n                  ),\n                  child: Column(\n                    crossAxisAlignment: CrossAxisAlignment.start,\n                    children: [\n                      _buildSectionHeader(\n                        context,\n                        TypographyPageSection.typography,\n                      ),\n                      const SizedBox(height: 48.0),\n                      _buildSectionHeader(\n                        context,\n                        TypographyPageSection.body,\n                      ),\n                      _buildTypographyContainer(context, MoonTextStyle.body),\n                      const SizedBox(height: 48.0),\n                      _buildSectionHeader(\n                        context,\n                        TypographyPageSection.heading,\n                      ),\n                      _buildTypographyContainer(\n                        context,\n                        MoonTextStyle.heading,\n                      ),\n                      const Center(\n                        child: PageFooter(),\n                      ),\n                    ],\n                  ),\n                ),\n              ],\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/social_media_options.dart",
    "content": "const yoloUrl = 'https://www.yolo.com';\n\nenum SocialMedia {\n  medium,\n  linkedIn,\n  gitHub,\n  figma,\n  license;\n\n  String get name {\n    final String rawName = toString().split('.').last;\n\n    return rawName[0].toUpperCase() + rawName.substring(1);\n  }\n\n  String get url => switch (this) {\n        medium => 'https://moonds.medium.com/',\n        linkedIn => 'https://www.linkedin.com/company/moon-io/',\n        gitHub => 'https://github.com/coingaming/moon_flutter',\n        figma =>\n          'https://www.figma.com/community/file/1002945721703152933/moon-design-system',\n        license =>\n          'https://github.com/coingaming/moon_flutter/blob/main/LICENSE',\n      };\n\n  String get buttonIconPath => switch (this) {\n        gitHub => 'assets/svg/github_logo.svg',\n        figma => 'assets/svg/figma_logo.svg',\n        _ => '',\n      };\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/typography_page_options.dart",
    "content": "import 'package:flutter/cupertino.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nenum MoonTextStyle {\n  body,\n  heading,\n}\n\nenum MoonTextSize {\n  size6,\n  size8,\n  size9,\n  size10,\n  size12,\n  size14,\n  size16,\n  size18,\n  size20,\n  size24,\n  size32,\n  size40,\n  size48,\n  size56,\n  size64,\n  size72;\n\n  String get name {\n    final String rawName = toString().split('.').last;\n    return rawName.replaceFirst('size', 'Size ');\n  }\n}\n\nTextStyle getBodyTextStyle(BuildContext context, MoonTextSize textSize) =>\n    switch (textSize) {\n      MoonTextSize.size6 => context.moonTypography!.body.text6,\n      MoonTextSize.size8 => context.moonTypography!.body.text8,\n      MoonTextSize.size9 => context.moonTypography!.body.text9,\n      MoonTextSize.size10 => context.moonTypography!.body.text10,\n      MoonTextSize.size12 => context.moonTypography!.body.text12,\n      MoonTextSize.size14 => context.moonTypography!.body.text14,\n      MoonTextSize.size16 => context.moonTypography!.body.text16,\n      MoonTextSize.size18 => context.moonTypography!.body.text18,\n      MoonTextSize.size20 => context.moonTypography!.body.text20,\n      MoonTextSize.size24 => context.moonTypography!.body.text24,\n      MoonTextSize.size32 => context.moonTypography!.body.text32,\n      MoonTextSize.size40 => context.moonTypography!.body.text40,\n      MoonTextSize.size48 => context.moonTypography!.body.text48,\n      MoonTextSize.size56 => context.moonTypography!.body.text56,\n      MoonTextSize.size64 => context.moonTypography!.body.text64,\n      MoonTextSize.size72 => context.moonTypography!.body.text72,\n    };\n\nTextStyle getHeadingTextStyle(BuildContext context, MoonTextSize textSize) =>\n    switch (textSize) {\n      MoonTextSize.size6 => context.moonTypography!.heading.text6,\n      MoonTextSize.size8 => context.moonTypography!.heading.text8,\n      MoonTextSize.size9 => context.moonTypography!.heading.text9,\n      MoonTextSize.size10 => context.moonTypography!.heading.text10,\n      MoonTextSize.size12 => context.moonTypography!.heading.text12,\n      MoonTextSize.size14 => context.moonTypography!.heading.text14,\n      MoonTextSize.size16 => context.moonTypography!.heading.text16,\n      MoonTextSize.size18 => context.moonTypography!.heading.text18,\n      MoonTextSize.size20 => context.moonTypography!.heading.text20,\n      MoonTextSize.size24 => context.moonTypography!.heading.text24,\n      MoonTextSize.size32 => context.moonTypography!.heading.text32,\n      MoonTextSize.size40 => context.moonTypography!.heading.text40,\n      MoonTextSize.size48 => context.moonTypography!.heading.text48,\n      MoonTextSize.size56 => context.moonTypography!.heading.text56,\n      MoonTextSize.size64 => context.moonTypography!.heading.text64,\n      MoonTextSize.size72 => context.moonTypography!.heading.text72,\n    };\n\nenum TypographyPageSection {\n  typography,\n  body,\n  heading;\n\n  String get titleText => switch (this) {\n        typography => 'Typography',\n        body => 'Body',\n        heading => 'Heading',\n      };\n\n  String get bodyText => switch (this) {\n        typography => 'Moon typography includes body and heading text styles. '\n            'The body and header text styles have a set font size, while the '\n            'heading text style also includes a semibold font weight.',\n        _ => '',\n      };\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/widgets/logo.dart",
    "content": "import 'package:example/src/storybook/common/pages/home_page.dart';\nimport 'package:example/src/storybook/routing/app_router.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_svg/svg.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass MoonLogoWidget extends StatefulWidget {\n  const MoonLogoWidget({super.key});\n\n  @override\n  State<MoonLogoWidget> createState() => _MoonLogoWidgetState();\n}\n\nclass _MoonLogoWidgetState extends State<MoonLogoWidget> {\n  @override\n  Widget build(BuildContext context) {\n    return Padding(\n      padding: const EdgeInsets.only(top: 28.0, left: 20.0),\n      child: Align(\n        alignment: Alignment.centerLeft,\n        child: MoonButton(\n          showScaleEffect: false,\n          hoverEffectColor: Colors.transparent,\n          onTap: () => router.go(HomePage.path),\n          label: SvgPicture.asset(\n            \"assets/svg/moon-logo-long.svg\",\n            height: 16.0,\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/widgets/page_footer.dart",
    "content": "import 'package:example/src/storybook/common/methods/navigation.dart';\nimport 'package:example/src/storybook/common/social_media_options.dart';\nimport 'package:flutter/gestures.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_svg/svg.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass PageFooter extends StatelessWidget {\n  const PageFooter({super.key});\n\n  Widget _buildFooterSocialMediaButtons(BuildContext context) {\n    return Wrap(\n      crossAxisAlignment: WrapCrossAlignment.center,\n      alignment: WrapAlignment.center,\n      children: List.generate(\n        SocialMedia.values.length * 2 - 1,\n        (int index) {\n          final int derivedIndex = index ~/ 2;\n\n          return index.isEven\n              ? MoonTextButton(\n                  buttonSize: MoonButtonSize.sm,\n                  onTap: () => launchURL(SocialMedia.values[derivedIndex].url),\n                  label: Text(\n                    SocialMedia.values[derivedIndex].name,\n                    overflow: TextOverflow.ellipsis,\n                  ),\n                )\n              : Padding(\n                  padding: const EdgeInsets.all(4.0),\n                  child: Text(\n                    '•',\n                    style: TextStyle(color: context.moonColors!.trunks),\n                  ),\n                );\n        },\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        const SizedBox(height: 112.0),\n        Text.rich(\n          textAlign: TextAlign.center,\n          TextSpan(\n            text: 'With the help of ',\n            style: context.moonTypography!.body.text14,\n            children: [\n              TextSpan(\n                text: 'Yolo Group',\n                style: context.moonTypography!.heading.text14,\n                recognizer: TapGestureRecognizer()\n                  ..onTap = () => launchURL(yoloUrl),\n              ),\n              const WidgetSpan(\n                child: SizedBox(width: 4),\n              ),\n              WidgetSpan(\n                child: SvgPicture.asset(\n                  'assets/svg/heart.svg',\n                  width: 20.0,\n                ),\n              ),\n            ],\n          ),\n        ),\n        const SizedBox(height: 8.0),\n        _buildFooterSocialMediaButtons(context),\n      ],\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/widgets/routing_error_widget.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:go_router/go_router.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:transparent_image/transparent_image.dart';\n\nclass RoutingErrorWidget extends StatelessWidget {\n  const RoutingErrorWidget({super.key});\n\n  @override\n  Widget build(BuildContext context) => Scaffold(\n        body: Center(\n          child: Column(\n            mainAxisAlignment: MainAxisAlignment.center,\n            children: <Widget>[\n              FadeInImage(\n                height: 200,\n                placeholder: MemoryImage(kTransparentImage),\n                image: const AssetImage('assets/images/url_error.jpg'),\n              ),\n              Text(\n                'Lost in space',\n                style: context.moonTypography!.heading.text32,\n              ),\n              const SizedBox(height: 8),\n              Text(\n                'Houston, we have a problem. Moon not found.',\n                style: context.moonTypography!.body.text16,\n                textAlign: TextAlign.center,\n              ),\n              const SizedBox(height: 32),\n              MoonButton(\n                onTap: () => context.go('/'),\n                borderColor: context.moonColors!.piccolo,\n                showBorder: true,\n                label: Text(\n                  'Go back to home',\n                  style: TextStyle(color: context.moonColors!.piccolo),\n                ),\n              ),\n            ],\n          ),\n        ),\n      );\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/widgets/segment.dart",
    "content": "import 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\n\nclass IconsSegment extends StatelessWidget {\n  final Map<String, IconData> segmentMap;\n\n  const IconsSegment({\n    super.key,\n    required this.segmentMap,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    String createSegmentTitle(String text) {\n      final String title = text.split('_').first;\n      return title[0].toUpperCase() + title.substring(1);\n    }\n\n    return SliverPadding(\n      padding: const EdgeInsets.symmetric(horizontal: 16.0),\n      sliver: SliverMainAxisGroup(\n        slivers: [\n          SliverPadding(\n            padding: const EdgeInsets.only(top: 16),\n            sliver: SliverToBoxAdapter(\n              child: TextDivider(\n                text: createSegmentTitle(segmentMap.keys.first),\n                paddingBottom: 0,\n              ),\n            ),\n          ),\n          SliverGrid.builder(\n            itemCount: segmentMap.length,\n            gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(\n              crossAxisCount: 3,\n              crossAxisSpacing: 8,\n              mainAxisSpacing: 8,\n              mainAxisExtent: 104,\n            ),\n            itemBuilder: (BuildContext context, int index) {\n              return Column(\n                mainAxisSize: MainAxisSize.min,\n                mainAxisAlignment: MainAxisAlignment.end,\n                children: [\n                  if (segmentMap.keys.toList()[index].contains(\"16\"))\n                    Icon(segmentMap.values.toList()[index], size: 16)\n                  else if (segmentMap.keys.toList()[index].contains(\"24\"))\n                    Icon(segmentMap.values.toList()[index], size: 24)\n                  else\n                    Icon(segmentMap.values.toList()[index], size: 32),\n                  const SizedBox(height: 16),\n                  Text(\n                    segmentMap.keys.toList()[index],\n                    style: TextStyle(\n                      fontSize: 12,\n                      color: Colors.grey[600],\n                    ),\n                  ),\n                ],\n              );\n            },\n          ),\n          const SliverPadding(\n            padding: EdgeInsets.only(bottom: 16),\n          ),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/widgets/text_divider.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/moon_design.dart';\n\nclass TextDivider extends StatelessWidget {\n  final String text;\n  final double paddingTop;\n  final double paddingBottom;\n\n  const TextDivider({\n    super.key,\n    required this.text,\n    this.paddingTop = 48,\n    this.paddingBottom = 32,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Padding(\n      padding: EdgeInsets.only(top: paddingTop, bottom: paddingBottom),\n      child: Row(\n        children: [\n          const Expanded(\n            child: Divider(),\n          ),\n          Padding(\n            padding: const EdgeInsets.symmetric(horizontal: 16.0),\n            child: Text(\n              text,\n              style: context.moonTypography?.body.text12\n                  .copyWith(color: context.moonColors?.trunks),\n            ),\n          ),\n          const Expanded(\n            child: Divider(),\n          ),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/common/widgets/version.dart",
    "content": "import 'dart:ui';\n\nimport 'package:example/src/storybook/common/constants.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_svg/svg.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:package_info_plus/package_info_plus.dart';\n\nclass MoonVersionWidget extends StatefulWidget {\n  const MoonVersionWidget({super.key});\n\n  @override\n  State<MoonVersionWidget> createState() => _MoonVersionWidgetState();\n}\n\nclass _MoonVersionWidgetState extends State<MoonVersionWidget> {\n  bool isLargeScreen =\n      MediaQueryData.fromView(PlatformDispatcher.instance.implicitView!)\n              .size\n              .width >\n          storybookAutoLayoutThreshold;\n\n  String? _version = \"\";\n\n  @override\n  Future<void> didChangeDependencies() async {\n    super.didChangeDependencies();\n\n    final PackageInfo packageInfo = await PackageInfo.fromPlatform();\n\n    if (mounted) setState(() => _version = packageInfo.version);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return IgnorePointer(\n      child: Material(\n        color: Colors.transparent,\n        child: Padding(\n          padding: const EdgeInsets.all(8.0),\n          child: Row(\n            mainAxisAlignment: isLargeScreen\n                ? MainAxisAlignment.center\n                : MainAxisAlignment.end,\n            children: [\n              SvgPicture.asset(\n                \"assets/svg/moon-logo-short.svg\",\n                width: 24.0,\n                height: 24.0,\n              ),\n              if (isLargeScreen) ...[\n                const SizedBox(width: 8.0),\n                Text(\n                  \"Moon Design\",\n                  style: MoonTypography.typography.heading.text14,\n                ),\n              ],\n              const SizedBox(width: 6.0),\n              Text(\n                \"v$_version\",\n                style: MoonTypography.typography.heading.text14,\n              ),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/routing/app_router.dart",
    "content": "import 'package:example/src/storybook/common/pages/colors_page.dart';\nimport 'package:example/src/storybook/common/pages/home_page.dart';\nimport 'package:example/src/storybook/common/pages/typography_page.dart';\nimport 'package:example/src/storybook/common/widgets/routing_error_widget.dart';\nimport 'package:example/src/storybook/stories/composites/combobox_multi_select.dart';\nimport 'package:example/src/storybook/stories/composites/combobox_single_select.dart';\nimport 'package:example/src/storybook/stories/composites/search_with_dropdown.dart';\nimport 'package:example/src/storybook/stories/composites/search_with_list.dart';\nimport 'package:example/src/storybook/stories/primitives/accordion.dart';\nimport 'package:example/src/storybook/stories/primitives/alert.dart';\nimport 'package:example/src/storybook/stories/primitives/auth_code.dart';\nimport 'package:example/src/storybook/stories/primitives/avatar.dart';\nimport 'package:example/src/storybook/stories/primitives/bottom_sheet.dart';\nimport 'package:example/src/storybook/stories/primitives/breadcrumb.dart';\nimport 'package:example/src/storybook/stories/primitives/button.dart';\nimport 'package:example/src/storybook/stories/primitives/carousel.dart';\nimport 'package:example/src/storybook/stories/primitives/checkbox.dart';\nimport 'package:example/src/storybook/stories/primitives/chip.dart';\nimport 'package:example/src/storybook/stories/primitives/circular_loader.dart';\nimport 'package:example/src/storybook/stories/primitives/circular_progress.dart';\nimport 'package:example/src/storybook/stories/primitives/dot_indicator.dart';\nimport 'package:example/src/storybook/stories/primitives/drawer.dart';\nimport 'package:example/src/storybook/stories/primitives/dropdown.dart';\nimport 'package:example/src/storybook/stories/primitives/icons.dart';\nimport 'package:example/src/storybook/stories/primitives/linear_loader.dart';\nimport 'package:example/src/storybook/stories/primitives/linear_progress.dart';\nimport 'package:example/src/storybook/stories/primitives/menu_item.dart';\nimport 'package:example/src/storybook/stories/primitives/modal.dart';\nimport 'package:example/src/storybook/stories/primitives/popover.dart';\nimport 'package:example/src/storybook/stories/primitives/radio.dart';\nimport 'package:example/src/storybook/stories/primitives/segmented_control.dart';\nimport 'package:example/src/storybook/stories/primitives/switch.dart';\nimport 'package:example/src/storybook/stories/primitives/tab_bar.dart';\nimport 'package:example/src/storybook/stories/primitives/table.dart';\nimport 'package:example/src/storybook/stories/primitives/tag.dart';\nimport 'package:example/src/storybook/stories/primitives/text_area.dart';\nimport 'package:example/src/storybook/stories/primitives/text_input.dart';\nimport 'package:example/src/storybook/stories/primitives/text_input_group.dart';\nimport 'package:example/src/storybook/stories/primitives/toast.dart';\nimport 'package:example/src/storybook/stories/primitives/tooltip.dart';\n\nimport 'package:flutter/material.dart';\nimport 'package:go_router/go_router.dart';\n\nconst String primitivesDirectory = '/primitives';\nconst String compositesDirectory = '/composites';\n\nGoRouter router = GoRouter(\n  debugLogDiagnostics: true,\n  initialLocation: HomePage.path,\n  errorBuilder: (BuildContext _, GoRouterState __) =>\n      const RoutingErrorWidget(),\n  redirect: (BuildContext _, GoRouterState state) {\n    switch (state.uri.path) {\n      case primitivesDirectory:\n        return AccordionStory.path;\n      case compositesDirectory:\n        return ComboboxSingleSelectStory.path;\n\n      case ComboboxSingleSelectStory.subdirectory:\n        return ComboboxSingleSelectStory.path;\n      case '$compositesDirectory${ComboboxSingleSelectStory.subdirectory}':\n        return ComboboxSingleSelectStory.path;\n\n      case SearchWithListStory.subdirectory:\n        return SearchWithListStory.path;\n      case '$compositesDirectory${SearchWithListStory.subdirectory}':\n        return SearchWithListStory.path;\n\n      case CircularLoaderStory.subdirectory:\n        return CircularLoaderStory.path;\n      case '$primitivesDirectory${CircularLoaderStory.subdirectory}':\n        return CircularLoaderStory.path;\n\n      case CircularProgressStory.subdirectory:\n        return CircularProgressStory.path;\n      case '$primitivesDirectory${CircularProgressStory.subdirectory}':\n        return CircularProgressStory.path;\n      default:\n        return null;\n    }\n  },\n  routes: <RouteBase>[\n    // Pages.\n    GoRoute(\n      path: HomePage.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: HomePage(),\n      ),\n    ),\n    GoRoute(\n      path: ColorsPage.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: ColorsPage(),\n      ),\n    ),\n    GoRoute(\n      path: TypographyPage.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: TypographyPage(),\n      ),\n    ),\n\n    // Stories.\n    GoRoute(\n      path: AccordionStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: AccordionStory(),\n      ),\n    ),\n    GoRoute(\n      path: AlertStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: AlertStory(),\n      ),\n    ),\n    GoRoute(\n      path: AuthCodeStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: AuthCodeStory(),\n      ),\n    ),\n    GoRoute(\n      path: AvatarStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: AvatarStory(),\n      ),\n    ),\n    GoRoute(\n      path: BottomSheetStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: BottomSheetStory(),\n      ),\n      onExit: (BuildContext _) {\n        if (router.canPop()) router.pop();\n        return true;\n      },\n    ),\n    GoRoute(\n      path: BreadcrumbStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: BreadcrumbStory(),\n      ),\n    ),\n    GoRoute(\n      path: ButtonStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: ButtonStory(),\n      ),\n    ),\n    GoRoute(\n      path: CarouselStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: CarouselStory(),\n      ),\n    ),\n    GoRoute(\n      path: CheckboxStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: CheckboxStory(),\n      ),\n    ),\n    GoRoute(\n      path: ChipStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: ChipStory(),\n      ),\n    ),\n    GoRoute(\n      path: CircularLoaderStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: CircularLoaderStory(),\n      ),\n    ),\n    GoRoute(\n      path: CircularProgressStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: CircularProgressStory(),\n      ),\n    ),\n    GoRoute(\n      path: ComboboxSingleSelectStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: ComboboxSingleSelectStory(),\n      ),\n    ),\n    GoRoute(\n      path: ComboboxMultiSelectStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: ComboboxMultiSelectStory(),\n      ),\n    ),\n    GoRoute(\n      path: DotIndicatorStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: DotIndicatorStory(),\n      ),\n    ),\n    GoRoute(\n      path: DrawerStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: DrawerStory(),\n      ),\n    ),\n    GoRoute(\n      path: DropdownStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: DropdownStory(),\n      ),\n    ),\n    GoRoute(\n      path: IconsStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: IconsStory(),\n      ),\n    ),\n    GoRoute(\n      path: LinearLoaderStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: LinearLoaderStory(),\n      ),\n    ),\n    GoRoute(\n      path: LinearProgressStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: LinearProgressStory(),\n      ),\n    ),\n    GoRoute(\n      path: MenuItemStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: MenuItemStory(),\n      ),\n    ),\n    GoRoute(\n      path: ModalStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: ModalStory(),\n      ),\n      onExit: (BuildContext _) {\n        if (router.canPop()) router.pop();\n        return true;\n      },\n    ),\n    GoRoute(\n      path: PopoverStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: PopoverStory(),\n      ),\n    ),\n    GoRoute(\n      path: RadioStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: RadioStory(),\n      ),\n    ),\n    GoRoute(\n      path: SearchWithListStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: SearchWithListStory(),\n      ),\n    ),\n    GoRoute(\n      path: SearchWithDropdownStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: SearchWithDropdownStory(),\n      ),\n    ),\n    GoRoute(\n      path: SegmentedControlStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: SegmentedControlStory(),\n      ),\n    ),\n    GoRoute(\n      path: SwitchStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: SwitchStory(),\n      ),\n    ),\n    GoRoute(\n      path: TabBarStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: TabBarStory(),\n      ),\n    ),\n    GoRoute(\n      path: TableStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: TableStory(),\n      ),\n    ),\n    GoRoute(\n      path: TagStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: TagStory(),\n      ),\n    ),\n    GoRoute(\n      path: TextAreaStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: TextAreaStory(),\n      ),\n    ),\n    GoRoute(\n      path: TextInputStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: TextInputStory(),\n      ),\n    ),\n    GoRoute(\n      path: TextInputGroupStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: TextInputGroupStory(),\n      ),\n    ),\n    GoRoute(\n      path: ToastStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: ToastStory(),\n      ),\n    ),\n    GoRoute(\n      path: TooltipStory.path,\n      pageBuilder: (BuildContext _, GoRouterState __) => const NoTransitionPage(\n        child: TooltipStory(),\n      ),\n    ),\n  ],\n);\n"
  },
  {
    "path": "example/lib/src/storybook/routing/route_aware_stories.dart",
    "content": "import 'package:example/src/storybook/common/pages/colors_page.dart';\nimport 'package:example/src/storybook/common/pages/home_page.dart';\nimport 'package:example/src/storybook/common/pages/typography_page.dart';\nimport 'package:example/src/storybook/routing/app_router.dart';\nimport 'package:example/src/storybook/stories/composites/combobox_multi_select.dart';\nimport 'package:example/src/storybook/stories/composites/combobox_single_select.dart';\nimport 'package:example/src/storybook/stories/composites/search_with_dropdown.dart';\nimport 'package:example/src/storybook/stories/composites/search_with_list.dart';\nimport 'package:example/src/storybook/stories/primitives/accordion.dart';\nimport 'package:example/src/storybook/stories/primitives/alert.dart';\nimport 'package:example/src/storybook/stories/primitives/auth_code.dart';\nimport 'package:example/src/storybook/stories/primitives/avatar.dart';\nimport 'package:example/src/storybook/stories/primitives/bottom_sheet.dart';\nimport 'package:example/src/storybook/stories/primitives/breadcrumb.dart';\nimport 'package:example/src/storybook/stories/primitives/button.dart';\nimport 'package:example/src/storybook/stories/primitives/carousel.dart';\nimport 'package:example/src/storybook/stories/primitives/checkbox.dart';\nimport 'package:example/src/storybook/stories/primitives/chip.dart';\nimport 'package:example/src/storybook/stories/primitives/circular_loader.dart';\nimport 'package:example/src/storybook/stories/primitives/circular_progress.dart';\nimport 'package:example/src/storybook/stories/primitives/dot_indicator.dart';\nimport 'package:example/src/storybook/stories/primitives/drawer.dart';\nimport 'package:example/src/storybook/stories/primitives/dropdown.dart';\nimport 'package:example/src/storybook/stories/primitives/icons.dart';\nimport 'package:example/src/storybook/stories/primitives/linear_loader.dart';\nimport 'package:example/src/storybook/stories/primitives/linear_progress.dart';\nimport 'package:example/src/storybook/stories/primitives/menu_item.dart';\nimport 'package:example/src/storybook/stories/primitives/modal.dart';\nimport 'package:example/src/storybook/stories/primitives/popover.dart';\nimport 'package:example/src/storybook/stories/primitives/radio.dart';\nimport 'package:example/src/storybook/stories/primitives/segmented_control.dart';\nimport 'package:example/src/storybook/stories/primitives/switch.dart';\nimport 'package:example/src/storybook/stories/primitives/tab_bar.dart';\nimport 'package:example/src/storybook/stories/primitives/table.dart';\nimport 'package:example/src/storybook/stories/primitives/tag.dart';\nimport 'package:example/src/storybook/stories/primitives/text_area.dart';\nimport 'package:example/src/storybook/stories/primitives/text_input.dart';\nimport 'package:example/src/storybook/stories/primitives/text_input_group.dart';\nimport 'package:example/src/storybook/stories/primitives/toast.dart';\nimport 'package:example/src/storybook/stories/primitives/tooltip.dart';\n\nimport 'package:flutter/services.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nconst String directory = 'assets/code_snippets/';\n\nfinal List<Story> routeAwareStories = [\n  // Pages.\n  Story.asRoute(\n    name: 'Home',\n    routePath: HomePage.path,\n    router: router,\n    isPage: true,\n  ),\n  Story.asRoute(\n    name: 'Colors',\n    routePath: ColorsPage.path,\n    router: router,\n    isPage: true,\n  ),\n  Story.asRoute(\n    name: 'Typography',\n    routePath: TypographyPage.path,\n    router: router,\n    isPage: true,\n  ),\n\n  // Composite stories.\n  Story.asRoute(\n    name: 'Composites/Combobox/single select combobox',\n    routePath: ComboboxSingleSelectStory.path,\n    router: router,\n    codeString: fetchAsset('combobox_single_select.md'),\n  ),\n  Story.asRoute(\n    name: 'Composites/Combobox/multi select combobox',\n    routePath: ComboboxMultiSelectStory.path,\n    router: router,\n    codeString: fetchAsset('combobox_multi_select.md'),\n  ),\n  Story.asRoute(\n    name: 'Composites/Search/search with list',\n    routePath: SearchWithListStory.path,\n    router: router,\n    codeString: fetchAsset('search_with_list.md'),\n  ),\n  Story.asRoute(\n    name: 'Composites/Search/search with dropdown',\n    routePath: SearchWithDropdownStory.path,\n    router: router,\n    codeString: fetchAsset('search_with_dropdown.md'),\n  ),\n\n  // Primitive stories.\n  Story.asRoute(\n    name: 'Primitives/Accordion',\n    routePath: AccordionStory.path,\n    router: router,\n    codeString: fetchAsset('accordion.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Alert',\n    routePath: AlertStory.path,\n    router: router,\n    codeString: fetchAsset('alert.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/AuthCode',\n    routePath: AuthCodeStory.path,\n    router: router,\n    codeString: fetchAsset('auth_code.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Avatar',\n    routePath: AvatarStory.path,\n    router: router,\n    codeString: fetchAsset('avatar.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/BottomSheet',\n    routePath: BottomSheetStory.path,\n    router: router,\n    codeString: fetchAsset('bottom_sheet.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Breadcrumb',\n    routePath: BreadcrumbStory.path,\n    router: router,\n    codeString: fetchAsset('breadcrumb.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Button',\n    routePath: ButtonStory.path,\n    router: router,\n    codeString: fetchAsset('button.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Carousel',\n    routePath: CarouselStory.path,\n    router: router,\n    codeString: fetchAsset('carousel.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Checkbox',\n    routePath: CheckboxStory.path,\n    router: router,\n    codeString: fetchAsset('checkbox.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Chip',\n    routePath: ChipStory.path,\n    router: router,\n    codeString: fetchAsset('chip.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Loader/CircularLoader',\n    routePath: CircularLoaderStory.path,\n    router: router,\n    codeString: fetchAsset('circular_loader.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Progress/CircularProgress',\n    routePath: CircularProgressStory.path,\n    router: router,\n    codeString: fetchAsset('circular_progress.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/DotIndicator',\n    routePath: DotIndicatorStory.path,\n    router: router,\n    codeString: fetchAsset('dot_indicator.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Drawer',\n    routePath: DrawerStory.path,\n    router: router,\n    codeString: fetchAsset('drawer.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Dropdown',\n    routePath: DropdownStory.path,\n    router: router,\n    codeString: fetchAsset('dropdown.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Icons',\n    routePath: IconsStory.path,\n    router: router,\n    codeString: fetchAsset('icons.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Loader/LinearLoader',\n    routePath: LinearLoaderStory.path,\n    router: router,\n    codeString: fetchAsset('linear_loader.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Progress/LinearProgress',\n    routePath: LinearProgressStory.path,\n    router: router,\n    codeString: fetchAsset('linear_progress.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/MenuItem',\n    routePath: MenuItemStory.path,\n    router: router,\n    codeString: fetchAsset('menu_item.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Modal',\n    routePath: ModalStory.path,\n    router: router,\n    codeString: fetchAsset('modal.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Popover',\n    routePath: PopoverStory.path,\n    router: router,\n    codeString: fetchAsset('popover.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Radio',\n    routePath: RadioStory.path,\n    router: router,\n    codeString: fetchAsset('radio.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/SegmentedControl',\n    routePath: SegmentedControlStory.path,\n    router: router,\n    codeString: fetchAsset('segmented_control.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Switch',\n    routePath: SwitchStory.path,\n    router: router,\n    codeString: fetchAsset('switch.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/TabBar',\n    routePath: TabBarStory.path,\n    router: router,\n    codeString: fetchAsset('tab_bar.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Table',\n    routePath: TableStory.path,\n    router: router,\n    codeString: fetchAsset('table.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Tag',\n    routePath: TagStory.path,\n    router: router,\n    codeString: fetchAsset('tag.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/TextArea',\n    routePath: TextAreaStory.path,\n    router: router,\n    codeString: fetchAsset('text_area.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/TextInput',\n    routePath: TextInputStory.path,\n    router: router,\n    codeString: fetchAsset('text_input.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/TextInputGroup',\n    routePath: TextInputGroupStory.path,\n    router: router,\n    codeString: fetchAsset('text_input_group.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Toast',\n    routePath: ToastStory.path,\n    router: router,\n    codeString: fetchAsset('toast.md'),\n  ),\n  Story.asRoute(\n    name: 'Primitives/Tooltip',\n    routePath: TooltipStory.path,\n    router: router,\n    codeString: fetchAsset('tooltip.md'),\n  ),\n];\n\nFuture<String> fetchAsset(String assetName) async =>\n    rootBundle.loadString('$directory$assetName');\n"
  },
  {
    "path": "example/lib/src/storybook/stories/composites/combobox_multi_select.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/component_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass ComboboxMultiSelectStory extends StatefulWidget {\n  static const path = '/composites/combobox/multi_select';\n\n  const ComboboxMultiSelectStory({super.key});\n\n  @override\n  State<ComboboxMultiSelectStory> createState() =>\n      _ComboboxMultiSelectStoryState();\n}\n\nclass _ComboboxMultiSelectStoryState extends State<ComboboxMultiSelectStory> {\n  final FocusNode _focusNode = FocusNode();\n  final TextEditingController _searchController = TextEditingController();\n  final Map<Component, bool> _selectedOptions = {};\n  final List<Component> _optionsList = Component.values;\n\n  List<Component> _filteredOptionsList = [];\n  bool _showDropdown = false;\n\n  String get _inputValue => _searchController.text.trim().toLowerCase();\n\n  void _performSearch() {\n    setState(() {\n      _filteredOptionsList = _optionsList\n          .where(\n            (Component option) =>\n                option.name.toLowerCase().contains(_inputValue),\n          )\n          .toList();\n      _showDropdown = true;\n    });\n  }\n\n  void _handleSelect(Component option, bool isSelected) {\n    setState(\n      () => isSelected\n          ? _selectedOptions[option] = true\n          : _selectedOptions.remove(option),\n    );\n  }\n\n  void _showAllOptionsList() {\n    setState(() {\n      _filteredOptionsList = _optionsList;\n      _showDropdown = !_showDropdown;\n    });\n  }\n\n  void _handleDropdownTapOutside() {\n    setState(() {\n      _showDropdown = false;\n      _searchController.clear();\n      _focusNode.unfocus();\n    });\n  }\n\n  void _handleInputTapOutside() {\n    if (_focusNode.hasFocus && !_showDropdown) {\n      _searchController.clear();\n      _focusNode.unfocus();\n    }\n  }\n\n  @override\n  void dispose() {\n    _searchController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final textInputSizeKnob = context.knobs.nullable.options(\n      label: \"textInputSize\",\n      description: \"Size variants for MoonTextInput.\",\n      enabled: false,\n      initial: MoonTextInputSize.md,\n      options: const [\n        Option(label: \"sm\", value: MoonTextInputSize.sm),\n        Option(label: \"md\", value: MoonTextInputSize.md),\n        Option(label: \"lg\", value: MoonTextInputSize.lg),\n        Option(label: \"xl\", value: MoonTextInputSize.xl),\n      ],\n    );\n\n    final activeBorderColorKnob = context.knobs.nullable.options(\n      label: \"activeBorderColor\",\n      description: \"MoonColors variants for MoonTextInput active border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeBorderColor = colorTable(context)[activeBorderColorKnob ?? 40];\n\n    final inactiveBorderColorKnob = context.knobs.nullable.options(\n      label: \"inactiveBorderColor\",\n      description: \"MoonColors variants for MoonTextInput inactive border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveBorderColor =\n        colorTable(context)[inactiveBorderColorKnob ?? 40];\n\n    final hoverBorderColorKnob = context.knobs.nullable.options(\n      label: \"hoverBorderColor\",\n      description: \"MoonColors variants for MoonTextInput border on hover.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final hoverBorderColor = colorTable(context)[hoverBorderColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description:\n          \"MoonColors variants for MoonTextInput and MoonDropdown background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonTextInput and MoonDropdown\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final distanceToTargetKnob = context.knobs.nullable.slider(\n      label: \"distanceToTarget\",\n      description: \"Distance to target child widget.\",\n      enabled: false,\n      initial: 8,\n      max: 100,\n    );\n\n    final showShadowKnob = context.knobs.boolean(\n      label: \"Show shadow\",\n      description: \"Show shadows for MoonDropdown.\",\n      initial: true,\n    );\n\n    final enabledKnob = context.knobs.boolean(\n      label: \"enabled\",\n      description: \"Switch between MoonTextInput enabled and disabled states.\",\n      initial: true,\n    );\n\n    final hasFloatingLabelKnob = context.knobs.boolean(\n      label: \"hasFloatingLabel\",\n      description: \"Whether MoonTextInput has floating label.\",\n    );\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: Padding(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: MoonDropdown(\n          show: _showDropdown && enabledKnob,\n          constrainWidthToChild: true,\n          backgroundColor: backgroundColor,\n          borderRadius: borderRadius,\n          distanceToTarget: distanceToTargetKnob,\n          dropdownShadows: showShadowKnob == true ? null : [],\n          onTapOutside: () => _handleDropdownTapOutside(),\n          content: ConstrainedBox(\n            constraints: const BoxConstraints(maxHeight: 200),\n            child: ScrollConfiguration(\n              behavior: const ScrollBehavior().copyWith(scrollbars: false),\n              child: _filteredOptionsList.isEmpty\n                  ? const MoonMenuItem(\n                      label: Text('Nothing found.'),\n                    )\n                  : ClipRRect(\n                      borderRadius: borderRadius ?? BorderRadius.zero,\n                      child: ListView.builder(\n                        shrinkWrap: true,\n                        clipBehavior: Clip.none,\n                        padding: EdgeInsets.zero,\n                        itemCount: _filteredOptionsList.length,\n                        itemBuilder: (BuildContext _, int index) {\n                          if (index >= _filteredOptionsList.length) {\n                            return const SizedBox.shrink();\n                          }\n                          final Component currentOption =\n                              _filteredOptionsList[index];\n                          final bool isSelected =\n                              _selectedOptions.containsKey(currentOption);\n\n                          return MoonMenuItem(\n                            absorbGestures: true,\n                            onTap: () => _handleSelect(\n                              currentOption,\n                              !isSelected,\n                            ),\n                            label: Text(currentOption.name),\n                            trailing: MoonCheckbox(\n                              value: isSelected,\n                              tapAreaSizeValue: 0,\n                              onChanged: (bool? _) {},\n                            ),\n                          );\n                        },\n                      ),\n                    ),\n            ),\n          ),\n          child: MoonTextInput(\n            enabled: enabledKnob,\n            hasFloatingLabel: hasFloatingLabelKnob,\n            width: 270,\n            focusNode: _focusNode,\n            textInputSize: textInputSizeKnob,\n            activeBorderColor: activeBorderColor,\n            inactiveBorderColor: inactiveBorderColor,\n            backgroundColor: backgroundColor,\n            hoverBorderColor: hoverBorderColor,\n            borderRadius: borderRadius,\n            hintText: \"Select multiple components\",\n            controller: _searchController,\n            onTap: () => _performSearch(),\n            onTapOutside: (PointerDownEvent _) => _handleInputTapOutside(),\n            onChanged: (String _) => _performSearch(),\n            leading: _selectedOptions.isNotEmpty\n                ? Center(\n                    child: MoonTag(\n                      tagSize: MoonTagSize.xs,\n                      backgroundColor: context.moonColors!.bulma,\n                      onTap: () => setState(() => _selectedOptions.clear()),\n                      label: Text(\n                        \"${_selectedOptions.keys.length}\",\n                        style: TextStyle(color: context.moonColors!.gohan),\n                      ),\n                      trailing: Icon(\n                        MoonIcons.controls_close_small_16_light,\n                        color: context.moonColors!.gohan,\n                      ),\n                    ),\n                  )\n                : null,\n            trailing: MoonButton.icon(\n              buttonSize: MoonButtonSize.xs,\n              hoverEffectColor: Colors.transparent,\n              onTap: () => _showAllOptionsList(),\n              icon: AnimatedRotation(\n                duration: const Duration(milliseconds: 200),\n                turns: _showDropdown ? -0.5 : 0,\n                child: const Icon(MoonIcons.controls_chevron_down_16_light),\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/composites/combobox_single_select.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/component_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass ComboboxSingleSelectStory extends StatefulWidget {\n  static const subdirectory = '/combobox';\n  static const path = '/composites/combobox/single_select';\n\n  const ComboboxSingleSelectStory({super.key});\n\n  @override\n  State<ComboboxSingleSelectStory> createState() =>\n      _ComboboxSingleSelectStoryState();\n}\n\nclass _ComboboxSingleSelectStoryState extends State<ComboboxSingleSelectStory> {\n  final FocusNode _focusNode = FocusNode();\n  final TextEditingController _searchController = TextEditingController();\n  final List<Component> _optionsList = Component.values;\n\n  List<Component> _filteredOptionsList = [];\n  Component? _selectedOption;\n  bool _showDropdown = false;\n\n  bool get _optionIsSelected => _selectedOption?.name == _searchController.text;\n\n  String get _inputValue => _searchController.text.trim().toLowerCase();\n\n  void _performSearch() {\n    setState(() {\n      if (!_optionIsSelected && _selectedOption != null) _selectedOption = null;\n\n      _filteredOptionsList = _optionsList\n          .where(\n            (Component option) =>\n                option.name.toLowerCase().contains(_inputValue),\n          )\n          .toList();\n      _showDropdown = true;\n    });\n  }\n\n  void _handleSelect(Component option) {\n    setState(() {\n      _showDropdown = false;\n      _searchController.text = option.name;\n      _selectedOption = option;\n      _focusNode.unfocus();\n    });\n  }\n\n  void _showAllOptionsList() {\n    setState(() {\n      _filteredOptionsList = _optionsList;\n      _showDropdown = !_showDropdown;\n    });\n  }\n\n  void _handleDropdownTapOutside() {\n    setState(() {\n      _showDropdown = false;\n      if (!_optionIsSelected) _searchController.clear();\n      _focusNode.unfocus();\n    });\n  }\n\n  void _handleInputTapOutside() {\n    if (_focusNode.hasFocus && !_showDropdown) {\n      if (!_optionIsSelected) _searchController.clear();\n      _focusNode.unfocus();\n    }\n  }\n\n  @override\n  void dispose() {\n    _searchController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final textInputSizeKnob = context.knobs.nullable.options(\n      label: \"textInputSize\",\n      description: \"Size variants for MoonTextInput.\",\n      enabled: false,\n      initial: MoonTextInputSize.md,\n      options: const [\n        Option(label: \"sm\", value: MoonTextInputSize.sm),\n        Option(label: \"md\", value: MoonTextInputSize.md),\n        Option(label: \"lg\", value: MoonTextInputSize.lg),\n        Option(label: \"xl\", value: MoonTextInputSize.xl),\n      ],\n    );\n\n    final activeBorderColorKnob = context.knobs.nullable.options(\n      label: \"activeBorderColor\",\n      description: \"MoonColors variants for MoonTextInput active border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeBorderColor = colorTable(context)[activeBorderColorKnob ?? 40];\n\n    final inactiveBorderColorKnob = context.knobs.nullable.options(\n      label: \"inactiveBorderColor\",\n      description: \"MoonColors variants for MoonTextInput inactive border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveBorderColor =\n        colorTable(context)[inactiveBorderColorKnob ?? 40];\n\n    final hoverBorderColorKnob = context.knobs.nullable.options(\n      label: \"hoverBorderColor\",\n      description: \"MoonColors variants for MoonTextInput border on hover.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final hoverBorderColor = colorTable(context)[hoverBorderColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description:\n          \"MoonColors variants for MoonTextInput and MoonDropdown background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonTextInput and MoonDropdown\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final distanceToTargetKnob = context.knobs.nullable.slider(\n      label: \"distanceToTarget\",\n      description: \"Distance to target child widget.\",\n      enabled: false,\n      initial: 8,\n      max: 100,\n    );\n\n    final showShadowKnob = context.knobs.boolean(\n      label: \"Show shadow\",\n      description: \"Show shadows for MoonDropdown.\",\n      initial: true,\n    );\n\n    final enabledKnob = context.knobs.boolean(\n      label: \"enabled\",\n      description: \"Switch between MoonTextInput enabled and disabled states.\",\n      initial: true,\n    );\n\n    final hasFloatingLabelKnob = context.knobs.boolean(\n      label: \"hasFloatingLabel\",\n      description: \"Whether MoonTextInput has floating label.\",\n    );\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: Padding(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: MoonDropdown(\n          show: _showDropdown && enabledKnob,\n          constrainWidthToChild: true,\n          backgroundColor: backgroundColor,\n          borderRadius: borderRadius,\n          distanceToTarget: distanceToTargetKnob,\n          dropdownShadows: showShadowKnob == true ? null : [],\n          onTapOutside: () => _handleDropdownTapOutside(),\n          content: ConstrainedBox(\n            constraints: const BoxConstraints(maxHeight: 200),\n            child: ScrollConfiguration(\n              behavior: const ScrollBehavior().copyWith(scrollbars: false),\n              child: _filteredOptionsList.isEmpty\n                  ? const MoonMenuItem(\n                      label: Text('No results found.'),\n                    )\n                  : ClipRRect(\n                      borderRadius: borderRadius ?? BorderRadius.zero,\n                      child: ListView.builder(\n                        shrinkWrap: true,\n                        clipBehavior: Clip.none,\n                        padding: EdgeInsets.zero,\n                        itemCount: _filteredOptionsList.length,\n                        itemBuilder: (BuildContext _, int index) {\n                          if (index >= _filteredOptionsList.length) {\n                            return const SizedBox.shrink();\n                          }\n                          final Component option = _filteredOptionsList[index];\n\n                          return MoonMenuItem(\n                            onTap: () => _handleSelect(option),\n                            label: Text(option.name),\n                          );\n                        },\n                      ),\n                    ),\n            ),\n          ),\n          child: MoonTextInput(\n            enabled: enabledKnob,\n            hasFloatingLabel: hasFloatingLabelKnob,\n            width: 270,\n            focusNode: _focusNode,\n            activeBorderColor: activeBorderColor,\n            inactiveBorderColor: inactiveBorderColor,\n            backgroundColor: backgroundColor,\n            hoverBorderColor: hoverBorderColor,\n            borderRadius: borderRadius,\n            textInputSize: textInputSizeKnob,\n            hintText: \"Select single component\",\n            controller: _searchController,\n            onTap: () => _performSearch(),\n            onTapOutside: (PointerDownEvent _) => _handleInputTapOutside(),\n            onChanged: (String _) => _performSearch(),\n            trailing: MoonButton.icon(\n              buttonSize: MoonButtonSize.xs,\n              hoverEffectColor: Colors.transparent,\n              onTap: () => _showAllOptionsList(),\n              icon: AnimatedRotation(\n                duration: const Duration(milliseconds: 200),\n                turns: _showDropdown ? -0.5 : 0,\n                child: const Icon(MoonIcons.controls_chevron_down_16_light),\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/composites/search_with_dropdown.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/component_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nenum _Section { input, dropdown }\n\nclass SearchWithDropdownStory extends StatefulWidget {\n  static const path = '/composites/search/search_with_dropdown';\n\n  const SearchWithDropdownStory({super.key});\n\n  @override\n  State<SearchWithDropdownStory> createState() =>\n      _SearchWithDropdownStoryState();\n}\n\nclass _SearchWithDropdownStoryState extends State<SearchWithDropdownStory> {\n  final TextEditingController _searchController = TextEditingController();\n  final List<Component> _optionsList = Component.values;\n\n  List<Component> _filteredOptionsList = [];\n  Component? _selectedOption;\n  bool _showDropdown = false;\n\n  bool get _optionIsSelected => _selectedOption?.name == _searchController.text;\n\n  String get _inputValue => _searchController.text.trim().toLowerCase();\n\n  void _performSearch() {\n    setState(() {\n      if (!_optionIsSelected && _selectedOption != null) _selectedOption = null;\n\n      _filteredOptionsList = _optionsList\n          .where(\n            (Component option) =>\n                option.name.toLowerCase().contains(_inputValue),\n          )\n          .toList();\n      _showDropdown = true;\n    });\n  }\n\n  void _handleSelect(Component option) {\n    setState(() {\n      _showDropdown = false;\n      _searchController.text = option.name;\n      _selectedOption = option;\n      FocusManager.instance.primaryFocus?.unfocus();\n    });\n  }\n\n  void _handleClearButton() {\n    setState(() {\n      _searchController.clear();\n      _filteredOptionsList = _optionsList;\n    });\n  }\n\n  void _handleDropdownTapOutside() {\n    setState(() {\n      _showDropdown = false;\n      if (!_optionIsSelected) _searchController.clear();\n      FocusManager.instance.primaryFocus?.unfocus();\n    });\n  }\n\n  @override\n  void dispose() {\n    _searchController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final activeBorderColorKnob = context.knobs.nullable.options(\n      label: \"activeBorderColor\",\n      description: \"MoonColors variants for MoonTextInput active border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeBorderColor = colorTable(context)[activeBorderColorKnob ?? 40];\n\n    final inactiveBorderColorKnob = context.knobs.nullable.options(\n      label: \"inactiveBorderColor\",\n      description: \"MoonColors variants for MoonTextInput inactive border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveBorderColor =\n        colorTable(context)[inactiveBorderColorKnob ?? 40];\n\n    final hoverBorderColorKnob = context.knobs.nullable.options(\n      label: \"hoverBorderColor\",\n      description: \"MoonColors variants for MoonTextInput border on hover.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final hoverBorderColor = colorTable(context)[hoverBorderColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonTextInput background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonTextInput and MoonDropdown\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final distanceToTargetKnob = context.knobs.nullable.slider(\n      label: \"distanceToTarget\",\n      description: \"Distance to target child widget.\",\n      enabled: false,\n      initial: 8,\n      max: 100,\n    );\n\n    final showShadowKnob = context.knobs.boolean(\n      label: \"Show shadow\",\n      description: \"Show shadows for MoonDropdown.\",\n      initial: true,\n    );\n\n    final enabledKnob = context.knobs.boolean(\n      label: \"enabled\",\n      description: \"Switch between MoonTextInput enabled and disabled states.\",\n      initial: true,\n    );\n\n    final hasFloatingLabelKnob = context.knobs.boolean(\n      label: \"hasFloatingLabel\",\n      description: \"Whether MoonTextInput has floating label.\",\n    );\n\n    BorderRadiusGeometry? getBorderRadius(_Section variant) {\n      final double borderRadiusValue =\n          borderRadiusKnob != null ? borderRadiusKnob.toDouble() : 8;\n\n      return (distanceToTargetKnob == null || distanceToTargetKnob == 0) &&\n              _showDropdown &&\n              enabledKnob\n          ? BorderRadius.vertical(\n              top: Radius.circular(\n                variant == _Section.input ? borderRadiusValue : 0,\n              ),\n              bottom: Radius.circular(\n                variant == _Section.dropdown ? borderRadiusValue : 0,\n              ),\n            )\n          : BorderRadius.circular(borderRadiusValue);\n    }\n\n    return Padding(\n      padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16),\n      child: Stack(\n        children: [\n          LayoutBuilder(\n            builder: (BuildContext context, BoxConstraints constraints) {\n              return MoonDropdown(\n                show: _showDropdown && enabledKnob,\n                constrainWidthToChild: true,\n                distanceToTarget: distanceToTargetKnob ?? 0,\n                backgroundColor: backgroundColor,\n                borderRadius: getBorderRadius(_Section.dropdown),\n                decoration: BoxDecoration(\n                  color: context.moonColors!.goku,\n                  borderRadius: getBorderRadius(_Section.dropdown),\n                  boxShadow: showShadowKnob == true\n                      ? const [\n                          BoxShadow(\n                            color: Color(0x28000000),\n                            blurRadius: 6,\n                            offset: Offset(0, 6),\n                            spreadRadius: -6,\n                          ),\n                        ]\n                      : [],\n                  border: Border(\n                    left: BorderSide(color: context.moonColors!.beerus),\n                    right: BorderSide(color: context.moonColors!.beerus),\n                    bottom: BorderSide(color: context.moonColors!.beerus),\n                    top: distanceToTargetKnob == null ||\n                            distanceToTargetKnob == 0\n                        ? BorderSide.none\n                        : BorderSide(color: context.moonColors!.beerus),\n                  ),\n                ),\n                onTapOutside: () => _handleDropdownTapOutside(),\n                content: LayoutBuilder(\n                  builder: (context, constraints) {\n                    return ConstrainedBox(\n                      constraints: const BoxConstraints(maxHeight: 300),\n                      child: ScrollConfiguration(\n                        behavior:\n                            const ScrollBehavior().copyWith(scrollbars: false),\n                        child: _filteredOptionsList.isEmpty\n                            ? const MoonMenuItem(\n                                label: Text('No results found.'),\n                              )\n                            : ClipRRect(\n                                borderRadius:\n                                    getBorderRadius(_Section.dropdown) ??\n                                        BorderRadius.zero,\n                                child: ListView.builder(\n                                  shrinkWrap: true,\n                                  clipBehavior: Clip.none,\n                                  padding: EdgeInsets.zero,\n                                  itemCount: _filteredOptionsList.length,\n                                  itemBuilder: (BuildContext _, int index) {\n                                    if (index >= _filteredOptionsList.length) {\n                                      return const SizedBox.shrink();\n                                    }\n                                    final Component option =\n                                        _filteredOptionsList[index];\n\n                                    return MoonMenuItem(\n                                      onTap: () => _handleSelect(option),\n                                      label: Text(option.name),\n                                    );\n                                  },\n                                ),\n                              ),\n                      ),\n                    );\n                  },\n                ),\n                child: MoonTextInput(\n                  enabled: enabledKnob,\n                  width: constraints.maxWidth,\n                  hasFloatingLabel: hasFloatingLabelKnob,\n                  activeBorderColor:\n                      activeBorderColor ?? context.moonColors!.beerus,\n                  inactiveBorderColor: inactiveBorderColor,\n                  backgroundColor: backgroundColor,\n                  hoverBorderColor: hoverBorderColor,\n                  borderRadius: getBorderRadius(_Section.input),\n                  hintText: \"Search components\",\n                  controller: _searchController,\n                  onTap: () => _performSearch(),\n                  onChanged: (String _) => _performSearch(),\n                  leading: const Icon(MoonIcons.generic_search_24_light),\n                  trailing: MoonButton(\n                    padding: EdgeInsets.zero,\n                    hoverEffectColor: Colors.transparent,\n                    onTap: () => _handleClearButton(),\n                    label: Text(\n                      'Clear',\n                      style: TextStyle(color: context.moonColors!.trunks),\n                    ),\n                  ),\n                ),\n              );\n            },\n          ),\n          if (!_showDropdown)\n            const Align(\n              child: Text('Search results displayed within MoonDropdown.'),\n            ),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/composites/search_with_list.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/component_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass SearchWithListStory extends StatefulWidget {\n  static const subdirectory = '/search';\n  static const path = '/composites/search/search_with_list';\n\n  const SearchWithListStory({super.key});\n\n  @override\n  State<SearchWithListStory> createState() => _SearchWithListStoryState();\n}\n\nclass _SearchWithListStoryState extends State<SearchWithListStory> {\n  final TextEditingController _searchController = TextEditingController();\n  final List<Component> _optionsList = Component.values;\n\n  List<Component> _filteredOptionsList = [];\n  bool _showSearchResults = false;\n\n  String get _inputValue => _searchController.text.trim().toLowerCase();\n\n  void _performSearch() {\n    setState(() {\n      _filteredOptionsList = _optionsList\n          .where(\n            (Component option) =>\n                option.name.toLowerCase().contains(_inputValue),\n          )\n          .toList();\n\n      _showSearchResults = true;\n    });\n  }\n\n  void _handleClearButton() {\n    setState(() {\n      _searchController.clear();\n      _filteredOptionsList = _optionsList;\n    });\n  }\n\n  void _handleCloseButton() {\n    setState(() {\n      _searchController.clear();\n      _showSearchResults = false;\n      FocusManager.instance.primaryFocus?.unfocus();\n    });\n  }\n\n  @override\n  void dispose() {\n    _searchController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final textInputSizeKnob = context.knobs.nullable.options(\n      label: \"textInputSize\",\n      description: \"Size variants for MoonTextInput.\",\n      enabled: false,\n      initial: MoonTextInputSize.md,\n      options: const [\n        Option(label: \"sm\", value: MoonTextInputSize.sm),\n        Option(label: \"md\", value: MoonTextInputSize.md),\n        Option(label: \"lg\", value: MoonTextInputSize.lg),\n        Option(label: \"xl\", value: MoonTextInputSize.xl),\n      ],\n    );\n\n    final activeBorderColorKnob = context.knobs.nullable.options(\n      label: \"activeBorderColor\",\n      description: \"MoonColors variants for MoonTextInput active border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeBorderColor = colorTable(context)[activeBorderColorKnob ?? 40];\n\n    final inactiveBorderColorKnob = context.knobs.nullable.options(\n      label: \"inactiveBorderColor\",\n      description: \"MoonColors variants for MoonTextInput inactive border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveBorderColor =\n        colorTable(context)[inactiveBorderColorKnob ?? 40];\n\n    final hoverBorderColorKnob = context.knobs.nullable.options(\n      label: \"hoverBorderColor\",\n      description: \"MoonColors variants for MoonTextInput border on hover.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final hoverBorderColor = colorTable(context)[hoverBorderColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonTextInput background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonTextInput\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final enabledKnob = context.knobs.boolean(\n      label: \"enabled\",\n      description: \"Switch between MoonTextInput enabled and disabled states.\",\n      initial: true,\n    );\n\n    final hasFloatingLabelKnob = context.knobs.boolean(\n      label: \"hasFloatingLabel\",\n      description: \"Whether MoonTextInput has floating label.\",\n    );\n\n    return Padding(\n      padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n      child: Stack(\n        children: [\n          Column(\n            children: [\n              MoonTextInput(\n                enabled: enabledKnob,\n                hasFloatingLabel: hasFloatingLabelKnob,\n                activeBorderColor:\n                    activeBorderColor ?? context.moonColors!.beerus,\n                inactiveBorderColor: inactiveBorderColor,\n                backgroundColor: backgroundColor,\n                hoverBorderColor: hoverBorderColor,\n                borderRadius: borderRadiusKnob != null\n                    ? BorderRadius.circular(borderRadiusKnob.toDouble())\n                    : null,\n                textInputSize: textInputSizeKnob,\n                hintText: \"Search components\",\n                controller: _searchController,\n                onTap: () => _performSearch(),\n                onChanged: (String _) => _performSearch(),\n                leading: const Icon(MoonIcons.generic_search_24_light),\n                trailing: Row(\n                  children: [\n                    MoonButton(\n                      padding: const EdgeInsetsDirectional.only(end: 8),\n                      hoverEffectColor: Colors.transparent,\n                      onTap: () => _handleClearButton(),\n                      label: Text(\n                        'Clear',\n                        style: TextStyle(color: context.moonColors!.trunks),\n                      ),\n                    ),\n                    SizedBox(\n                      height: 16,\n                      child: VerticalDivider(\n                        width: 8,\n                        color: context.moonColors!.beerus,\n                      ),\n                    ),\n                    MoonButton.icon(\n                      buttonSize: MoonButtonSize.xs,\n                      hoverEffectColor: Colors.transparent,\n                      onTap: () => _handleCloseButton(),\n                      icon: const Icon(MoonIcons.controls_close_16_light),\n                    ),\n                  ],\n                ),\n              ),\n              if (_showSearchResults &&\n                  _filteredOptionsList.isNotEmpty &&\n                  enabledKnob)\n                Expanded(\n                  child: ScrollConfiguration(\n                    behavior:\n                        const ScrollBehavior().copyWith(scrollbars: false),\n                    child: ListView.builder(\n                      shrinkWrap: true,\n                      padding: const EdgeInsets.only(top: 8.0),\n                      itemCount: _filteredOptionsList.length,\n                      itemBuilder: (BuildContext _, int index) {\n                        if (index >= _filteredOptionsList.length) {\n                          return const SizedBox.shrink();\n                        }\n                        final Component option = _filteredOptionsList[index];\n\n                        return MoonMenuItem(\n                          hoverEffectColor: Colors.transparent,\n                          onTap: () => {},\n                          label: Text(option.name),\n                        );\n                      },\n                    ),\n                  ),\n                ),\n            ],\n          ),\n          if (_showSearchResults && _filteredOptionsList.isEmpty && enabledKnob)\n            const Align(\n              child: Text('No results found.'),\n            ),\n          if (!_showSearchResults)\n            const Align(\n              child: Text('Search results displayed as a list.'),\n            ),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/accordion.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nenum AccordionItems { first, second }\n\nclass AccordionStory extends StatefulWidget {\n  static const path = '/primitives/accordion';\n\n  const AccordionStory({super.key});\n\n  @override\n  State<AccordionStory> createState() => _AccordionStoryState();\n}\n\nclass _AccordionStoryState extends State<AccordionStory> {\n  AccordionItems? _currentlyOpenAccordionItem = AccordionItems.first;\n\n  @override\n  Widget build(BuildContext context) {\n    final accordionSizeKnob = context.knobs.nullable.options(\n      label: \"accordionSize\",\n      description: \"Size variants for MoonAccordion.\",\n      enabled: false,\n      initial: MoonAccordionSize.md,\n      options: const [\n        Option(label: \"sm\", value: MoonAccordionSize.sm),\n        Option(label: \"md\", value: MoonAccordionSize.md),\n        Option(label: \"lg\", value: MoonAccordionSize.lg),\n        Option(label: \"xl\", value: MoonAccordionSize.xl),\n      ],\n    );\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"textColor\",\n      description: \"MoonColors variants for MoonAccordion header text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final expandedTextColorKnob = context.knobs.nullable.options(\n      label: \"expandedTextColor\",\n      description:\n          \"MoonColors variants for expanded MoonAccordion header text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final expandedTextColor = colorTable(context)[expandedTextColorKnob ?? 40];\n\n    final contentTextColorKnob = context.knobs.nullable.options(\n      label: \"Content text color\",\n      description: \"MoonColors variants for MoonAccordion content text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final contentTextColor = colorTable(context)[contentTextColorKnob ?? 40];\n\n    final iconColorKnob = context.knobs.nullable.options(\n      label: \"iconColor\",\n      description: \"MoonColors variants for MoonAccordion icon.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final iconColor = colorTable(context)[iconColorKnob ?? 40];\n\n    final expandedIconColorKnob = context.knobs.nullable.options(\n      label: \"expandedIconColor\",\n      description: \"MoonColors variants for expanded MoonAccordion icon.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final expandedIconColor = colorTable(context)[expandedIconColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonAccordion background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final expandedBackgroundColorKnob = context.knobs.nullable.options(\n      label: \"expandedBackgroundColor\",\n      description: \"MoonColors variants for expanded MoonAccordion background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final expandedBackgroundColor =\n        colorTable(context)[expandedBackgroundColorKnob ?? 40];\n\n    final borderColorKnob = context.knobs.nullable.options(\n      label: \"borderColor\",\n      description: \"MoonColors variants for MoonAccordion border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final borderColor = colorTable(context)[borderColorKnob ?? 40];\n\n    final dividerColorKnob = context.knobs.nullable.options(\n      label: \"dividerColor\",\n      description: \"MoonColors variants for expanded MoonAccordion divider.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final dividerColor = colorTable(context)[dividerColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonAccordion.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final showBorderKnob = context.knobs.boolean(\n      label: \"showBorder\",\n      description: \"Show border for MoonAccordion.\",\n    );\n\n    final showDividerKnob = context.knobs.boolean(\n      label: \"showDivider\",\n      description: \"Show divider between MoonAccordion header and body.\",\n      initial: true,\n    );\n\n    final showShadowKnob = context.knobs.boolean(\n      label: \"Show shadows\",\n      description: \"Show shadows for MoonAccordion.\",\n      initial: true,\n    );\n\n    const String contentText =\n        \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do \"\n        \"eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim \"\n        \"ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut \"\n        \"aliquip ex ea commodo consequat. Duis aute irure dolor in \"\n        \"reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla \"\n        \"pariatur. Excepteur sint occaecat cupidatat non proident, sunt in \"\n        \"culpa qui officia deserunt mollit anim id est laborum.\";\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return ListView(\n      clipBehavior: Clip.none,\n      padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n      children: [\n        const TextDivider(\n          text: \"Grouped MoonAccordion\",\n          paddingTop: 0,\n        ),\n        MoonAccordion<AccordionItems>(\n          identityValue: AccordionItems.first,\n          groupIdentityValue: _currentlyOpenAccordionItem,\n          accordionSize: accordionSizeKnob,\n          textColor: textColor,\n          expandedTextColor: expandedTextColor,\n          iconColor: iconColor,\n          expandedIconColor: expandedIconColor,\n          borderColor: borderColor,\n          backgroundColor: backgroundColor,\n          expandedBackgroundColor: expandedBackgroundColor,\n          dividerColor: dividerColor,\n          borderRadius: borderRadius,\n          showBorder: showBorderKnob,\n          showDivider: showDividerKnob,\n          shadows: showShadowKnob == true ? null : [],\n          childrenPadding: const EdgeInsets.all(12),\n          onExpansionChanged: (AccordionItems? value) =>\n              setState(() => _currentlyOpenAccordionItem = value),\n          leading: const Icon(MoonIcons.other_frame_24_light),\n          label: const Text(\"Grouped MoonAccordion item #1\"),\n          children: [\n            Text(\n              contentText,\n              style: TextStyle(color: contentTextColor),\n            ),\n          ],\n        ),\n        const SizedBox(height: 8),\n        MoonAccordion<AccordionItems>(\n          identityValue: AccordionItems.second,\n          groupIdentityValue: _currentlyOpenAccordionItem,\n          accordionSize: accordionSizeKnob,\n          textColor: textColor,\n          expandedTextColor: expandedTextColor,\n          iconColor: iconColor,\n          expandedIconColor: expandedIconColor,\n          borderColor: borderColor,\n          backgroundColor: backgroundColor,\n          expandedBackgroundColor: expandedBackgroundColor,\n          dividerColor: dividerColor,\n          borderRadius: borderRadius,\n          showBorder: showBorderKnob,\n          showDivider: showDividerKnob,\n          shadows: showShadowKnob == true ? null : [],\n          childrenPadding: const EdgeInsets.all(12),\n          onExpansionChanged: (AccordionItems? value) =>\n              setState(() => _currentlyOpenAccordionItem = value),\n          leading: const Icon(MoonIcons.other_frame_24_light),\n          label: const Text(\"Grouped MoonAccordion item #2\"),\n          children: [\n            Text(\n              contentText,\n              style: TextStyle(color: contentTextColor),\n            ),\n          ],\n        ),\n        const TextDivider(text: \"Ungrouped MoonAccordion with content outside\"),\n        MoonAccordion<AccordionItems>(\n          accordionSize: accordionSizeKnob,\n          initiallyExpanded: true,\n          hasContentOutside: true,\n          textColor: textColor,\n          expandedTextColor: expandedTextColor,\n          iconColor: iconColor,\n          expandedIconColor: expandedIconColor,\n          borderColor: borderColor,\n          backgroundColor: backgroundColor,\n          expandedBackgroundColor: expandedBackgroundColor,\n          borderRadius: borderRadius,\n          showBorder: showBorderKnob,\n          shadows: showShadowKnob == true ? null : [],\n          childrenPadding: const EdgeInsets.symmetric(vertical: 12),\n          label: const Text(\"Ungrouped MoonAccordion item #1\"),\n          children: [\n            Text(\n              contentText,\n              style: TextStyle(color: contentTextColor),\n            ),\n          ],\n        ),\n        const SizedBox(height: 8),\n        MoonAccordion<AccordionItems>(\n          accordionSize: accordionSizeKnob,\n          hasContentOutside: true,\n          textColor: textColor,\n          expandedTextColor: expandedTextColor,\n          iconColor: iconColor,\n          expandedIconColor: expandedIconColor,\n          borderColor: borderColor,\n          backgroundColor: backgroundColor,\n          expandedBackgroundColor: expandedBackgroundColor,\n          dividerColor: dividerColor,\n          borderRadius: borderRadius,\n          showBorder: showBorderKnob,\n          shadows: showShadowKnob == true ? null : [],\n          childrenPadding: const EdgeInsets.symmetric(vertical: 12),\n          label: const Text(\"Ungrouped MoonAccordion item #2\"),\n          children: [\n            Text(\n              contentText,\n              style: TextStyle(color: contentTextColor),\n            ),\n          ],\n        ),\n      ],\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/alert.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass AlertStory extends StatefulWidget {\n  static const path = '/primitives/alert';\n\n  const AlertStory({super.key});\n\n  @override\n  State<AlertStory> createState() => _AlertStoryState();\n}\n\nclass _AlertStoryState extends State<AlertStory> {\n  bool _showAlert = true;\n\n  @override\n  Widget build(BuildContext context) {\n    final leadingColorKnob = context.knobs.nullable.options(\n      label: \"Leading Color\",\n      description: \"MoonColors variants for MoonAlert leading slot.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final leadingColor = colorTable(context)[leadingColorKnob ?? 40];\n\n    final labelColorKnob = context.knobs.nullable.options(\n      label: \"Label color\",\n      description: \"MoonColors variants for MoonAlert label slot.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final labelColor = colorTable(context)[labelColorKnob ?? 40];\n\n    final trailingColorKnob = context.knobs.nullable.options(\n      label: \"Trailing color\",\n      description: \"MoonColors variants for MoonAlert trailing slot.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final trailingColor = colorTable(context)[trailingColorKnob ?? 40];\n\n    final contentColorKnob = context.knobs.nullable.options(\n      label: \"Content color\",\n      description: \"MoonColors variants for MoonAlert content slot.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final contentColor = colorTable(context)[contentColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonAlert background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderColorKnob = context.knobs.nullable.options(\n      label: \"borderColor\",\n      description: \"MoonColors variants for MoonAlert border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final borderColor = colorTable(context)[borderColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonAlert.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final showBorderKnob = context.knobs.boolean(\n      label: \"showBorder\",\n      description: \"Show border for MoonAlert.\",\n    );\n\n    final showLeadingKnob = context.knobs.boolean(\n      label: \"leading\",\n      description: \"Show widget in MoonAlert leading slot.\",\n      initial: true,\n    );\n\n    final showContentKnob = context.knobs.boolean(\n      label: \"content\",\n      description: \"Show widget in MoonAlert content slot.\",\n    );\n\n    final showTrailingKnob = context.knobs.boolean(\n      label: \"trailing\",\n      description: \"Show widget in MoonAlert trailing slot.\",\n      initial: true,\n    );\n\n    final showDisabledKnob = context.knobs.boolean(\n      label: \"Disabled\",\n      description: \"MoonAlert onTrailingTap() is null.\",\n    );\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64, horizontal: 16),\n        child: Column(\n          children: [\n            const TextDivider(\n              text: \"Base MoonAlert\",\n              paddingTop: 0,\n            ),\n            Column(\n              mainAxisAlignment: MainAxisAlignment.center,\n              children: [\n                MoonAlert(\n                  show: _showAlert,\n                  showBorder: showBorderKnob,\n                  borderColor: borderColor,\n                  backgroundColor: backgroundColor,\n                  borderRadius: borderRadius,\n                  leading: showLeadingKnob\n                      ? Icon(\n                          MoonIcons.other_frame_24_light,\n                          color: leadingColor,\n                        )\n                      : null,\n                  label: SizedBox(\n                    height: 24,\n                    child: Align(\n                      alignment: AlignmentDirectional.centerStart,\n                      child: Text(\n                        \"Base MoonAlert\",\n                        style: TextStyle(color: labelColor),\n                      ),\n                    ),\n                  ),\n                  trailing: showTrailingKnob\n                      ? MoonButton.icon(\n                          buttonSize: MoonButtonSize.xs,\n                          borderRadius: borderRadius,\n                          disabledOpacityValue: 1,\n                          icon: Icon(\n                            MoonIcons.controls_close_small_24_light,\n                            color: trailingColor,\n                            size: 24,\n                          ),\n                          gap: 0,\n                          onTap: showDisabledKnob\n                              ? null\n                              : () => setState(() => _showAlert = !_showAlert),\n                        )\n                      : null,\n                  content: showContentKnob\n                      ? SizedBox(\n                          height: 24,\n                          child: Align(\n                            alignment: AlignmentDirectional.centerStart,\n                            child: Text(\n                              \"Here goes MoonAlert content\",\n                              style: TextStyle(color: contentColor),\n                            ),\n                          ),\n                        )\n                      : null,\n                ),\n                const SizedBox(height: 16),\n                MoonFilledButton(\n                  label: const Text(\"Show/Hide MoonAlert\"),\n                  backgroundColor: context.moonColors!.piccolo,\n                  onTap: () => setState(() => _showAlert = !_showAlert),\n                ),\n              ],\n            ),\n            const TextDivider(text: \"Filled MoonAlert variant\"),\n            MoonAlert.filled(\n              show: true,\n              color: context.moonColors!.chichi,\n              backgroundColor: context.moonColors!.chichi10,\n              borderRadius: borderRadius,\n              leading: showLeadingKnob\n                  ? const Icon(MoonIcons.notifications_alert_24_light)\n                  : null,\n              label: const Text(\"Filled error MoonAlert\"),\n              trailing: MoonButton.icon(\n                buttonSize: MoonButtonSize.xs,\n                borderRadius: borderRadius,\n                gap: 0,\n                onTap: () {},\n                icon: Icon(\n                  MoonIcons.controls_close_small_24_light,\n                  size: 24,\n                  color: context.moonColors!.chichi,\n                ),\n              ),\n              content: showContentKnob\n                  ? const SizedBox(\n                      height: 24,\n                      child: Align(\n                        alignment: AlignmentDirectional.centerStart,\n                        child: Text(\"Here goes MoonAlert content\"),\n                      ),\n                    )\n                  : null,\n            ),\n            const SizedBox(height: 16),\n            MoonAlert.filled(\n              show: true,\n              color: context.moonColors!.krillin,\n              backgroundColor: context.moonColors!.krillin10,\n              borderRadius: borderRadius,\n              leading: showLeadingKnob\n                  ? const Icon(MoonIcons.generic_alarm_round_24_light)\n                  : null,\n              label: const Text(\"Filled warning MoonAlert\"),\n              trailing: MoonButton.icon(\n                buttonSize: MoonButtonSize.xs,\n                borderRadius: borderRadius,\n                gap: 0,\n                onTap: () {},\n                icon: Icon(\n                  MoonIcons.controls_close_small_24_light,\n                  size: 24,\n                  color: context.moonColors!.krillin,\n                ),\n              ),\n              content: showContentKnob\n                  ? const SizedBox(\n                      height: 24,\n                      child: Align(\n                        alignment: AlignmentDirectional.centerStart,\n                        child: Text(\"Here goes MoonAlert content\"),\n                      ),\n                    )\n                  : null,\n            ),\n            const TextDivider(text: \"Outlined MoonAlert variant\"),\n            MoonAlert.outlined(\n              show: true,\n              color: context.moonColors!.roshi,\n              borderColor: context.moonColors!.roshi,\n              borderRadius: borderRadius,\n              leading: showLeadingKnob\n                  ? const Icon(MoonIcons.generic_check_rounded_24_light)\n                  : null,\n              label: const Text(\"Outlined success MoonAlert\"),\n              trailing: MoonButton.icon(\n                buttonSize: MoonButtonSize.xs,\n                borderRadius: borderRadius,\n                gap: 0,\n                onTap: () {},\n                icon: Icon(\n                  MoonIcons.controls_close_small_24_light,\n                  size: 24,\n                  color: context.moonColors!.roshi,\n                ),\n              ),\n              content: showContentKnob\n                  ? const SizedBox(\n                      height: 24,\n                      child: Align(\n                        alignment: AlignmentDirectional.centerStart,\n                        child: Text(\"Here goes MoonAlert content\"),\n                      ),\n                    )\n                  : null,\n            ),\n            const SizedBox(height: 16),\n            MoonAlert.outlined(\n              show: true,\n              color: context.moonColors!.whis,\n              borderColor: context.moonColors!.whis,\n              borderRadius: borderRadius,\n              leading: showLeadingKnob\n                  ? const Icon(MoonIcons.notifications_alert_24_light)\n                  : null,\n              label: const Text('Outlined info MoonAlert'),\n              trailing: MoonButton.icon(\n                buttonSize: MoonButtonSize.xs,\n                borderRadius: borderRadius,\n                gap: 0,\n                onTap: () {},\n                icon: Icon(\n                  MoonIcons.controls_close_small_24_light,\n                  size: 24,\n                  color: context.moonColors!.whis,\n                ),\n              ),\n              content: showContentKnob\n                  ? const SizedBox(\n                      height: 24,\n                      child: Align(\n                        alignment: AlignmentDirectional.centerStart,\n                        child: Text(\"Here goes MoonAlert content\"),\n                      ),\n                    )\n                  : null,\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/auth_code.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass AuthCodeStory extends StatelessWidget {\n  static const path = '/primitives/auth_code';\n\n  const AuthCodeStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final mainAxisAlignmentKnob = context.knobs.nullable.options(\n      label: \"mainAxisAlignment\",\n      description: \"Horizontal alignment for MoonAuthCode input fields.\",\n      enabled: false,\n      initial: MainAxisAlignment.center,\n      options: const [\n        Option(label: \"start\", value: MainAxisAlignment.start),\n        Option(label: \"center\", value: MainAxisAlignment.center),\n        Option(label: \"end\", value: MainAxisAlignment.end),\n        Option(label: \"spaceBetween\", value: MainAxisAlignment.spaceBetween),\n        Option(label: \"spaceAround\", value: MainAxisAlignment.spaceAround),\n        Option(label: \"spaceEvenly\", value: MainAxisAlignment.spaceEvenly),\n      ],\n    );\n\n    final shapeKnob = context.knobs.nullable.options(\n      label: \"shape\",\n      description: \"Shape of MoonAuthCode input fields.\",\n      enabled: false,\n      initial: AuthFieldShape.box,\n      options: const [\n        Option(label: \"box\", value: AuthFieldShape.box),\n        Option(label: \"circle\", value: AuthFieldShape.circle),\n        Option(label: \"underline\", value: AuthFieldShape.underline),\n      ],\n    );\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"Text color\",\n      description: \"MoonColors variants for MoonAuthCode text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final cursorColorKnob = context.knobs.nullable.options(\n      label: \"authFieldCursorColor\",\n      description: \"MoonColors variants for MoonAuthCode cursor.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final cursorColor = colorTable(context)[cursorColorKnob ?? 40];\n\n    final selectedFillColorKnob = context.knobs.nullable.options(\n      label: \"selectedFillColor\",\n      description: \"MoonColors variants for MoonAuthCode selected input field.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final selectedFillColor = colorTable(context)[selectedFillColorKnob ?? 40];\n\n    final activeFillColorKnob = context.knobs.nullable.options(\n      label: \"activeFillColor\",\n      description: \"MoonColors variants for MoonAuthCode active input field.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeFillColor = colorTable(context)[activeFillColorKnob ?? 40];\n\n    final inactiveFillColorKnob = context.knobs.nullable.options(\n      label: \"inactiveFillColor\",\n      description: \"MoonColors variants for MoonAuthCode inactive input field.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveFillColor = colorTable(context)[inactiveFillColorKnob ?? 40];\n\n    final selectedBorderColorKnob = context.knobs.nullable.options(\n      label: \"selectedBorderColor\",\n      description:\n          \"MoonColors variants for MoonAuthCode selected input field border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final selectedBorderColor =\n        colorTable(context)[selectedBorderColorKnob ?? 40];\n\n    final activeBorderColorKnob = context.knobs.nullable.options(\n      label: \"activeBorderColor\",\n      description:\n          \"MoonColors variants for MoonAuthCode active input field border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeBorderColor = colorTable(context)[activeBorderColorKnob ?? 40];\n\n    final inactiveBorderColorKnob = context.knobs.nullable.options(\n      label: \"inactiveBorderColor\",\n      description:\n          \"MoonColors variants for MoonAuthCode inactive input field border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveBorderColor =\n        colorTable(context)[inactiveBorderColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonAuthCode input fields.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final gapKnob = context.knobs.nullable.sliderInt(\n      label: \"gap\",\n      description: \"Gap between MoonAuthCode input fields.\",\n      enabled: false,\n      initial: 8,\n      max: 12,\n    );\n\n    final enableKnob = context.knobs.boolean(\n      label: \"enabled\",\n      description: \"Enable MoonAuthCode.\",\n    );\n\n    final obscuringKnob = context.knobs.boolean(\n      label: \"obscureText\",\n      description: \"Obscure MoonAuthCode input fields.\",\n    );\n\n    final peekWhenObscuringKnob = context.knobs.boolean(\n      label: \"peekWhenObscuring\",\n      description: \"Peek when obscuring.\",\n    );\n\n    final errorAnimationKnob = context.knobs.boolean(\n      label: \"Error shake animation\",\n      description:\n          \"Show error with shake animation (ErrorAnimationType.shake).\",\n    );\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          children: [\n            const TextDivider(\n              text: \"Disabled MoonAuthCode\",\n              paddingTop: 0,\n            ),\n            MoonAuthCode(\n              enabled: enableKnob,\n              enableInputFill: true,\n              authInputFieldCount: 4,\n              mainAxisAlignment:\n                  mainAxisAlignmentKnob ?? MainAxisAlignment.center,\n              borderRadius: borderRadius,\n              textStyle: TextStyle(color: textColor),\n              authFieldCursorColor: cursorColor,\n              selectedFillColor: selectedFillColor,\n              activeFillColor: activeFillColor,\n              inactiveFillColor: inactiveFillColor,\n              selectedBorderColor: selectedBorderColor,\n              activeBorderColor: activeBorderColor,\n              inactiveBorderColor: inactiveBorderColor,\n              gap: gapKnob?.toDouble(),\n              authFieldShape: shapeKnob,\n              obscureText: obscuringKnob,\n              peekWhenObscuring: peekWhenObscuringKnob,\n              validator: (String? value) => null,\n              errorBuilder: (BuildContext context, String? errorText) =>\n                  const SizedBox(),\n            ),\n            const TextDivider(text: \"Active MoonAuthCode\"),\n            MoonAuthCode(\n              autoFocus: true,\n              enableInputFill: true,\n              mainAxisAlignment:\n                  mainAxisAlignmentKnob ?? MainAxisAlignment.center,\n              borderRadius: borderRadius,\n              textStyle: TextStyle(color: textColor),\n              authFieldCursorColor: cursorColor,\n              selectedFillColor: selectedFillColor,\n              activeFillColor: activeFillColor,\n              inactiveFillColor: inactiveFillColor,\n              selectedBorderColor: selectedBorderColor,\n              activeBorderColor: activeBorderColor,\n              inactiveBorderColor: inactiveBorderColor,\n              gap: gapKnob?.toDouble(),\n              authFieldShape: shapeKnob,\n              obscureText: obscuringKnob,\n              peekWhenObscuring: peekWhenObscuringKnob,\n              validator: (String? value) => null,\n              errorBuilder: (BuildContext context, String? errorText) =>\n                  const SizedBox(),\n            ),\n            const TextDivider(text: \"Error MoonAuthCode\"),\n            SizedBox(\n              height: 95,\n              child: MoonAuthCode(\n                enableInputFill: true,\n                authInputFieldCount: 4,\n                mainAxisAlignment:\n                    mainAxisAlignmentKnob ?? MainAxisAlignment.center,\n                errorAnimationType: errorAnimationKnob\n                    ? ErrorAnimationType.shake\n                    : ErrorAnimationType.noAnimation,\n                borderRadius: borderRadius,\n                textStyle: TextStyle(color: textColor),\n                authFieldCursorColor: cursorColor,\n                selectedFillColor: selectedFillColor,\n                activeFillColor: activeFillColor,\n                inactiveFillColor: inactiveFillColor,\n                selectedBorderColor: selectedBorderColor,\n                activeBorderColor: activeBorderColor,\n                inactiveBorderColor: inactiveBorderColor,\n                gap: gapKnob?.toDouble(),\n                authFieldShape: shapeKnob,\n                obscureText: obscuringKnob,\n                peekWhenObscuring: peekWhenObscuringKnob,\n                validator: (String? pin) {\n                  return (pin != null && pin != '0000' && pin.length == 4)\n                      ? 'The input must be exactly \"0000\".'\n                      : null;\n                },\n                errorBuilder: (BuildContext context, String? errorText) {\n                  return Align(\n                    child: Padding(\n                      padding: const EdgeInsets.only(top: 8),\n                      child: Text(errorText ?? ''),\n                    ),\n                  );\n                },\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/avatar.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass AvatarStory extends StatelessWidget {\n  static const path = '/primitives/avatar';\n\n  const AvatarStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final customLabelTextKnob = context.knobs.text(\n      label: \"Content text\",\n      initial: \"MD\",\n    );\n\n    final avatarSizeKnob = context.knobs.nullable.options(\n      label: \"avatarSize\",\n      description: \"Size variants for MoonAvatar.\",\n      enabled: false,\n      initial: MoonAvatarSize.md,\n      options: const [\n        Option(label: \"xs\", value: MoonAvatarSize.xs),\n        Option(label: \"sm\", value: MoonAvatarSize.sm),\n        Option(label: \"md\", value: MoonAvatarSize.md),\n        Option(label: \"lg\", value: MoonAvatarSize.lg),\n        Option(label: \"xl\", value: MoonAvatarSize.xl),\n        Option(label: \"x2l\", value: MoonAvatarSize.x2l),\n      ],\n    );\n\n    final avatarTextColorKnob = context.knobs.nullable.options(\n      label: \"textColor\",\n      description: \"MoonColors variants for MoonAvatar text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[avatarTextColorKnob ?? 40];\n\n    final avatarBackgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonAvatar background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor =\n        colorTable(context)[avatarBackgroundColorKnob ?? 40];\n\n    final badgeColorKnob = context.knobs.nullable.options(\n      label: \"badgeColor\",\n      description: \"MoonColors variants for MoonAvatar badge.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final badgeColor = colorTable(context)[badgeColorKnob ?? 40];\n\n    final avatarBadgeAlignmentKnob = context.knobs.nullable.options(\n      label: \"badgeAlignment\",\n      description: \"Badge alignment for MoonAvatar.\",\n      enabled: false,\n      initial: MoonBadgeAlignment.bottomRight,\n      options: const [\n        Option(label: \"topLeft\", value: MoonBadgeAlignment.topLeft),\n        Option(label: \"topRight\", value: MoonBadgeAlignment.topRight),\n        Option(label: \"bottomLeft\", value: MoonBadgeAlignment.bottomLeft),\n        Option(label: \"bottomRight\", value: MoonBadgeAlignment.bottomRight),\n      ],\n    );\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonAvatar.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final badgeMarginKnob = context.knobs.nullable.sliderInt(\n      label: \"badgeMarginValue\",\n      description: \"Badge margin value for MoonAvatar.\",\n      enabled: false,\n      initial: 4,\n      max: 8,\n    );\n\n    final badgeSizeKnob = context.knobs.nullable.sliderInt(\n      label: \"badgeSize\",\n      description: \"Badge size for MoonAvatar.\",\n      enabled: false,\n      initial: 8,\n      max: 16,\n    );\n\n    final showBadgeKnob = context.knobs.boolean(\n      label: \"showBadge\",\n      description: \"Show MoonAvatar badge.\",\n      initial: true,\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          mainAxisAlignment: MainAxisAlignment.center,\n          children: [\n            const TextDivider(\n              text: \"MoonAvatar\",\n              paddingTop: 0,\n            ),\n            MoonAvatar(\n              avatarSize: avatarSizeKnob,\n              badgeSize: badgeSizeKnob?.toDouble(),\n              borderRadius: borderRadiusKnob != null\n                  ? BorderRadius.circular(borderRadiusKnob.toDouble())\n                  : null,\n              badgeMarginValue: badgeMarginKnob?.toDouble(),\n              backgroundColor: backgroundColor,\n              showBadge: showBadgeKnob,\n              badgeColor: badgeColor,\n              badgeAlignment:\n                  avatarBadgeAlignmentKnob ?? MoonBadgeAlignment.bottomRight,\n              content: Padding(\n                padding: const EdgeInsets.only(top: 1.0),\n                child: Text(\n                  customLabelTextKnob,\n                  style: TextStyle(color: textColor),\n                ),\n              ),\n            ),\n            const TextDivider(text: \"Custom MoonAvatar with image background\"),\n            MoonAvatar(\n              avatarSize: avatarSizeKnob,\n              badgeSize: badgeSizeKnob?.toDouble(),\n              borderRadius: borderRadiusKnob != null\n                  ? BorderRadius.circular(borderRadiusKnob.toDouble())\n                  : null,\n              badgeMarginValue: badgeMarginKnob?.toDouble(),\n              backgroundColor: backgroundColor,\n              showBadge: showBadgeKnob,\n              badgeColor: badgeColor,\n              badgeAlignment:\n                  avatarBadgeAlignmentKnob ?? MoonBadgeAlignment.bottomRight,\n              backgroundImage:\n                  const AssetImage(\"assets/images/placeholder-640x359.png\"),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/bottom_sheet.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass BottomSheetStory extends StatelessWidget {\n  static const path = '/primitives/bottom_sheet';\n\n  const BottomSheetStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonBottomSheet background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final barrierColorKnob = context.knobs.nullable.options(\n      label: \"barrierColor\",\n      description: \"MoonColors variants for MoonBottomSheet barrier.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final barrierColor = colorTable(context)[barrierColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonBottomSheet.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final heightKnob = context.knobs.nullable.slider(\n      label: \"height\",\n      description: \"Height of MoonBottomSheet.\",\n      enabled: false,\n      initial: 0.64,\n      min: 0.1,\n    );\n\n    final closeProgressThresholdKnob = context.knobs.nullable.slider(\n      label: \"closeProgressThreshold\",\n      description: \"Close progress threshold for MoonBottomSheet.\",\n      enabled: false,\n      initial: 0.6,\n    );\n\n    Future<dynamic> bottomSheetBuilder(BuildContext context) {\n      return showMoonModalBottomSheet(\n        context: context,\n        backgroundColor: backgroundColor,\n        barrierColor: barrierColor,\n        height: heightKnob != null\n            ? MediaQuery.of(context).size.height * heightKnob\n            : MediaQuery.of(context).size.height * 0.7,\n        closeProgressThreshold: closeProgressThresholdKnob,\n        borderRadius: borderRadiusKnob != null\n            ? BorderRadius.circular(borderRadiusKnob.toDouble())\n            : null,\n        builder: (BuildContext context) => Column(\n          children: [\n            Container(\n              height: 4,\n              width: 40,\n              margin: const EdgeInsets.symmetric(vertical: 8),\n              decoration: ShapeDecoration(\n                color: context.moonColors!.beerus,\n                shape: const StadiumBorder(),\n              ),\n            ),\n            Row(\n              children: [\n                const SizedBox(width: 48),\n                Expanded(\n                  child: Center(\n                    child: Text(\n                      'Pick your choice!',\n                      style: MoonTypography.typography.body.text16,\n                    ),\n                  ),\n                ),\n                SizedBox(\n                  width: 48,\n                  height: 48,\n                  child: Align(\n                    alignment: Alignment.centerLeft,\n                    child: MoonButton.icon(\n                      icon: const Icon(MoonIcons.controls_close_small_16_light),\n                      buttonSize: MoonButtonSize.sm,\n                      backgroundColor: context.moonColors!.beerus,\n                      borderRadius: BorderRadius.circular(24),\n                      onTap: () => Navigator.of(context).pop(),\n                    ),\n                  ),\n                ),\n              ],\n            ),\n            Divider(\n              height: 0,\n              thickness: 1,\n              color: context.moonColors!.beerus,\n            ),\n            Expanded(\n              child: ListView.builder(\n                primary: true,\n                itemCount: 100,\n                padding: EdgeInsets.zero,\n                itemBuilder: (BuildContext _, int index) => Padding(\n                  padding: const EdgeInsets.all(16),\n                  child: Row(\n                    mainAxisAlignment: MainAxisAlignment.spaceBetween,\n                    children: [\n                      const Text(\"Item nr:\"),\n                      Text(\"$index\"),\n                    ],\n                  ),\n                ),\n              ),\n            ),\n          ],\n        ),\n      );\n    }\n\n    return Center(\n      child: Builder(\n        builder: (BuildContext context) {\n          return MoonFilledButton(\n            label: const Text(\"Tap me\"),\n            onTap: () => bottomSheetBuilder(context),\n          );\n        },\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/breadcrumb.dart",
    "content": "import 'dart:math';\n\nimport 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass BreadcrumbStory extends StatefulWidget {\n  static const path = '/primitives/breadcrumb';\n\n  const BreadcrumbStory({super.key});\n\n  @override\n  State<BreadcrumbStory> createState() => _BreadcrumbStoryState();\n}\n\nclass _BreadcrumbStoryState extends State<BreadcrumbStory> {\n  bool _showDropdown = false;\n\n  @override\n  Widget build(BuildContext context) {\n    final itemColorKnob = context.knobs.nullable.options(\n      label: \"Item color\",\n      description: \"MoonColors variants for MoonBreadcrumb item.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final itemColor = colorTable(context)[itemColorKnob ?? 40];\n\n    final currentItemColorKnob = context.knobs.nullable.options(\n      label: \"Current item color\",\n      description: \"MoonColors variants for MoonBreadcrumb current item.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final currentItemColor = colorTable(context)[currentItemColorKnob ?? 40];\n\n    final hoverEffectColorKnob = context.knobs.nullable.options(\n      label: \"hoverEffectColor\",\n      description: \"MoonColors variants for MoonBreadcrumb item on hover.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final hoverEffectColor = colorTable(context)[hoverEffectColorKnob ?? 40];\n\n    final dividerColorKnob = context.knobs.nullable.options(\n      label: \"dividerColor\",\n      description: \"MoonColors variants for MoonBreadcrumb divider.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final dividerColor = colorTable(context)[dividerColorKnob ?? 40];\n\n    final itemCountKnob = context.knobs.nullable.sliderInt(\n      label: \"Item count\",\n      description: \"Total count of items for MoonBreadcrumb.\",\n      enabled: false,\n      initial: 7,\n      max: 12,\n    );\n\n    final visibleItemCountKnob = context.knobs.nullable.sliderInt(\n      label: \"visibleItemCount\",\n      description: \"Number of items to display for MoonBreadcrumb.\",\n      enabled: false,\n      initial: 3,\n      max: 12,\n    );\n\n    final gapKnob = context.knobs.nullable.sliderInt(\n      label: \"gap\",\n      description: \"Gap between MoonBreadcrumb items.\",\n      enabled: false,\n      initial: 8,\n      max: 16,\n    );\n\n    final showLeadingKnob = context.knobs.boolean(\n      label: \"leading\",\n      description: \"Show widget in MoonBreadcrumb item leading slot.\",\n    );\n\n    final showTrailingKnob = context.knobs.boolean(\n      label: \"trailing\",\n      description: \"Show widget in MoonBreadcrumb item trailing slot.\",\n    );\n\n    final List<MoonBreadcrumbItem> breadcrumbItems = List.generate(\n      itemCountKnob ?? 7,\n      (int index) {\n        final bool isHomePage = index == 0;\n\n        return MoonBreadcrumbItem(\n          semanticLabel: index.toString(),\n          onTap: () => MoonToast.show(\n            context,\n            displayDuration: const Duration(seconds: 1),\n            label: Text(isHomePage ? 'Home Page' : 'Page $index'),\n          ),\n          leading: showLeadingKnob && isHomePage\n              ? const Icon(\n                  MoonIcons.generic_home_16_light,\n                  size: 16,\n                )\n              : null,\n          label: Text(isHomePage ? 'Home' : 'Page $index'),\n          trailing: showTrailingKnob && isHomePage\n              ? const Icon(\n                  MoonIcons.generic_home_16_light,\n                  size: 16,\n                )\n              : null,\n        );\n      },\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          mainAxisAlignment: MainAxisAlignment.center,\n          children: [\n            const TextDivider(\n              text: \"MoonBreadcrumb\",\n              paddingTop: 0,\n            ),\n            MoonBreadcrumb(\n              visibleItemCount: visibleItemCountKnob ?? 3,\n              gap: gapKnob?.toDouble(),\n              padding: const EdgeInsets.symmetric(horizontal: 16),\n              hoverEffectColor: hoverEffectColor,\n              dividerColor: dividerColor,\n              itemTextStyle: TextStyle(color: itemColor),\n              currentItemTextStyle: TextStyle(color: currentItemColor),\n              items: breadcrumbItems,\n            ),\n            const SizedBox(height: 32),\n            MoonButton(\n              backgroundColor: context.moonColors!.piccolo,\n              onTap: () => setState(() => {}),\n              label: Text(\n                'Reset',\n                style: TextStyle(color: context.moonColors!.goten),\n              ),\n            ),\n            const TextDivider(text: \"Custom MoonBreadcrumb with MoonDropdown\"),\n            StatefulBuilder(\n              builder: (BuildContext context, StateSetter setState) {\n                return MoonBreadcrumb(\n                  visibleItemCount: visibleItemCountKnob ?? 3,\n                  gap: gapKnob?.toDouble(),\n                  padding: const EdgeInsets.symmetric(horizontal: 16),\n                  hoverEffectColor: hoverEffectColor,\n                  dividerColor: dividerColor,\n                  itemTextStyle: TextStyle(color: itemColor),\n                  currentItemTextStyle: TextStyle(color: currentItemColor),\n                  itemDecoration: BoxDecoration(\n                    borderRadius: BorderRadius.circular(8),\n                  ),\n                  divider: Icon(\n                    Directionality.of(context) == TextDirection.ltr\n                        ? MoonIcons.controls_chevron_right_small_16_light\n                        : MoonIcons.controls_chevron_left_small_16_light,\n                  ),\n                  showMoreWidget: MoonBreadcrumbItem(\n                    onTap: () => setState(() => _showDropdown = !_showDropdown),\n                    label: MoonDropdown(\n                      maxHeight: 250,\n                      maxWidth: 150,\n                      show: _showDropdown,\n                      onTapOutside: () => setState(() => _showDropdown = false),\n                      content: ListView(\n                        shrinkWrap: true,\n                        padding: EdgeInsets.zero,\n                        children: List.generate(\n                          max(\n                            (itemCountKnob ?? 7) - (visibleItemCountKnob ?? 3),\n                            0,\n                          ),\n                          (int index) => MoonMenuItem(\n                            onTap: () => MoonToast.show(\n                              context,\n                              displayDuration: const Duration(seconds: 1),\n                              label: Text('Page ${index + 1}'),\n                            ),\n                            label: Text('Page ${index + 1}'),\n                          ),\n                        ),\n                      ),\n                      child: const Icon(\n                        MoonIcons.generic_burger_regular_16_light,\n                      ),\n                    ),\n                  ),\n                  items: breadcrumbItems,\n                );\n              },\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/button.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass ButtonStory extends StatelessWidget {\n  static const path = '/primitives/button';\n\n  const ButtonStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final customLabelTextKnob = context.knobs.text(\n      label: \"Label text\",\n      initial: \"MoonButton\",\n    );\n\n    final buttonSizeKnob = context.knobs.nullable.options(\n      label: \"buttonSize\",\n      description: \"Size variants for MoonButton.\",\n      enabled: false,\n      initial: MoonButtonSize.md,\n      options: const [\n        Option(label: \"xs\", value: MoonButtonSize.xs),\n        Option(label: \"sm\", value: MoonButtonSize.sm),\n        Option(label: \"md\", value: MoonButtonSize.md),\n        Option(label: \"lg\", value: MoonButtonSize.lg),\n        Option(label: \"xl\", value: MoonButtonSize.xl),\n      ],\n    );\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for base MoonButton background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderColorKnob = context.knobs.nullable.options(\n      label: \"borderColor\",\n      description: \"MoonColors variants for MoonButton border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final borderColor = colorTable(context)[borderColorKnob ?? 40];\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"textColor\",\n      description: \"MoonColors variants for MoonButton text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for base MoonButton.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final showBorderKnob = context.knobs.boolean(\n      label: \"showBorder\",\n      description: \"Show border for base MoonButton.\",\n      initial: true,\n    );\n\n    final showPulseEffectKnob = context.knobs.boolean(\n      label: \"showPulseEffect\",\n      description: \"Show pulse animation.\",\n    );\n\n    final showPulseEffectJiggleKnob = context.knobs.boolean(\n      label: \"showPulseEffectJiggle\",\n      description: \"Show jiggling with pulse animation.\",\n    );\n\n    final showLeadingKnob = context.knobs.boolean(\n      label: \"leading\",\n      description: \"Show widget in MoonButton leading slot.\",\n      initial: true,\n    );\n\n    final showLabelKnob = context.knobs.boolean(\n      label: \"label\",\n      description: \"Show widget in MoonButton label slot.\",\n      initial: true,\n    );\n\n    final showTrailingKnob = context.knobs.boolean(\n      label: \"trailing\",\n      description: \"Show widget in MoonButton trailing slot.\",\n    );\n\n    final setFullWidthKnob = context.knobs.boolean(\n      label: \"isFullWidth\",\n      description: \"Set MoonButton to full width.\",\n    );\n\n    final isDisabledKnob = context.knobs.boolean(\n      label: \"Disabled\",\n      description: \"MoonButton onTap() or onLongPress() is null.\",\n    );\n\n    IconData resolveIconVariant(MoonButtonSize? buttonSize) {\n      switch (buttonSize) {\n        case MoonButtonSize.xs:\n          return MoonIcons.other_frame_16_light;\n        case MoonButtonSize.sm:\n          return MoonIcons.other_frame_24_light;\n        case MoonButtonSize.md:\n          return MoonIcons.other_frame_24_light;\n        case MoonButtonSize.lg:\n          return MoonIcons.other_frame_24_light;\n        case MoonButtonSize.xl:\n          return MoonIcons.other_frame_24_light;\n        default:\n          return MoonIcons.other_frame_24_light;\n      }\n    }\n\n    final IconData resolvedIconVariant = resolveIconVariant(buttonSizeKnob);\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          children: [\n            const TextDivider(\n              text: \"Base and icon MoonButton\",\n              paddingTop: 0,\n            ),\n            MoonButton(\n              onTap: isDisabledKnob ? null : () {},\n              borderRadius: borderRadius,\n              showBorder: showBorderKnob,\n              buttonSize: buttonSizeKnob,\n              isFullWidth: setFullWidthKnob,\n              backgroundColor: backgroundColor,\n              borderColor: borderColor,\n              textColor: textColor,\n              showPulseEffect: showPulseEffectKnob,\n              showPulseEffectJiggle: showPulseEffectJiggleKnob,\n              leading: showLeadingKnob ? Icon(resolvedIconVariant) : null,\n              label: showLabelKnob ? Text(customLabelTextKnob) : null,\n              trailing: showTrailingKnob ? Icon(resolvedIconVariant) : null,\n            ),\n            const SizedBox(height: 32),\n            MoonButton.icon(\n              onTap: isDisabledKnob ? null : () {},\n              borderRadius: borderRadius,\n              showBorder: showBorderKnob,\n              buttonSize: buttonSizeKnob,\n              backgroundColor: backgroundColor,\n              iconColor: textColor,\n              borderColor: borderColor,\n              showPulseEffect: showPulseEffectKnob,\n              showPulseEffectJiggle: showPulseEffectJiggleKnob,\n              icon: showLeadingKnob ? Icon(resolvedIconVariant) : null,\n            ),\n            const TextDivider(text: \"MoonButton variants\"),\n            MoonFilledButton(\n              onTap: isDisabledKnob ? null : () {},\n              buttonSize: buttonSizeKnob,\n              isFullWidth: setFullWidthKnob,\n              showPulseEffect: showPulseEffectKnob,\n              leading: showLeadingKnob ? Icon(resolvedIconVariant) : null,\n              label: showLabelKnob ? const Text(\"MoonFilledButton\") : null,\n              trailing: showTrailingKnob ? Icon(resolvedIconVariant) : null,\n            ),\n            const SizedBox(height: 32),\n            MoonOutlinedButton(\n              onTap: isDisabledKnob ? null : () {},\n              buttonSize: buttonSizeKnob,\n              isFullWidth: setFullWidthKnob,\n              showPulseEffect: showPulseEffectKnob,\n              borderColor: borderColor,\n              leading: showLeadingKnob ? Icon(resolvedIconVariant) : null,\n              label: showLabelKnob ? const Text(\"MoonOutlinedButton\") : null,\n              trailing: showTrailingKnob ? Icon(resolvedIconVariant) : null,\n            ),\n            const SizedBox(height: 32),\n            MoonTextButton(\n              onTap: isDisabledKnob ? null : () {},\n              buttonSize: buttonSizeKnob,\n              isFullWidth: setFullWidthKnob,\n              showPulseEffect: showPulseEffectKnob,\n              leading: showLeadingKnob ? Icon(resolvedIconVariant) : null,\n              label: showLabelKnob ? const Text(\"MoonTextButton\") : null,\n              trailing: showTrailingKnob ? Icon(resolvedIconVariant) : null,\n            ),\n            const TextDivider(\n              text: \"Custom MoonButtons with non-standard children\",\n            ),\n            MoonButton(\n              onTap: isDisabledKnob ? null : () {},\n              height: 40,\n              padding: const EdgeInsets.symmetric(horizontal: 8),\n              showFocusEffect: false,\n              decoration: const ShapeDecoration(\n                image: DecorationImage(\n                  image: AssetImage(\"assets/images/placeholder-640x359.png\"),\n                  fit: BoxFit.cover,\n                ),\n                shape: RoundedRectangleBorder(\n                  borderRadius: BorderRadius.only(\n                    topLeft: Radius.circular(20),\n                    bottomRight: Radius.circular(20),\n                  ),\n                ),\n              ),\n              leading: Container(\n                width: 24,\n                height: 24,\n                padding: const EdgeInsets.all(4),\n                child: CircularProgressIndicator(\n                  strokeWidth: 2,\n                  color: context.moonColors!.popo,\n                ),\n              ),\n            ),\n            const SizedBox(height: 32),\n            MoonButton(\n              onTap: isDisabledKnob ? null : () {},\n              height: 72,\n              padding: const EdgeInsets.symmetric(horizontal: 8),\n              showFocusEffect: false,\n              decoration: ShapeDecorationWithPremultipliedAlpha(\n                shadows: const [\n                  BoxShadow(\n                    blurRadius: 3,\n                    offset: Offset(0, 2),\n                  ),\n                ],\n                gradient: LinearGradient(\n                  begin: Alignment.topLeft,\n                  end: Alignment.bottomRight,\n                  colors: [\n                    context.moonColors!.krillin,\n                    context.moonColors!.dodoria,\n                  ],\n                ),\n                shape: const StarBorder(\n                  pointRounding: 0.5,\n                  valleyRounding: 0.5,\n                ),\n              ),\n              label: SizedBox(\n                width: 32,\n                height: 32,\n                child: CircleAvatar(\n                  backgroundColor: context.moonColors!.frieza60,\n                  child: const Icon(\n                    MoonIcons.other_rocket_24_light,\n                    size: 24,\n                    color: Colors.white,\n                  ),\n                ),\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/carousel.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass CarouselStory extends StatefulWidget {\n  static const path = '/primitives/carousel';\n\n  const CarouselStory({super.key});\n\n  @override\n  State<CarouselStory> createState() => _CarouselStoryState();\n}\n\nclass _CarouselStoryState extends State<CarouselStory> {\n  MoonCarouselScrollController carouselController =\n      MoonCarouselScrollController();\n\n  int selectedDot = 0;\n\n  @override\n  Widget build(BuildContext context) {\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"Background color\",\n      description: \"MoonColors variants for MoonCarousel item background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final itemExtentKnob = context.knobs.nullable.sliderInt(\n      label: \"itemExtent\",\n      description: \"Extent for MoonCarousel item.\",\n      enabled: false,\n      initial: 114,\n      min: 1,\n      max: MediaQuery.of(context).size.width.round(),\n    );\n\n    final gapKnob = context.knobs.nullable.sliderInt(\n      label: \"gap\",\n      description: \"Gap between MoonCarousel items.\",\n      enabled: false,\n      initial: 8,\n      max: 64,\n    );\n\n    final anchorKnob = context.knobs.nullable.slider(\n      label: \"anchor\",\n      description: \"Anchor placement for MoonCarousel.\",\n      enabled: false,\n      initial: 0.04,\n    );\n\n    final velocityFactorKnob = context.knobs.nullable.slider(\n      label: \"velocityFactor\",\n      description: \"Velocity factor for MoonCarousel.\",\n      enabled: false,\n      min: 0.1,\n      initial: 0.5,\n    );\n\n    final autoPlayKnob = context.knobs.boolean(\n      label: \"autoPlay\",\n      description: \"Whether MoonCarousel is auto playing.\",\n    );\n\n    final isCenteredKnob = context.knobs.boolean(\n      label: \"isCentered\",\n      description: \"Whether MoonCarousel items are centered.\",\n    );\n\n    final isLoopedKnob = context.knobs.boolean(\n      label: \"loop\",\n      description: \"Whether MoonCarousel is looped (infinite scroll).\",\n    );\n\n    final clampMaxExtentKnob = context.knobs.boolean(\n      label: \"clampMaxExtent\",\n      description: \"Whether to clamp the maxExtent of MoonCarousel.\",\n      initial: true,\n    );\n\n    return Center(\n      child: LayoutBuilder(\n        builder: (BuildContext context, BoxConstraints constraints) {\n          return SingleChildScrollView(\n            padding: const EdgeInsets.symmetric(\n              vertical: 64.0,\n              horizontal: 16.0,\n            ),\n            child: Column(\n              children: [\n                const TextDivider(\n                  text: \"MoonCarousel\",\n                  paddingTop: 0,\n                ),\n                SizedBox(\n                  height: 114,\n                  child: OverflowBox(\n                    maxWidth: constraints.maxWidth,\n                    child: MoonCarousel(\n                      gap: gapKnob?.toDouble() ?? 8,\n                      velocityFactor: velocityFactorKnob ?? 0.5,\n                      loop: isLoopedKnob,\n                      autoPlay: autoPlayKnob,\n                      isCentered: isCenteredKnob,\n                      itemCount: 10,\n                      itemExtent: itemExtentKnob?.toDouble() ?? 114,\n                      anchor: anchorKnob ?? 16 / (constraints.maxWidth - 16),\n                      clampMaxExtent: clampMaxExtentKnob,\n                      itemBuilder: (\n                        BuildContext context,\n                        int itemIndex,\n                        int _,\n                      ) =>\n                          Container(\n                        decoration: ShapeDecoration(\n                          color: backgroundColor ?? context.moonColors!.goku,\n                          shape: MoonSquircleBorder(\n                            borderRadius: BorderRadius.circular(12)\n                                .squircleBorderRadius(context),\n                          ),\n                        ),\n                        child: Center(\n                          child: Text(\"${itemIndex + 1}\"),\n                        ),\n                      ),\n                    ),\n                  ),\n                ),\n                const TextDivider(text: \"Custom MoonCarousel with extras\"),\n                Column(\n                  children: [\n                    SizedBox(\n                      height: 180,\n                      child: OverflowBox(\n                        maxWidth: constraints.maxWidth,\n                        child: Stack(\n                          children: [\n                            MoonCarousel(\n                              gap: 64,\n                              itemCount: 5,\n                              itemExtent: constraints.maxWidth - 64,\n                              loop: isLoopedKnob,\n                              autoPlay: autoPlayKnob,\n                              controller: carouselController,\n                              physics: const PageScrollPhysics(),\n                              onIndexChanged: (int index) =>\n                                  setState(() => selectedDot = index),\n                              itemBuilder: (\n                                BuildContext context,\n                                int itemIndex,\n                                int _,\n                              ) =>\n                                  Container(\n                                decoration: ShapeDecoration(\n                                  color: backgroundColor ??\n                                      context.moonColors!.goku,\n                                  shape: MoonSquircleBorder(\n                                    borderRadius: BorderRadius.circular(12)\n                                        .squircleBorderRadius(context),\n                                  ),\n                                ),\n                                child: Center(\n                                  child: Text(\"${itemIndex + 1}\"),\n                                ),\n                              ),\n                            ),\n                            Align(\n                              child: Padding(\n                                padding: const EdgeInsets.symmetric(\n                                  horizontal: 16.0,\n                                ),\n                                child: Row(\n                                  mainAxisAlignment:\n                                      MainAxisAlignment.spaceBetween,\n                                  children: [\n                                    MoonButton.icon(\n                                      buttonSize: MoonButtonSize.sm,\n                                      showBorder: true,\n                                      icon: Icon(\n                                        Directionality.of(context) ==\n                                                TextDirection.ltr\n                                            ? MoonIcons\n                                                .controls_chevron_left_small_24_light\n                                            : MoonIcons\n                                                .controls_chevron_right_small_24_light,\n                                      ),\n                                      decoration:\n                                          ShapeDecorationWithPremultipliedAlpha(\n                                        color: context.moonColors!.goku,\n                                        shadows: context.moonShadows!.sm,\n                                        shape: MoonSquircleBorder(\n                                          borderRadius: BorderRadius.circular(8)\n                                              .squircleBorderRadius(context),\n                                        ),\n                                      ),\n                                      onTap: selectedDot == 0 && !isLoopedKnob\n                                          ? null\n                                          : () =>\n                                              carouselController.previousItem(),\n                                    ),\n                                    MoonButton.icon(\n                                      buttonSize: MoonButtonSize.sm,\n                                      showBorder: true,\n                                      icon: Icon(\n                                        Directionality.of(context) ==\n                                                TextDirection.ltr\n                                            ? MoonIcons\n                                                .controls_chevron_right_small_24_light\n                                            : MoonIcons\n                                                .controls_chevron_left_small_24_light,\n                                      ),\n                                      decoration:\n                                          ShapeDecorationWithPremultipliedAlpha(\n                                        color: context.moonColors!.goku,\n                                        shadows: context.moonShadows!.sm,\n                                        shape: MoonSquircleBorder(\n                                          borderRadius: BorderRadius.circular(8)\n                                              .squircleBorderRadius(context),\n                                        ),\n                                      ),\n                                      onTap: selectedDot == 4 && !isLoopedKnob\n                                          ? null\n                                          : () => carouselController.nextItem(),\n                                    ),\n                                  ],\n                                ),\n                              ),\n                            ),\n                          ],\n                        ),\n                      ),\n                    ),\n                    const SizedBox(height: 16),\n                    MoonDotIndicator(\n                      selectedDot: selectedDot,\n                      dotCount: 5,\n                    ),\n                  ],\n                ),\n              ],\n            ),\n          );\n        },\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/checkbox.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass CheckboxStory extends StatefulWidget {\n  static const path = '/primitives/checkbox';\n\n  const CheckboxStory({super.key});\n\n  @override\n  State<CheckboxStory> createState() => _CheckboxStoryState();\n}\n\nclass _CheckboxStoryState extends State<CheckboxStory> {\n  bool? checkboxValue = false;\n  bool? checkboxWithLabelValue = false;\n\n  @override\n  Widget build(BuildContext context) {\n    final checkColorKnob = context.knobs.nullable.options(\n      label: \"checkColor\",\n      description: \"MoonColors variants for MoonCheckbox check icon.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final checkColor = colorTable(context)[checkColorKnob ?? 40];\n\n    final activeColorKnob = context.knobs.nullable.options(\n      label: \"activeColor\",\n      description: \"MoonColors variants for checked MoonCheckbox.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeColor = colorTable(context)[activeColorKnob ?? 40];\n\n    final inactiveColorKnob = context.knobs.nullable.options(\n      label: \"inactiveColor\",\n      description: \"MoonColors variants for unchecked MoonCheckbox.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveColor = colorTable(context)[inactiveColorKnob ?? 40];\n\n    final borderColorKnob = context.knobs.nullable.options(\n      label: \"borderColor\",\n      description: \"MoonColors variants for unchecked MoonCheckbox border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final borderColor = colorTable(context)[borderColorKnob ?? 40];\n\n    final isTristateKnob = context.knobs.boolean(\n      label: \"tristate\",\n      description: \"Whether MoonCheckbox uses tristate.\",\n    );\n\n    final isDisabledKnob = context.knobs.boolean(\n      label: \"Disabled\",\n      description: \"MoonCheckbox onChanged() is null.\",\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          mainAxisAlignment: MainAxisAlignment.center,\n          children: [\n            const TextDivider(\n              text: \"MoonCheckbox\",\n              paddingTop: 0,\n            ),\n            MoonCheckbox(\n              activeColor: activeColor,\n              inactiveColor: inactiveColor,\n              checkColor: checkColor,\n              borderColor: borderColor,\n              tristate: isTristateKnob,\n              value: checkboxValue,\n              onChanged: isDisabledKnob\n                  ? null\n                  : (bool? newValue) =>\n                      setState(() => checkboxValue = newValue),\n            ),\n            const TextDivider(text: \"MoonCheckbox with label\"),\n            MoonMenuItem(\n              absorbGestures: true,\n              onTap: isDisabledKnob\n                  ? null\n                  : () => setState(\n                        () => switch (checkboxWithLabelValue) {\n                          true when isTristateKnob => checkboxWithLabelValue =\n                              null,\n                          false when isTristateKnob => checkboxWithLabelValue =\n                              true,\n                          null => checkboxWithLabelValue = false,\n                          _ => checkboxWithLabelValue =\n                              !checkboxWithLabelValue!,\n                        },\n                      ),\n              label: const Text(\"With label\"),\n              trailing: MoonCheckbox(\n                activeColor: activeColor,\n                inactiveColor: inactiveColor,\n                checkColor: checkColor,\n                tristate: isTristateKnob,\n                value: checkboxWithLabelValue,\n                tapAreaSizeValue: 0,\n                onChanged: isDisabledKnob ? null : (_) {},\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/chip.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass ChipStory extends StatelessWidget {\n  static const path = '/primitives/chip';\n\n  const ChipStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final customLabelTextKnob = context.knobs.text(\n      label: \"Label text\",\n      initial: \"MoonChip\",\n    );\n\n    final chipSizeKnob = context.knobs.nullable.options(\n      label: \"chipSize\",\n      description: \"Size variants for MoonChip.\",\n      enabled: false,\n      initial: MoonChipSize.md,\n      options: const [\n        Option(label: \"sm\", value: MoonChipSize.sm),\n        Option(label: \"md\", value: MoonChipSize.md),\n      ],\n    );\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"textColor\",\n      description: \"MoonColors variants for MoonChip text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final activeColorKnob = context.knobs.nullable.options(\n      label: \"activeColor\",\n      description: \"MoonColors variants for active MoonChip.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeColor = colorTable(context)[activeColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonChip background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final activeBackgroundColorKnob = context.knobs.nullable.options(\n      label: \"activeBackgroundColor\",\n      description: \"MoonColors variants for active MoonChip background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeBackgroundColor =\n        colorTable(context)[activeBackgroundColorKnob ?? 40];\n\n    final borderColorKnob = context.knobs.nullable.options(\n      label: \"borderColor\",\n      description: \"MoonColors variants for MoonChip border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final borderColor = colorTable(context)[borderColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonChip.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final showBorderKnob = context.knobs.boolean(\n      label: \"showBorder\",\n      description: \"Show border when hovered, focused or isActive is true.\",\n    );\n\n    final isActiveKnob = context.knobs.boolean(\n      label: \"isActive\",\n      description: \"Whether MoonChip is active/selected.\",\n    );\n\n    final showLeadingKnob = context.knobs.boolean(\n      label: \"leading\",\n      description: \"Show widget in MoonChip leading slot.\",\n      initial: true,\n    );\n\n    final showLabelKnob = context.knobs.boolean(\n      label: \"label\",\n      description: \"Show widget in MoonChip label slot.\",\n      initial: true,\n    );\n\n    final showTrailingKnob = context.knobs.boolean(\n      label: \"trailing\",\n      description: \"Show widget in MoonChip trailing slot.\",\n    );\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          children: [\n            const TextDivider(\n              text: \"MoonChip\",\n              paddingTop: 0,\n            ),\n            MoonChip(\n              activeColor: activeColor,\n              borderColor: borderColor,\n              backgroundColor: backgroundColor,\n              activeBackgroundColor: activeBackgroundColor,\n              textColor: textColor,\n              isActive: isActiveKnob,\n              borderRadius: borderRadius,\n              showBorder: showBorderKnob,\n              chipSize: chipSizeKnob,\n              leading: showLeadingKnob\n                  ? const Icon(MoonIcons.other_frame_24_light)\n                  : null,\n              label: showLabelKnob ? Text(customLabelTextKnob) : null,\n              trailing: showTrailingKnob\n                  ? const Icon(MoonIcons.other_frame_24_light)\n                  : null,\n            ),\n            const TextDivider(text: \"Text MoonChip\"),\n            MoonChip.text(\n              activeBackgroundColor: activeBackgroundColor,\n              borderColor: borderColor,\n              textColor: textColor,\n              isActive: isActiveKnob,\n              borderRadius: borderRadius,\n              showBorder: showBorderKnob,\n              chipSize: chipSizeKnob,\n              leading: showLeadingKnob\n                  ? const Icon(MoonIcons.other_frame_24_light)\n                  : null,\n              label: showLabelKnob ? Text(customLabelTextKnob) : null,\n              trailing: showTrailingKnob\n                  ? const Icon(MoonIcons.other_frame_24_light)\n                  : null,\n            ),\n            const TextDivider(text: \"Custom MoonChip\"),\n            MoonChip(\n              isActive: isActiveKnob,\n              activeColor: context.moonColors!.dodoria,\n              backgroundColor: context.moonColors!.krillin,\n              activeBackgroundColor: context.moonColors!.chichi10,\n              textColor: context.moonColors!.goten,\n              borderWidth: 2,\n              showBorder: showBorderKnob,\n              chipSize: chipSizeKnob,\n              leading: showLeadingKnob\n                  ? const Icon(MoonIcons.other_frame_24_light)\n                  : null,\n              label: showLabelKnob ? Text(customLabelTextKnob) : null,\n              trailing: showTrailingKnob\n                  ? const Icon(MoonIcons.other_frame_24_light)\n                  : null,\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/circular_loader.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass CircularLoaderStory extends StatelessWidget {\n  static const subdirectory = '/loader';\n  static const path = '/primitives/loader/circular_loader';\n\n  const CircularLoaderStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final circularLoaderSizeKnob = context.knobs.nullable.options(\n      label: \"circularLoaderSize\",\n      description: \"Size variants for CircularLoader.\",\n      enabled: false,\n      initial: MoonCircularLoaderSize.md,\n      options: const [\n        Option(label: \"x2s\", value: MoonCircularLoaderSize.x2s),\n        Option(label: \"xs\", value: MoonCircularLoaderSize.xs),\n        Option(label: \"sm\", value: MoonCircularLoaderSize.sm),\n        Option(label: \"md\", value: MoonCircularLoaderSize.md),\n        Option(label: \"lg\", value: MoonCircularLoaderSize.lg),\n      ],\n    );\n\n    final loaderColorKnob = context.knobs.nullable.options(\n      label: \"color\",\n      description: \"MoonColors variants for CircularLoader.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final color = colorTable(context)[loaderColorKnob ?? 40];\n\n    final loaderBackgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for CircularLoader background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor =\n        colorTable(context)[loaderBackgroundColorKnob ?? 40];\n\n    final loaderStrokeCapKnob = context.knobs.nullable.options(\n      label: \"strokeCap\",\n      description: \"Stroke gap for CircularLoader.\",\n      enabled: false,\n      initial: StrokeCap.round,\n      options: const [\n        Option(label: \"round\", value: StrokeCap.round),\n        Option(label: \"square\", value: StrokeCap.square),\n        Option(label: \"butt\", value: StrokeCap.butt),\n      ],\n    );\n\n    return Center(\n      child: Padding(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: MoonCircularLoader(\n          color: color,\n          backgroundColor: backgroundColor,\n          circularLoaderSize: circularLoaderSizeKnob,\n          strokeCap: loaderStrokeCapKnob,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/circular_progress.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass CircularProgressStory extends StatelessWidget {\n  static const subdirectory = '/progress';\n  static const path = '/primitives/progress/circular_progress';\n\n  const CircularProgressStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final circularProgressSizeKnob = context.knobs.nullable.options(\n      label: \"circularProgressSize\",\n      description: \"Size variants for CircularProgress.\",\n      enabled: false,\n      initial: MoonCircularProgressSize.md,\n      options: const [\n        Option(label: \"x2s\", value: MoonCircularProgressSize.x2s),\n        Option(label: \"xs\", value: MoonCircularProgressSize.xs),\n        Option(label: \"sm\", value: MoonCircularProgressSize.sm),\n        Option(label: \"md\", value: MoonCircularProgressSize.md),\n        Option(label: \"lg\", value: MoonCircularProgressSize.lg),\n      ],\n    );\n\n    final circularProgressColorKnob = context.knobs.nullable.options(\n      label: \"color\",\n      description: \"MoonColors variants for CircularProgress.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final color = colorTable(context)[circularProgressColorKnob ?? 40];\n\n    final circularProgressBackgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for CircularProgress background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor =\n        colorTable(context)[circularProgressBackgroundColorKnob ?? 40];\n\n    final circularProgressStrokeCapKnob = context.knobs.nullable.options(\n      label: \"strokeCap\",\n      description: \"Stroke gap for CircularProgress.\",\n      enabled: false,\n      initial: StrokeCap.round,\n      options: const [\n        Option(label: \"round\", value: StrokeCap.round),\n        Option(label: \"square\", value: StrokeCap.square),\n        Option(label: \"butt\", value: StrokeCap.butt),\n      ],\n    );\n\n    final circularProgressValueKnob = context.knobs.slider(\n      label: \"value\",\n      description: \"Value for CircularProgress.\",\n      initial: 0.75,\n    );\n\n    return Center(\n      child: Padding(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: MoonCircularProgress(\n          value: circularProgressValueKnob,\n          color: color,\n          backgroundColor: backgroundColor,\n          circularProgressSize: circularProgressSizeKnob,\n          strokeCap: circularProgressStrokeCapKnob,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/dot_indicator.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass DotIndicatorStory extends StatefulWidget {\n  static const path = '/primitives/dot_indicator';\n\n  const DotIndicatorStory({super.key});\n\n  @override\n  State<DotIndicatorStory> createState() => _DotIndicatorStoryState();\n}\n\nclass _DotIndicatorStoryState extends State<DotIndicatorStory> {\n  int _selectedDot = 0;\n\n  @override\n  Widget build(BuildContext context) {\n    final selectedColorKnob = context.knobs.nullable.options(\n      label: \"selectedColor\",\n      description: \"MoonColors variants for MoonDotIndicator selected dot.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final selectedColor = colorTable(context)[selectedColorKnob ?? 40];\n\n    final unselectedColorKnob = context.knobs.nullable.options(\n      label: \"unselectedColor\",\n      description: \"MoonColors variants for MoonDotIndicator unselected dot.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final unselectedColor = colorTable(context)[unselectedColorKnob ?? 40];\n\n    final sizeKnob = context.knobs.nullable.sliderInt(\n      label: \"size\",\n      description: \"Dot size for MoonDotIndicator.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final gapKnob = context.knobs.nullable.sliderInt(\n      label: \"gap\",\n      description: \"Gap between MoonDotIndicator dots.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          mainAxisAlignment: MainAxisAlignment.center,\n          children: [\n            MoonDotIndicator(\n              selectedDot: _selectedDot,\n              dotCount: 4,\n              size: sizeKnob?.toDouble(),\n              gap: gapKnob?.toDouble(),\n              selectedColor: selectedColor,\n              unselectedColor: unselectedColor,\n            ),\n            const SizedBox(height: 32),\n            Row(\n              mainAxisAlignment: MainAxisAlignment.center,\n              children: List.generate(\n                4,\n                (int index) => Padding(\n                  padding: EdgeInsets.only(right: index != 3 ? 8.0 : 0),\n                  child: MoonFilledButton(\n                    label: Text(\"${index + 1}\"),\n                    onTap: () => setState(() => _selectedDot = index),\n                  ),\n                ),\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/drawer.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass DrawerStory extends StatelessWidget {\n  static const path = '/primitives/drawer';\n\n  const DrawerStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonDrawer background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final barrierColorKnob = context.knobs.nullable.options(\n      label: \"barrierColor\",\n      description: \"MoonColors variants for MoonDrawer barrier.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final barrierColor = colorTable(context)[barrierColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonDrawer.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final drawerWidthKnob = context.knobs.nullable.sliderInt(\n      label: \"width\",\n      description: \"Width for MoonDrawer.\",\n      enabled: false,\n      initial: 200,\n      max: MediaQuery.of(context).size.width.round(),\n    );\n\n    return OverflowBox(\n      maxHeight: MediaQuery.of(context).size.height,\n      maxWidth: MediaQuery.of(context).size.width,\n      child: Scaffold(\n        drawerScrimColor: barrierColor,\n        drawer: MoonDrawer(\n          backgroundColor: backgroundColor,\n          borderRadius: BorderRadiusDirectional.horizontal(\n            end: Radius.circular(borderRadiusKnob?.toDouble() ?? 0),\n          ),\n          width: drawerWidthKnob?.toDouble() ??\n              MediaQuery.of(context).size.width * 0.8,\n          child: Column(\n            mainAxisAlignment: MainAxisAlignment.center,\n            children: [\n              const Text(\"MoonDrawer\"),\n              const SizedBox(height: 32),\n              Builder(\n                builder: (BuildContext context) {\n                  return MoonFilledButton(\n                    label: const Text(\"Close\"),\n                    onTap: () => Navigator.of(context).pop(),\n                  );\n                },\n              ),\n            ],\n          ),\n        ),\n        body: Center(\n          child: Builder(\n            builder: (BuildContext context) {\n              return Padding(\n                padding: const EdgeInsets.symmetric(\n                  vertical: 64.0,\n                  horizontal: 16.0,\n                ),\n                child: MoonFilledButton(\n                  label: const Text(\"Tap me\"),\n                  onTap: () => Scaffold.of(context).openDrawer(),\n                ),\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/dropdown.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nconst String _groupId = \"dropdown\";\n\nenum Choices {\n  first,\n  second,\n  third;\n\n  String get name {\n    return switch (this) {\n      Choices.first => \"Choice #1\",\n      Choices.second => \"Choice #2\",\n      Choices.third => \"Choice #3\",\n    };\n  }\n}\n\nclass DropdownStory extends StatefulWidget {\n  static const path = '/primitives/dropdown';\n\n  const DropdownStory({super.key});\n\n  @override\n  State<DropdownStory> createState() => _DropdownStoryState();\n}\n\nclass _DropdownStoryState extends State<DropdownStory> {\n  final Map<Choices, bool> _availableChoices = {\n    Choices.first: false,\n    Choices.second: false,\n    Choices.third: false,\n  };\n\n  bool _showChoices = false;\n  bool _showMenu = false;\n  bool _showMenuInner = false;\n  Color? _buttonColor;\n  String _buttonName = \"Piccolo\";\n\n  @override\n  Widget build(BuildContext context) {\n    final dropdownAnchorPositionKnob = context.knobs.nullable.options(\n      label: \"dropdownAnchorPosition\",\n      description:\n          \"Anchor position variants for MoonDropdown on the child (target).\",\n      enabled: false,\n      initial: MoonDropdownAnchorPosition.bottom,\n      options: const [\n        Option(label: \"top\", value: MoonDropdownAnchorPosition.top),\n        Option(label: \"bottom\", value: MoonDropdownAnchorPosition.bottom),\n        Option(label: \"left\", value: MoonDropdownAnchorPosition.left),\n        Option(label: \"right\", value: MoonDropdownAnchorPosition.right),\n        Option(label: \"topLeft\", value: MoonDropdownAnchorPosition.topLeft),\n        Option(label: \"topRight\", value: MoonDropdownAnchorPosition.topRight),\n        Option(\n          label: \"bottomLeft\",\n          value: MoonDropdownAnchorPosition.bottomLeft,\n        ),\n        Option(\n          label: \"bottomRight\",\n          value: MoonDropdownAnchorPosition.bottomRight,\n        ),\n        Option(label: \"vertical\", value: MoonDropdownAnchorPosition.vertical),\n        Option(\n          label: \"horizontal\",\n          value: MoonDropdownAnchorPosition.horizontal,\n        ),\n      ],\n    );\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonDropdown background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderColorKnob = context.knobs.nullable.options(\n      label: \"borderColor\",\n      description: \"MoonColors variants for MoonDropdown border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final borderColor = colorTable(context)[borderColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonDropdown.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final distanceToTargetKnob = context.knobs.nullable.slider(\n      label: \"distanceToTarget\",\n      description: \"Distance to target child widget.\",\n      enabled: false,\n      initial: 8,\n      max: 100,\n    );\n\n    final showShadowKnob = context.knobs.boolean(\n      label: \"Show shadow\",\n      description: \"Show shadows for MoonDropdown.\",\n      initial: true,\n    );\n\n    final constrainWidthToChildKnob = context.knobs.boolean(\n      label: \"constrainWidthToChild\",\n      description:\n          \"Constrain the width of MoonDropdown to be the same as the child (target).\",\n      initial: true,\n    );\n\n    // Used to avoid the stale closure within callbacks in Story.\n    final colorPiccolo = context.moonColors!.piccolo;\n    final colorKrillin = context.moonColors!.krillin;\n    final colorRoshi100 = context.moonColors!.roshi;\n    final colorRoshi60 = context.moonColors!.roshi60;\n    final colorRoshi10 = context.moonColors!.roshi10;\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(\n            borderRadiusKnob.toDouble(),\n          )\n        : null;\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Center(\n          child: Column(\n            mainAxisSize: MainAxisSize.min,\n            children: [\n              const TextDivider(\n                text: \"MoonDropdown with multiple choices\",\n                paddingTop: 0,\n              ),\n              MoonDropdown(\n                show: _showChoices,\n                minWidth: 250,\n                borderColor: borderColor ?? Colors.transparent,\n                backgroundColor: backgroundColor,\n                borderRadius: borderRadius,\n                constrainWidthToChild: constrainWidthToChildKnob,\n                distanceToTarget: distanceToTargetKnob,\n                dropdownAnchorPosition: dropdownAnchorPositionKnob ??\n                    MoonDropdownAnchorPosition.bottom,\n                dropdownShadows: showShadowKnob == true ? null : [],\n                onTapOutside: () => setState(() => _showChoices = false),\n                content: ClipRRect(\n                  borderRadius: borderRadius ?? BorderRadius.zero,\n                  child: Column(\n                    children: List.generate(\n                      3,\n                      (int index) => MoonMenuItem(\n                        absorbGestures: true,\n                        onTap: () => setState(\n                          () => _availableChoices[Choices.values[index]] =\n                              !_availableChoices[Choices.values[index]]!,\n                        ),\n                        label: Text(Choices.values[index].name),\n                        trailing: MoonCheckbox(\n                          value: _availableChoices[Choices.values[index]],\n                          tapAreaSizeValue: 0,\n                          onChanged: (_) {},\n                        ),\n                      ),\n                    ),\n                  ),\n                ),\n                child: MoonTextInput(\n                  width: 270,\n                  readOnly: true,\n                  canRequestFocus: false,\n                  mouseCursor: MouseCursor.defer,\n                  hintText: \"Choose an option\",\n                  onTap: () => setState(() => _showChoices = !_showChoices),\n                  onTapOutside: (PointerDownEvent _) =>\n                      FocusManager.instance.primaryFocus?.unfocus(),\n                  leading: _availableChoices.values\n                          .any((element) => element == true)\n                      ? Center(\n                          child: MoonTag(\n                            tagSize: MoonTagSize.xs,\n                            backgroundColor: context.moonColors!.bulma,\n                            onTap: () => setState(\n                              () => _availableChoices\n                                  .updateAll((key, value) => false),\n                            ),\n                            label: Text(\n                              \"${_availableChoices.values.where((element) => element == true).length}\",\n                              style:\n                                  TextStyle(color: context.moonColors!.gohan),\n                            ),\n                            trailing: Icon(\n                              MoonIcons.controls_close_small_16_light,\n                              color: context.moonColors!.gohan,\n                            ),\n                          ),\n                        )\n                      : null,\n                  trailing: MouseRegion(\n                    cursor: SystemMouseCursors.click,\n                    child: Center(\n                      child: AnimatedRotation(\n                        duration: const Duration(milliseconds: 200),\n                        turns: _showChoices ? -0.5 : 0,\n                        child: const Icon(\n                          MoonIcons.controls_chevron_down_16_light,\n                          size: 16,\n                        ),\n                      ),\n                    ),\n                  ),\n                ),\n              ),\n              const TextDivider(text: \"MoonDropdown as a menu\"),\n              MoonDropdown(\n                show: _showMenu,\n                groupId: _groupId,\n                maxWidth: 250,\n                borderColor: borderColor ?? Colors.transparent,\n                backgroundColor: backgroundColor,\n                constrainWidthToChild: constrainWidthToChildKnob,\n                distanceToTarget: distanceToTargetKnob,\n                dropdownAnchorPosition: dropdownAnchorPositionKnob ??\n                    MoonDropdownAnchorPosition.bottom,\n                dropdownShadows: showShadowKnob == true ? null : [],\n                onTapOutside: () => setState(() {\n                  _showMenu = false;\n                  _showMenuInner = false;\n                }),\n                content: Column(\n                  children: [\n                    MoonMenuItem(\n                      onTap: () => setState(() {\n                        _showMenu = false;\n                        _buttonName = \"Piccolo\";\n                        _buttonColor = colorPiccolo;\n                      }),\n                      label: const Text(\"Piccolo\"),\n                    ),\n                    const SizedBox(height: 4),\n                    MoonMenuItem(\n                      onTap: () => setState(() {\n                        _showMenu = false;\n                        _buttonName = \"Krillin\";\n                        _buttonColor = colorKrillin;\n                      }),\n                      label: const Text(\"Krillin\"),\n                    ),\n                    const SizedBox(height: 4),\n                    MoonDropdown(\n                      show: _showMenuInner,\n                      groupId: _groupId,\n                      maxWidth: 100,\n                      constrainWidthToChild: constrainWidthToChildKnob,\n                      distanceToTarget: distanceToTargetKnob,\n                      dropdownAnchorPosition: dropdownAnchorPositionKnob ??\n                          MoonDropdownAnchorPosition.bottom,\n                      followerAnchor: dropdownAnchorPositionKnob == null\n                          ? Alignment.topLeft\n                          : null,\n                      targetAnchor: dropdownAnchorPositionKnob == null\n                          ? Alignment.topRight\n                          : null,\n                      offset: dropdownAnchorPositionKnob == null\n                          ? const Offset(8, 0)\n                          : null,\n                      content: Column(\n                        children: [\n                          MoonMenuItem(\n                            onTap: () => setState(() {\n                              _showMenu = false;\n                              _showMenuInner = false;\n                              _buttonName = \"Roshi100\";\n                              _buttonColor = colorRoshi100;\n                            }),\n                            label: const Text(\"Roshi100\"),\n                          ),\n                          const SizedBox(height: 4),\n                          MoonMenuItem(\n                            onTap: () => setState(() {\n                              _showMenu = false;\n                              _showMenuInner = false;\n                              _buttonName = \"Roshi60\";\n                              _buttonColor = colorRoshi60;\n                            }),\n                            label: const Text(\"Roshi60\"),\n                          ),\n                          const SizedBox(height: 4),\n                          MoonMenuItem(\n                            onTap: () => setState(() {\n                              _showMenu = false;\n                              _showMenuInner = false;\n                              _buttonName = \"Roshi10\";\n                              _buttonColor = colorRoshi10;\n                            }),\n                            label: const Text(\"Roshi10\"),\n                          ),\n                        ],\n                      ),\n                      child: MoonMenuItem(\n                        backgroundColor:\n                            _showMenuInner ? context.moonColors!.heles : null,\n                        onTap: () =>\n                            setState(() => _showMenuInner = !_showMenuInner),\n                        label: const Text(\"Roshi\"),\n                        trailing: const Icon(\n                          MoonIcons.controls_chevron_right_16_light,\n                          size: 16,\n                        ),\n                      ),\n                    ),\n                  ],\n                ),\n                child: MoonFilledButton(\n                  width: 128,\n                  label: Text(_buttonName),\n                  backgroundColor: _buttonColor,\n                  onTap: () => setState(() => _showMenu = !_showMenu),\n                ),\n              ),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/icons.dart",
    "content": "import 'dart:math';\nimport 'dart:ui';\n\nimport 'package:example/src/storybook/common/widgets/segment.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\n\nclass IconsStory extends StatefulWidget {\n  static const path = '/primitives/icons';\n\n  const IconsStory({super.key});\n\n  @override\n  State<IconsStory> createState() => _IconsStoryState();\n}\n\nclass _IconsStoryState extends State<IconsStory> {\n  final TextEditingController _searchController = TextEditingController();\n\n  Map<String, IconData> _filteredIcons = {};\n\n  // Helper function for grouping keys into trios.\n  List<List<String>> _groupInTrios(List<String> keys) {\n    final List<List<String>> trios = [];\n    for (int i = 0; i < keys.length; i += 3) {\n      trios.add(keys.sublist(i, min(i + 3, keys.length)));\n    }\n    return trios;\n  }\n\n  Iterable<Map<String, IconData>> _getSortedIcons(\n    Map<String, IconData> iconsMap,\n  ) {\n    final Map<String, Map<String, IconData>> lightSegments = {};\n    final Map<String, Map<String, IconData>> regularSegments = {};\n\n    for (final String key in iconsMap.keys) {\n      // Extract the segment and type (light or regular).\n      final List<String> parts = key.split('_');\n      final String segment = parts.first;\n      final String type = parts.last;\n\n      if (type == \"light\") {\n        if (!lightSegments.containsKey(segment)) {\n          lightSegments[segment] = {};\n        }\n        lightSegments[segment]![key] = iconsMap[key]!;\n      } else if (type == \"regular\") {\n        if (!regularSegments.containsKey(segment)) {\n          regularSegments[segment] = {};\n        }\n        regularSegments[segment]![key] = iconsMap[key]!;\n      }\n    }\n\n    final Map<String, Map<String, IconData>> combinedSegments = {};\n\n    // Get all unique segment names.\n    final Set<String> allSegments = lightSegments.keys.toSet()\n      ..addAll(regularSegments.keys);\n\n    for (final String segment in allSegments) {\n      combinedSegments[segment] = {};\n\n      // Get the list of keys from light and regular segments for this segment.\n      final List<String> lightKeys =\n          lightSegments[segment]?.keys.toList() ?? [];\n      final List<String> regularKeys =\n          regularSegments[segment]?.keys.toList() ?? [];\n\n      // Group the keys in trios.\n      final List<List<String>> lightTrios = _groupInTrios(lightKeys);\n      final List<List<String>> regularTrios = _groupInTrios(regularKeys);\n\n      // Maximum number of trios in either list.\n      final int maxTrios = max(lightTrios.length, regularTrios.length);\n\n      for (int i = 0; i < maxTrios; i++) {\n        // Add light trios if available.\n        if (i < lightTrios.length) {\n          for (final String key in lightTrios[i]) {\n            combinedSegments[segment]![key] = lightSegments[segment]![key]!;\n          }\n        }\n        // Add regular trios if available.\n        if (i < regularTrios.length) {\n          for (final String key in regularTrios[i]) {\n            combinedSegments[segment]![key] = regularSegments[segment]![key]!;\n          }\n        }\n      }\n    }\n\n    return combinedSegments.values;\n  }\n\n  void _performSearch() {\n    setState(() {\n      _filteredIcons = Map.fromEntries(\n        iconsMap.entries\n            .where(\n              (entry) =>\n                  entry.key.contains(_searchController.text.toLowerCase()),\n            )\n            .map((entry) => MapEntry(entry.key, entry.value)),\n      );\n    });\n  }\n\n  void _handleClear() {\n    setState(() {\n      _searchController.clear();\n      _performSearch();\n    });\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _searchController.addListener(_performSearch);\n    // Initialize by performing a search to display all icons.\n    _performSearch();\n  }\n\n  @override\n  void dispose() {\n    _searchController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final sortedIcons = _getSortedIcons(_filteredIcons);\n\n    final ScrollBehavior scrollBehaviour =\n        ScrollConfiguration.of(context).copyWith(\n      scrollbars: false,\n      overscroll: false,\n      dragDevices: {\n        PointerDeviceKind.touch,\n        PointerDeviceKind.mouse,\n      },\n    );\n\n    return Scaffold(\n      appBar: AppBar(\n        backgroundColor: context.moonColors?.goku,\n        title: Theme(\n          data: Theme.of(context),\n          child: MoonTextInput(\n            controller: _searchController,\n            hintText: \"Search icons\",\n            leading: const Icon(\n              MoonIcons.generic_search_24_light,\n              size: 24,\n            ),\n            trailing: MouseRegion(\n              cursor: SystemMouseCursors.click,\n              child: GestureDetector(\n                onTap: _handleClear,\n                child: const Icon(\n                  MoonIcons.controls_close_small_24_light,\n                  size: 24,\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n      body: CustomScrollView(\n        scrollBehavior: scrollBehaviour,\n        slivers: sortedIcons.map((e) => IconsSegment(segmentMap: e)).toList(),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/linear_loader.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass LinearLoaderStory extends StatelessWidget {\n  static const path = '/primitives/loader/linear_loader';\n\n  const LinearLoaderStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final linearLoaderSizeKnob = context.knobs.nullable.options(\n      label: \"linearLoaderSize\",\n      description: \"Size variants for MoonLinearLoader.\",\n      enabled: false,\n      initial: MoonLinearLoaderSize.x4s,\n      options: const [\n        Option(label: \"x6s\", value: MoonLinearLoaderSize.x6s),\n        Option(label: \"x5s\", value: MoonLinearLoaderSize.x5s),\n        Option(label: \"x4s\", value: MoonLinearLoaderSize.x4s),\n        Option(label: \"x3s\", value: MoonLinearLoaderSize.x3s),\n        Option(label: \"x2s\", value: MoonLinearLoaderSize.x2s),\n      ],\n    );\n\n    final loaderColorKnob = context.knobs.nullable.options(\n      label: \"color\",\n      description: \"MoonColors variants for MoonLinearLoader.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final color = colorTable(context)[loaderColorKnob ?? 40];\n\n    final loaderBackgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonLinearLoader background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor =\n        colorTable(context)[loaderBackgroundColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonLinearLoader.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    return Center(\n      child: Padding(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: MoonLinearLoader(\n          linearLoaderSize: linearLoaderSizeKnob,\n          color: color,\n          backgroundColor: backgroundColor,\n          borderRadius: borderRadiusKnob != null\n              ? BorderRadius.circular(borderRadiusKnob.toDouble())\n              : null,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/linear_progress.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass LinearProgressStory extends StatelessWidget {\n  static const path = '/primitives/progress/linear_progress';\n\n  const LinearProgressStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final progressSizeKnob = context.knobs.nullable.options(\n      label: \"linearProgressSize\",\n      description: \"Size variants for MoonLinearProgress.\",\n      enabled: false,\n      initial: MoonLinearProgressSize.x4s,\n      options: const [\n        Option(label: \"x6s\", value: MoonLinearProgressSize.x6s),\n        Option(label: \"x5s\", value: MoonLinearProgressSize.x5s),\n        Option(label: \"x4s\", value: MoonLinearProgressSize.x4s),\n        Option(label: \"x3s\", value: MoonLinearProgressSize.x3s),\n        Option(label: \"x2s\", value: MoonLinearProgressSize.x2s),\n      ],\n    );\n\n    final progressColorKnob = context.knobs.nullable.options(\n      label: \"color\",\n      description: \"MoonColors variants for MoonLinearProgress progress.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final color = colorTable(context)[progressColorKnob ?? 40];\n\n    final progressBackgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonLinearProgress background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor =\n        colorTable(context)[progressBackgroundColorKnob ?? 40];\n\n    final pinColorKnob = context.knobs.nullable.options(\n      label: \"pinColor\",\n      description: \"MoonColors variants for MoonLinearProgress pin.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final pinColor = colorTable(context)[pinColorKnob ?? 40];\n\n    final pinBorderColorKnob = context.knobs.nullable.options(\n      label: \"pinBorderColor\",\n      description: \"MoonColors variants for MoonLinearProgress pin border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final pinBorderColor = colorTable(context)[pinBorderColorKnob ?? 40];\n\n    final thumbColorKnob = context.knobs.nullable.options(\n      label: \"thumbColor\",\n      description: \"MoonColors variants for MoonLinearProgress thumb.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final thumbColor = colorTable(context)[thumbColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonLinearProgress.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final linearProgressValueKnob = context.knobs.slider(\n      label: \"value\",\n      description: \"Progress value for MoonLinearProgress.\",\n      initial: 0.5,\n    );\n\n    final showPinKnob = context.knobs.boolean(\n      label: \"showPin\",\n      description: \"Show pin for MoonLinearProgress.\",\n    );\n\n    final showMinLabelKnob = context.knobs.boolean(\n      label: \"showMinLabel\",\n      description: \"Show minimum label for MoonLinearProgress.\",\n    );\n\n    final showMaxLabelKnob = context.knobs.boolean(\n      label: \"showMaxLabel\",\n      description: \"Show maximum label for MoonLinearProgress.\",\n    );\n\n    final showPinShadowKnob = context.knobs.boolean(\n      label: \"showPinShadow\",\n      description: \"Show pin shadow for MoonLinearProgress.\",\n      initial: true,\n    );\n\n    return Center(\n      child: Padding(\n        padding: const EdgeInsets.symmetric(vertical: 64, horizontal: 20),\n        child: MoonLinearProgress(\n          linearProgressSize: progressSizeKnob,\n          value: linearProgressValueKnob,\n          color: color,\n          backgroundColor: backgroundColor,\n          borderRadius: borderRadiusKnob != null\n              ? BorderRadius.circular(borderRadiusKnob.toDouble())\n              : null,\n          showMinLabel: showMinLabelKnob,\n          showMaxLabel: showMaxLabelKnob,\n          showPin: showPinKnob,\n          pinStyle: PinStyle(\n            pinColor: pinColor,\n            pinBorderColor: pinBorderColor,\n            thumbColor: thumbColor,\n            showShadow: showPinShadowKnob,\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/menu_item.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nenum MenuItem { first, second }\n\nclass MenuItemStory extends StatefulWidget {\n  static const path = '/primitives/menu_item';\n\n  const MenuItemStory({super.key});\n\n  @override\n  State<MenuItemStory> createState() => _MenuItemStoryState();\n}\n\nclass _MenuItemStoryState extends State<MenuItemStory> {\n  MenuItem currentlySelectedMenuItem = MenuItem.first;\n\n  bool? checkboxIsSelected = false;\n  bool switchIsSelected = false;\n\n  @override\n  Widget build(BuildContext context) {\n    final leadingColorKnob = context.knobs.nullable.options(\n      label: \"Leading color\",\n      description: \"MoonColors variants for MoonMenuItem leading slot.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final leadingColor = colorTable(context)[leadingColorKnob ?? 40];\n\n    final labelColorKnob = context.knobs.nullable.options(\n      label: \"Label color\",\n      description: \"MoonColors variants for MoonMenuItem label slot.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final labelTextColor = colorTable(context)[labelColorKnob ?? 40];\n\n    final contentTextColorKnob = context.knobs.nullable.options(\n      label: \"Content color\",\n      description: \"MoonColors variants for MoonMenuItem content slot.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final contentTextColor = colorTable(context)[contentTextColorKnob ?? 40];\n\n    final trailingColorKnob = context.knobs.nullable.options(\n      label: \"Trailing color\",\n      description: \"MoonColors variants for MoonMenuItem trailing slot.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final trailingColor = colorTable(context)[trailingColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonMenuItem background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final menuItemCrossAxisAlignmentKnob = context.knobs.nullable.options(\n      label: \"menuItemCrossAxisAlignment\",\n      description: \"CrossAxisAlignment variants for MoonMenuItem.\",\n      enabled: false,\n      initial: CrossAxisAlignment.center,\n      options: [\n        Option(\n          label: CrossAxisAlignment.start.name,\n          value: CrossAxisAlignment.start,\n        ),\n        Option(\n          label: CrossAxisAlignment.center.name,\n          value: CrossAxisAlignment.center,\n        ),\n        Option(\n          label: CrossAxisAlignment.end.name,\n          value: CrossAxisAlignment.end,\n        ),\n      ],\n    );\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonMenuItem.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final showLeadingKnob = context.knobs.boolean(\n      label: \"leading\",\n      description: \"Show widget in MoonMenuItem leading slot.\",\n      initial: true,\n    );\n\n    final showContentKnob = context.knobs.boolean(\n      label: \"content\",\n      description: \"Show widget in MoonMenuItem content slot.\",\n      initial: true,\n    );\n\n    final showTrailingKnob = context.knobs.boolean(\n      label: \"trailing\",\n      description: \"Show widget in MoonMenuItem trailing slot.\",\n      initial: true,\n    );\n\n    final isDisabledKnob = context.knobs.boolean(\n      label: \"Disabled\",\n      description: \"MoonMenuItem onTap() is null.\",\n    );\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          mainAxisSize: MainAxisSize.min,\n          children: [\n            const TextDivider(\n              text: \"MoonMenuItem\",\n              paddingTop: 0,\n            ),\n            MoonMenuItem(\n              borderRadius: borderRadius,\n              backgroundColor: backgroundColor,\n              menuItemCrossAxisAlignment: menuItemCrossAxisAlignmentKnob,\n              onTap: isDisabledKnob ? null : () {},\n              label: Text(\n                \"Multi-line menu item\",\n                style: TextStyle(color: labelTextColor),\n              ),\n              content: showContentKnob\n                  ? Text(\n                      \"Multi-line default content field as an example for MoonMenuItem component.\",\n                      style: TextStyle(color: contentTextColor),\n                    )\n                  : null,\n              leading: showLeadingKnob\n                  ? MoonAvatar(\n                      borderRadius: borderRadius,\n                      backgroundColor: context.moonColors!.jiren,\n                      avatarSize: MoonAvatarSize.lg,\n                      content: const Icon(\n                        MoonIcons.travel_airplane_32_regular,\n                        size: 32,\n                      ),\n                    )\n                  : null,\n              trailing: showTrailingKnob\n                  ? Icon(\n                      MoonIcons.controls_chevron_right_24_light,\n                      color: trailingColor,\n                    )\n                  : null,\n            ),\n            const SizedBox(height: 16),\n            MoonMenuItem(\n              backgroundColor: backgroundColor,\n              borderRadius: borderRadius,\n              menuItemCrossAxisAlignment: menuItemCrossAxisAlignmentKnob,\n              onTap: isDisabledKnob ? null : () {},\n              label: Text(\n                \"One-line menu item\",\n                style: TextStyle(color: labelTextColor),\n              ),\n              content: showContentKnob\n                  ? Text(\n                      'One-line content field example',\n                      style: TextStyle(color: contentTextColor),\n                    )\n                  : null,\n              leading: showLeadingKnob\n                  ? MoonAvatar(\n                      borderRadius: borderRadius,\n                      backgroundColor: context.moonColors!.jiren,\n                      avatarSize: MoonAvatarSize.md,\n                      content: const Icon(\n                        MoonIcons.notifications_activity_32_regular,\n                        size: 24,\n                      ),\n                    )\n                  : null,\n              trailing: showTrailingKnob\n                  ? Icon(\n                      MoonIcons.controls_chevron_right_24_light,\n                      color: trailingColor,\n                    )\n                  : null,\n            ),\n            const TextDivider(text: \"MoonMenuItem with selection control\"),\n            MoonMenuItem(\n              borderRadius: borderRadius,\n              backgroundColor: backgroundColor,\n              menuItemCrossAxisAlignment: menuItemCrossAxisAlignmentKnob,\n              onTap: isDisabledKnob\n                  ? null\n                  : () =>\n                      setState(() => checkboxIsSelected = !checkboxIsSelected!),\n              label: Text(\n                \"Menu item with MoonCheckbox\",\n                style: TextStyle(color: labelTextColor),\n              ),\n              leading: showLeadingKnob\n                  ? Icon(\n                      MoonIcons.other_frame_24_light,\n                      color: leadingColor,\n                    )\n                  : null,\n              trailing: showTrailingKnob\n                  ? MoonCheckbox(\n                      value: checkboxIsSelected,\n                      tapAreaSizeValue: 24,\n                      onChanged: (bool? isSelected) =>\n                          setState(() => checkboxIsSelected = isSelected),\n                    )\n                  : null,\n            ),\n            const SizedBox(height: 16),\n            MoonMenuItem(\n              borderRadius: borderRadius,\n              backgroundColor: backgroundColor,\n              menuItemCrossAxisAlignment: menuItemCrossAxisAlignmentKnob,\n              onTap: isDisabledKnob\n                  ? null\n                  : () => setState(() => switchIsSelected = !switchIsSelected),\n              label: Text(\n                \"Menu item with MoonSwitch\",\n                style: TextStyle(color: labelTextColor),\n              ),\n              leading: showLeadingKnob\n                  ? Icon(\n                      MoonIcons.other_frame_24_light,\n                      color: leadingColor,\n                    )\n                  : null,\n              trailing: showTrailingKnob\n                  ? MoonSwitch(\n                      switchSize: MoonSwitchSize.x2s,\n                      value: switchIsSelected,\n                      onChanged: (bool isSelected) =>\n                          setState(() => switchIsSelected = isSelected),\n                    )\n                  : null,\n            ),\n            const TextDivider(text: \"Expandable MoonMenuItem with divider\"),\n            MoonAccordion<MoonMenuItem>(\n              shadows: const [],\n              isDisabled: isDisabledKnob,\n              hasContentOutside: true,\n              borderRadius: borderRadius,\n              accordionSize: MoonAccordionSize.md,\n              iconColor: trailingColor,\n              backgroundColor: backgroundColor ?? Colors.transparent,\n              expandedBackgroundColor:\n                  backgroundColor ?? context.moonColors!.heles,\n              label: Text(\n                'Expandable menu item',\n                style: context.moonTypography!.body.textDefault.copyWith(\n                  color: labelTextColor,\n                  fontWeight: FontWeight.w400,\n                ),\n              ),\n              leading: showLeadingKnob\n                  ? Icon(\n                      MoonIcons.other_frame_24_light,\n                      color: leadingColor ?? context.moonColors!.iconPrimary,\n                    )\n                  : null,\n              childrenPadding:\n                  const EdgeInsets.only(top: 8, bottom: 8, left: 24),\n              children: MoonMenuItem.divideMenuItems(\n                context: context,\n                menuItems: List.generate(\n                  2,\n                  (index) => MoonMenuItem(\n                    backgroundColor: backgroundColor,\n                    borderRadius: borderRadius,\n                    menuItemCrossAxisAlignment: menuItemCrossAxisAlignmentKnob,\n                    onTap: () => setState(\n                      () => currentlySelectedMenuItem = MenuItem.values[index],\n                    ),\n                    label: Text(\n                      \"Menu item ${index + 1} with MoonRadio\",\n                      style: TextStyle(color: labelTextColor),\n                    ),\n                    leading: showLeadingKnob\n                        ? MoonRadio<MenuItem>(\n                            value: MenuItem.values[index],\n                            groupValue: currentlySelectedMenuItem,\n                            tapAreaSizeValue: 24,\n                            onChanged: (MenuItem? selectedMenuItem) => setState(\n                              () =>\n                                  currentlySelectedMenuItem = selectedMenuItem!,\n                            ),\n                          )\n                        : null,\n                    trailing: showTrailingKnob\n                        ? Icon(\n                            MoonIcons.other_frame_24_light,\n                            color: trailingColor,\n                          )\n                        : null,\n                  ),\n                ),\n              ).toList(),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/modal.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass ModalStory extends StatelessWidget {\n  static const path = '/primitives/modal';\n\n  const ModalStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"Text color\",\n      description: \"MoonColors variants for MoonModal text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonModal background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final barrierColorKnob = context.knobs.nullable.options(\n      label: \"barrierColor\",\n      description: \"MoonColors variants for MoonModal barrier.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final barrierColor = colorTable(context)[barrierColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonModal.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    Future<void> modalBuilder(BuildContext context) {\n      return showMoonModal<void>(\n        context: context,\n        useRootNavigator: false,\n        barrierColor: barrierColor,\n        builder: (BuildContext context) {\n          return Directionality(\n            textDirection: Directionality.of(context),\n            child: MoonModal(\n              backgroundColor: backgroundColor,\n              borderRadius: borderRadiusKnob != null\n                  ? BorderRadius.circular(borderRadiusKnob.toDouble())\n                  : null,\n              child: SizedBox(\n                width: 300,\n                child: Column(\n                  mainAxisSize: MainAxisSize.min,\n                  crossAxisAlignment: CrossAxisAlignment.start,\n                  children: [\n                    Padding(\n                      padding: const EdgeInsets.fromLTRB(24, 20, 24, 16),\n                      child: Text(\n                        \"MoonModal title\",\n                        style: context.moonTypography!.heading.text18\n                            .copyWith(color: textColor),\n                      ),\n                    ),\n                    Divider(\n                      height: 1,\n                      color: context.moonColors!.trunks,\n                    ),\n                    Padding(\n                      padding: const EdgeInsets.fromLTRB(24, 16, 24, 16),\n                      child: Text(\n                        \"Re-open the MoonModal to view the updated knob value.\",\n                        style: context.moonTypography!.body.text14\n                            .copyWith(color: textColor),\n                      ),\n                    ),\n                    Padding(\n                      padding: const EdgeInsets.fromLTRB(24, 16, 24, 24),\n                      child: MoonFilledButton(\n                        label: const Text(\"Okay\"),\n                        isFullWidth: true,\n                        onTap: () => Navigator.of(context).pop(),\n                      ),\n                    ),\n                  ],\n                ),\n              ),\n            ),\n          );\n        },\n      );\n    }\n\n    return Center(\n      child: Builder(\n        builder: (BuildContext context) {\n          return MoonFilledButton(\n            label: const Text(\"Tap me\"),\n            onTap: () => modalBuilder(context),\n          );\n        },\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/popover.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass PopoverStory extends StatefulWidget {\n  static const path = '/primitives/popover';\n\n  const PopoverStory({super.key});\n\n  @override\n  State<PopoverStory> createState() => _PopoverStoryState();\n}\n\nclass _PopoverStoryState extends State<PopoverStory> {\n  bool show = false;\n\n  @override\n  Widget build(BuildContext context) {\n    final customLabelTextKnob = context.knobs.text(\n      label: \"Label text\",\n      initial: \"Custom MoonPopover text\",\n    );\n\n    final popoverPositionKnob = context.knobs.nullable.options(\n      label: \"popoverPosition\",\n      description: \"Position variants for MoonPopover.\",\n      enabled: false,\n      initial: MoonPopoverPosition.top,\n      options: const [\n        Option(label: \"top\", value: MoonPopoverPosition.top),\n        Option(label: \"bottom\", value: MoonPopoverPosition.bottom),\n        Option(label: \"left\", value: MoonPopoverPosition.left),\n        Option(label: \"right\", value: MoonPopoverPosition.right),\n        Option(label: \"topLeft\", value: MoonPopoverPosition.topLeft),\n        Option(label: \"topRight\", value: MoonPopoverPosition.topRight),\n        Option(label: \"bottomLeft\", value: MoonPopoverPosition.bottomLeft),\n        Option(label: \"bottomRight\", value: MoonPopoverPosition.bottomRight),\n        Option(label: \"vertical\", value: MoonPopoverPosition.vertical),\n        Option(label: \"horizontal\", value: MoonPopoverPosition.horizontal),\n      ],\n    );\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonPopover background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderColorKnob = context.knobs.nullable.options(\n      label: \"borderColor\",\n      description: \"MoonColors variants for MoonPopover border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final borderColor = colorTable(context)[borderColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonPopover.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final distanceToTargetKnob = context.knobs.nullable.slider(\n      label: \"distanceToTarget\",\n      description: \"Distance to target child widget.\",\n      enabled: false,\n      initial: 8,\n      max: 100,\n    );\n\n    final showShadowKnob = context.knobs.boolean(\n      label: \"Show shadow\",\n      description: \"Show shadows for MoonPopover.\",\n      initial: true,\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          mainAxisAlignment: MainAxisAlignment.center,\n          children: [\n            MoonPopover(\n              show: show,\n              borderColor: borderColor ?? Colors.transparent,\n              backgroundColor: backgroundColor,\n              borderRadius: borderRadiusKnob != null\n                  ? BorderRadius.circular(borderRadiusKnob.toDouble())\n                  : null,\n              distanceToTarget: distanceToTargetKnob,\n              popoverPosition: popoverPositionKnob ?? MoonPopoverPosition.top,\n              popoverShadows: showShadowKnob == true ? null : [],\n              onTapOutside: () => setState(() => show = false),\n              content: ConstrainedBox(\n                constraints: const BoxConstraints(maxWidth: 190),\n                child: Column(\n                  mainAxisSize: MainAxisSize.min,\n                  children: [\n                    Row(\n                      mainAxisSize: MainAxisSize.min,\n                      children: [\n                        MoonAvatar(\n                          backgroundColor: context.moonColors?.heles,\n                          content: const Icon(MoonIcons.other_rocket_24_light),\n                        ),\n                        const SizedBox(width: 12),\n                        Expanded(\n                          child: Text(customLabelTextKnob),\n                        ),\n                      ],\n                    ),\n                    const SizedBox(height: 16),\n                    MoonFilledButton(\n                      buttonSize: MoonButtonSize.sm,\n                      isFullWidth: true,\n                      onTap: () => setState(() => show = false),\n                      label: const Text(\"Close\"),\n                    ),\n                  ],\n                ),\n              ),\n              child: MoonFilledButton(\n                onTap: () => setState(() => show = !show),\n                label: const Text(\"Tap me\"),\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/radio.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nenum ChoiceCustom { first, second }\n\nenum ChoiceLabel { first, second }\n\nclass RadioStory extends StatefulWidget {\n  static const path = '/primitives/radio';\n\n  const RadioStory({super.key});\n\n  @override\n  State<RadioStory> createState() => _RadioStoryState();\n}\n\nclass _RadioStoryState extends State<RadioStory> {\n  ChoiceCustom? valueCustom = ChoiceCustom.first;\n  ChoiceLabel? valueLabel = ChoiceLabel.first;\n\n  @override\n  Widget build(BuildContext context) {\n    final activeColorKnob = context.knobs.nullable.options(\n      label: \"activeColor\",\n      description: \"MoonColors variants for checked MoonRadio.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeColor = colorTable(context)[activeColorKnob ?? 40];\n\n    final inactiveColorKnob = context.knobs.nullable.options(\n      label: \"inactiveColor\",\n      description: \"MoonColors variants for unchecked MoonRadio.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveColor = colorTable(context)[inactiveColorKnob ?? 40];\n\n    final isToggleableKnob = context.knobs.boolean(\n      label: \"toggleable\",\n      description: \"Whether selected MoonRadio can be unselected.\",\n    );\n\n    final isDisabledKnob = context.knobs.boolean(\n      label: \"Disabled\",\n      description: \"MoonRadio onChanged() is null.\",\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          children: [\n            const TextDivider(\n              text: \"MoonRadio\",\n              paddingTop: 0,\n            ),\n            ...List.generate(\n              2,\n              (int index) => MoonRadio(\n                value: ChoiceCustom.values[index],\n                groupValue: valueCustom,\n                activeColor: activeColor,\n                inactiveColor: inactiveColor,\n                toggleable: isToggleableKnob,\n                onChanged: isDisabledKnob\n                    ? null\n                    : (ChoiceCustom? choice) =>\n                        setState(() => valueCustom = choice),\n              ),\n            ),\n            const TextDivider(text: \"MoonRadio with label\"),\n            ...List.generate(\n              2,\n              (int index) => MoonMenuItem(\n                absorbGestures: true,\n                onTap: isDisabledKnob\n                    ? null\n                    : () => setState(\n                          () {\n                            if (isToggleableKnob &&\n                                valueLabel == ChoiceLabel.values[index]) {\n                              valueLabel = null;\n                            } else {\n                              valueLabel = ChoiceLabel.values[index];\n                            }\n                          },\n                        ),\n                label: Text(\"With label #${index + 1}\"),\n                trailing: MoonRadio(\n                  value: ChoiceLabel.values[index],\n                  groupValue: valueLabel,\n                  toggleable: isToggleableKnob,\n                  tapAreaSizeValue: 0,\n                  onChanged: isDisabledKnob ? null : (_) {},\n                ),\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/segmented_control.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass SegmentedControlStory extends StatelessWidget {\n  static const path = '/primitives/segmented_control';\n\n  const SegmentedControlStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final segmentedControlSizeKnob = context.knobs.nullable.options(\n      label: \"segmentedControlSize\",\n      description: \"Size variants for MoonSegmentedControl.\",\n      enabled: false,\n      initial: MoonSegmentedControlSize.md,\n      options: const [\n        Option(label: \"sm\", value: MoonSegmentedControlSize.sm),\n        Option(label: \"md\", value: MoonSegmentedControlSize.md),\n      ],\n    );\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonSegmentedControl background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final selectedSegmentColorKnob = context.knobs.nullable.options(\n      label: \"selectedSegmentColor\",\n      description:\n          \"MoonColors variants for MoonSegmentedControl selected segment.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final selectedSegmentColor =\n        colorTable(context)[selectedSegmentColorKnob ?? 40];\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"textColor\",\n      description: \"MoonColors variants for MoonSegmentedControl default text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final selectedTextColorKnob = context.knobs.nullable.options(\n      label: \"selectedTextColor\",\n      description:\n          \"MoonColors variants for MoonSegmentedControl selected segment text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final selectedTextColor = colorTable(context)[selectedTextColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonSegmentedControl.\",\n      enabled: false,\n      initial: 12,\n      max: 32,\n    );\n\n    final segmentBorderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"segmentBorderRadius\",\n      description: \"Border radius for MoonSegmentedControl segments.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final gapKnob = context.knobs.nullable.sliderInt(\n      label: \"gap\",\n      description: \"Gap between MoonSegmentedControl segments.\",\n      enabled: false,\n      initial: 4,\n      max: 12,\n    );\n\n    final showLeadingKnob = context.knobs.boolean(\n      label: \"leading\",\n      description: \"Show widget in MoonSegmentedControl leading slot.\",\n    );\n\n    final showLabelKnob = context.knobs.boolean(\n      label: \"label\",\n      description: \"Show widget in MoonSegmentedControl label slot.\",\n      initial: true,\n    );\n\n    final showTrailingKnob = context.knobs.boolean(\n      label: \"trailing\",\n      description: \"Show widget in MoonSegmentedControl trailing slot.\",\n    );\n\n    final isExpandedKnob = context.knobs.boolean(\n      label: \"isExpanded\",\n      description: \"Expand MoonSegmentControl horizontally.\",\n    );\n\n    final isDisabledKnob = context.knobs.boolean(\n      label: \"isDisabled\",\n      description: \"Disable MoonSegmentedControl.\",\n    );\n\n    final SegmentStyle segmentStyle = SegmentStyle(\n      textColor: textColor,\n      selectedTextColor: selectedTextColor,\n      selectedSegmentColor: selectedSegmentColor,\n      segmentBorderRadius: segmentBorderRadiusKnob != null\n          ? BorderRadius.circular(segmentBorderRadiusKnob.toDouble())\n          : null,\n    );\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          children: [\n            const TextDivider(\n              text: \"MoonSegmentedControl\",\n              paddingTop: 0,\n            ),\n            Column(\n              children: [\n                MoonSegmentedControl(\n                  isDisabled: isDisabledKnob,\n                  isExpanded: isExpandedKnob,\n                  gap: gapKnob?.toDouble(),\n                  segmentedControlSize: segmentedControlSizeKnob,\n                  backgroundColor: backgroundColor,\n                  borderRadius: borderRadius,\n                  segments: List.generate(\n                    3,\n                    (int index) => Segment(\n                      leading: showLeadingKnob\n                          ? const Icon(MoonIcons.other_frame_24_light)\n                          : null,\n                      label: showLabelKnob ? Text('Tab${index + 1}') : null,\n                      trailing: showTrailingKnob\n                          ? const Icon(MoonIcons.other_frame_24_light)\n                          : null,\n                      segmentStyle: segmentStyle,\n                    ),\n                  ),\n                ),\n                const TextDivider(text: \"MoonSegmentedControl with icons\"),\n                MoonSegmentedControl(\n                  isDisabled: isDisabledKnob,\n                  isExpanded: isExpandedKnob,\n                  gap: gapKnob?.toDouble(),\n                  segmentedControlSize: segmentedControlSizeKnob,\n                  backgroundColor: backgroundColor,\n                  borderRadius: borderRadius,\n                  segments: List.generate(\n                    4,\n                    (int index) => Segment(\n                      trailing: const Icon(MoonIcons.other_frame_24_light),\n                      segmentStyle: segmentStyle,\n                    ),\n                  ),\n                ),\n              ],\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/switch.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass SwitchStory extends StatefulWidget {\n  static const path = '/primitives/switch';\n\n  const SwitchStory({super.key});\n\n  @override\n  State<SwitchStory> createState() => _SwitchStoryState();\n}\n\nclass _SwitchStoryState extends State<SwitchStory> {\n  bool switchValue = false;\n  bool switchTextValue = false;\n  bool switchIconValue = false;\n\n  @override\n  Widget build(BuildContext context) {\n    final switchSizeKnob = context.knobs.nullable.options(\n      label: \"switchSize\",\n      description: \"Size variants for MoonSwitch.\",\n      enabled: false,\n      initial: MoonSwitchSize.xs,\n      options: const [\n        Option(label: \"x2s\", value: MoonSwitchSize.x2s),\n        Option(label: \"xs\", value: MoonSwitchSize.xs),\n        Option(label: \"sm\", value: MoonSwitchSize.sm),\n      ],\n    );\n\n    final thumbColorKnob = context.knobs.nullable.options(\n      label: \"thumbColor\",\n      description: \"MoonColors variants for MoonSwitch thumb.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final thumbColor = colorTable(context)[thumbColorKnob ?? 40];\n\n    final activeTrackColorKnob = context.knobs.nullable.options(\n      label: \"activeTrackColor\",\n      description: \"MoonColors variants for MoonSwitch active track.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeTrackColor = colorTable(context)[activeTrackColorKnob ?? 40];\n\n    final inactiveTrackColorKnob = context.knobs.nullable.options(\n      label: \"inactiveTrackColor\",\n      description: \"MoonColors variants for MoonSwitch inactive track.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveTrackColor =\n        colorTable(context)[inactiveTrackColorKnob ?? 40];\n\n    final isDisabled = context.knobs.boolean(\n      label: \"Disabled\",\n      description: \"MoonSwitch onChanged() is null.\",\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          children: [\n            const TextDivider(\n              text: \"MoonSwitch\",\n              paddingTop: 0,\n            ),\n            MoonSwitch(\n              switchSize: switchSizeKnob,\n              thumbColor: thumbColor,\n              activeTrackColor: activeTrackColor,\n              inactiveTrackColor: inactiveTrackColor,\n              value: switchValue,\n              onChanged: isDisabled\n                  ? null\n                  : (bool newValue) => setState(() => switchValue = newValue),\n            ),\n            const TextDivider(text: \"Custom MoonSwitch\"),\n            MoonSwitch(\n              switchSize: switchSizeKnob,\n              activeThumbWidget: const Icon(\n                MoonIcons.generic_check_alternative_16_light,\n              ),\n              inactiveThumbWidget: const Icon(\n                MoonIcons.controls_close_small_16_light,\n              ),\n              activeTrackWidget: const Text(\n                \"ON\",\n                textAlign: TextAlign.center,\n              ),\n              inactiveTrackWidget: const Text(\n                \"OFF\",\n                textAlign: TextAlign.center,\n              ),\n              value: switchTextValue,\n              onChanged: (bool newValue) =>\n                  setState(() => switchTextValue = newValue),\n            ),\n            const SizedBox(height: 32),\n            MoonSwitch(\n              switchSize: switchSizeKnob,\n              activeTrackWidget: const Icon(MoonIcons.other_moon_16_light),\n              inactiveTrackWidget: const Icon(MoonIcons.other_sun_16_light),\n              value: switchIconValue,\n              onChanged: (bool newValue) =>\n                  setState(() => switchIconValue = newValue),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/tab_bar.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass TabBarStory extends StatefulWidget {\n  static const path = '/primitives/tab_bar';\n\n  const TabBarStory({super.key});\n\n  @override\n  State<TabBarStory> createState() => _TabBarStoryState();\n}\n\nclass _TabBarStoryState extends State<TabBarStory>\n    with SingleTickerProviderStateMixin {\n  late TabController _tabController;\n\n  @override\n  void initState() {\n    super.initState();\n\n    _tabController = TabController(length: 3, vsync: this, initialIndex: 1);\n  }\n\n  @override\n  void dispose() {\n    _tabController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final tabsSizeKnob = context.knobs.nullable.options(\n      label: \"tabBarSize\",\n      description: \"Size variants for MoonTabBar.\",\n      enabled: false,\n      initial: MoonTabBarSize.md,\n      options: const [\n        Option(label: \"sm\", value: MoonTabBarSize.sm),\n        Option(label: \"md\", value: MoonTabBarSize.md),\n      ],\n    );\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"textColor\",\n      description: \"MoonColors variants for MoonTabBar default text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final selectedTextColorKnob = context.knobs.nullable.options(\n      label: \"selectedTextColor\",\n      description: \"MoonColors variants for MoonTabBar selected tab text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final selectedTextColor = colorTable(context)[selectedTextColorKnob ?? 40];\n\n    final indicatorColorKnob = context.knobs.nullable.options(\n      label: \"indicatorColor\",\n      description: \"MoonColors variants for MoonTabBar indicator.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final indicatorColor = colorTable(context)[indicatorColorKnob ?? 40];\n\n    final selectedTabColorKnob = context.knobs.nullable.options(\n      label: \"selectedTabColor\",\n      description: \"MoonColors variants for pill MoonTabBar selected tab.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final selectedTabColor = colorTable(context)[selectedTabColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for pill MoonTabBar.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final indicatorHeightKnob = context.knobs.nullable.sliderInt(\n      label: \"indicatorHeight\",\n      description: \"Indicator height for MoonTabBar.\",\n      enabled: false,\n      initial: 2,\n      max: 4,\n    );\n\n    final gapKnob = context.knobs.nullable.sliderInt(\n      label: \"gap\",\n      description: \"Gap between MoonTabBar tabs.\",\n      enabled: false,\n      initial: 4,\n      max: 12,\n    );\n\n    final showLeadingKnob = context.knobs.boolean(\n      label: \"leading\",\n      description: \"Show widget in MoonTabBar leading slot.\",\n    );\n\n    final showLabelKnob = context.knobs.boolean(\n      label: \"label\",\n      description: \"Show widget in MoonTabBar label slot.\",\n      initial: true,\n    );\n\n    final showTrailingKnob = context.knobs.boolean(\n      label: \"trailing\",\n      description: \"Show widget in MoonTabBar trailing slot.\",\n    );\n\n    final isExpandedKnob = context.knobs.boolean(\n      label: \"isExpanded\",\n      description: \"Expand MoonTabBar horizontally.\",\n    );\n\n    final tabStyle = MoonTabStyle(\n      textColor: textColor,\n      selectedTextColor: selectedTextColor,\n      indicatorColor: indicatorColor,\n      indicatorHeight: indicatorHeightKnob?.toDouble(),\n    );\n\n    final pillTabStyle = MoonPillTabStyle(\n      textColor: textColor,\n      selectedTextColor: selectedTextColor,\n      selectedTabColor: selectedTabColor,\n      borderRadius: borderRadiusKnob != null\n          ? BorderRadius.circular(borderRadiusKnob.toDouble())\n          : null,\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          children: [\n            const TextDivider(\n              text: \"MoonTabBar\",\n              paddingTop: 0,\n            ),\n            Column(\n              children: [\n                MoonTabBar(\n                  tabBarSize: tabsSizeKnob,\n                  isExpanded: isExpandedKnob,\n                  gap: gapKnob?.toDouble(),\n                  tabs: List.generate(\n                    3,\n                    (int index) => MoonTab(\n                      leading: showLeadingKnob\n                          ? const Icon(MoonIcons.other_frame_24_light)\n                          : null,\n                      label: showLabelKnob ? Text('Tab${index + 1}') : null,\n                      trailing: showTrailingKnob\n                          ? const Icon(MoonIcons.other_frame_24_light)\n                          : null,\n                      tabStyle: tabStyle,\n                    ),\n                  ),\n                ),\n                const TextDivider(text: \"MoonTabBar with disabled tab\"),\n                MoonTabBar(\n                  tabBarSize: tabsSizeKnob,\n                  isExpanded: isExpandedKnob,\n                  gap: gapKnob?.toDouble(),\n                  tabs: List.generate(\n                    4,\n                    (int index) => MoonTab(\n                      disabled: index == 1,\n                      trailing: const Icon(MoonIcons.other_frame_24_light),\n                      tabStyle: tabStyle,\n                    ),\n                  ),\n                ),\n                const TextDivider(text: \"Pill MoonTabBar\"),\n                MoonTabBar.pill(\n                  tabBarSize: tabsSizeKnob,\n                  isExpanded: isExpandedKnob,\n                  gap: gapKnob?.toDouble(),\n                  pillTabs: List.generate(\n                    3,\n                    (int index) => MoonPillTab(\n                      leading: showLeadingKnob\n                          ? const Icon(MoonIcons.other_frame_24_light)\n                          : null,\n                      label: showLabelKnob ? Text('Tab${index + 1}') : null,\n                      trailing: showTrailingKnob\n                          ? const Icon(MoonIcons.other_frame_24_light)\n                          : null,\n                      tabStyle: pillTabStyle,\n                    ),\n                  ),\n                ),\n                const TextDivider(text: \"Custom MoonTabBar with TabBarView\"),\n                MoonTabBar(\n                  isExpanded: true,\n                  tabController: _tabController,\n                  tabs: List.generate(\n                    3,\n                    (int index) => MoonTab(\n                      label: Text('Tab${index + 1}'),\n                      tabStyle: tabStyle,\n                    ),\n                  ),\n                ),\n                SizedBox(\n                  height: 112,\n                  child: TabBarView(\n                    controller: _tabController,\n                    children: [\n                      Container(\n                        color: context.moonColors!.whis60,\n                        padding: const EdgeInsets.all(16),\n                        child: Stack(\n                          children: [\n                            const Align(\n                              child: Text('Tab1'),\n                            ),\n                            Align(\n                              alignment: Alignment.centerRight,\n                              child: MoonButton.icon(\n                                onTap: () => _tabController.animateTo(1),\n                                icon: const Icon(\n                                  MoonIcons.controls_chevron_right_24_light,\n                                ),\n                              ),\n                            ),\n                          ],\n                        ),\n                      ),\n                      Container(\n                        color: context.moonColors!.frieza60,\n                        padding: const EdgeInsets.all(16),\n                        child: Row(\n                          mainAxisAlignment: MainAxisAlignment.spaceBetween,\n                          children: [\n                            MoonButton.icon(\n                              onTap: () => _tabController.animateTo(0),\n                              icon: const Icon(\n                                MoonIcons.controls_chevron_left_24_light,\n                              ),\n                            ),\n                            const Text('Tab2'),\n                            MoonButton.icon(\n                              onTap: () => _tabController.animateTo(2),\n                              icon: const Icon(\n                                MoonIcons.controls_chevron_right_24_light,\n                              ),\n                            ),\n                          ],\n                        ),\n                      ),\n                      Container(\n                        color: context.moonColors!.whis60,\n                        padding: const EdgeInsets.all(16),\n                        child: Stack(\n                          children: [\n                            const Align(\n                              child: Text('Tab3'),\n                            ),\n                            Align(\n                              alignment: Alignment.centerLeft,\n                              child: MoonButton.icon(\n                                onTap: () => _tabController.animateTo(1),\n                                icon: const Icon(\n                                  MoonIcons.controls_chevron_left_24_light,\n                                ),\n                              ),\n                            ),\n                          ],\n                        ),\n                      ),\n                    ],\n                  ),\n                ),\n              ],\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/table.dart",
    "content": "import 'dart:math';\n\nimport 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nconst int _rowsPerPage = 25;\n\nclass TableStory extends StatefulWidget {\n  static const path = '/primitives/table';\n\n  const TableStory({super.key});\n\n  @override\n  State<TableStory> createState() => _TableStoryState();\n}\n\nclass _TableStoryState extends State<TableStory> {\n  late final List<_TableData> _tableDataOriginal;\n  late List<_TableData> _tableDataToShow;\n\n  final List<String> _columnNames = [\n    'ID',\n    'First name',\n    'Last name',\n    'Age',\n    'Activity',\n  ];\n\n  final List<bool> _columnSorting = List.generate(6, (int _) => true);\n\n  bool _checkAllBoxes = false;\n  bool _sortAscending = true;\n  int _sortColumnIndex = 0;\n  int _rowsToShow = _rowsPerPage;\n\n  bool _showCheckboxes = false;\n  bool _showDividerKnob = false;\n  bool _rowsSelectableKnob = false;\n  bool _zebraStyleKnob = false;\n  bool _infiniteScrollKnob = false;\n  Color? _rowColor;\n  Color? _selectedRowColor;\n  Color? _textColor;\n  int? _borderRadiusKnob;\n\n  List<_TableData> _generateTableData() {\n    return List<_TableData>.generate(\n      _rowsPerPage * 5,\n      (int index) => _TableData(\n        id: index,\n        selected: false,\n        firstName: 'Test$index',\n        lastName: 'Subject$index',\n        age: Random().nextInt(81),\n        activity: Random().nextInt(100),\n      ),\n    );\n  }\n\n  void _scrollListener(ScrollController verticalScrollController) {\n    verticalScrollController.addListener(() {\n      if (verticalScrollController.hasClients && _infiniteScrollKnob) {\n        final double pixels = verticalScrollController.position.pixels;\n        final double maxScrollExtent =\n            verticalScrollController.position.maxScrollExtent;\n\n        if (pixels >= maxScrollExtent && _rowsToShow < _rowsPerPage * 5) {\n          _tableDataToShow += _tableDataOriginal.sublist(\n            _rowsToShow,\n            _rowsToShow + _rowsPerPage,\n          );\n\n          setState(() => _rowsToShow += _rowsPerPage);\n        }\n      }\n    });\n  }\n\n  void _onSort(int columnIndex, bool sortAscending) {\n    if (_sortColumnIndex == columnIndex || _sortAscending != sortAscending) {\n      setState(() {\n        if (columnIndex == _sortColumnIndex) {\n          _sortAscending = _columnSorting[columnIndex] = sortAscending;\n        } else {\n          _sortColumnIndex = columnIndex;\n          _sortAscending = _columnSorting[columnIndex];\n        }\n\n        switch (_showCheckboxes ? columnIndex : columnIndex + 1) {\n          case 1:\n            _tableDataToShow.sort((a, b) => a.id.compareTo(b.id));\n          case 2:\n            _tableDataToShow.sort((a, b) => a.firstName.compareTo(b.firstName));\n          case 3:\n            _tableDataToShow.sort((a, b) => a.lastName.compareTo(b.lastName));\n          case 4:\n            _tableDataToShow.sort((a, b) => a.age.compareTo(b.age));\n          case 5:\n            _tableDataToShow.sort((a, b) => a.activity.compareTo(b.activity));\n        }\n\n        if (!_sortAscending) {\n          _tableDataToShow = _tableDataToShow.reversed.toList();\n        }\n      });\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _tableDataOriginal = _generateTableData();\n    _tableDataToShow = _tableDataOriginal.sublist(0, _rowsPerPage);\n  }\n\n  Widget _headerCheckBox() {\n    return Padding(\n      padding: const EdgeInsetsDirectional.only(start: 16.0),\n      child: MoonCheckbox(\n        tapAreaSizeValue: 0,\n        value: _checkAllBoxes,\n        onChanged: _rowsSelectableKnob\n            ? (bool? onChanged) => onChanged != null\n                ? setState(() {\n                    _checkAllBoxes = onChanged;\n\n                    for (final item in _tableDataToShow) {\n                      item.selected = _checkAllBoxes;\n                    }\n                  })\n                : null\n            : null,\n      ),\n    );\n  }\n\n  Widget _buildCell(dynamic label, {bool firstCell = false}) {\n    return DecoratedBox(\n      decoration: _showDividerKnob && !firstCell\n          ? BoxDecoration(\n              border: Border(\n                left: Directionality.of(context) == TextDirection.ltr\n                    ? Divider.createBorderSide(\n                        context,\n                        color: context.moonColors!.beerus,\n                        width: 1,\n                      )\n                    : BorderSide.none,\n                right: Directionality.of(context) == TextDirection.rtl\n                    ? Divider.createBorderSide(\n                        context,\n                        color: context.moonColors!.beerus,\n                        width: 1,\n                      )\n                    : BorderSide.none,\n              ),\n            )\n          : const BoxDecoration(),\n      child: Padding(\n        padding: const EdgeInsetsDirectional.only(start: 16.0),\n        child: Column(\n          mainAxisAlignment: MainAxisAlignment.spaceAround,\n          children: [\n            Text(\n              label.toString(),\n              style: TextStyle(color: _textColor),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n\n  MoonTableHeader _generateTableHeader() {\n    return MoonTableHeader(\n      columns: List.generate(\n        _showCheckboxes ? 6 : 5,\n        (int index) {\n          final bool checkboxColumn = index == 0 && _showCheckboxes;\n          final double columnWidth =\n              index == 0 || index == 1 && _showCheckboxes ? 64 : 128;\n\n          return MoonTableColumn(\n            width: columnWidth,\n            onTap: () {\n              if (checkboxColumn && _rowsSelectableKnob) {\n                setState(() {\n                  _checkAllBoxes = !_checkAllBoxes;\n\n                  for (final item in _tableDataToShow) {\n                    item.selected = _checkAllBoxes;\n                  }\n                });\n              }\n            },\n            onSort: checkboxColumn\n                ? null\n                : (int columnIndex, bool sortAscending) =>\n                    _onSort(columnIndex, sortAscending),\n            cell: checkboxColumn\n                ? _headerCheckBox()\n                : _buildCell(\n                    _columnNames[_showCheckboxes ? index - 1 : index],\n                    firstCell: index == 0 && !_showCheckboxes,\n                  ),\n          );\n        },\n      ),\n    );\n  }\n\n  MoonTableFooter _generateTableFooter() {\n    return MoonTableFooter(\n      cells: List.generate(\n        _showCheckboxes ? 6 : 5,\n        (int index) {\n          final int ageColumnIndex = _showCheckboxes ? 4 : 3;\n          final int activityColumnIndex = _showCheckboxes ? 5 : 4;\n\n          final String label = index == 0\n              ? 'Total:'\n              : (index == ageColumnIndex || index == activityColumnIndex)\n                  ? _tableDataToShow\n                      .map(\n                        (_TableData item) =>\n                            index == ageColumnIndex ? item.age : item.activity,\n                      )\n                      .reduce((int value, int element) => value + element)\n                      .toString()\n                  : '-';\n\n          return _buildCell(label, firstCell: index == 0);\n        },\n      ),\n    );\n  }\n\n  List<MoonTableRow> _generateTableRows() {\n    return List.generate(\n      _rowsToShow,\n      (int index) {\n        final row = _tableDataToShow[index];\n\n        return MoonTableRow(\n          selected: row.selected,\n          onSelectChanged: _rowsSelectableKnob\n              ? (bool? selected) =>\n                  setState(() => row.selected = selected ?? false)\n              : null,\n          decoration: ShapeDecorationWithPremultipliedAlpha(\n            color: _zebraStyleKnob\n                ? row.selected\n                    ? _selectedRowColor ?? context.moonColors!.beerus\n                    : index.isEven\n                        ? _rowColor ?? context.moonColors!.goku\n                        : Colors.transparent\n                : row.selected\n                    ? _selectedRowColor ?? context.moonColors!.beerus\n                    : _rowColor ?? context.moonColors!.goku,\n            shape: MoonSquircleBorder(\n              borderRadius: _borderRadiusKnob != null\n                  ? BorderRadius.circular(_borderRadiusKnob!.toDouble())\n                      .squircleBorderRadius(context)\n                  : BorderRadius.circular(8).squircleBorderRadius(context),\n            ),\n          ),\n          cells: [\n            if (_showCheckboxes)\n              Padding(\n                padding: const EdgeInsetsDirectional.only(start: 16.0),\n                child: MoonCheckbox(\n                  tapAreaSizeValue: 0,\n                  value: row.selected,\n                  onChanged: _rowsSelectableKnob\n                      ? (bool? onChanged) =>\n                          setState(() => row.selected = !row.selected)\n                      : null,\n                ),\n              ),\n            _buildCell(row.id, firstCell: !_showCheckboxes),\n            _buildCell(row.firstName),\n            _buildCell(row.lastName),\n            _buildCell(row.age),\n            _buildCell(row.activity),\n          ],\n        );\n      },\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final tableRowSizeKnob = context.knobs.nullable.options(\n      label: \"tableRowSize\",\n      description: \"Size variants for MoonTable row.\",\n      enabled: false,\n      initial: MoonTableRowSize.md,\n      options: const [\n        Option(label: \"xs\", value: MoonTableRowSize.xs),\n        Option(label: \"sm\", value: MoonTableRowSize.sm),\n        Option(label: \"md\", value: MoonTableRowSize.md),\n        Option(label: \"lg\", value: MoonTableRowSize.lg),\n        Option(label: \"xl\", value: MoonTableRowSize.xl),\n        Option(label: \"x2l\", value: MoonTableRowSize.x2l),\n      ],\n    );\n\n    final rowColorKnob = context.knobs.nullable.options(\n      label: \"Row color\",\n      description: \"MoonColors variants for MoonTable rows.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    _rowColor = colorTable(context)[rowColorKnob ?? 40];\n\n    final selectedRowColorKnob = context.knobs.nullable.options(\n      label: \"Selected row color\",\n      description: \"MoonColors variants for MoonTable selected rows.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    _selectedRowColor = colorTable(context)[selectedRowColorKnob ?? 40];\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"Text color\",\n      description: \"MoonColors variants for MoonTable text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    _textColor = colorTable(context)[textColorKnob ?? 40];\n\n    _borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"Border radius\",\n      description: \"Border radius for MoonTable row.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final rowGapKnob = context.knobs.nullable.sliderInt(\n      label: \"rowGap\",\n      description: \"Gap between MoonTable rows.\",\n      enabled: false,\n      initial: 4,\n      max: 16,\n    );\n\n    final isHeaderPinnedKnob = context.knobs.boolean(\n      label: \"isHeaderPinned\",\n      description: \"Show MoonTable with pinned header.\",\n      initial: true,\n    );\n\n    final isFooterPinnedKnob = context.knobs.boolean(\n      label: \"isFooterPinned\",\n      description: \"Show MoonTable with pinned footer.\",\n      initial: true,\n    );\n\n    _rowsSelectableKnob = context.knobs.boolean(\n      label: \"Rows selectable\",\n      description: \"Row onSelectChanged() is not null.\",\n      initial: true,\n    );\n\n    _zebraStyleKnob = context.knobs.boolean(\n      label: \"Zebra style rows\",\n      description: \"Show MoonTable rows with zebra style.\",\n    );\n\n    final showCheckboxesKnob = context.knobs.boolean(\n      label: \"With checkboxes\",\n      description: \"Show MoonTable with checkboxes.\",\n    );\n\n    _showDividerKnob = context.knobs.boolean(\n      label: \"With cell divider\",\n      description: \"Show MoonTable with cell divider.\",\n    );\n\n    final infiniteScrollKnob = context.knobs.boolean(\n      label: \"With infinite scroll\",\n      description: \"Show MoonTable with infinite scroll.\",\n    );\n\n    if (_showCheckboxes != showCheckboxesKnob) {\n      _showCheckboxes = showCheckboxesKnob;\n      _sortColumnIndex =\n          showCheckboxesKnob ? _sortColumnIndex + 1 : _sortColumnIndex - 1;\n    }\n\n    if (_infiniteScrollKnob != infiniteScrollKnob) {\n      _infiniteScrollKnob = infiniteScrollKnob;\n\n      if (!infiniteScrollKnob) {\n        _tableDataToShow = _tableDataOriginal.sublist(0, _rowsPerPage);\n        _rowsToShow = _rowsPerPage;\n      }\n    }\n\n    return Padding(\n      padding: EdgeInsets.only(\n        top: MediaQuery.of(context).padding.top + 16.0,\n        bottom: 42.0,\n      ),\n      child: OverflowBox(\n        maxWidth: MediaQuery.of(context).size.width,\n        child: MoonTable(\n          columnsCount: _showCheckboxes ? 6 : 5,\n          isHeaderPinned: isHeaderPinnedKnob,\n          isFooterPinned: isFooterPinnedKnob,\n          sortAscending: _sortAscending,\n          sortColumnIndex: _sortColumnIndex,\n          rowGap: rowGapKnob?.toDouble(),\n          rowSize: tableRowSizeKnob ?? MoonTableRowSize.md,\n          header: _generateTableHeader(),\n          footer: _generateTableFooter(),\n          rows: _generateTableRows(),\n          tablePadding: const EdgeInsets.symmetric(horizontal: 16),\n          cellPadding: EdgeInsets.symmetric(\n            vertical: tableRowSizeKnob == MoonTableRowSize.xs ? 4 : 8,\n          ),\n          onScrollControllersReady: (\n            ScrollController verticalScrollController,\n            ScrollController horizontalScrollController,\n          ) =>\n              _scrollListener(verticalScrollController),\n        ),\n      ),\n    );\n  }\n}\n\nclass _TableData {\n  bool selected;\n  int id;\n  String firstName;\n  String lastName;\n  int age;\n  int activity;\n\n  _TableData({\n    required this.selected,\n    required this.id,\n    required this.firstName,\n    required this.lastName,\n    required this.age,\n    required this.activity,\n  });\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/tag.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass TagStory extends StatelessWidget {\n  static const path = '/primitives/tag';\n\n  const TagStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final customLabelTextKnob = context.knobs.text(\n      label: \"Tag label text\",\n      initial: \"MoonTag\",\n    );\n\n    final tagSizeKnob = context.knobs.nullable.options(\n      label: \"tagSize\",\n      description: \"Size variants for MoonTag.\",\n      enabled: false,\n      initial: MoonTagSize.xs,\n      options: const [\n        Option(label: \"x2s\", value: MoonTagSize.x2s),\n        Option(label: \"xs\", value: MoonTagSize.xs),\n        Option(label: \"sm\", value: MoonTagSize.sm),\n      ],\n    );\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"Text color\",\n      description: \"MoonColors variants for MoonTag text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final iconColorKnob = context.knobs.nullable.options(\n      label: \"Icon color\",\n      description: \"MoonColors variants for MoonTag icon.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final iconColor = colorTable(context)[iconColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonTag background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonTag.\",\n      enabled: false,\n      initial: 4,\n      max: 32,\n    );\n\n    final showLeadingKnob = context.knobs.boolean(\n      label: \"leading\",\n      description: \"Show widget in MoonTag leading slot.\",\n    );\n\n    final showLabelKnob = context.knobs.boolean(\n      label: \"label\",\n      description: \"Show widget in MoonTag label slot.\",\n      initial: true,\n    );\n\n    final showTrailingKnob = context.knobs.boolean(\n      label: \"trailing\",\n      description: \"Show widget in MoonTag trailing slot.\",\n      initial: true,\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: MoonTag(\n          borderRadius: borderRadiusKnob != null\n              ? BorderRadius.circular(borderRadiusKnob.toDouble())\n              : null,\n          onTap: () {},\n          tagSize: tagSizeKnob,\n          backgroundColor: backgroundColor,\n          leading: showLeadingKnob\n              ? Icon(\n                  MoonIcons.controls_close_small_16_light,\n                  color: iconColor,\n                )\n              : null,\n          label: showLabelKnob\n              ? Text(\n                  customLabelTextKnob,\n                  style: TextStyle(color: textColor),\n                )\n              : null,\n          trailing: showTrailingKnob\n              ? Icon(\n                  MoonIcons.controls_close_small_16_light,\n                  color: iconColor,\n                )\n              : null,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/text_area.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass TextAreaStory extends StatelessWidget {\n  static const path = '/primitives/text_area';\n\n  const TextAreaStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"textColor\",\n      description: \"MoonColors variants for MoonTextArea text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final hintTextColorKnob = context.knobs.nullable.options(\n      label: \"hintTextColor\",\n      description: \"MoonColors variants for MoonTextArea hint text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final hintTextColor = colorTable(context)[hintTextColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonTextArea background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final activeBorderColorKnob = context.knobs.nullable.options(\n      label: \"activeBorderColor\",\n      description: \"MoonColors variants for MoonTextArea active border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeBorderColor = colorTable(context)[activeBorderColorKnob ?? 40];\n\n    final inactiveBorderColorKnob = context.knobs.nullable.options(\n      label: \"inactiveBorderColor\",\n      description: \"MoonColors variants for MoonTextArea inactive border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveBorderColor =\n        colorTable(context)[inactiveBorderColorKnob ?? 40];\n\n    final errorColorKnob = context.knobs.nullable.options(\n      label: \"errorColor\",\n      description: \"MoonColors variants for MoonTextArea in error state.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final errorColor = colorTable(context)[errorColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonTextArea.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final enabledKnob = context.knobs.boolean(\n      label: \"enabled\",\n      description: \"Switch between enabled and disabled states.\",\n      initial: true,\n    );\n\n    final expandsKnob = context.knobs.boolean(\n      label: \"expands\",\n      description: \"Whether MoonTextArea can expand to fit its contents.\",\n    );\n\n    final showHelperKnob = context.knobs.boolean(\n      label: \"helper\",\n      description: \"Show widget in MoonTextArea helper slot.\",\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Form(\n          child: Builder(\n            builder: (BuildContext context) {\n              return Column(\n                mainAxisSize: MainAxisSize.min,\n                children: [\n                  MoonTextArea(\n                    enabled: enabledKnob,\n                    expands: expandsKnob,\n                    height: expandsKnob ? null : 200,\n                    textColor: textColor,\n                    hintTextColor: hintTextColor,\n                    backgroundColor: backgroundColor,\n                    activeBorderColor: activeBorderColor,\n                    inactiveBorderColor: inactiveBorderColor,\n                    errorColor: errorColor,\n                    borderRadius: borderRadiusKnob != null\n                        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n                        : null,\n                    hintText: \"Enter your text here...\",\n                    validator: (String? value) =>\n                        value?.length != null && value!.length < 10\n                            ? \"The text should be longer than 10 characters.\"\n                            : null,\n                    onTapOutside: (PointerDownEvent _) =>\n                        FocusManager.instance.primaryFocus?.unfocus(),\n                    helper:\n                        showHelperKnob ? const Text(\"Supporting text\") : null,\n                  ),\n                  const SizedBox(height: 32),\n                  MoonFilledButton(\n                    label: const Text(\"Submit\"),\n                    onTap: () => Form.of(context).validate(),\n                  ),\n                ],\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/text_input.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass TextInputStory extends StatefulWidget {\n  static const path = '/primitives/text_input';\n\n  const TextInputStory({super.key});\n\n  @override\n  State<TextInputStory> createState() => _TextInputStoryState();\n}\n\nclass _TextInputStoryState extends State<TextInputStory> {\n  final TextEditingController _textController = TextEditingController();\n  final TextEditingController _dateController = TextEditingController();\n  final TextEditingController _passwordController = TextEditingController();\n\n  bool _hidePassword = true;\n\n  @override\n  Widget build(BuildContext context) {\n    final textInputSizeKnob = context.knobs.nullable.options(\n      label: \"textInputSize\",\n      description: \"Size variants for MoonTextInput.\",\n      enabled: false,\n      initial: MoonTextInputSize.md,\n      options: const [\n        Option(label: \"sm\", value: MoonTextInputSize.sm),\n        Option(label: \"md\", value: MoonTextInputSize.md),\n        Option(label: \"lg\", value: MoonTextInputSize.lg),\n        Option(label: \"xl\", value: MoonTextInputSize.xl),\n      ],\n    );\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"textColor\",\n      description: \"MoonColors variants for MoonTextInput text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final hintTextColorKnob = context.knobs.nullable.options(\n      label: \"hintTextColor\",\n      description: \"MoonColors variants for MoonTextInput hint text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final hintTextColor = colorTable(context)[hintTextColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonTextInput background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final activeBorderColorKnob = context.knobs.nullable.options(\n      label: \"activeBorderColor\",\n      description: \"MoonColors variants for MoonTextInput active border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeBorderColor = colorTable(context)[activeBorderColorKnob ?? 40];\n\n    final inactiveBorderColorKnob = context.knobs.nullable.options(\n      label: \"inactiveBorderColor\",\n      description: \"MoonColors variants for MoonTextInput inactive border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final inactiveBorderColor =\n        colorTable(context)[inactiveBorderColorKnob ?? 40];\n\n    final hoverBorderColorKnob = context.knobs.nullable.options(\n      label: \"hoverBorderColor\",\n      description: \"MoonColors variants for MoonTextInput border on hover.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final hoverBorderColor = colorTable(context)[hoverBorderColorKnob ?? 40];\n\n    final errorColorKnob = context.knobs.nullable.options(\n      label: \"errorColor\",\n      description: \"MoonColors variants for MoonTextInput in error state.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final errorColor = colorTable(context)[errorColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonTextInput.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final enabledKnob = context.knobs.boolean(\n      label: \"enabled\",\n      description: \"Switch between enabled and disabled states.\",\n      initial: true,\n    );\n\n    final hasFloatingLabelKnob = context.knobs.boolean(\n      label: \"hasFloatingLabel\",\n      description: \"Whether MoonTextInput has floating label.\",\n    );\n\n    final showLeadingKnob = context.knobs.boolean(\n      label: \"leading\",\n      description: \"Show widget in MoonTextInput leading slot.\",\n      initial: true,\n    );\n\n    final showTrailingKnob = context.knobs.boolean(\n      label: \"trailing\",\n      description: \"Show widget in MoonTextInput trailing slot.\",\n      initial: true,\n    );\n\n    final showHelperKnob = context.knobs.boolean(\n      label: \"helper\",\n      description: \"Show widget in MoonTextInput helper slot.\",\n    );\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Form(\n          child: Builder(\n            builder: (BuildContext context) {\n              return Column(\n                mainAxisAlignment: MainAxisAlignment.center,\n                children: [\n                  MoonFormTextInput(\n                    controller: _textController,\n                    enabled: enabledKnob,\n                    textInputSize: textInputSizeKnob,\n                    hasFloatingLabel: hasFloatingLabelKnob,\n                    textColor: textColor,\n                    hintTextColor: hintTextColor,\n                    backgroundColor: backgroundColor,\n                    activeBorderColor: activeBorderColor,\n                    inactiveBorderColor: inactiveBorderColor,\n                    hoverBorderColor: hoverBorderColor,\n                    errorColor: errorColor,\n                    borderRadius: borderRadius,\n                    hintText: \"Enter text (over 10 characters)\",\n                    validator: (String? value) =>\n                        value != null && value.length < 10\n                            ? \"The text should be longer than 10 characters.\"\n                            : null,\n                    onTapOutside: (PointerDownEvent _) =>\n                        FocusManager.instance.primaryFocus?.unfocus(),\n                    leading: showLeadingKnob\n                        ? const Icon(\n                            MoonIcons.generic_search_24_light,\n                            size: 24,\n                          )\n                        : null,\n                    trailing: showTrailingKnob\n                        ? MouseRegion(\n                            cursor: SystemMouseCursors.click,\n                            child: GestureDetector(\n                              child: const Icon(\n                                MoonIcons.controls_close_small_24_light,\n                                size: 24,\n                              ),\n                              onTap: () => _textController.clear(),\n                            ),\n                          )\n                        : null,\n                    helper:\n                        showHelperKnob ? const Text(\"Supporting text\") : null,\n                  ),\n                  const SizedBox(height: 16),\n                  StatefulBuilder(\n                    builder: (context, setState) {\n                      return MoonFormTextInput(\n                        controller: _passwordController,\n                        enabled: enabledKnob,\n                        keyboardType: TextInputType.visiblePassword,\n                        obscureText: _hidePassword,\n                        textInputSize: textInputSizeKnob,\n                        hasFloatingLabel: hasFloatingLabelKnob,\n                        textColor: textColor,\n                        hintTextColor: hintTextColor,\n                        backgroundColor: backgroundColor,\n                        activeBorderColor: activeBorderColor,\n                        inactiveBorderColor: inactiveBorderColor,\n                        hoverBorderColor: hoverBorderColor,\n                        errorColor: errorColor,\n                        borderRadius: borderRadius,\n                        hintText: \"Enter password (123abc)\",\n                        validator: (String? value) =>\n                            value != \"123abc\" ? \"Wrong password.\" : null,\n                        onTapOutside: (PointerDownEvent _) =>\n                            FocusManager.instance.primaryFocus?.unfocus(),\n                        leading: showLeadingKnob\n                            ? const Icon(\n                                MoonIcons.security_password_24_light,\n                                size: 24,\n                              )\n                            : null,\n                        trailing: showTrailingKnob\n                            ? MouseRegion(\n                                cursor: SystemMouseCursors.click,\n                                child: GestureDetector(\n                                  child: IntrinsicWidth(\n                                    child: Align(\n                                      alignment: Alignment.centerRight,\n                                      child: Text(\n                                        _hidePassword ? \"Show\" : \"Hide\",\n                                        style: DefaultTextStyle.of(context)\n                                            .style\n                                            .copyWith(\n                                              decoration:\n                                                  TextDecoration.underline,\n                                            ),\n                                      ),\n                                    ),\n                                  ),\n                                  onTap: () => setState(\n                                    () => _hidePassword = !_hidePassword,\n                                  ),\n                                ),\n                              )\n                            : null,\n                        helper: showHelperKnob\n                            ? const Text(\"Supporting text\")\n                            : null,\n                      );\n                    },\n                  ),\n                  const SizedBox(height: 16),\n                  MoonFormTextInput(\n                    readOnly: true,\n                    controller: _dateController,\n                    enabled: enabledKnob,\n                    textInputSize: textInputSizeKnob,\n                    textColor: textColor,\n                    hintTextColor: hintTextColor,\n                    backgroundColor: backgroundColor,\n                    activeBorderColor: activeBorderColor,\n                    inactiveBorderColor: inactiveBorderColor,\n                    hoverBorderColor: hoverBorderColor,\n                    errorColor: errorColor,\n                    borderRadius: borderRadius,\n                    hintText: \"Pick a date\",\n                    validator: (String? value) =>\n                        value != null && value.isEmpty ? \"Pick a date.\" : null,\n                    onTap: () async {\n                      final DateTime? pickedDate = await showDatePicker(\n                        context: context,\n                        initialDate: DateTime.now(),\n                        firstDate: DateTime.now(),\n                        lastDate: DateTime(2050),\n                      );\n\n                      if (pickedDate != null) {\n                        _dateController.text =\n                            \"${pickedDate.toLocal()}\".split(\" \")[0];\n                      }\n                    },\n                    leading: showLeadingKnob\n                        ? const Icon(\n                            MoonIcons.time_calendar_24_light,\n                            size: 24,\n                          )\n                        : null,\n                    trailing: showTrailingKnob\n                        ? MouseRegion(\n                            cursor: SystemMouseCursors.click,\n                            child: GestureDetector(\n                              child: const Icon(\n                                MoonIcons.controls_close_small_24_light,\n                                size: 24,\n                              ),\n                              onTap: () => _dateController.clear(),\n                            ),\n                          )\n                        : null,\n                    helper:\n                        showHelperKnob ? const Text(\"Supporting text\") : null,\n                  ),\n                  const SizedBox(height: 32),\n                  MoonFilledButton(\n                    label: const Text(\"Submit\"),\n                    onTap: () => Form.of(context).validate(),\n                  ),\n                ],\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/text_input_group.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass TextInputGroupStory extends StatefulWidget {\n  static const path = '/primitives/text_input_group';\n\n  const TextInputGroupStory({super.key});\n\n  @override\n  State<TextInputGroupStory> createState() => _TextInputGroupStoryState();\n}\n\nclass _TextInputGroupStoryState extends State<TextInputGroupStory> {\n  final TextEditingController _textController = TextEditingController();\n  final TextEditingController _passwordController = TextEditingController();\n\n  bool _hidePassword = true;\n\n  @override\n  Widget build(BuildContext context) {\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"textColor\",\n      description: \"MoonColors variants for MoonTextInputGroup text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final hintTextColorKnob = context.knobs.nullable.options(\n      label: \"hintTextColor\",\n      description: \"MoonColors variants for MoonTextInputGroup hint text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final hintTextColor = colorTable(context)[hintTextColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonTextInputGroup background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderColorKnob = context.knobs.nullable.options(\n      label: \"borderColor\",\n      description: \"MoonColors variants for MoonTextInputGroup border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final borderColor = colorTable(context)[borderColorKnob ?? 40];\n\n    final activeChildrenBorderColorKnob = context.knobs.nullable.options(\n      label: \"activeBorderColor\",\n      description:\n          \"MoonColors variants for MoonTextInputGroup children active border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final activeBorderColor =\n        colorTable(context)[activeChildrenBorderColorKnob ?? 40];\n\n    final errorBorderColorKnob = context.knobs.nullable.options(\n      label: \"errorBorderColor\",\n      description:\n          \"MoonColors variants for MoonTextInputGroup error state border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final errorBorderColor = colorTable(context)[errorBorderColorKnob ?? 40];\n\n    final errorColorKnob = context.knobs.nullable.options(\n      label: \"errorColor\",\n      description: \"MoonColors variants for MoonTextInputGroup in error state.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final errorColor = colorTable(context)[errorColorKnob ?? 40];\n\n    final orientationKnob = context.knobs.nullable.options(\n      label: \"orientation\",\n      description: \"MoonTextInputGroup orientation.\",\n      enabled: false,\n      initial: MoonTextInputGroupOrientation.vertical,\n      options: [\n        const Option(\n          label: \"vertical\",\n          value: MoonTextInputGroupOrientation.vertical,\n        ),\n        const Option(\n          label: \"horizontal\",\n          value: MoonTextInputGroupOrientation.horizontal,\n        ),\n      ],\n    );\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonTextInputGroup.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final enabledKnob = context.knobs.boolean(\n      label: \"enabled\",\n      description: \"Switch between enabled and disabled states.\",\n      initial: true,\n    );\n\n    final showHelperKnob = context.knobs.boolean(\n      label: \"helper\",\n      description: \"Show widget in MoonTextInputGroup helper slot.\",\n    );\n\n    final BorderRadiusGeometry? borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Form(\n          child: Builder(\n            builder: (context) {\n              return Column(\n                mainAxisSize: MainAxisSize.min,\n                children: [\n                  MoonTextInputGroup(\n                    enabled: enabledKnob,\n                    backgroundColor: backgroundColor,\n                    borderColor: borderColor,\n                    errorColor: errorColor,\n                    borderRadius: borderRadius,\n                    orientation: orientationKnob ??\n                        MoonTextInputGroupOrientation.vertical,\n                    helper:\n                        showHelperKnob ? const Text(\"Supporting text\") : null,\n                    children: [\n                      MoonFormTextInput(\n                        textInputSize: MoonTextInputSize.xl,\n                        controller: _textController,\n                        enabled: enabledKnob,\n                        hasFloatingLabel: true,\n                        textColor: textColor,\n                        hintTextColor: hintTextColor,\n                        activeBorderColor: activeBorderColor,\n                        errorBorderColor: errorBorderColor,\n                        errorColor: errorColor,\n                        borderRadius: borderRadius,\n                        hintText: \"Enter text (over 10 characters)\",\n                        validator: (String? value) => value?.length != null &&\n                                value!.length < 10\n                            ? \"The text should be longer than 10 characters.\"\n                            : null,\n                        onTapOutside: (PointerDownEvent _) =>\n                            FocusManager.instance.primaryFocus?.unfocus(),\n                        leading: const Icon(\n                          MoonIcons.generic_search_24_light,\n                          size: 24,\n                        ),\n                        trailing: MouseRegion(\n                          cursor: SystemMouseCursors.click,\n                          child: GestureDetector(\n                            child: const Icon(\n                              MoonIcons.controls_close_small_24_light,\n                              size: 24,\n                            ),\n                            onTap: () => _textController.clear(),\n                          ),\n                        ),\n                      ),\n                      MoonFormTextInput(\n                        textInputSize: MoonTextInputSize.xl,\n                        controller: _passwordController,\n                        enabled: enabledKnob,\n                        keyboardType: TextInputType.visiblePassword,\n                        obscureText: _hidePassword,\n                        hasFloatingLabel: true,\n                        textColor: textColor,\n                        hintTextColor: hintTextColor,\n                        activeBorderColor: activeBorderColor,\n                        errorColor: errorColor,\n                        borderRadius: borderRadius,\n                        hintText: \"Enter password (123abc)\",\n                        validator: (String? value) =>\n                            value != \"123abc\" ? \"Wrong password.\" : null,\n                        onTapOutside: (PointerDownEvent _) =>\n                            FocusManager.instance.primaryFocus?.unfocus(),\n                        leading: const Icon(\n                          MoonIcons.security_password_24_light,\n                          size: 24,\n                        ),\n                        trailing: MouseRegion(\n                          cursor: SystemMouseCursors.click,\n                          child: GestureDetector(\n                            child: IntrinsicWidth(\n                              child: Align(\n                                alignment: Alignment.centerRight,\n                                child: Text(\n                                  _hidePassword ? \"Show\" : \"Hide\",\n                                  style: DefaultTextStyle.of(context)\n                                      .style\n                                      .copyWith(\n                                        decoration: TextDecoration.underline,\n                                      ),\n                                ),\n                              ),\n                            ),\n                            onTap: () =>\n                                setState(() => _hidePassword = !_hidePassword),\n                          ),\n                        ),\n                      ),\n                    ],\n                  ),\n                  const SizedBox(height: 32),\n                  MoonFilledButton(\n                    label: const Text(\"Submit\"),\n                    onTap: () => Form.of(context).validate(),\n                  ),\n                ],\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/toast.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass ToastStory extends StatelessWidget {\n  static const path = '/primitives/toast';\n\n  const ToastStory({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final customLabelTextKnob = context.knobs.text(\n      label: \"MoonToast label text\",\n      initial: \"Custom MoonToast text\",\n    );\n\n    final toastAlignmentKnob = context.knobs.nullable.options(\n      label: \"toastAlignment\",\n      description: \"Alignment (position) for MoonToast.\",\n      enabled: false,\n      initial: Alignment.bottomCenter,\n      options: const [\n        Option(label: \"topLeft\", value: Alignment.topLeft),\n        Option(label: \"topCenter\", value: Alignment.topCenter),\n        Option(label: \"topRight\", value: Alignment.topRight),\n        Option(label: \"centerLeft\", value: Alignment.centerLeft),\n        Option(label: \"center\", value: Alignment.center),\n        Option(label: \"centerRight\", value: Alignment.centerRight),\n        Option(label: \"bottomLeft\", value: Alignment.bottomLeft),\n        Option(label: \"bottomCenter\", value: Alignment.bottomCenter),\n        Option(label: \"bottomRight\", value: Alignment.bottomRight),\n      ],\n    );\n\n    final toastVariantKnob = context.knobs.nullable.options(\n      label: \"variant\",\n      description: \"The color variant for MoonToast.\",\n      enabled: false,\n      initial: MoonToastVariant.original,\n      options: const [\n        Option(label: \"original\", value: MoonToastVariant.original),\n        Option(label: \"inverted\", value: MoonToastVariant.inverted),\n      ],\n    );\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"Text color\",\n      description: \"MoonColors variants for MoonToast text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final iconColorKnob = context.knobs.nullable.options(\n      label: \"Icon color\",\n      description: \"MoonColors variants for MoonToast icon.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final iconColor = colorTable(context)[iconColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonToast background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonToast.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final displayDurationKnob = context.knobs.nullable.sliderInt(\n      label: \"displayDuration\",\n      description: \"Display duration for MoonToast.\",\n      enabled: false,\n      initial: 3,\n      min: 1,\n      max: 10,\n    );\n\n    final widthKnob = context.knobs.nullable.slider(\n      label: \"width\",\n      description:\n          \"Width for MoonToast. If null, the toast will be as wide as its \"\n          \"children.\",\n      enabled: false,\n      initial: 230,\n      max: MediaQuery.of(context).size.width,\n    );\n\n    final isPersistentKnob = context.knobs.boolean(\n      label: \"isPersistent\",\n      description:\n          \"Whether MoonToast is persistent across screens (will not behave as \"\n          \"expected only in Storybook).\",\n    );\n\n    final useSafeAreaKnob = context.knobs.boolean(\n      label: \"useSafeArea\",\n      description:\n          \"Whether MoonToast respects the SafeArea (takes into account notches \"\n          \"and native system bars).\",\n      initial: true,\n    );\n\n    final showContentKnob = context.knobs.boolean(\n      label: \"content\",\n      description: \"Show widget in MoonToast content slot.\",\n    );\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64),\n        child: Builder(\n          builder: (BuildContext context) {\n            return MoonFilledButton(\n              label: const Text(\"Tap me\"),\n              onTap: () {\n                MoonToast.show(\n                  context,\n                  backgroundColor: backgroundColor,\n                  isPersistent: isPersistentKnob,\n                  useSafeArea: useSafeAreaKnob,\n                  width: widthKnob,\n                  toastAlignment: toastAlignmentKnob ?? Alignment.bottomCenter,\n                  variant: toastVariantKnob ?? MoonToastVariant.original,\n                  displayDuration: displayDurationKnob != null\n                      ? Duration(seconds: displayDurationKnob)\n                      : null,\n                  borderRadius: borderRadiusKnob != null\n                      ? BorderRadius.circular(borderRadiusKnob.toDouble())\n                      : null,\n                  leading: Icon(\n                    MoonIcons.generic_info_24_light,\n                    color: iconColor,\n                  ),\n                  label: Text(\n                    customLabelTextKnob,\n                    style: TextStyle(color: textColor),\n                  ),\n                  trailing: Icon(\n                    MoonIcons.generic_star_24_light,\n                    color: iconColor,\n                  ),\n                  content: showContentKnob\n                      ? Align(\n                          alignment: AlignmentDirectional.centerStart,\n                          child: Text(\n                            \"Here goes MoonToast content\",\n                            style: TextStyle(color: textColor),\n                          ),\n                        )\n                      : null,\n                );\n              },\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/stories/primitives/tooltip.dart",
    "content": "import 'package:example/src/storybook/common/color_options.dart';\nimport 'package:example/src/storybook/common/widgets/text_divider.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass TooltipStory extends StatefulWidget {\n  static const path = '/primitives/tooltip';\n\n  const TooltipStory({super.key});\n\n  @override\n  State<TooltipStory> createState() => _TooltipStoryState();\n}\n\nclass _TooltipStoryState extends State<TooltipStory> {\n  bool showOnTap = false;\n  bool showOnLongPress = false;\n\n  @override\n  Widget build(BuildContext context) {\n    final customLabelTextKnob = context.knobs.text(\n      label: \"Custom MoonTooltip text\",\n      initial: \"Custom MoonTooltip text\",\n    );\n\n    final tooltipPositionKnob = context.knobs.nullable.options(\n      label: \"tooltipPosition\",\n      description: \"Position variants for MoonTooltip.\",\n      enabled: false,\n      initial: MoonTooltipPosition.top,\n      options: const [\n        Option(label: \"top\", value: MoonTooltipPosition.top),\n        Option(label: \"bottom\", value: MoonTooltipPosition.bottom),\n        Option(label: \"left\", value: MoonTooltipPosition.left),\n        Option(label: \"right\", value: MoonTooltipPosition.right),\n        Option(label: \"topLeft\", value: MoonTooltipPosition.topLeft),\n        Option(label: \"topRight\", value: MoonTooltipPosition.topRight),\n        Option(label: \"bottomLeft\", value: MoonTooltipPosition.bottomLeft),\n        Option(label: \"bottomRight\", value: MoonTooltipPosition.bottomRight),\n        Option(label: \"vertical\", value: MoonTooltipPosition.vertical),\n        Option(label: \"horizontal\", value: MoonTooltipPosition.horizontal),\n      ],\n    );\n\n    final textColorKnob = context.knobs.nullable.options(\n      label: \"Text color\",\n      description: \"MoonColors variants for MoonTooltip text.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final textColor = colorTable(context)[textColorKnob ?? 40];\n\n    final backgroundColorKnob = context.knobs.nullable.options(\n      label: \"backgroundColor\",\n      description: \"MoonColors variants for MoonTooltip background.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final backgroundColor = colorTable(context)[backgroundColorKnob ?? 40];\n\n    final borderColorKnob = context.knobs.nullable.options(\n      label: \"borderColor\",\n      description: \"MoonColors variants for MoonTooltip border.\",\n      enabled: false,\n      initial: 0,\n      // piccolo\n      options: colorOptions,\n    );\n\n    final borderColor = colorTable(context)[borderColorKnob ?? 40];\n\n    final borderRadiusKnob = context.knobs.nullable.sliderInt(\n      label: \"borderRadius\",\n      description: \"Border radius for MoonTooltip.\",\n      enabled: false,\n      initial: 8,\n      max: 32,\n    );\n\n    final arrowOffsetKnob = context.knobs.nullable.slider(\n      label: \"arrowOffsetValue\",\n      description: \"Offset for MoonTooltip arrow.\",\n      enabled: false,\n      initial: 0,\n      min: -100,\n      max: 100,\n    );\n\n    final arrowTipDistanceKnob = context.knobs.nullable.slider(\n      label: \"arrowTipDistance\",\n      description: \"Distance to target child widget.\",\n      enabled: false,\n      initial: 8,\n      max: 100,\n    );\n\n    final arrowBaseWidthKnob = context.knobs.nullable.slider(\n      label: \"arrowBaseWidth\",\n      description: \"Base width for MoonTooltip arrow.\",\n      enabled: false,\n      initial: 16,\n      max: 100,\n    );\n\n    final arrowLengthKnob = context.knobs.nullable.slider(\n      label: \"arrowLength\",\n      description: \"Length for MoonTooltip arrow.\",\n      enabled: false,\n      initial: 8,\n      max: 100,\n    );\n\n    final showShadowKnob = context.knobs.boolean(\n      label: \"tooltipShadows\",\n      description: \"Show shadows for MoonTooltip.\",\n      initial: true,\n    );\n\n    final showArrowKnob = context.knobs.boolean(\n      label: \"hasArrow\",\n      description: \"Show MoonTooltip with an arrow (tail).\",\n      initial: true,\n    );\n\n    final borderRadius = borderRadiusKnob != null\n        ? BorderRadius.circular(borderRadiusKnob.toDouble())\n        : null;\n\n    return Center(\n      child: SingleChildScrollView(\n        padding: const EdgeInsets.symmetric(vertical: 64.0, horizontal: 16.0),\n        child: Column(\n          mainAxisAlignment: MainAxisAlignment.center,\n          children: [\n            const TextDivider(\n              text: \"MoonTooltip\",\n              paddingTop: 0,\n            ),\n            StatefulBuilder(\n              builder: (context, setState) {\n                return MoonTooltip(\n                  show: showOnTap,\n                  backgroundColor: backgroundColor,\n                  borderWidth: 1,\n                  borderColor: borderColor ?? Colors.transparent,\n                  borderRadius: borderRadius,\n                  tooltipPosition:\n                      tooltipPositionKnob ?? MoonTooltipPosition.top,\n                  hasArrow: showArrowKnob,\n                  arrowBaseWidth: arrowBaseWidthKnob,\n                  arrowLength: arrowLengthKnob,\n                  arrowOffsetValue: arrowOffsetKnob ?? 0,\n                  arrowTipDistance: arrowTipDistanceKnob,\n                  tooltipShadows: showShadowKnob == true ? null : [],\n                  content: Text(\n                    customLabelTextKnob,\n                    style: TextStyle(color: textColor),\n                  ),\n                  child: MoonFilledButton(\n                    onTap: () => setState(() => showOnTap = true),\n                    label: const Text(\"Tap me\"),\n                  ),\n                );\n              },\n            ),\n            const TextDivider(text: \"MoonTooltip is displayed on long-press\"),\n            MoonTooltip(\n              show: showOnLongPress,\n              backgroundColor: backgroundColor,\n              borderWidth: 1,\n              borderColor: borderColor ?? Colors.transparent,\n              borderRadius: borderRadius,\n              tooltipPosition: tooltipPositionKnob ?? MoonTooltipPosition.top,\n              hasArrow: showArrowKnob,\n              arrowBaseWidth: arrowBaseWidthKnob,\n              arrowLength: arrowLengthKnob,\n              arrowOffsetValue: arrowOffsetKnob ?? 0,\n              arrowTipDistance: arrowTipDistanceKnob,\n              tooltipShadows: showShadowKnob == true ? null : [],\n              content: Text(\n                customLabelTextKnob,\n                style: TextStyle(color: textColor),\n              ),\n              child: MoonChip(\n                borderRadius: BorderRadius.circular(20),\n                backgroundColor: context.moonColors!.hit,\n                leading: const Icon(MoonIcons.other_frame_24_light),\n                textColor: context.moonColors!.goten,\n                label: const Text(\"MoonChip\"),\n                onLongPress: () => setState(() => showOnLongPress = true),\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/lib/src/storybook/storybook.dart",
    "content": "import 'package:example/src/storybook/common/constants.dart';\nimport 'package:example/src/storybook/common/widgets/logo.dart';\nimport 'package:example/src/storybook/common/widgets/version.dart';\nimport 'package:example/src/storybook/routing/route_aware_stories.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:storybook_flutter/storybook_flutter.dart';\n\nclass StorybookPage extends StatelessWidget {\n  const StorybookPage({super.key});\n\n  static final _plugins = initializePlugins(\n    enableCodeView: true,\n    enableCompactLayoutDeviceFrame: false,\n    initialDeviceFrameData: (\n      isFrameVisible: true,\n      device: Devices.ios.iPhone12ProMax,\n      orientation: Orientation.portrait,\n    ),\n  );\n\n  @override\n  Widget build(BuildContext context) {\n    return Storybook(\n      initialStory: \"Home\",\n      plugins: _plugins,\n      enableLayout: false,\n      autoLayoutThreshold: storybookAutoLayoutThreshold,\n      canvasColor: Colors.white,\n      logoWidget: const MoonLogoWidget(),\n      routeWrapperBuilder: RouteWrapperBuilder(\n        title: \"Moon Design for Flutter\",\n        theme: ThemeData.light().copyWith(\n          scaffoldBackgroundColor: const Color(0xFFF6F7F9), // Gohan light.\n          extensions: <ThemeExtension<dynamic>>[\n            MoonTheme(\n              tokens: MoonTokens.light.copyWith(\n                colors: mdsLightColors,\n                typography: MoonTypography.typography.copyWith(\n                  heading: MoonTypography.typography.heading.apply(\n                    fontFamily: \"DMSans\",\n                    fontWeightDelta: -1,\n                    fontVariations: [const FontVariation('wght', 500)],\n                  ),\n                  body: MoonTypography.typography.body.apply(\n                    fontFamily: \"DMSans\",\n                  ),\n                ),\n              ),\n            ),\n          ],\n        ),\n        darkTheme: ThemeData.dark().copyWith(\n          scaffoldBackgroundColor: const Color(0xFF1F1F1F), // Gohan dark.\n          extensions: <ThemeExtension<dynamic>>[\n            MoonTheme(\n              tokens: MoonTokens.dark.copyWith(\n                colors: mdsDarkColors,\n                typography: MoonTypography.typography.copyWith(\n                  heading: MoonTypography.typography.heading.apply(\n                    fontFamily: \"DMSans\",\n                    fontWeightDelta: -1,\n                    fontVariations: [const FontVariation('wght', 500)],\n                  ),\n                  body: MoonTypography.typography.body.apply(\n                    fontFamily: \"DMSans\",\n                  ),\n                ),\n              ),\n            ),\n          ],\n        ),\n        wrapperBuilder: (BuildContext context, Widget? child) => Scaffold(\n          extendBody: true,\n          extendBodyBehindAppBar: true,\n          resizeToAvoidBottomInset: true,\n          body: SafeArea(\n            top: false,\n            bottom: false,\n            child: child ?? const SizedBox.shrink(),\n          ),\n        ),\n      ),\n      brandingWidget: const MoonVersionWidget(),\n      stories: routeAwareStories,\n    );\n  }\n}\n"
  },
  {
    "path": "example/linux/.gitignore",
    "content": "flutter/ephemeral\n"
  },
  {
    "path": "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": "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": "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": "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": "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)\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/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": "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": "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": "example/macos/.gitignore",
    "content": "# Flutter-related\n**/Flutter/ephemeral/\n**/Pods/\n\n# Xcode-related\n**/dgph\n**/xcuserdata/\n"
  },
  {
    "path": "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": "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": "example/macos/Flutter/GeneratedPluginRegistrant.swift",
    "content": "//\n//  Generated file. Do not edit.\n//\n\nimport FlutterMacOS\nimport Foundation\n\nimport package_info_plus\nimport path_provider_foundation\nimport shared_preferences_foundation\n\nfunc RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {\n  FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: \"FLTPackageInfoPlusPlugin\"))\n  PathProviderPlugin.register(with: registry.registrar(forPlugin: \"PathProviderPlugin\"))\n  SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: \"SharedPreferencesPlugin\"))\n}\n"
  },
  {
    "path": "example/macos/Podfile",
    "content": "platform :osx, '10.14'\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": "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": "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": "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": "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 © 2023 com.example. All rights reserved.\n"
  },
  {
    "path": "example/macos/Runner/Configs/Debug.xcconfig",
    "content": "#include \"../../Flutter/Flutter-Debug.xcconfig\"\n#include \"Warnings.xcconfig\"\n"
  },
  {
    "path": "example/macos/Runner/Configs/Release.xcconfig",
    "content": "#include \"../../Flutter/Flutter-Release.xcconfig\"\n#include \"Warnings.xcconfig\"\n"
  },
  {
    "path": "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": "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": "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": "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": "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": "example/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\t1EF1E79BCD11BF26546B861E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA88C8C2270ADA5901582BC8 /* Pods_Runner.framework */; };\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\t0E022814F9E8D6D636B0F8C8 /* 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\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\t7A5CA261013764F6D8F802B2 /* 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\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\t\tCBDB310A91F07FBF8FD07981 /* 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\tDA88C8C2270ADA5901582BC8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };\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\t1EF1E79BCD11BF26546B861E /* 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\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\tC1D765107FF44E3BD2777E9C /* Pods */,\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\tC1D765107FF44E3BD2777E9C /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tCBDB310A91F07FBF8FD07981 /* Pods-Runner.debug.xcconfig */,\n\t\t\t\t0E022814F9E8D6D636B0F8C8 /* Pods-Runner.release.xcconfig */,\n\t\t\t\t7A5CA261013764F6D8F802B2 /* 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\tD73912EC22F37F3D000D13A0 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tDA88C8C2270ADA5901582BC8 /* Pods_Runner.framework */,\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\tB5F514E057DC68FCAECA12D5 /* [CP] Check Pods Manifest.lock */,\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\tBA7507CA2EAD7F7EB46B6C54 /* [CP] Embed Pods Frameworks */,\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 = 1430;\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\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\t\tB5F514E057DC68FCAECA12D5 /* [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\tBA7507CA2EAD7F7EB46B6C54 /* [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/* 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.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\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.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\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.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\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/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/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1430\"\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": "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   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "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": "example/pubspec.yaml",
    "content": "name: example\ndescription: Showcase Moon Design.\npublish_to: none\nversion: 1.1.0\nenvironment:\n  sdk: '>=3.3.1 <4.0.0'\ndependencies:\n  cupertino_icons: ^1.0.2\n  flutter:\n    sdk: flutter\n  flutter_svg: ^2.0.1\n  flutter_web_plugins:\n    sdk: flutter\n  go_router: ^12.1.1\n  moon_design:\n    path: ../\n  package_info_plus: ^8.0.2\n  storybook_flutter:\n    git:\n      url: https://github.com/coingaming/storybook_flutter.git\n      ref: 506c73296c85a0bb970645036baa1c9213df1c6c\n      path: packages/storybook_flutter\n  transparent_image: ^2.0.1\n  url_launcher: ^6.0.9\ndev_dependencies:\n  flutter_lints: ^2.0.0\n  flutter_test:\n    sdk: flutter\n  lint: ^2.1.2\ndependency_overrides:\n  device_frame:\n    git:\n      url: https://github.com/bradrushworth/flutter_device_preview.git\n      path: device_frame\n  device_preview:\n    git:\n      url: https://github.com/bradrushworth/flutter_device_preview.git\n      path: device_preview\nflutter:\n  uses-material-design: true\n  fonts:\n    - family: DMSans\n      fonts:\n        - asset: assets/DMSans.ttf\n    - family: RobotoMono\n      fonts:\n        - asset: assets/RobotoMono-Regular.ttf\n  assets:\n    - assets/code_snippets/\n    - assets/components/\n    - assets/images/\n    - assets/svg/\n"
  },
  {
    "path": "example/test/widget_test.dart",
    "content": "void main() {}\n"
  },
  {
    "path": "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=\"Moon Design for Flutter.\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\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=\"Moon Design for Flutter\">\n  <link rel=\"apple-touch-icon\" href=\"icons/Icon-192.png\">\n\n  <!-- Favicon -->\n  <link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\">\n  <link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\">\n\n  <title>Moon Design for Flutter</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": "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": "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": "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": "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": "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": "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": "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)\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/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": "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) 2023 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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "lib/moon_design.dart",
    "content": "/// Moon Design for Flutter\nlibrary moon_design;\n\nexport 'package:moon_design/src/theme/accordion/accordion_theme.dart';\nexport 'package:moon_design/src/theme/alert/alert_theme.dart';\nexport 'package:moon_design/src/theme/auth_code/auth_code_theme.dart';\nexport 'package:moon_design/src/theme/avatar/avatar_theme.dart';\nexport 'package:moon_design/src/theme/bottom_sheet/bottom_sheet_theme.dart';\nexport 'package:moon_design/src/theme/button/button_theme.dart';\nexport 'package:moon_design/src/theme/carousel/carousel_theme.dart';\nexport 'package:moon_design/src/theme/checkbox/checkbox_theme.dart';\nexport 'package:moon_design/src/theme/chip/chip_theme.dart';\nexport 'package:moon_design/src/theme/dot_indicator/dot_indicator_theme.dart';\nexport 'package:moon_design/src/theme/drawer/drawer_theme.dart';\nexport 'package:moon_design/src/theme/effects/effects_theme.dart';\nexport 'package:moon_design/src/theme/loaders/circular_loader/circular_loader_theme.dart';\nexport 'package:moon_design/src/theme/loaders/linear_loader/linear_loader_theme.dart';\nexport 'package:moon_design/src/theme/menu_item/menu_item_theme.dart';\nexport 'package:moon_design/src/theme/modal/modal_theme.dart';\nexport 'package:moon_design/src/theme/popover/popover_theme.dart';\nexport 'package:moon_design/src/theme/progress/circular_progress/circular_progress_theme.dart';\nexport 'package:moon_design/src/theme/progress/linear_progress/linear_progress_theme.dart';\nexport 'package:moon_design/src/theme/progress_pin/progress_pin_theme.dart';\nexport 'package:moon_design/src/theme/radio/radio_theme.dart';\nexport 'package:moon_design/src/theme/segmented_control/segmented_control_theme.dart';\nexport 'package:moon_design/src/theme/switch/switch_theme.dart';\nexport 'package:moon_design/src/theme/text_area/text_area_theme.dart';\nexport 'package:moon_design/src/theme/text_input/text_input_theme.dart';\nexport 'package:moon_design/src/theme/text_input_group/text_input_group_theme.dart';\nexport 'package:moon_design/src/theme/theme.dart';\nexport 'package:moon_design/src/theme/toast/toast_theme.dart';\nexport 'package:moon_design/src/theme/tokens/borders.dart';\nexport 'package:moon_design/src/theme/tokens/opacities.dart';\nexport 'package:moon_design/src/theme/tokens/shadows.dart';\nexport 'package:moon_design/src/theme/tokens/sizes.dart';\nexport 'package:moon_design/src/theme/tokens/tokens.dart';\nexport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nexport 'package:moon_design/src/theme/tooltip/tooltip_theme.dart';\n\nexport 'package:moon_design/src/utils/color_premul_lerp.dart';\nexport 'package:moon_design/src/utils/color_tween_premul.dart';\nexport 'package:moon_design/src/utils/extensions.dart';\nexport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nexport 'package:moon_design/src/utils/squircle/clip_squircle_rect.dart';\nexport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nexport 'package:moon_design/src/utils/squircle/squircle_border_radius.dart';\nexport 'package:moon_design/src/utils/squircle/squircle_radius.dart';\n\nexport 'package:moon_design/src/widgets/accordion/accordion.dart';\nexport 'package:moon_design/src/widgets/alert/alert.dart';\nexport 'package:moon_design/src/widgets/auth_code/auth_code.dart';\nexport 'package:moon_design/src/widgets/avatar/avatar.dart';\nexport 'package:moon_design/src/widgets/bottom_sheet/bottom_sheet.dart';\nexport 'package:moon_design/src/widgets/bottom_sheet/modal_bottom_sheet.dart';\nexport 'package:moon_design/src/widgets/breadcrumb/breadcrumb.dart';\nexport 'package:moon_design/src/widgets/breadcrumb/breadcrumb_item.dart';\nexport 'package:moon_design/src/widgets/buttons/button.dart';\nexport 'package:moon_design/src/widgets/buttons/filled_button.dart';\nexport 'package:moon_design/src/widgets/buttons/outlined_button.dart';\nexport 'package:moon_design/src/widgets/buttons/text_button.dart';\nexport 'package:moon_design/src/widgets/carousel/carousel.dart';\nexport 'package:moon_design/src/widgets/checkbox/checkbox.dart';\nexport 'package:moon_design/src/widgets/chip/chip.dart';\nexport 'package:moon_design/src/widgets/common/animated_icon_theme.dart';\nexport 'package:moon_design/src/widgets/common/base_control.dart';\nexport 'package:moon_design/src/widgets/common/base_segmented_tab_bar.dart';\nexport 'package:moon_design/src/widgets/common/effects/focus_effect.dart';\nexport 'package:moon_design/src/widgets/common/effects/pulse_effect.dart';\nexport 'package:moon_design/src/widgets/common/error_message_widgets.dart';\nexport 'package:moon_design/src/widgets/common/progress_indicators/circular_progress_indicator.dart';\nexport 'package:moon_design/src/widgets/common/progress_indicators/linear_progress_indicator.dart';\nexport 'package:moon_design/src/widgets/dot_indicator/dot_indicator.dart';\nexport 'package:moon_design/src/widgets/drawer/drawer.dart';\nexport 'package:moon_design/src/widgets/dropdown/dropdown.dart';\nexport 'package:moon_design/src/widgets/loaders/circular_loader.dart';\nexport 'package:moon_design/src/widgets/loaders/linear_loader.dart';\nexport 'package:moon_design/src/widgets/menu_item/menu_item.dart';\nexport 'package:moon_design/src/widgets/modal/modal.dart';\nexport 'package:moon_design/src/widgets/popover/popover.dart';\nexport 'package:moon_design/src/widgets/progress/circular_progress.dart';\nexport 'package:moon_design/src/widgets/progress/linear_progress.dart';\nexport 'package:moon_design/src/widgets/progress_pin/pin_style.dart';\nexport 'package:moon_design/src/widgets/progress_pin/progress_pin.dart';\nexport 'package:moon_design/src/widgets/radio/radio.dart';\nexport 'package:moon_design/src/widgets/segmented_control/segment.dart';\nexport 'package:moon_design/src/widgets/segmented_control/segment_style.dart';\nexport 'package:moon_design/src/widgets/segmented_control/segmented_control.dart';\nexport 'package:moon_design/src/widgets/switch/switch.dart';\nexport 'package:moon_design/src/widgets/tab_bar/pill_tab.dart';\nexport 'package:moon_design/src/widgets/tab_bar/pill_tab_style.dart';\nexport 'package:moon_design/src/widgets/tab_bar/tab.dart';\nexport 'package:moon_design/src/widgets/tab_bar/tab_bar.dart';\nexport 'package:moon_design/src/widgets/tab_bar/tab_style.dart';\nexport 'package:moon_design/src/widgets/table/table.dart';\nexport 'package:moon_design/src/widgets/tag/tag.dart';\nexport 'package:moon_design/src/widgets/text_area/text_area.dart';\nexport 'package:moon_design/src/widgets/text_input/form_text_input.dart';\nexport 'package:moon_design/src/widgets/text_input/text_input.dart';\nexport 'package:moon_design/src/widgets/text_input_group/text_input_group.dart';\nexport 'package:moon_design/src/widgets/toast/toast.dart';\nexport 'package:moon_design/src/widgets/tooltip/tooltip.dart';\n\nexport 'package:moon_icons/moon_icons.dart';\nexport 'package:moon_tokens/moon_tokens.dart';\n"
  },
  {
    "path": "lib/src/theme/accordion/accordion_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonAccordionColors extends ThemeExtension<MoonAccordionColors>\n    with DiagnosticableTreeMixin {\n  /// The text color of the collapsed MoonAccordion header.\n  final Color textColor;\n\n  /// The text color of the expanded MoonAccordion header.\n  final Color expandedTextColor;\n\n  /// The text and icon color of the expanded MoonAccordion content.\n  final Color contentColor;\n\n  /// The icon color of the collapsed MoonAccordion header.\n  final Color iconColor;\n\n  /// The icon color of the expanded MoonAccordion header.\n  final Color expandedIconColor;\n\n  /// The default trailing icon color of the collapsed MoonAccordion header.\n  final Color trailingIconColor;\n\n  /// The default trailing icon color of the expanded MoonAccordion header.\n  final Color expandedTrailingIconColor;\n\n  /// The background color of the collapsed MoonAccordion.\n  final Color backgroundColor;\n\n  /// The background color of the expanded MoonAccordion.\n  final Color expandedBackgroundColor;\n\n  /// The border color of the MoonAccordion.\n  final Color borderColor;\n\n  /// The color of the line dividing the MoonAccordion header from the body.\n  final Color dividerColor;\n\n  const MoonAccordionColors({\n    required this.textColor,\n    required this.expandedTextColor,\n    required this.contentColor,\n    required this.iconColor,\n    required this.expandedIconColor,\n    required this.trailingIconColor,\n    required this.expandedTrailingIconColor,\n    required this.backgroundColor,\n    required this.expandedBackgroundColor,\n    required this.borderColor,\n    required this.dividerColor,\n  });\n\n  @override\n  MoonAccordionColors copyWith({\n    Color? textColor,\n    Color? expandedTextColor,\n    Color? contentColor,\n    Color? iconColor,\n    Color? expandedIconColor,\n    Color? trailingIconColor,\n    Color? expandedTrailingIconColor,\n    Color? backgroundColor,\n    Color? expandedBackgroundColor,\n    Color? borderColor,\n    Color? dividerColor,\n  }) {\n    return MoonAccordionColors(\n      textColor: textColor ?? this.textColor,\n      expandedTextColor: expandedTextColor ?? this.expandedTextColor,\n      contentColor: contentColor ?? this.contentColor,\n      iconColor: iconColor ?? this.iconColor,\n      expandedIconColor: expandedIconColor ?? this.expandedIconColor,\n      trailingIconColor: trailingIconColor ?? this.trailingIconColor,\n      expandedTrailingIconColor:\n          expandedTrailingIconColor ?? this.expandedTrailingIconColor,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      expandedBackgroundColor:\n          expandedBackgroundColor ?? this.expandedBackgroundColor,\n      borderColor: borderColor ?? this.borderColor,\n      dividerColor: dividerColor ?? this.dividerColor,\n    );\n  }\n\n  @override\n  MoonAccordionColors lerp(\n    ThemeExtension<MoonAccordionColors>? other,\n    double t,\n  ) {\n    if (other is! MoonAccordionColors) return this;\n\n    return MoonAccordionColors(\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      expandedTextColor:\n          colorPremulLerp(expandedTextColor, other.expandedTextColor, t)!,\n      contentColor: colorPremulLerp(contentColor, other.contentColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      expandedIconColor:\n          colorPremulLerp(expandedIconColor, other.expandedIconColor, t)!,\n      trailingIconColor:\n          colorPremulLerp(trailingIconColor, other.trailingIconColor, t)!,\n      expandedTrailingIconColor: colorPremulLerp(\n        expandedTrailingIconColor,\n        other.expandedTrailingIconColor,\n        t,\n      )!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      expandedBackgroundColor: colorPremulLerp(\n        expandedBackgroundColor,\n        other.expandedBackgroundColor,\n        t,\n      )!,\n      borderColor: colorPremulLerp(borderColor, other.borderColor, t)!,\n      dividerColor: colorPremulLerp(dividerColor, other.dividerColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAccordionColors\"))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"expandedTextColor\", expandedTextColor))\n      ..add(ColorProperty(\"contentColor\", contentColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"expandedIconColor\", expandedIconColor))\n      ..add(ColorProperty(\"trailingIconColor\", trailingIconColor))\n      ..add(\n        ColorProperty(\"expandedTrailingIconColor\", expandedTrailingIconColor),\n      )\n      ..add(\n        ColorProperty(\"backgroundColor\", backgroundColor),\n      )\n      ..add(\n        ColorProperty(\"expandedBackgroundColor\", expandedBackgroundColor),\n      )\n      ..add(\n        ColorProperty(\"borderColor\", borderColor),\n      )\n      ..add(\n        ColorProperty(\"dividerColor\", dividerColor),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/accordion/accordion_properties.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonAccordionProperties extends ThemeExtension<MoonAccordionProperties>\n    with DiagnosticableTreeMixin {\n  /// The duration of the MoonAccordion transition animation\n  /// (expand and collapse).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonAccordion transition animation (expand and collapse).\n  final Curve transitionCurve;\n\n  const MoonAccordionProperties({\n    required this.transitionDuration,\n    required this.transitionCurve,\n  });\n\n  @override\n  MoonAccordionProperties copyWith({\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n  }) {\n    return MoonAccordionProperties(\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n    );\n  }\n\n  @override\n  MoonAccordionProperties lerp(\n    ThemeExtension<MoonAccordionProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonAccordionProperties) return this;\n\n    return MoonAccordionProperties(\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonAccordionProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/accordion/accordion_shadows.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonAccordionShadows extends ThemeExtension<MoonAccordionShadows>\n    with DiagnosticableTreeMixin {\n  /// The list of shadows applied to the MoonAccordion.\n  final List<BoxShadow> shadows;\n\n  const MoonAccordionShadows({required this.shadows});\n\n  @override\n  MoonAccordionShadows copyWith({List<BoxShadow>? shadows}) {\n    return MoonAccordionShadows(\n      shadows: shadows ?? this.shadows,\n    );\n  }\n\n  @override\n  MoonAccordionShadows lerp(\n    ThemeExtension<MoonAccordionShadows>? other,\n    double t,\n  ) {\n    if (other is! MoonAccordionShadows) return this;\n\n    return MoonAccordionShadows(\n      shadows: BoxShadow.lerpList(shadows, other.shadows, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAccordionShadows\"))\n      ..add(DiagnosticsProperty<List<BoxShadow>>(\"shadows\", shadows));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/accordion/accordion_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonAccordionSizeProperties\n    extends ThemeExtension<MoonAccordionSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonAccordion.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The height of the MoonAccordion header.\n  final double headerHeight;\n\n  /// The size value of the MoonAccordion icon.\n  final double iconSizeValue;\n\n  /// The padding of the MoonAccordion header.\n  final EdgeInsetsGeometry headerPadding;\n\n  /// The text style of the MoonAccordion header.\n  final TextStyle headerTextStyle;\n\n  /// The text style of the MoonAccordion content.\n  final TextStyle contentTextStyle;\n\n  const MoonAccordionSizeProperties({\n    required this.borderRadius,\n    required this.headerHeight,\n    required this.iconSizeValue,\n    required this.headerPadding,\n    required this.headerTextStyle,\n    required this.contentTextStyle,\n  });\n\n  @override\n  MoonAccordionSizeProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? headerHeight,\n    double? iconSizeValue,\n    EdgeInsetsGeometry? headerPadding,\n    TextStyle? headerTextStyle,\n    TextStyle? contentTextStyle,\n  }) {\n    return MoonAccordionSizeProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      headerHeight: headerHeight ?? this.headerHeight,\n      iconSizeValue: iconSizeValue ?? this.iconSizeValue,\n      headerPadding: headerPadding ?? this.headerPadding,\n      headerTextStyle: headerTextStyle ?? this.headerTextStyle,\n      contentTextStyle: contentTextStyle ?? this.contentTextStyle,\n    );\n  }\n\n  @override\n  MoonAccordionSizeProperties lerp(\n    ThemeExtension<MoonAccordionSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonAccordionSizeProperties) return this;\n\n    return MoonAccordionSizeProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      headerHeight: lerpDouble(headerHeight, other.headerHeight, t)!,\n      iconSizeValue: lerpDouble(iconSizeValue, other.iconSizeValue, t)!,\n      headerPadding:\n          EdgeInsetsGeometry.lerp(headerPadding, other.headerPadding, t)!,\n      headerTextStyle:\n          TextStyle.lerp(headerTextStyle, other.headerTextStyle, t)!,\n      contentTextStyle:\n          TextStyle.lerp(contentTextStyle, other.contentTextStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonAccordionSizeProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"headerHeight\", headerHeight),\n      )\n      ..add(\n        DoubleProperty(\"iconSizeValue\", iconSizeValue),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\"headerPadding\", headerPadding),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"headerTextStyle\", headerTextStyle),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"contentTextStyle\", contentTextStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/accordion/accordion_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/accordion/accordion_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonAccordionSizes extends ThemeExtension<MoonAccordionSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the small MoonAccordion.\n  final MoonAccordionSizeProperties sm;\n\n  /// The properties of the medium MoonAccordion.\n  final MoonAccordionSizeProperties md;\n\n  /// The properties of the large MoonAccordion.\n  final MoonAccordionSizeProperties lg;\n\n  /// The properties of the extra large MoonAccordion.\n  final MoonAccordionSizeProperties xl;\n\n  MoonAccordionSizes({\n    required this.tokens,\n    MoonAccordionSizeProperties? sm,\n    MoonAccordionSizeProperties? md,\n    MoonAccordionSizeProperties? lg,\n    MoonAccordionSizeProperties? xl,\n  })  : sm = sm ??\n            MoonAccordionSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              headerHeight: tokens.sizes.sm,\n              iconSizeValue: tokens.sizes.x2s,\n              headerPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x4s),\n              headerTextStyle: tokens.typography.heading.text12,\n              contentTextStyle: tokens.typography.body.text12,\n            ),\n        md = md ??\n            MoonAccordionSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              headerHeight: tokens.sizes.md,\n              iconSizeValue: tokens.sizes.xs,\n              headerPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              headerTextStyle: tokens.typography.heading.textDefault,\n              contentTextStyle: tokens.typography.body.textDefault,\n            ),\n        lg = lg ??\n            MoonAccordionSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              headerHeight: tokens.sizes.lg,\n              iconSizeValue: tokens.sizes.xs,\n              headerPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              headerTextStyle: tokens.typography.heading.textDefault,\n              contentTextStyle: tokens.typography.body.textDefault,\n            ),\n        xl = xl ??\n            MoonAccordionSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              headerHeight: tokens.sizes.xl,\n              iconSizeValue: tokens.sizes.xs,\n              headerPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x2s),\n              headerTextStyle: tokens.typography.heading.text16,\n              contentTextStyle: tokens.typography.body.textDefault,\n            );\n\n  @override\n  MoonAccordionSizes copyWith({\n    MoonTokens? tokens,\n    MoonAccordionSizeProperties? sm,\n    MoonAccordionSizeProperties? md,\n    MoonAccordionSizeProperties? lg,\n    MoonAccordionSizeProperties? xl,\n  }) {\n    return MoonAccordionSizes(\n      tokens: tokens ?? this.tokens,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n      lg: lg ?? this.lg,\n      xl: xl ?? this.xl,\n    );\n  }\n\n  @override\n  MoonAccordionSizes lerp(ThemeExtension<MoonAccordionSizes>? other, double t) {\n    if (other is! MoonAccordionSizes) return this;\n\n    return MoonAccordionSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      sm: sm.lerp(other.sm, t),\n      md: md.lerp(other.md, t),\n      lg: lg.lerp(other.lg, t),\n      xl: xl.lerp(other.xl, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAccordionSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonAccordionSizeProperties>(\"sm\", sm))\n      ..add(DiagnosticsProperty<MoonAccordionSizeProperties>(\"md\", md))\n      ..add(DiagnosticsProperty<MoonAccordionSizeProperties>(\"lg\", lg))\n      ..add(DiagnosticsProperty<MoonAccordionSizeProperties>(\"xl\", xl));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/accordion/accordion_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/accordion/accordion_colors.dart';\nimport 'package:moon_design/src/theme/accordion/accordion_properties.dart';\nimport 'package:moon_design/src/theme/accordion/accordion_shadows.dart';\nimport 'package:moon_design/src/theme/accordion/accordion_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonAccordionTheme extends ThemeExtension<MoonAccordionTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonAccordion.\n  final MoonAccordionColors colors;\n\n  /// The properties of the MoonAccordion.\n  final MoonAccordionProperties properties;\n\n  /// The shadows of the MoonAccordion.\n  final MoonAccordionShadows shadows;\n\n  /// The sizes of the MoonAccordion.\n  final MoonAccordionSizes sizes;\n\n  MoonAccordionTheme({\n    required this.tokens,\n    MoonAccordionColors? colors,\n    MoonAccordionProperties? properties,\n    MoonAccordionShadows? shadows,\n    MoonAccordionSizes? sizes,\n  })  : colors = colors ??\n            MoonAccordionColors(\n              textColor: tokens.colors.textPrimary,\n              expandedTextColor: tokens.colors.textPrimary,\n              contentColor: tokens.colors.textPrimary,\n              iconColor: tokens.colors.iconPrimary,\n              expandedIconColor: tokens.colors.iconPrimary,\n              trailingIconColor: tokens.colors.iconPrimary,\n              expandedTrailingIconColor: tokens.colors.iconSecondary,\n              backgroundColor: tokens.colors.goku,\n              expandedBackgroundColor: tokens.colors.goku,\n              borderColor: tokens.colors.beerus,\n              dividerColor: tokens.colors.beerus,\n            ),\n        properties = properties ??\n            MoonAccordionProperties(\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n            ),\n        shadows = shadows ?? MoonAccordionShadows(shadows: tokens.shadows.sm),\n        sizes = sizes ?? MoonAccordionSizes(tokens: tokens);\n\n  @override\n  MoonAccordionTheme copyWith({\n    MoonTokens? tokens,\n    MoonAccordionColors? colors,\n    MoonAccordionProperties? properties,\n    MoonAccordionShadows? shadows,\n    MoonAccordionSizes? sizes,\n  }) {\n    return MoonAccordionTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      shadows: shadows ?? this.shadows,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonAccordionTheme lerp(ThemeExtension<MoonAccordionTheme>? other, double t) {\n    if (other is! MoonAccordionTheme) return this;\n\n    return MoonAccordionTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      shadows: shadows.lerp(other.shadows, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAccordionTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonAccordionColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonAccordionProperties>(\"properties\", properties),\n      )\n      ..add(\n        DiagnosticsProperty<MoonAccordionShadows>(\"shadows\", shadows),\n      )\n      ..add(\n        DiagnosticsProperty<MoonAccordionSizes>(\"sizes\", sizes),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/alert/alert_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonAlertColors extends ThemeExtension<MoonAlertColors>\n    with DiagnosticableTreeMixin {\n  /// The background color of the MoonAlert.\n  final Color backgroundColor;\n\n  /// The border color of the MoonAlert.\n  final Color borderColor;\n\n  /// The icon color of the MoonAlert.\n  final Color iconColor;\n\n  /// The text color of the MoonAlert.\n  final Color textColor;\n\n  const MoonAlertColors({\n    required this.backgroundColor,\n    required this.borderColor,\n    required this.iconColor,\n    required this.textColor,\n  });\n\n  @override\n  MoonAlertColors copyWith({\n    Color? backgroundColor,\n    Color? borderColor,\n    Color? iconColor,\n    Color? textColor,\n  }) {\n    return MoonAlertColors(\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      borderColor: borderColor ?? this.borderColor,\n      iconColor: iconColor ?? this.iconColor,\n      textColor: textColor ?? this.textColor,\n    );\n  }\n\n  @override\n  MoonAlertColors lerp(ThemeExtension<MoonAlertColors>? other, double t) {\n    if (other is! MoonAlertColors) return this;\n\n    return MoonAlertColors(\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      borderColor: colorPremulLerp(borderColor, other.borderColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAlertColors\"))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor))\n      ..add(ColorProperty(\"borderColor\", borderColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"textColor\", textColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/alert/alert_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonAlertProperties extends ThemeExtension<MoonAlertProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonAlert.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The horizontal gap between the leading, label and trailing widgets of the\n  /// MoonAlert.\n  final double horizontalGap;\n\n  /// The minimum height of the MoonAlert.\n  final double minimumHeight;\n\n  /// The vertical gap between the MoonAlert header and content.\n  final double verticalGap;\n\n  /// The duration of the MoonAlert transition animation (fade in or out).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonAlert transition animation (fade in or out).\n  final Curve transitionCurve;\n\n  /// The padding of the MoonAlert.\n  final EdgeInsetsGeometry padding;\n\n  /// The text style of the MoonAlert content.\n  final TextStyle contentTextStyle;\n\n  /// The text style of the MoonAlert label.\n  final TextStyle labelTextStyle;\n\n  const MoonAlertProperties({\n    required this.borderRadius,\n    required this.horizontalGap,\n    required this.minimumHeight,\n    required this.verticalGap,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.padding,\n    required this.contentTextStyle,\n    required this.labelTextStyle,\n  });\n\n  @override\n  MoonAlertProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? horizontalGap,\n    double? minimumHeight,\n    double? verticalGap,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    EdgeInsetsGeometry? padding,\n    TextStyle? contentTextStyle,\n    TextStyle? labelTextStyle,\n  }) {\n    return MoonAlertProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      horizontalGap: horizontalGap ?? this.horizontalGap,\n      minimumHeight: minimumHeight ?? this.minimumHeight,\n      verticalGap: verticalGap ?? this.verticalGap,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      padding: padding ?? this.padding,\n      contentTextStyle: contentTextStyle ?? this.contentTextStyle,\n      labelTextStyle: labelTextStyle ?? this.labelTextStyle,\n    );\n  }\n\n  @override\n  MoonAlertProperties lerp(\n    ThemeExtension<MoonAlertProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonAlertProperties) return this;\n\n    return MoonAlertProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      horizontalGap: lerpDouble(horizontalGap, other.horizontalGap, t)!,\n      minimumHeight: lerpDouble(minimumHeight, other.minimumHeight, t)!,\n      verticalGap: lerpDouble(verticalGap, other.verticalGap, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      padding: EdgeInsetsGeometry.lerp(padding, other.padding, t)!,\n      contentTextStyle:\n          TextStyle.lerp(contentTextStyle, other.contentTextStyle, t)!,\n      labelTextStyle: TextStyle.lerp(labelTextStyle, other.labelTextStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonAlertProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"horizontalGap\", horizontalGap),\n      )\n      ..add(\n        DoubleProperty(\"minimumHeight\", minimumHeight),\n      )\n      ..add(\n        DoubleProperty(\"verticalGap\", verticalGap),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\"padding\", padding),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"contentTextStyle\", contentTextStyle),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"labelTextStyle\", labelTextStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/alert/alert_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/alert/alert_colors.dart';\nimport 'package:moon_design/src/theme/alert/alert_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonAlertTheme extends ThemeExtension<MoonAlertTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonAlert.\n  final MoonAlertColors colors;\n\n  /// The properties of the MoonAlert.\n  final MoonAlertProperties properties;\n\n  MoonAlertTheme({\n    required this.tokens,\n    MoonAlertColors? colors,\n    MoonAlertProperties? properties,\n  })  : colors = colors ??\n            MoonAlertColors(\n              backgroundColor: tokens.colors.goku,\n              borderColor: tokens.colors.textSecondary,\n              iconColor: tokens.colors.iconPrimary,\n              textColor: tokens.colors.textPrimary,\n            ),\n        properties = properties ??\n            MoonAlertProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              horizontalGap: tokens.sizes.x3s,\n              minimumHeight: tokens.sizes.xl,\n              verticalGap: tokens.sizes.x4s,\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n              padding: EdgeInsets.all(tokens.sizes.x2s),\n              contentTextStyle: tokens.typography.body.textDefault,\n              labelTextStyle: tokens.typography.heading.textDefault,\n            );\n\n  @override\n  MoonAlertTheme copyWith({\n    MoonTokens? tokens,\n    MoonAlertColors? colors,\n    MoonAlertProperties? properties,\n  }) {\n    return MoonAlertTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonAlertTheme lerp(ThemeExtension<MoonAlertTheme>? other, double t) {\n    if (other is! MoonAlertTheme) return this;\n\n    return MoonAlertTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAlertTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonAlertColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonAlertProperties>(\"properties\", properties));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/auth_code/auth_code_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonAuthCodeColors extends ThemeExtension<MoonAuthCodeColors>\n    with DiagnosticableTreeMixin {\n  /// The border color of the selected MoonAuthCode input field.\n  final Color selectedBorderColor;\n\n  /// The border color of the MoonAuthCode input field with input.\n  final Color activeBorderColor;\n\n  /// The border color of the MoonAuthCode input field without input.\n  final Color inactiveBorderColor;\n\n  /// The border color of the MoonAuthCode input field in error state.\n  final Color errorBorderColor;\n\n  /// The fill color of the selected MoonAuthCode input field.\n  final Color selectedFillColor;\n\n  /// The fill color of the MoonAuthCode input field with input.\n  final Color activeFillColor;\n\n  /// The fill color of the MoonAuthCode input field without input.\n  final Color inactiveFillColor;\n\n  /// The text color of the MoonAuthCode.\n  final Color textColor;\n\n  const MoonAuthCodeColors({\n    required this.selectedBorderColor,\n    required this.activeBorderColor,\n    required this.inactiveBorderColor,\n    required this.errorBorderColor,\n    required this.selectedFillColor,\n    required this.activeFillColor,\n    required this.inactiveFillColor,\n    required this.textColor,\n  });\n\n  @override\n  MoonAuthCodeColors copyWith({\n    Color? selectedBorderColor,\n    Color? activeBorderColor,\n    Color? inactiveBorderColor,\n    Color? errorBorderColor,\n    Color? selectedFillColor,\n    Color? activeFillColor,\n    Color? inactiveFillColor,\n    Color? textColor,\n  }) {\n    return MoonAuthCodeColors(\n      selectedBorderColor: selectedBorderColor ?? this.selectedBorderColor,\n      activeBorderColor: activeBorderColor ?? this.activeBorderColor,\n      inactiveBorderColor: inactiveBorderColor ?? this.inactiveBorderColor,\n      errorBorderColor: errorBorderColor ?? this.errorBorderColor,\n      selectedFillColor: selectedFillColor ?? this.selectedFillColor,\n      activeFillColor: activeFillColor ?? this.activeFillColor,\n      inactiveFillColor: inactiveFillColor ?? this.inactiveFillColor,\n      textColor: textColor ?? this.textColor,\n    );\n  }\n\n  @override\n  MoonAuthCodeColors lerp(ThemeExtension<MoonAuthCodeColors>? other, double t) {\n    if (other is! MoonAuthCodeColors) return this;\n\n    return MoonAuthCodeColors(\n      selectedBorderColor:\n          colorPremulLerp(selectedBorderColor, other.selectedBorderColor, t)!,\n      activeBorderColor:\n          colorPremulLerp(activeBorderColor, other.activeBorderColor, t)!,\n      inactiveBorderColor:\n          colorPremulLerp(inactiveBorderColor, other.inactiveBorderColor, t)!,\n      errorBorderColor:\n          colorPremulLerp(errorBorderColor, other.errorBorderColor, t)!,\n      selectedFillColor:\n          colorPremulLerp(selectedFillColor, other.selectedFillColor, t)!,\n      activeFillColor:\n          colorPremulLerp(activeFillColor, other.activeFillColor, t)!,\n      inactiveFillColor:\n          colorPremulLerp(inactiveFillColor, other.inactiveFillColor, t)!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAuthCodeColors\"))\n      ..add(ColorProperty(\"selectedBorderColor\", selectedBorderColor))\n      ..add(ColorProperty(\"activeBorderColor\", activeBorderColor))\n      ..add(ColorProperty(\"inactiveBorderColor\", inactiveBorderColor))\n      ..add(ColorProperty(\"errorBorderColor\", errorBorderColor))\n      ..add(ColorProperty(\"selectedFillColor\", selectedFillColor))\n      ..add(ColorProperty(\"activeFillColor\", activeFillColor))\n      ..add(ColorProperty(\"inactiveFillColor\", inactiveFillColor))\n      ..add(ColorProperty(\"textColor\", textColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/auth_code/auth_code_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonAuthCodeProperties extends ThemeExtension<MoonAuthCodeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonAuthCode input field.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The horizontal gap between the MoonAuthCode input fields.\n  final double gap;\n\n  /// The height of the MoonAuthCode input field.\n  final double height;\n\n  /// The width of the MoonAuthCode input field.\n  final double width;\n\n  /// The duration of the MoonAuthCode input field transition animation.\n  final Duration animationDuration;\n\n  /// The duration of the MoonAuthCode error state animation.\n  final Duration errorAnimationDuration;\n\n  /// The duration to display the typed character before it is obscured.\n  final Duration peekDuration;\n\n  /// The curve of the MoonAuthCode input field transition animation.\n  final Curve animationCurve;\n\n  /// The curve of the MoonAuthCode error state animation.\n  final Curve errorAnimationCurve;\n\n  /// The text style of the MoonAuthCode.\n  final TextStyle textStyle;\n\n  /// The text style of the MoonAuthCode in error state.\n  final TextStyle errorTextStyle;\n\n  const MoonAuthCodeProperties({\n    required this.borderRadius,\n    required this.gap,\n    required this.height,\n    required this.width,\n    required this.animationDuration,\n    required this.errorAnimationDuration,\n    required this.peekDuration,\n    required this.animationCurve,\n    required this.errorAnimationCurve,\n    required this.textStyle,\n    required this.errorTextStyle,\n  });\n\n  @override\n  MoonAuthCodeProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? gap,\n    double? height,\n    double? width,\n    Duration? animationDuration,\n    Duration? errorAnimationDuration,\n    Duration? peekDuration,\n    Curve? animationCurve,\n    Curve? errorAnimationCurve,\n    TextStyle? textStyle,\n    TextStyle? errorTextStyle,\n  }) {\n    return MoonAuthCodeProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      gap: gap ?? this.gap,\n      height: height ?? this.height,\n      width: width ?? this.width,\n      animationDuration: animationDuration ?? this.animationDuration,\n      errorAnimationDuration:\n          errorAnimationDuration ?? this.errorAnimationDuration,\n      peekDuration: peekDuration ?? this.peekDuration,\n      animationCurve: animationCurve ?? this.animationCurve,\n      errorAnimationCurve: errorAnimationCurve ?? this.errorAnimationCurve,\n      textStyle: textStyle ?? this.textStyle,\n      errorTextStyle: errorTextStyle ?? this.errorTextStyle,\n    );\n  }\n\n  @override\n  MoonAuthCodeProperties lerp(\n    ThemeExtension<MoonAuthCodeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonAuthCodeProperties) return this;\n\n    return MoonAuthCodeProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      gap: lerpDouble(gap, other.gap, t)!,\n      height: lerpDouble(height, other.height, t)!,\n      width: lerpDouble(width, other.width, t)!,\n      animationDuration:\n          lerpDuration(animationDuration, other.animationDuration, t),\n      errorAnimationDuration:\n          lerpDuration(errorAnimationDuration, other.errorAnimationDuration, t),\n      peekDuration: lerpDuration(peekDuration, other.peekDuration, t),\n      animationCurve: other.animationCurve,\n      errorAnimationCurve: other.errorAnimationCurve,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n      errorTextStyle: TextStyle.lerp(errorTextStyle, other.errorTextStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonAuthCodeProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"gap\", gap),\n      )\n      ..add(\n        DoubleProperty(\"height\", height),\n      )\n      ..add(\n        DoubleProperty(\"width\", width),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"animationDuration\", animationDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\n          \"errorAnimationDuration\",\n          errorAnimationDuration,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"peekDuration\", peekDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"animationCurve\", animationCurve),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"errorAnimationCurve\", errorAnimationCurve),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"errorTextStyle\", errorTextStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/auth_code/auth_code_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/auth_code/auth_code_colors.dart';\nimport 'package:moon_design/src/theme/auth_code/auth_code_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonAuthCodeTheme extends ThemeExtension<MoonAuthCodeTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonAuthCode.\n  final MoonAuthCodeColors colors;\n\n  /// The properties of the MoonAuthCode.\n  final MoonAuthCodeProperties properties;\n\n  MoonAuthCodeTheme({\n    required this.tokens,\n    MoonAuthCodeColors? colors,\n    MoonAuthCodeProperties? properties,\n  })  : colors = colors ??\n            MoonAuthCodeColors(\n              selectedBorderColor: tokens.colors.piccolo,\n              activeBorderColor: tokens.colors.beerus,\n              inactiveBorderColor: tokens.colors.beerus,\n              errorBorderColor: tokens.colors.chichi,\n              selectedFillColor: tokens.colors.goku,\n              activeFillColor: tokens.colors.goku,\n              inactiveFillColor: tokens.colors.goku,\n              textColor: tokens.colors.textPrimary,\n            ),\n        properties = properties ??\n            MoonAuthCodeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              gap: tokens.sizes.x4s,\n              height: tokens.sizes.xl,\n              width: tokens.sizes.lg,\n              animationDuration: tokens.transitions.defaultTransitionDuration,\n              errorAnimationDuration:\n                  tokens.transitions.defaultTransitionDuration,\n              peekDuration: tokens.transitions.defaultTransitionDuration,\n              animationCurve: tokens.transitions.defaultTransitionCurve,\n              errorAnimationCurve: tokens.transitions.defaultTransitionCurve,\n              textStyle: tokens.typography.body.text24,\n              errorTextStyle: tokens.typography.body.text12,\n            );\n\n  @override\n  MoonAuthCodeTheme copyWith({\n    MoonTokens? tokens,\n    MoonAuthCodeColors? colors,\n    MoonAuthCodeProperties? properties,\n  }) {\n    return MoonAuthCodeTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonAuthCodeTheme lerp(ThemeExtension<MoonAuthCodeTheme>? other, double t) {\n    if (other is! MoonAuthCodeTheme) return this;\n\n    return MoonAuthCodeTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAuthCodeTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonAuthCodeColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonAuthCodeProperties>(\"properties\", properties),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/avatar/avatar_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonAvatarColors extends ThemeExtension<MoonAvatarColors>\n    with DiagnosticableTreeMixin {\n  /// The background color of the MoonAvatar.\n  final Color backgroundColor;\n\n  /// The color of the MoonAvatar badge.\n  final Color badgeColor;\n\n  /// The icon color of the MoonAvatar.\n  final Color iconColor;\n\n  /// The text color of the MoonAvatar.\n  final Color textColor;\n\n  const MoonAvatarColors({\n    required this.backgroundColor,\n    required this.badgeColor,\n    required this.iconColor,\n    required this.textColor,\n  });\n\n  @override\n  MoonAvatarColors copyWith({\n    Color? backgroundColor,\n    Color? badgeColor,\n    Color? iconColor,\n    Color? textColor,\n  }) {\n    return MoonAvatarColors(\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      badgeColor: badgeColor ?? this.badgeColor,\n      iconColor: iconColor ?? this.iconColor,\n      textColor: textColor ?? this.textColor,\n    );\n  }\n\n  @override\n  MoonAvatarColors lerp(ThemeExtension<MoonAvatarColors>? other, double t) {\n    if (other is! MoonAvatarColors) return this;\n\n    return MoonAvatarColors(\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      badgeColor: colorPremulLerp(badgeColor, other.badgeColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAvatarColors\"))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor))\n      ..add(ColorProperty(\"badgeColor\", badgeColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"textColor\", textColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/avatar/avatar_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonAvatarSizeProperties extends ThemeExtension<MoonAvatarSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonAvatar.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The size value of the MoonAvatar.\n  final double avatarSizeValue;\n\n  /// The margin value of the MoonAvatar badge.\n  final double badgeMarginValue;\n\n  /// The size value of the MoonAvatar badge.\n  final double badgeSizeValue;\n\n  /// The text style of the MoonAvatar.\n  final TextStyle textStyle;\n\n  const MoonAvatarSizeProperties({\n    required this.avatarSizeValue,\n    required this.badgeSizeValue,\n    required this.badgeMarginValue,\n    required this.borderRadius,\n    required this.textStyle,\n  });\n\n  @override\n  MoonAvatarSizeProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? avatarSizeValue,\n    double? badgeMarginValue,\n    double? badgeSizeValue,\n    TextStyle? textStyle,\n  }) {\n    return MoonAvatarSizeProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      avatarSizeValue: avatarSizeValue ?? this.avatarSizeValue,\n      badgeMarginValue: badgeMarginValue ?? this.badgeMarginValue,\n      badgeSizeValue: badgeSizeValue ?? this.badgeSizeValue,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonAvatarSizeProperties lerp(\n    ThemeExtension<MoonAvatarSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonAvatarSizeProperties) return this;\n\n    return MoonAvatarSizeProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      avatarSizeValue: lerpDouble(avatarSizeValue, other.avatarSizeValue, t)!,\n      badgeMarginValue:\n          lerpDouble(badgeMarginValue, other.badgeMarginValue, t)!,\n      badgeSizeValue: lerpDouble(badgeSizeValue, other.badgeSizeValue, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonAvatarSizeProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(DoubleProperty(\"avatarSizeValue\", avatarSizeValue))\n      ..add(DoubleProperty(\"badgeMarginValue\", badgeMarginValue))\n      ..add(DoubleProperty(\"badgeSizeValue\", badgeSizeValue))\n      ..add(DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/avatar/avatar_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/avatar/avatar_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonAvatarSizes extends ThemeExtension<MoonAvatarSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the extra small MoonAvatar.\n  final MoonAvatarSizeProperties xs;\n\n  /// The properties of the small MoonAvatar.\n  final MoonAvatarSizeProperties sm;\n\n  /// The properties of the medium MoonAvatar.\n  final MoonAvatarSizeProperties md;\n\n  /// The properties of the large MoonAvatar.\n  final MoonAvatarSizeProperties lg;\n\n  /// The properties of the extra large MoonAvatar.\n  final MoonAvatarSizeProperties xl;\n\n  /// The properties of the (2x) extra large MoonAvatar.\n  final MoonAvatarSizeProperties x2l;\n\n  MoonAvatarSizes({\n    required this.tokens,\n    MoonAvatarSizeProperties? xs,\n    MoonAvatarSizeProperties? sm,\n    MoonAvatarSizeProperties? md,\n    MoonAvatarSizeProperties? lg,\n    MoonAvatarSizeProperties? xl,\n    MoonAvatarSizeProperties? x2l,\n  })  : xs = xs ??\n            MoonAvatarSizeProperties(\n              borderRadius: tokens.borders.interactiveXs,\n              avatarSizeValue: tokens.sizes.xs,\n              badgeMarginValue:\n                  tokens.sizes.xs * tokens.sizes.x5s / tokens.sizes.x2l,\n              badgeSizeValue:\n                  tokens.sizes.xs * tokens.sizes.x3s / tokens.sizes.x2l,\n              textStyle: tokens.typography.heading.text10,\n            ),\n        sm = sm ??\n            MoonAvatarSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              avatarSizeValue: tokens.sizes.sm,\n              badgeMarginValue:\n                  tokens.sizes.sm * tokens.sizes.x5s / tokens.sizes.x2l,\n              badgeSizeValue:\n                  tokens.sizes.sm * tokens.sizes.x3s / tokens.sizes.x2l,\n              textStyle: tokens.typography.heading.text12,\n            ),\n        md = md ??\n            MoonAvatarSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              avatarSizeValue: tokens.sizes.md,\n              badgeMarginValue:\n                  tokens.sizes.md * tokens.sizes.x5s / tokens.sizes.x2l,\n              badgeSizeValue:\n                  tokens.sizes.md * tokens.sizes.x3s / tokens.sizes.x2l,\n              textStyle: tokens.typography.heading.textDefault,\n            ),\n        lg = lg ??\n            MoonAvatarSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              avatarSizeValue: tokens.sizes.lg,\n              badgeMarginValue:\n                  tokens.sizes.lg * tokens.sizes.x5s / tokens.sizes.x2l,\n              badgeSizeValue:\n                  tokens.sizes.lg * tokens.sizes.x3s / tokens.sizes.x2l,\n              textStyle: tokens.typography.heading.text16,\n            ),\n        xl = xl ??\n            MoonAvatarSizeProperties(\n              borderRadius: tokens.borders.interactiveMd,\n              avatarSizeValue: tokens.sizes.xl,\n              badgeMarginValue:\n                  tokens.sizes.xl * tokens.sizes.x5s / tokens.sizes.x2l,\n              badgeSizeValue:\n                  tokens.sizes.xl * tokens.sizes.x3s / tokens.sizes.x2l,\n              textStyle: tokens.typography.heading.text16,\n            ),\n        x2l = x2l ??\n            MoonAvatarSizeProperties(\n              borderRadius: tokens.borders.interactiveMd,\n              avatarSizeValue: tokens.sizes.x2l,\n              badgeMarginValue:\n                  tokens.sizes.x2l * tokens.sizes.x5s / tokens.sizes.x2l,\n              badgeSizeValue:\n                  tokens.sizes.x2l * tokens.sizes.x3s / tokens.sizes.x2l,\n              textStyle: tokens.typography.heading.text20,\n            );\n\n  @override\n  MoonAvatarSizes copyWith({\n    MoonTokens? tokens,\n    MoonAvatarSizeProperties? xs,\n    MoonAvatarSizeProperties? sm,\n    MoonAvatarSizeProperties? md,\n    MoonAvatarSizeProperties? lg,\n    MoonAvatarSizeProperties? xl,\n    MoonAvatarSizeProperties? x2l,\n  }) {\n    return MoonAvatarSizes(\n      tokens: tokens ?? this.tokens,\n      xs: xs ?? this.xs,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n      lg: lg ?? this.lg,\n      xl: xl ?? this.xl,\n      x2l: x2l ?? this.x2l,\n    );\n  }\n\n  @override\n  MoonAvatarSizes lerp(ThemeExtension<MoonAvatarSizes>? other, double t) {\n    if (other is! MoonAvatarSizes) return this;\n\n    return MoonAvatarSizes(\n      tokens: tokens,\n      xs: xs.lerp(other.xs, t),\n      sm: sm.lerp(other.sm, t),\n      md: md.lerp(other.md, t),\n      lg: lg.lerp(other.lg, t),\n      xl: xl.lerp(other.xl, t),\n      x2l: x2l.lerp(other.x2l, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAvatarSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonAvatarSizeProperties>(\"xs\", xs))\n      ..add(DiagnosticsProperty<MoonAvatarSizeProperties>(\"sm\", sm))\n      ..add(DiagnosticsProperty<MoonAvatarSizeProperties>(\"md\", md))\n      ..add(DiagnosticsProperty<MoonAvatarSizeProperties>(\"lg\", lg))\n      ..add(DiagnosticsProperty<MoonAvatarSizeProperties>(\"xl\", xl))\n      ..add(DiagnosticsProperty<MoonAvatarSizeProperties>(\"x2l\", x2l));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/avatar/avatar_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/avatar/avatar_colors.dart';\nimport 'package:moon_design/src/theme/avatar/avatar_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonAvatarTheme extends ThemeExtension<MoonAvatarTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonAvatar.\n  final MoonAvatarColors colors;\n\n  /// The sizes of the MoonAvatar.\n  final MoonAvatarSizes sizes;\n\n  MoonAvatarTheme({\n    required this.tokens,\n    MoonAvatarColors? colors,\n    MoonAvatarSizes? sizes,\n  })  : colors = colors ??\n            MoonAvatarColors(\n              backgroundColor: tokens.colors.goku,\n              badgeColor: tokens.colors.roshi,\n              iconColor: tokens.colors.iconPrimary,\n              textColor: tokens.colors.textPrimary,\n            ),\n        sizes = sizes ?? MoonAvatarSizes(tokens: tokens);\n\n  @override\n  MoonAvatarTheme copyWith({\n    MoonTokens? tokens,\n    MoonAvatarColors? colors,\n    MoonAvatarSizes? sizes,\n  }) {\n    return MoonAvatarTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonAvatarTheme lerp(ThemeExtension<MoonAvatarTheme>? other, double t) {\n    if (other is! MoonAvatarTheme) return this;\n\n    return MoonAvatarTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonAvatarTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonAvatarColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonAvatarSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/bottom_sheet/bottom_sheet_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonBottomSheetColors extends ThemeExtension<MoonBottomSheetColors>\n    with DiagnosticableTreeMixin {\n  /// The text color of the MoonBottomSheet.\n  final Color textColor;\n\n  /// The icon color of the MoonBottomSheet.\n  final Color iconColor;\n\n  /// The background color of the MoonBottomSheet.\n  final Color backgroundColor;\n\n  /// The color of the MoonBottomSheet barrier.\n  final Color barrierColor;\n\n  const MoonBottomSheetColors({\n    required this.textColor,\n    required this.iconColor,\n    required this.backgroundColor,\n    required this.barrierColor,\n  });\n\n  @override\n  MoonBottomSheetColors copyWith({\n    Color? textColor,\n    Color? iconColor,\n    Color? backgroundColor,\n    Color? barrierColor,\n  }) {\n    return MoonBottomSheetColors(\n      textColor: textColor ?? this.textColor,\n      iconColor: iconColor ?? this.iconColor,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      barrierColor: barrierColor ?? this.barrierColor,\n    );\n  }\n\n  @override\n  MoonBottomSheetColors lerp(\n    ThemeExtension<MoonBottomSheetColors>? other,\n    double t,\n  ) {\n    if (other is! MoonBottomSheetColors) return this;\n\n    return MoonBottomSheetColors(\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      barrierColor: colorPremulLerp(barrierColor, other.barrierColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonBottomSheetColors\"))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor))\n      ..add(ColorProperty(\"barrierColor\", barrierColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/bottom_sheet/bottom_sheet_properties.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonBottomSheetProperties\n    extends ThemeExtension<MoonBottomSheetProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonBottomSheet.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The duration of the MoonBottomSheet transition animation (slide in or out).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonBottomSheet transition animation (slide in or out).\n  final Curve transitionCurve;\n\n  /// The text style of the MoonBottomSheet.\n  final TextStyle textStyle;\n\n  const MoonBottomSheetProperties({\n    required this.borderRadius,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.textStyle,\n  });\n\n  @override\n  MoonBottomSheetProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    TextStyle? textStyle,\n  }) {\n    return MoonBottomSheetProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonBottomSheetProperties lerp(\n    ThemeExtension<MoonBottomSheetProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonBottomSheetProperties) return this;\n\n    return MoonBottomSheetProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonBottomSheetProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/bottom_sheet/bottom_sheet_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/bottom_sheet/bottom_sheet_colors.dart';\nimport 'package:moon_design/src/theme/bottom_sheet/bottom_sheet_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonBottomSheetTheme extends ThemeExtension<MoonBottomSheetTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonBottomSheet.\n  final MoonBottomSheetColors colors;\n\n  /// The properties of the MoonBottomSheet.\n  final MoonBottomSheetProperties properties;\n\n  MoonBottomSheetTheme({\n    required this.tokens,\n    MoonBottomSheetColors? colors,\n    MoonBottomSheetProperties? properties,\n  })  : colors = colors ??\n            MoonBottomSheetColors(\n              textColor: tokens.colors.textPrimary,\n              iconColor: tokens.colors.iconPrimary,\n              backgroundColor: tokens.colors.goku,\n              barrierColor: tokens.colors.zeno,\n            ),\n        properties = properties ??\n            MoonBottomSheetProperties(\n              borderRadius: tokens.borders.surfaceLg,\n              transitionDuration: const Duration(milliseconds: 350),\n              transitionCurve: const Cubic(0.0, 0.0, 0.2, 1.0),\n              textStyle: tokens.typography.body.textDefault,\n            );\n\n  @override\n  MoonBottomSheetTheme copyWith({\n    MoonTokens? tokens,\n    MoonBottomSheetColors? colors,\n    MoonBottomSheetProperties? properties,\n  }) {\n    return MoonBottomSheetTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonBottomSheetTheme lerp(\n    ThemeExtension<MoonBottomSheetTheme>? other,\n    double t,\n  ) {\n    if (other is! MoonBottomSheetTheme) return this;\n\n    return MoonBottomSheetTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonBottomSheetTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonBottomSheetColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonBottomSheetProperties>(\n          \"properties\",\n          properties,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/breadcrumb/breadcrumb_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonBreadcrumbColors extends ThemeExtension<MoonBreadcrumbColors>\n    with DiagnosticableTreeMixin {\n  /// The icon and text color of the MoonBreadcrumb item.\n  final Color itemColor;\n\n  /// The icon and text color of the current MoonBreadcrumb item.\n  final Color? currentItemColor;\n\n  /// The icon and text color of the MoonBreadcrumb item on hover.\n  final Color? hoverEffectColor;\n\n  const MoonBreadcrumbColors({\n    required this.itemColor,\n    required this.currentItemColor,\n    required this.hoverEffectColor,\n  });\n\n  @override\n  MoonBreadcrumbColors copyWith({\n    Color? itemColor,\n    Color? currentItemColor,\n    Color? hoverEffectColor,\n  }) {\n    return MoonBreadcrumbColors(\n      itemColor: itemColor ?? this.itemColor,\n      currentItemColor: currentItemColor ?? this.currentItemColor,\n      hoverEffectColor: hoverEffectColor ?? this.hoverEffectColor,\n    );\n  }\n\n  @override\n  MoonBreadcrumbColors lerp(\n    ThemeExtension<MoonBreadcrumbColors>? other,\n    double t,\n  ) {\n    if (other is! MoonBreadcrumbColors) return this;\n\n    return MoonBreadcrumbColors(\n      itemColor: colorPremulLerp(itemColor, other.itemColor, t)!,\n      currentItemColor:\n          colorPremulLerp(currentItemColor, other.currentItemColor, t),\n      hoverEffectColor:\n          colorPremulLerp(hoverEffectColor, other.hoverEffectColor, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonBreadcrumbColors\"))\n      ..add(ColorProperty(\"itemColor\", itemColor))\n      ..add(ColorProperty(\"currentItemColor\", currentItemColor))\n      ..add(ColorProperty(\"hoverEffectColor\", hoverEffectColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/breadcrumb/breadcrumb_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonBreadcrumbProperties extends ThemeExtension<MoonBreadcrumbProperties>\n    with DiagnosticableTreeMixin {\n  /// The gap between the divider widget and the MoonBreadcrumb item.\n  final double gap;\n\n  /// The gap between the leading, label and trailing widgets of the\n  /// MoonBreadcrumb item.\n  final double itemGap;\n\n  /// The duration of the MoonBreadcrumb item transition animation.\n  final Duration transitionDuration;\n\n  /// The curve of the MoonBreadcrumb item transition animation.\n  final Curve transitionCurve;\n\n  /// The text style of the MoonBreadcrumb item.\n  final TextStyle itemTextStyle;\n\n  /// The text style of the current MoonBreadcrumb item.\n  final TextStyle currentItemTextStyle;\n\n  /// The text style of the MoonBreadcrumb single custom widget to replace all\n  /// the breadcrumb collapsed items with.\n  final TextStyle showMoreItemTextStyle;\n\n  const MoonBreadcrumbProperties({\n    required this.gap,\n    required this.itemGap,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.itemTextStyle,\n    required this.currentItemTextStyle,\n    required this.showMoreItemTextStyle,\n  });\n\n  @override\n  MoonBreadcrumbProperties copyWith({\n    double? gap,\n    double? itemGap,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    TextStyle? itemTextStyle,\n    TextStyle? currentItemTextStyle,\n    TextStyle? showMoreItemTextStyle,\n  }) {\n    return MoonBreadcrumbProperties(\n      gap: gap ?? this.gap,\n      itemGap: itemGap ?? this.itemGap,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      itemTextStyle: itemTextStyle ?? this.itemTextStyle,\n      currentItemTextStyle: currentItemTextStyle ?? this.currentItemTextStyle,\n      showMoreItemTextStyle:\n          showMoreItemTextStyle ?? this.showMoreItemTextStyle,\n    );\n  }\n\n  @override\n  MoonBreadcrumbProperties lerp(\n    ThemeExtension<MoonBreadcrumbProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonBreadcrumbProperties) return this;\n\n    return MoonBreadcrumbProperties(\n      gap: lerpDouble(gap, other.gap, t)!,\n      itemGap: lerpDouble(itemGap, other.itemGap, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      itemTextStyle: TextStyle.lerp(itemTextStyle, other.itemTextStyle, t)!,\n      currentItemTextStyle:\n          TextStyle.lerp(currentItemTextStyle, other.currentItemTextStyle, t)!,\n      showMoreItemTextStyle: TextStyle.lerp(\n        showMoreItemTextStyle,\n        other.showMoreItemTextStyle,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonBreadcrumbProperties\"),\n      )\n      ..add(\n        DoubleProperty(\"gap\", gap),\n      )\n      ..add(\n        DoubleProperty(\"itemGap\", itemGap),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"itemTextStyle\", itemTextStyle),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"currentItemTextStyle\",\n          currentItemTextStyle,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"showMoreItemTextStyle\",\n          showMoreItemTextStyle,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/breadcrumb/breadcrumb_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/moon_design.dart';\nimport 'package:moon_design/src/theme/breadcrumb/breadcrumb_colors.dart';\nimport 'package:moon_design/src/theme/breadcrumb/breadcrumb_properties.dart';\n\n@immutable\nclass MoonBreadcrumbTheme extends ThemeExtension<MoonBreadcrumbTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonBreadcrumb.\n  final MoonBreadcrumbColors colors;\n\n  /// The properties of the MoonBreadcrumb.\n  final MoonBreadcrumbProperties properties;\n\n  MoonBreadcrumbTheme({\n    required this.tokens,\n    MoonBreadcrumbColors? colors,\n    MoonBreadcrumbProperties? properties,\n  })  : colors = colors ??\n            MoonBreadcrumbColors(\n              itemColor: tokens.colors.textSecondary,\n              currentItemColor: tokens.colors.textPrimary,\n              hoverEffectColor: tokens.colors.textPrimary,\n            ),\n        properties = properties ??\n            MoonBreadcrumbProperties(\n              gap: tokens.sizes.x4s,\n              itemGap: tokens.sizes.x6s,\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n              itemTextStyle: tokens.typography.body.textDefault,\n              currentItemTextStyle: tokens.typography.body.textDefault,\n              showMoreItemTextStyle: tokens.typography.body.textDefault,\n            );\n\n  @override\n  MoonBreadcrumbTheme copyWith({\n    MoonTokens? tokens,\n    MoonBreadcrumbColors? colors,\n    MoonBreadcrumbProperties? properties,\n  }) {\n    return MoonBreadcrumbTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonBreadcrumbTheme lerp(\n    ThemeExtension<MoonBreadcrumbTheme>? other,\n    double t,\n  ) {\n    if (other is! MoonBreadcrumbTheme) return this;\n\n    return MoonBreadcrumbTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonBreadcrumbTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonBreadcrumbColors>(\"colors\", colors));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/button/button_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonButtonColors extends ThemeExtension<MoonButtonColors>\n    with DiagnosticableTreeMixin {\n  /// The border color of the MoonButton.\n  final Color borderColor;\n\n  /// The text color of the MoonButton.\n  final Color textColor;\n\n  /// The background color of the MoonButton filled variant.\n  final Color filledVariantBackgroundColor;\n\n  /// The text color of the MoonButton filled variant.\n  final Color filledVariantTextColor;\n\n  /// The focus effect color of the MoonButton text variant.\n  final Color textVariantFocusColor;\n\n  /// The hover effect color of the MoonButton text variant.\n  final Color textVariantHoverColor;\n\n  /// The text color of the MoonButton text variant.\n  final Color textVariantTextColor;\n\n  const MoonButtonColors({\n    required this.borderColor,\n    required this.textColor,\n    required this.filledVariantBackgroundColor,\n    required this.filledVariantTextColor,\n    required this.textVariantFocusColor,\n    required this.textVariantHoverColor,\n    required this.textVariantTextColor,\n  });\n\n  @override\n  MoonButtonColors copyWith({\n    Color? borderColor,\n    Color? textColor,\n    Color? filledVariantBackgroundColor,\n    Color? filledVariantTextColor,\n    Color? textVariantFocusColor,\n    Color? textVariantHoverColor,\n    Color? textVariantTextColor,\n  }) {\n    return MoonButtonColors(\n      borderColor: borderColor ?? this.borderColor,\n      textColor: textColor ?? this.textColor,\n      filledVariantBackgroundColor:\n          filledVariantBackgroundColor ?? this.filledVariantBackgroundColor,\n      filledVariantTextColor:\n          filledVariantTextColor ?? this.filledVariantTextColor,\n      textVariantFocusColor:\n          textVariantFocusColor ?? this.textVariantFocusColor,\n      textVariantHoverColor:\n          textVariantHoverColor ?? this.textVariantHoverColor,\n      textVariantTextColor: textVariantTextColor ?? this.textVariantTextColor,\n    );\n  }\n\n  @override\n  MoonButtonColors lerp(ThemeExtension<MoonButtonColors>? other, double t) {\n    if (other is! MoonButtonColors) return this;\n\n    return MoonButtonColors(\n      borderColor: colorPremulLerp(borderColor, other.borderColor, t)!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      filledVariantBackgroundColor: colorPremulLerp(\n        filledVariantBackgroundColor,\n        other.filledVariantBackgroundColor,\n        t,\n      )!,\n      filledVariantTextColor: colorPremulLerp(\n        filledVariantTextColor,\n        other.filledVariantTextColor,\n        t,\n      )!,\n      textVariantFocusColor: colorPremulLerp(\n        textVariantFocusColor,\n        other.textVariantFocusColor,\n        t,\n      )!,\n      textVariantHoverColor: colorPremulLerp(\n        textVariantHoverColor,\n        other.textVariantHoverColor,\n        t,\n      )!,\n      textVariantTextColor:\n          colorPremulLerp(textVariantTextColor, other.textVariantTextColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\n          \"type\",\n          \"MoonButtonColors\",\n        ),\n      )\n      ..add(\n        ColorProperty(\n          \"borderColor\",\n          borderColor,\n        ),\n      )\n      ..add(\n        ColorProperty(\n          \"textColor\",\n          textColor,\n        ),\n      )\n      ..add(\n        ColorProperty(\n          \"filledVariantBackgroundColor\",\n          filledVariantBackgroundColor,\n        ),\n      )\n      ..add(ColorProperty(\"filledVariantTextColor\", filledVariantTextColor))\n      ..add(ColorProperty(\"textVariantFocusColor\", textVariantFocusColor))\n      ..add(ColorProperty(\"textVariantHoverColor\", textVariantHoverColor))\n      ..add(ColorProperty(\"textVariantTextColor\", textVariantTextColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/button/button_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonButtonSizeProperties extends ThemeExtension<MoonButtonSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonButton.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The gap between the leading, label and trailing widgets of the MoonButton.\n  final double gap;\n\n  /// The height of the MoonButton.\n  final double height;\n\n  /// The size value of the MoonButton icon.\n  final double iconSizeValue;\n\n  /// The padding of the MoonButton.\n  final EdgeInsetsGeometry padding;\n\n  /// The text style of the MoonButton.\n  final TextStyle textStyle;\n\n  const MoonButtonSizeProperties({\n    required this.borderRadius,\n    required this.gap,\n    required this.height,\n    required this.iconSizeValue,\n    required this.padding,\n    required this.textStyle,\n  });\n\n  @override\n  MoonButtonSizeProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? gap,\n    double? height,\n    double? iconSizeValue,\n    EdgeInsetsGeometry? padding,\n    TextStyle? textStyle,\n  }) {\n    return MoonButtonSizeProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      gap: gap ?? this.gap,\n      height: height ?? this.height,\n      iconSizeValue: iconSizeValue ?? this.iconSizeValue,\n      padding: padding ?? this.padding,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonButtonSizeProperties lerp(\n    ThemeExtension<MoonButtonSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonButtonSizeProperties) return this;\n\n    return MoonButtonSizeProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      gap: lerpDouble(gap, other.gap, t)!,\n      height: lerpDouble(height, other.height, t)!,\n      iconSizeValue: lerpDouble(iconSizeValue, other.iconSizeValue, t)!,\n      padding: EdgeInsetsGeometry.lerp(padding, other.padding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonButtonSizeProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(DoubleProperty(\"gap\", gap))\n      ..add(DoubleProperty(\"height\", height))\n      ..add(DoubleProperty(\"iconSizeValue\", iconSizeValue))\n      ..add(DiagnosticsProperty<EdgeInsetsGeometry>(\"padding\", padding))\n      ..add(DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/button/button_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/button/button_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonButtonSizes extends ThemeExtension<MoonButtonSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the extra small MoonButton.\n  final MoonButtonSizeProperties xs;\n\n  /// The properties of the small MoonButton.\n  final MoonButtonSizeProperties sm;\n\n  /// The properties of the medium MoonButton.\n  final MoonButtonSizeProperties md;\n\n  /// The properties of the large MoonButton.\n  final MoonButtonSizeProperties lg;\n\n  /// The properties of the extra large MoonButton.\n  final MoonButtonSizeProperties xl;\n\n  MoonButtonSizes({\n    required this.tokens,\n    MoonButtonSizeProperties? xs,\n    MoonButtonSizeProperties? sm,\n    MoonButtonSizeProperties? md,\n    MoonButtonSizeProperties? lg,\n    MoonButtonSizeProperties? xl,\n  })  : xs = xs ??\n            MoonButtonSizeProperties(\n              borderRadius: tokens.borders.interactiveXs,\n              gap: tokens.sizes.x5s,\n              height: tokens.sizes.xs,\n              iconSizeValue: tokens.sizes.x2s,\n              padding: EdgeInsets.symmetric(horizontal: tokens.sizes.x4s),\n              textStyle: tokens.typography.heading.text12,\n            ),\n        sm = sm ??\n            MoonButtonSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              gap: tokens.sizes.x5s,\n              height: tokens.sizes.sm,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              textStyle: tokens.typography.heading.textDefault,\n            ),\n        md = md ??\n            MoonButtonSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              gap: tokens.sizes.x4s,\n              height: tokens.sizes.md,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.symmetric(horizontal: tokens.sizes.x2s),\n              textStyle: tokens.typography.heading.textDefault,\n            ),\n        lg = lg ??\n            MoonButtonSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              gap: tokens.sizes.x3s,\n              height: tokens.sizes.lg,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.symmetric(horizontal: tokens.sizes.x2s),\n              textStyle: tokens.typography.heading.text16,\n            ),\n        xl = xl ??\n            MoonButtonSizeProperties(\n              borderRadius: tokens.borders.interactiveMd,\n              gap: tokens.sizes.x2s,\n              height: tokens.sizes.xl,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.symmetric(horizontal: tokens.sizes.xs),\n              textStyle: tokens.typography.heading.text16,\n            );\n\n  @override\n  MoonButtonSizes copyWith({\n    MoonTokens? tokens,\n    MoonButtonSizeProperties? xs,\n    MoonButtonSizeProperties? sm,\n    MoonButtonSizeProperties? md,\n    MoonButtonSizeProperties? lg,\n    MoonButtonSizeProperties? xl,\n  }) {\n    return MoonButtonSizes(\n      tokens: tokens ?? this.tokens,\n      xs: xs ?? this.xs,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n      lg: lg ?? this.lg,\n      xl: xl ?? this.xl,\n    );\n  }\n\n  @override\n  MoonButtonSizes lerp(ThemeExtension<MoonButtonSizes>? other, double t) {\n    if (other is! MoonButtonSizes) return this;\n\n    return MoonButtonSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      xs: xs.lerp(other.xs, t),\n      sm: sm.lerp(other.sm, t),\n      md: md.lerp(other.md, t),\n      lg: lg.lerp(other.lg, t),\n      xl: xl.lerp(other.xl, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonButtonSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonButtonSizeProperties>(\"xs\", xs))\n      ..add(DiagnosticsProperty<MoonButtonSizeProperties>(\"sm\", sm))\n      ..add(DiagnosticsProperty<MoonButtonSizeProperties>(\"md\", md))\n      ..add(DiagnosticsProperty<MoonButtonSizeProperties>(\"lg\", lg))\n      ..add(DiagnosticsProperty<MoonButtonSizeProperties>(\"xl\", xl));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/button/button_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/button/button_colors.dart';\nimport 'package:moon_design/src/theme/button/button_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonButtonTheme extends ThemeExtension<MoonButtonTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonButton.\n  final MoonButtonColors colors;\n\n  /// The sizes of the MoonButton.\n  final MoonButtonSizes sizes;\n\n  MoonButtonTheme({\n    required this.tokens,\n    MoonButtonColors? colors,\n    MoonButtonSizes? sizes,\n  })  : colors = colors ??\n            MoonButtonColors(\n              borderColor: tokens.colors.trunks,\n              textColor: tokens.colors.textPrimary,\n              filledVariantBackgroundColor: tokens.colors.piccolo,\n              filledVariantTextColor: tokens.colors.goten,\n              textVariantTextColor: tokens.colors.textSecondary,\n              textVariantFocusColor: tokens.colors.piccolo,\n              textVariantHoverColor: tokens.colors.jiren,\n            ),\n        sizes = sizes ?? MoonButtonSizes(tokens: tokens);\n\n  @override\n  MoonButtonTheme copyWith({\n    MoonTokens? tokens,\n    MoonButtonColors? colors,\n    MoonButtonSizes? sizes,\n  }) {\n    return MoonButtonTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonButtonTheme lerp(ThemeExtension<MoonButtonTheme>? other, double t) {\n    if (other is! MoonButtonTheme) return this;\n\n    return MoonButtonTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonButtonTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonButtonColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonButtonSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/carousel/carousel_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonCarouselColors extends ThemeExtension<MoonCarouselColors>\n    with DiagnosticableTreeMixin {\n  /// The text color of the MoonCarousel items.\n  final Color textColor;\n\n  /// The icon color of the MoonCarousel items.\n  final Color iconColor;\n\n  const MoonCarouselColors({\n    required this.textColor,\n    required this.iconColor,\n  });\n\n  @override\n  MoonCarouselColors copyWith({\n    Color? textColor,\n    Color? iconColor,\n  }) {\n    return MoonCarouselColors(\n      textColor: textColor ?? this.textColor,\n      iconColor: iconColor ?? this.iconColor,\n    );\n  }\n\n  @override\n  MoonCarouselColors lerp(ThemeExtension<MoonCarouselColors>? other, double t) {\n    if (other is! MoonCarouselColors) return this;\n\n    return MoonCarouselColors(\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCarouselColors\"))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"iconColor\", iconColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/carousel/carousel_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonCarouselProperties extends ThemeExtension<MoonCarouselProperties>\n    with DiagnosticableTreeMixin {\n  /// The gap between the MoonCarousel items.\n  final double gap;\n\n  /// The text style of the MoonCarousel items.\n  final TextStyle textStyle;\n\n  /// The delay between the items in the MoonCarousel's automatic scrolling\n  /// sequence.\n  final Duration autoPlayDelay;\n\n  /// The duration of the MoonCarousel autoplay transition animation.\n  final Duration transitionDuration;\n\n  /// The curve of the MoonCarousel autoplay transition animation.\n  final Curve transitionCurve;\n\n  const MoonCarouselProperties({\n    required this.gap,\n    required this.textStyle,\n    required this.autoPlayDelay,\n    required this.transitionDuration,\n    required this.transitionCurve,\n  });\n\n  @override\n  MoonCarouselProperties copyWith({\n    double? gap,\n    TextStyle? textStyle,\n    Duration? autoPlayDelay,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n  }) {\n    return MoonCarouselProperties(\n      gap: gap ?? this.gap,\n      textStyle: textStyle ?? this.textStyle,\n      autoPlayDelay: autoPlayDelay ?? this.autoPlayDelay,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n    );\n  }\n\n  @override\n  MoonCarouselProperties lerp(\n    ThemeExtension<MoonCarouselProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonCarouselProperties) return this;\n\n    return MoonCarouselProperties(\n      gap: lerpDouble(gap, other.gap, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n      autoPlayDelay: lerpDuration(autoPlayDelay, other.autoPlayDelay, t),\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCarouselProperties\"))\n      ..add(DoubleProperty(\"gap\", gap))\n      ..add(DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle))\n      ..add(DiagnosticsProperty<Duration>(\"autoPlayDelay\", autoPlayDelay))\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/carousel/carousel_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/carousel/carousel_colors.dart';\nimport 'package:moon_design/src/theme/carousel/carousel_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonCarouselTheme extends ThemeExtension<MoonCarouselTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonCarousel.\n  final MoonCarouselColors colors;\n\n  /// The properties of the MoonCarousel.\n  final MoonCarouselProperties properties;\n\n  MoonCarouselTheme({\n    required this.tokens,\n    MoonCarouselColors? colors,\n    MoonCarouselProperties? properties,\n  })  : colors = colors ??\n            MoonCarouselColors(\n              textColor: tokens.colors.textPrimary,\n              iconColor: tokens.colors.iconPrimary,\n            ),\n        properties = properties ??\n            MoonCarouselProperties(\n              gap: tokens.sizes.x2s,\n              textStyle: tokens.typography.body.textDefault,\n              autoPlayDelay: const Duration(seconds: 3),\n              transitionDuration: const Duration(milliseconds: 800),\n              transitionCurve: Curves.fastOutSlowIn,\n            );\n\n  @override\n  MoonCarouselTheme copyWith({\n    MoonTokens? tokens,\n    MoonCarouselColors? colors,\n    MoonCarouselProperties? properties,\n  }) {\n    return MoonCarouselTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonCarouselTheme lerp(ThemeExtension<MoonCarouselTheme>? other, double t) {\n    if (other is! MoonCarouselTheme) return this;\n\n    return MoonCarouselTheme(\n      tokens: tokens,\n      properties: properties.lerp(other.properties, t),\n      colors: colors.lerp(other.colors, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCarouselTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonCarouselColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonCarouselProperties>(\"properties\", properties),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/checkbox/checkbox_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonCheckboxColors extends ThemeExtension<MoonCheckboxColors>\n    with DiagnosticableTreeMixin {\n  /// The background color of the checked MoonCheckbox.\n  final Color activeColor;\n\n  /// The border color of the unchecked MoonCheckbox.\n  final Color borderColor;\n\n  /// The color of the check icon when the MoonCheckbox is checked.\n  final Color checkColor;\n\n  /// The background color of the unchecked MoonCheckbox.\n  final Color inactiveColor;\n\n  const MoonCheckboxColors({\n    required this.activeColor,\n    required this.borderColor,\n    required this.checkColor,\n    required this.inactiveColor,\n  });\n\n  @override\n  MoonCheckboxColors copyWith({\n    Color? activeColor,\n    Color? borderColor,\n    Color? checkColor,\n    Color? inactiveColor,\n  }) {\n    return MoonCheckboxColors(\n      activeColor: activeColor ?? this.activeColor,\n      borderColor: borderColor ?? this.borderColor,\n      checkColor: checkColor ?? this.checkColor,\n      inactiveColor: inactiveColor ?? this.inactiveColor,\n    );\n  }\n\n  @override\n  MoonCheckboxColors lerp(ThemeExtension<MoonCheckboxColors>? other, double t) {\n    if (other is! MoonCheckboxColors) return this;\n\n    return MoonCheckboxColors(\n      activeColor: colorPremulLerp(activeColor, other.activeColor, t)!,\n      borderColor: colorPremulLerp(borderColor, other.borderColor, t)!,\n      checkColor: colorPremulLerp(checkColor, other.checkColor, t)!,\n      inactiveColor: colorPremulLerp(inactiveColor, other.inactiveColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCheckboxColors\"))\n      ..add(ColorProperty(\"activeColor\", activeColor))\n      ..add(ColorProperty(\"borderColor\", borderColor))\n      ..add(ColorProperty(\"checkColor\", checkColor))\n      ..add(ColorProperty(\"inactiveColor\", inactiveColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/checkbox/checkbox_properties.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonCheckboxProperties extends ThemeExtension<MoonCheckboxProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonCheckbox.\n  final BorderRadiusGeometry borderRadius;\n\n  const MoonCheckboxProperties({required this.borderRadius});\n\n  @override\n  MoonCheckboxProperties copyWith({BorderRadiusGeometry? borderRadius}) {\n    return MoonCheckboxProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n    );\n  }\n\n  @override\n  MoonCheckboxProperties lerp(\n    ThemeExtension<MoonCheckboxProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonCheckboxProperties) return this;\n\n    return MoonCheckboxProperties(\n      borderRadius: BorderRadiusGeometry.lerp(\n        borderRadius,\n        other.borderRadius,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonCheckboxProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/checkbox/checkbox_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/checkbox/checkbox_colors.dart';\nimport 'package:moon_design/src/theme/checkbox/checkbox_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonCheckboxTheme extends ThemeExtension<MoonCheckboxTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonCheckbox.\n  final MoonCheckboxColors colors;\n\n  /// The properties of the MoonCheckbox.\n  final MoonCheckboxProperties properties;\n\n  MoonCheckboxTheme({\n    required this.tokens,\n    MoonCheckboxColors? colors,\n    MoonCheckboxProperties? properties,\n  })  : colors = colors ??\n            MoonCheckboxColors(\n              activeColor: tokens.colors.piccolo,\n              borderColor: tokens.colors.trunks,\n              checkColor: tokens.colors.goten,\n              inactiveColor: Colors.transparent,\n            ),\n        properties = properties ??\n            MoonCheckboxProperties(borderRadius: tokens.borders.interactiveXs);\n\n  @override\n  MoonCheckboxTheme copyWith({\n    MoonTokens? tokens,\n    MoonCheckboxColors? colors,\n    MoonCheckboxProperties? properties,\n  }) {\n    return MoonCheckboxTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonCheckboxTheme lerp(ThemeExtension<MoonCheckboxTheme>? other, double t) {\n    if (other is! MoonCheckboxTheme) return this;\n\n    return MoonCheckboxTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCheckboxTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonCheckboxColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonCheckboxProperties>(\"properties\", properties),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/chip/chip_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonChipColors extends ThemeExtension<MoonChipColors>\n    with DiagnosticableTreeMixin {\n  /// The text and border color of the MoonChip in active state.\n  final Color activeColor;\n\n  /// The background color of the MoonChip.\n  final Color backgroundColor;\n\n  /// The background color of the MoonChip in active state.\n  final Color activeBackgroundColor;\n\n  /// The text color of the MoonChip.\n  final Color textColor;\n\n  const MoonChipColors({\n    required this.activeColor,\n    required this.backgroundColor,\n    required this.activeBackgroundColor,\n    required this.textColor,\n  });\n\n  @override\n  MoonChipColors copyWith({\n    Color? activeColor,\n    Color? backgroundColor,\n    Color? activeBackgroundColor,\n    Color? textColor,\n  }) {\n    return MoonChipColors(\n      activeColor: activeColor ?? this.activeColor,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      activeBackgroundColor:\n          activeBackgroundColor ?? this.activeBackgroundColor,\n      textColor: textColor ?? this.textColor,\n    );\n  }\n\n  @override\n  MoonChipColors lerp(ThemeExtension<MoonChipColors>? other, double t) {\n    if (other is! MoonChipColors) return this;\n\n    return MoonChipColors(\n      activeColor: colorPremulLerp(activeColor, other.activeColor, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      activeBackgroundColor: colorPremulLerp(\n        activeBackgroundColor,\n        other.activeBackgroundColor,\n        t,\n      )!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonChipColors\"))\n      ..add(ColorProperty(\"activeColor\", activeColor))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor))\n      ..add(ColorProperty(\"activeBackgroundColor\", activeBackgroundColor))\n      ..add(ColorProperty(\"textColor\", textColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/chip/chip_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonChipSizeProperties extends ThemeExtension<MoonChipSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonChip.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The gap between the leading, label and trailing widgets of the MoonChip.\n  final double gap;\n\n  /// The height of the MoonChip.\n  final double height;\n\n  /// The size value of the MoonChip icon.\n  final double iconSizeValue;\n\n  /// The padding of the MoonChip.\n  final EdgeInsetsGeometry padding;\n\n  /// The text style of the MoonChip.\n  final TextStyle textStyle;\n\n  const MoonChipSizeProperties({\n    required this.borderRadius,\n    required this.gap,\n    required this.height,\n    required this.iconSizeValue,\n    required this.padding,\n    required this.textStyle,\n  });\n\n  @override\n  MoonChipSizeProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? gap,\n    double? height,\n    double? iconSizeValue,\n    EdgeInsetsGeometry? padding,\n    TextStyle? textStyle,\n  }) {\n    return MoonChipSizeProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      gap: gap ?? this.gap,\n      height: height ?? this.height,\n      iconSizeValue: iconSizeValue ?? this.iconSizeValue,\n      padding: padding ?? this.padding,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonChipSizeProperties lerp(\n    ThemeExtension<MoonChipSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonChipSizeProperties) return this;\n\n    return MoonChipSizeProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      gap: lerpDouble(gap, other.gap, t)!,\n      height: lerpDouble(height, other.height, t)!,\n      iconSizeValue: lerpDouble(iconSizeValue, other.iconSizeValue, t)!,\n      padding: EdgeInsetsGeometry.lerp(padding, other.padding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonChipSizeProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(DoubleProperty(\"gap\", gap))\n      ..add(DoubleProperty(\"height\", height))\n      ..add(DoubleProperty(\"iconSizeValue\", iconSizeValue))\n      ..add(DiagnosticsProperty<EdgeInsetsGeometry>(\"padding\", padding))\n      ..add(DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/chip/chip_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/chip/chip_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonChipSizes extends ThemeExtension<MoonChipSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the small MoonChip.\n  final MoonChipSizeProperties sm;\n\n  /// The properties of the medium MoonChip.\n  final MoonChipSizeProperties md;\n\n  MoonChipSizes({\n    required this.tokens,\n    MoonChipSizeProperties? sm,\n    MoonChipSizeProperties? md,\n  })  : sm = sm ??\n            MoonChipSizeProperties(\n              borderRadius: tokens.borders.interactiveXs,\n              gap: tokens.sizes.x4s,\n              height: tokens.sizes.sm,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              textStyle: tokens.typography.body.textDefault,\n            ),\n        md = md ??\n            MoonChipSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              gap: tokens.sizes.x4s,\n              height: tokens.sizes.md,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.symmetric(horizontal: tokens.sizes.x2s),\n              textStyle: tokens.typography.body.textDefault,\n            );\n\n  @override\n  MoonChipSizes copyWith({\n    MoonTokens? tokens,\n    MoonChipSizeProperties? sm,\n    MoonChipSizeProperties? md,\n  }) {\n    return MoonChipSizes(\n      tokens: tokens ?? this.tokens,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n    );\n  }\n\n  @override\n  MoonChipSizes lerp(ThemeExtension<MoonChipSizes>? other, double t) {\n    if (other is! MoonChipSizes) return this;\n\n    return MoonChipSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      sm: sm.lerp(other.sm, t),\n      md: md.lerp(other.md, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonChipSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonChipSizeProperties>(\"sm\", sm))\n      ..add(DiagnosticsProperty<MoonChipSizeProperties>(\"md\", md));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/chip/chip_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/chip/chip_colors.dart';\nimport 'package:moon_design/src/theme/chip/chip_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonChipTheme extends ThemeExtension<MoonChipTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonChip.\n  final MoonChipColors colors;\n\n  /// The sizes of the MoonChip.\n  final MoonChipSizes sizes;\n\n  MoonChipTheme({\n    required this.tokens,\n    MoonChipColors? colors,\n    MoonChipSizes? sizes,\n  })  : colors = colors ??\n            MoonChipColors(\n              activeColor: tokens.colors.piccolo,\n              backgroundColor: tokens.colors.goku,\n              activeBackgroundColor: tokens.colors.jiren,\n              textColor: tokens.colors.textPrimary,\n            ),\n        sizes = sizes ?? MoonChipSizes(tokens: tokens);\n\n  @override\n  MoonChipTheme copyWith({\n    MoonTokens? tokens,\n    MoonChipColors? colors,\n    MoonChipSizes? sizes,\n  }) {\n    return MoonChipTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonChipTheme lerp(ThemeExtension<MoonChipTheme>? other, double t) {\n    if (other is! MoonChipTheme) return this;\n\n    return MoonChipTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonChipTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonChipColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonChipSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/dot_indicator/dot_indicator_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonDotIndicatorColors extends ThemeExtension<MoonDotIndicatorColors>\n    with DiagnosticableTreeMixin {\n  /// The color of the selected MoonDotIndicator dot.\n  final Color selectedColor;\n\n  /// The color of the unselected MoonDotIndicator dot.\n  final Color unselectedColor;\n\n  const MoonDotIndicatorColors({\n    required this.selectedColor,\n    required this.unselectedColor,\n  });\n\n  @override\n  MoonDotIndicatorColors copyWith({\n    Color? selectedColor,\n    Color? unselectedColor,\n  }) {\n    return MoonDotIndicatorColors(\n      selectedColor: selectedColor ?? this.selectedColor,\n      unselectedColor: unselectedColor ?? this.unselectedColor,\n    );\n  }\n\n  @override\n  MoonDotIndicatorColors lerp(\n    ThemeExtension<MoonDotIndicatorColors>? other,\n    double t,\n  ) {\n    if (other is! MoonDotIndicatorColors) return this;\n\n    return MoonDotIndicatorColors(\n      selectedColor: colorPremulLerp(selectedColor, other.selectedColor, t)!,\n      unselectedColor: colorPremulLerp(\n        unselectedColor,\n        other.unselectedColor,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonDotIndicatorColors\"))\n      ..add(ColorProperty(\"selectedColor\", selectedColor))\n      ..add(ColorProperty(\"unselectedColor\", unselectedColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/dot_indicator/dot_indicator_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonDotIndicatorProperties\n    extends ThemeExtension<MoonDotIndicatorProperties>\n    with DiagnosticableTreeMixin {\n  /// The gap between the MoonDotIndicator dots.\n  final double gap;\n\n  /// The size of each MoonDotIndicator dot.\n  final double size;\n\n  /// The duration of the MoonDotIndicator transition animation.\n  final Duration transitionDuration;\n\n  /// The curve of the MoonDotIndicator transition animation.\n  final Curve transitionCurve;\n\n  const MoonDotIndicatorProperties({\n    required this.size,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.gap,\n  });\n\n  @override\n  MoonDotIndicatorProperties copyWith({\n    double? gap,\n    double? size,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n  }) {\n    return MoonDotIndicatorProperties(\n      gap: gap ?? this.gap,\n      size: size ?? this.size,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n    );\n  }\n\n  @override\n  MoonDotIndicatorProperties lerp(\n    ThemeExtension<MoonDotIndicatorProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonDotIndicatorProperties) return this;\n\n    return MoonDotIndicatorProperties(\n      gap: lerpDouble(gap, other.gap, t)!,\n      size: lerpDouble(size, other.size, t)!,\n      transitionDuration: lerpDuration(\n        transitionDuration,\n        other.transitionDuration,\n        t,\n      ),\n      transitionCurve: other.transitionCurve,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonDotIndicatorProperties\"),\n      )\n      ..add(\n        DoubleProperty(\"gap\", gap),\n      )\n      ..add(\n        DoubleProperty(\"size\", size),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/dot_indicator/dot_indicator_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/dot_indicator/dot_indicator_colors.dart';\nimport 'package:moon_design/src/theme/dot_indicator/dot_indicator_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonDotIndicatorTheme extends ThemeExtension<MoonDotIndicatorTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonDotIndicator.\n  final MoonDotIndicatorColors colors;\n\n  /// The properties of the MoonDotIndicator.\n  final MoonDotIndicatorProperties properties;\n\n  MoonDotIndicatorTheme({\n    required this.tokens,\n    MoonDotIndicatorColors? colors,\n    MoonDotIndicatorProperties? properties,\n  })  : colors = colors ??\n            MoonDotIndicatorColors(\n              selectedColor: tokens.colors.piccolo,\n              unselectedColor: tokens.colors.beerus,\n            ),\n        properties = properties ??\n            MoonDotIndicatorProperties(\n              gap: tokens.sizes.x4s,\n              size: tokens.sizes.x4s,\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n            );\n\n  @override\n  MoonDotIndicatorTheme copyWith({\n    MoonTokens? tokens,\n    MoonDotIndicatorColors? colors,\n    MoonDotIndicatorProperties? properties,\n  }) {\n    return MoonDotIndicatorTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonDotIndicatorTheme lerp(\n    ThemeExtension<MoonDotIndicatorTheme>? other,\n    double t,\n  ) {\n    if (other is! MoonDotIndicatorTheme) return this;\n\n    return MoonDotIndicatorTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonDotIndicatorTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonDotIndicatorColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonDotIndicatorProperties>(\n          \"properties\",\n          properties,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/drawer/drawer_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonDrawerColors extends ThemeExtension<MoonDrawerColors>\n    with DiagnosticableTreeMixin {\n  /// The text color of the MoonDrawer.\n  final Color textColor;\n\n  /// The icon color of the MoonDrawer.\n  final Color iconColor;\n\n  /// The background color of the MoonDrawer.\n  final Color backgroundColor;\n\n  const MoonDrawerColors({\n    required this.textColor,\n    required this.iconColor,\n    required this.backgroundColor,\n  });\n\n  @override\n  MoonDrawerColors copyWith({\n    Color? textColor,\n    Color? iconColor,\n    Color? backgroundColor,\n  }) {\n    return MoonDrawerColors(\n      textColor: textColor ?? this.textColor,\n      iconColor: iconColor ?? this.iconColor,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n    );\n  }\n\n  @override\n  MoonDrawerColors lerp(ThemeExtension<MoonDrawerColors>? other, double t) {\n    if (other is! MoonDrawerColors) return this;\n\n    return MoonDrawerColors(\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonDrawerColors\"))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/drawer/drawer_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonDrawerProperties extends ThemeExtension<MoonDrawerProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonDrawer.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The width of the MoonDrawer.\n  final double width;\n\n  /// The text style of the MoonDrawer.\n  final TextStyle textStyle;\n\n  const MoonDrawerProperties({\n    required this.borderRadius,\n    required this.width,\n    required this.textStyle,\n  });\n\n  @override\n  MoonDrawerProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? width,\n    TextStyle? textStyle,\n  }) {\n    return MoonDrawerProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      width: width ?? this.width,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonDrawerProperties lerp(\n    ThemeExtension<MoonDrawerProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonDrawerProperties) return this;\n\n    return MoonDrawerProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      width: lerpDouble(width, other.width, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonDrawerProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"width\", width),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/drawer/drawer_shadows.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonDrawerShadows extends ThemeExtension<MoonDrawerShadows>\n    with DiagnosticableTreeMixin {\n  /// The list of shadows applied to the MoonDrawer.\n  final List<BoxShadow> drawerShadows;\n\n  const MoonDrawerShadows({required this.drawerShadows});\n\n  @override\n  MoonDrawerShadows copyWith({List<BoxShadow>? drawerShadows}) {\n    return MoonDrawerShadows(\n      drawerShadows: drawerShadows ?? this.drawerShadows,\n    );\n  }\n\n  @override\n  MoonDrawerShadows lerp(ThemeExtension<MoonDrawerShadows>? other, double t) {\n    if (other is! MoonDrawerShadows) return this;\n\n    return MoonDrawerShadows(\n      drawerShadows: BoxShadow.lerpList(\n        drawerShadows,\n        other.drawerShadows,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonDrawerShadows\"),\n      )\n      ..add(\n        DiagnosticsProperty<List<BoxShadow>>(\"drawerShadows\", drawerShadows),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/drawer/drawer_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/drawer/drawer_colors.dart';\nimport 'package:moon_design/src/theme/drawer/drawer_properties.dart';\nimport 'package:moon_design/src/theme/drawer/drawer_shadows.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonDrawerTheme extends ThemeExtension<MoonDrawerTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonDrawer.\n  final MoonDrawerColors colors;\n\n  /// The properties of the MoonDrawer.\n  final MoonDrawerProperties properties;\n\n  /// The shadows of the MoonDrawer.\n  final MoonDrawerShadows shadows;\n\n  MoonDrawerTheme({\n    required this.tokens,\n    MoonDrawerColors? colors,\n    MoonDrawerProperties? properties,\n    MoonDrawerShadows? shadows,\n  })  : colors = colors ??\n            MoonDrawerColors(\n              textColor: tokens.colors.textPrimary,\n              iconColor: tokens.colors.iconPrimary,\n              backgroundColor: tokens.colors.goku,\n            ),\n        properties = properties ??\n            MoonDrawerProperties(\n              borderRadius: BorderRadius.zero,\n              width: 448,\n              textStyle: tokens.typography.body.textDefault,\n            ),\n        shadows =\n            shadows ?? MoonDrawerShadows(drawerShadows: tokens.shadows.lg);\n\n  @override\n  MoonDrawerTheme copyWith({\n    MoonTokens? tokens,\n    MoonDrawerColors? colors,\n    MoonDrawerProperties? properties,\n    MoonDrawerShadows? shadows,\n  }) {\n    return MoonDrawerTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      shadows: shadows ?? this.shadows,\n    );\n  }\n\n  @override\n  MoonDrawerTheme lerp(ThemeExtension<MoonDrawerTheme>? other, double t) {\n    if (other is! MoonDrawerTheme) return this;\n\n    return MoonDrawerTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      shadows: shadows.lerp(other.shadows, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonDrawerTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonDrawerColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonDrawerProperties>(\"properties\", properties))\n      ..add(DiagnosticsProperty<MoonDrawerShadows>(\"shadows\", shadows));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/dropdown/dropdown_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonDropdownColors extends ThemeExtension<MoonDropdownColors>\n    with DiagnosticableTreeMixin {\n  /// The text color of the MoonDropdown.\n  final Color textColor;\n\n  /// The icon color of the MoonDropdown.\n  final Color iconColor;\n\n  /// The background color of the MoonDropdown.\n  final Color backgroundColor;\n\n  const MoonDropdownColors({\n    required this.textColor,\n    required this.iconColor,\n    required this.backgroundColor,\n  });\n\n  @override\n  MoonDropdownColors copyWith({\n    Color? textColor,\n    Color? iconColor,\n    Color? backgroundColor,\n  }) {\n    return MoonDropdownColors(\n      textColor: textColor ?? this.textColor,\n      iconColor: iconColor ?? this.iconColor,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n    );\n  }\n\n  @override\n  MoonDropdownColors lerp(ThemeExtension<MoonDropdownColors>? other, double t) {\n    if (other is! MoonDropdownColors) return this;\n\n    return MoonDropdownColors(\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonDropdownColors\"))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/dropdown/dropdown_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonDropdownProperties extends ThemeExtension<MoonDropdownProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonDropdown.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The distance between the MoonDropdown and the target child widget.\n  final double distanceToTarget;\n\n  /// The duration of the MoonDropdown transition animation (fade in or out).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonDropdown transition animation (fade in or out).\n  final Curve transitionCurve;\n\n  /// The padding of the MoonDropdown content.\n  final EdgeInsetsGeometry contentPadding;\n\n  /// The margin of the MoonDropdown.\n  final EdgeInsetsGeometry dropdownMargin;\n\n  /// The text style of the MoonDropdown.\n  final TextStyle textStyle;\n\n  const MoonDropdownProperties({\n    required this.borderRadius,\n    required this.distanceToTarget,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.contentPadding,\n    required this.dropdownMargin,\n    required this.textStyle,\n  });\n\n  @override\n  MoonDropdownProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? distanceToTarget,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    EdgeInsetsGeometry? contentPadding,\n    EdgeInsetsGeometry? dropdownMargin,\n    TextStyle? textStyle,\n  }) {\n    return MoonDropdownProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      distanceToTarget: distanceToTarget ?? this.distanceToTarget,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      contentPadding: contentPadding ?? this.contentPadding,\n      dropdownMargin: dropdownMargin ?? this.dropdownMargin,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonDropdownProperties lerp(\n    ThemeExtension<MoonDropdownProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonDropdownProperties) return this;\n\n    return MoonDropdownProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      distanceToTarget:\n          lerpDouble(distanceToTarget, other.distanceToTarget, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      contentPadding:\n          EdgeInsetsGeometry.lerp(contentPadding, other.contentPadding, t)!,\n      dropdownMargin:\n          EdgeInsetsGeometry.lerp(dropdownMargin, other.dropdownMargin, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonDropdownProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"distanceToTarget\", distanceToTarget),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\n          \"contentPadding\",\n          contentPadding,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\n          \"dropdownMargin\",\n          dropdownMargin,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"textStyle\",\n          textStyle,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/dropdown/dropdown_shadows.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonDropdownShadows extends ThemeExtension<MoonDropdownShadows>\n    with DiagnosticableTreeMixin {\n  /// The list of shadows applied to the MoonDropdown.\n  final List<BoxShadow> dropdownShadows;\n\n  const MoonDropdownShadows({required this.dropdownShadows});\n\n  @override\n  MoonDropdownShadows copyWith({List<BoxShadow>? dropdownShadows}) {\n    return MoonDropdownShadows(\n      dropdownShadows: dropdownShadows ?? this.dropdownShadows,\n    );\n  }\n\n  @override\n  MoonDropdownShadows lerp(\n    ThemeExtension<MoonDropdownShadows>? other,\n    double t,\n  ) {\n    if (other is! MoonDropdownShadows) return this;\n\n    return MoonDropdownShadows(\n      dropdownShadows: BoxShadow.lerpList(\n        dropdownShadows,\n        other.dropdownShadows,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\n          \"type\",\n          \"MoonDropdownShadows\",\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<List<BoxShadow>>(\n          \"dropdownShadows\",\n          dropdownShadows,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/dropdown/dropdown_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/dropdown/dropdown_colors.dart';\nimport 'package:moon_design/src/theme/dropdown/dropdown_properties.dart';\nimport 'package:moon_design/src/theme/dropdown/dropdown_shadows.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonDropdownTheme extends ThemeExtension<MoonDropdownTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonDropdown.\n  final MoonDropdownColors colors;\n\n  /// The properties of the MoonDropdown.\n  final MoonDropdownProperties properties;\n\n  /// The shadows of the MoonDropdown.\n  final MoonDropdownShadows shadows;\n\n  MoonDropdownTheme({\n    required this.tokens,\n    MoonDropdownColors? colors,\n    MoonDropdownProperties? properties,\n    MoonDropdownShadows? shadows,\n  })  : colors = colors ??\n            MoonDropdownColors(\n              textColor: tokens.colors.textPrimary,\n              iconColor: tokens.colors.iconPrimary,\n              backgroundColor: tokens.colors.goku,\n            ),\n        properties = properties ??\n            MoonDropdownProperties(\n              borderRadius: tokens.borders.interactiveMd,\n              distanceToTarget: tokens.sizes.x4s,\n              transitionDuration: Duration.zero,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n              contentPadding: EdgeInsets.all(tokens.sizes.x5s),\n              dropdownMargin: EdgeInsets.all(tokens.sizes.x4s),\n              textStyle: tokens.typography.body.textDefault,\n            ),\n        shadows =\n            shadows ?? MoonDropdownShadows(dropdownShadows: tokens.shadows.sm);\n\n  @override\n  MoonDropdownTheme copyWith({\n    MoonTokens? tokens,\n    MoonDropdownColors? colors,\n    MoonDropdownProperties? properties,\n    MoonDropdownShadows? shadows,\n  }) {\n    return MoonDropdownTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      shadows: shadows ?? this.shadows,\n    );\n  }\n\n  @override\n  MoonDropdownTheme lerp(ThemeExtension<MoonDropdownTheme>? other, double t) {\n    if (other is! MoonDropdownTheme) return this;\n\n    return MoonDropdownTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      shadows: shadows.lerp(other.shadows, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonDropdownTheme\"),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTokens>(\"tokens\", tokens),\n      )\n      ..add(\n        DiagnosticsProperty<MoonDropdownColors>(\"colors\", colors),\n      )\n      ..add(\n        DiagnosticsProperty<MoonDropdownProperties>(\"properties\", properties),\n      )\n      ..add(\n        DiagnosticsProperty<MoonDropdownShadows>(\"shadows\", shadows),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/effects/control_effect.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonControlEffect extends ThemeExtension<MoonControlEffect>\n    with DiagnosticableTreeMixin {\n  /// The effect color of the control.\n  final Color? effectColor;\n\n  /// The effect duration of the control.\n  final Duration effectDuration;\n\n  /// The effect curve of the control.\n  final Curve effectCurve;\n\n  /// The effect extent of the control.\n  final double? effectExtent;\n\n  /// The effect scalar of the control.\n  final double? effectScalar;\n\n  const MoonControlEffect({\n    this.effectColor,\n    required this.effectDuration,\n    required this.effectCurve,\n    this.effectExtent,\n    this.effectScalar,\n  });\n\n  @override\n  MoonControlEffect copyWith({\n    Color? effectColor,\n    Duration? effectDuration,\n    Curve? effectCurve,\n    double? effectExtent,\n    double? effectScalar,\n  }) {\n    return MoonControlEffect(\n      effectColor: effectColor ?? this.effectColor,\n      effectDuration: effectDuration ?? this.effectDuration,\n      effectCurve: effectCurve ?? this.effectCurve,\n      effectExtent: effectExtent ?? this.effectExtent,\n      effectScalar: effectScalar ?? this.effectScalar,\n    );\n  }\n\n  @override\n  MoonControlEffect lerp(ThemeExtension<MoonControlEffect>? other, double t) {\n    if (other is! MoonControlEffect) return this;\n\n    return MoonControlEffect(\n      effectColor: colorPremulLerp(effectColor, other.effectColor, t),\n      effectDuration: lerpDuration(effectDuration, other.effectDuration, t),\n      effectCurve: other.effectCurve,\n      effectExtent: lerpDouble(effectExtent, other.effectExtent, t),\n      effectScalar: lerpDouble(effectScalar, other.effectScalar, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonControlsEffects\"))\n      ..add(ColorProperty(\"effectColor\", effectColor))\n      ..add(DiagnosticsProperty<Duration>(\"effectDuration\", effectDuration))\n      ..add(DiagnosticsProperty<Curve>(\"effectCurve\", effectCurve))\n      ..add(DoubleProperty(\"effectExtent\", effectExtent))\n      ..add(DoubleProperty(\"effectScalar\", effectScalar));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/effects/effects_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/effects/control_effect.dart';\nimport 'package:moon_design/src/theme/effects/focus_effect.dart';\nimport 'package:moon_design/src/theme/effects/hover_effect.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonEffectsTheme extends ThemeExtension<MoonEffectsTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The focus effect properties of the control widgets.\n  final MoonFocusEffect controlFocusEffect;\n\n  /// The hover effect properties of the control widgets.\n  final MoonHoverEffect controlHoverEffect;\n\n  /// The pulse effect properties of the control widgets.\n  final MoonControlEffect controlPulseEffect;\n\n  /// The scale effect properties of the control widgets.\n  final MoonControlEffect controlScaleEffect;\n\n  MoonEffectsTheme({\n    required this.tokens,\n    MoonFocusEffect? controlFocusEffect,\n    MoonHoverEffect? controlHoverEffect,\n    MoonControlEffect? controlPulseEffect,\n    MoonControlEffect? controlScaleEffect,\n  })  : controlFocusEffect = controlFocusEffect ??\n            MoonFocusEffect(\n              effectColor: tokens.colors.bulma.withOpacity(0.25),\n              effectExtent: 4,\n              effectDuration: tokens.transitions.defaultTransitionDuration,\n              effectCurve: tokens.transitions.defaultTransitionCurve,\n            ),\n        controlHoverEffect = controlHoverEffect ??\n            MoonHoverEffect(\n              primaryHoverColor: tokens.colors.heles,\n              secondaryHoverColor: tokens.colors.jiren,\n              hoverDuration: tokens.transitions.defaultTransitionDuration,\n              hoverCurve: tokens.transitions.defaultTransitionCurve,\n            ),\n        controlPulseEffect = controlPulseEffect ??\n            MoonControlEffect(\n              effectColor: tokens.colors.piccolo,\n              effectDuration: const Duration(milliseconds: 1400),\n              effectCurve: tokens.transitions.defaultTransitionCurve,\n              effectExtent: 24,\n            ),\n        controlScaleEffect = controlScaleEffect ??\n            MoonControlEffect(\n              effectDuration: tokens.transitions.defaultTransitionDuration,\n              effectCurve: tokens.transitions.defaultTransitionCurve,\n              effectScalar: 0.95,\n            );\n\n  @override\n  MoonEffectsTheme copyWith({\n    MoonTokens? tokens,\n    MoonFocusEffect? controlFocusEffect,\n    MoonHoverEffect? controlHoverEffect,\n    MoonControlEffect? controlPulseEffect,\n    MoonControlEffect? controlScaleEffect,\n  }) {\n    return MoonEffectsTheme(\n      tokens: tokens ?? this.tokens,\n      controlFocusEffect: controlFocusEffect ?? this.controlFocusEffect,\n      controlHoverEffect: controlHoverEffect ?? this.controlHoverEffect,\n      controlPulseEffect: controlPulseEffect ?? this.controlPulseEffect,\n      controlScaleEffect: controlScaleEffect ?? this.controlScaleEffect,\n    );\n  }\n\n  @override\n  MoonEffectsTheme lerp(ThemeExtension<MoonEffectsTheme>? other, double t) {\n    if (other is! MoonEffectsTheme) return this;\n\n    return MoonEffectsTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      controlFocusEffect: controlFocusEffect.lerp(other.controlFocusEffect, t),\n      controlHoverEffect: controlHoverEffect.lerp(other.controlHoverEffect, t),\n      controlScaleEffect: controlScaleEffect.lerp(other.controlScaleEffect, t),\n      controlPulseEffect: controlPulseEffect.lerp(other.controlPulseEffect, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonEffectsTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(\n        DiagnosticsProperty<MoonControlEffect>(\n          \"controlScaleEffect\",\n          controlScaleEffect,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonControlEffect>(\n          \"controlPulseEffect\",\n          controlPulseEffect,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonFocusEffect>(\n          \"controlFocusEffect\",\n          controlFocusEffect,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonHoverEffect>(\n          \"controlHoverEffect\",\n          controlHoverEffect,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/effects/focus_effect.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonFocusEffect extends ThemeExtension<MoonFocusEffect>\n    with DiagnosticableTreeMixin {\n  /// The color of the focus effect.\n  final Color effectColor;\n\n  /// The extent of the focus effect.\n  final double effectExtent;\n\n  /// The duration of the focus effect.\n  final Duration effectDuration;\n\n  /// The curve of the focus effect.\n  final Curve effectCurve;\n\n  const MoonFocusEffect({\n    required this.effectColor,\n    required this.effectExtent,\n    required this.effectDuration,\n    required this.effectCurve,\n  });\n\n  @override\n  MoonFocusEffect copyWith({\n    Color? effectColor,\n    double? effectExtent,\n    Duration? effectDuration,\n    Curve? effectCurve,\n  }) {\n    return MoonFocusEffect(\n      effectColor: effectColor ?? this.effectColor,\n      effectExtent: effectExtent ?? this.effectExtent,\n      effectDuration: effectDuration ?? this.effectDuration,\n      effectCurve: effectCurve ?? this.effectCurve,\n    );\n  }\n\n  @override\n  MoonFocusEffect lerp(ThemeExtension<MoonFocusEffect>? other, double t) {\n    if (other is! MoonFocusEffect) return this;\n\n    return MoonFocusEffect(\n      effectColor: colorPremulLerp(effectColor, other.effectColor, t)!,\n      effectExtent: lerpDouble(effectExtent, other.effectExtent, t)!,\n      effectDuration: lerpDuration(effectDuration, other.effectDuration, t),\n      effectCurve: other.effectCurve,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonFocusEffects\"))\n      ..add(ColorProperty(\"effectColor\", effectColor))\n      ..add(DoubleProperty(\"effectExtent\", effectExtent))\n      ..add(DiagnosticsProperty<Duration>(\"effectDuration\", effectDuration))\n      ..add(DiagnosticsProperty<Curve>(\"effectCurve\", effectCurve));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/effects/hover_effect.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonHoverEffect extends ThemeExtension<MoonHoverEffect>\n    with DiagnosticableTreeMixin {\n  /// The color of the primary hover effect.\n  final Color primaryHoverColor;\n\n  /// The color of the secondary hover effect.\n  final Color secondaryHoverColor;\n\n  /// The duration of the hover effect.\n  final Duration hoverDuration;\n\n  /// The curve of the hover effect.\n  final Curve hoverCurve;\n\n  const MoonHoverEffect({\n    required this.primaryHoverColor,\n    required this.secondaryHoverColor,\n    required this.hoverDuration,\n    required this.hoverCurve,\n  });\n\n  @override\n  MoonHoverEffect copyWith({\n    Color? primaryHoverColor,\n    Color? secondaryHoverColor,\n    Duration? hoverDuration,\n    Curve? hoverCurve,\n  }) {\n    return MoonHoverEffect(\n      primaryHoverColor: primaryHoverColor ?? this.primaryHoverColor,\n      secondaryHoverColor: secondaryHoverColor ?? this.secondaryHoverColor,\n      hoverDuration: hoverDuration ?? this.hoverDuration,\n      hoverCurve: hoverCurve ?? this.hoverCurve,\n    );\n  }\n\n  @override\n  MoonHoverEffect lerp(ThemeExtension<MoonHoverEffect>? other, double t) {\n    if (other is! MoonHoverEffect) return this;\n\n    return MoonHoverEffect(\n      primaryHoverColor:\n          colorPremulLerp(primaryHoverColor, other.primaryHoverColor, t)!,\n      secondaryHoverColor:\n          colorPremulLerp(secondaryHoverColor, other.secondaryHoverColor, t)!,\n      hoverDuration: lerpDuration(hoverDuration, other.hoverDuration, t),\n      hoverCurve: other.hoverCurve,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonHoverEffects\"))\n      ..add(ColorProperty(\"primaryHoverColor\", primaryHoverColor))\n      ..add(ColorProperty(\"secondaryHoverColor\", secondaryHoverColor))\n      ..add(DiagnosticsProperty<Duration>(\"hoverDuration\", hoverDuration))\n      ..add(DiagnosticsProperty<Curve>(\"hoverCurve\", hoverCurve));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/loaders/circular_loader/circular_loader_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonCircularLoaderColors extends ThemeExtension<MoonCircularLoaderColors>\n    with DiagnosticableTreeMixin {\n  /// The color of the MoonCircularLoader.\n  final Color color;\n\n  /// The background color of the MoonCircularLoader.\n  final Color backgroundColor;\n\n  const MoonCircularLoaderColors({\n    required this.color,\n    required this.backgroundColor,\n  });\n\n  @override\n  MoonCircularLoaderColors copyWith({\n    Color? color,\n    Color? backgroundColor,\n  }) {\n    return MoonCircularLoaderColors(\n      color: color ?? this.color,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n    );\n  }\n\n  @override\n  MoonCircularLoaderColors lerp(\n    ThemeExtension<MoonCircularLoaderColors>? other,\n    double t,\n  ) {\n    if (other is! MoonCircularLoaderColors) return this;\n\n    return MoonCircularLoaderColors(\n      color: colorPremulLerp(color, other.color, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCircularLoaderColors\"))\n      ..add(ColorProperty(\"color\", color))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/loaders/circular_loader/circular_loader_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonCircularLoaderSizeProperties\n    extends ThemeExtension<MoonCircularLoaderSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The size value of the MoonCircularLoader.\n  final double loaderSizeValue;\n\n  /// The stroke width of the MoonCircularLoader.\n  final double loaderStrokeWidth;\n\n  const MoonCircularLoaderSizeProperties({\n    required this.loaderSizeValue,\n    required this.loaderStrokeWidth,\n  });\n\n  @override\n  MoonCircularLoaderSizeProperties copyWith({\n    double? loaderSizeValue,\n    double? loaderStrokeWidth,\n  }) {\n    return MoonCircularLoaderSizeProperties(\n      loaderSizeValue: loaderSizeValue ?? this.loaderSizeValue,\n      loaderStrokeWidth: loaderStrokeWidth ?? this.loaderStrokeWidth,\n    );\n  }\n\n  @override\n  MoonCircularLoaderSizeProperties lerp(\n    ThemeExtension<MoonCircularLoaderSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonCircularLoaderSizeProperties) return this;\n\n    return MoonCircularLoaderSizeProperties(\n      loaderSizeValue: lerpDouble(loaderSizeValue, other.loaderSizeValue, t)!,\n      loaderStrokeWidth:\n          lerpDouble(loaderStrokeWidth, other.loaderStrokeWidth, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCircularLoaderSizeProperties\"))\n      ..add(DoubleProperty(\"loaderSizeValue\", loaderSizeValue))\n      ..add(DoubleProperty(\"loaderStrokeWidth\", loaderStrokeWidth));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/loaders/circular_loader/circular_loader_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/loaders/circular_loader/circular_loader_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonCircularLoaderSizes extends ThemeExtension<MoonCircularLoaderSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the (2x) extra small MoonCircularLoader.\n  final MoonCircularLoaderSizeProperties x2s;\n\n  /// The properties of the extra small MoonCircularLoader.\n  final MoonCircularLoaderSizeProperties xs;\n\n  /// The properties of the small MoonCircularLoader.\n  final MoonCircularLoaderSizeProperties sm;\n\n  /// The properties of the medium MoonCircularLoader.\n  final MoonCircularLoaderSizeProperties md;\n\n  /// The properties of the large MoonCircularLoader.\n  final MoonCircularLoaderSizeProperties lg;\n\n  MoonCircularLoaderSizes({\n    required this.tokens,\n    MoonCircularLoaderSizeProperties? x2s,\n    MoonCircularLoaderSizeProperties? xs,\n    MoonCircularLoaderSizeProperties? sm,\n    MoonCircularLoaderSizeProperties? md,\n    MoonCircularLoaderSizeProperties? lg,\n  })  : x2s = x2s ??\n            MoonCircularLoaderSizeProperties(\n              loaderSizeValue: tokens.sizes.x2s,\n              loaderStrokeWidth: tokens.sizes.x6s,\n            ),\n        xs = xs ??\n            MoonCircularLoaderSizeProperties(\n              loaderSizeValue: tokens.sizes.xs,\n              loaderStrokeWidth: tokens.sizes.x6s,\n            ),\n        sm = sm ??\n            MoonCircularLoaderSizeProperties(\n              loaderSizeValue: tokens.sizes.sm,\n              loaderStrokeWidth: tokens.sizes.x6s,\n            ),\n        md = md ??\n            MoonCircularLoaderSizeProperties(\n              loaderSizeValue: tokens.sizes.md,\n              loaderStrokeWidth: tokens.sizes.x5s,\n            ),\n        lg = lg ??\n            MoonCircularLoaderSizeProperties(\n              loaderSizeValue: tokens.sizes.lg,\n              loaderStrokeWidth: tokens.sizes.x5s,\n            );\n\n  @override\n  MoonCircularLoaderSizes copyWith({\n    MoonTokens? tokens,\n    MoonCircularLoaderSizeProperties? x2s,\n    MoonCircularLoaderSizeProperties? xs,\n    MoonCircularLoaderSizeProperties? sm,\n    MoonCircularLoaderSizeProperties? md,\n    MoonCircularLoaderSizeProperties? lg,\n  }) {\n    return MoonCircularLoaderSizes(\n      tokens: tokens ?? this.tokens,\n      x2s: x2s ?? this.x2s,\n      xs: xs ?? this.xs,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n      lg: lg ?? this.lg,\n    );\n  }\n\n  @override\n  MoonCircularLoaderSizes lerp(\n    ThemeExtension<MoonCircularLoaderSizes>? other,\n    double t,\n  ) {\n    if (other is! MoonCircularLoaderSizes) return this;\n\n    return MoonCircularLoaderSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      x2s: x2s.lerp(other.x2s, t),\n      xs: xs.lerp(other.xs, t),\n      sm: sm.lerp(other.sm, t),\n      md: md.lerp(other.md, t),\n      lg: lg.lerp(other.lg, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCircularLoaderSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonCircularLoaderSizeProperties>(\"x2s\", x2s))\n      ..add(DiagnosticsProperty<MoonCircularLoaderSizeProperties>(\"xs\", xs))\n      ..add(DiagnosticsProperty<MoonCircularLoaderSizeProperties>(\"sm\", sm))\n      ..add(DiagnosticsProperty<MoonCircularLoaderSizeProperties>(\"md\", md))\n      ..add(DiagnosticsProperty<MoonCircularLoaderSizeProperties>(\"lg\", lg));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/loaders/circular_loader/circular_loader_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/loaders/circular_loader/circular_loader_colors.dart';\nimport 'package:moon_design/src/theme/loaders/circular_loader/circular_loader_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonCircularLoaderTheme extends ThemeExtension<MoonCircularLoaderTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonCircularLoader.\n  final MoonCircularLoaderColors colors;\n\n  /// The sizes of the MoonCircularLoader.\n  final MoonCircularLoaderSizes sizes;\n\n  MoonCircularLoaderTheme({\n    required this.tokens,\n    MoonCircularLoaderColors? colors,\n    MoonCircularLoaderSizes? sizes,\n  })  : colors = colors ??\n            MoonCircularLoaderColors(\n              color: tokens.colors.piccolo,\n              backgroundColor: Colors.transparent,\n            ),\n        sizes = sizes ?? MoonCircularLoaderSizes(tokens: tokens);\n\n  @override\n  MoonCircularLoaderTheme copyWith({\n    MoonTokens? tokens,\n    MoonCircularLoaderColors? colors,\n    MoonCircularLoaderSizes? sizes,\n  }) {\n    return MoonCircularLoaderTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonCircularLoaderTheme lerp(\n    ThemeExtension<MoonCircularLoaderTheme>? other,\n    double t,\n  ) {\n    if (other is! MoonCircularLoaderTheme) return this;\n\n    return MoonCircularLoaderTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCircularLoaderTheme\"))\n      ..add(DiagnosticsProperty<MoonCircularLoaderColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonCircularLoaderSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/loaders/linear_loader/linear_loader_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonLinearLoaderColors extends ThemeExtension<MoonLinearLoaderColors>\n    with DiagnosticableTreeMixin {\n  /// The color of the MoonLinearLoader.\n  final Color color;\n\n  /// The background color of the MoonLinearLoader.\n  final Color backgroundColor;\n\n  const MoonLinearLoaderColors({\n    required this.color,\n    required this.backgroundColor,\n  });\n\n  @override\n  MoonLinearLoaderColors copyWith({\n    Color? color,\n    Color? backgroundColor,\n  }) {\n    return MoonLinearLoaderColors(\n      color: color ?? this.color,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n    );\n  }\n\n  @override\n  MoonLinearLoaderColors lerp(\n    ThemeExtension<MoonLinearLoaderColors>? other,\n    double t,\n  ) {\n    if (other is! MoonLinearLoaderColors) return this;\n\n    return MoonLinearLoaderColors(\n      color: colorPremulLerp(color, other.color, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonLinearLoaderColors\"))\n      ..add(ColorProperty(\"color\", color))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/loaders/linear_loader/linear_loader_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonLinearLoaderSizeProperties\n    extends ThemeExtension<MoonLinearLoaderSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonLinearLoader.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The height of the MoonLinearLoader.\n  final double loaderHeight;\n\n  const MoonLinearLoaderSizeProperties({\n    required this.borderRadius,\n    required this.loaderHeight,\n  });\n\n  @override\n  MoonLinearLoaderSizeProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? loaderHeight,\n  }) {\n    return MoonLinearLoaderSizeProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      loaderHeight: loaderHeight ?? this.loaderHeight,\n    );\n  }\n\n  @override\n  MoonLinearLoaderSizeProperties lerp(\n    ThemeExtension<MoonLinearLoaderSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonLinearLoaderSizeProperties) return this;\n\n    return MoonLinearLoaderSizeProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      loaderHeight: lerpDouble(loaderHeight, other.loaderHeight, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonLinearLoaderSizeProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"loaderHeight\", loaderHeight),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/loaders/linear_loader/linear_loader_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/loaders/linear_loader/linear_loader_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonLinearLoaderSizes extends ThemeExtension<MoonLinearLoaderSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the (6x) extra small MoonLinearLoader.\n  final MoonLinearLoaderSizeProperties x6s;\n\n  /// The properties of the (5x) extra small MoonLinearLoader.\n  final MoonLinearLoaderSizeProperties x5s;\n\n  /// The properties of the (4x) extra small MoonLinearLoader.\n  final MoonLinearLoaderSizeProperties x4s;\n\n  /// The properties of the (3x) extra small MoonLinearLoader.\n  final MoonLinearLoaderSizeProperties x3s;\n\n  /// The properties of the (2x) extra small MoonLinearLoader.\n  final MoonLinearLoaderSizeProperties x2s;\n\n  MoonLinearLoaderSizes({\n    required this.tokens,\n    MoonLinearLoaderSizeProperties? x6s,\n    MoonLinearLoaderSizeProperties? x5s,\n    MoonLinearLoaderSizeProperties? x4s,\n    MoonLinearLoaderSizeProperties? x3s,\n    MoonLinearLoaderSizeProperties? x2s,\n  })  : x6s = x6s ??\n            MoonLinearLoaderSizeProperties(\n              borderRadius: tokens.borders.surfaceXs,\n              loaderHeight: tokens.sizes.x6s,\n            ),\n        x5s = x5s ??\n            MoonLinearLoaderSizeProperties(\n              borderRadius: tokens.borders.surfaceXs,\n              loaderHeight: tokens.sizes.x5s,\n            ),\n        x4s = x4s ??\n            MoonLinearLoaderSizeProperties(\n              borderRadius: tokens.borders.surfaceSm,\n              loaderHeight: tokens.sizes.x4s,\n            ),\n        x3s = x3s ??\n            MoonLinearLoaderSizeProperties(\n              borderRadius: tokens.borders.surfaceMd,\n              loaderHeight: tokens.sizes.x3s,\n            ),\n        x2s = x2s ??\n            MoonLinearLoaderSizeProperties(\n              borderRadius: tokens.borders.surfaceLg,\n              loaderHeight: tokens.sizes.x2s,\n            );\n\n  @override\n  MoonLinearLoaderSizes copyWith({\n    MoonTokens? tokens,\n    MoonLinearLoaderSizeProperties? x6s,\n    MoonLinearLoaderSizeProperties? x5s,\n    MoonLinearLoaderSizeProperties? x4s,\n    MoonLinearLoaderSizeProperties? x3s,\n    MoonLinearLoaderSizeProperties? x2s,\n  }) {\n    return MoonLinearLoaderSizes(\n      tokens: tokens ?? this.tokens,\n      x6s: x6s ?? this.x6s,\n      x5s: x5s ?? this.x5s,\n      x4s: x4s ?? this.x4s,\n      x3s: x3s ?? this.x3s,\n      x2s: x2s ?? this.x2s,\n    );\n  }\n\n  @override\n  MoonLinearLoaderSizes lerp(\n    ThemeExtension<MoonLinearLoaderSizes>? other,\n    double t,\n  ) {\n    if (other is! MoonLinearLoaderSizes) return this;\n\n    return MoonLinearLoaderSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      x6s: x6s.lerp(other.x6s, t),\n      x5s: x5s.lerp(other.x5s, t),\n      x4s: x4s.lerp(other.x4s, t),\n      x3s: x3s.lerp(other.x3s, t),\n      x2s: x2s.lerp(other.x2s, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonLinearLoaderSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonLinearLoaderSizeProperties>(\"x6s\", x6s))\n      ..add(DiagnosticsProperty<MoonLinearLoaderSizeProperties>(\"x5s\", x5s))\n      ..add(DiagnosticsProperty<MoonLinearLoaderSizeProperties>(\"x4s\", x4s))\n      ..add(DiagnosticsProperty<MoonLinearLoaderSizeProperties>(\"x3s\", x3s))\n      ..add(DiagnosticsProperty<MoonLinearLoaderSizeProperties>(\"x2s\", x2s));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/loaders/linear_loader/linear_loader_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/loaders/linear_loader/linear_loader_colors.dart';\nimport 'package:moon_design/src/theme/loaders/linear_loader/linear_loader_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonLinearLoaderTheme extends ThemeExtension<MoonLinearLoaderTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonLinearLoader.\n  final MoonLinearLoaderColors colors;\n\n  /// The sizes of the MoonLinearLoader.\n  final MoonLinearLoaderSizes sizes;\n\n  MoonLinearLoaderTheme({\n    required this.tokens,\n    MoonLinearLoaderColors? colors,\n    MoonLinearLoaderSizes? sizes,\n  })  : colors = colors ??\n            MoonLinearLoaderColors(\n              color: tokens.colors.piccolo,\n              backgroundColor: Colors.transparent,\n            ),\n        sizes = sizes ?? MoonLinearLoaderSizes(tokens: tokens);\n\n  @override\n  MoonLinearLoaderTheme copyWith({\n    MoonTokens? tokens,\n    MoonLinearLoaderColors? colors,\n    MoonLinearLoaderSizes? sizes,\n  }) {\n    return MoonLinearLoaderTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonLinearLoaderTheme lerp(\n    ThemeExtension<MoonLinearLoaderTheme>? other,\n    double t,\n  ) {\n    if (other is! MoonLinearLoaderTheme) return this;\n\n    return MoonLinearLoaderTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonLinearLoaderTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonLinearLoaderColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonLinearLoaderSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/menu_item/menu_item_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonMenuItemColors extends ThemeExtension<MoonMenuItemColors>\n    with DiagnosticableTreeMixin {\n  /// The background color of the MoonMenuItem.\n  final Color backgroundColor;\n\n  /// The color of the MoonMenuItem divider.\n  final Color dividerColor;\n\n  /// The icon color of the MoonMenuItem.\n  final Color iconColor;\n\n  /// The text color of the MoonMenuItem label.\n  final Color labelTextColor;\n\n  /// The text color of the MoonMenuItem content.\n  final Color contentTextColor;\n\n  const MoonMenuItemColors({\n    required this.backgroundColor,\n    required this.dividerColor,\n    required this.iconColor,\n    required this.labelTextColor,\n    required this.contentTextColor,\n  });\n\n  @override\n  MoonMenuItemColors copyWith({\n    Color? backgroundColor,\n    Color? dividerColor,\n    Color? iconColor,\n    Color? labelTextColor,\n    Color? contentTextColor,\n  }) {\n    return MoonMenuItemColors(\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      dividerColor: dividerColor ?? this.dividerColor,\n      iconColor: iconColor ?? this.iconColor,\n      labelTextColor: labelTextColor ?? this.labelTextColor,\n      contentTextColor: contentTextColor ?? this.contentTextColor,\n    );\n  }\n\n  @override\n  MoonMenuItemColors lerp(ThemeExtension<MoonMenuItemColors>? other, double t) {\n    if (other is! MoonMenuItemColors) return this;\n\n    return MoonMenuItemColors(\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      dividerColor: colorPremulLerp(dividerColor, other.dividerColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      labelTextColor: colorPremulLerp(labelTextColor, other.labelTextColor, t)!,\n      contentTextColor:\n          colorPremulLerp(contentTextColor, other.contentTextColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonMenuItemColors\"))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor))\n      ..add(ColorProperty(\"dividerColor\", dividerColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"labelTextColor\", labelTextColor))\n      ..add(ColorProperty(\"contentTextColor\", contentTextColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/menu_item/menu_item_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonMenuItemProperties extends ThemeExtension<MoonMenuItemProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonMenuItem.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The vertical gap between the label and content widgets of the MoonMenuItem.\n  final double verticalGap;\n\n  /// The minimum height of the MoonMenuItem.\n  final double minimumHeight;\n\n  /// The padding of the MoonMenuItem.\n  final EdgeInsetsGeometry padding;\n\n  /// The text style of the MoonMenuItem label.\n  final TextStyle labelTextStyle;\n\n  /// The text style of the MoonMenuItem content.\n  final TextStyle contentTextStyle;\n\n  const MoonMenuItemProperties({\n    required this.borderRadius,\n    required this.verticalGap,\n    required this.minimumHeight,\n    required this.padding,\n    required this.labelTextStyle,\n    required this.contentTextStyle,\n  });\n\n  @override\n  MoonMenuItemProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? verticalGap,\n    double? minimumHeight,\n    EdgeInsetsGeometry? padding,\n    TextStyle? labelTextStyle,\n    TextStyle? contentTextStyle,\n  }) {\n    return MoonMenuItemProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      verticalGap: verticalGap ?? this.verticalGap,\n      minimumHeight: minimumHeight ?? this.minimumHeight,\n      padding: padding ?? this.padding,\n      labelTextStyle: labelTextStyle ?? this.labelTextStyle,\n      contentTextStyle: contentTextStyle ?? this.contentTextStyle,\n    );\n  }\n\n  @override\n  MoonMenuItemProperties lerp(\n    ThemeExtension<MoonMenuItemProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonMenuItemProperties) return this;\n\n    return MoonMenuItemProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      verticalGap: lerpDouble(verticalGap, other.verticalGap, t)!,\n      minimumHeight: lerpDouble(minimumHeight, other.minimumHeight, t)!,\n      padding: EdgeInsetsGeometry.lerp(padding, other.padding, t)!,\n      labelTextStyle: TextStyle.lerp(labelTextStyle, other.labelTextStyle, t)!,\n      contentTextStyle:\n          TextStyle.lerp(contentTextStyle, other.contentTextStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonMenuItemProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"verticalGap\", verticalGap),\n      )\n      ..add(\n        DoubleProperty(\"minimumHeight\", minimumHeight),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\"padding\", padding),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"labelTextStyle\", labelTextStyle),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"contentTextStyle\", contentTextStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/menu_item/menu_item_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/src/theme/menu_item/menu_item_colors.dart';\nimport 'package:moon_design/src/theme/menu_item/menu_item_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonMenuItemTheme extends ThemeExtension<MoonMenuItemTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonMenuItem.\n  final MoonMenuItemColors colors;\n\n  /// The properties of the MoonMenuItem.\n  final MoonMenuItemProperties properties;\n\n  MoonMenuItemTheme({\n    required this.tokens,\n    MoonMenuItemColors? colors,\n    MoonMenuItemProperties? properties,\n  })  : colors = colors ??\n            MoonMenuItemColors(\n              backgroundColor: Colors.transparent,\n              dividerColor: tokens.colors.beerus,\n              iconColor: tokens.colors.iconPrimary,\n              labelTextColor: tokens.colors.textPrimary,\n              contentTextColor: tokens.colors.textSecondary,\n            ),\n        properties = properties ??\n            MoonMenuItemProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              verticalGap: tokens.sizes.x5s,\n              minimumHeight: tokens.sizes.md,\n              padding: EdgeInsets.all(tokens.sizes.x3s),\n              labelTextStyle: tokens.typography.body.textDefault,\n              contentTextStyle: tokens.typography.body.text12,\n            );\n\n  @override\n  MoonMenuItemTheme copyWith({\n    MoonTokens? tokens,\n    MoonMenuItemColors? colors,\n    MoonMenuItemProperties? properties,\n  }) {\n    return MoonMenuItemTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonMenuItemTheme lerp(ThemeExtension<MoonMenuItemTheme>? other, double t) {\n    if (other is! MoonMenuItemTheme) return this;\n\n    return MoonMenuItemTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonMenuItemTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonMenuItemColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonMenuItemProperties>(\"properties\", properties),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/modal/modal_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonModalColors extends ThemeExtension<MoonModalColors>\n    with DiagnosticableTreeMixin {\n  /// The text color of the MoonModal.\n  final Color textColor;\n\n  /// The icon color of the MoonModal.\n  final Color iconColor;\n\n  /// The background color of the MoonModal.\n  final Color backgroundColor;\n\n  /// The color of the MoonModal barrier.\n  final Color barrierColor;\n\n  const MoonModalColors({\n    required this.textColor,\n    required this.iconColor,\n    required this.backgroundColor,\n    required this.barrierColor,\n  });\n\n  @override\n  MoonModalColors copyWith({\n    Color? textColor,\n    Color? iconColor,\n    Color? backgroundColor,\n    Color? barrierColor,\n  }) {\n    return MoonModalColors(\n      textColor: textColor ?? this.textColor,\n      iconColor: iconColor ?? this.iconColor,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      barrierColor: barrierColor ?? this.barrierColor,\n    );\n  }\n\n  @override\n  MoonModalColors lerp(ThemeExtension<MoonModalColors>? other, double t) {\n    if (other is! MoonModalColors) return this;\n\n    return MoonModalColors(\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      barrierColor: colorPremulLerp(barrierColor, other.barrierColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonModalColors\"))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor))\n      ..add(ColorProperty(\"barrierColor\", barrierColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/modal/modal_properties.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonModalProperties extends ThemeExtension<MoonModalProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonModal.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The duration of the MoonModal transition animation (fade in or out).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonModal transition animation (fade in or out).\n  final Curve transitionCurve;\n\n  /// The text style of the MoonModal.\n  final TextStyle textStyle;\n\n  const MoonModalProperties({\n    required this.borderRadius,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.textStyle,\n  });\n\n  @override\n  MoonModalProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    TextStyle? textStyle,\n  }) {\n    return MoonModalProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonModalProperties lerp(\n    ThemeExtension<MoonModalProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonModalProperties) return this;\n\n    return MoonModalProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonModalProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/modal/modal_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/modal/modal_colors.dart';\nimport 'package:moon_design/src/theme/modal/modal_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonModalTheme extends ThemeExtension<MoonModalTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonModal.\n  final MoonModalColors colors;\n\n  /// The properties of the MoonModal.\n  final MoonModalProperties properties;\n\n  MoonModalTheme({\n    required this.tokens,\n    MoonModalColors? colors,\n    MoonModalProperties? properties,\n  })  : colors = colors ??\n            MoonModalColors(\n              textColor: tokens.colors.textPrimary,\n              iconColor: tokens.colors.iconPrimary,\n              backgroundColor: tokens.colors.goku,\n              barrierColor: tokens.colors.zeno,\n            ),\n        properties = properties ??\n            MoonModalProperties(\n              borderRadius: tokens.borders.surfaceSm,\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n              textStyle: tokens.typography.body.textDefault,\n            );\n\n  @override\n  MoonModalTheme copyWith({\n    MoonTokens? tokens,\n    MoonModalColors? colors,\n    MoonModalProperties? properties,\n  }) {\n    return MoonModalTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonModalTheme lerp(ThemeExtension<MoonModalTheme>? other, double t) {\n    if (other is! MoonModalTheme) return this;\n\n    return MoonModalTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonModalTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonModalColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonModalProperties>(\"properties\", properties));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/popover/popover_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonPopoverColors extends ThemeExtension<MoonPopoverColors>\n    with DiagnosticableTreeMixin {\n  /// The text color of the MoonPopover.\n  final Color textColor;\n\n  /// The icon color of the MoonPopover.\n  final Color iconColor;\n\n  /// The background color of the MoonPopover.\n  final Color backgroundColor;\n\n  const MoonPopoverColors({\n    required this.textColor,\n    required this.iconColor,\n    required this.backgroundColor,\n  });\n\n  @override\n  MoonPopoverColors copyWith({\n    Color? textColor,\n    Color? iconColor,\n    Color? backgroundColor,\n  }) {\n    return MoonPopoverColors(\n      textColor: textColor ?? this.textColor,\n      iconColor: iconColor ?? this.iconColor,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n    );\n  }\n\n  @override\n  MoonPopoverColors lerp(ThemeExtension<MoonPopoverColors>? other, double t) {\n    if (other is! MoonPopoverColors) return this;\n\n    return MoonPopoverColors(\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonPopoverColors\"))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/popover/popover_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonPopoverProperties extends ThemeExtension<MoonPopoverProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonPopover.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The distance between the MoonPopover and the target child widget.\n  final double distanceToTarget;\n\n  /// The duration of the MoonPopover transition animation (fade in or out).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonPopover transition animation (fade in or out).\n  final Curve transitionCurve;\n\n  /// The padding of the MoonPopover content.\n  final EdgeInsetsGeometry contentPadding;\n\n  /// The text style of the MoonPopover.\n  final TextStyle textStyle;\n\n  const MoonPopoverProperties({\n    required this.borderRadius,\n    required this.distanceToTarget,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.contentPadding,\n    required this.textStyle,\n  });\n\n  @override\n  MoonPopoverProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? distanceToTarget,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    EdgeInsetsGeometry? contentPadding,\n    TextStyle? textStyle,\n  }) {\n    return MoonPopoverProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      distanceToTarget: distanceToTarget ?? this.distanceToTarget,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      contentPadding: contentPadding ?? this.contentPadding,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonPopoverProperties lerp(\n    ThemeExtension<MoonPopoverProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonPopoverProperties) return this;\n\n    return MoonPopoverProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      distanceToTarget:\n          lerpDouble(distanceToTarget, other.distanceToTarget, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      contentPadding:\n          EdgeInsetsGeometry.lerp(contentPadding, other.contentPadding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonPopoverProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"distanceToTarget\", distanceToTarget),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\n          \"contentPadding\",\n          contentPadding,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"textStyle\",\n          textStyle,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/popover/popover_shadows.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonPopoverShadows extends ThemeExtension<MoonPopoverShadows>\n    with DiagnosticableTreeMixin {\n  /// The list of shadows applied to the MoonPopover.\n  final List<BoxShadow> popoverShadows;\n\n  const MoonPopoverShadows({required this.popoverShadows});\n\n  @override\n  MoonPopoverShadows copyWith({List<BoxShadow>? popoverShadows}) {\n    return MoonPopoverShadows(\n      popoverShadows: popoverShadows ?? this.popoverShadows,\n    );\n  }\n\n  @override\n  MoonPopoverShadows lerp(ThemeExtension<MoonPopoverShadows>? other, double t) {\n    if (other is! MoonPopoverShadows) return this;\n\n    return MoonPopoverShadows(\n      popoverShadows: BoxShadow.lerpList(\n        popoverShadows,\n        other.popoverShadows,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonPopoverShadows\"),\n      )\n      ..add(\n        DiagnosticsProperty<List<BoxShadow>>(\"popoverShadows\", popoverShadows),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/popover/popover_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/popover/popover_colors.dart';\nimport 'package:moon_design/src/theme/popover/popover_properties.dart';\nimport 'package:moon_design/src/theme/popover/popover_shadows.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonPopoverTheme extends ThemeExtension<MoonPopoverTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonPopover.\n  final MoonPopoverColors colors;\n\n  /// The properties of the MoonPopover.\n  final MoonPopoverProperties properties;\n\n  /// The shadows of the MoonPopover.\n  final MoonPopoverShadows shadows;\n\n  MoonPopoverTheme({\n    required this.tokens,\n    MoonPopoverColors? colors,\n    MoonPopoverProperties? properties,\n    MoonPopoverShadows? shadows,\n  })  : colors = colors ??\n            MoonPopoverColors(\n              textColor: tokens.colors.textPrimary,\n              iconColor: tokens.colors.iconPrimary,\n              backgroundColor: tokens.colors.goku,\n            ),\n        properties = properties ??\n            MoonPopoverProperties(\n              borderRadius: tokens.borders.interactiveMd,\n              distanceToTarget: tokens.sizes.x4s,\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n              contentPadding: EdgeInsets.all(tokens.sizes.x3s),\n              textStyle: tokens.typography.body.textDefault,\n            ),\n        shadows =\n            shadows ?? MoonPopoverShadows(popoverShadows: tokens.shadows.sm);\n\n  @override\n  MoonPopoverTheme copyWith({\n    MoonTokens? tokens,\n    MoonPopoverColors? colors,\n    MoonPopoverProperties? properties,\n    MoonPopoverShadows? shadows,\n  }) {\n    return MoonPopoverTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      shadows: shadows ?? this.shadows,\n    );\n  }\n\n  @override\n  MoonPopoverTheme lerp(ThemeExtension<MoonPopoverTheme>? other, double t) {\n    if (other is! MoonPopoverTheme) return this;\n\n    return MoonPopoverTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      shadows: shadows.lerp(other.shadows, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonPopoverTheme\"),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTokens>(\"tokens\", tokens),\n      )\n      ..add(\n        DiagnosticsProperty<MoonPopoverColors>(\"colors\", colors),\n      )\n      ..add(\n        DiagnosticsProperty<MoonPopoverProperties>(\"properties\", properties),\n      )\n      ..add(\n        DiagnosticsProperty<MoonPopoverShadows>(\"shadows\", shadows),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress/circular_progress/circular_progress_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonCircularProgressColors\n    extends ThemeExtension<MoonCircularProgressColors>\n    with DiagnosticableTreeMixin {\n  /// The color of the MoonCircularProgress.\n  final Color color;\n\n  /// The background color of the MoonCircularProgress.\n  final Color backgroundColor;\n\n  const MoonCircularProgressColors({\n    required this.color,\n    required this.backgroundColor,\n  });\n\n  @override\n  MoonCircularProgressColors copyWith({\n    Color? color,\n    Color? backgroundColor,\n  }) {\n    return MoonCircularProgressColors(\n      color: color ?? this.color,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n    );\n  }\n\n  @override\n  MoonCircularProgressColors lerp(\n    ThemeExtension<MoonCircularProgressColors>? other,\n    double t,\n  ) {\n    if (other is! MoonCircularProgressColors) return this;\n\n    return MoonCircularProgressColors(\n      color: colorPremulLerp(color, other.color, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCircularProgressColors\"))\n      ..add(ColorProperty(\"color\", color))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress/circular_progress/circular_progress_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonCircularProgressSizeProperties\n    extends ThemeExtension<MoonCircularProgressSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The size value of the MoonCircularProgress.\n  final double progressSizeValue;\n\n  /// The stroke width of the MoonCircularProgress.\n  final double progressStrokeWidth;\n\n  const MoonCircularProgressSizeProperties({\n    required this.progressSizeValue,\n    required this.progressStrokeWidth,\n  });\n\n  @override\n  MoonCircularProgressSizeProperties copyWith({\n    double? progressSizeValue,\n    double? progressStrokeWidth,\n  }) {\n    return MoonCircularProgressSizeProperties(\n      progressSizeValue: progressSizeValue ?? this.progressSizeValue,\n      progressStrokeWidth: progressStrokeWidth ?? this.progressStrokeWidth,\n    );\n  }\n\n  @override\n  MoonCircularProgressSizeProperties lerp(\n    ThemeExtension<MoonCircularProgressSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonCircularProgressSizeProperties) return this;\n\n    return MoonCircularProgressSizeProperties(\n      progressSizeValue:\n          lerpDouble(progressSizeValue, other.progressSizeValue, t)!,\n      progressStrokeWidth:\n          lerpDouble(progressStrokeWidth, other.progressStrokeWidth, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCircularProgressSizeProperties\"))\n      ..add(DoubleProperty(\"progressSizeValue\", progressSizeValue))\n      ..add(DoubleProperty(\"progressStrokeWidth\", progressStrokeWidth));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress/circular_progress/circular_progress_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/progress/circular_progress/circular_progress_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonCircularProgressSizes\n    extends ThemeExtension<MoonCircularProgressSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the (2x) extra small MoonCircularProgress.\n  final MoonCircularProgressSizeProperties x2s;\n\n  /// The properties of the extra small MoonCircularProgress.\n  final MoonCircularProgressSizeProperties xs;\n\n  /// The properties of the small MoonCircularProgress.\n  final MoonCircularProgressSizeProperties sm;\n\n  /// The properties of the medium MoonCircularProgress.\n  final MoonCircularProgressSizeProperties md;\n\n  /// The properties of the large MoonCircularProgress.\n  final MoonCircularProgressSizeProperties lg;\n\n  MoonCircularProgressSizes({\n    required this.tokens,\n    MoonCircularProgressSizeProperties? x2s,\n    MoonCircularProgressSizeProperties? xs,\n    MoonCircularProgressSizeProperties? sm,\n    MoonCircularProgressSizeProperties? md,\n    MoonCircularProgressSizeProperties? lg,\n  })  : x2s = x2s ??\n            MoonCircularProgressSizeProperties(\n              progressSizeValue: tokens.sizes.x2s,\n              progressStrokeWidth: tokens.sizes.x6s,\n            ),\n        xs = xs ??\n            MoonCircularProgressSizeProperties(\n              progressSizeValue: tokens.sizes.xs,\n              progressStrokeWidth: tokens.sizes.x6s,\n            ),\n        sm = sm ??\n            MoonCircularProgressSizeProperties(\n              progressSizeValue: tokens.sizes.sm,\n              progressStrokeWidth: tokens.sizes.x6s,\n            ),\n        md = md ??\n            MoonCircularProgressSizeProperties(\n              progressSizeValue: tokens.sizes.md,\n              progressStrokeWidth: tokens.sizes.x5s,\n            ),\n        lg = lg ??\n            MoonCircularProgressSizeProperties(\n              progressSizeValue: tokens.sizes.lg,\n              progressStrokeWidth: tokens.sizes.x5s,\n            );\n\n  @override\n  MoonCircularProgressSizes copyWith({\n    MoonTokens? tokens,\n    MoonCircularProgressSizeProperties? x2s,\n    MoonCircularProgressSizeProperties? xs,\n    MoonCircularProgressSizeProperties? sm,\n    MoonCircularProgressSizeProperties? md,\n    MoonCircularProgressSizeProperties? lg,\n  }) {\n    return MoonCircularProgressSizes(\n      tokens: tokens ?? this.tokens,\n      x2s: x2s ?? this.x2s,\n      xs: xs ?? this.xs,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n      lg: lg ?? this.lg,\n    );\n  }\n\n  @override\n  MoonCircularProgressSizes lerp(\n    ThemeExtension<MoonCircularProgressSizes>? other,\n    double t,\n  ) {\n    if (other is! MoonCircularProgressSizes) return this;\n\n    return MoonCircularProgressSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      x2s: x2s.lerp(other.x2s, t),\n      xs: xs.lerp(other.xs, t),\n      sm: sm.lerp(other.sm, t),\n      md: md.lerp(other.md, t),\n      lg: lg.lerp(other.lg, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCircularProgressSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonCircularProgressSizeProperties>(\"x2s\", x2s))\n      ..add(DiagnosticsProperty<MoonCircularProgressSizeProperties>(\"xs\", xs))\n      ..add(DiagnosticsProperty<MoonCircularProgressSizeProperties>(\"sm\", sm))\n      ..add(DiagnosticsProperty<MoonCircularProgressSizeProperties>(\"md\", md))\n      ..add(DiagnosticsProperty<MoonCircularProgressSizeProperties>(\"lg\", lg));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress/circular_progress/circular_progress_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/progress/circular_progress/circular_progress_colors.dart';\nimport 'package:moon_design/src/theme/progress/circular_progress/circular_progress_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonCircularProgressTheme\n    extends ThemeExtension<MoonCircularProgressTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonCircularProgress.\n  final MoonCircularProgressColors colors;\n\n  /// The sizes of the MoonCircularProgress.\n  final MoonCircularProgressSizes sizes;\n\n  MoonCircularProgressTheme({\n    required this.tokens,\n    MoonCircularProgressColors? colors,\n    MoonCircularProgressSizes? sizes,\n  })  : colors = colors ??\n            MoonCircularProgressColors(\n              color: tokens.colors.piccolo,\n              backgroundColor: tokens.colors.beerus,\n            ),\n        sizes = sizes ?? MoonCircularProgressSizes(tokens: tokens);\n\n  @override\n  MoonCircularProgressTheme copyWith({\n    MoonTokens? tokens,\n    MoonCircularProgressColors? colors,\n    MoonCircularProgressSizes? sizes,\n  }) {\n    return MoonCircularProgressTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonCircularProgressTheme lerp(\n    ThemeExtension<MoonCircularProgressTheme>? other,\n    double t,\n  ) {\n    if (other is! MoonCircularProgressTheme) return this;\n\n    return MoonCircularProgressTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonCircularProgressTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonCircularProgressColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonCircularProgressSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress/linear_progress/linear_progress_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonLinearProgressColors extends ThemeExtension<MoonLinearProgressColors>\n    with DiagnosticableTreeMixin {\n  /// The color of the MoonLinearProgress.\n  final Color color;\n\n  /// The text color of the MoonLinearProgress.\n  final Color textColor;\n\n  /// The background color of the MoonLinearProgress.\n  final Color backgroundColor;\n\n  const MoonLinearProgressColors({\n    required this.color,\n    required this.textColor,\n    required this.backgroundColor,\n  });\n\n  @override\n  MoonLinearProgressColors copyWith({\n    Color? color,\n    Color? textColor,\n    Color? backgroundColor,\n  }) {\n    return MoonLinearProgressColors(\n      color: color ?? this.color,\n      textColor: textColor ?? this.textColor,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n    );\n  }\n\n  @override\n  MoonLinearProgressColors lerp(\n    ThemeExtension<MoonLinearProgressColors>? other,\n    double t,\n  ) {\n    if (other is! MoonLinearProgressColors) return this;\n\n    return MoonLinearProgressColors(\n      color: colorPremulLerp(color, other.color, t)!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonLinearProgressColors\"))\n      ..add(ColorProperty(\"color\", color))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress/linear_progress/linear_progress_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonLinearProgressSizeProperties\n    extends ThemeExtension<MoonLinearProgressSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonLinearProgress.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The height of the MoonLinearProgress.\n  final double progressHeight;\n\n  /// The size value of the MoonLinearProgress thumb.\n  final double thumbSizeValue;\n\n  /// The vertical gap between the MoonLinearProgress and the minLabel and\n  /// maxLabel widgets.\n  final double verticalGap;\n\n  /// The text style of the MoonLinearProgress minLabel and maxLabel widgets.\n  final TextStyle textStyle;\n\n  const MoonLinearProgressSizeProperties({\n    required this.borderRadius,\n    required this.progressHeight,\n    required this.thumbSizeValue,\n    required this.verticalGap,\n    required this.textStyle,\n  });\n\n  @override\n  MoonLinearProgressSizeProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? progressHeight,\n    double? thumbSizeValue,\n    double? verticalGap,\n    TextStyle? textStyle,\n  }) {\n    return MoonLinearProgressSizeProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      progressHeight: progressHeight ?? this.progressHeight,\n      thumbSizeValue: thumbSizeValue ?? this.thumbSizeValue,\n      verticalGap: verticalGap ?? this.verticalGap,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonLinearProgressSizeProperties lerp(\n    ThemeExtension<MoonLinearProgressSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonLinearProgressSizeProperties) return this;\n\n    return MoonLinearProgressSizeProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      progressHeight: lerpDouble(progressHeight, other.progressHeight, t)!,\n      thumbSizeValue: lerpDouble(thumbSizeValue, other.thumbSizeValue, t)!,\n      verticalGap: lerpDouble(verticalGap, other.verticalGap, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonLinearProgressSizeProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"progressHeight\", progressHeight),\n      )\n      ..add(\n        DoubleProperty(\"thumbSizeValue\", thumbSizeValue),\n      )\n      ..add(\n        DoubleProperty(\"verticalGap\", verticalGap),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress/linear_progress/linear_progress_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/progress/linear_progress/linear_progress_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonLinearProgressSizes extends ThemeExtension<MoonLinearProgressSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the (6x) extra small MoonLinearProgress.\n  final MoonLinearProgressSizeProperties x6s;\n\n  /// The properties of the (5x) extra small MoonLinearProgress.\n  final MoonLinearProgressSizeProperties x5s;\n\n  /// The properties of the (4x) extra small MoonLinearProgress.\n  final MoonLinearProgressSizeProperties x4s;\n\n  /// The properties of the (3x) extra small MoonLinearProgress.\n  final MoonLinearProgressSizeProperties x3s;\n\n  /// The properties of the (2x) extra small MoonLinearProgress.\n  final MoonLinearProgressSizeProperties x2s;\n\n  MoonLinearProgressSizes({\n    required this.tokens,\n    MoonLinearProgressSizeProperties? x6s,\n    MoonLinearProgressSizeProperties? x5s,\n    MoonLinearProgressSizeProperties? x4s,\n    MoonLinearProgressSizeProperties? x3s,\n    MoonLinearProgressSizeProperties? x2s,\n  })  : x6s = x6s ??\n            MoonLinearProgressSizeProperties(\n              borderRadius: tokens.borders.surfaceXs,\n              progressHeight: tokens.sizes.x6s,\n              thumbSizeValue: tokens.sizes.x3s,\n              verticalGap: tokens.sizes.x4s,\n              textStyle: tokens.typography.body.text10,\n            ),\n        x5s = x5s ??\n            MoonLinearProgressSizeProperties(\n              borderRadius: tokens.borders.surfaceXs,\n              progressHeight: tokens.sizes.x5s,\n              thumbSizeValue: tokens.sizes.x3s,\n              verticalGap: tokens.sizes.x4s,\n              textStyle: tokens.typography.body.text10,\n            ),\n        x4s = x4s ??\n            MoonLinearProgressSizeProperties(\n              borderRadius: tokens.borders.surfaceSm,\n              progressHeight: tokens.sizes.x4s,\n              thumbSizeValue: tokens.sizes.x3s,\n              verticalGap: 6,\n              textStyle: tokens.typography.body.text10,\n            ),\n        x3s = x3s ??\n            MoonLinearProgressSizeProperties(\n              borderRadius: tokens.borders.surfaceMd,\n              progressHeight: tokens.sizes.x3s,\n              thumbSizeValue: tokens.sizes.x2s,\n              verticalGap: 6,\n              textStyle: tokens.typography.body.text10,\n            ),\n        x2s = x2s ??\n            MoonLinearProgressSizeProperties(\n              borderRadius: tokens.borders.surfaceLg,\n              progressHeight: tokens.sizes.x2s,\n              thumbSizeValue: tokens.sizes.x2s,\n              verticalGap: tokens.sizes.x5s,\n              textStyle: tokens.typography.body.text10,\n            );\n\n  @override\n  MoonLinearProgressSizes copyWith({\n    MoonTokens? tokens,\n    MoonLinearProgressSizeProperties? x6s,\n    MoonLinearProgressSizeProperties? x5s,\n    MoonLinearProgressSizeProperties? x4s,\n    MoonLinearProgressSizeProperties? x3s,\n    MoonLinearProgressSizeProperties? x2s,\n  }) {\n    return MoonLinearProgressSizes(\n      tokens: tokens ?? this.tokens,\n      x6s: x6s ?? this.x6s,\n      x5s: x5s ?? this.x5s,\n      x4s: x4s ?? this.x4s,\n      x3s: x3s ?? this.x3s,\n      x2s: x2s ?? this.x2s,\n    );\n  }\n\n  @override\n  MoonLinearProgressSizes lerp(\n    ThemeExtension<MoonLinearProgressSizes>? other,\n    double t,\n  ) {\n    if (other is! MoonLinearProgressSizes) return this;\n\n    return MoonLinearProgressSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      x6s: x6s.lerp(other.x6s, t),\n      x5s: x5s.lerp(other.x5s, t),\n      x4s: x4s.lerp(other.x4s, t),\n      x3s: x3s.lerp(other.x3s, t),\n      x2s: x2s.lerp(other.x2s, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonLinearProgressSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonLinearProgressSizeProperties>(\"x6s\", x6s))\n      ..add(DiagnosticsProperty<MoonLinearProgressSizeProperties>(\"x5s\", x5s))\n      ..add(DiagnosticsProperty<MoonLinearProgressSizeProperties>(\"x4s\", x4s))\n      ..add(DiagnosticsProperty<MoonLinearProgressSizeProperties>(\"x3s\", x3s))\n      ..add(DiagnosticsProperty<MoonLinearProgressSizeProperties>(\"x2s\", x2s));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress/linear_progress/linear_progress_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/progress/linear_progress/linear_progress_colors.dart';\nimport 'package:moon_design/src/theme/progress/linear_progress/linear_progress_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonLinearProgressTheme extends ThemeExtension<MoonLinearProgressTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonLinearProgress.\n  final MoonLinearProgressColors colors;\n\n  /// The sizes of the MoonLinearProgress.\n  final MoonLinearProgressSizes sizes;\n\n  MoonLinearProgressTheme({\n    required this.tokens,\n    MoonLinearProgressColors? colors,\n    MoonLinearProgressSizes? sizes,\n  })  : colors = colors ??\n            MoonLinearProgressColors(\n              color: tokens.colors.piccolo,\n              backgroundColor: tokens.colors.beerus,\n              textColor: tokens.colors.textPrimary,\n            ),\n        sizes = sizes ?? MoonLinearProgressSizes(tokens: tokens);\n\n  @override\n  MoonLinearProgressTheme copyWith({\n    MoonTokens? tokens,\n    MoonLinearProgressColors? colors,\n    MoonLinearProgressSizes? sizes,\n  }) {\n    return MoonLinearProgressTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonLinearProgressTheme lerp(\n    ThemeExtension<MoonLinearProgressTheme>? other,\n    double t,\n  ) {\n    if (other is! MoonLinearProgressTheme) return this;\n\n    return MoonLinearProgressTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonLinearProgressTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonLinearProgressColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonLinearProgressSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress_pin/progress_pin_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonProgressPinColors extends ThemeExtension<MoonProgressPinColors>\n    with DiagnosticableTreeMixin {\n  /// The color of the MoonProgressPin.\n  final Color pinColor;\n\n  /// The border color of the MoonProgressPin.\n  final Color pinBorderColor;\n\n  /// The color of the MoonProgressPin thumb.\n  final Color thumbColor;\n\n  /// The shadow color of the MoonProgressPin.\n  final Color shadowColor;\n\n  /// The text color of the MoonProgressPin.\n  final Color textColor;\n\n  const MoonProgressPinColors({\n    required this.pinColor,\n    required this.pinBorderColor,\n    required this.thumbColor,\n    required this.shadowColor,\n    required this.textColor,\n  });\n\n  @override\n  MoonProgressPinColors copyWith({\n    Color? pinColor,\n    Color? pinBorderColor,\n    Color? thumbColor,\n    Color? shadowColor,\n    Color? textColor,\n  }) {\n    return MoonProgressPinColors(\n      pinColor: pinColor ?? this.pinColor,\n      pinBorderColor: pinBorderColor ?? this.pinBorderColor,\n      thumbColor: thumbColor ?? this.thumbColor,\n      shadowColor: shadowColor ?? this.shadowColor,\n      textColor: textColor ?? this.textColor,\n    );\n  }\n\n  @override\n  MoonProgressPinColors lerp(\n    ThemeExtension<MoonProgressPinColors>? other,\n    double t,\n  ) {\n    if (other is! MoonProgressPinColors) return this;\n\n    return MoonProgressPinColors(\n      pinColor: colorPremulLerp(pinColor, other.pinColor, t)!,\n      pinBorderColor: colorPremulLerp(pinBorderColor, other.pinBorderColor, t)!,\n      thumbColor: colorPremulLerp(thumbColor, other.thumbColor, t)!,\n      shadowColor: colorPremulLerp(shadowColor, other.shadowColor, t)!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonProgressPinColors\"))\n      ..add(ColorProperty(\"pinColor\", pinColor))\n      ..add(ColorProperty(\"pinBorderColor\", pinBorderColor))\n      ..add(ColorProperty(\"thumbColor\", thumbColor))\n      ..add(ColorProperty(\"shadowColor\", shadowColor))\n      ..add(ColorProperty(\"textColor\", textColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress_pin/progress_pin_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonProgressPinProperties\n    extends ThemeExtension<MoonProgressPinProperties>\n    with DiagnosticableTreeMixin {\n  /// The shadow elevation of the MoonProgressPin.\n  final double shadowElevation;\n\n  /// The height of the MoonProgressPin arrow.\n  final double arrowHeight;\n\n  /// The width of the MoonProgressPin arrow.\n  final double arrowWidth;\n\n  /// The vertical distance between the MoonProgressPin and the\n  /// MoonLinearProgress widget.\n  final double pinDistance;\n\n  /// The width of the MoonProgressPin.\n  final double pinWidth;\n\n  /// The border width of the MoonProgressPin.\n  final double pinBorderWidth;\n\n  /// The text style of the MoonProgressPin.\n  final TextStyle textStyle;\n\n  const MoonProgressPinProperties({\n    required this.shadowElevation,\n    required this.arrowHeight,\n    required this.arrowWidth,\n    required this.pinDistance,\n    required this.pinWidth,\n    required this.pinBorderWidth,\n    required this.textStyle,\n  });\n\n  @override\n  MoonProgressPinProperties copyWith({\n    double? shadowElevation,\n    double? arrowHeight,\n    double? arrowWidth,\n    double? pinDistance,\n    double? pinWidth,\n    double? pinBorderWidth,\n    TextStyle? textStyle,\n  }) {\n    return MoonProgressPinProperties(\n      shadowElevation: shadowElevation ?? this.shadowElevation,\n      arrowHeight: arrowHeight ?? this.arrowHeight,\n      arrowWidth: arrowWidth ?? this.arrowWidth,\n      pinDistance: pinDistance ?? this.pinDistance,\n      pinWidth: pinWidth ?? this.pinWidth,\n      pinBorderWidth: pinBorderWidth ?? this.pinBorderWidth,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonProgressPinProperties lerp(\n    ThemeExtension<MoonProgressPinProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonProgressPinProperties) return this;\n\n    return MoonProgressPinProperties(\n      shadowElevation: lerpDouble(shadowElevation, other.shadowElevation, t)!,\n      arrowHeight: lerpDouble(arrowHeight, other.arrowHeight, t)!,\n      arrowWidth: lerpDouble(arrowWidth, other.arrowWidth, t)!,\n      pinDistance: lerpDouble(pinDistance, other.pinDistance, t)!,\n      pinWidth: lerpDouble(pinWidth, other.pinWidth, t)!,\n      pinBorderWidth: lerpDouble(pinBorderWidth, other.pinBorderWidth, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonProgressPinProperties\"))\n      ..add(DoubleProperty(\"shadowElevation\", shadowElevation))\n      ..add(DoubleProperty(\"arrowHeight\", arrowHeight))\n      ..add(DoubleProperty(\"arrowWidth\", arrowWidth))\n      ..add(DoubleProperty(\"pinDistance\", pinDistance))\n      ..add(DoubleProperty(\"pinWidth\", pinWidth))\n      ..add(DoubleProperty(\"pinBorderWidth\", pinBorderWidth))\n      ..add(DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/progress_pin/progress_pin_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/progress_pin/progress_pin_colors.dart';\nimport 'package:moon_design/src/theme/progress_pin/progress_pin_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonProgressPinTheme extends ThemeExtension<MoonProgressPinTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonProgressPin.\n  final MoonProgressPinColors colors;\n\n  /// The properties of the MoonProgressPin.\n  final MoonProgressPinProperties properties;\n\n  MoonProgressPinTheme({\n    required this.tokens,\n    MoonProgressPinColors? colors,\n    MoonProgressPinProperties? properties,\n  })  : colors = colors ??\n            MoonProgressPinColors(\n              pinColor: tokens.colors.popo,\n              pinBorderColor: tokens.colors.goten,\n              thumbColor: tokens.colors.goten,\n              shadowColor: tokens.colors.popo,\n              textColor: tokens.colors.goten,\n            ),\n        properties = properties ??\n            MoonProgressPinProperties(\n              arrowHeight: 6,\n              arrowWidth: tokens.sizes.x4s,\n              pinDistance: tokens.sizes.x5s,\n              pinWidth: 36,\n              pinBorderWidth: tokens.sizes.x6s,\n              shadowElevation: 6,\n              textStyle: tokens.typography.body.text10,\n            );\n\n  @override\n  MoonProgressPinTheme copyWith({\n    MoonTokens? tokens,\n    MoonProgressPinColors? colors,\n    MoonProgressPinProperties? properties,\n  }) {\n    return MoonProgressPinTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonProgressPinTheme lerp(\n    ThemeExtension<MoonProgressPinTheme>? other,\n    double t,\n  ) {\n    if (other is! MoonProgressPinTheme) return this;\n\n    return MoonProgressPinTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonProgressPinTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonProgressPinColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonProgressPinProperties>(\n          \"properties\",\n          properties,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/radio/radio_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonRadioColors extends ThemeExtension<MoonRadioColors>\n    with DiagnosticableTreeMixin {\n  /// The color of the selected MoonRadio button.\n  final Color activeColor;\n\n  /// The background color of the unselected MoonRadio button.\n  final Color inactiveColor;\n\n  const MoonRadioColors({\n    required this.activeColor,\n    required this.inactiveColor,\n  });\n\n  @override\n  MoonRadioColors copyWith({Color? activeColor, Color? inactiveColor}) {\n    return MoonRadioColors(\n      activeColor: activeColor ?? this.activeColor,\n      inactiveColor: inactiveColor ?? this.inactiveColor,\n    );\n  }\n\n  @override\n  MoonRadioColors lerp(ThemeExtension<MoonRadioColors>? other, double t) {\n    if (other is! MoonRadioColors) return this;\n\n    return MoonRadioColors(\n      activeColor: colorPremulLerp(activeColor, other.activeColor, t)!,\n      inactiveColor: colorPremulLerp(inactiveColor, other.inactiveColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonRadioColors\"))\n      ..add(ColorProperty(\"activeColor\", activeColor))\n      ..add(ColorProperty(\"inactiveColor\", inactiveColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/radio/radio_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/radio/radio_colors.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonRadioTheme extends ThemeExtension<MoonRadioTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonRadio.\n  final MoonRadioColors colors;\n\n  MoonRadioTheme({\n    required this.tokens,\n    MoonRadioColors? colors,\n  }) : colors = colors ??\n            MoonRadioColors(\n              activeColor: tokens.colors.piccolo,\n              inactiveColor: tokens.colors.trunks,\n            );\n\n  @override\n  MoonRadioTheme copyWith({MoonTokens? tokens, MoonRadioColors? colors}) {\n    return MoonRadioTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n    );\n  }\n\n  @override\n  MoonRadioTheme lerp(ThemeExtension<MoonRadioTheme>? other, double t) {\n    if (other is! MoonRadioTheme) return this;\n\n    return MoonRadioTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonRadioTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonRadioColors>(\"colors\", colors));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/segmented_control/segmented_control_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonSegmentedControlColors\n    extends ThemeExtension<MoonSegmentedControlColors>\n    with DiagnosticableTreeMixin {\n  /// The background color of the MoonSegmentedControl.\n  final Color backgroundColor;\n\n  /// The color of the selected MoonSegmentedControl segment.\n  final Color selectedSegmentColor;\n\n  /// The text color of the MoonSegmentedControl segment.\n  final Color textColor;\n\n  /// The text color of the selected MoonSegmentedControl segment.\n  final Color selectedTextColor;\n\n  const MoonSegmentedControlColors({\n    required this.backgroundColor,\n    required this.selectedSegmentColor,\n    required this.textColor,\n    required this.selectedTextColor,\n  });\n\n  @override\n  MoonSegmentedControlColors copyWith({\n    Color? backgroundColor,\n    Color? selectedSegmentColor,\n    Color? textColor,\n    Color? selectedTextColor,\n  }) {\n    return MoonSegmentedControlColors(\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      selectedSegmentColor: selectedSegmentColor ?? this.selectedSegmentColor,\n      textColor: textColor ?? this.textColor,\n      selectedTextColor: selectedTextColor ?? this.selectedTextColor,\n    );\n  }\n\n  @override\n  MoonSegmentedControlColors lerp(\n    ThemeExtension<MoonSegmentedControlColors>? other,\n    double t,\n  ) {\n    if (other is! MoonSegmentedControlColors) return this;\n\n    return MoonSegmentedControlColors(\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      selectedSegmentColor:\n          colorPremulLerp(selectedSegmentColor, other.selectedSegmentColor, t)!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      selectedTextColor:\n          colorPremulLerp(selectedTextColor, other.selectedTextColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonSegmentedControlColors\"))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor))\n      ..add(ColorProperty(\"selectedSegmentColor\", selectedSegmentColor))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"selectedTextColor\", selectedTextColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/segmented_control/segmented_control_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonSegmentedControlProperties\n    extends ThemeExtension<MoonSegmentedControlProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonSegmentedControl.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The gap between the MoonSegmentedControl segments.\n  final double gap;\n\n  /// The duration of the MoonSegmentedControl transition animation.\n  final Duration transitionDuration;\n\n  /// The curve of the MoonSegmentedControl transition animation.\n  final Curve transitionCurve;\n\n  /// The padding of the MoonSegmentedControl.\n  final EdgeInsetsGeometry padding;\n\n  const MoonSegmentedControlProperties({\n    required this.borderRadius,\n    required this.gap,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.padding,\n  });\n\n  @override\n  MoonSegmentedControlProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? gap,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    EdgeInsetsGeometry? padding,\n  }) {\n    return MoonSegmentedControlProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      gap: gap ?? this.gap,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      padding: padding ?? this.padding,\n    );\n  }\n\n  @override\n  MoonSegmentedControlProperties lerp(\n    ThemeExtension<MoonSegmentedControlProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonSegmentedControlProperties) return this;\n\n    return MoonSegmentedControlProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      gap: lerpDouble(gap, other.gap, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      padding: EdgeInsetsGeometry.lerp(padding, other.padding, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonSegmentedControlProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"gap\", gap),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\"padding\", padding),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/segmented_control/segmented_control_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonSegmentedControlSizeProperties\n    extends ThemeExtension<MoonSegmentedControlSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonSegmentedControl segment.\n  final BorderRadiusGeometry segmentBorderRadius;\n\n  /// The horizontal gap between the leading, label and trailing widgets of the\n  /// MoonSegmentedControl segment.\n  final double segmentGap;\n\n  /// The height of the MoonSegmentedControl.\n  final double height;\n\n  /// The size value of the MoonSegmentedControl icon.\n  final double iconSizeValue;\n\n  /// The padding of the MoonSegmentedControl segment.\n  final EdgeInsetsGeometry segmentPadding;\n\n  /// The text style of the MoonSegmentedControl.\n  final TextStyle textStyle;\n\n  const MoonSegmentedControlSizeProperties({\n    required this.segmentBorderRadius,\n    required this.segmentGap,\n    required this.height,\n    required this.iconSizeValue,\n    required this.segmentPadding,\n    required this.textStyle,\n  });\n\n  @override\n  MoonSegmentedControlSizeProperties copyWith({\n    BorderRadiusGeometry? segmentBorderRadius,\n    double? segmentGap,\n    double? height,\n    double? iconSizeValue,\n    EdgeInsetsGeometry? segmentPadding,\n    TextStyle? textStyle,\n  }) {\n    return MoonSegmentedControlSizeProperties(\n      segmentBorderRadius: segmentBorderRadius ?? this.segmentBorderRadius,\n      segmentGap: segmentGap ?? this.segmentGap,\n      height: height ?? this.height,\n      iconSizeValue: iconSizeValue ?? this.iconSizeValue,\n      segmentPadding: segmentPadding ?? this.segmentPadding,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonSegmentedControlSizeProperties lerp(\n    ThemeExtension<MoonSegmentedControlSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonSegmentedControlSizeProperties) return this;\n\n    return MoonSegmentedControlSizeProperties(\n      segmentBorderRadius: BorderRadiusGeometry.lerp(\n        segmentBorderRadius,\n        other.segmentBorderRadius,\n        t,\n      )!,\n      segmentGap: lerpDouble(segmentGap, other.segmentGap, t)!,\n      height: lerpDouble(height, other.height, t)!,\n      iconSizeValue: lerpDouble(iconSizeValue, other.iconSizeValue, t)!,\n      segmentPadding:\n          EdgeInsetsGeometry.lerp(segmentPadding, other.segmentPadding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\n          \"type\",\n          \"MoonSegmentedControlSizeProperties\",\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\n          \"segmentBorderRadius\",\n          segmentBorderRadius,\n        ),\n      )\n      ..add(\n        DoubleProperty(\n          \"segmentGap\",\n          segmentGap,\n        ),\n      )\n      ..add(\n        DoubleProperty(\n          \"height\",\n          height,\n        ),\n      )\n      ..add(\n        DoubleProperty(\n          \"iconSizeValue\",\n          iconSizeValue,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\n          \"segmentPadding\",\n          segmentPadding,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"textStyle\",\n          textStyle,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/segmented_control/segmented_control_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/segmented_control/segmented_control_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonSegmentedControlSizes\n    extends ThemeExtension<MoonSegmentedControlSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the small MoonSegmentedControl.\n  final MoonSegmentedControlSizeProperties sm;\n\n  /// The properties of the medium MoonSegmentedControl.\n  final MoonSegmentedControlSizeProperties md;\n\n  MoonSegmentedControlSizes({\n    required this.tokens,\n    MoonSegmentedControlSizeProperties? sm,\n    MoonSegmentedControlSizeProperties? md,\n  })  : sm = sm ??\n            MoonSegmentedControlSizeProperties(\n              segmentBorderRadius: tokens.borders.interactiveSm,\n              segmentGap: tokens.sizes.x5s,\n              height: tokens.sizes.md,\n              iconSizeValue: tokens.sizes.xs,\n              segmentPadding:\n                  EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              textStyle: tokens.typography.heading.textDefault,\n            ),\n        md = md ??\n            MoonSegmentedControlSizeProperties(\n              segmentBorderRadius: tokens.borders.interactiveSm,\n              segmentGap: tokens.sizes.x4s,\n              height: tokens.sizes.lg,\n              iconSizeValue: tokens.sizes.xs,\n              segmentPadding:\n                  EdgeInsets.symmetric(horizontal: tokens.sizes.x2s),\n              textStyle: tokens.typography.heading.textDefault,\n            );\n\n  @override\n  MoonSegmentedControlSizes copyWith({\n    MoonTokens? tokens,\n    MoonSegmentedControlSizeProperties? sm,\n    MoonSegmentedControlSizeProperties? md,\n  }) {\n    return MoonSegmentedControlSizes(\n      tokens: tokens ?? this.tokens,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n    );\n  }\n\n  @override\n  MoonSegmentedControlSizes lerp(\n    ThemeExtension<MoonSegmentedControlSizes>? other,\n    double t,\n  ) {\n    if (other is! MoonSegmentedControlSizes) return this;\n\n    return MoonSegmentedControlSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      sm: sm.lerp(other.sm, t),\n      md: md.lerp(other.md, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonSegmentedControlSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonSegmentedControlSizeProperties>(\"sm\", sm))\n      ..add(DiagnosticsProperty<MoonSegmentedControlSizeProperties>(\"md\", md));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/segmented_control/segmented_control_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/segmented_control/segmented_control_colors.dart';\nimport 'package:moon_design/src/theme/segmented_control/segmented_control_properties.dart';\nimport 'package:moon_design/src/theme/segmented_control/segmented_control_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonSegmentedControlTheme\n    extends ThemeExtension<MoonSegmentedControlTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonSegmentedControl.\n  final MoonSegmentedControlColors colors;\n\n  /// The properties of the MoonSegmentedControl.\n  final MoonSegmentedControlProperties properties;\n\n  /// The sizes of the MoonSegmentedControl.\n  final MoonSegmentedControlSizes sizes;\n\n  MoonSegmentedControlTheme({\n    required this.tokens,\n    MoonSegmentedControlColors? colors,\n    MoonSegmentedControlProperties? properties,\n    MoonSegmentedControlSizes? sizes,\n  })  : colors = colors ??\n            MoonSegmentedControlColors(\n              backgroundColor: tokens.colors.gohan,\n              selectedSegmentColor: tokens.colors.goku,\n              textColor: tokens.colors.textPrimary,\n              selectedTextColor: tokens.colors.textPrimary,\n            ),\n        properties = properties ??\n            MoonSegmentedControlProperties(\n              borderRadius: tokens.borders.interactiveMd,\n              gap: tokens.sizes.x5s,\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n              padding: EdgeInsets.all(tokens.sizes.x5s),\n            ),\n        sizes = sizes ?? MoonSegmentedControlSizes(tokens: tokens);\n\n  @override\n  MoonSegmentedControlTheme copyWith({\n    MoonTokens? tokens,\n    MoonSegmentedControlColors? colors,\n    MoonSegmentedControlProperties? properties,\n    MoonSegmentedControlSizes? sizes,\n  }) {\n    return MoonSegmentedControlTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonSegmentedControlTheme lerp(\n    ThemeExtension<MoonSegmentedControlTheme>? other,\n    double t,\n  ) {\n    if (other is! MoonSegmentedControlTheme) return this;\n\n    return MoonSegmentedControlTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonSegmentedControlTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonSegmentedControlColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonSegmentedControlProperties>(\n          \"properties\",\n          properties,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonSegmentedControlSizes>(\n          \"sizes\",\n          sizes,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/switch/switch_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonSwitchColors extends ThemeExtension<MoonSwitchColors>\n    with DiagnosticableTreeMixin {\n  /// The background color of the active (on) MoonSwitch track.\n  final Color activeTrackColor;\n\n  /// The background color of the inactive (off) MoonSwitch track.\n  final Color inactiveTrackColor;\n\n  /// The text color of the active (on) MoonSwitch.\n  final Color activeTextColor;\n\n  /// The text color of the inactive (off) MoonSwitch.\n  final Color inactiveTextColor;\n\n  /// The icon color of the active (on) MoonSwitch.\n  final Color activeIconColor;\n\n  /// The icon color of the inactive (off) MoonSwitch.\n  final Color inactiveIconColor;\n\n  /// The icon color of the MoonSwitch thumb.\n  final Color thumbIconColor;\n\n  /// The color of the MoonSwitch thumb.\n  final Color thumbColor;\n\n  const MoonSwitchColors({\n    required this.activeTrackColor,\n    required this.inactiveTrackColor,\n    required this.activeTextColor,\n    required this.inactiveTextColor,\n    required this.activeIconColor,\n    required this.inactiveIconColor,\n    required this.thumbIconColor,\n    required this.thumbColor,\n  });\n\n  @override\n  MoonSwitchColors copyWith({\n    Color? activeTrackColor,\n    Color? inactiveTrackColor,\n    Color? activeTextColor,\n    Color? inactiveTextColor,\n    Color? activeIconColor,\n    Color? inactiveIconColor,\n    Color? thumbIconColor,\n    Color? thumbColor,\n  }) {\n    return MoonSwitchColors(\n      activeTrackColor: activeTrackColor ?? this.activeTrackColor,\n      inactiveTrackColor: inactiveTrackColor ?? this.inactiveTrackColor,\n      activeTextColor: activeTextColor ?? this.activeTextColor,\n      inactiveTextColor: inactiveTextColor ?? this.inactiveTextColor,\n      activeIconColor: activeIconColor ?? this.activeIconColor,\n      inactiveIconColor: inactiveIconColor ?? this.inactiveIconColor,\n      thumbIconColor: thumbIconColor ?? this.thumbIconColor,\n      thumbColor: thumbColor ?? this.thumbColor,\n    );\n  }\n\n  @override\n  MoonSwitchColors lerp(ThemeExtension<MoonSwitchColors>? other, double t) {\n    if (other is! MoonSwitchColors) return this;\n\n    return MoonSwitchColors(\n      activeTrackColor:\n          colorPremulLerp(activeTrackColor, other.activeTrackColor, t)!,\n      inactiveTrackColor:\n          colorPremulLerp(inactiveTrackColor, other.inactiveTrackColor, t)!,\n      activeTextColor:\n          colorPremulLerp(activeTextColor, other.activeTextColor, t)!,\n      inactiveTextColor:\n          colorPremulLerp(inactiveTextColor, other.inactiveTextColor, t)!,\n      activeIconColor:\n          colorPremulLerp(activeIconColor, other.activeIconColor, t)!,\n      inactiveIconColor:\n          colorPremulLerp(inactiveIconColor, other.inactiveIconColor, t)!,\n      thumbIconColor: colorPremulLerp(thumbIconColor, other.thumbIconColor, t)!,\n      thumbColor: colorPremulLerp(thumbColor, other.thumbColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonSwitchColors\"))\n      ..add(ColorProperty(\"activeTrackColor\", activeTrackColor))\n      ..add(ColorProperty(\"inactiveTrackColor\", inactiveTrackColor))\n      ..add(ColorProperty(\"activeTextColor\", activeTextColor))\n      ..add(ColorProperty(\"inactiveTextColor\", inactiveTextColor))\n      ..add(ColorProperty(\"activeIconColor\", activeIconColor))\n      ..add(ColorProperty(\"inactiveIconColor\", inactiveIconColor))\n      ..add(ColorProperty(\"thumbIconColor\", thumbIconColor))\n      ..add(ColorProperty(\"thumbColor\", thumbColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/switch/switch_properties.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonSwitchProperties extends ThemeExtension<MoonSwitchProperties>\n    with DiagnosticableTreeMixin {\n  /// The duration of the MoonSwitch toggle animation.\n  final Duration transitionDuration;\n\n  /// The curve of the MoonSwitch toggle animation.\n  final Curve transitionCurve;\n\n  const MoonSwitchProperties({\n    required this.transitionDuration,\n    required this.transitionCurve,\n  });\n\n  @override\n  MoonSwitchProperties copyWith({\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n  }) {\n    return MoonSwitchProperties(\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n    );\n  }\n\n  @override\n  MoonSwitchProperties lerp(\n    ThemeExtension<MoonSwitchProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonSwitchProperties) return this;\n\n    return MoonSwitchProperties(\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonSwitchProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/switch/switch_shadows.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonSwitchShadows extends ThemeExtension<MoonSwitchShadows>\n    with DiagnosticableTreeMixin {\n  /// The list of shadows applied to the MoonSwitch thumb.\n  final List<BoxShadow> thumbShadows;\n\n  const MoonSwitchShadows({required this.thumbShadows});\n\n  @override\n  MoonSwitchShadows copyWith({List<BoxShadow>? thumbShadows}) {\n    return MoonSwitchShadows(\n      thumbShadows: thumbShadows ?? this.thumbShadows,\n    );\n  }\n\n  @override\n  MoonSwitchShadows lerp(ThemeExtension<MoonSwitchShadows>? other, double t) {\n    if (other is! MoonSwitchShadows) return this;\n\n    return MoonSwitchShadows(\n      thumbShadows: BoxShadow.lerpList(thumbShadows, other.thumbShadows, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonSwitchShadows\"))\n      ..add(DiagnosticsProperty<List<BoxShadow>>(\"thumbShadows\", thumbShadows));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/switch/switch_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonSwitchSizeProperties extends ThemeExtension<MoonSwitchSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The height of the MoonSwitch.\n  final double height;\n\n  /// The width of the MoonSwitch.\n  final double width;\n\n  /// The size value of the MoonSwitch thumb.\n  final double thumbSizeValue;\n\n  /// The size value of the MoonSwitch icon.\n  final double iconSizeValue;\n\n  /// The padding of the MoonSwitch.\n  final EdgeInsetsGeometry padding;\n\n  /// The text style of the MoonSwitch.\n  final TextStyle textStyle;\n\n  const MoonSwitchSizeProperties({\n    required this.height,\n    required this.width,\n    required this.thumbSizeValue,\n    required this.iconSizeValue,\n    required this.padding,\n    required this.textStyle,\n  });\n\n  @override\n  MoonSwitchSizeProperties copyWith({\n    double? height,\n    double? width,\n    double? thumbSizeValue,\n    double? iconSizeValue,\n    EdgeInsetsGeometry? padding,\n    TextStyle? textStyle,\n  }) {\n    return MoonSwitchSizeProperties(\n      height: height ?? this.height,\n      width: width ?? this.width,\n      thumbSizeValue: thumbSizeValue ?? this.thumbSizeValue,\n      iconSizeValue: iconSizeValue ?? this.iconSizeValue,\n      padding: padding ?? this.padding,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonSwitchSizeProperties lerp(\n    ThemeExtension<MoonSwitchSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonSwitchSizeProperties) return this;\n\n    return MoonSwitchSizeProperties(\n      height: lerpDouble(height, other.height, t)!,\n      width: lerpDouble(width, other.width, t)!,\n      thumbSizeValue: lerpDouble(thumbSizeValue, other.thumbSizeValue, t)!,\n      iconSizeValue: lerpDouble(iconSizeValue, other.iconSizeValue, t)!,\n      padding: EdgeInsetsGeometry.lerp(padding, other.padding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonSwitchSizeProperties\"))\n      ..add(DoubleProperty(\"height\", height))\n      ..add(DoubleProperty(\"width\", width))\n      ..add(DoubleProperty(\"thumbSizeValue\", thumbSizeValue))\n      ..add(DoubleProperty(\"iconSizeValue\", iconSizeValue))\n      ..add(DiagnosticsProperty<EdgeInsetsGeometry>(\"padding\", padding))\n      ..add(DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/switch/switch_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/switch/switch_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonSwitchSizes extends ThemeExtension<MoonSwitchSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the (2x) extra small MoonSwitch.\n  final MoonSwitchSizeProperties x2s;\n\n  /// The properties of the extra small MoonSwitch.\n  final MoonSwitchSizeProperties xs;\n\n  /// The properties of the small MoonSwitch.\n  final MoonSwitchSizeProperties sm;\n\n  MoonSwitchSizes({\n    required this.tokens,\n    MoonSwitchSizeProperties? x2s,\n    MoonSwitchSizeProperties? xs,\n    MoonSwitchSizeProperties? sm,\n  })  : x2s = x2s ??\n            MoonSwitchSizeProperties(\n              height: tokens.sizes.x2s,\n              width: 2 * tokens.sizes.x3s + 2 * tokens.sizes.x5s,\n              thumbSizeValue: tokens.sizes.x3s,\n              iconSizeValue: tokens.sizes.x3s,\n              padding: EdgeInsets.all(tokens.sizes.x6s),\n              textStyle:\n                  tokens.typography.body.text6.copyWith(letterSpacing: 0),\n            ),\n        xs = xs ??\n            MoonSwitchSizeProperties(\n              height: tokens.sizes.xs,\n              width: 2 * tokens.sizes.x2s + 3 * tokens.sizes.x5s,\n              thumbSizeValue: tokens.sizes.x2s,\n              iconSizeValue: tokens.sizes.x2s,\n              padding: EdgeInsets.all(tokens.sizes.x5s),\n              textStyle:\n                  tokens.typography.body.text8.copyWith(letterSpacing: 0.1),\n            ),\n        sm = sm ??\n            MoonSwitchSizeProperties(\n              height: tokens.sizes.sm,\n              width: 2 * tokens.sizes.xs + 3 * tokens.sizes.x5s,\n              thumbSizeValue: tokens.sizes.xs,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.all(tokens.sizes.x5s),\n              textStyle:\n                  tokens.typography.body.text10.copyWith(letterSpacing: 0.1),\n            );\n\n  @override\n  MoonSwitchSizes copyWith({\n    MoonTokens? tokens,\n    MoonSwitchSizeProperties? x2s,\n    MoonSwitchSizeProperties? xs,\n    MoonSwitchSizeProperties? sm,\n  }) {\n    return MoonSwitchSizes(\n      tokens: tokens ?? this.tokens,\n      x2s: x2s ?? this.x2s,\n      xs: xs ?? this.xs,\n      sm: sm ?? this.sm,\n    );\n  }\n\n  @override\n  MoonSwitchSizes lerp(ThemeExtension<MoonSwitchSizes>? other, double t) {\n    if (other is! MoonSwitchSizes) return this;\n\n    return MoonSwitchSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      x2s: x2s.lerp(other.x2s, t),\n      xs: xs.lerp(other.xs, t),\n      sm: sm.lerp(other.sm, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonSwitchSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonSwitchSizeProperties>(\"x2s\", x2s))\n      ..add(DiagnosticsProperty<MoonSwitchSizeProperties>(\"xs\", xs))\n      ..add(DiagnosticsProperty<MoonSwitchSizeProperties>(\"sm\", sm));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/switch/switch_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/switch/switch_colors.dart';\nimport 'package:moon_design/src/theme/switch/switch_properties.dart';\nimport 'package:moon_design/src/theme/switch/switch_shadows.dart';\nimport 'package:moon_design/src/theme/switch/switch_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonSwitchTheme extends ThemeExtension<MoonSwitchTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonSwitch.\n  final MoonSwitchColors colors;\n\n  /// The properties of the MoonSwitch.\n  final MoonSwitchProperties properties;\n\n  /// The shadows of the MoonSwitch.\n  final MoonSwitchShadows shadows;\n\n  /// The sizes of the MoonSwitch.\n  final MoonSwitchSizes sizes;\n\n  MoonSwitchTheme({\n    required this.tokens,\n    MoonSwitchColors? colors,\n    MoonSwitchProperties? properties,\n    MoonSwitchShadows? shadows,\n    MoonSwitchSizes? sizes,\n  })  : colors = colors ??\n            MoonSwitchColors(\n              activeTrackColor: tokens.colors.piccolo,\n              inactiveTrackColor: tokens.colors.beerus,\n              activeTextColor: tokens.colors.goten,\n              inactiveTextColor: tokens.colors.bulma,\n              activeIconColor: tokens.colors.goten,\n              inactiveIconColor: tokens.colors.bulma,\n              thumbIconColor: tokens.colors.popo,\n              thumbColor: tokens.colors.goten,\n            ),\n        properties = properties ??\n            MoonSwitchProperties(\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n            ),\n        shadows = shadows ??\n            MoonSwitchShadows(\n              thumbShadows: tokens.shadows.sm,\n            ),\n        sizes = sizes ?? MoonSwitchSizes(tokens: tokens);\n\n  @override\n  MoonSwitchTheme copyWith({\n    MoonTokens? tokens,\n    MoonSwitchColors? colors,\n    MoonSwitchProperties? properties,\n    MoonSwitchShadows? shadows,\n    MoonSwitchSizes? sizes,\n  }) {\n    return MoonSwitchTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      shadows: shadows ?? this.shadows,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonSwitchTheme lerp(ThemeExtension<MoonSwitchTheme>? other, double t) {\n    if (other is! MoonSwitchTheme) return this;\n\n    return MoonSwitchTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      shadows: shadows.lerp(other.shadows, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonSwitchTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonSwitchColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonSwitchProperties>(\"properties\", properties))\n      ..add(DiagnosticsProperty<MoonSwitchShadows>(\"shadows\", shadows))\n      ..add(DiagnosticsProperty<MoonSwitchSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tab_bar/tab_bar_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonTabBarColors extends ThemeExtension<MoonTabBarColors>\n    with DiagnosticableTreeMixin {\n  /// The color of the MoonTabBar tab indicator.\n  final Color indicatorColor;\n\n  /// The text color of the MoonTabBar.\n  final Color textColor;\n\n  /// The text color of the selected MoonTabBar tab.\n  final Color selectedTextColor;\n\n  /// The text color of the selected MoonTabBar pill tab.\n  final Color selectedPillTextColor;\n\n  /// The background color of the selected MoonTabBar pill tab.\n  final Color selectedPillTabColor;\n\n  const MoonTabBarColors({\n    required this.indicatorColor,\n    required this.textColor,\n    required this.selectedTextColor,\n    required this.selectedPillTextColor,\n    required this.selectedPillTabColor,\n  });\n\n  @override\n  MoonTabBarColors copyWith({\n    Color? indicatorColor,\n    Color? textColor,\n    Color? selectedTextColor,\n    Color? selectedPillTextColor,\n    Color? selectedPillTabColor,\n  }) {\n    return MoonTabBarColors(\n      indicatorColor: indicatorColor ?? this.indicatorColor,\n      textColor: textColor ?? this.textColor,\n      selectedTextColor: selectedTextColor ?? this.selectedTextColor,\n      selectedPillTextColor:\n          selectedPillTextColor ?? this.selectedPillTextColor,\n      selectedPillTabColor: selectedPillTabColor ?? this.selectedPillTabColor,\n    );\n  }\n\n  @override\n  MoonTabBarColors lerp(ThemeExtension<MoonTabBarColors>? other, double t) {\n    if (other is! MoonTabBarColors) return this;\n\n    return MoonTabBarColors(\n      indicatorColor: colorPremulLerp(indicatorColor, other.indicatorColor, t)!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      selectedTextColor:\n          colorPremulLerp(selectedTextColor, other.selectedTextColor, t)!,\n      selectedPillTextColor: colorPremulLerp(\n        selectedPillTextColor,\n        other.selectedPillTextColor,\n        t,\n      )!,\n      selectedPillTabColor:\n          colorPremulLerp(selectedPillTabColor, other.selectedPillTabColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTabBarColors\"))\n      ..add(ColorProperty(\"indicatorColor\", indicatorColor))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"selectedTextColor\", selectedTextColor))\n      ..add(ColorProperty(\"selectedPillTextColor\", selectedPillTextColor))\n      ..add(ColorProperty(\"selectedPillTabColor\", selectedPillTabColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tab_bar/tab_bar_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTabBarProperties extends ThemeExtension<MoonTabBarProperties>\n    with DiagnosticableTreeMixin {\n  /// The gap between the MoonTabBar tabs.\n  final double gap;\n\n  /// The duration of the MoonTabBar transition animation.\n  final Duration transitionDuration;\n\n  /// The curve of the MoonTabBar transition animation.\n  final Curve transitionCurve;\n\n  const MoonTabBarProperties({\n    required this.gap,\n    required this.transitionDuration,\n    required this.transitionCurve,\n  });\n\n  @override\n  MoonTabBarProperties copyWith({\n    double? gap,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n  }) {\n    return MoonTabBarProperties(\n      gap: gap ?? this.gap,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n    );\n  }\n\n  @override\n  MoonTabBarProperties lerp(\n    ThemeExtension<MoonTabBarProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonTabBarProperties) return this;\n\n    return MoonTabBarProperties(\n      gap: lerpDouble(gap, other.gap, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonTabBarProperties\"),\n      )\n      ..add(\n        DoubleProperty(\"gap\", gap),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tab_bar/tab_bar_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTabBarSizeProperties extends ThemeExtension<MoonTabBarSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonTabBar pill tab.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The height of the MoonTabBar.\n  final double height;\n\n  /// The size value of the MoonTabBar icon.\n  final double iconSizeValue;\n\n  /// The height of the MoonTabBar tab indicator.\n  final double indicatorHeight;\n\n  /// The horizontal gap between the leading, label and trailing widgets of the\n  /// MoonTabBar tab.\n  final double tabGap;\n\n  /// The padding of the MoonTabBar tab.\n  final EdgeInsetsGeometry tabPadding;\n\n  /// The text style of the MoonTabBar.\n  final TextStyle textStyle;\n\n  const MoonTabBarSizeProperties({\n    required this.borderRadius,\n    required this.height,\n    required this.iconSizeValue,\n    required this.indicatorHeight,\n    required this.tabGap,\n    required this.tabPadding,\n    required this.textStyle,\n  });\n\n  @override\n  MoonTabBarSizeProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? height,\n    double? iconSizeValue,\n    double? indicatorHeight,\n    double? tabGap,\n    EdgeInsetsGeometry? tabPadding,\n    TextStyle? textStyle,\n  }) {\n    return MoonTabBarSizeProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      height: height ?? this.height,\n      iconSizeValue: iconSizeValue ?? this.iconSizeValue,\n      indicatorHeight: indicatorHeight ?? this.indicatorHeight,\n      tabGap: tabGap ?? this.tabGap,\n      tabPadding: tabPadding ?? this.tabPadding,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonTabBarSizeProperties lerp(\n    ThemeExtension<MoonTabBarSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonTabBarSizeProperties) return this;\n\n    return MoonTabBarSizeProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      height: lerpDouble(height, other.height, t)!,\n      iconSizeValue: lerpDouble(iconSizeValue, other.iconSizeValue, t)!,\n      indicatorHeight: lerpDouble(indicatorHeight, other.indicatorHeight, t)!,\n      tabGap: lerpDouble(tabGap, other.tabGap, t)!,\n      tabPadding: EdgeInsetsGeometry.lerp(tabPadding, other.tabPadding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonTabBarSizeProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"height\", height),\n      )\n      ..add(\n        DoubleProperty(\"iconSizeValue\", iconSizeValue),\n      )\n      ..add(\n        DoubleProperty(\"indicatorHeight\", indicatorHeight),\n      )\n      ..add(\n        DoubleProperty(\"tabGap\", tabGap),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\"tabPadding\", tabPadding),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tab_bar/tab_bar_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/tab_bar/tab_bar_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonTabBarSizes extends ThemeExtension<MoonTabBarSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the small MoonTabBar.\n  final MoonTabBarSizeProperties sm;\n\n  /// The properties of the medium MoonTabBar.\n  final MoonTabBarSizeProperties md;\n\n  MoonTabBarSizes({\n    required this.tokens,\n    MoonTabBarSizeProperties? sm,\n    MoonTabBarSizeProperties? md,\n  })  : sm = sm ??\n            MoonTabBarSizeProperties(\n              borderRadius: tokens.borders.interactiveXs,\n              tabGap: tokens.sizes.x5s,\n              height: tokens.sizes.sm,\n              iconSizeValue: tokens.sizes.xs,\n              indicatorHeight: tokens.sizes.x6s,\n              tabPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              textStyle: tokens.typography.heading.textDefault,\n            ),\n        md = md ??\n            MoonTabBarSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              tabGap: tokens.sizes.x4s,\n              height: tokens.sizes.md,\n              iconSizeValue: tokens.sizes.xs,\n              indicatorHeight: tokens.sizes.x6s,\n              tabPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x2s),\n              textStyle: tokens.typography.heading.textDefault,\n            );\n\n  @override\n  MoonTabBarSizes copyWith({\n    MoonTokens? tokens,\n    MoonTabBarSizeProperties? sm,\n    MoonTabBarSizeProperties? md,\n  }) {\n    return MoonTabBarSizes(\n      tokens: tokens ?? this.tokens,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n    );\n  }\n\n  @override\n  MoonTabBarSizes lerp(ThemeExtension<MoonTabBarSizes>? other, double t) {\n    if (other is! MoonTabBarSizes) return this;\n\n    return MoonTabBarSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      sm: sm.lerp(other.sm, t),\n      md: md.lerp(other.md, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTabBarSizes\"))\n      ..add(DiagnosticsProperty<MoonTabBarSizeProperties>(\"sm\", sm))\n      ..add(DiagnosticsProperty<MoonTabBarSizeProperties>(\"md\", md));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tab_bar/tab_bar_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/tab_bar/tab_bar_colors.dart';\nimport 'package:moon_design/src/theme/tab_bar/tab_bar_properties.dart';\nimport 'package:moon_design/src/theme/tab_bar/tab_bar_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonTabBarTheme extends ThemeExtension<MoonTabBarTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonTabBar.\n  final MoonTabBarColors colors;\n\n  /// The properties of the MoonTabBar.\n  final MoonTabBarProperties properties;\n\n  /// The sizes of the MoonTabBar.\n  final MoonTabBarSizes sizes;\n\n  MoonTabBarTheme({\n    required this.tokens,\n    MoonTabBarColors? colors,\n    MoonTabBarProperties? properties,\n    MoonTabBarSizes? sizes,\n  })  : colors = colors ??\n            MoonTabBarColors(\n              indicatorColor: tokens.colors.piccolo,\n              textColor: tokens.colors.textPrimary,\n              selectedTextColor: tokens.colors.piccolo,\n              selectedPillTextColor: tokens.colors.textPrimary,\n              selectedPillTabColor: tokens.colors.goku,\n            ),\n        properties = properties ??\n            MoonTabBarProperties(\n              gap: tokens.sizes.x5s,\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n            ),\n        sizes = sizes ?? MoonTabBarSizes(tokens: tokens);\n\n  @override\n  MoonTabBarTheme copyWith({\n    MoonTokens? tokens,\n    MoonTabBarColors? colors,\n    MoonTabBarProperties? properties,\n    MoonTabBarSizes? sizes,\n  }) {\n    return MoonTabBarTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonTabBarTheme lerp(ThemeExtension<MoonTabBarTheme>? other, double t) {\n    if (other is! MoonTabBarTheme) return this;\n\n    return MoonTabBarTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTabBarTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonTabBarColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonTabBarProperties>(\"properties\", properties))\n      ..add(DiagnosticsProperty<MoonTabBarSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/table/table_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonTableColors extends ThemeExtension<MoonTableColors>\n    with DiagnosticableTreeMixin {\n  /// The text color of the MoonTable column.\n  final Color columnTextColor;\n\n  /// The text color of the MoonTable row.\n  final Color rowTextColor;\n\n  /// The text color of the MoonTable row label.\n  final Color rowLabelTextColor;\n\n  /// The text color of the MoonTable row pinned and animated label.\n  final Color rowPinnedAnimatedLabelTextColor;\n\n  /// The icon color of the MoonTable.\n  final Color iconColor;\n\n  /// The background color of the MoonTable row.\n  final Color rowBackgroundColor;\n\n  const MoonTableColors({\n    required this.columnTextColor,\n    required this.rowTextColor,\n    required this.rowLabelTextColor,\n    required this.rowPinnedAnimatedLabelTextColor,\n    required this.iconColor,\n    required this.rowBackgroundColor,\n  });\n\n  @override\n  MoonTableColors copyWith({\n    Color? columnTextColor,\n    Color? rowTextColor,\n    Color? rowLabelTextColor,\n    Color? rowPinnedAnimatedLabelTextColor,\n    Color? iconColor,\n    Color? rowBackgroundColor,\n  }) {\n    return MoonTableColors(\n      columnTextColor: columnTextColor ?? this.columnTextColor,\n      rowTextColor: rowTextColor ?? this.rowTextColor,\n      rowLabelTextColor: rowLabelTextColor ?? this.rowLabelTextColor,\n      rowPinnedAnimatedLabelTextColor: rowPinnedAnimatedLabelTextColor ??\n          this.rowPinnedAnimatedLabelTextColor,\n      iconColor: iconColor ?? this.iconColor,\n      rowBackgroundColor: rowBackgroundColor ?? this.rowBackgroundColor,\n    );\n  }\n\n  @override\n  MoonTableColors lerp(ThemeExtension<MoonTableColors>? other, double t) {\n    if (other is! MoonTableColors) return this;\n\n    return MoonTableColors(\n      columnTextColor:\n          colorPremulLerp(columnTextColor, other.columnTextColor, t)!,\n      rowTextColor: colorPremulLerp(rowTextColor, other.rowTextColor, t)!,\n      rowLabelTextColor:\n          colorPremulLerp(rowLabelTextColor, other.rowLabelTextColor, t)!,\n      rowPinnedAnimatedLabelTextColor: colorPremulLerp(\n        rowPinnedAnimatedLabelTextColor,\n        other.rowPinnedAnimatedLabelTextColor,\n        t,\n      )!,\n      iconColor: colorPremulLerp(\n        iconColor,\n        other.iconColor,\n        t,\n      )!,\n      rowBackgroundColor: colorPremulLerp(\n        rowBackgroundColor,\n        other.rowBackgroundColor,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTableColors\"))\n      ..add(ColorProperty(\"columnTextColor\", columnTextColor))\n      ..add(ColorProperty(\"rowTextColor\", rowTextColor))\n      ..add(ColorProperty(\"rowLabelTextColor\", rowLabelTextColor))\n      ..add(\n        ColorProperty(\n          \"rowPinnedAnimatedLabelTextColor\",\n          rowPinnedAnimatedLabelTextColor,\n        ),\n      )\n      ..add(\n        ColorProperty(\n          \"iconColor\",\n          iconColor,\n        ),\n      )\n      ..add(\n        ColorProperty(\n          \"rowBackgroundColor\",\n          rowBackgroundColor,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/table/table_properties.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTableProperties extends ThemeExtension<MoonTableProperties>\n    with DiagnosticableTreeMixin {\n  /// The duration of the MoonTable row label transition animation during horizontal scrolling.\n  final Duration transitionDuration;\n\n  /// The curve of the MoonTable row label transition animation during horizontal scrolling.\n  final Curve transitionCurve;\n\n  const MoonTableProperties({\n    required this.transitionDuration,\n    required this.transitionCurve,\n  });\n\n  @override\n  MoonTableProperties copyWith({\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n  }) {\n    return MoonTableProperties(\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n    );\n  }\n\n  @override\n  MoonTableProperties lerp(\n    ThemeExtension<MoonTableProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonTableProperties) return this;\n\n    return MoonTableProperties(\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonTableProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/table/table_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTableSizeProperties extends ThemeExtension<MoonTableSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonTable row.\n  final BorderRadiusGeometry rowBorderRadius;\n\n  /// The vertical gap between the MoonTable rows.\n  final double rowGap;\n\n  /// The height of the MoonTable row.\n  final double rowHeight;\n\n  /// The horizontal gap between the MoonTable column label and sort icon.\n  final double sortIconGap;\n\n  /// The size value of the MoonTable column sort icon.\n  final double sortIconSizeValue;\n\n  /// The padding of the MoonTable cell.\n  final EdgeInsetsGeometry cellPadding;\n\n  /// The padding of the MoonTable row label.\n  final EdgeInsetsGeometry rowLabelPadding;\n\n  /// The text style of the MoonTable column.\n  final TextStyle columnTextStyle;\n\n  /// The text style of the MoonTable row.\n  final TextStyle rowTextStyle;\n\n  /// The text style of the MoonTable row label.\n  final TextStyle rowLabelTextStyle;\n\n  /// The text style of the MoonTable row pinned and animated label.\n  final TextStyle rowPinnedAnimatedLabelTextStyle;\n\n  const MoonTableSizeProperties({\n    required this.rowBorderRadius,\n    required this.rowGap,\n    required this.rowHeight,\n    required this.sortIconGap,\n    required this.sortIconSizeValue,\n    required this.cellPadding,\n    required this.rowLabelPadding,\n    required this.columnTextStyle,\n    required this.rowTextStyle,\n    required this.rowLabelTextStyle,\n    required this.rowPinnedAnimatedLabelTextStyle,\n  });\n\n  @override\n  MoonTableSizeProperties copyWith({\n    BorderRadiusGeometry? rowBorderRadius,\n    double? rowGap,\n    double? rowHeight,\n    double? sortIconGap,\n    double? sortIconSizeValue,\n    EdgeInsetsGeometry? cellPadding,\n    EdgeInsetsGeometry? rowLabelPadding,\n    TextStyle? columnTextStyle,\n    TextStyle? rowTextStyle,\n    TextStyle? rowLabelTextStyle,\n    TextStyle? rowPinnedAnimatedLabelTextStyle,\n  }) {\n    return MoonTableSizeProperties(\n      rowBorderRadius: rowBorderRadius ?? this.rowBorderRadius,\n      rowGap: rowGap ?? this.rowGap,\n      rowHeight: rowHeight ?? this.rowHeight,\n      sortIconGap: sortIconGap ?? this.sortIconGap,\n      sortIconSizeValue: sortIconSizeValue ?? this.sortIconSizeValue,\n      cellPadding: cellPadding ?? this.cellPadding,\n      rowLabelPadding: rowLabelPadding ?? this.rowLabelPadding,\n      columnTextStyle: columnTextStyle ?? this.columnTextStyle,\n      rowTextStyle: rowTextStyle ?? this.rowTextStyle,\n      rowLabelTextStyle: rowLabelTextStyle ?? this.rowLabelTextStyle,\n      rowPinnedAnimatedLabelTextStyle: rowPinnedAnimatedLabelTextStyle ??\n          this.rowPinnedAnimatedLabelTextStyle,\n    );\n  }\n\n  @override\n  MoonTableSizeProperties lerp(\n    ThemeExtension<MoonTableSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonTableSizeProperties) return this;\n\n    return MoonTableSizeProperties(\n      rowBorderRadius:\n          BorderRadiusGeometry.lerp(rowBorderRadius, other.rowBorderRadius, t)!,\n      rowGap: lerpDouble(rowGap, other.rowGap, t)!,\n      rowHeight: lerpDouble(rowHeight, other.rowHeight, t)!,\n      sortIconGap: lerpDouble(sortIconGap, other.sortIconGap, t)!,\n      sortIconSizeValue:\n          lerpDouble(sortIconSizeValue, other.sortIconSizeValue, t)!,\n      cellPadding: EdgeInsetsGeometry.lerp(cellPadding, other.cellPadding, t)!,\n      rowLabelPadding:\n          EdgeInsetsGeometry.lerp(rowLabelPadding, other.rowLabelPadding, t)!,\n      columnTextStyle:\n          TextStyle.lerp(columnTextStyle, other.columnTextStyle, t)!,\n      rowTextStyle: TextStyle.lerp(rowTextStyle, other.rowTextStyle, t)!,\n      rowLabelTextStyle:\n          TextStyle.lerp(rowLabelTextStyle, other.rowLabelTextStyle, t)!,\n      rowPinnedAnimatedLabelTextStyle: TextStyle.lerp(\n        rowPinnedAnimatedLabelTextStyle,\n        other.rowPinnedAnimatedLabelTextStyle,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\n          \"type\",\n          \"MoonTableSizeProperties\",\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\n          \"rowBorderRadius\",\n          rowBorderRadius,\n        ),\n      )\n      ..add(DoubleProperty(\"rowGap\", rowGap))\n      ..add(DoubleProperty(\"rowHeight\", rowHeight))\n      ..add(DoubleProperty(\"sortIconGap\", sortIconGap))\n      ..add(DoubleProperty(\"sortIconSizeValue\", sortIconSizeValue))\n      ..add(DiagnosticsProperty<EdgeInsetsGeometry>(\"cellPadding\", cellPadding))\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\n          \"rowLabelPadding\",\n          rowLabelPadding,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"columnTextStyle\",\n          columnTextStyle,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"rowTextStyle\",\n          rowTextStyle,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"rowLabelTextStyle\",\n          rowLabelTextStyle,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"rowPinnedAnimatedLabelTextStyle\",\n          rowPinnedAnimatedLabelTextStyle,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/table/table_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/table/table_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonTableSizes extends ThemeExtension<MoonTableSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the extra small MoonTable.\n  final MoonTableSizeProperties xs;\n\n  /// The properties of the small MoonTable.\n  final MoonTableSizeProperties sm;\n\n  /// The properties of the medium MoonTable.\n  final MoonTableSizeProperties md;\n\n  /// The properties of the large MoonTable.\n  final MoonTableSizeProperties lg;\n\n  /// The properties of the extra large MoonTable.\n  final MoonTableSizeProperties xl;\n\n  /// The properties of the (2x) extra large MoonTable.\n  final MoonTableSizeProperties x2l;\n\n  MoonTableSizes({\n    required this.tokens,\n    MoonTableSizeProperties? xs,\n    MoonTableSizeProperties? sm,\n    MoonTableSizeProperties? md,\n    MoonTableSizeProperties? lg,\n    MoonTableSizeProperties? xl,\n    MoonTableSizeProperties? x2l,\n  })  : xs = xs ??\n            MoonTableSizeProperties(\n              rowBorderRadius: tokens.borders.interactiveXs,\n              rowGap: tokens.sizes.x5s,\n              rowHeight: tokens.sizes.xs,\n              sortIconSizeValue: tokens.sizes.x2s,\n              sortIconGap: tokens.sizes.x5s,\n              cellPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x4s),\n              rowLabelPadding:\n                  EdgeInsets.symmetric(horizontal: tokens.sizes.x4s),\n              columnTextStyle: tokens.typography.heading.text12,\n              rowTextStyle: tokens.typography.body.text12,\n              rowLabelTextStyle: tokens.typography.body.text12,\n              rowPinnedAnimatedLabelTextStyle: tokens.typography.body.text12,\n            ),\n        sm = sm ??\n            MoonTableSizeProperties(\n              rowBorderRadius: tokens.borders.interactiveXs,\n              rowGap: tokens.sizes.x5s,\n              rowHeight: tokens.sizes.sm,\n              sortIconSizeValue: tokens.sizes.x2s,\n              sortIconGap: tokens.sizes.x5s,\n              cellPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              rowLabelPadding:\n                  EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              columnTextStyle: tokens.typography.heading.textDefault,\n              rowTextStyle: tokens.typography.body.textDefault,\n              rowLabelTextStyle: tokens.typography.body.textDefault,\n              rowPinnedAnimatedLabelTextStyle:\n                  tokens.typography.body.textDefault,\n            ),\n        md = md ??\n            MoonTableSizeProperties(\n              rowBorderRadius: tokens.borders.interactiveSm,\n              rowGap: tokens.sizes.x5s,\n              rowHeight: tokens.sizes.md,\n              sortIconSizeValue: tokens.sizes.x2s,\n              sortIconGap: tokens.sizes.x5s,\n              cellPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              rowLabelPadding:\n                  EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              columnTextStyle: tokens.typography.heading.textDefault,\n              rowTextStyle: tokens.typography.body.textDefault,\n              rowLabelTextStyle: tokens.typography.body.textDefault,\n              rowPinnedAnimatedLabelTextStyle:\n                  tokens.typography.body.textDefault,\n            ),\n        lg = lg ??\n            MoonTableSizeProperties(\n              rowBorderRadius: tokens.borders.interactiveSm,\n              rowGap: tokens.sizes.x5s,\n              rowHeight: tokens.sizes.lg,\n              sortIconSizeValue: tokens.sizes.x2s,\n              sortIconGap: tokens.sizes.x5s,\n              cellPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              rowLabelPadding:\n                  EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              columnTextStyle: tokens.typography.heading.textDefault,\n              rowTextStyle: tokens.typography.body.textDefault,\n              rowLabelTextStyle: tokens.typography.body.textDefault,\n              rowPinnedAnimatedLabelTextStyle:\n                  tokens.typography.body.textDefault,\n            ),\n        xl = xl ??\n            MoonTableSizeProperties(\n              rowBorderRadius: tokens.borders.interactiveMd,\n              rowGap: tokens.sizes.x5s,\n              rowHeight: tokens.sizes.xl,\n              sortIconSizeValue: tokens.sizes.x2s,\n              sortIconGap: tokens.sizes.x5s,\n              cellPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              rowLabelPadding:\n                  EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              columnTextStyle: tokens.typography.heading.textDefault,\n              rowTextStyle: tokens.typography.body.textDefault,\n              rowLabelTextStyle: tokens.typography.body.textDefault,\n              rowPinnedAnimatedLabelTextStyle:\n                  tokens.typography.body.textDefault,\n            ),\n        x2l = x2l ??\n            MoonTableSizeProperties(\n              rowBorderRadius: tokens.borders.interactiveMd,\n              rowGap: tokens.sizes.x5s,\n              rowHeight: tokens.sizes.x2l,\n              sortIconSizeValue: tokens.sizes.x2s,\n              sortIconGap: tokens.sizes.x5s,\n              cellPadding: EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              rowLabelPadding:\n                  EdgeInsets.symmetric(horizontal: tokens.sizes.x3s),\n              columnTextStyle: tokens.typography.heading.textDefault,\n              rowTextStyle: tokens.typography.body.textDefault,\n              rowLabelTextStyle: tokens.typography.body.textDefault,\n              rowPinnedAnimatedLabelTextStyle:\n                  tokens.typography.body.textDefault,\n            );\n\n  @override\n  MoonTableSizes copyWith({\n    MoonTokens? tokens,\n    MoonTableSizeProperties? xs,\n    MoonTableSizeProperties? sm,\n    MoonTableSizeProperties? md,\n    MoonTableSizeProperties? lg,\n    MoonTableSizeProperties? xl,\n    MoonTableSizeProperties? x2l,\n  }) {\n    return MoonTableSizes(\n      tokens: tokens ?? this.tokens,\n      xs: xs ?? this.xs,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n      lg: lg ?? this.lg,\n      xl: xl ?? this.xl,\n      x2l: x2l ?? this.x2l,\n    );\n  }\n\n  @override\n  MoonTableSizes lerp(ThemeExtension<MoonTableSizes>? other, double t) {\n    if (other is! MoonTableSizes) return this;\n\n    return MoonTableSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      xs: xs.lerp(other.xs, t),\n      sm: sm.lerp(other.sm, t),\n      md: md.lerp(other.md, t),\n      lg: lg.lerp(other.lg, t),\n      xl: xl.lerp(other.xl, t),\n      x2l: x2l.lerp(other.x2l, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTableSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonTableSizeProperties>(\"xs\", xs))\n      ..add(DiagnosticsProperty<MoonTableSizeProperties>(\"sm\", sm))\n      ..add(DiagnosticsProperty<MoonTableSizeProperties>(\"md\", md))\n      ..add(DiagnosticsProperty<MoonTableSizeProperties>(\"lg\", lg))\n      ..add(DiagnosticsProperty<MoonTableSizeProperties>(\"xl\", xl))\n      ..add(DiagnosticsProperty<MoonTableSizeProperties>(\"x2l\", x2l));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/table/table_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/table/table_colors.dart';\nimport 'package:moon_design/src/theme/table/table_properties.dart';\nimport 'package:moon_design/src/theme/table/table_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonTableTheme extends ThemeExtension<MoonTableTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonTable.\n  final MoonTableColors colors;\n\n  /// The properties of the MoonTable.\n  final MoonTableProperties properties;\n\n  /// The sizes of the MoonTable.\n  final MoonTableSizes sizes;\n\n  MoonTableTheme({\n    required this.tokens,\n    MoonTableColors? colors,\n    MoonTableProperties? properties,\n    MoonTableSizes? sizes,\n  })  : colors = colors ??\n            MoonTableColors(\n              columnTextColor: tokens.colors.textPrimary,\n              rowTextColor: tokens.colors.textPrimary,\n              rowLabelTextColor: tokens.colors.textPrimary,\n              rowPinnedAnimatedLabelTextColor: tokens.colors.trunks,\n              iconColor: tokens.colors.iconPrimary,\n              rowBackgroundColor: tokens.colors.goku,\n            ),\n        properties = properties ??\n            MoonTableProperties(\n              transitionDuration: const Duration(milliseconds: 400),\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n            ),\n        sizes = sizes ?? MoonTableSizes(tokens: tokens);\n\n  @override\n  MoonTableTheme copyWith({\n    MoonTokens? tokens,\n    MoonTableColors? colors,\n    MoonTableProperties? properties,\n    MoonTableSizes? sizes,\n  }) {\n    return MoonTableTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonTableTheme lerp(ThemeExtension<MoonTableTheme>? other, double t) {\n    if (other is! MoonTableTheme) return this;\n\n    return MoonTableTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTableTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonTableColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonTableProperties>(\"properties\", properties))\n      ..add(DiagnosticsProperty<MoonTableSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tag/tag_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonTagColors extends ThemeExtension<MoonTagColors>\n    with DiagnosticableTreeMixin {\n  /// The text color of the MoonTag.\n  final Color textColor;\n\n  /// The icon color of the MoonTag.\n  final Color iconColor;\n\n  /// The background color of the MoonTag.\n  final Color backgroundColor;\n\n  const MoonTagColors({\n    required this.textColor,\n    required this.iconColor,\n    required this.backgroundColor,\n  });\n\n  @override\n  MoonTagColors copyWith({\n    Color? textColor,\n    Color? iconColor,\n    Color? backgroundColor,\n  }) {\n    return MoonTagColors(\n      textColor: textColor ?? this.textColor,\n      iconColor: iconColor ?? this.iconColor,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n    );\n  }\n\n  @override\n  MoonTagColors lerp(ThemeExtension<MoonTagColors>? other, double t) {\n    if (other is! MoonTagColors) return this;\n\n    return MoonTagColors(\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTagColors\"))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tag/tag_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTagSizeProperties extends ThemeExtension<MoonTagSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonTag.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The horizontal gap between the leading, label and trailing widgets of the\n  /// MoonTag.\n  final double gap;\n\n  /// The height of the MoonTag.\n  final double height;\n\n  /// The size value of the MoonTag icon.\n  final double iconSizeValue;\n\n  /// The padding of the MoonTag.\n  final EdgeInsetsGeometry padding;\n\n  /// The text style of the MoonTag.\n  final TextStyle textStyle;\n\n  const MoonTagSizeProperties({\n    required this.borderRadius,\n    required this.gap,\n    required this.height,\n    required this.iconSizeValue,\n    required this.padding,\n    required this.textStyle,\n  });\n\n  @override\n  MoonTagSizeProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? gap,\n    double? height,\n    double? iconSizeValue,\n    EdgeInsetsGeometry? padding,\n    TextStyle? textStyle,\n  }) {\n    return MoonTagSizeProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      gap: gap ?? this.gap,\n      height: height ?? this.height,\n      iconSizeValue: iconSizeValue ?? this.iconSizeValue,\n      padding: padding ?? this.padding,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonTagSizeProperties lerp(\n    ThemeExtension<MoonTagSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonTagSizeProperties) return this;\n\n    return MoonTagSizeProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      gap: lerpDouble(gap, other.gap, t)!,\n      height: lerpDouble(height, other.height, t)!,\n      iconSizeValue: lerpDouble(iconSizeValue, other.iconSizeValue, t)!,\n      padding: EdgeInsetsGeometry.lerp(padding, other.padding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\n          \"type\",\n          \"MoonTagSizeProperties\",\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\n          \"borderRadius\",\n          borderRadius,\n        ),\n      )\n      ..add(DoubleProperty(\"gap\", gap))\n      ..add(DoubleProperty(\"height\", height))\n      ..add(DoubleProperty(\"iconSizeValue\", iconSizeValue))\n      ..add(DiagnosticsProperty<EdgeInsetsGeometry>(\"padding\", padding))\n      ..add(DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tag/tag_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/tag/tag_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonTagSizes extends ThemeExtension<MoonTagSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the (2x) extra small MoonTag.\n  final MoonTagSizeProperties x2s;\n\n  /// The properties of the extra small MoonTag.\n  final MoonTagSizeProperties xs;\n\n  /// The properties of the small MoonTag.\n  final MoonTagSizeProperties sm;\n\n  MoonTagSizes({\n    required this.tokens,\n    MoonTagSizeProperties? x2s,\n    MoonTagSizeProperties? xs,\n    MoonTagSizeProperties? sm,\n  })  : x2s = x2s ??\n            MoonTagSizeProperties(\n              borderRadius: tokens.borders.interactiveXs,\n              gap: tokens.sizes.x6s,\n              height: tokens.sizes.x2s,\n              iconSizeValue: tokens.sizes.x3s,\n              padding: EdgeInsets.symmetric(horizontal: tokens.sizes.x4s),\n              textStyle: tokens.typography.body.text9,\n            ),\n        xs = xs ??\n            MoonTagSizeProperties(\n              borderRadius: tokens.borders.interactiveXs,\n              gap: tokens.sizes.x6s,\n              height: tokens.sizes.xs,\n              iconSizeValue: tokens.sizes.x2s,\n              padding: EdgeInsets.symmetric(horizontal: tokens.sizes.x4s),\n              textStyle: tokens.typography.body.text12,\n            ),\n        sm = sm ??\n            MoonTagSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              gap: tokens.sizes.x4s,\n              height: tokens.sizes.sm,\n              iconSizeValue: tokens.sizes.x2s,\n              padding: EdgeInsets.symmetric(horizontal: tokens.sizes.x2s),\n              textStyle: tokens.typography.body.text12,\n            );\n\n  @override\n  MoonTagSizes copyWith({\n    MoonTokens? tokens,\n    MoonTagSizeProperties? x2s,\n    MoonTagSizeProperties? xs,\n    MoonTagSizeProperties? sm,\n  }) {\n    return MoonTagSizes(\n      tokens: tokens ?? this.tokens,\n      x2s: x2s ?? this.x2s,\n      xs: xs ?? this.xs,\n      sm: sm ?? this.sm,\n    );\n  }\n\n  @override\n  MoonTagSizes lerp(ThemeExtension<MoonTagSizes>? other, double t) {\n    if (other is! MoonTagSizes) return this;\n\n    return MoonTagSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      x2s: x2s.lerp(other.x2s, t),\n      xs: xs.lerp(other.xs, t),\n      sm: sm.lerp(other.sm, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTagSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonTagSizeProperties>(\"x2s\", x2s))\n      ..add(DiagnosticsProperty<MoonTagSizeProperties>(\"xs\", xs))\n      ..add(DiagnosticsProperty<MoonTagSizeProperties>(\"sm\", sm));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tag/tag_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/tag/tag_colors.dart';\nimport 'package:moon_design/src/theme/tag/tag_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonTagTheme extends ThemeExtension<MoonTagTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonTag.\n  final MoonTagColors colors;\n\n  /// The sizes of the MoonTag.\n  final MoonTagSizes sizes;\n\n  MoonTagTheme({\n    required this.tokens,\n    MoonTagColors? colors,\n    MoonTagSizes? sizes,\n  })  : colors = colors ??\n            MoonTagColors(\n              textColor: tokens.colors.textPrimary,\n              iconColor: tokens.colors.iconPrimary,\n              backgroundColor: tokens.colors.goku,\n            ),\n        sizes = sizes ?? MoonTagSizes(tokens: tokens);\n\n  @override\n  MoonTagTheme copyWith({\n    MoonTokens? tokens,\n    MoonTagColors? colors,\n    MoonTagSizes? sizes,\n  }) {\n    return MoonTagTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonTagTheme lerp(ThemeExtension<MoonTagTheme>? other, double t) {\n    if (other is! MoonTagTheme) return this;\n\n    return MoonTagTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTagTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonTagColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonTagSizes>(\"sizes\", sizes));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_area/text_area_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonTextAreaColors extends ThemeExtension<MoonTextAreaColors>\n    with DiagnosticableTreeMixin {\n  /// The background color of the MoonTextArea.\n  final Color backgroundColor;\n\n  /// The border color of the active or focused MoonTextArea.\n  final Color activeBorderColor;\n\n  /// The border color of the inactive MoonTextArea.\n  final Color inactiveBorderColor;\n\n  /// The color of the MoonTextArea in error state.\n  final Color errorColor;\n\n  /// The border color of the MoonTextArea on hover.\n  final Color hoverBorderColor;\n\n  /// The text color of the MoonTextArea.\n  final Color textColor;\n\n  /// The text color of the MoonTextArea helper and errorBuilder widgets.\n  final Color helperTextColor;\n\n  const MoonTextAreaColors({\n    required this.backgroundColor,\n    required this.activeBorderColor,\n    required this.inactiveBorderColor,\n    required this.errorColor,\n    required this.hoverBorderColor,\n    required this.textColor,\n    required this.helperTextColor,\n  });\n\n  @override\n  MoonTextAreaColors copyWith({\n    Color? backgroundColor,\n    Color? activeBorderColor,\n    Color? inactiveBorderColor,\n    Color? errorColor,\n    Color? hoverBorderColor,\n    Color? textColor,\n    Color? helperTextColor,\n  }) {\n    return MoonTextAreaColors(\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      activeBorderColor: activeBorderColor ?? this.activeBorderColor,\n      inactiveBorderColor: inactiveBorderColor ?? this.inactiveBorderColor,\n      errorColor: errorColor ?? this.errorColor,\n      hoverBorderColor: hoverBorderColor ?? this.hoverBorderColor,\n      textColor: textColor ?? this.textColor,\n      helperTextColor: helperTextColor ?? this.helperTextColor,\n    );\n  }\n\n  @override\n  MoonTextAreaColors lerp(ThemeExtension<MoonTextAreaColors>? other, double t) {\n    if (other is! MoonTextAreaColors) return this;\n\n    return MoonTextAreaColors(\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      activeBorderColor:\n          colorPremulLerp(activeBorderColor, other.activeBorderColor, t)!,\n      inactiveBorderColor:\n          colorPremulLerp(inactiveBorderColor, other.inactiveBorderColor, t)!,\n      errorColor: colorPremulLerp(errorColor, other.errorColor, t)!,\n      hoverBorderColor:\n          colorPremulLerp(hoverBorderColor, other.hoverBorderColor, t)!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      helperTextColor:\n          colorPremulLerp(helperTextColor, other.helperTextColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTextAreaColors\"))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor))\n      ..add(ColorProperty(\"activeBorderColor\", activeBorderColor))\n      ..add(ColorProperty(\"inactiveBorderColor\", inactiveBorderColor))\n      ..add(ColorProperty(\"errorColor\", errorColor))\n      ..add(ColorProperty(\"hoverBorderColor\", hoverBorderColor))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"helperTextColor\", helperTextColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_area/text_area_properties.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTextAreaProperties extends ThemeExtension<MoonTextAreaProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonTextArea.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The duration of the MoonTextArea transition animation (enable and disable).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonTextArea transition animation (enable and disable).\n  final Curve transitionCurve;\n\n  /// The padding of the MoonTextArea helper and errorBuilder widgets.\n  final EdgeInsetsGeometry helperPadding;\n\n  /// The padding of the MoonTextArea text.\n  final EdgeInsetsGeometry textPadding;\n\n  /// The text style of the MoonTextArea.\n  final TextStyle textStyle;\n\n  /// The text style of the MoonTextArea helper and errorBuilder widgets.\n  final TextStyle helperTextStyle;\n\n  const MoonTextAreaProperties({\n    required this.borderRadius,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.helperPadding,\n    required this.textPadding,\n    required this.textStyle,\n    required this.helperTextStyle,\n  });\n\n  @override\n  MoonTextAreaProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    EdgeInsetsGeometry? helperPadding,\n    EdgeInsetsGeometry? textPadding,\n    TextStyle? textStyle,\n    TextStyle? helperTextStyle,\n  }) {\n    return MoonTextAreaProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      helperPadding: helperPadding ?? this.helperPadding,\n      textPadding: textPadding ?? this.textPadding,\n      textStyle: textStyle ?? this.textStyle,\n      helperTextStyle: helperTextStyle ?? this.helperTextStyle,\n    );\n  }\n\n  @override\n  MoonTextAreaProperties lerp(\n    ThemeExtension<MoonTextAreaProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonTextAreaProperties) return this;\n\n    return MoonTextAreaProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      helperPadding:\n          EdgeInsetsGeometry.lerp(helperPadding, other.helperPadding, t)!,\n      textPadding: EdgeInsetsGeometry.lerp(textPadding, other.textPadding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n      helperTextStyle:\n          TextStyle.lerp(helperTextStyle, other.helperTextStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonTextAreaProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\"helperPadding\", helperPadding),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\"textPadding\", textPadding),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"helperTextStyle\", helperTextStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_area/text_area_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/text_area/text_area_colors.dart';\nimport 'package:moon_design/src/theme/text_area/text_area_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonTextAreaTheme extends ThemeExtension<MoonTextAreaTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonTextArea.\n  final MoonTextAreaColors colors;\n\n  /// The properties of the MoonTextArea.\n  final MoonTextAreaProperties properties;\n\n  MoonTextAreaTheme({\n    required this.tokens,\n    MoonTextAreaColors? colors,\n    MoonTextAreaProperties? properties,\n  })  : colors = colors ??\n            MoonTextAreaColors(\n              backgroundColor: tokens.colors.goku,\n              activeBorderColor: tokens.colors.piccolo,\n              inactiveBorderColor: tokens.colors.beerus,\n              errorColor: tokens.colors.chichi,\n              hoverBorderColor: tokens.colors.beerus,\n              textColor: tokens.colors.textPrimary,\n              helperTextColor: tokens.colors.trunks,\n            ),\n        properties = properties ??\n            MoonTextAreaProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n              helperPadding: EdgeInsets.only(top: tokens.sizes.x4s),\n              textPadding: EdgeInsets.all(tokens.sizes.x2s),\n              textStyle: tokens.typography.body.text16,\n              helperTextStyle: tokens.typography.body.text12,\n            );\n\n  @override\n  MoonTextAreaTheme copyWith({\n    MoonTokens? tokens,\n    MoonTextAreaColors? colors,\n    MoonTextAreaProperties? properties,\n  }) {\n    return MoonTextAreaTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonTextAreaTheme lerp(ThemeExtension<MoonTextAreaTheme>? other, double t) {\n    if (other is! MoonTextAreaTheme) return this;\n\n    return MoonTextAreaTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTextAreaTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonTextAreaColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonTextAreaProperties>(\"properties\", properties),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_input/text_input_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonTextInputColors extends ThemeExtension<MoonTextInputColors>\n    with DiagnosticableTreeMixin {\n  /// The background color of the MoonTextInput.\n  final Color backgroundColor;\n\n  /// The border color of the active or focused MoonTextInput.\n  final Color activeBorderColor;\n\n  /// The border color of the inactive MoonTextInput.\n  final Color inactiveBorderColor;\n\n  /// The color of the MoonTextInput in error state.\n  final Color errorColor;\n\n  /// The border color of the MoonTextInput on hover.\n  final Color hoverBorderColor;\n\n  /// The text color of the MoonTextInput.\n  final Color textColor;\n\n  /// The text color of the MoonTextInput helper and errorBuilder widgets.\n  final Color helperTextColor;\n\n  const MoonTextInputColors({\n    required this.backgroundColor,\n    required this.activeBorderColor,\n    required this.inactiveBorderColor,\n    required this.errorColor,\n    required this.hoverBorderColor,\n    required this.textColor,\n    required this.helperTextColor,\n  });\n\n  @override\n  MoonTextInputColors copyWith({\n    Color? backgroundColor,\n    Color? activeBorderColor,\n    Color? inactiveBorderColor,\n    Color? errorColor,\n    Color? hoverBorderColor,\n    Color? textColor,\n    Color? helperTextColor,\n  }) {\n    return MoonTextInputColors(\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      activeBorderColor: activeBorderColor ?? this.activeBorderColor,\n      inactiveBorderColor: inactiveBorderColor ?? this.inactiveBorderColor,\n      errorColor: errorColor ?? this.errorColor,\n      hoverBorderColor: hoverBorderColor ?? this.hoverBorderColor,\n      textColor: textColor ?? this.textColor,\n      helperTextColor: helperTextColor ?? this.helperTextColor,\n    );\n  }\n\n  @override\n  MoonTextInputColors lerp(\n    ThemeExtension<MoonTextInputColors>? other,\n    double t,\n  ) {\n    if (other is! MoonTextInputColors) return this;\n\n    return MoonTextInputColors(\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      activeBorderColor:\n          colorPremulLerp(activeBorderColor, other.activeBorderColor, t)!,\n      inactiveBorderColor:\n          colorPremulLerp(inactiveBorderColor, other.inactiveBorderColor, t)!,\n      errorColor: colorPremulLerp(errorColor, other.errorColor, t)!,\n      hoverBorderColor:\n          colorPremulLerp(hoverBorderColor, other.hoverBorderColor, t)!,\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      helperTextColor:\n          colorPremulLerp(helperTextColor, other.helperTextColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTextInputColors\"))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor))\n      ..add(ColorProperty(\"activeBorderColor\", activeBorderColor))\n      ..add(ColorProperty(\"inactiveBorderColor\", inactiveBorderColor))\n      ..add(ColorProperty(\"errorColor\", errorColor))\n      ..add(ColorProperty(\"hoverBorderColor\", hoverBorderColor))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"helperTextColor\", helperTextColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_input/text_input_properties.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTextInputProperties extends ThemeExtension<MoonTextInputProperties>\n    with DiagnosticableTreeMixin {\n  /// The duration of the MoonTextInput transition animation\n  /// (enable and disable).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonTextInput transition animation (enable and disable).\n  final Curve transitionCurve;\n\n  /// The padding of the MoonTextInput helper and errorBuilder widgets.\n  final EdgeInsetsGeometry helperPadding;\n\n  /// The text style of the MoonTextInput helper and errorBuilder widgets.\n  final TextStyle helperTextStyle;\n\n  const MoonTextInputProperties({\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.helperPadding,\n    required this.helperTextStyle,\n  });\n\n  @override\n  MoonTextInputProperties copyWith({\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    EdgeInsetsGeometry? helperPadding,\n    TextStyle? helperTextStyle,\n  }) {\n    return MoonTextInputProperties(\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      helperPadding: helperPadding ?? this.helperPadding,\n      helperTextStyle: helperTextStyle ?? this.helperTextStyle,\n    );\n  }\n\n  @override\n  MoonTextInputProperties lerp(\n    ThemeExtension<MoonTextInputProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonTextInputProperties) return this;\n\n    return MoonTextInputProperties(\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      helperPadding:\n          EdgeInsetsGeometry.lerp(helperPadding, other.helperPadding, t)!,\n      helperTextStyle:\n          TextStyle.lerp(helperTextStyle, other.helperTextStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonTextInputProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\"helperPadding\", helperPadding),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"helperTextStyle\", helperTextStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_input/text_input_size_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTextInputSizeProperties\n    extends ThemeExtension<MoonTextInputSizeProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonTextInput.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The height of the MoonTextInput.\n  final double height;\n\n  /// The gap between the leading, label and trailing widgets of the\n  /// MoonTextInput.\n  final double gap;\n\n  /// The size value of the MoonTextInput icon.\n  final double iconSizeValue;\n\n  /// The padding of the MoonTextInput.\n  final EdgeInsetsGeometry padding;\n\n  /// The text style of the MoonTextInput.\n  final TextStyle textStyle;\n\n  const MoonTextInputSizeProperties({\n    required this.borderRadius,\n    required this.height,\n    required this.gap,\n    required this.iconSizeValue,\n    required this.padding,\n    required this.textStyle,\n  });\n\n  @override\n  MoonTextInputSizeProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? height,\n    double? gap,\n    double? iconSizeValue,\n    EdgeInsetsGeometry? padding,\n    TextStyle? textStyle,\n  }) {\n    return MoonTextInputSizeProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      height: height ?? this.height,\n      gap: gap ?? this.gap,\n      iconSizeValue: iconSizeValue ?? this.iconSizeValue,\n      padding: padding ?? this.padding,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonTextInputSizeProperties lerp(\n    ThemeExtension<MoonTextInputSizeProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonTextInputSizeProperties) return this;\n\n    return MoonTextInputSizeProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      height: lerpDouble(height, other.height, t)!,\n      gap: lerpDouble(gap, other.gap, t)!,\n      iconSizeValue: lerpDouble(iconSizeValue, other.iconSizeValue, t)!,\n      padding: EdgeInsetsGeometry.lerp(padding, other.padding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonTextInputSizeProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"height\", height),\n      )\n      ..add(\n        DoubleProperty(\"gap\", gap),\n      )\n      ..add(\n        DoubleProperty(\"iconSizeValue\", iconSizeValue),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\"padding\", padding),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_input/text_input_sizes.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/text_input/text_input_size_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonTextInputSizes extends ThemeExtension<MoonTextInputSizes>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The properties of the small MoonTextInput.\n  final MoonTextInputSizeProperties sm;\n\n  /// The properties of the medium MoonTextInput.\n  final MoonTextInputSizeProperties md;\n\n  /// The properties of the large MoonTextInput.\n  final MoonTextInputSizeProperties lg;\n\n  /// The properties of the extra large MoonTextInput.\n  final MoonTextInputSizeProperties xl;\n\n  MoonTextInputSizes({\n    required this.tokens,\n    MoonTextInputSizeProperties? sm,\n    MoonTextInputSizeProperties? md,\n    MoonTextInputSizeProperties? lg,\n    MoonTextInputSizeProperties? xl,\n  })  : sm = sm ??\n            MoonTextInputSizeProperties(\n              borderRadius: tokens.borders.interactiveXs,\n              height: tokens.sizes.sm,\n              gap: tokens.sizes.x4s,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.symmetric(\n                horizontal: tokens.sizes.x4s,\n                vertical: tokens.sizes.x6s,\n              ),\n              textStyle: tokens.typography.body.textDefault,\n            ),\n        md = md ??\n            MoonTextInputSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              height: tokens.sizes.md,\n              gap: tokens.sizes.x4s,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.symmetric(\n                horizontal: tokens.sizes.x3s,\n                vertical: tokens.sizes.x5s,\n              ),\n              textStyle: tokens.typography.body.textDefault,\n            ),\n        lg = lg ??\n            MoonTextInputSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              height: tokens.sizes.lg,\n              gap: tokens.sizes.x4s,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.symmetric(\n                horizontal: tokens.sizes.x3s,\n                vertical: 6,\n              ),\n              textStyle: tokens.typography.body.text16,\n            ),\n        xl = xl ??\n            MoonTextInputSizeProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              height: tokens.sizes.xl,\n              gap: tokens.sizes.x2s,\n              iconSizeValue: tokens.sizes.xs,\n              padding: EdgeInsets.symmetric(\n                horizontal: tokens.sizes.x2s,\n                vertical: 9,\n              ),\n              textStyle: tokens.typography.body.text16,\n            );\n\n  @override\n  MoonTextInputSizes copyWith({\n    MoonTokens? tokens,\n    MoonTextInputSizeProperties? sm,\n    MoonTextInputSizeProperties? md,\n    MoonTextInputSizeProperties? lg,\n    MoonTextInputSizeProperties? xl,\n  }) {\n    return MoonTextInputSizes(\n      tokens: tokens ?? this.tokens,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n      lg: lg ?? this.lg,\n      xl: xl ?? this.xl,\n    );\n  }\n\n  @override\n  MoonTextInputSizes lerp(ThemeExtension<MoonTextInputSizes>? other, double t) {\n    if (other is! MoonTextInputSizes) return this;\n\n    return MoonTextInputSizes(\n      tokens: tokens.lerp(other.tokens, t),\n      sm: sm.lerp(other.sm, t),\n      md: md.lerp(other.md, t),\n      lg: lg.lerp(other.lg, t),\n      xl: xl.lerp(other.xl, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTextInputSizes\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonTextInputSizeProperties>(\"sm\", sm))\n      ..add(DiagnosticsProperty<MoonTextInputSizeProperties>(\"md\", md))\n      ..add(DiagnosticsProperty<MoonTextInputSizeProperties>(\"lg\", lg))\n      ..add(DiagnosticsProperty<MoonTextInputSizeProperties>(\"xl\", xl));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_input/text_input_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/text_input/text_input_colors.dart';\nimport 'package:moon_design/src/theme/text_input/text_input_properties.dart';\nimport 'package:moon_design/src/theme/text_input/text_input_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonTextInputTheme extends ThemeExtension<MoonTextInputTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonTextInput.\n  final MoonTextInputColors colors;\n\n  /// The properties of the MoonTextInput.\n  final MoonTextInputProperties properties;\n\n  /// The sizes of the MoonTextInput.\n  final MoonTextInputSizes sizes;\n\n  MoonTextInputTheme({\n    required this.tokens,\n    MoonTextInputColors? colors,\n    MoonTextInputProperties? properties,\n    MoonTextInputSizes? sizes,\n  })  : colors = colors ??\n            MoonTextInputColors(\n              backgroundColor: tokens.colors.goku,\n              activeBorderColor: tokens.colors.piccolo,\n              inactiveBorderColor: tokens.colors.beerus,\n              errorColor: tokens.colors.chichi,\n              hoverBorderColor: tokens.colors.beerus,\n              textColor: tokens.colors.textPrimary,\n              helperTextColor: tokens.colors.textSecondary,\n            ),\n        properties = properties ??\n            MoonTextInputProperties(\n              // The duration value extracted from:\n              // https://github.com/material-components/material-components-android/blob/master/lib/java/com/google/android/material/textfield/TextInputLayout.java\n              transitionDuration: const Duration(milliseconds: 167),\n              transitionCurve: Curves.fastOutSlowIn,\n              helperPadding: EdgeInsets.only(top: tokens.sizes.x4s),\n              helperTextStyle: tokens.typography.body.text12,\n            ),\n        sizes = sizes ?? MoonTextInputSizes(tokens: tokens);\n\n  @override\n  MoonTextInputTheme copyWith({\n    MoonTokens? tokens,\n    MoonTextInputColors? colors,\n    MoonTextInputProperties? properties,\n    MoonTextInputSizes? sizes,\n  }) {\n    return MoonTextInputTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      sizes: sizes ?? this.sizes,\n    );\n  }\n\n  @override\n  MoonTextInputTheme lerp(ThemeExtension<MoonTextInputTheme>? other, double t) {\n    if (other is! MoonTextInputTheme) return this;\n\n    return MoonTextInputTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      sizes: sizes.lerp(other.sizes, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonTextInputTheme\"),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTokens>(\"tokens\", tokens),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTextInputColors>(\"colors\", colors),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTextInputProperties>(\"properties\", properties),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTextInputSizes>(\"sizes\", sizes),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_input_group/text_input_group_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonTextInputGroupColors extends ThemeExtension<MoonTextInputGroupColors>\n    with DiagnosticableTreeMixin {\n  /// The background color of the MoonTextInputGroup.\n  final Color backgroundColor;\n\n  /// The color of the MoonTextInputGroup in error state.\n  final Color errorColor;\n\n  /// The text color of the MoonTextInputGroup helper and errorBuilder widgets.\n  final Color helperTextColor;\n\n  /// The border color of the MoonTextInputGroup.\n  final Color borderColor;\n\n  /// The border color of the MoonTextInputGroup on hover.\n  final Color hoverBorderColor;\n\n  const MoonTextInputGroupColors({\n    required this.backgroundColor,\n    required this.errorColor,\n    required this.helperTextColor,\n    required this.borderColor,\n    required this.hoverBorderColor,\n  });\n\n  @override\n  MoonTextInputGroupColors copyWith({\n    Color? backgroundColor,\n    Color? errorColor,\n    Color? helperTextColor,\n    Color? borderColor,\n    Color? hoverBorderColor,\n  }) {\n    return MoonTextInputGroupColors(\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n      errorColor: errorColor ?? this.errorColor,\n      helperTextColor: helperTextColor ?? this.helperTextColor,\n      borderColor: borderColor ?? this.borderColor,\n      hoverBorderColor: hoverBorderColor ?? this.hoverBorderColor,\n    );\n  }\n\n  @override\n  MoonTextInputGroupColors lerp(\n    ThemeExtension<MoonTextInputGroupColors>? other,\n    double t,\n  ) {\n    if (other is! MoonTextInputGroupColors) return this;\n\n    return MoonTextInputGroupColors(\n      backgroundColor:\n          colorPremulLerp(backgroundColor, other.backgroundColor, t)!,\n      errorColor: colorPremulLerp(errorColor, other.errorColor, t)!,\n      helperTextColor:\n          colorPremulLerp(helperTextColor, other.helperTextColor, t)!,\n      borderColor: colorPremulLerp(borderColor, other.borderColor, t)!,\n      hoverBorderColor:\n          colorPremulLerp(hoverBorderColor, other.hoverBorderColor, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTextInputGroupColors\"))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor))\n      ..add(ColorProperty(\"errorColor\", errorColor))\n      ..add(ColorProperty(\"helperTextColor\", helperTextColor))\n      ..add(ColorProperty(\"borderColor\", borderColor))\n      ..add(ColorProperty(\"hoverBorderColor\", hoverBorderColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_input_group/text_input_group_properties.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTextInputGroupProperties\n    extends ThemeExtension<MoonTextInputGroupProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonTextInputGroup.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The duration of the MoonTextInputGroup transition animation\n  /// (enable and disable).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonTextInputGroup transition animation\n  /// (enable and disable).\n  final Curve transitionCurve;\n\n  /// The padding of the MoonTextInputGroup helper and errorBuilder widgets.\n  final EdgeInsetsGeometry helperPadding;\n\n  /// The padding of the MoonTextInputGroup text.\n  final EdgeInsetsGeometry textPadding;\n\n  /// The text style of the MoonTextInputGroup.\n  final TextStyle textStyle;\n\n  /// The text style of the MoonTextInputGroup helper and errorBuilder widgets.\n  final TextStyle helperTextStyle;\n\n  const MoonTextInputGroupProperties({\n    required this.borderRadius,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.helperPadding,\n    required this.textPadding,\n    required this.textStyle,\n    required this.helperTextStyle,\n  });\n\n  @override\n  MoonTextInputGroupProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    EdgeInsetsGeometry? helperPadding,\n    EdgeInsetsGeometry? textPadding,\n    TextStyle? textStyle,\n    TextStyle? helperTextStyle,\n  }) {\n    return MoonTextInputGroupProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      helperPadding: helperPadding ?? this.helperPadding,\n      textPadding: textPadding ?? this.textPadding,\n      textStyle: textStyle ?? this.textStyle,\n      helperTextStyle: helperTextStyle ?? this.helperTextStyle,\n    );\n  }\n\n  @override\n  MoonTextInputGroupProperties lerp(\n    ThemeExtension<MoonTextInputGroupProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonTextInputGroupProperties) return this;\n\n    return MoonTextInputGroupProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      helperPadding:\n          EdgeInsetsGeometry.lerp(helperPadding, other.helperPadding, t)!,\n      textPadding: EdgeInsetsGeometry.lerp(textPadding, other.textPadding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n      helperTextStyle:\n          TextStyle.lerp(helperTextStyle, other.helperTextStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\n          \"type\",\n          \"MoonTextInputGroupProperties\",\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\n          \"borderRadius\",\n          borderRadius,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\n          \"transitionDuration\",\n          transitionDuration,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\n          \"transitionCurve\",\n          transitionCurve,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\n          \"helperPadding\",\n          helperPadding,\n        ),\n      )\n      ..add(DiagnosticsProperty<EdgeInsetsGeometry>(\"textPadding\", textPadding))\n      ..add(DiagnosticsProperty<TextStyle>(\"textStyle\", textStyle))\n      ..add(DiagnosticsProperty<TextStyle>(\"helperTextStyle\", helperTextStyle));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/text_input_group/text_input_group_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/text_input_group/text_input_group_colors.dart';\nimport 'package:moon_design/src/theme/text_input_group/text_input_group_properties.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonTextInputGroupTheme extends ThemeExtension<MoonTextInputGroupTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonTextInputGroup.\n  final MoonTextInputGroupColors colors;\n\n  /// The properties of the MoonTextInputGroup.\n  final MoonTextInputGroupProperties properties;\n\n  MoonTextInputGroupTheme({\n    required this.tokens,\n    MoonTextInputGroupColors? colors,\n    MoonTextInputGroupProperties? properties,\n  })  : colors = colors ??\n            MoonTextInputGroupColors(\n              backgroundColor: tokens.colors.goku,\n              errorColor: tokens.colors.chichi,\n              helperTextColor: tokens.colors.trunks,\n              borderColor: tokens.colors.beerus,\n              hoverBorderColor: tokens.colors.beerus,\n            ),\n        properties = properties ??\n            MoonTextInputGroupProperties(\n              borderRadius: tokens.borders.interactiveSm,\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n              helperPadding: EdgeInsets.only(top: tokens.sizes.x4s),\n              textPadding: EdgeInsets.all(tokens.sizes.x2s),\n              textStyle: tokens.typography.body.text16,\n              helperTextStyle: tokens.typography.body.text12,\n            );\n\n  @override\n  MoonTextInputGroupTheme copyWith({\n    MoonTokens? tokens,\n    MoonTextInputGroupColors? colors,\n    MoonTextInputGroupProperties? properties,\n  }) {\n    return MoonTextInputGroupTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n    );\n  }\n\n  @override\n  MoonTextInputGroupTheme lerp(\n    ThemeExtension<MoonTextInputGroupTheme>? other,\n    double t,\n  ) {\n    if (other is! MoonTextInputGroupTheme) return this;\n\n    return MoonTextInputGroupTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTextInputGroupTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonTextInputGroupColors>(\"colors\", colors))\n      ..add(\n        DiagnosticsProperty<MoonTextInputGroupProperties>(\n          \"properties\",\n          properties,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/accordion/accordion_theme.dart';\nimport 'package:moon_design/src/theme/alert/alert_theme.dart';\nimport 'package:moon_design/src/theme/auth_code/auth_code_theme.dart';\nimport 'package:moon_design/src/theme/avatar/avatar_theme.dart';\nimport 'package:moon_design/src/theme/bottom_sheet/bottom_sheet_theme.dart';\nimport 'package:moon_design/src/theme/breadcrumb/breadcrumb_theme.dart';\nimport 'package:moon_design/src/theme/button/button_theme.dart';\nimport 'package:moon_design/src/theme/carousel/carousel_theme.dart';\nimport 'package:moon_design/src/theme/checkbox/checkbox_theme.dart';\nimport 'package:moon_design/src/theme/chip/chip_theme.dart';\nimport 'package:moon_design/src/theme/dot_indicator/dot_indicator_theme.dart';\nimport 'package:moon_design/src/theme/drawer/drawer_theme.dart';\nimport 'package:moon_design/src/theme/dropdown/dropdown_theme.dart';\nimport 'package:moon_design/src/theme/effects/effects_theme.dart';\nimport 'package:moon_design/src/theme/loaders/circular_loader/circular_loader_theme.dart';\nimport 'package:moon_design/src/theme/loaders/linear_loader/linear_loader_theme.dart';\nimport 'package:moon_design/src/theme/menu_item/menu_item_theme.dart';\nimport 'package:moon_design/src/theme/modal/modal_theme.dart';\nimport 'package:moon_design/src/theme/popover/popover_theme.dart';\nimport 'package:moon_design/src/theme/progress/circular_progress/circular_progress_theme.dart';\nimport 'package:moon_design/src/theme/progress/linear_progress/linear_progress_theme.dart';\nimport 'package:moon_design/src/theme/progress_pin/progress_pin_theme.dart';\nimport 'package:moon_design/src/theme/radio/radio_theme.dart';\nimport 'package:moon_design/src/theme/segmented_control/segmented_control_theme.dart';\nimport 'package:moon_design/src/theme/switch/switch_theme.dart';\nimport 'package:moon_design/src/theme/tab_bar/tab_bar_theme.dart';\nimport 'package:moon_design/src/theme/table/table_theme.dart';\nimport 'package:moon_design/src/theme/tag/tag_theme.dart';\nimport 'package:moon_design/src/theme/text_area/text_area_theme.dart';\nimport 'package:moon_design/src/theme/text_input/text_input_theme.dart';\nimport 'package:moon_design/src/theme/text_input_group/text_input_group_theme.dart';\nimport 'package:moon_design/src/theme/toast/toast_theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/opacities.dart';\nimport 'package:moon_design/src/theme/tokens/shadows.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/theme/tooltip/tooltip_theme.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\n@immutable\nclass MoonTheme extends ThemeExtension<MoonTheme> with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The theming of the Moon Design System MoonAccordion widget.\n  final MoonAccordionTheme accordionTheme;\n\n  /// The theming of the Moon Design System MoonAlert widget.\n  final MoonAlertTheme alertTheme;\n\n  /// The theming of the Moon Design System MoonAuthCode widget.\n  final MoonAuthCodeTheme authCodeTheme;\n\n  /// The theming of the Moon Design System MoonAvatar widget.\n  final MoonAvatarTheme avatarTheme;\n\n  /// The theming of the Moon Design System MoonBottomSheet widget.\n  final MoonBottomSheetTheme bottomSheetTheme;\n\n  /// The theming of the Moon Design System MoonBreadcrumb widget.\n  final MoonBreadcrumbTheme breadcrumbTheme;\n\n  /// The theming of the Moon Design System MoonButton widget.\n  final MoonButtonTheme buttonTheme;\n\n  /// The theming of the Moon Design System MoonCarousel widget.\n  final MoonCarouselTheme carouselTheme;\n\n  /// The theming of the Moon Design System MoonCheckbox widget.\n  final MoonCheckboxTheme checkboxTheme;\n\n  /// The theming of the Moon Design System MoonChip widget.\n  final MoonChipTheme chipTheme;\n\n  /// The theming of the Moon Design System MoonCircularLoader widget.\n  final MoonCircularLoaderTheme circularLoaderTheme;\n\n  /// The theming of the Moon Design System MoonCircularProgress widget.\n  final MoonCircularProgressTheme circularProgressTheme;\n\n  /// The theming of the Moon Design System MoonDotIndicator widget.\n  final MoonDotIndicatorTheme dotIndicatorTheme;\n\n  /// The theming of the Moon Design System MoonDrawer widget.\n  final MoonDrawerTheme drawerTheme;\n\n  /// The theming of the Moon Design System MoonDropdown widget.\n  final MoonDropdownTheme dropdownTheme;\n\n  /// The theming of the Moon Design System effects.\n  final MoonEffectsTheme effects;\n\n  /// The theming of the Moon Design System MoonLinearLoader widget.\n  final MoonLinearLoaderTheme linearLoaderTheme;\n\n  /// The theming of the Moon Design System MoonLinearProgress widget.\n  final MoonLinearProgressTheme linearProgressTheme;\n\n  /// The theming of the Moon Design System MoonMenuItem widget.\n  final MoonMenuItemTheme menuItemTheme;\n\n  /// The theming of the Moon Design System MoonModal widget.\n  final MoonModalTheme modalTheme;\n\n  /// The theming of the Moon Design System MoonPopover widget.\n  final MoonPopoverTheme popoverTheme;\n\n  /// The theming of the Moon Design System MoonProgressPin widget.\n  final MoonProgressPinTheme progressPinTheme;\n\n  /// The theming of the Moon Design System MoonRadio widget.\n  final MoonRadioTheme radioTheme;\n\n  /// The theming of the Moon Design System MoonSegmentedControl widget.\n  final MoonSegmentedControlTheme segmentedControlTheme;\n\n  /// The theming of the Moon Design System MoonSwitch widget.\n  final MoonSwitchTheme switchTheme;\n\n  /// The theming of the Moon Design System MoonTabBar widget.\n  final MoonTabBarTheme tabBarTheme;\n\n  /// The theming of the Moon Design System MoonTable widget.\n  final MoonTableTheme tableTheme;\n\n  /// The theming of the Moon Design System MoonTag widget.\n  final MoonTagTheme tagTheme;\n\n  /// The theming of the Moon Design System MoonTextArea widget.\n  final MoonTextAreaTheme textAreaTheme;\n\n  /// The theming of the Moon Design System MoonTextInput widget.\n  final MoonTextInputTheme textInputTheme;\n\n  /// The theming of the Moon Design System MoonTextInputGroup widget.\n  final MoonTextInputGroupTheme textInputGroupTheme;\n\n  /// The theming of the Moon Design System MoonToast widget.\n  final MoonToastTheme toastTheme;\n\n  /// The theming of the Moon Design System MoonTooltip widget.\n  final MoonTooltipTheme tooltipTheme;\n\n  MoonTheme({\n    required this.tokens,\n    MoonAccordionTheme? accordionTheme,\n    MoonAlertTheme? alertTheme,\n    MoonAuthCodeTheme? authCodeTheme,\n    MoonAvatarTheme? avatarTheme,\n    MoonBottomSheetTheme? bottomSheetTheme,\n    MoonBreadcrumbTheme? breadcrumbTheme,\n    MoonButtonTheme? buttonTheme,\n    MoonCarouselTheme? carouselTheme,\n    MoonCheckboxTheme? checkboxTheme,\n    MoonChipTheme? chipTheme,\n    MoonCircularLoaderTheme? circularLoaderTheme,\n    MoonCircularProgressTheme? circularProgressTheme,\n    MoonDotIndicatorTheme? dotIndicatorTheme,\n    MoonDrawerTheme? drawerTheme,\n    MoonDropdownTheme? dropdownTheme,\n    MoonEffectsTheme? effects,\n    MoonLinearLoaderTheme? linearLoaderTheme,\n    MoonLinearProgressTheme? linearProgressTheme,\n    MoonMenuItemTheme? menuItemTheme,\n    MoonModalTheme? modalTheme,\n    MoonPopoverTheme? popoverTheme,\n    MoonProgressPinTheme? progressPinTheme,\n    MoonRadioTheme? radioTheme,\n    MoonSegmentedControlTheme? segmentedControlTheme,\n    MoonSwitchTheme? switchTheme,\n    MoonTabBarTheme? tabBarTheme,\n    MoonTableTheme? tableTheme,\n    MoonTagTheme? tagTheme,\n    MoonTextAreaTheme? textAreaTheme,\n    MoonTextInputTheme? textInputTheme,\n    MoonTextInputGroupTheme? textInputGroupTheme,\n    MoonToastTheme? toastTheme,\n    MoonTooltipTheme? tooltipTheme,\n  })  : accordionTheme = accordionTheme ?? MoonAccordionTheme(tokens: tokens),\n        alertTheme = alertTheme ?? MoonAlertTheme(tokens: tokens),\n        authCodeTheme = authCodeTheme ?? MoonAuthCodeTheme(tokens: tokens),\n        avatarTheme = avatarTheme ?? MoonAvatarTheme(tokens: tokens),\n        bottomSheetTheme =\n            bottomSheetTheme ?? MoonBottomSheetTheme(tokens: tokens),\n        breadcrumbTheme =\n            breadcrumbTheme ?? MoonBreadcrumbTheme(tokens: tokens),\n        buttonTheme = buttonTheme ?? MoonButtonTheme(tokens: tokens),\n        carouselTheme = carouselTheme ?? MoonCarouselTheme(tokens: tokens),\n        checkboxTheme = checkboxTheme ?? MoonCheckboxTheme(tokens: tokens),\n        chipTheme = chipTheme ?? MoonChipTheme(tokens: tokens),\n        circularLoaderTheme =\n            circularLoaderTheme ?? MoonCircularLoaderTheme(tokens: tokens),\n        circularProgressTheme =\n            circularProgressTheme ?? MoonCircularProgressTheme(tokens: tokens),\n        dotIndicatorTheme =\n            dotIndicatorTheme ?? MoonDotIndicatorTheme(tokens: tokens),\n        drawerTheme = drawerTheme ?? MoonDrawerTheme(tokens: tokens),\n        dropdownTheme = dropdownTheme ?? MoonDropdownTheme(tokens: tokens),\n        effects = effects ?? MoonEffectsTheme(tokens: tokens),\n        linearLoaderTheme =\n            linearLoaderTheme ?? MoonLinearLoaderTheme(tokens: tokens),\n        linearProgressTheme =\n            linearProgressTheme ?? MoonLinearProgressTheme(tokens: tokens),\n        menuItemTheme = menuItemTheme ?? MoonMenuItemTheme(tokens: tokens),\n        modalTheme = modalTheme ?? MoonModalTheme(tokens: tokens),\n        popoverTheme = popoverTheme ?? MoonPopoverTheme(tokens: tokens),\n        progressPinTheme =\n            progressPinTheme ?? MoonProgressPinTheme(tokens: tokens),\n        radioTheme = radioTheme ?? MoonRadioTheme(tokens: tokens),\n        segmentedControlTheme =\n            segmentedControlTheme ?? MoonSegmentedControlTheme(tokens: tokens),\n        switchTheme = switchTheme ?? MoonSwitchTheme(tokens: tokens),\n        tabBarTheme = tabBarTheme ?? MoonTabBarTheme(tokens: tokens),\n        tableTheme = tableTheme ?? MoonTableTheme(tokens: tokens),\n        tagTheme = tagTheme ?? MoonTagTheme(tokens: tokens),\n        textAreaTheme = textAreaTheme ?? MoonTextAreaTheme(tokens: tokens),\n        textInputTheme = textInputTheme ?? MoonTextInputTheme(tokens: tokens),\n        textInputGroupTheme =\n            textInputGroupTheme ?? MoonTextInputGroupTheme(tokens: tokens),\n        toastTheme = toastTheme ?? MoonToastTheme(tokens: tokens),\n        tooltipTheme = tooltipTheme ?? MoonTooltipTheme(tokens: tokens);\n\n  @override\n  MoonTheme copyWith({\n    MoonTokens? tokens,\n    MoonAccordionTheme? accordionTheme,\n    MoonAlertTheme? alertTheme,\n    MoonAuthCodeTheme? authCodeTheme,\n    MoonAvatarTheme? avatarTheme,\n    MoonBottomSheetTheme? bottomSheetTheme,\n    MoonBreadcrumbTheme? breadcrumbTheme,\n    MoonButtonTheme? buttonTheme,\n    MoonCarouselTheme? carouselTheme,\n    MoonCheckboxTheme? checkboxTheme,\n    MoonChipTheme? chipTheme,\n    MoonCircularLoaderTheme? circularLoaderTheme,\n    MoonCircularProgressTheme? circularProgressTheme,\n    MoonDotIndicatorTheme? dotIndicatorTheme,\n    MoonDrawerTheme? drawerTheme,\n    MoonDropdownTheme? dropdownTheme,\n    MoonEffectsTheme? effects,\n    MoonLinearLoaderTheme? linearLoaderTheme,\n    MoonLinearProgressTheme? linearProgressTheme,\n    MoonMenuItemTheme? menuItemTheme,\n    MoonModalTheme? modalTheme,\n    MoonPopoverTheme? popoverTheme,\n    MoonProgressPinTheme? progressPinTheme,\n    MoonRadioTheme? radioTheme,\n    MoonSegmentedControlTheme? segmentedControlTheme,\n    MoonSwitchTheme? switchTheme,\n    MoonTabBarTheme? tabBarTheme,\n    MoonTableTheme? tableTheme,\n    MoonTagTheme? tagTheme,\n    MoonTextAreaTheme? textAreaTheme,\n    MoonTextInputTheme? textInputTheme,\n    MoonTextInputGroupTheme? textInputGroupTheme,\n    MoonToastTheme? toastTheme,\n    MoonTooltipTheme? tooltipTheme,\n  }) {\n    return MoonTheme(\n      tokens: tokens ?? this.tokens,\n      accordionTheme: accordionTheme ?? this.accordionTheme,\n      alertTheme: alertTheme ?? this.alertTheme,\n      authCodeTheme: authCodeTheme ?? this.authCodeTheme,\n      avatarTheme: avatarTheme ?? this.avatarTheme,\n      bottomSheetTheme: bottomSheetTheme ?? this.bottomSheetTheme,\n      breadcrumbTheme: breadcrumbTheme ?? this.breadcrumbTheme,\n      buttonTheme: buttonTheme ?? this.buttonTheme,\n      carouselTheme: carouselTheme ?? this.carouselTheme,\n      checkboxTheme: checkboxTheme ?? this.checkboxTheme,\n      chipTheme: chipTheme ?? this.chipTheme,\n      circularLoaderTheme: circularLoaderTheme ?? this.circularLoaderTheme,\n      circularProgressTheme:\n          circularProgressTheme ?? this.circularProgressTheme,\n      dotIndicatorTheme: dotIndicatorTheme ?? this.dotIndicatorTheme,\n      drawerTheme: drawerTheme ?? this.drawerTheme,\n      dropdownTheme: dropdownTheme ?? this.dropdownTheme,\n      effects: effects ?? this.effects,\n      linearLoaderTheme: linearLoaderTheme ?? this.linearLoaderTheme,\n      linearProgressTheme: linearProgressTheme ?? this.linearProgressTheme,\n      menuItemTheme: menuItemTheme ?? this.menuItemTheme,\n      modalTheme: modalTheme ?? this.modalTheme,\n      popoverTheme: popoverTheme ?? this.popoverTheme,\n      progressPinTheme: progressPinTheme ?? this.progressPinTheme,\n      radioTheme: radioTheme ?? this.radioTheme,\n      segmentedControlTheme:\n          segmentedControlTheme ?? this.segmentedControlTheme,\n      switchTheme: switchTheme ?? this.switchTheme,\n      tabBarTheme: tabBarTheme ?? this.tabBarTheme,\n      tableTheme: tableTheme ?? this.tableTheme,\n      tagTheme: tagTheme ?? this.tagTheme,\n      textAreaTheme: textAreaTheme ?? this.textAreaTheme,\n      textInputTheme: textInputTheme ?? this.textInputTheme,\n      textInputGroupTheme: textInputGroupTheme ?? this.textInputGroupTheme,\n      toastTheme: toastTheme ?? this.toastTheme,\n      tooltipTheme: tooltipTheme ?? this.tooltipTheme,\n    );\n  }\n\n  @override\n  MoonTheme lerp(ThemeExtension<MoonTheme>? other, double t) {\n    if (other is! MoonTheme) return this;\n\n    return MoonTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      accordionTheme: accordionTheme.lerp(other.accordionTheme, t),\n      alertTheme: alertTheme.lerp(other.alertTheme, t),\n      authCodeTheme: authCodeTheme.lerp(other.authCodeTheme, t),\n      avatarTheme: avatarTheme.lerp(other.avatarTheme, t),\n      bottomSheetTheme: bottomSheetTheme.lerp(other.bottomSheetTheme, t),\n      breadcrumbTheme: breadcrumbTheme.lerp(other.breadcrumbTheme, t),\n      buttonTheme: buttonTheme.lerp(other.buttonTheme, t),\n      carouselTheme: carouselTheme.lerp(other.carouselTheme, t),\n      checkboxTheme: checkboxTheme.lerp(other.checkboxTheme, t),\n      chipTheme: chipTheme.lerp(other.chipTheme, t),\n      circularLoaderTheme:\n          circularLoaderTheme.lerp(other.circularLoaderTheme, t),\n      circularProgressTheme:\n          circularProgressTheme.lerp(other.circularProgressTheme, t),\n      dotIndicatorTheme: dotIndicatorTheme.lerp(other.dotIndicatorTheme, t),\n      drawerTheme: drawerTheme.lerp(other.drawerTheme, t),\n      dropdownTheme: dropdownTheme.lerp(other.dropdownTheme, t),\n      effects: effects.lerp(other.effects, t),\n      linearLoaderTheme: linearLoaderTheme.lerp(other.linearLoaderTheme, t),\n      linearProgressTheme:\n          linearProgressTheme.lerp(other.linearProgressTheme, t),\n      menuItemTheme: menuItemTheme.lerp(other.menuItemTheme, t),\n      modalTheme: modalTheme.lerp(other.modalTheme, t),\n      popoverTheme: popoverTheme.lerp(other.popoverTheme, t),\n      progressPinTheme: progressPinTheme.lerp(other.progressPinTheme, t),\n      radioTheme: radioTheme.lerp(other.radioTheme, t),\n      segmentedControlTheme:\n          segmentedControlTheme.lerp(other.segmentedControlTheme, t),\n      switchTheme: switchTheme.lerp(other.switchTheme, t),\n      tabBarTheme: tabBarTheme.lerp(other.tabBarTheme, t),\n      tableTheme: tableTheme.lerp(other.tableTheme, t),\n      tagTheme: tagTheme.lerp(other.tagTheme, t),\n      textAreaTheme: textAreaTheme.lerp(other.textAreaTheme, t),\n      textInputTheme: textInputTheme.lerp(other.textInputTheme, t),\n      textInputGroupTheme:\n          textInputGroupTheme.lerp(other.textInputGroupTheme, t),\n      toastTheme: toastTheme.lerp(other.toastTheme, t),\n      tooltipTheme: tooltipTheme.lerp(other.tooltipTheme, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\n          \"type\",\n          \"MoonTheme\",\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTokens>(\n          \"MoonTokens\",\n          tokens,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonAccordionTheme>(\n          \"MoonAccordionTheme\",\n          accordionTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonAlertTheme>(\n          \"MoonAlertTheme\",\n          alertTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonAuthCodeTheme>(\n          \"MoonAuthCodeTheme\",\n          authCodeTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonAvatarTheme>(\n          \"MoonAvatarTheme\",\n          avatarTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonBottomSheetTheme>(\n          \"MoonBottomSheetTheme\",\n          bottomSheetTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonBreadcrumbTheme>(\n          \"MoonBreadcrumbTheme\",\n          breadcrumbTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonButtonTheme>(\n          \"MoonButtonTheme\",\n          buttonTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonCarouselTheme>(\n          \"MoonCarouselTheme\",\n          carouselTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonCheckboxTheme>(\n          \"MoonCheckboxTheme\",\n          checkboxTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonChipTheme>(\n          \"MoonChipTheme\",\n          chipTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonCircularLoaderTheme>(\n          \"MoonCircularLoaderTheme\",\n          circularLoaderTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonCircularProgressTheme>(\n          \"MoonCircularProgressTheme\",\n          circularProgressTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonDotIndicatorTheme>(\n          \"MoonDotIndicatorTheme\",\n          dotIndicatorTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonDrawerTheme>(\n          \"MoonDrawerTheme\",\n          drawerTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonDropdownTheme>(\n          \"MoonDropdownTheme\",\n          dropdownTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonEffectsTheme>(\n          \"MoonEffectsTheme\",\n          effects,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonLinearLoaderTheme>(\n          \"MoonLinearLoaderTheme\",\n          linearLoaderTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonLinearProgressTheme>(\n          \"MoonLinearProgressTheme\",\n          linearProgressTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonMenuItemTheme>(\n          \"MoonMenuItemTheme\",\n          menuItemTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonModalTheme>(\n          \"MoonModalTheme\",\n          modalTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonPopoverTheme>(\n          \"MoonPopoverTheme\",\n          popoverTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonProgressPinTheme>(\n          \"MoonProgressPinTheme\",\n          progressPinTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonRadioTheme>(\n          \"MoonRadioTheme\",\n          radioTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonSegmentedControlTheme>(\n          \"MoonSegmentedControlTheme\",\n          segmentedControlTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonSwitchTheme>(\n          \"MoonSwitchTheme\",\n          switchTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTabBarTheme>(\n          \"MoonTabBarTheme\",\n          tabBarTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTableTheme>(\n          \"MoonTableTheme\",\n          tableTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTagTheme>(\n          \"MoonTagTheme\",\n          tagTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTextAreaTheme>(\n          \"MoonTextAreaTheme\",\n          textAreaTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTextInputTheme>(\n          \"MoonTextInputTheme\",\n          textInputTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTextInputGroupTheme>(\n          \"MoonTextInputGroupTheme\",\n          textInputGroupTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonToastTheme>(\n          \"MoonToastTheme\",\n          toastTheme,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTooltipTheme>(\n          \"MoonTooltipTheme\",\n          tooltipTheme,\n        ),\n      );\n  }\n}\n\nextension MoonThemeX on BuildContext {\n  MoonTheme? get moonTheme => Theme.of(this).extension<MoonTheme>();\n\n  MoonBorders? get moonBorders => moonTheme?.tokens.borders;\n\n  MoonColors? get moonColors => moonTheme?.tokens.colors;\n\n  MoonEffectsTheme? get moonEffects => moonTheme?.effects;\n\n  MoonOpacities? get moonOpacities => moonTheme?.tokens.opacities;\n\n  MoonShadows? get moonShadows => moonTheme?.tokens.shadows;\n\n  MoonSizes? get moonSizes => moonTheme?.tokens.sizes;\n\n  MoonTransitions? get moonTransitions => moonTheme?.tokens.transitions;\n\n  MoonTypography? get moonTypography => moonTheme?.tokens.typography;\n}\n"
  },
  {
    "path": "lib/src/theme/toast/toast_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonToastColors extends ThemeExtension<MoonToastColors>\n    with DiagnosticableTreeMixin {\n  /// The background color of the MoonToast light variant.\n  final Color lightVariantBackgroundColor;\n\n  /// The background color of the MoonToast dark variant.\n  final Color darkVariantBackgroundColor;\n\n  /// The text color of the MoonToast light variant.\n  final Color lightVariantTextColor;\n\n  /// The text color of the MoonToast dark variant.\n  final Color darkVariantTextColor;\n\n  /// The icon color of the MoonToast light variant.\n  final Color lightVariantIconColor;\n\n  /// The icon color of the MoonToast dark variant.\n  final Color darkVariantIconColor;\n\n  const MoonToastColors({\n    required this.lightVariantBackgroundColor,\n    required this.darkVariantBackgroundColor,\n    required this.lightVariantTextColor,\n    required this.darkVariantTextColor,\n    required this.lightVariantIconColor,\n    required this.darkVariantIconColor,\n  });\n\n  @override\n  MoonToastColors copyWith({\n    Color? lightVariantBackgroundColor,\n    Color? darkVariantBackgroundColor,\n    Color? lightVariantTextColor,\n    Color? darkVariantTextColor,\n    Color? lightVariantIconColor,\n    Color? darkVariantIconColor,\n  }) {\n    return MoonToastColors(\n      lightVariantBackgroundColor:\n          lightVariantBackgroundColor ?? this.lightVariantBackgroundColor,\n      darkVariantBackgroundColor:\n          darkVariantBackgroundColor ?? this.darkVariantBackgroundColor,\n      lightVariantTextColor:\n          lightVariantTextColor ?? this.lightVariantTextColor,\n      darkVariantTextColor: darkVariantTextColor ?? this.darkVariantTextColor,\n      lightVariantIconColor:\n          lightVariantIconColor ?? this.lightVariantIconColor,\n      darkVariantIconColor: darkVariantIconColor ?? this.darkVariantIconColor,\n    );\n  }\n\n  @override\n  MoonToastColors lerp(ThemeExtension<MoonToastColors>? other, double t) {\n    if (other is! MoonToastColors) return this;\n\n    return MoonToastColors(\n      lightVariantBackgroundColor: colorPremulLerp(\n        lightVariantBackgroundColor,\n        other.lightVariantBackgroundColor,\n        t,\n      )!,\n      darkVariantBackgroundColor: colorPremulLerp(\n        darkVariantBackgroundColor,\n        other.darkVariantBackgroundColor,\n        t,\n      )!,\n      lightVariantTextColor: colorPremulLerp(\n        lightVariantTextColor,\n        other.lightVariantTextColor,\n        t,\n      )!,\n      darkVariantTextColor: colorPremulLerp(\n        darkVariantTextColor,\n        other.darkVariantTextColor,\n        t,\n      )!,\n      lightVariantIconColor: colorPremulLerp(\n        lightVariantIconColor,\n        other.lightVariantIconColor,\n        t,\n      )!,\n      darkVariantIconColor: colorPremulLerp(\n        darkVariantIconColor,\n        other.darkVariantIconColor,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\n          \"type\",\n          \"MoonToastColors\",\n        ),\n      )\n      ..add(\n        ColorProperty(\n          \"lightVariantBackgroundColor\",\n          lightVariantBackgroundColor,\n        ),\n      )\n      ..add(\n        ColorProperty(\n          \"darkVariantBackgroundColor\",\n          darkVariantBackgroundColor,\n        ),\n      )\n      ..add(ColorProperty(\"lightVariantTextColor\", lightVariantTextColor))\n      ..add(ColorProperty(\"darkVariantTextColor\", darkVariantTextColor))\n      ..add(ColorProperty(\"lightVariantIconColor\", lightVariantIconColor))\n      ..add(ColorProperty(\"darkVariantIconColor\", darkVariantIconColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/toast/toast_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonToastProperties extends ThemeExtension<MoonToastProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonToast.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The horizontal gap between the leading, label and trailing widgets of the\n  /// MoonToast.\n  final double horizontalGap;\n\n  /// The vertical gap between the MoonToast header and content.\n  final double verticalGap;\n\n  /// The duration to display the MoonToast.\n  final Duration displayDuration;\n\n  /// The duration of the MoonToast transition animation (slide in or out).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonToast transition animation (slide in or out).\n  final Curve transitionCurve;\n\n  /// The padding of the MoonToast content.\n  final EdgeInsetsGeometry contentPadding;\n\n  /// The text style of the MoonToast.\n  final TextStyle textStyle;\n\n  const MoonToastProperties({\n    required this.borderRadius,\n    required this.horizontalGap,\n    required this.verticalGap,\n    required this.displayDuration,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.contentPadding,\n    required this.textStyle,\n  });\n\n  @override\n  MoonToastProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? horizontalGap,\n    double? verticalGap,\n    Duration? displayDuration,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    EdgeInsetsGeometry? contentPadding,\n    TextStyle? textStyle,\n  }) {\n    return MoonToastProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      horizontalGap: horizontalGap ?? this.horizontalGap,\n      verticalGap: verticalGap ?? this.verticalGap,\n      displayDuration: displayDuration ?? this.displayDuration,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      contentPadding: contentPadding ?? this.contentPadding,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonToastProperties lerp(\n    ThemeExtension<MoonToastProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonToastProperties) return this;\n\n    return MoonToastProperties(\n      borderRadius: BorderRadiusGeometry.lerp(\n        borderRadius,\n        other.borderRadius,\n        t,\n      )!,\n      horizontalGap: lerpDouble(horizontalGap, other.horizontalGap, t)!,\n      verticalGap: lerpDouble(verticalGap, other.verticalGap, t)!,\n      displayDuration: lerpDuration(displayDuration, other.displayDuration, t),\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      contentPadding:\n          EdgeInsetsGeometry.lerp(contentPadding, other.contentPadding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonToastProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"horizontalGap\", horizontalGap),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"displayDuration\", displayDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\n          \"contentPadding\",\n          contentPadding,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"textStyle\",\n          textStyle,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/toast/toast_shadows.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonToastShadows extends ThemeExtension<MoonToastShadows>\n    with DiagnosticableTreeMixin {\n  /// The list of shadows applied to the MoonToast.\n  final List<BoxShadow> toastShadows;\n\n  const MoonToastShadows({required this.toastShadows});\n\n  @override\n  MoonToastShadows copyWith({List<BoxShadow>? toastShadows}) {\n    return MoonToastShadows(\n      toastShadows: toastShadows ?? this.toastShadows,\n    );\n  }\n\n  @override\n  MoonToastShadows lerp(ThemeExtension<MoonToastShadows>? other, double t) {\n    if (other is! MoonToastShadows) return this;\n\n    return MoonToastShadows(\n      toastShadows: BoxShadow.lerpList(toastShadows, other.toastShadows, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonToastShadows\"))\n      ..add(DiagnosticsProperty<List<BoxShadow>>(\"toastShadows\", toastShadows));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/toast/toast_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/toast/toast_colors.dart';\nimport 'package:moon_design/src/theme/toast/toast_properties.dart';\nimport 'package:moon_design/src/theme/toast/toast_shadows.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\n\n@immutable\nclass MoonToastTheme extends ThemeExtension<MoonToastTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonToast.\n  final MoonToastColors colors;\n\n  /// The properties of the MoonToast.\n  final MoonToastProperties properties;\n\n  /// The shadows of the MoonToast.\n  final MoonToastShadows shadows;\n\n  MoonToastTheme({\n    required this.tokens,\n    MoonToastColors? colors,\n    MoonToastProperties? properties,\n    MoonToastShadows? shadows,\n  })  : colors = colors ??\n            MoonToastColors(\n              lightVariantBackgroundColor: tokens.colors.goku,\n              darkVariantBackgroundColor: tokens.complementaryColors.goku,\n              lightVariantTextColor: tokens.colors.bulma,\n              darkVariantTextColor: tokens.complementaryColors.bulma,\n              lightVariantIconColor: tokens.colors.bulma,\n              darkVariantIconColor: tokens.complementaryColors.bulma,\n            ),\n        properties = properties ??\n            MoonToastProperties(\n              borderRadius: tokens.borders.surfaceSm,\n              horizontalGap: tokens.sizes.x2s,\n              verticalGap: tokens.sizes.x3s,\n              displayDuration: const Duration(seconds: 3),\n              transitionDuration: tokens.transitions.defaultTransitionDuration,\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n              contentPadding: EdgeInsets.all(tokens.sizes.x2s),\n              textStyle: tokens.typography.body.textDefault,\n            ),\n        shadows = shadows ?? MoonToastShadows(toastShadows: tokens.shadows.lg);\n\n  @override\n  MoonToastTheme copyWith({\n    MoonTokens? tokens,\n    MoonToastColors? colors,\n    MoonToastProperties? properties,\n    MoonToastShadows? shadows,\n  }) {\n    return MoonToastTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      shadows: shadows ?? this.shadows,\n    );\n  }\n\n  @override\n  MoonToastTheme lerp(ThemeExtension<MoonToastTheme>? other, double t) {\n    if (other is! MoonToastTheme) return this;\n\n    return MoonToastTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      shadows: shadows.lerp(other.shadows, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(DiagnosticsProperty(\"type\", \"MoonToastTheme\"))\n      ..add(DiagnosticsProperty<MoonTokens>(\"tokens\", tokens))\n      ..add(DiagnosticsProperty<MoonToastColors>(\"colors\", colors))\n      ..add(DiagnosticsProperty<MoonToastProperties>(\"properties\", properties))\n      ..add(DiagnosticsProperty<MoonToastShadows>(\"shadows\", shadows));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tokens/borders.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonBorders extends ThemeExtension<MoonBorders>\n    with DiagnosticableTreeMixin {\n  static const borders = MoonBorders(\n    interactiveXs: BorderRadius.all(Radius.circular(4)),\n    interactiveSm: BorderRadius.all(Radius.circular(8)),\n    interactiveMd: BorderRadius.all(Radius.circular(12)),\n    surfaceXs: BorderRadius.all(Radius.circular(4)),\n    surfaceSm: BorderRadius.all(Radius.circular(8)),\n    surfaceMd: BorderRadius.all(Radius.circular(12)),\n    surfaceLg: BorderRadius.all(Radius.circular(16)),\n    defaultBorderWidth: 1,\n    activeBorderWidth: 1.5,\n  );\n\n  /// The extra small interactive radius.\n  final BorderRadiusGeometry interactiveXs;\n\n  /// The small interactive radius.\n  final BorderRadiusGeometry interactiveSm;\n\n  /// The medium interactive radius.\n  final BorderRadiusGeometry interactiveMd;\n\n  /// The extra small surface radius.\n  final BorderRadiusGeometry surfaceXs;\n\n  /// The small surface radius.\n  final BorderRadiusGeometry surfaceSm;\n\n  /// The medium surface radius.\n  final BorderRadiusGeometry surfaceMd;\n\n  /// The large surface radius.\n  final BorderRadiusGeometry surfaceLg;\n\n  /// The default border width.\n  final double defaultBorderWidth;\n\n  /// The active border width.\n  final double activeBorderWidth;\n\n  const MoonBorders({\n    required this.interactiveXs,\n    required this.interactiveSm,\n    required this.interactiveMd,\n    required this.surfaceXs,\n    required this.surfaceSm,\n    required this.surfaceMd,\n    required this.surfaceLg,\n    required this.defaultBorderWidth,\n    required this.activeBorderWidth,\n  });\n\n  @override\n  MoonBorders copyWith({\n    BorderRadiusGeometry? interactiveXs,\n    BorderRadiusGeometry? interactiveSm,\n    BorderRadiusGeometry? interactiveMd,\n    BorderRadiusGeometry? surfaceXs,\n    BorderRadiusGeometry? surfaceSm,\n    BorderRadiusGeometry? surfaceMd,\n    BorderRadiusGeometry? surfaceLg,\n    double? defaultBorderWidth,\n    double? activeBorderWidth,\n  }) {\n    return MoonBorders(\n      interactiveXs: interactiveXs ?? this.interactiveXs,\n      interactiveSm: interactiveSm ?? this.interactiveSm,\n      interactiveMd: interactiveMd ?? this.interactiveMd,\n      surfaceXs: surfaceXs ?? this.surfaceXs,\n      surfaceSm: surfaceSm ?? this.surfaceSm,\n      surfaceMd: surfaceMd ?? this.surfaceMd,\n      surfaceLg: surfaceLg ?? this.surfaceLg,\n      defaultBorderWidth: defaultBorderWidth ?? this.defaultBorderWidth,\n      activeBorderWidth: activeBorderWidth ?? this.activeBorderWidth,\n    );\n  }\n\n  @override\n  MoonBorders lerp(ThemeExtension<MoonBorders>? other, double t) {\n    if (other is! MoonBorders) return this;\n\n    return MoonBorders(\n      interactiveXs:\n          BorderRadiusGeometry.lerp(interactiveXs, other.interactiveXs, t)!,\n      interactiveSm:\n          BorderRadiusGeometry.lerp(interactiveSm, other.interactiveSm, t)!,\n      interactiveMd:\n          BorderRadiusGeometry.lerp(interactiveMd, other.interactiveMd, t)!,\n      surfaceXs: BorderRadiusGeometry.lerp(surfaceXs, other.surfaceXs, t)!,\n      surfaceSm: BorderRadiusGeometry.lerp(surfaceSm, other.surfaceSm, t)!,\n      surfaceMd: BorderRadiusGeometry.lerp(surfaceMd, other.surfaceMd, t)!,\n      surfaceLg: BorderRadiusGeometry.lerp(surfaceLg, other.surfaceLg, t)!,\n      defaultBorderWidth:\n          lerpDouble(defaultBorderWidth, other.defaultBorderWidth, t)!,\n      activeBorderWidth:\n          lerpDouble(activeBorderWidth, other.activeBorderWidth, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\n          \"type\",\n          \"MoonBorders\",\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\n          \"interactiveXs\",\n          interactiveXs,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\n          \"interactiveSm\",\n          interactiveSm,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\n          \"interactiveMd\",\n          interactiveMd,\n        ),\n      )\n      ..add(DiagnosticsProperty<BorderRadiusGeometry>(\"surfaceXs\", surfaceXs))\n      ..add(DiagnosticsProperty<BorderRadiusGeometry>(\"surfaceSm\", surfaceSm))\n      ..add(DiagnosticsProperty<BorderRadiusGeometry>(\"surfaceMd\", surfaceMd))\n      ..add(DiagnosticsProperty<BorderRadiusGeometry>(\"surfaceLg\", surfaceLg))\n      ..add(DoubleProperty(\"defaultBorderWidth\", defaultBorderWidth))\n      ..add(DoubleProperty(\"activeBorderWidth\", activeBorderWidth));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tokens/opacities.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonOpacities extends ThemeExtension<MoonOpacities>\n    with DiagnosticableTreeMixin {\n  static const opacities = MoonOpacities(disabled: 0.6);\n\n  /// The disabled opacity value.\n  final double disabled;\n\n  const MoonOpacities({required this.disabled});\n\n  @override\n  MoonOpacities copyWith({double? disabled}) {\n    return MoonOpacities(\n      disabled: disabled ?? this.disabled,\n    );\n  }\n\n  @override\n  MoonOpacities lerp(ThemeExtension<MoonOpacities>? other, double t) {\n    if (other is! MoonOpacities) return this;\n\n    return MoonOpacities(\n      disabled: lerpDouble(disabled, other.disabled, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonOpacities\"))\n      ..add(DoubleProperty(\"disabled\", disabled));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tokens/shadows.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonShadows extends ThemeExtension<MoonShadows>\n    with DiagnosticableTreeMixin {\n  static const light = MoonShadows(\n    sm: [\n      BoxShadow(\n        color: Color(0x66000000),\n        blurRadius: 1,\n      ),\n      BoxShadow(\n        color: Color(0x28000000),\n        blurRadius: 6,\n        offset: Offset(0, 6),\n        spreadRadius: -6,\n      ),\n    ],\n    md: [\n      BoxShadow(\n        color: Color(0x66000000),\n        blurRadius: 1,\n      ),\n      BoxShadow(\n        color: Color(0x28000000),\n        blurRadius: 12,\n        offset: Offset(0, 12),\n      ),\n    ],\n    lg: [\n      BoxShadow(\n        color: Color(0x66000000),\n        blurRadius: 1,\n      ),\n      BoxShadow(\n        color: Color(0x28000000),\n        blurRadius: 24,\n        offset: Offset(0, 8),\n      ),\n    ],\n    xl: [\n      BoxShadow(\n        color: Color(0x33000000),\n        blurRadius: 1,\n      ),\n      BoxShadow(\n        color: Color(0x1E000000),\n        blurRadius: 32,\n      ),\n      BoxShadow(\n        color: Color(0x14000000),\n        blurRadius: 32,\n        offset: Offset(0, 32),\n      ),\n    ],\n  );\n\n  static const dark = MoonShadows(\n    sm: [\n      BoxShadow(\n        color: Color(0x8E000000),\n        blurRadius: 1,\n      ),\n      BoxShadow(\n        color: Color(0xA3000000),\n        blurRadius: 6,\n        offset: Offset(0, 6),\n        spreadRadius: -6,\n      ),\n    ],\n    md: [\n      BoxShadow(\n        color: Color(0x8E000000),\n        blurRadius: 1,\n      ),\n      BoxShadow(\n        color: Color(0xA3000000),\n        blurRadius: 12,\n        offset: Offset(0, 12),\n      ),\n    ],\n    lg: [\n      BoxShadow(\n        color: Color(0x8E000000),\n        blurRadius: 1,\n      ),\n      BoxShadow(\n        color: Color(0xA3000000),\n        blurRadius: 24,\n        offset: Offset(0, 24),\n      ),\n    ],\n    xl: [\n      BoxShadow(\n        color: Color(0xB7000000),\n        blurRadius: 1,\n      ),\n      BoxShadow(\n        color: Color(0xE0000000),\n        blurRadius: 48,\n        offset: Offset(0, 48),\n      ),\n    ],\n  );\n\n  /// The small shadow.\n  final List<BoxShadow> sm;\n\n  /// The medium shadow.\n  final List<BoxShadow> md;\n\n  /// The large shadow.\n  final List<BoxShadow> lg;\n\n  /// The extra large shadow.\n  final List<BoxShadow> xl;\n\n  const MoonShadows({\n    required this.sm,\n    required this.md,\n    required this.lg,\n    required this.xl,\n  });\n\n  @override\n  MoonShadows copyWith({\n    List<BoxShadow>? sm,\n    List<BoxShadow>? md,\n    List<BoxShadow>? lg,\n    List<BoxShadow>? xl,\n  }) {\n    return MoonShadows(\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n      lg: lg ?? this.lg,\n      xl: xl ?? this.xl,\n    );\n  }\n\n  @override\n  MoonShadows lerp(ThemeExtension<MoonShadows>? other, double t) {\n    if (other is! MoonShadows) return this;\n\n    return MoonShadows(\n      sm: BoxShadow.lerpList(sm, other.sm, t)!,\n      md: BoxShadow.lerpList(md, other.md, t)!,\n      lg: BoxShadow.lerpList(lg, other.lg, t)!,\n      xl: BoxShadow.lerpList(xl, other.xl, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonShadows\"))\n      ..add(DiagnosticsProperty<List<BoxShadow>>(\"sm\", sm))\n      ..add(DiagnosticsProperty<List<BoxShadow>>(\"md\", md))\n      ..add(DiagnosticsProperty<List<BoxShadow>>(\"lg\", lg))\n      ..add(DiagnosticsProperty<List<BoxShadow>>(\"xl\", xl));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tokens/sizes.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonSizes extends ThemeExtension<MoonSizes> with DiagnosticableTreeMixin {\n  static const sizes = MoonSizes(\n    x6s: 2,\n    x5s: 4,\n    x4s: 8,\n    x3s: 12,\n    x2s: 16,\n    xs: 24,\n    sm: 32,\n    md: 40,\n    lg: 48,\n    xl: 56,\n    x2l: 64,\n  );\n\n  /// The (6x) extra small size.\n  final double x6s;\n\n  /// The (5x) extra small size.\n  final double x5s;\n\n  /// The (4x) extra small size.\n  final double x4s;\n\n  /// The (3x) extra small size.\n  final double x3s;\n\n  /// The (2x) extra small size.\n  final double x2s;\n\n  /// The extra small size.\n  final double xs;\n\n  /// The small size.\n  final double sm;\n\n  /// The medium size.\n  final double md;\n\n  /// The large size.\n  final double lg;\n\n  /// The extra large size.\n  final double xl;\n\n  /// The (2x) extra large size.\n  final double x2l;\n\n  const MoonSizes({\n    required this.x6s,\n    required this.x5s,\n    required this.x4s,\n    required this.x3s,\n    required this.x2s,\n    required this.xs,\n    required this.sm,\n    required this.md,\n    required this.lg,\n    required this.xl,\n    required this.x2l,\n  });\n\n  @override\n  MoonSizes copyWith({\n    double? x6s,\n    double? x5s,\n    double? x4s,\n    double? x3s,\n    double? x2s,\n    double? xs,\n    double? sm,\n    double? md,\n    double? lg,\n    double? xl,\n    double? x2l,\n  }) {\n    return MoonSizes(\n      x6s: x6s ?? this.x6s,\n      x5s: x5s ?? this.x5s,\n      x4s: x4s ?? this.x4s,\n      x3s: x3s ?? this.x3s,\n      x2s: x2s ?? this.x2s,\n      xs: xs ?? this.xs,\n      sm: sm ?? this.sm,\n      md: md ?? this.md,\n      lg: lg ?? this.lg,\n      xl: xl ?? this.xl,\n      x2l: x2l ?? this.x2l,\n    );\n  }\n\n  @override\n  MoonSizes lerp(ThemeExtension<MoonSizes>? other, double t) {\n    if (other is! MoonSizes) return this;\n\n    return MoonSizes(\n      x6s: lerpDouble(x6s, other.x6s, t)!,\n      x5s: lerpDouble(x5s, other.x5s, t)!,\n      x4s: lerpDouble(x4s, other.x4s, t)!,\n      x3s: lerpDouble(x3s, other.x3s, t)!,\n      x2s: lerpDouble(x2s, other.x2s, t)!,\n      xs: lerpDouble(xs, other.xs, t)!,\n      sm: lerpDouble(sm, other.sm, t)!,\n      md: lerpDouble(md, other.md, t)!,\n      lg: lerpDouble(lg, other.lg, t)!,\n      xl: lerpDouble(xl, other.xl, t)!,\n      x2l: lerpDouble(x2l, other.x2l, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonSizes\"))\n      ..add(DoubleProperty(\"x6s\", x6s))\n      ..add(DoubleProperty(\"x5s\", x5s))\n      ..add(DoubleProperty(\"x4s\", x4s))\n      ..add(DoubleProperty(\"x3s\", x3s))\n      ..add(DoubleProperty(\"x2s\", x2s))\n      ..add(DoubleProperty(\"xs\", xs))\n      ..add(DoubleProperty(\"sm\", sm))\n      ..add(DoubleProperty(\"md\", md))\n      ..add(DoubleProperty(\"lg\", lg))\n      ..add(DoubleProperty(\"xl\", xl))\n      ..add(DoubleProperty(\"x2l\", x2l));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tokens/tokens.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/opacities.dart';\nimport 'package:moon_design/src/theme/tokens/shadows.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\n@immutable\nclass MoonTokens extends ThemeExtension<MoonTokens>\n    with DiagnosticableTreeMixin {\n  static const light = MoonTokens(\n    borders: MoonBorders.borders,\n    colors: MoonColors.light,\n    complementaryColors: MoonColors.dark,\n    opacities: MoonOpacities.opacities,\n    shadows: MoonShadows.light,\n    sizes: MoonSizes.sizes,\n    transitions: MoonTransitions.transitions,\n    typography: MoonTypography.typography,\n  );\n\n  static const dark = MoonTokens(\n    borders: MoonBorders.borders,\n    colors: MoonColors.dark,\n    complementaryColors: MoonColors.light,\n    opacities: MoonOpacities.opacities,\n    shadows: MoonShadows.dark,\n    sizes: MoonSizes.sizes,\n    transitions: MoonTransitions.transitions,\n    typography: MoonTypography.typography,\n  );\n\n  /// The borders of the Moon Design System.\n  final MoonBorders borders;\n\n  /// The colors of the Moon Design System.\n  final MoonColors colors;\n\n  /// The colors of the Moon Design System that are from complementary theme\n  /// (light -> dark, dark -> light).\n  final MoonColors complementaryColors;\n\n  /// The opacities of the Moon Design System.\n  final MoonOpacities opacities;\n\n  /// The shadows of the Moon Design System.\n  final MoonShadows shadows;\n\n  /// The sizes of the Moon Design System.\n  final MoonSizes sizes;\n\n  final MoonTransitions transitions;\n\n  /// The typography of the Moon Design System.\n  final MoonTypography typography;\n\n  const MoonTokens({\n    required this.borders,\n    required this.colors,\n    required this.complementaryColors,\n    required this.opacities,\n    required this.shadows,\n    required this.sizes,\n    required this.transitions,\n    required this.typography,\n  });\n\n  @override\n  MoonTokens copyWith({\n    MoonBorders? borders,\n    MoonColors? colors,\n    MoonColors? complementaryColors,\n    MoonOpacities? opacities,\n    MoonShadows? shadows,\n    MoonSizes? sizes,\n    MoonTransitions? transitions,\n    MoonTypography? typography,\n  }) {\n    return MoonTokens(\n      borders: borders ?? this.borders,\n      colors: colors ?? this.colors,\n      complementaryColors: complementaryColors ?? this.complementaryColors,\n      opacities: opacities ?? this.opacities,\n      shadows: shadows ?? this.shadows,\n      sizes: sizes ?? this.sizes,\n      transitions: transitions ?? this.transitions,\n      typography: typography ?? this.typography,\n    );\n  }\n\n  @override\n  MoonTokens lerp(ThemeExtension<MoonTokens>? other, double t) {\n    if (other is! MoonTokens) return this;\n\n    return MoonTokens(\n      borders: borders.lerp(other.borders, t),\n      colors: colors.lerp(other.colors, t),\n      complementaryColors:\n          complementaryColors.lerp(other.complementaryColors, t),\n      opacities: opacities.lerp(other.opacities, t),\n      shadows: shadows.lerp(other.shadows, t),\n      sizes: sizes.lerp(other.sizes, t),\n      transitions: transitions.lerp(other.transitions, t),\n      typography: typography.lerp(other.typography, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTokens\"))\n      ..add(DiagnosticsProperty<MoonBorders>(\"MoonBorders\", borders))\n      ..add(DiagnosticsProperty<MoonColors>(\"MoonColors\", colors))\n      ..add(DiagnosticsProperty<MoonColors>(\"MoonColors\", complementaryColors))\n      ..add(DiagnosticsProperty<MoonOpacities>(\"MoonOpacities\", opacities))\n      ..add(DiagnosticsProperty<MoonShadows>(\"MoonShadows\", shadows))\n      ..add(DiagnosticsProperty<MoonSizes>(\"MoonSizes\", sizes))\n      ..add(\n        DiagnosticsProperty<MoonTransitions>(\n          \"MoonTransitions\",\n          transitions,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTypography>(\n          \"MoonTypography\",\n          typography,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tokens/transitions.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTransitions extends ThemeExtension<MoonTransitions>\n    with DiagnosticableTreeMixin {\n  static const transitions = MoonTransitions(\n    defaultTransitionDuration: Duration(milliseconds: 200),\n    defaultTransitionCurve: Curves.easeInOutCubic,\n  );\n\n  /// The default transition duration.\n  final Duration defaultTransitionDuration;\n\n  /// The default transition curve.\n  final Curve defaultTransitionCurve;\n\n  const MoonTransitions({\n    required this.defaultTransitionDuration,\n    required this.defaultTransitionCurve,\n  });\n\n  @override\n  MoonTransitions copyWith({\n    Duration? defaultTransitionDuration,\n    Curve? defaultTransitionCurve,\n  }) {\n    return MoonTransitions(\n      defaultTransitionDuration:\n          defaultTransitionDuration ?? this.defaultTransitionDuration,\n      defaultTransitionCurve:\n          defaultTransitionCurve ?? this.defaultTransitionCurve,\n    );\n  }\n\n  @override\n  MoonTransitions lerp(ThemeExtension<MoonTransitions>? other, double t) {\n    if (other is! MoonTransitions) return this;\n\n    return MoonTransitions(\n      defaultTransitionDuration: lerpDuration(\n        defaultTransitionDuration,\n        other.defaultTransitionDuration,\n        t,\n      ),\n      defaultTransitionCurve: other.defaultTransitionCurve,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\n          \"type\",\n          \"MoonTransitions\",\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\n          \"defaultTransitionDuration\",\n          defaultTransitionDuration,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\n          \"defaultTransitionCurve\",\n          defaultTransitionCurve,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tokens/typography/text_styles.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTextStyles extends ThemeExtension<MoonTextStyles>\n    with DiagnosticableTreeMixin {\n  static const _semiBold = FontWeight.w600;\n  static const _semiBoldVariation = [FontVariation('wght', 600)];\n\n  static const body = MoonTextStyles(\n    textDefault: TextStyle(\n      fontSize: 14,\n    ),\n    text6: TextStyle(\n      fontSize: 6,\n    ),\n    text8: TextStyle(\n      fontSize: 8,\n    ),\n    text9: TextStyle(\n      fontSize: 9,\n    ),\n    text10: TextStyle(\n      fontSize: 10,\n    ),\n    text12: TextStyle(\n      fontSize: 12,\n    ),\n    text14: TextStyle(\n      fontSize: 14,\n    ),\n    text16: TextStyle(\n      fontSize: 16,\n    ),\n    text18: TextStyle(\n      fontSize: 18,\n    ),\n    text20: TextStyle(\n      fontSize: 20,\n    ),\n    text24: TextStyle(\n      fontSize: 24,\n    ),\n    text32: TextStyle(\n      fontSize: 32,\n    ),\n    text40: TextStyle(\n      fontSize: 40,\n    ),\n    text48: TextStyle(\n      fontSize: 48,\n    ),\n    text56: TextStyle(\n      fontSize: 56,\n    ),\n    text64: TextStyle(\n      fontSize: 64,\n    ),\n    text72: TextStyle(\n      fontSize: 72,\n    ),\n  );\n\n  static const heading = MoonTextStyles(\n    textDefault: TextStyle(\n      fontSize: 14,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text6: TextStyle(\n      fontSize: 6,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text8: TextStyle(\n      fontSize: 8,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text9: TextStyle(\n      fontSize: 9,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text10: TextStyle(\n      fontSize: 10,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text12: TextStyle(\n      fontSize: 12,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text14: TextStyle(\n      fontSize: 14,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text16: TextStyle(\n      fontSize: 16,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text18: TextStyle(\n      fontSize: 18,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text20: TextStyle(\n      fontSize: 20,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text24: TextStyle(\n      fontSize: 24,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text32: TextStyle(\n      fontSize: 32,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text40: TextStyle(\n      fontSize: 40,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text48: TextStyle(\n      fontSize: 48,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text56: TextStyle(\n      fontSize: 56,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text64: TextStyle(\n      fontSize: 64,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n    text72: TextStyle(\n      fontSize: 72,\n      fontVariations: _semiBoldVariation,\n      fontWeight: _semiBold,\n    ),\n  );\n\n  /// The default text size.\n  final TextStyle textDefault;\n\n  /// The text size 6.\n  final TextStyle text6;\n\n  /// The text size 8.\n  final TextStyle text8;\n\n  /// The text size 9.\n  final TextStyle text9;\n\n  /// The text size 10.\n  final TextStyle text10;\n\n  /// The text size 12.\n  final TextStyle text12;\n\n  /// The text size 14.\n  final TextStyle text14;\n\n  /// The text size 16.\n  final TextStyle text16;\n\n  /// The text size 18.\n  final TextStyle text18;\n\n  /// The text size 20.\n  final TextStyle text20;\n\n  /// The text size 24.\n  final TextStyle text24;\n\n  /// The text size 32.\n  final TextStyle text32;\n\n  /// The text size 40.\n  final TextStyle text40;\n\n  /// The text size 48.\n  final TextStyle text48;\n\n  /// The text size 56.\n  final TextStyle text56;\n\n  /// The text size 64.\n  final TextStyle text64;\n\n  /// The text size 72.\n  final TextStyle text72;\n\n  const MoonTextStyles({\n    required this.textDefault,\n    required this.text6,\n    required this.text8,\n    required this.text9,\n    required this.text10,\n    required this.text12,\n    required this.text14,\n    required this.text16,\n    required this.text18,\n    required this.text20,\n    required this.text24,\n    required this.text32,\n    required this.text40,\n    required this.text48,\n    required this.text56,\n    required this.text64,\n    required this.text72,\n  });\n\n  /// Creates a copy of the text theme but with the given field replaced in each of the individual text styles.\n  MoonTextStyles apply({\n    Color? backgroundColor,\n    Color? color,\n    Color? decorationColor,\n    double decorationThicknessDelta = 0.0,\n    double decorationThicknessFactor = 1.0,\n    double fontSizeDelta = 0.0,\n    double fontSizeFactor = 1.0,\n    double heightDelta = 0.0,\n    double heightFactor = 1.0,\n    double letterSpacingDelta = 0.0,\n    double letterSpacingFactor = 1.0,\n    FontStyle? fontStyle,\n    int fontWeightDelta = 0,\n    List<FontFeature>? fontFeatures,\n    List<FontVariation>? fontVariations,\n    List<Shadow>? shadows,\n    List<String>? fontFamilyFallback,\n    Locale? locale,\n    String? fontFamily,\n    String? package,\n    TextBaseline? textBaseline,\n    TextDecoration? decoration,\n    TextDecorationStyle? decorationStyle,\n    TextLeadingDistribution? leadingDistribution,\n    TextOverflow? overflow,\n  }) {\n    TextStyle applyProps(TextStyle style) => style.apply(\n          backgroundColor: backgroundColor,\n          decorationThicknessDelta: decorationThicknessDelta,\n          decorationThicknessFactor: decorationThicknessFactor,\n          color: color,\n          decorationColor: decorationColor,\n          fontSizeDelta: fontSizeDelta,\n          fontSizeFactor: fontSizeFactor,\n          heightDelta: heightDelta,\n          heightFactor: heightFactor,\n          letterSpacingDelta: letterSpacingDelta,\n          letterSpacingFactor: letterSpacingFactor,\n          fontFeatures: fontFeatures,\n          fontStyle: fontStyle,\n          fontWeightDelta: fontWeightDelta,\n          fontVariations: fontVariations,\n          shadows: shadows,\n          fontFamilyFallback: fontFamilyFallback,\n          locale: locale,\n          fontFamily: fontFamily,\n          package: package,\n          textBaseline: textBaseline,\n          decoration: decoration,\n          decorationStyle: decorationStyle,\n          leadingDistribution: leadingDistribution,\n          overflow: overflow,\n        );\n\n    return MoonTextStyles(\n      textDefault: applyProps(textDefault),\n      text6: applyProps(text6),\n      text8: applyProps(text8),\n      text9: applyProps(text9),\n      text10: applyProps(text10),\n      text12: applyProps(text12),\n      text14: applyProps(text14),\n      text16: applyProps(text16),\n      text18: applyProps(text18),\n      text20: applyProps(text20),\n      text24: applyProps(text24),\n      text32: applyProps(text32),\n      text40: applyProps(text40),\n      text48: applyProps(text48),\n      text56: applyProps(text56),\n      text64: applyProps(text64),\n      text72: applyProps(text72),\n    );\n  }\n\n  @override\n  MoonTextStyles copyWith({\n    TextStyle? textDefault,\n    TextStyle? text6,\n    TextStyle? text8,\n    TextStyle? text9,\n    TextStyle? text10,\n    TextStyle? text12,\n    TextStyle? text14,\n    TextStyle? text16,\n    TextStyle? text18,\n    TextStyle? text20,\n    TextStyle? text24,\n    TextStyle? text32,\n    TextStyle? text40,\n    TextStyle? text48,\n    TextStyle? text56,\n    TextStyle? text64,\n    TextStyle? text72,\n  }) {\n    return MoonTextStyles(\n      textDefault: textDefault ?? this.textDefault,\n      text6: text6 ?? this.text6,\n      text8: text8 ?? this.text8,\n      text9: text9 ?? this.text9,\n      text10: text10 ?? this.text10,\n      text12: text12 ?? this.text12,\n      text14: text14 ?? this.text14,\n      text16: text16 ?? this.text16,\n      text18: text18 ?? this.text18,\n      text20: text20 ?? this.text20,\n      text24: text24 ?? this.text24,\n      text32: text32 ?? this.text32,\n      text40: text40 ?? this.text40,\n      text48: text48 ?? this.text48,\n      text56: text56 ?? this.text56,\n      text64: text64 ?? this.text64,\n      text72: text72 ?? this.text72,\n    );\n  }\n\n  @override\n  MoonTextStyles lerp(ThemeExtension<MoonTextStyles>? other, double t) {\n    if (other is! MoonTextStyles) return this;\n\n    return MoonTextStyles(\n      textDefault: TextStyle.lerp(textDefault, other.textDefault, t)!,\n      text6: TextStyle.lerp(text6, other.text6, t)!,\n      text8: TextStyle.lerp(text8, other.text8, t)!,\n      text9: TextStyle.lerp(text9, other.text9, t)!,\n      text10: TextStyle.lerp(text10, other.text10, t)!,\n      text12: TextStyle.lerp(text12, other.text12, t)!,\n      text14: TextStyle.lerp(text14, other.text14, t)!,\n      text16: TextStyle.lerp(text16, other.text16, t)!,\n      text18: TextStyle.lerp(text18, other.text18, t)!,\n      text20: TextStyle.lerp(text20, other.text20, t)!,\n      text24: TextStyle.lerp(text24, other.text24, t)!,\n      text32: TextStyle.lerp(text32, other.text32, t)!,\n      text40: TextStyle.lerp(text40, other.text40, t)!,\n      text48: TextStyle.lerp(text48, other.text48, t)!,\n      text56: TextStyle.lerp(text56, other.text56, t)!,\n      text64: TextStyle.lerp(text64, other.text64, t)!,\n      text72: TextStyle.lerp(text72, other.text72, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTextStyles\"))\n      ..add(DiagnosticsProperty<TextStyle>(\"textDefault\", textDefault))\n      ..add(DiagnosticsProperty<TextStyle>(\"text6\", text6))\n      ..add(DiagnosticsProperty<TextStyle>(\"text8\", text8))\n      ..add(DiagnosticsProperty<TextStyle>(\"text9\", text9))\n      ..add(DiagnosticsProperty<TextStyle>(\"text10\", text10))\n      ..add(DiagnosticsProperty<TextStyle>(\"text12\", text12))\n      ..add(DiagnosticsProperty<TextStyle>(\"text14\", text14))\n      ..add(DiagnosticsProperty<TextStyle>(\"text16\", text16))\n      ..add(DiagnosticsProperty<TextStyle>(\"text18\", text18))\n      ..add(DiagnosticsProperty<TextStyle>(\"text20\", text20))\n      ..add(DiagnosticsProperty<TextStyle>(\"text24\", text24))\n      ..add(DiagnosticsProperty<TextStyle>(\"text32\", text32))\n      ..add(DiagnosticsProperty<TextStyle>(\"text40\", text40))\n      ..add(DiagnosticsProperty<TextStyle>(\"text48\", text48))\n      ..add(DiagnosticsProperty<TextStyle>(\"text56\", text56))\n      ..add(DiagnosticsProperty<TextStyle>(\"text64\", text64))\n      ..add(DiagnosticsProperty<TextStyle>(\"text72\", text72));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tokens/typography/typography.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/tokens/typography/text_styles.dart';\n\n@immutable\nclass MoonTypography extends ThemeExtension<MoonTypography>\n    with DiagnosticableTreeMixin {\n  static const typography = MoonTypography(\n    body: MoonTextStyles.body,\n    heading: MoonTextStyles.heading,\n  );\n\n  /// The text styles for the body.\n  final MoonTextStyles body;\n\n  /// The text styles for the heading.\n  final MoonTextStyles heading;\n\n  const MoonTypography({required this.body, required this.heading});\n\n  @override\n  MoonTypography copyWith({MoonTextStyles? body, MoonTextStyles? heading}) {\n    return MoonTypography(\n      body: body ?? this.body,\n      heading: heading ?? this.heading,\n    );\n  }\n\n  @override\n  MoonTypography lerp(ThemeExtension<MoonTypography>? other, double t) {\n    if (other is! MoonTypography) return this;\n\n    return MoonTypography(\n      body: body.lerp(other.body, t),\n      heading: heading.lerp(other.heading, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTypography\"))\n      ..add(DiagnosticsProperty(\"body\", body))\n      ..add(DiagnosticsProperty(\"heading\", heading));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tooltip/tooltip_colors.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n@immutable\nclass MoonTooltipColors extends ThemeExtension<MoonTooltipColors>\n    with DiagnosticableTreeMixin {\n  /// The text color of the MoonTooltip.\n  final Color textColor;\n\n  /// The icon color of the MoonTooltip.\n  final Color iconColor;\n\n  /// The background color of the MoonTooltip.\n  final Color backgroundColor;\n\n  const MoonTooltipColors({\n    required this.textColor,\n    required this.iconColor,\n    required this.backgroundColor,\n  });\n\n  @override\n  MoonTooltipColors copyWith({\n    Color? textColor,\n    Color? iconColor,\n    Color? backgroundColor,\n  }) {\n    return MoonTooltipColors(\n      textColor: textColor ?? this.textColor,\n      iconColor: iconColor ?? this.iconColor,\n      backgroundColor: backgroundColor ?? this.backgroundColor,\n    );\n  }\n\n  @override\n  MoonTooltipColors lerp(ThemeExtension<MoonTooltipColors>? other, double t) {\n    if (other is! MoonTooltipColors) return this;\n\n    return MoonTooltipColors(\n      textColor: colorPremulLerp(textColor, other.textColor, t)!,\n      iconColor: colorPremulLerp(iconColor, other.iconColor, t)!,\n      backgroundColor: colorPremulLerp(\n        backgroundColor,\n        other.backgroundColor,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(DiagnosticsProperty(\"type\", \"MoonTooltipColors\"))\n      ..add(ColorProperty(\"textColor\", textColor))\n      ..add(ColorProperty(\"iconColor\", iconColor))\n      ..add(ColorProperty(\"backgroundColor\", backgroundColor));\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tooltip/tooltip_properties.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTooltipProperties extends ThemeExtension<MoonTooltipProperties>\n    with DiagnosticableTreeMixin {\n  /// The border radius of the MoonTooltip.\n  final BorderRadiusGeometry borderRadius;\n\n  /// The base width of the MoonTooltip arrow (tail).\n  final double arrowBaseWidth;\n\n  /// The length of the MoonTooltip arrow (tail).\n  final double arrowLength;\n\n  /// The distance from the tip of the MoonTooltip arrow (tail) to the target\n  /// widget.\n  final double arrowTipDistance;\n\n  /// The duration of the MoonTooltip transition animation (fade in or out).\n  final Duration transitionDuration;\n\n  /// The curve of the MoonTooltip transition animation (fade in or out).\n  final Curve transitionCurve;\n\n  /// The padding of the MoonTooltip content.\n  final EdgeInsetsGeometry contentPadding;\n\n  /// The text style of the MoonTooltip.\n  final TextStyle textStyle;\n\n  const MoonTooltipProperties({\n    required this.borderRadius,\n    required this.arrowBaseWidth,\n    required this.arrowLength,\n    required this.arrowTipDistance,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.contentPadding,\n    required this.textStyle,\n  });\n\n  @override\n  MoonTooltipProperties copyWith({\n    BorderRadiusGeometry? borderRadius,\n    double? arrowBaseWidth,\n    double? arrowLength,\n    double? arrowTipDistance,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    EdgeInsetsGeometry? contentPadding,\n    TextStyle? textStyle,\n  }) {\n    return MoonTooltipProperties(\n      borderRadius: borderRadius ?? this.borderRadius,\n      arrowBaseWidth: arrowBaseWidth ?? this.arrowBaseWidth,\n      arrowLength: arrowLength ?? this.arrowLength,\n      arrowTipDistance: arrowTipDistance ?? this.arrowTipDistance,\n      transitionDuration: transitionDuration ?? this.transitionDuration,\n      transitionCurve: transitionCurve ?? this.transitionCurve,\n      contentPadding: contentPadding ?? this.contentPadding,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n\n  @override\n  MoonTooltipProperties lerp(\n    ThemeExtension<MoonTooltipProperties>? other,\n    double t,\n  ) {\n    if (other is! MoonTooltipProperties) return this;\n\n    return MoonTooltipProperties(\n      borderRadius:\n          BorderRadiusGeometry.lerp(borderRadius, other.borderRadius, t)!,\n      arrowBaseWidth: lerpDouble(arrowBaseWidth, other.arrowBaseWidth, t)!,\n      arrowLength: lerpDouble(arrowLength, other.arrowLength, t)!,\n      arrowTipDistance:\n          lerpDouble(arrowTipDistance, other.arrowTipDistance, t)!,\n      transitionDuration:\n          lerpDuration(transitionDuration, other.transitionDuration, t),\n      transitionCurve: other.transitionCurve,\n      contentPadding:\n          EdgeInsetsGeometry.lerp(contentPadding, other.contentPadding, t)!,\n      textStyle: TextStyle.lerp(textStyle, other.textStyle, t)!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonTooltipProperties\"),\n      )\n      ..add(\n        DiagnosticsProperty<BorderRadiusGeometry>(\"borderRadius\", borderRadius),\n      )\n      ..add(\n        DoubleProperty(\"arrowBaseWidth\", arrowBaseWidth),\n      )\n      ..add(\n        DoubleProperty(\"arrowLength\", arrowLength),\n      )\n      ..add(\n        DoubleProperty(\"arrowTipDistance\", arrowTipDistance),\n      )\n      ..add(\n        DiagnosticsProperty<Duration>(\"transitionDuration\", transitionDuration),\n      )\n      ..add(\n        DiagnosticsProperty<Curve>(\"transitionCurve\", transitionCurve),\n      )\n      ..add(\n        DiagnosticsProperty<EdgeInsetsGeometry>(\n          \"contentPadding\",\n          contentPadding,\n        ),\n      )\n      ..add(\n        DiagnosticsProperty<TextStyle>(\n          \"textStyle\",\n          textStyle,\n        ),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tooltip/tooltip_shadows.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass MoonTooltipShadows extends ThemeExtension<MoonTooltipShadows>\n    with DiagnosticableTreeMixin {\n  /// The list of shadows applied to the MoonTooltip.\n  final List<BoxShadow> tooltipShadows;\n\n  const MoonTooltipShadows({required this.tooltipShadows});\n\n  @override\n  MoonTooltipShadows copyWith({List<BoxShadow>? tooltipShadows}) {\n    return MoonTooltipShadows(\n      tooltipShadows: tooltipShadows ?? this.tooltipShadows,\n    );\n  }\n\n  @override\n  MoonTooltipShadows lerp(ThemeExtension<MoonTooltipShadows>? other, double t) {\n    if (other is! MoonTooltipShadows) return this;\n\n    return MoonTooltipShadows(\n      tooltipShadows: BoxShadow.lerpList(\n        tooltipShadows,\n        other.tooltipShadows,\n        t,\n      )!,\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonTooltipShadows\"),\n      )\n      ..add(\n        DiagnosticsProperty<List<BoxShadow>>(\"tooltipShadows\", tooltipShadows),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/theme/tooltip/tooltip_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/theme/tooltip/tooltip_colors.dart';\nimport 'package:moon_design/src/theme/tooltip/tooltip_properties.dart';\nimport 'package:moon_design/src/theme/tooltip/tooltip_shadows.dart';\n\n@immutable\nclass MoonTooltipTheme extends ThemeExtension<MoonTooltipTheme>\n    with DiagnosticableTreeMixin {\n  /// The tokens of the Moon Design System.\n  final MoonTokens tokens;\n\n  /// The colors of the MoonTooltip.\n  final MoonTooltipColors colors;\n\n  /// The properties of the MoonTooltip.\n  final MoonTooltipProperties properties;\n\n  /// The shadows of the MoonTooltip.\n  final MoonTooltipShadows shadows;\n\n  MoonTooltipTheme({\n    required this.tokens,\n    MoonTooltipColors? colors,\n    MoonTooltipProperties? properties,\n    MoonTooltipShadows? shadows,\n  })  : colors = colors ??\n            MoonTooltipColors(\n              textColor: tokens.colors.textPrimary,\n              iconColor: tokens.colors.iconPrimary,\n              backgroundColor: tokens.colors.goku,\n            ),\n        properties = properties ??\n            MoonTooltipProperties(\n              borderRadius: tokens.borders.interactiveXs,\n              arrowBaseWidth: tokens.sizes.x2s,\n              arrowLength: tokens.sizes.x4s,\n              arrowTipDistance: tokens.sizes.x4s,\n              transitionDuration: const Duration(milliseconds: 150),\n              transitionCurve: tokens.transitions.defaultTransitionCurve,\n              contentPadding: EdgeInsets.all(tokens.sizes.x3s),\n              textStyle: tokens.typography.body.text12,\n            ),\n        shadows =\n            shadows ?? MoonTooltipShadows(tooltipShadows: tokens.shadows.sm);\n\n  @override\n  MoonTooltipTheme copyWith({\n    MoonTokens? tokens,\n    MoonTooltipColors? colors,\n    MoonTooltipProperties? properties,\n    MoonTooltipShadows? shadows,\n  }) {\n    return MoonTooltipTheme(\n      tokens: tokens ?? this.tokens,\n      colors: colors ?? this.colors,\n      properties: properties ?? this.properties,\n      shadows: shadows ?? this.shadows,\n    );\n  }\n\n  @override\n  MoonTooltipTheme lerp(ThemeExtension<MoonTooltipTheme>? other, double t) {\n    if (other is! MoonTooltipTheme) return this;\n\n    return MoonTooltipTheme(\n      tokens: tokens.lerp(other.tokens, t),\n      colors: colors.lerp(other.colors, t),\n      properties: properties.lerp(other.properties, t),\n      shadows: shadows.lerp(other.shadows, t),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder diagnosticProperties) {\n    super.debugFillProperties(diagnosticProperties);\n    diagnosticProperties\n      ..add(\n        DiagnosticsProperty(\"type\", \"MoonTooltipTheme\"),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTokens>(\"tokens\", tokens),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTooltipColors>(\"colors\", colors),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTooltipProperties>(\"properties\", properties),\n      )\n      ..add(\n        DiagnosticsProperty<MoonTooltipShadows>(\"shadows\", shadows),\n      );\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/brightness_from_pixels.dart",
    "content": "import 'dart:typed_data';\n\ndouble getBrightnessFromBytes(Uint8List bytes) {\n  /// Calculates the brightness score for each pixel in the image.\n  ///\n  /// For each pixel, a brightness score is assigned based on its color.\n  /// Bright pixels receive a positive value, while dark pixels receive a\n  /// negative value. A score close to 0 indicates a neutral grey color.\n  ///\n  /// The score is discounted if the pixel has transparency (alpha < 255).\n  /// For example, a semi-transparent black pixel (#000000 with alpha < 255)\n  /// has a negative score.\n  double totalScore = 0.0;\n\n  for (int i = 0; i < bytes.length; i += 4) {\n    final r = bytes[i];\n    final g = bytes[i + 1];\n    final b = bytes[i + 2];\n    final a = bytes[i + 3];\n\n    final brightness = 0.2126 * r + 0.7152 * g + 0.0722 * b; // 0 to 255.\n    final normalized = (brightness / 127.5 - 1) * (a / 255); // -1 to 1.\n\n    totalScore += normalized;\n  }\n  return totalScore;\n}\n"
  },
  {
    "path": "lib/src/utils/color_premul_lerp.dart",
    "content": "import 'dart:ui';\n\nColor _scaleAlpha(Color a, double factor) {\n  return a.withAlpha((a.alpha * factor).round().clamp(0, 255));\n}\n\n/// Workaround for Flutter's use of straight alpha instead of premultiplied\n/// alpha for color lerping.\nColor? colorPremulLerp(Color? a, Color? b, double t) {\n  if (b == null) {\n    if (a == null) {\n      return null;\n    } else {\n      return _scaleAlpha(a, 1.0 - t);\n    }\n  } else {\n    if (a == null) {\n      return _scaleAlpha(b, t);\n    } else {\n      final weight1 = (1 - t) * a.opacity;\n      final weight2 = t * b.opacity;\n      final summedWeight = weight1 + weight2;\n      final w = summedWeight > 0.000001 ? weight2 / summedWeight : 0.5;\n\n      return Color.fromARGB(\n        lerpDouble(a.alpha, b.alpha, t)!.toInt().clamp(0, 255),\n        lerpDouble(a.red, b.red, w)!.toInt().clamp(0, 255),\n        lerpDouble(a.green, b.green, w)!.toInt().clamp(0, 255),\n        lerpDouble(a.blue, b.blue, w)!.toInt().clamp(0, 255),\n      );\n    }\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/color_tween_premul.dart",
    "content": "import 'package:flutter/animation.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n// TODO: Remove this once Flutter transitions from straight alpha to premultiplied alpha for color lerping.\nclass ColorTweenWithPremultipliedAlpha extends Tween<Color?> {\n  /// Creates a [Color] tween with premultiplied alpha.\n  ///\n  /// The [begin] and [end] properties may be null to indicate transparency.\n  /// It's discouraged to pass [Colors.transparent] as it may result in fading\n  /// in or out of black, which may not be the intended effect.\n  /// Instead, prefer using null to indicate transparency.\n  ColorTweenWithPremultipliedAlpha({super.begin, super.end});\n\n  /// Returns the value of this variable at the given animation clock value.\n  @override\n  Color? lerp(double t) => colorPremulLerp(begin, end, t);\n}\n"
  },
  {
    "path": "lib/src/utils/extensions.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/widgets.dart';\n\nimport 'package:moon_design/src/utils/squircle/squircle_border_radius.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_radius.dart';\n\nextension BuildContextX on BuildContext {\n  /// Whether the dark mode is currently active.\n  bool get isDarkMode {\n    final brightness = MediaQuery.of(this).platformBrightness;\n    return brightness == Brightness.dark;\n  }\n}\n\nextension BorderRadiusGeometryX on BorderRadiusGeometry {\n  /// Returns the MoonSquircleBorderRadius.\n  MoonSquircleBorderRadius squircleBorderRadius(BuildContext context) {\n    final borderRadius = resolve(Directionality.of(context));\n\n    return MoonSquircleBorderRadius.only(\n      topLeft: MoonSquircleRadius(cornerRadius: borderRadius.topLeft.x),\n      topRight: MoonSquircleRadius(cornerRadius: borderRadius.topRight.x),\n      bottomLeft: MoonSquircleRadius(cornerRadius: borderRadius.bottomLeft.x),\n      bottomRight: MoonSquircleRadius(cornerRadius: borderRadius.bottomRight.x),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/linked_scroll_controller.dart",
    "content": "// Copyright 2018 the Dart project authors.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file or at\n// https://developers.google.com/open-source/licenses/bsd\n\nimport 'package:flutter/material.dart';\nimport 'package:flutter/rendering.dart';\n\n/// Sets up a collection of scroll controllers that mirror their movements to\n/// each other.\n///\n/// Controllers are added and returned via [addAndGet]. The initial offset\n/// of the newly created controller is synced to the current offset.\n/// It is important to dispose the controllers when they are no longer in\n/// use to prevent memory leaks and performance degradation.\n///\n/// If controllers are disposed during the lifetime of this object, the\n/// corresponding scrollables should be given unique keys. Without unique keys,\n/// Flutter may reuse a disposed controller, potentially causing the controller\n/// offsets to fall out of sync.\nclass LinkedScrollControllerGroup {\n  LinkedScrollControllerGroup() {\n    _offsetNotifier = _LinkedScrollControllerGroupOffsetNotifier(this);\n  }\n\n  final _allControllers = <_LinkedScrollController>[];\n\n  late _LinkedScrollControllerGroupOffsetNotifier _offsetNotifier;\n\n  /// The current scroll offset of the group.\n  double get offset {\n    assert(\n      _attachedControllers.isNotEmpty,\n      'LinkedScrollControllerGroup does not have any scroll controllers '\n      'attached.',\n    );\n\n    return _attachedControllers.first.offset;\n  }\n\n  /// Creates a new controller that is linked to any existing ones.\n  ScrollController addAndGet() {\n    final initialScrollOffset = _attachedControllers.isEmpty\n        ? 0.0\n        : _attachedControllers.first.position.pixels;\n    final controller =\n        _LinkedScrollController(this, initialScrollOffset: initialScrollOffset);\n\n    _allControllers.add(controller);\n    controller.addListener(_offsetNotifier.notifyListeners);\n\n    return controller;\n  }\n\n  /// Adds a callback that will be called when the value of [offset] changes.\n  void addOffsetChangedListener(VoidCallback onChanged) {\n    _offsetNotifier.addListener(onChanged);\n  }\n\n  /// Removes the specified offset changed listener.\n  void removeOffsetChangedListener(VoidCallback listener) {\n    _offsetNotifier.removeListener(listener);\n  }\n\n  Iterable<_LinkedScrollController> get _attachedControllers =>\n      _allControllers.where((controller) => controller.hasClients);\n\n  /// Animates the scroll position of all linked controllers to [offset].\n  Future<void> animateTo(\n    double offset, {\n    required Curve curve,\n    required Duration duration,\n  }) async {\n    final animations = <Future<void>>[];\n\n    for (final controller in _attachedControllers) {\n      animations\n          .add(controller.animateTo(offset, duration: duration, curve: curve));\n    }\n\n    return Future.wait<void>(animations).then<void>((List<void> _) => null);\n  }\n\n  /// Jumps the scroll position of all linked controllers to [value].\n  void jumpTo(double value) {\n    for (final controller in _attachedControllers) {\n      controller.jumpTo(value);\n    }\n  }\n\n  /// Resets the scroll position of all linked controllers to 0.\n  void resetScroll() {\n    jumpTo(0.0);\n  }\n}\n\n/// This class provides change notification for the scroll offset of a\n/// [LinkedScrollControllerGroup].\n///\n/// It de-duplicates change events by only firing listeners when the scroll\n/// offset of the group changes.\nclass _LinkedScrollControllerGroupOffsetNotifier extends ChangeNotifier {\n  _LinkedScrollControllerGroupOffsetNotifier(this.controllerGroup);\n\n  final LinkedScrollControllerGroup controllerGroup;\n\n  /// The cached offset for the group.\n  ///\n  /// This value is used internally to determine whether to notify listeners\n  /// when the offset changes. It helps optimize performance by avoiding\n  /// unnecessary notifications when the offset remains unchanged.\n  double? _cachedOffset;\n\n  @override\n  void notifyListeners() {\n    final currentOffset = controllerGroup.offset;\n\n    if (currentOffset != _cachedOffset) {\n      _cachedOffset = currentOffset;\n\n      super.notifyListeners();\n    }\n  }\n}\n\n/// A scroll controller that synchronizes its movements with a peer scroll\n/// controller. Both controllers must be instances of [_LinkedScrollController].\nclass _LinkedScrollController extends ScrollController {\n  final LinkedScrollControllerGroup _controllers;\n\n  _LinkedScrollController(\n    this._controllers, {\n    required super.initialScrollOffset,\n  }) : super(keepScrollOffset: false);\n\n  @override\n  void dispose() {\n    _controllers._allControllers.remove(this);\n\n    super.dispose();\n  }\n\n  @override\n  void attach(ScrollPosition position) {\n    assert(\n      position is _LinkedScrollPosition,\n      '_LinkedScrollControllers can only be used with _LinkedScrollPositions.',\n    );\n    final _LinkedScrollPosition linkedPosition =\n        position as _LinkedScrollPosition;\n    assert(\n      linkedPosition.owner == this,\n      '_LinkedScrollPosition cannot change controllers once created.',\n    );\n    super.attach(position);\n  }\n\n  @override\n  _LinkedScrollPosition createScrollPosition(\n    ScrollPhysics physics,\n    ScrollContext context,\n    ScrollPosition? oldPosition,\n  ) {\n    return _LinkedScrollPosition(\n      this,\n      physics: physics,\n      context: context,\n      initialPixels: initialScrollOffset,\n      oldPosition: oldPosition,\n    );\n  }\n\n  @override\n  double get initialScrollOffset => _controllers._attachedControllers.isEmpty\n      ? super.initialScrollOffset\n      : _controllers.offset;\n\n  @override\n  _LinkedScrollPosition get position => super.position as _LinkedScrollPosition;\n\n  Iterable<_LinkedScrollController> get _allPeersWithClients =>\n      _controllers._attachedControllers.where((peer) => peer != this);\n\n  bool get canLinkWithPeers => _allPeersWithClients.isNotEmpty;\n\n  Iterable<_LinkedScrollActivity> linkWithPeers(_LinkedScrollPosition driver) {\n    assert(canLinkWithPeers);\n    return _allPeersWithClients\n        .map((peer) => peer.link(driver))\n        .expand((e) => e);\n  }\n\n  Iterable<_LinkedScrollActivity> link(_LinkedScrollPosition driver) {\n    assert(hasClients);\n\n    final activities = <_LinkedScrollActivity>[];\n\n    for (final position in positions) {\n      final linkedPosition = position as _LinkedScrollPosition;\n      activities.add(linkedPosition.link(driver));\n    }\n\n    return activities;\n  }\n}\n\n// Implementation details:\n// When position.setPixels or position.forcePixels is called on a\n// _LinkedScrollPosition, it creates a _LinkedScrollActivity for each linked\n// position to move or jump to the appropriate offset, either programmatically\n// or as a result of a user action. When a new activity starts, the set of peer\n// activities is cleared.\nclass _LinkedScrollPosition extends ScrollPositionWithSingleContext {\n  _LinkedScrollPosition(\n    this.owner, {\n    required super.physics,\n    required super.context,\n    super.initialPixels = null,\n    super.oldPosition,\n  });\n\n  final _LinkedScrollController owner;\n\n  final Set<_LinkedScrollActivity> _peerActivities = <_LinkedScrollActivity>{};\n\n  // Overrides the hold method to propagate it to all peer controllers.\n  @override\n  ScrollHoldController hold(VoidCallback holdCancelCallback) {\n    for (final controller in owner._allPeersWithClients) {\n      controller.position._holdInternal();\n    }\n\n    return super.hold(holdCancelCallback);\n  }\n\n  // Invokes hold without propagating to peers.\n  void _holdInternal() {\n    super.hold(() {});\n  }\n\n  @override\n  void beginActivity(ScrollActivity? newActivity) {\n    if (newActivity == null) {\n      return;\n    }\n    for (final activity in _peerActivities) {\n      activity.unlink(this);\n    }\n\n    _peerActivities.clear();\n\n    super.beginActivity(newActivity);\n  }\n\n  @override\n  double setPixels(double newPixels) {\n    if (newPixels == pixels) return 0.0;\n\n    updateUserScrollDirection(\n      newPixels - pixels > 0.0\n          ? ScrollDirection.forward\n          : ScrollDirection.reverse,\n    );\n\n    if (owner.canLinkWithPeers) {\n      _peerActivities.addAll(owner.linkWithPeers(this));\n\n      for (final activity in _peerActivities) {\n        activity.moveTo(newPixels);\n      }\n    }\n\n    return setPixelsInternal(newPixels);\n  }\n\n  double setPixelsInternal(double newPixels) {\n    return super.setPixels(newPixels);\n  }\n\n  @override\n  void forcePixels(double value) {\n    if (value == pixels) return;\n\n    updateUserScrollDirection(\n      value - pixels > 0.0 ? ScrollDirection.forward : ScrollDirection.reverse,\n    );\n\n    if (owner.canLinkWithPeers) {\n      _peerActivities.addAll(owner.linkWithPeers(this));\n\n      for (final activity in _peerActivities) {\n        activity.jumpTo(value);\n      }\n    }\n\n    forcePixelsInternal(value);\n  }\n\n  void forcePixelsInternal(double value) {\n    super.forcePixels(value);\n  }\n\n  _LinkedScrollActivity link(_LinkedScrollPosition driver) {\n    if (this.activity is! _LinkedScrollActivity) {\n      beginActivity(_LinkedScrollActivity(this));\n    }\n\n    final _LinkedScrollActivity activity =\n        this.activity! as _LinkedScrollActivity;\n    activity.link(driver);\n\n    return activity;\n  }\n\n  void unlink(_LinkedScrollActivity activity) {\n    _peerActivities.remove(activity);\n  }\n\n  // This method is overridden to make it public; the original method is protected.\n  @override\n  void updateUserScrollDirection(ScrollDirection value) {\n    super.updateUserScrollDirection(value);\n  }\n\n  @override\n  void debugFillDescription(List<String> description) {\n    super.debugFillDescription(description);\n\n    description.add('owner: $owner');\n  }\n}\n\nclass _LinkedScrollActivity extends ScrollActivity {\n  _LinkedScrollActivity(_LinkedScrollPosition super.delegate);\n\n  @override\n  _LinkedScrollPosition get delegate => super.delegate as _LinkedScrollPosition;\n\n  final Set<_LinkedScrollPosition> drivers = <_LinkedScrollPosition>{};\n\n  void link(_LinkedScrollPosition driver) {\n    drivers.add(driver);\n  }\n\n  void unlink(_LinkedScrollPosition driver) {\n    drivers.remove(driver);\n    if (drivers.isEmpty) {\n      delegate.goIdle();\n    }\n  }\n\n  @override\n  bool get shouldIgnorePointer => true;\n\n  @override\n  bool get isScrolling => true;\n\n  // _LinkedScrollActivity is not self-driven; it moves in response to calls to the [moveTo] method.\n  @override\n  double get velocity => 0.0;\n\n  void moveTo(double newPixels) {\n    _updateUserScrollDirection();\n    delegate.setPixelsInternal(newPixels);\n  }\n\n  void jumpTo(double newPixels) {\n    _updateUserScrollDirection();\n    delegate.forcePixelsInternal(newPixels);\n  }\n\n  void _updateUserScrollDirection() {\n    assert(drivers.isNotEmpty);\n\n    ScrollDirection commonDirection = drivers.first.userScrollDirection;\n\n    for (final driver in drivers) {\n      if (driver.userScrollDirection != commonDirection) {\n        commonDirection = ScrollDirection.idle;\n      }\n    }\n\n    delegate.updateUserScrollDirection(commonDirection);\n  }\n\n  @override\n  void dispose() {\n    for (final driver in drivers) {\n      driver.unlink(this);\n    }\n\n    super.dispose();\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/measure_size.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter/rendering.dart';\n\ntypedef OnWidgetSizeChange = void Function(Size size);\n\n/// Wrap a widget with this to receive updates about its size changes.\nclass MeasureSize extends SingleChildRenderObjectWidget {\n  final OnWidgetSizeChange onChange;\n  final bool getInitialSize;\n\n  const MeasureSize({\n    super.key,\n    required this.onChange,\n    required Widget super.child,\n    this.getInitialSize = false,\n  });\n\n  @override\n  RenderObject createRenderObject(BuildContext context) {\n    return MeasureSizeRenderObject(\n      onChange: onChange,\n      getInitialSize: getInitialSize,\n    );\n  }\n}\n\nclass MeasureSizeRenderObject extends RenderProxyBox {\n  Size? oldSize;\n  final OnWidgetSizeChange onChange;\n  final bool getInitialSize;\n\n  MeasureSizeRenderObject({\n    required this.onChange,\n    this.getInitialSize = false,\n  });\n\n  @override\n  void performLayout() {\n    super.performLayout();\n\n    final newSize = child!.size;\n\n    if (oldSize == newSize) return;\n\n    oldSize = newSize;\n\n    if (getInitialSize) {\n      onChange(child!.size);\n    } else {\n      WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n        onChange(newSize);\n      });\n    }\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/shape_decoration_premul.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/widgets.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\n// TODO: Remove this once Flutter transitions from straight alpha to premultiplied alpha for color lerping.\nclass ShapeDecorationWithPremultipliedAlpha extends Decoration {\n  /// The color to fill in the background of the shape.\n  ///\n  /// The color is under the [image].\n  ///\n  /// If a [gradient] is specified, [color] must be null.\n  final Color? color;\n\n  /// A gradient to use for filling the shape.\n  ///\n  /// The gradient is under the [image].\n  ///\n  /// If a [color] is specified, [gradient] must be null.\n  final Gradient? gradient;\n\n  /// An image to paint inside the shape (clipped to its outline).\n  ///\n  /// The image is drawn over the [color] or [gradient].\n  final DecorationImage? image;\n\n  /// The list of shadows cast by the [shape].\n  ///\n  /// See also:\n  ///\n  ///  * [kElevationToShadow], for some predefined shadows used in Material\n  ///  Design.\n  ///  * [PhysicalModel], a widget for showing shadows.\n  final List<BoxShadow>? shadows;\n\n  /// The shape to fill the [color], [gradient], and [image] into and to cast as\n  /// the [shadows].\n  ///\n  /// Shapes can be stacked (using the `+` operator). The color, gradient, and\n  /// image are drawn into the inner-most shape specified.\n  ///\n  /// The [shape] property specifies the outline (border) of the decoration. The\n  /// shape must not be null.\n  ///\n  /// ## Directionality-dependent shapes\n  ///\n  /// Some [ShapeBorder] subclasses are sensitive to the [TextDirection]. The\n  /// direction that is provided to the border (e.g. for its [ShapeBorder.paint]\n  /// method) is the one specified in the [ImageConfiguration]\n  /// ([ImageConfiguration.textDirection]) provided to the [BoxPainter]\n  /// (via its [BoxPainter.paint method). The [BoxPainter] is obtained when\n  /// [createBoxPainter] is called.\n  ///\n  /// When a [ShapeDecorationWithPremultipliedAlpha] is used with a [Container]\n  /// widget or a [DecoratedBox] widget (which is what [Container] uses), the\n  /// [TextDirection] specified in the [ImageConfiguration] is obtained from the\n  /// ambient [Directionality], using [createLocalImageConfiguration].\n  final ShapeBorder shape;\n\n  /// Creates a shape decoration with premultiplied alpha for color lerp.\n  /// In others respects, it is identical to [ShapeDecoration].\n  ///\n  /// * If [color] is null, this decoration does not paint a background color.\n  /// * If [gradient] is null, this decoration does not paint gradients.\n  /// * If [image] is null, this decoration does not paint a background image.\n  /// * If [shadows] is null, this decoration does not paint a shadow.\n  ///\n  /// The [color] and [gradient] properties are mutually exclusive,\n  /// one (or both) of them must be null.\n  ///\n  /// The [shape] must not be null.\n  const ShapeDecorationWithPremultipliedAlpha({\n    this.color,\n    this.image,\n    this.gradient,\n    this.shadows,\n    required this.shape,\n  }) : assert(!(color != null && gradient != null));\n\n  /// Creates a shape decoration configured to match a [BoxDecoration].\n  ///\n  /// The [BoxDecoration] class is more efficient for shapes that it can\n  /// describe than the [ShapeDecorationWithPremultipliedAlpha] class is for\n  /// those same shapes, because [ShapeDecorationWithPremultipliedAlpha] has to\n  /// be more general as it can support any shape. However, having a\n  /// [ShapeDecorationWithPremultipliedAlpha] is sometimes necessary, for\n  /// example when calling [ShapeDecorationWithPremultipliedAlpha.lerp] to\n  /// transition between different shapes (e.g. from a [CircleBorder] to a\n  /// [RoundedRectangleBorder]; the [BoxDecoration] class cannot animate the\n  /// transition from a [BoxShape.circle] to [BoxShape.rectangle]).\n  factory ShapeDecorationWithPremultipliedAlpha.fromBoxDecoration(\n    BoxDecoration source,\n  ) {\n    final ShapeBorder shape;\n\n    switch (source.shape) {\n      case BoxShape.circle:\n        if (source.border != null) {\n          assert(source.border!.isUniform);\n          shape = CircleBorder(side: source.border!.top);\n        } else {\n          shape = const CircleBorder();\n        }\n      case BoxShape.rectangle:\n        if (source.borderRadius != null) {\n          assert(source.border == null || source.border!.isUniform);\n          shape = RoundedRectangleBorder(\n            side: source.border?.top ?? BorderSide.none,\n            borderRadius: source.borderRadius!,\n          );\n        } else {\n          shape = source.border ?? const Border();\n        }\n    }\n\n    return ShapeDecorationWithPremultipliedAlpha(\n      color: source.color,\n      image: source.image,\n      gradient: source.gradient,\n      shadows: source.boxShadow,\n      shape: shape,\n    );\n  }\n\n  @override\n  Path getClipPath(Rect rect, TextDirection textDirection) {\n    return shape.getOuterPath(rect, textDirection: textDirection);\n  }\n\n  /// The inset space occupied by the [shape]'s border.\n  ///\n  /// This value may be misleading.\n  /// See the discussion at [ShapeBorder.dimensions].\n  @override\n  EdgeInsetsGeometry get padding => shape.dimensions;\n\n  @override\n  bool get isComplex => shadows != null;\n\n  @override\n  ShapeDecorationWithPremultipliedAlpha? lerpFrom(Decoration? a, double t) {\n    if (a is BoxDecoration) {\n      return ShapeDecorationWithPremultipliedAlpha.lerp(\n        ShapeDecorationWithPremultipliedAlpha.fromBoxDecoration(a),\n        this,\n        t,\n      );\n    } else if (a == null || a is ShapeDecorationWithPremultipliedAlpha) {\n      return ShapeDecorationWithPremultipliedAlpha.lerp(\n        a as ShapeDecorationWithPremultipliedAlpha?,\n        this,\n        t,\n      );\n    }\n\n    return super.lerpFrom(a, t) as ShapeDecorationWithPremultipliedAlpha?;\n  }\n\n  @override\n  ShapeDecorationWithPremultipliedAlpha? lerpTo(Decoration? b, double t) {\n    if (b is BoxDecoration) {\n      return ShapeDecorationWithPremultipliedAlpha.lerp(\n        this,\n        ShapeDecorationWithPremultipliedAlpha.fromBoxDecoration(b),\n        t,\n      );\n    } else if (b == null || b is ShapeDecorationWithPremultipliedAlpha) {\n      return ShapeDecorationWithPremultipliedAlpha.lerp(\n        this,\n        b as ShapeDecorationWithPremultipliedAlpha?,\n        t,\n      );\n    }\n\n    return super.lerpTo(b, t) as ShapeDecorationWithPremultipliedAlpha?;\n  }\n\n  static ShapeDecorationWithPremultipliedAlpha? lerp(\n    ShapeDecorationWithPremultipliedAlpha? a,\n    ShapeDecorationWithPremultipliedAlpha? b,\n    double t,\n  ) {\n    if (a == null && b == null) {\n      return null;\n    }\n\n    if (a != null && b != null) {\n      if (t == 0.0) {\n        return a;\n      }\n\n      if (t == 1.0) {\n        return b;\n      }\n    }\n\n    return ShapeDecorationWithPremultipliedAlpha(\n      color: colorPremulLerp(a!.color, b!.color, t),\n      gradient: Gradient.lerp(a.gradient, b.gradient, t),\n      image: t < 0.5 ? a.image : b.image,\n      shadows: BoxShadow.lerpList(a.shadows, b.shadows, t),\n      shape: ShapeBorder.lerp(a.shape, b.shape, t)!,\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    if (identical(this, other)) return true;\n    if (other.runtimeType != runtimeType) return false;\n\n    return other is ShapeDecorationWithPremultipliedAlpha &&\n        other.color == color &&\n        other.gradient == gradient &&\n        other.image == image &&\n        listEquals<BoxShadow>(other.shadows, shadows) &&\n        other.shape == shape;\n  }\n\n  @override\n  int get hashCode => Object.hash(\n        color,\n        gradient,\n        image,\n        shape,\n        shadows == null ? null : Object.hashAll(shadows!),\n      );\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties.defaultDiagnosticsTreeStyle = DiagnosticsTreeStyle.whitespace;\n    properties.add(\n      ColorProperty('color', color, defaultValue: null),\n    );\n    properties.add(\n      DiagnosticsProperty<Gradient>('gradient', gradient, defaultValue: null),\n    );\n    properties.add(\n      DiagnosticsProperty<DecorationImage>('image', image, defaultValue: null),\n    );\n    properties.add(\n      DiagnosticsProperty<ShapeBorder>('shape', shape),\n    );\n    properties.add(\n      IterableProperty<BoxShadow>(\n        'shadows',\n        shadows,\n        defaultValue: null,\n        style: DiagnosticsTreeStyle.whitespace,\n      ),\n    );\n  }\n\n  @override\n  bool hitTest(Size size, Offset position, {TextDirection? textDirection}) {\n    return shape\n        .getOuterPath(Offset.zero & size, textDirection: textDirection)\n        .contains(position);\n  }\n\n  @override\n  BoxPainter createBoxPainter([VoidCallback? onChanged]) {\n    assert(onChanged != null || image == null);\n    return _ShapeDecorationPainter(this, onChanged!);\n  }\n}\n\n/// An object that paints a [ShapeDecorationWithPremultipliedAlpha] into a\n/// canvas.\nclass _ShapeDecorationPainter extends BoxPainter {\n  _ShapeDecorationPainter(this._decoration, VoidCallback onChanged)\n      : super(onChanged);\n\n  final ShapeDecorationWithPremultipliedAlpha _decoration;\n\n  Rect? _lastRect;\n  TextDirection? _lastTextDirection;\n  late Path _outerPath;\n  Path? _innerPath;\n  Paint? _interiorPaint;\n  int? _shadowCount;\n  late List<Rect> _shadowBounds;\n  late List<Path> _shadowPaths;\n  late List<Paint> _shadowPaints;\n\n  @override\n  VoidCallback get onChanged => super.onChanged!;\n\n  void _precache(Rect rect, TextDirection? textDirection) {\n    if (rect == _lastRect && textDirection == _lastTextDirection) return;\n\n    // This code path is reached either during the initial paint or when the\n    // rectangle has changed. In the latter case, only features dependent on the\n    // rectangle need to be updated.\n    if (_interiorPaint == null &&\n        (_decoration.color != null || _decoration.gradient != null)) {\n      _interiorPaint = Paint();\n      if (_decoration.color != null) {\n        _interiorPaint!.color = _decoration.color!;\n      }\n    }\n\n    if (_decoration.gradient != null) {\n      _interiorPaint!.shader = _decoration.gradient!\n          .createShader(rect, textDirection: textDirection);\n    }\n\n    if (_decoration.shadows != null) {\n      if (_shadowCount == null) {\n        _shadowCount = _decoration.shadows!.length;\n        _shadowPaints = <Paint>[\n          ..._decoration.shadows!.map((BoxShadow shadow) => shadow.toPaint()),\n        ];\n      }\n\n      if (_decoration.shape.preferPaintInterior) {\n        _shadowBounds = <Rect>[\n          ..._decoration.shadows!.map((BoxShadow shadow) {\n            return rect.shift(shadow.offset).inflate(shadow.spreadRadius);\n          }),\n        ];\n      } else {\n        _shadowPaths = <Path>[\n          ..._decoration.shadows!.map((BoxShadow shadow) {\n            return _decoration.shape.getOuterPath(\n              rect.shift(shadow.offset).inflate(shadow.spreadRadius),\n              textDirection: textDirection,\n            );\n          }),\n        ];\n      }\n    }\n\n    if (!_decoration.shape.preferPaintInterior &&\n        (_interiorPaint != null || _shadowCount != null)) {\n      _outerPath = _decoration.shape.getOuterPath(\n        rect,\n        textDirection: textDirection,\n      );\n    }\n\n    if (_decoration.image != null) {\n      _innerPath = _decoration.shape.getInnerPath(\n        rect,\n        textDirection: textDirection,\n      );\n    }\n\n    _lastRect = rect;\n    _lastTextDirection = textDirection;\n  }\n\n  void _paintShadows(Canvas canvas, Rect rect, TextDirection? textDirection) {\n    if (_shadowCount != null) {\n      if (_decoration.shape.preferPaintInterior) {\n        for (int index = 0; index < _shadowCount!; index += 1) {\n          _decoration.shape.paintInterior(\n            canvas,\n            _shadowBounds[index],\n            _shadowPaints[index],\n            textDirection: textDirection,\n          );\n        }\n      } else {\n        for (int index = 0; index < _shadowCount!; index += 1) {\n          canvas.drawPath(_shadowPaths[index], _shadowPaints[index]);\n        }\n      }\n    }\n  }\n\n  void _paintInterior(Canvas canvas, Rect rect, TextDirection? textDirection) {\n    if (_interiorPaint != null) {\n      if (_decoration.shape.preferPaintInterior) {\n        _decoration.shape.paintInterior(\n          canvas,\n          rect,\n          _interiorPaint!,\n          textDirection: textDirection,\n        );\n      } else {\n        canvas.drawPath(_outerPath, _interiorPaint!);\n      }\n    }\n  }\n\n  DecorationImagePainter? _imagePainter;\n\n  void _paintImage(Canvas canvas, ImageConfiguration configuration) {\n    if (_decoration.image == null) return;\n\n    _imagePainter ??= _decoration.image!.createPainter(onChanged);\n    _imagePainter!.paint(canvas, _lastRect!, _innerPath, configuration);\n  }\n\n  @override\n  void dispose() {\n    _imagePainter?.dispose();\n    super.dispose();\n  }\n\n  @override\n  void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) {\n    assert(configuration.size != null);\n    final Rect rect = offset & configuration.size!;\n    final TextDirection? textDirection = configuration.textDirection;\n    _precache(rect, textDirection);\n    _paintShadows(canvas, rect, textDirection);\n    _paintInterior(canvas, rect, textDirection);\n    _paintImage(canvas, configuration);\n    _decoration.shape.paint(canvas, rect, textDirection: textDirection);\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/squircle/clip_squircle_rect.dart",
    "content": "import 'package:flutter/widgets.dart';\n\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border_radius.dart';\n\nclass MoonClipSquircleRect extends StatelessWidget {\n  final MoonSquircleBorderRadius radius;\n  final Clip clipBehavior;\n  final Widget? child;\n\n  const MoonClipSquircleRect({\n    super.key,\n    required this.child,\n    this.radius = MoonSquircleBorderRadius.zero,\n    this.clipBehavior = Clip.antiAlias,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return ClipPath.shape(\n      clipBehavior: clipBehavior,\n      shape: MoonSquircleBorder(\n        borderRadius: radius,\n      ),\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/squircle/path_squircle_corners.dart",
    "content": "import 'dart:math' as math;\nimport 'dart:ui';\n\nimport 'package:moon_design/src/utils/squircle/processed_squircle_radius.dart';\n\nextension PathSquircleCornersExtensions on Path {\n  void addSmoothTopRight(ProcessedSquircleRadius radius, Rect rect) {\n    final width = rect.width;\n    final height = rect.height;\n\n    if (radius.radius.cornerRadius > 0) {\n      final a = radius.a;\n      final b = radius.b;\n      final c = radius.c;\n      final d = radius.d;\n      final p = radius.p;\n      this\n        ..moveTo(\n          math.max(width / 2, width - p),\n          0,\n        )\n        ..cubicTo(\n          width - (p - a),\n          0,\n          width - (p - a - b),\n          0,\n          width - (p - a - b - c),\n          d,\n        )\n        ..relativeArcToPoint(\n          Offset(\n            radius.circularSectionLength,\n            radius.circularSectionLength,\n          ),\n          radius: radius.radius,\n        )\n        ..cubicTo(\n          width,\n          p - a - b,\n          width,\n          p - a,\n          width,\n          math.min(height / 2, p),\n        );\n    } else {\n      this\n        ..moveTo(width / 2, 0)\n        ..lineTo(width, 0)\n        ..lineTo(width, height / 2);\n    }\n  }\n\n  void addSmoothBottomRight(ProcessedSquircleRadius radius, Rect rect) {\n    final width = rect.width;\n    final height = rect.height;\n    if (radius.radius.cornerRadius > 0) {\n      final a = radius.a;\n      final b = radius.b;\n      final c = radius.c;\n      final d = radius.d;\n      final p = radius.p;\n      this\n        ..lineTo(\n          width,\n          math.max(height / 2, height - p),\n        )\n        ..cubicTo(\n          width,\n          height - (p - a),\n          width,\n          height - (p - a - b),\n          width - d,\n          height - (p - a - b - c),\n        )\n        ..relativeArcToPoint(\n          Offset(\n            -radius.circularSectionLength,\n            radius.circularSectionLength,\n          ),\n          radius: radius.radius,\n        )\n        ..cubicTo(\n          width - (p - a - b),\n          height,\n          width - (p - a),\n          height,\n          math.max(width / 2, width - p),\n          height,\n        );\n    } else {\n      this\n        ..lineTo(width, height)\n        ..lineTo(width / 2, height);\n    }\n  }\n\n  void addSmoothBottomLeft(ProcessedSquircleRadius radius, Rect rect) {\n    final width = rect.width;\n    final height = rect.height;\n    if (radius.radius.cornerRadius > 0) {\n      final a = radius.a;\n      final b = radius.b;\n      final c = radius.c;\n      final d = radius.d;\n      final p = radius.p;\n      this\n        ..lineTo(\n          math.min(width / 2, p),\n          height,\n        )\n        ..cubicTo(\n          p - a,\n          height,\n          p - a - b,\n          height,\n          p - a - b - c,\n          height - d,\n        )\n        ..relativeArcToPoint(\n          Offset(\n            -radius.circularSectionLength,\n            -radius.circularSectionLength,\n          ),\n          radius: radius.radius,\n        )\n        ..cubicTo(\n          0,\n          height - (p - a - b),\n          0,\n          height - (p - a),\n          0,\n          math.max(height / 2, height - p),\n        );\n    } else {\n      this\n        ..lineTo(0, height)\n        ..lineTo(0, height / 2);\n    }\n  }\n\n  void addSmoothTopLeft(ProcessedSquircleRadius radius, Rect rect) {\n    final width = rect.width;\n    final height = rect.height;\n    if (radius.radius.cornerRadius > 0) {\n      final a = radius.a;\n      final b = radius.b;\n      final c = radius.c;\n      final d = radius.d;\n      final p = radius.p;\n      this\n        ..lineTo(\n          0,\n          math.min(height / 2, p),\n        )\n        ..cubicTo(\n          0,\n          p - a,\n          0,\n          p - a - b,\n          d,\n          p - a - b - c,\n        )\n        ..relativeArcToPoint(\n          Offset(\n            radius.circularSectionLength,\n            -radius.circularSectionLength,\n          ),\n          radius: radius.radius,\n        )\n        ..cubicTo(\n          p - a - b,\n          0,\n          p - a,\n          0,\n          math.min(width / 2, p),\n          0,\n        )\n        ..close();\n    } else {\n      this\n        ..lineTo(0, 0)\n        ..close();\n    }\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/squircle/processed_squircle_radius.dart",
    "content": "import 'dart:math' as math;\n\nimport 'package:moon_design/src/utils/squircle/squircle_radius.dart';\n\n// The article from figma's blog\n// https://www.figma.com/blog/desperately-seeking-squircles/\n//\n// The original code\n// https://github.com/MartinRGB/Figma_Squircles_Approximation/blob/bf29714aab58c54329f3ca130ffa16d39a2ff08c/js/rounded-corners.js#L64\nclass ProcessedSquircleRadius {\n  final MoonSquircleRadius radius;\n  final double a;\n  final double b;\n  final double c;\n  final double d;\n  final double p;\n  final double circularSectionLength;\n  final double width;\n  final double height;\n\n  factory ProcessedSquircleRadius(\n    MoonSquircleRadius radius, {\n    required double width,\n    required double height,\n  }) {\n    /// Constant factor to convert an angle from degrees to radians.\n    const double degrees2Radians = math.pi / 180.0;\n\n    /// Convert degrees to radians.\n    double radians(double degrees) => degrees * degrees2Radians;\n\n    final cornerSmoothing = radius.cornerSmoothing;\n    var cornerRadius = radius.cornerRadius;\n\n    final maxRadius = math.min(width, height) / 2;\n    cornerRadius = math.min(cornerRadius, maxRadius);\n\n    // 12.2 from the article.\n    final p = math.min((1 + cornerSmoothing) * cornerRadius, maxRadius);\n\n    final double angleAlpha;\n    final double angleBeta;\n\n    if (cornerRadius <= maxRadius / 2) {\n      angleBeta = 90 * (1 - cornerSmoothing);\n      angleAlpha = 45 * cornerSmoothing;\n    } else {\n      // When 'cornerRadius' exceeds 'maxRadius / 2', these angles also depend\n      // on 'cornerRadius' and 'maxRadius / 2'.\n      //\n      // After conducting several tests in Figma, this code produced similar,\n      // albeit not identical, results. The 'diffRatio' was referred to as\n      // 'change_percentage' in the original code.\n      final diffRatio = (cornerRadius - maxRadius / 2) / (maxRadius / 2);\n\n      angleBeta = 90 * (1 - cornerSmoothing * (1 - diffRatio));\n      angleAlpha = 45 * cornerSmoothing * (1 - diffRatio);\n    }\n\n    final angleTheta = (90 - angleBeta) / 2;\n\n    // In the original code, this was referred to as 'h_longest'.\n    // In the article, this represents the distance between two control\n    // points: P3 and P4.\n    final p3ToP4Distance = cornerRadius * math.tan(radians(angleTheta / 2));\n\n    // In the original code, this was referred to as 'l'.\n    final circularSectionLength =\n        math.sin(radians(angleBeta / 2)) * cornerRadius * math.sqrt(2);\n\n    // The variables a, b, c, and d correspond to the values mentioned in\n    // section 11.1 of the article.\n    final c = p3ToP4Distance * math.cos(radians(angleAlpha));\n    final d = c * math.tan(radians(angleAlpha));\n    final b = (p - circularSectionLength - c - d) / 3;\n    final a = 2 * b;\n\n    return ProcessedSquircleRadius._(\n      a: a,\n      b: b,\n      c: c,\n      d: d,\n      p: p,\n      width: width,\n      height: height,\n      radius: MoonSquircleRadius(\n        cornerRadius: cornerRadius,\n        cornerSmoothing: radius.cornerSmoothing,\n      ),\n      circularSectionLength: circularSectionLength,\n    );\n  }\n\n  const ProcessedSquircleRadius._({\n    required this.a,\n    required this.b,\n    required this.c,\n    required this.d,\n    required this.p,\n    required this.width,\n    required this.height,\n    required this.radius,\n    required this.circularSectionLength,\n  });\n\n  double get cornerRadius => radius.cornerRadius;\n\n  @override\n  bool operator ==(Object other) {\n    if (identical(this, other)) return true;\n    if (runtimeType != other.runtimeType) return false;\n    if (other is MoonSquircleRadius) {\n      return other == radius;\n    }\n    if (other is ProcessedSquircleRadius) {\n      return other.radius == radius;\n    }\n\n    return false;\n  }\n\n  @override\n  int get hashCode => radius.hashCode;\n\n  @override\n  String toString() {\n    return 'ProcessedSquircleRadius('\n        'radius: $radius, '\n        'a: ${a.toStringAsFixed(2)}, '\n        'b: ${b.toStringAsFixed(2)}, '\n        'c: ${c.toStringAsFixed(2)}, '\n        'd: ${d.toStringAsFixed(2)}, '\n        'p: ${p.toStringAsFixed(2)}, '\n        'width: ${width.toStringAsFixed(2)}, '\n        'height: ${height.toStringAsFixed(2)}, '\n        ')';\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/squircle/squircle_border.dart",
    "content": "import 'dart:math';\nimport 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\nimport 'package:moon_design/src/utils/squircle/squircle_border_radius.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_radius.dart';\n\nenum BorderAlign {\n  inside,\n  center,\n  outside,\n}\n\nclass MoonSquircleBorder extends OutlinedBorder {\n  /// The radius for each corner.\n  ///\n  /// Negative radius values are clamped to 0.0 by [getInnerPath] and\n  /// [getOuterPath].\n  final MoonSquircleBorderRadius borderRadius;\n  final BorderAlign borderAlign;\n\n  const MoonSquircleBorder({\n    super.side = MoonSquicleBorderSide.none,\n    this.borderRadius = MoonSquircleBorderRadius.zero,\n    this.borderAlign = BorderAlign.inside,\n  });\n\n  @override\n  EdgeInsetsGeometry get dimensions {\n    switch (borderAlign) {\n      // Ensure that the border behaves like in Figma, i.e., without adding any\n      // padding.\n      case BorderAlign.inside:\n        return EdgeInsets.zero;\n      case BorderAlign.center:\n        return EdgeInsets.zero;\n      case BorderAlign.outside:\n        return EdgeInsets.zero;\n    }\n  }\n\n  @override\n  ShapeBorder scale(double t) {\n    return MoonSquircleBorder(\n      side: side.scale(t),\n      borderRadius: borderRadius * t,\n    );\n  }\n\n  @override\n  ShapeBorder? lerpFrom(ShapeBorder? a, double t) {\n    if (a is MoonSquircleBorder) {\n      return MoonSquircleBorder(\n        side: MoonSquicleBorderSide.lerp(a.side, side, t),\n        borderRadius: MoonSquircleBorderRadius.lerp(\n          a.borderRadius,\n          borderRadius,\n          t,\n        )!,\n      );\n    }\n    return super.lerpFrom(a, t);\n  }\n\n  @override\n  ShapeBorder? lerpTo(ShapeBorder? b, double t) {\n    if (b is MoonSquircleBorder) {\n      return MoonSquircleBorder(\n        side: MoonSquicleBorderSide.lerp(side, b.side, t),\n        borderRadius:\n            MoonSquircleBorderRadius.lerp(borderRadius, b.borderRadius, t)!,\n      );\n    }\n    return super.lerpTo(b, t);\n  }\n\n  @override\n  Path getInnerPath(Rect rect, {TextDirection? textDirection}) {\n    final innerRect = () {\n      switch (borderAlign) {\n        case BorderAlign.inside:\n          return rect.deflate(side.width);\n        case BorderAlign.center:\n          return rect.deflate(side.width / 2);\n        case BorderAlign.outside:\n          return rect;\n      }\n    }();\n\n    final radius = () {\n      switch (borderAlign) {\n        case BorderAlign.inside:\n          return borderRadius -\n              MoonSquircleBorderRadius.all(\n                MoonSquircleRadius(\n                  cornerRadius: side.width,\n                ),\n              );\n        case BorderAlign.center:\n          return borderRadius -\n              MoonSquircleBorderRadius.all(\n                MoonSquircleRadius(\n                  cornerRadius: side.width / 2,\n                ),\n              );\n        case BorderAlign.outside:\n          return borderRadius;\n      }\n    }();\n\n    if ([radius.bottomLeft, radius.bottomRight, radius.topLeft, radius.topRight]\n        .every((x) => x.cornerSmoothing == 0.0)) {\n      return Path()..addRRect(radius.resolve(textDirection).toRRect(innerRect));\n    }\n\n    return radius.toPath(innerRect);\n  }\n\n  @override\n  Path getOuterPath(Rect rect, {TextDirection? textDirection}) {\n    return _getPath(rect, borderRadius, textDirection: textDirection);\n  }\n\n  Path _getPath(\n    Rect rect,\n    MoonSquircleBorderRadius radius, {\n    TextDirection? textDirection,\n  }) {\n    if ([radius.bottomLeft, radius.bottomRight, radius.topLeft, radius.topRight]\n        .every((x) => x.cornerSmoothing == 0.0)) {\n      return Path()..addRRect(radius.resolve(textDirection).toRRect(rect));\n    }\n\n    return radius.toPath(rect);\n  }\n\n  @override\n  MoonSquircleBorder copyWith({\n    BorderSide? side,\n    MoonSquircleBorderRadius? borderRadius,\n    BorderAlign? borderAlign,\n  }) {\n    return MoonSquircleBorder(\n      side: side ?? this.side,\n      borderRadius: borderRadius ?? this.borderRadius,\n      borderAlign: borderAlign ?? this.borderAlign,\n    );\n  }\n\n  @override\n  void paint(Canvas canvas, Rect rect, {TextDirection? textDirection}) {\n    if (rect.isEmpty) return;\n    switch (side.style) {\n      case BorderStyle.none:\n        break;\n      case BorderStyle.solid:\n        // Since the stroke is painted at the center of the border, we adjust\n        // the rectangle based on the [borderAlign] to ensure the stroke is\n        // properly positioned.\n        final adjustedRect = () {\n          switch (borderAlign) {\n            case BorderAlign.inside:\n              return rect.deflate(side.width / 2);\n            case BorderAlign.center:\n              return rect;\n            case BorderAlign.outside:\n              return rect.inflate(side.width / 2);\n          }\n        }();\n\n        final adjustedBorderRadius = () {\n          switch (borderAlign) {\n            case BorderAlign.inside:\n              return borderRadius -\n                  MoonSquircleBorderRadius.all(\n                    MoonSquircleRadius(\n                      cornerRadius: side.width / 2,\n                    ),\n                  );\n            case BorderAlign.center:\n              return borderRadius;\n            case BorderAlign.outside:\n              return borderRadius +\n                  MoonSquircleBorderRadius.all(\n                    MoonSquircleRadius(\n                      cornerRadius: side.width / 2,\n                    ),\n                  );\n          }\n        }();\n\n        final outerPath = _getPath(\n          adjustedRect,\n          adjustedBorderRadius,\n          textDirection: textDirection,\n        );\n\n        canvas.drawPath(\n          outerPath,\n          side.toPaint(),\n        );\n    }\n  }\n\n  @override\n  bool operator ==(Object other) {\n    if (other.runtimeType != runtimeType) return false;\n    return other is MoonSquircleBorder &&\n        other.side == side &&\n        other.borderRadius == borderRadius &&\n        other.borderAlign == borderAlign;\n  }\n\n  @override\n  int get hashCode => Object.hash(side, borderRadius, borderAlign);\n\n  @override\n  String toString() {\n    return '${objectRuntimeType(this, 'MoonSquircleBorder')}($side, $borderRadius, $borderAlign)';\n  }\n}\n\nclass MoonSquicleBorderSide with Diagnosticable {\n  /// This constant represents the border being drawn fully inside the border\n  /// path.\n  ///\n  /// This is used as the default value for the [strokeAlign] property.\n  static const double strokeAlignInside = -1.0;\n\n  /// This constant represents the border being drawn along the center of the\n  /// border path, with half of the [BorderSide.width] inside the path and the\n  /// other half outside.\n  ///\n  /// This is used as a value for the [strokeAlign] property.\n  static const double strokeAlignCenter = 0.0;\n\n  /// This constant represents the border being drawn outside the border path.\n  ///\n  /// This is used as a value for the [strokeAlign] property.\n  static const double strokeAlignOutside = 1.0;\n\n  /// Creates a [BorderSide] representing the addition of the two provided\n  /// [BorderSide]'s.\n  ///\n  /// This method should only be called if [canMerge] returns true for the two\n  /// sides.\n  ///\n  /// If one side is zero-width with [BorderStyle.none], the other side is\n  /// returned as is. If both sides are zero-width with [BorderStyle.none],\n  /// [BorderSide.none] is returned.\n  ///\n  /// The arguments must not be null.\n  static BorderSide merge(BorderSide a, BorderSide b) {\n    assert(canMerge(a, b));\n    final bool aIsNone = a.style == BorderStyle.none && a.width == 0.0;\n    final bool bIsNone = b.style == BorderStyle.none && b.width == 0.0;\n    if (aIsNone && bIsNone) {\n      return BorderSide.none;\n    }\n    if (aIsNone) {\n      return b;\n    }\n    if (bIsNone) {\n      return a;\n    }\n    assert(a.color == b.color);\n    assert(a.style == b.style);\n    return BorderSide(\n      color: a.color, // == b.color.\n      width: a.width + b.width,\n      strokeAlign: max(a.strokeAlign, b.strokeAlign),\n      style: a.style, // == b.style.\n    );\n  }\n\n  /// The color of this side of the border.\n  final Color color;\n\n  /// The width of this side of the border, in logical pixels.\n  ///\n  /// Setting width to 0.0 will result in a hairline border.\n  /// This means that the border will have the width of one physical pixel.\n  /// Hairline rendering takes shortcuts when the path overlaps a pixel more\n  /// than once. This means that it will render faster than otherwise, but it\n  /// might double-hit pixels, giving it a slightly darker/lighter result.\n  ///\n  /// To omit the border entirely, set the [style] to [BorderStyle.none].\n  final double width;\n\n  /// The style of this side of the border.\n  ///\n  /// To omit a side, set [style] to [BorderStyle.none].\n  /// This skips painting the border, but the border still has a [width].\n  final BorderStyle style;\n\n  /// A hairline black border that is not rendered.\n  static const BorderSide none = BorderSide.none;\n\n  /// The relative position of the stroke on a [BorderSide] in an\n  /// [OutlinedBorder] or [Border].\n  ///\n  /// Values typically range from -1.0 ([strokeAlignInside], inside border,\n  /// default) to 1.0 ([strokeAlignOutside], outside border), without any\n  /// bound constraints (e.g., a value of -2.0 is not typical, but allowed).\n  /// A value of 0 ([strokeAlignCenter]) will center the border on the edge\n  /// of the widget.\n  ///\n  /// When set to [strokeAlignInside], the stroke is drawn completely inside\n  /// the widget. For [strokeAlignCenter] and [strokeAlignOutside], a property\n  /// such as [Container.clipBehavior] can be used in an outside widget to clip\n  /// it. If [Container.decoration] has a border, the container may incorporate\n  /// [width] as additional padding:\n  /// - [strokeAlignInside] provides padding with full [width].\n  /// - [strokeAlignCenter] provides padding with half [width].\n  /// - [strokeAlignOutside] provides zero padding, as stroke is drawn entirely\n  /// outside.\n  ///\n  /// This property is not honored by [toPaint] (because the [Paint] object\n  /// cannot represent it); it is intended that classes that use [BorderSide]\n  /// objects implement this property when painting borders by suitably\n  /// inflating or deflating their regions.\n  ///\n  /// {@tool dartpad}\n  /// This example shows an animation of how [strokeAlign] affects the drawing\n  /// when applied to borders of various shapes.\n  ///\n  /// ** See code in examples/api/lib/painting/borders/border_side.stroke_align.0.dart **\n  /// {@end-tool}\n  final double strokeAlign;\n\n  /// Creates the side of a border with premultiplied alpha color.\n  ///\n  /// By default, the border is 1.0 logical pixels wide and solid black.\n  const MoonSquicleBorderSide({\n    this.color = const Color(0xFF000000),\n    this.width = 1.0,\n    this.style = BorderStyle.solid,\n    this.strokeAlign = strokeAlignInside,\n  }) : assert(width >= 0.0);\n\n  /// Creates a copy of this border but with the given fields replaced with the\n  /// new values.\n  BorderSide copyWith({\n    Color? color,\n    double? width,\n    BorderStyle? style,\n    double? strokeAlign,\n  }) {\n    return BorderSide(\n      color: color ?? this.color,\n      width: width ?? this.width,\n      style: style ?? this.style,\n      strokeAlign: strokeAlign ?? this.strokeAlign,\n    );\n  }\n\n  /// Creates a copy of this border side description but with the width scaled\n  /// by the factor 't'.\n  ///\n  /// The 't' argument represents the multiplicand, or the position on the\n  /// timeline for an interpolation from nothing to 'this', with 0.0 meaning\n  /// that the object returned should be the nil variant of this object, 1.0\n  /// meaning that no change should be applied, returning 'this' (or something\n  /// equivalent to 'this'), and other values meaning that the object should be\n  /// multiplied by 't'. Negative values are treated like zero.\n  ///\n  /// Since a zero width is normally painted as a hairline width rather than no\n  /// border at all, the zero factor is special-cased to instead change the\n  /// style to [BorderStyle.none].\n  ///\n  /// Values for 't' are usually obtained from an [Animation<double>], such as\n  /// an [AnimationController].\n  BorderSide scale(double t) {\n    return BorderSide(\n      color: color,\n      width: max(0.0, width * t),\n      style: t <= 0.0 ? BorderStyle.none : style,\n    );\n  }\n\n  /// Create a [Paint] object that, if used to stroke a line, will draw the line\n  /// in this border's style.\n  ///\n  /// The [strokeAlign] property is not reflected in the [Paint]; consumers must\n  /// implement that directly by inflating or deflating their region\n  /// appropriately.\n  ///\n  /// Not all borders use this method to paint their border sides. For example,\n  /// non-uniform rectangular [Border]s have beveled edges and so paint their\n  /// border sides as filled shapes rather than using a stroke.\n  Paint toPaint() {\n    switch (style) {\n      case BorderStyle.solid:\n        return Paint()\n          ..color = color\n          ..strokeWidth = width\n          ..style = PaintingStyle.stroke;\n      case BorderStyle.none:\n        return Paint()\n          ..color = const Color(0x00000000)\n          ..strokeWidth = 0.0\n          ..style = PaintingStyle.stroke;\n    }\n  }\n\n  /// Whether the two given [BorderSide]s can be merged using [BorderSide.merge].\n  ///\n  /// Two sides can be merged if one or both are zero-width with\n  /// [BorderStyle.none], or if they both have the same color and style.\n  ///\n  /// The arguments must not be null.\n  static bool canMerge(BorderSide a, BorderSide b) {\n    if ((a.style == BorderStyle.none && a.width == 0.0) ||\n        (b.style == BorderStyle.none && b.width == 0.0)) {\n      return true;\n    }\n    return a.style == b.style && a.color == b.color;\n  }\n\n  /// Linearly interpolate between two border sides.\n  ///\n  /// The arguments must not be null.\n  ///\n  /// {@macro dart.ui.shadow.lerp}\n  static BorderSide lerp(BorderSide a, BorderSide b, double t) {\n    if (identical(a, b)) {\n      return a;\n    }\n    if (t == 0.0) {\n      return a;\n    }\n    if (t == 1.0) {\n      return b;\n    }\n    final double width = lerpDouble(a.width, b.width, t)!;\n    if (width < 0.0) {\n      return BorderSide.none;\n    }\n    if (a.style == b.style && a.strokeAlign == b.strokeAlign) {\n      return BorderSide(\n        color: colorPremulLerp(a.color, b.color, t)!,\n        width: width,\n        style: a.style, // == b.style.\n        strokeAlign: a.strokeAlign, // == b.strokeAlign.\n      );\n    }\n    final Color colorA;\n    final Color colorB;\n    switch (a.style) {\n      case BorderStyle.solid:\n        colorA = a.color;\n      case BorderStyle.none:\n        colorA = a.color.withAlpha(0x00);\n    }\n    switch (b.style) {\n      case BorderStyle.solid:\n        colorB = b.color;\n      case BorderStyle.none:\n        colorB = b.color.withAlpha(0x00);\n    }\n    if (a.strokeAlign != b.strokeAlign) {\n      return BorderSide(\n        color: colorPremulLerp(colorA, colorB, t)!,\n        width: width,\n        strokeAlign: lerpDouble(a.strokeAlign, b.strokeAlign, t)!,\n      );\n    }\n    return BorderSide(\n      color: colorPremulLerp(colorA, colorB, t)!,\n      width: width,\n      strokeAlign: a.strokeAlign, // == b.strokeAlign\n    );\n  }\n\n  /// Get the amount of the stroke width that lies inside of the [BorderSide].\n  ///\n  /// For example, this will return the [width] for a [strokeAlign] of -1, half\n  /// the [width] for a [strokeAlign] of 0, and 0 for a [strokeAlign] of 1.\n  double get strokeInset => width * (1 - (1 + strokeAlign) / 2);\n\n  /// Get the amount of the stroke width that lies outside of the [BorderSide].\n  ///\n  /// For example, this will return 0 for a [strokeAlign] of -1, half the\n  /// [width] for a [strokeAlign] of 0, and the [width] for a [strokeAlign]\n  /// of 1.\n  double get strokeOutset => width * (1 + strokeAlign) / 2;\n\n  /// The offset of the stroke, taking into account the stroke alignment.\n  ///\n  /// For example, this will return the negative [width] of the stroke\n  /// for a [strokeAlign] of -1, 0 for a [strokeAlign] of 0, and the\n  /// [width] for a [strokeAlign] of -1.\n  double get strokeOffset => width * strokeAlign;\n\n  @override\n  bool operator ==(Object other) {\n    if (identical(this, other)) {\n      return true;\n    }\n    if (other.runtimeType != runtimeType) {\n      return false;\n    }\n    return other is BorderSide &&\n        other.color == color &&\n        other.width == width &&\n        other.style == style &&\n        other.strokeAlign == strokeAlign;\n  }\n\n  @override\n  int get hashCode => Object.hash(color, width, style, strokeAlign);\n\n  @override\n  String toStringShort() => 'BorderSide';\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties.add(\n      DiagnosticsProperty<Color>(\n        'color',\n        color,\n        defaultValue: const Color(0xFF000000),\n      ),\n    );\n    properties.add(\n      DoubleProperty(\n        'width',\n        width,\n        defaultValue: 1.0,\n      ),\n    );\n    properties.add(\n      DoubleProperty(\n        'strokeAlign',\n        strokeAlign,\n        defaultValue: strokeAlignInside,\n      ),\n    );\n    properties.add(\n      EnumProperty<BorderStyle>(\n        'style',\n        style,\n        defaultValue: BorderStyle.solid,\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/squircle/squircle_border_radius.dart",
    "content": "// ignore_for_file: overridden_fields, unused_element\n\nimport 'package:flutter/rendering.dart';\n\nimport 'package:moon_design/src/utils/squircle/path_squircle_corners.dart';\nimport 'package:moon_design/src/utils/squircle/processed_squircle_radius.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_radius.dart';\n\nclass MoonSquircleBorderRadius extends BorderRadius {\n  /// The border radius with zero radii.\n  static const MoonSquircleBorderRadius zero =\n      MoonSquircleBorderRadius.all(MoonSquircleRadius.zero);\n\n  /// The top-left [MoonSquircleRadius].\n  @override\n  final MoonSquircleRadius topLeft;\n\n  /// The top-right [MoonSquircleRadius].\n  @override\n  final MoonSquircleRadius topRight;\n\n  /// The bottom-left [MoonSquircleRadius].\n  @override\n  final MoonSquircleRadius bottomLeft;\n\n  /// The bottom-right [MoonSquircleRadius].\n  @override\n  final MoonSquircleRadius bottomRight;\n\n  MoonSquircleBorderRadius({\n    required double cornerRadius,\n    // The value of 1 or 1.0 leads to NaN error in mobile web/PWA. Hence, we use\n    // 0.9 instead to avoid this issue.\n    double cornerSmoothing = 0.9,\n  }) : this.only(\n          topLeft: MoonSquircleRadius(\n            cornerRadius: cornerRadius,\n            cornerSmoothing: cornerSmoothing,\n          ),\n          topRight: MoonSquircleRadius(\n            cornerRadius: cornerRadius,\n            cornerSmoothing: cornerSmoothing,\n          ),\n          bottomLeft: MoonSquircleRadius(\n            cornerRadius: cornerRadius,\n            cornerSmoothing: cornerSmoothing,\n          ),\n          bottomRight: MoonSquircleRadius(\n            cornerRadius: cornerRadius,\n            cornerSmoothing: cornerSmoothing,\n          ),\n        );\n\n  /// Creates a border radius with all radii set to [radius].\n  const MoonSquircleBorderRadius.all(MoonSquircleRadius radius)\n      : this.only(\n          topLeft: radius,\n          topRight: radius,\n          bottomLeft: radius,\n          bottomRight: radius,\n        );\n\n  /// Creates a border radius with vertical symmetry, ensuring that the top and\n  /// bottom sides of the rectangle have the same radii.\n  const MoonSquircleBorderRadius.vertical({\n    MoonSquircleRadius top = MoonSquircleRadius.zero,\n    MoonSquircleRadius bottom = MoonSquircleRadius.zero,\n  }) : this.only(\n          topLeft: top,\n          topRight: top,\n          bottomLeft: bottom,\n          bottomRight: bottom,\n        );\n\n  /// Creates a border radius with horizontal symmetry, ensuring that the left\n  /// and right sides of the rectangle have the same radii.\n  const MoonSquircleBorderRadius.horizontal({\n    MoonSquircleRadius left = MoonSquircleRadius.zero,\n    MoonSquircleRadius right = MoonSquircleRadius.zero,\n  }) : this.only(\n          topLeft: left,\n          topRight: right,\n          bottomLeft: left,\n          bottomRight: right,\n        );\n\n  /// Creates a border radius with only the provided non-zero values, resulting\n  /// in right angles for the other corners.\n  const MoonSquircleBorderRadius.only({\n    this.topLeft = MoonSquircleRadius.zero,\n    this.topRight = MoonSquircleRadius.zero,\n    this.bottomLeft = MoonSquircleRadius.zero,\n    this.bottomRight = MoonSquircleRadius.zero,\n  }) : super.only(\n          topLeft: topLeft,\n          bottomRight: topRight,\n          topRight: topRight,\n          bottomLeft: bottomLeft,\n        );\n\n  /// Required by Flutter framework internals for proper functioning.\n  Radius get _topLeft => topLeft;\n\n  Radius get _topRight => topRight;\n\n  Radius get _bottomLeft => bottomLeft;\n\n  Radius get _bottomRight => bottomRight;\n\n  Radius get _topStart => Radius.zero;\n\n  Radius get _topEnd => Radius.zero;\n\n  Radius get _bottomStart => Radius.zero;\n\n  Radius get _bottomEnd => Radius.zero;\n\n  /// Returns a copy of this BorderRadius with the given fields replaced with\n  /// the new values.\n  @override\n  MoonSquircleBorderRadius copyWith({\n    Radius? topLeft,\n    Radius? topRight,\n    Radius? bottomLeft,\n    Radius? bottomRight,\n  }) {\n    return MoonSquircleBorderRadius.only(\n      topLeft: topLeft is MoonSquircleRadius ? topLeft : this.topLeft,\n      topRight: topRight is MoonSquircleRadius ? topRight : this.topRight,\n      bottomLeft:\n          bottomLeft is MoonSquircleRadius ? bottomLeft : this.bottomLeft,\n      bottomRight:\n          bottomRight is MoonSquircleRadius ? bottomRight : this.bottomRight,\n    );\n  }\n\n  /// Creates a [Path] inside the given [Rect].\n  Path toPath(Rect rect) {\n    final width = rect.width;\n    final height = rect.height;\n\n    final result = Path();\n\n    /// Calculating only if values are different.\n    final processedTopLeft = ProcessedSquircleRadius(\n      topLeft,\n      width: width,\n      height: height,\n    );\n\n    final processedBottomLeft = topLeft == bottomLeft\n        ? processedTopLeft\n        : ProcessedSquircleRadius(\n            bottomLeft,\n            width: width,\n            height: height,\n          );\n\n    final processedBottomRight = bottomLeft == bottomRight\n        ? processedBottomLeft\n        : ProcessedSquircleRadius(\n            bottomRight,\n            width: width,\n            height: height,\n          );\n\n    final processedTopRight = topRight == bottomRight\n        ? processedBottomRight\n        : ProcessedSquircleRadius(\n            topRight,\n            width: width,\n            height: height,\n          );\n\n    result\n      ..addSmoothTopRight(processedTopRight, rect)\n      ..addSmoothBottomRight(processedBottomRight, rect)\n      ..addSmoothBottomLeft(processedBottomLeft, rect)\n      ..addSmoothTopLeft(processedTopLeft, rect);\n\n    return result.transform(\n      Matrix4.translationValues(rect.left, rect.top, 0).storage,\n    );\n  }\n\n  @override\n  BorderRadiusGeometry subtract(BorderRadiusGeometry other) {\n    if (other is MoonSquircleBorderRadius) return this - other;\n    return super.subtract(other);\n  }\n\n  @override\n  BorderRadiusGeometry add(BorderRadiusGeometry other) {\n    if (other is MoonSquircleBorderRadius) return this + other;\n    return super.add(other);\n  }\n\n  /// Returns the difference between two [BorderRadius] objects.\n  @override\n  MoonSquircleBorderRadius operator -(BorderRadius other) {\n    if (other is MoonSquircleBorderRadius) {\n      return MoonSquircleBorderRadius.only(\n        topLeft: (topLeft - other.topLeft) as MoonSquircleRadius,\n        topRight: (topRight - other.topRight) as MoonSquircleRadius,\n        bottomLeft: (bottomLeft - other.bottomLeft) as MoonSquircleRadius,\n        bottomRight: (bottomRight - other.bottomRight) as MoonSquircleRadius,\n      );\n    }\n\n    return this;\n  }\n\n  /// Returns the sum of two [BorderRadius] objects.\n  @override\n  MoonSquircleBorderRadius operator +(BorderRadius other) {\n    if (other is MoonSquircleBorderRadius) {\n      return MoonSquircleBorderRadius.only(\n        topLeft: (topLeft + other.topLeft) as MoonSquircleRadius,\n        topRight: (topRight + other.topRight) as MoonSquircleRadius,\n        bottomLeft: (bottomLeft + other.bottomLeft) as MoonSquircleRadius,\n        bottomRight: (bottomRight + other.bottomRight) as MoonSquircleRadius,\n      );\n    }\n\n    return this;\n  }\n\n  /// Returns the [BorderRadius] object with each corner negated.\n  ///\n  /// This is the same as multiplying the object by -1.0.\n  @override\n  MoonSquircleBorderRadius operator -() {\n    return MoonSquircleBorderRadius.only(\n      topLeft: (-topLeft) as MoonSquircleRadius,\n      topRight: (-topRight) as MoonSquircleRadius,\n      bottomLeft: (-bottomLeft) as MoonSquircleRadius,\n      bottomRight: (-bottomRight) as MoonSquircleRadius,\n    );\n  }\n\n  /// Scales each corner of the [BorderRadius] by the given factor.\n  @override\n  MoonSquircleBorderRadius operator *(double other) {\n    return MoonSquircleBorderRadius.only(\n      topLeft: topLeft * other,\n      topRight: topRight * other,\n      bottomLeft: bottomLeft * other,\n      bottomRight: bottomRight * other,\n    );\n  }\n\n  /// Divides each corner of the [BorderRadius] by the given factor.\n  @override\n  MoonSquircleBorderRadius operator /(double other) {\n    return MoonSquircleBorderRadius.only(\n      topLeft: topLeft / other,\n      topRight: topRight / other,\n      bottomLeft: bottomLeft / other,\n      bottomRight: bottomRight / other,\n    );\n  }\n\n  /// Integer divides each corner of the [BorderRadius] by the given factor.\n  @override\n  MoonSquircleBorderRadius operator ~/(double other) {\n    return MoonSquircleBorderRadius.only(\n      topLeft: topLeft ~/ other,\n      topRight: topRight ~/ other,\n      bottomLeft: bottomLeft ~/ other,\n      bottomRight: bottomRight ~/ other,\n    );\n  }\n\n  /// Computes the remainder of each corner by the given factor.\n  @override\n  MoonSquircleBorderRadius operator %(double other) {\n    return MoonSquircleBorderRadius.only(\n      topLeft: topLeft % other,\n      topRight: topRight % other,\n      bottomLeft: bottomLeft % other,\n      bottomRight: bottomRight % other,\n    );\n  }\n\n  /// Linearly interpolate between two [BorderRadius] objects.\n  ///\n  /// If either is null, this function interpolates from [BorderRadius.zero].\n  ///\n  /// {@macro dart.ui.shadow.lerp}\n  static MoonSquircleBorderRadius? lerp(\n    MoonSquircleBorderRadius? a,\n    MoonSquircleBorderRadius? b,\n    double t,\n  ) {\n    if (a == null && b == null) return null;\n    if (a == null) return b! * t;\n    if (b == null) return a * (1.0 - t);\n    return MoonSquircleBorderRadius.only(\n      topLeft: MoonSquircleRadius.lerp(a.topLeft, b.topLeft, t)!,\n      topRight: MoonSquircleRadius.lerp(a.topRight, b.topRight, t)!,\n      bottomLeft: MoonSquircleRadius.lerp(a.bottomLeft, b.bottomLeft, t)!,\n      bottomRight: MoonSquircleRadius.lerp(a.bottomRight, b.bottomRight, t)!,\n    );\n  }\n\n  @override\n  BorderRadius resolve(TextDirection? direction) => BorderRadius.only(\n        topLeft: topLeft,\n        topRight: topRight,\n        bottomLeft: bottomLeft,\n        bottomRight: bottomRight,\n      );\n\n  @override\n  String toString() {\n    if (topLeft == topRight &&\n        topLeft == bottomRight &&\n        topLeft == bottomLeft) {\n      final radius = topLeft.toString();\n      return 'MoonSquircleBorderRadius${radius.substring(12)}';\n    }\n\n    return 'MoonSquircleBorderRadius('\n        'topLeft: $topLeft, '\n        'topRight: $topRight, '\n        'bottomLeft: $bottomLeft, '\n        'bottomRight: $bottomRight, '\n        ')';\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/squircle/squircle_radius.dart",
    "content": "import 'dart:ui';\n\nclass MoonSquircleRadius extends Radius {\n  static const zero = MoonSquircleRadius(\n    cornerRadius: 0,\n    cornerSmoothing: 0,\n  );\n\n  final double cornerSmoothing;\n\n  const MoonSquircleRadius({\n    required double cornerRadius,\n    // The value of 1 or 1.0 leads to NaN error in mobile web/PWA for some\n    // reason. So we use 0.9 instead.\n    this.cornerSmoothing = 0.9,\n  }) : super.circular(cornerRadius);\n\n  double get cornerRadius => x;\n\n  /// Unary negation operator.\n  ///\n  /// Returns a Radius with the distances negated.\n  ///\n  /// Radiuses with negative values aren't geometrically meaningful, but could\n  /// occur as part of expressions. For example, negating a radius of one pixel\n  /// and then adding the result to another radius is equivalent to subtracting\n  /// a radius of one pixel from the other.\n  @override\n  Radius operator -() => MoonSquircleRadius(\n        cornerRadius: -cornerRadius,\n        cornerSmoothing: cornerSmoothing,\n      );\n\n  /// Binary subtraction operator.\n  ///\n  /// Returns a radius whose [x] value is the left-hand-side operand's [x]\n  /// minus the right-hand-side operand's [x] and whose [y] value is the\n  /// left-hand-side operand's [y] minus the right-hand-side operand's [y].\n  @override\n  Radius operator -(Radius other) {\n    if (other is MoonSquircleRadius) {\n      return MoonSquircleRadius(\n        cornerRadius: cornerRadius - other.cornerRadius,\n        cornerSmoothing: (cornerSmoothing + other.cornerSmoothing) / 2,\n      );\n    }\n\n    return MoonSquircleRadius(\n      cornerRadius: cornerRadius - other.x,\n      cornerSmoothing: cornerSmoothing,\n    );\n  }\n\n  /// Binary addition operator.\n  ///\n  /// Returns a radius whose [x] value is the sum of the [x] values of the\n  /// two operands, and whose [y] value is the sum of the [y] values of the\n  /// two operands.\n  @override\n  Radius operator +(Radius other) {\n    if (other is MoonSquircleRadius) {\n      return MoonSquircleRadius(\n        cornerRadius: cornerRadius + other.cornerRadius,\n        cornerSmoothing: (cornerSmoothing + other.cornerSmoothing) / 2,\n      );\n    }\n\n    return MoonSquircleRadius(\n      cornerRadius: cornerRadius + other.x,\n      cornerSmoothing: cornerSmoothing,\n    );\n  }\n\n  /// Multiplication operator.\n  ///\n  /// Returns a radius whose coordinates are the coordinates of the\n  /// left-hand-side operand (a radius) multiplied by the scalar\n  /// right-hand-side operand (a double).\n  @override\n  MoonSquircleRadius operator *(double operand) => MoonSquircleRadius(\n        cornerRadius: cornerRadius * operand,\n        cornerSmoothing: cornerSmoothing * operand,\n      );\n\n  /// Division operator.\n  ///\n  /// Returns a radius whose coordinates are the coordinates of the\n  /// left-hand-side operand (a radius) divided by the scalar right-hand-side\n  /// operand (a double).\n  @override\n  MoonSquircleRadius operator /(double operand) => MoonSquircleRadius(\n        cornerRadius: cornerRadius / operand,\n        cornerSmoothing: cornerSmoothing / operand,\n      );\n\n  /// Integer (truncating) division operator.\n  ///\n  /// Returns a radius whose coordinates are the coordinates of the\n  /// left-hand-side operand (a radius) divided by the scalar right-hand-side\n  /// operand (a double), rounded towards zero.\n  @override\n  MoonSquircleRadius operator ~/(double operand) => MoonSquircleRadius(\n        cornerRadius: (cornerRadius ~/ operand).toDouble(),\n        cornerSmoothing: (cornerSmoothing ~/ operand).toDouble(),\n      );\n\n  /// Modulo (remainder) operator.\n  ///\n  /// Returns a radius whose coordinates are the remainder of dividing the\n  /// coordinates of the left-hand-side operand (a radius) by the scalar\n  /// right-hand-side operand (a double).\n  @override\n  MoonSquircleRadius operator %(double operand) => MoonSquircleRadius(\n        cornerRadius: cornerRadius % operand,\n        cornerSmoothing: cornerSmoothing % operand,\n      );\n\n  /// Linearly interpolate between two smooth radii.\n  ///\n  /// If either is null, this function substitutes [MoonSquircleRadius.zero]\n  /// instead.\n  ///\n  /// The `t` argument represents position on the timeline, with 0.0 meaning\n  /// that the interpolation has not started, returning `a` (or something\n  /// equivalent to `a`), 1.0 meaning that the interpolation has finished,\n  /// returning `b` (or something equivalent to `b`), and values in between\n  /// meaning that the interpolation is at the relevant point on the timeline\n  /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and\n  /// 1.0, so negative values and values greater than 1.0 are valid (and can\n  /// easily be generated by curves such as [Curves.elasticInOut]).\n  ///\n  /// Values for `t` are usually obtained from an [Animation<double>], such as\n  /// an [AnimationController].\n  static MoonSquircleRadius? lerp(\n    MoonSquircleRadius? a,\n    MoonSquircleRadius? b,\n    double t,\n  ) {\n    if (b == null) {\n      if (a == null) {\n        return null;\n      } else {\n        final double k = 1.0 - t;\n        return MoonSquircleRadius(\n          cornerRadius: a.cornerRadius * k,\n          cornerSmoothing: a.cornerSmoothing * k,\n        );\n      }\n    } else {\n      if (a == null) {\n        return MoonSquircleRadius(\n          cornerRadius: b.cornerRadius * t,\n          cornerSmoothing: b.cornerSmoothing * t,\n        );\n      } else {\n        return MoonSquircleRadius(\n          cornerRadius: lerpDouble(a.cornerRadius, b.cornerRadius, t) ?? 0,\n          cornerSmoothing: lerpDouble(\n                a.cornerSmoothing,\n                b.cornerSmoothing,\n                t,\n              ) ??\n              0,\n        );\n      }\n    }\n  }\n\n  @override\n  bool operator ==(Object other) {\n    if (identical(this, other)) return true;\n    if (runtimeType != other.runtimeType) return false;\n\n    return other is MoonSquircleRadius &&\n        other.cornerRadius == cornerRadius &&\n        other.cornerSmoothing == cornerSmoothing;\n  }\n\n  @override\n  int get hashCode => Object.hash(cornerRadius, cornerSmoothing);\n\n  @override\n  String toString() {\n    return 'MoonSquircleRadius('\n        'cornerRadius: ${cornerRadius.toStringAsFixed(2)}, '\n        'cornerSmoothing: ${cornerSmoothing.toStringAsFixed(2)}, '\n        ')';\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/touch_target_padding.dart",
    "content": "import 'dart:math' as math;\n\nimport 'package:flutter/material.dart';\nimport 'package:flutter/rendering.dart';\n\nclass TouchTargetPadding extends SingleChildRenderObjectWidget {\n  final Size minSize;\n\n  const TouchTargetPadding({super.child, required this.minSize});\n\n  @override\n  RenderObject createRenderObject(BuildContext context) {\n    return _RenderTouchTargetPadding(minSize);\n  }\n\n  @override\n  void updateRenderObject(\n    BuildContext context,\n    covariant _RenderTouchTargetPadding renderObject,\n  ) {\n    renderObject.minSize = minSize;\n  }\n}\n\nclass _RenderTouchTargetPadding extends RenderShiftedBox {\n  Size _minSize;\n\n  _RenderTouchTargetPadding(this._minSize, [RenderBox? child]) : super(child);\n\n  Size get minSize => _minSize;\n\n  set minSize(Size value) {\n    if (_minSize != value) {\n      _minSize = value;\n      markNeedsLayout();\n    }\n  }\n\n  @override\n  double computeMinIntrinsicWidth(double height) => child != null\n      ? math.max(child!.getMinIntrinsicWidth(height), minSize.width)\n      : 0.0;\n\n  @override\n  double computeMinIntrinsicHeight(double width) => child != null\n      ? math.max(child!.getMinIntrinsicHeight(width), minSize.height)\n      : 0.0;\n\n  @override\n  double computeMaxIntrinsicWidth(double height) => child != null\n      ? math.max(child!.getMaxIntrinsicWidth(height), minSize.width)\n      : 0.0;\n\n  @override\n  double computeMaxIntrinsicHeight(double width) => child != null\n      ? math.max(child!.getMaxIntrinsicHeight(width), minSize.height)\n      : 0.0;\n\n  Size _computeSize({\n    required BoxConstraints constraints,\n    required ChildLayouter layoutChild,\n  }) {\n    if (child != null) {\n      final Size childSize = layoutChild(child!, constraints);\n      final double height = math.max(childSize.width, minSize.width);\n      final double width = math.max(childSize.height, minSize.height);\n      return constraints.constrain(Size(height, width));\n    }\n    return Size.zero;\n  }\n\n  @override\n  Size computeDryLayout(BoxConstraints constraints) {\n    return _computeSize(\n      constraints: constraints,\n      layoutChild: ChildLayoutHelper.dryLayoutChild,\n    );\n  }\n\n  @override\n  void performLayout() {\n    size = _computeSize(\n      constraints: constraints,\n      layoutChild: ChildLayoutHelper.layoutChild,\n    );\n    if (child != null) {\n      final BoxParentData childParentData = child!.parentData! as BoxParentData;\n      childParentData.offset =\n          Alignment.center.alongOffset(size - child!.size as Offset);\n    }\n  }\n\n  @override\n  bool hitTest(BoxHitTestResult result, {required Offset position}) {\n    if (super.hitTest(result, position: position)) return true;\n\n    final Offset center = child!.size.center(Offset.zero);\n\n    return result.addWithRawTransform(\n      transform: MatrixUtils.forceToPoint(center),\n      position: center,\n      hitTest: (BoxHitTestResult result, Offset position) {\n        assert(position == center);\n        return child!.hitTest(result, position: center);\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/utils/widget_surveyor.dart",
    "content": "// Licensed to the Apache Software Foundation (ASF) under one or more\n// contributor license agreements. See the NOTICE file distributed with\n// this work for additional information regarding copyright ownership.\n// The ASF licenses this file to you under the Apache License,\n// Version 2.0 (the \"License\"); you may not use this file except in\n// compliance with the License.  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.\n\nimport 'package:flutter/rendering.dart';\nimport 'package:flutter/widgets.dart';\n\n/// Allows callers to measure the size of arbitrary widgets when laid out with\n/// specific constraints.\n///\n/// The widget surveyor creates synthetic widget trees to hold the widgets it\n/// measures. This is crucial because widgets relying on inherited widgets\n/// (e.g., [Directionality]) assume they exist in their ancestry. These\n/// assumptions may hold true when the widget is rendered by the application but\n/// prove false when the widget is rendered via the widget surveyor.\n///\n/// Due to this, callers should ensure that:\n///\n///  1. Passed-in widgets do not rely on inherited widgets, or\n///  2. All necessary inherited widget dependencies exist in the widget tree\n///  provided to the widget surveyor's measure methods.\nclass WidgetSurveyor {\n  const WidgetSurveyor();\n\n  /// Builds a widget using the specified builder function, inserts the widget\n  /// into a synthetic widget tree, lays out the resulting render tree, and\n  /// returns the size of the laid-out render tree.\n  ///\n  /// The build context passed to the [builder] function represents the root of\n  /// the synthetic tree.\n  ///\n  /// The [constraints] argument specifies the constraints passed to the render\n  /// tree during layout. If unspecified, the widget will be laid out\n  /// unconstrained.\n  Size measureBuilder(\n    WidgetBuilder builder, {\n    BoxConstraints constraints = const BoxConstraints(),\n  }) {\n    return measureWidget(Builder(builder: builder), constraints: constraints);\n  }\n\n  /// Inserts the specified widget into a synthetic widget tree, lays out the\n  /// resulting render tree, and returns the size of the laid-out render tree.\n  ///\n  /// The [constraints] argument specifies the constraints passed to the render\n  /// tree during layout. If unspecified, the widget will be laid out\n  /// unconstrained.\n  Size measureWidget(\n    Widget widget, {\n    BoxConstraints constraints = const BoxConstraints(),\n  }) {\n    final SurveyorView rendered = _render(widget, constraints);\n    assert(rendered.hasSize);\n    return rendered.size;\n  }\n\n  double measureDistanceToBaseline(\n    Widget widget, {\n    TextBaseline baseline = TextBaseline.alphabetic,\n    BoxConstraints constraints = const BoxConstraints(),\n  }) {\n    final SurveyorView rendered =\n        _render(widget, constraints, baselineToCalculate: baseline);\n    return rendered.childBaseline ?? rendered.size.height;\n  }\n\n  double? measureDistanceToActualBaseline(\n    Widget widget, {\n    TextBaseline baseline = TextBaseline.alphabetic,\n    BoxConstraints constraints = const BoxConstraints(),\n  }) {\n    final SurveyorView rendered =\n        _render(widget, constraints, baselineToCalculate: baseline);\n    return rendered.childBaseline;\n  }\n\n  SurveyorView _render(\n    Widget widget,\n    BoxConstraints constraints, {\n    TextBaseline? baselineToCalculate,\n  }) {\n    bool debugIsPerformingCleanup = false;\n    final PipelineOwner pipelineOwner = PipelineOwner(\n      onNeedVisualUpdate: () {\n        assert(() {\n          if (!debugIsPerformingCleanup) {\n            throw FlutterError.fromParts(<DiagnosticsNode>[\n              ErrorSummary('Visual update was requested during survey.'),\n              ErrorDescription(\n                  'WidgetSurveyor does not support a render object '\n                  'calling markNeedsLayout(), markNeedsPaint(), or '\n                  'markNeedsSemanticUpdate() while the widget is being surveyed.'),\n            ]);\n          }\n          return true;\n        }());\n      },\n    );\n    final SurveyorView rootView = pipelineOwner.rootNode = SurveyorView();\n    final BuildOwner buildOwner = BuildOwner(focusManager: FocusManager());\n    assert(buildOwner.globalKeyCount == 0);\n    final RenderObjectToWidgetElement element =\n        RenderObjectToWidgetAdapter<RenderBox>(\n      container: rootView,\n      debugShortDescription: '[root]',\n      child: widget,\n    ).attachToRenderTree(buildOwner);\n    try {\n      rootView.baselineToCalculate = baselineToCalculate;\n      rootView.childConstraints = constraints;\n      rootView.scheduleInitialLayout();\n      pipelineOwner.flushLayout();\n      assert(rootView.child != null);\n      return rootView;\n    } finally {\n      // Unmounts all child elements to ensure proper cleanup.\n      debugIsPerformingCleanup = true;\n      try {\n        element.update(\n          RenderObjectToWidgetAdapter<RenderBox>(container: rootView),\n        );\n        buildOwner.finalizeTree();\n      } finally {\n        debugIsPerformingCleanup = false;\n      }\n      assert(\n        buildOwner.globalKeyCount == 1,\n      ); // RenderObjectToWidgetAdapter uses a global key.\n    }\n  }\n}\n\nclass SurveyorView extends RenderBox\n    with RenderObjectWithChildMixin<RenderBox> {\n  BoxConstraints? childConstraints;\n  TextBaseline? baselineToCalculate;\n  double? childBaseline;\n\n  @override\n  void performLayout() {\n    assert(child != null);\n    assert(childConstraints != null);\n    child!.layout(childConstraints!, parentUsesSize: true);\n    if (baselineToCalculate != null) {\n      childBaseline = child!.getDistanceToBaseline(baselineToCalculate!);\n    }\n    size = child!.size;\n  }\n\n  @override\n  void debugAssertDoesMeetConstraints() => true;\n}\n"
  },
  {
    "path": "lib/src/widgets/accordion/accordion.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/accordion/accordion_size_properties.dart';\nimport 'package:moon_design/src/theme/accordion/accordion_sizes.dart';\nimport 'package:moon_design/src/theme/effects/effects_theme.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/shadows.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/utils/color_tween_premul.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/widgets/common/base_control.dart';\nimport 'package:moon_icons/moon_icons.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonAccordionSize {\n  sm,\n  md,\n  lg,\n  xl,\n}\n\nclass MoonAccordion<T> extends StatefulWidget {\n  /// The alignment of [children], which are arranged in a column when the\n  /// accordion is expanded.\n  ///\n  /// Internally, the expanded accordion uses a [Column] widget for [children]\n  /// and an [Align] widget to align the column. The [expandedAlignment]\n  /// parameter is directly passed into the [Align].\n  ///\n  /// Modifying this property controls the alignment of the column within the\n  /// expanded accordion, not the alignment of [children] widgets within the\n  /// column.\n  /// To align each child within [children], see [expandedCrossAxisAlignment].\n  ///\n  /// The width of the column is determined by the widest child widget in\n  /// [children].\n  final AlignmentGeometry? expandedAlignment;\n\n  /// The alignment of each child within [children] when the accordion is\n  /// expanded.\n  ///\n  /// Internally, the expanded accordion uses a [Column] widget for\n  /// [children], and the `crossAxisAlignment` parameter is directly passed into\n  /// the [Column].\n  ///\n  /// Modifying this property controls the cross axis alignment of each child\n  /// within its [Column]. The width of the [Column] housing [children] will be\n  /// the same as the widest child widget in [children]. It is not necessarily\n  /// that the width of the [Column] is equal to the width of the expanded\n  /// accordion.\n  ///\n  /// To align the [Column] along the expanded accordion, use the\n  /// [expandedAlignment] property instead.\n  final CrossAxisAlignment? expandedCrossAxisAlignment;\n\n  /// Whether to propagate gestures to the children of the accordion.\n  /// Defaults to true.\n  final bool propagateGesturesToChild;\n\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// Whether to display the accordion content outside of its header.\n  final bool hasContentOutside;\n\n  /// Whether the accordion is initially expanded (true) or collapsed (false).\n  /// Defaults to collapsed state.\n  /// If the [identityValue] matches the [groupIdentityValue], this parameter is\n  /// disregarded.\n  final bool initiallyExpanded;\n\n  /// Whether the accordion is disabled.\n  final bool isDisabled;\n\n  /// Whether to preserve the state of the [children] when the accordion expands\n  /// and collapses.\n  ///\n  /// When true, the children remain in the widget tree even when the accordion\n  /// is collapsed. When false (default), the children are removed from the tree\n  /// when the accordion is collapsed and recreated when it is expanded.\n  final bool maintainState;\n\n  /// Whether to show a border around the accordion.\n  final bool showBorder;\n\n  /// Whether to show a dividing line between the accordion header and the body.\n  final bool showDivider;\n\n  /// The border radius of the accordion.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// {@macro flutter.material.Material.clipBehavior}\n  final Clip? clipBehavior;\n\n  /// The icon color of the collapsed accordion header.\n  final Color? iconColor;\n\n  /// The icon color of the expanded accordion header.\n  final Color? expandedIconColor;\n\n  /// The text color of the collapsed accordion header.\n  final Color? textColor;\n\n  /// The text color of the expanded accordion header.\n  final Color? expandedTextColor;\n\n  /// The background color of the collapsed accordion.\n  final Color? backgroundColor;\n\n  /// The background color of the expanded accordion.\n  final Color? expandedBackgroundColor;\n\n  /// The border color of the accordion.\n  final Color? borderColor;\n\n  /// The color of the line dividing the accordion header from the body.\n  final Color? dividerColor;\n\n  /// The custom decoration of the accordion.\n  final Decoration? decoration;\n\n  /// The gap between the [leading], [label] and [trailing] widgets of the\n  /// accordion header.\n  final double? gap;\n\n  /// The height of the accordion header.\n  final double? headerHeight;\n\n  /// The duration of the accordion transition animation (expand and collapse).\n  final Duration? transitionDuration;\n\n  /// The curve of the accordion transition animation (expand and collapse).\n  final Curve? transitionCurve;\n\n  /// The padding of the accordion [children].\n  final EdgeInsetsGeometry? childrenPadding;\n\n  /// The padding of the accordion header.\n  final EdgeInsetsGeometry? headerPadding;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The list of shadows applied to the accordion.\n  final List<BoxShadow>? shadows;\n\n  /// The size of the accordion.\n  final MoonAccordionSize? accordionSize;\n\n  /// The semantic label for the accordion.\n  final String? semanticLabel;\n\n  /// The identity value represented by this accordion.\n  final T? identityValue;\n\n  /// The currently selected identity value for a group of accordions.\n  ///\n  /// This accordion is considered selected if its [identityValue] is equal to\n  /// the [groupIdentityValue].\n  final T? groupIdentityValue;\n\n  /// The callback that is called when the accordion expands or collapses.\n  ///\n  /// When the accordion expansion changes, this function is called with the\n  /// [identityValue].\n  final ValueChanged<T?>? onExpansionChanged;\n\n  /// The widget to display before the [label] widget of the accordion.\n  ///\n  /// Typically, a [CircleAvatar] widget is used.\n  final Widget? leading;\n\n  /// The primary content of the accordion header.\n  ///\n  /// Typically, a [Text] widget is used.\n  final Widget label;\n\n  /// The widget to display after the [label] widget of the accordion.\n  ///\n  /// Depending on the value of [controlAffinity], the [trailing] widget\n  /// may replace the rotating expansion arrow icon.\n  final Widget? trailing;\n\n  /// The list of widgets to display as the content of the accordion when the\n  /// accordion expands.\n  final List<Widget> children;\n\n  /// Creates a Moon Design accordion.\n  const MoonAccordion({\n    super.key,\n    this.expandedAlignment,\n    this.expandedCrossAxisAlignment,\n    this.propagateGesturesToChild = true,\n    this.autofocus = false,\n    this.hasContentOutside = false,\n    this.initiallyExpanded = false,\n    this.isDisabled = false,\n    this.maintainState = false,\n    this.showBorder = false,\n    this.showDivider = true,\n    this.borderRadius,\n    this.clipBehavior,\n    this.iconColor,\n    this.expandedIconColor,\n    this.textColor,\n    this.expandedTextColor,\n    this.backgroundColor,\n    this.expandedBackgroundColor,\n    this.borderColor,\n    this.dividerColor,\n    this.decoration,\n    this.gap,\n    this.headerHeight,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.childrenPadding,\n    this.headerPadding,\n    this.focusNode,\n    this.shadows,\n    this.accordionSize,\n    this.semanticLabel,\n    this.identityValue,\n    this.groupIdentityValue,\n    this.onExpansionChanged,\n    this.leading,\n    required this.label,\n    this.trailing,\n    this.children = const <Widget>[],\n  }) : assert(\n          expandedCrossAxisAlignment != CrossAxisAlignment.baseline,\n          'CrossAxisAlignment.baseline is not supported since the expanded '\n          'children are aligned in a column, not a row. Try to use another '\n          'constant.',\n        );\n\n  bool get _selected =>\n      identityValue != null && identityValue == groupIdentityValue;\n\n  @override\n  State<MoonAccordion<T>> createState() => _MoonAccordionState<T>();\n}\n\nclass _MoonAccordionState<T> extends State<MoonAccordion<T>>\n    with TickerProviderStateMixin {\n  static final Animatable<double> _halfTween =\n      Tween<double>(begin: 0.0, end: 0.5);\n\n  late MoonAccordionSizeProperties _effectiveMoonAccordionSize;\n  late BorderRadiusGeometry _effectiveBorderRadius;\n  late EdgeInsetsGeometry _effectiveHeaderPadding;\n  late EdgeInsets _resolvedDirectionalHeaderPadding;\n  late double _effectiveHeaderHeight;\n\n  final ColorTweenWithPremultipliedAlpha _textColorTween =\n      ColorTweenWithPremultipliedAlpha();\n  final ColorTweenWithPremultipliedAlpha _iconColorTween =\n      ColorTweenWithPremultipliedAlpha();\n  final ColorTweenWithPremultipliedAlpha _backgroundColorTween =\n      ColorTweenWithPremultipliedAlpha();\n  final ColorTweenWithPremultipliedAlpha _hoverColorTween =\n      ColorTweenWithPremultipliedAlpha();\n\n  Animation<Color?>? _textColor;\n  Animation<Color?>? _iconColor;\n  Animation<Color?>? _backgroundColor;\n  Animation<Color?>? _hoverColor;\n\n  AnimationController? _expansionAnimationController;\n  AnimationController? _hoverAnimationController;\n\n  CurvedAnimation? _expansionCurvedAnimation;\n\n  FocusNode? _focusNode;\n\n  Color? _effectiveHoverEffectColor;\n\n  bool _isExpanded = false;\n\n  FocusNode get _effectiveFocusNode =>\n      widget.focusNode ?? (_focusNode ??= FocusNode());\n\n  void _handleActiveState(bool isActive) {\n    isActive\n        ? _hoverAnimationController!.forward()\n        : _hoverAnimationController!.reverse();\n  }\n\n  void _handleTap() {\n    setState(() {\n      _isExpanded = !_isExpanded;\n      if (_isExpanded) {\n        _expansionAnimationController!.forward();\n      } else {\n        _expansionAnimationController!.reverse().then<void>((void value) {\n          if (!mounted) return;\n\n          setState(() {\n            // Rebuild without widget.children.\n          });\n        });\n      }\n      PageStorage.maybeOf(context)?.writeState(context, _isExpanded);\n    });\n\n    widget.onExpansionChanged?.call(_isExpanded ? widget.identityValue : null);\n  }\n\n  MoonAccordionSizeProperties _getMoonAccordionSize(\n    BuildContext context,\n    MoonAccordionSize? moonAccordionSize,\n  ) {\n    switch (moonAccordionSize) {\n      case MoonAccordionSize.sm:\n        return context.moonTheme?.accordionTheme.sizes.sm ??\n            MoonAccordionSizes(tokens: MoonTokens.light).sm;\n      case MoonAccordionSize.md:\n        return context.moonTheme?.accordionTheme.sizes.md ??\n            MoonAccordionSizes(tokens: MoonTokens.light).md;\n      case MoonAccordionSize.lg:\n        return context.moonTheme?.accordionTheme.sizes.lg ??\n            MoonAccordionSizes(tokens: MoonTokens.light).lg;\n      case MoonAccordionSize.xl:\n        return context.moonTheme?.accordionTheme.sizes.xl ??\n            MoonAccordionSizes(tokens: MoonTokens.light).xl;\n      default:\n        return context.moonTheme?.accordionTheme.sizes.md ??\n            MoonAccordionSizes(tokens: MoonTokens.light).md;\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _isExpanded = PageStorage.maybeOf(context)?.readState(context) as bool? ??\n        widget.initiallyExpanded || widget._selected;\n\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      if (!mounted) return;\n\n      if (_isExpanded) {\n        _expansionAnimationController!.value = 1.0;\n      }\n    });\n  }\n\n  @override\n  void didUpdateWidget(MoonAccordion<T> oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (widget.identityValue == null && widget.groupIdentityValue == null) {\n      return;\n    }\n\n    _isExpanded = widget._selected;\n\n    setState(() {\n      if (_isExpanded) {\n        _expansionAnimationController!.forward();\n      } else {\n        _expansionAnimationController!.reverse().then<void>((void value) {\n          if (!mounted) return;\n\n          setState(() {\n            // Rebuild without widget.children.\n          });\n        });\n      }\n      PageStorage.maybeOf(context)?.writeState(context, _isExpanded);\n    });\n  }\n\n  @override\n  void dispose() {\n    _expansionAnimationController!.dispose();\n    _hoverAnimationController!.dispose();\n\n    super.dispose();\n  }\n\n  Widget? _buildIcon(BuildContext context) {\n    final double iconSize =\n        _getMoonAccordionSize(context, widget.accordionSize).iconSizeValue;\n\n    final Color effectiveTrailingIconColor = widget.iconColor ??\n        context.moonTheme?.accordionTheme.colors.trailingIconColor ??\n        MoonColors.light.textSecondary;\n\n    final Color effectiveExpandedTrailingIconColor = widget.expandedIconColor ??\n        context.moonTheme?.accordionTheme.colors.expandedTrailingIconColor ??\n        MoonColors.light.textPrimary;\n\n    _iconColor ??= _iconColorTween.animate(_expansionCurvedAnimation!);\n\n    _iconColorTween\n      ..begin = effectiveTrailingIconColor\n      ..end = effectiveExpandedTrailingIconColor;\n\n    return IconTheme(\n      data: IconThemeData(color: _iconColor?.value),\n      child: RotationTransition(\n        turns: _halfTween.animate(_expansionCurvedAnimation!),\n        child: Icon(\n          switch (iconSize) {\n            16 => MoonIcons.controls_chevron_down_small_16_light,\n            24 => MoonIcons.controls_chevron_down_small_24_light,\n            _ => MoonIcons.controls_chevron_down_small_32_regular,\n          },\n          size: iconSize,\n        ),\n      ),\n    );\n  }\n\n  Widget _buildDecorationContainer({required Widget child}) {\n    final Color effectiveBorderColor = widget.borderColor ??\n        context.moonTheme?.accordionTheme.colors.borderColor ??\n        MoonColors.light.beerus;\n\n    final List<BoxShadow> effectiveShadows = widget.shadows ??\n        context.moonTheme?.accordionTheme.shadows.shadows ??\n        MoonShadows.light.sm;\n\n    return MoonBaseControl(\n      onTap: widget.isDisabled ? null : _handleTap,\n      propagateGesturesToChild: widget.propagateGesturesToChild,\n      autofocus: widget.autofocus,\n      focusNode: _effectiveFocusNode,\n      borderRadius: _effectiveBorderRadius.squircleBorderRadius(context),\n      builder: (\n        BuildContext context,\n        bool isEnabled,\n        bool isHovered,\n        bool isFocused,\n        bool isPressed,\n      ) {\n        final bool isActive = isHovered || isFocused;\n\n        _handleActiveState(isActive);\n\n        return AnimatedBuilder(\n          animation: _hoverAnimationController!,\n          builder: (BuildContext context, Widget? child) {\n            return Container(\n              clipBehavior: widget.clipBehavior ?? Clip.hardEdge,\n              decoration: widget.decoration ??\n                  ShapeDecoration(\n                    color: _hoverColor!.value,\n                    shadows: effectiveShadows,\n                    shape: MoonSquircleBorder(\n                      side: widget.showBorder\n                          ? BorderSide(color: effectiveBorderColor)\n                          : BorderSide.none,\n                      borderRadius:\n                          _effectiveBorderRadius.squircleBorderRadius(context),\n                    ),\n                  ),\n              child: child,\n            );\n          },\n          child: child,\n        );\n      },\n    );\n  }\n\n  Widget _buildContent(BuildContext context, Widget? rootChild) {\n    _effectiveHoverEffectColor ??=\n        context.moonEffects?.controlHoverEffect.primaryHoverColor ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlHoverEffect\n                .primaryHoverColor;\n\n    _effectiveMoonAccordionSize =\n        _getMoonAccordionSize(context, widget.accordionSize);\n\n    _effectiveBorderRadius =\n        widget.borderRadius ?? _effectiveMoonAccordionSize.borderRadius;\n\n    _effectiveHeaderHeight =\n        widget.headerHeight ?? _effectiveMoonAccordionSize.headerHeight;\n\n    _effectiveHeaderPadding =\n        widget.headerPadding ?? _effectiveMoonAccordionSize.headerPadding;\n\n    _resolvedDirectionalHeaderPadding =\n        _effectiveHeaderPadding.resolve(Directionality.of(context));\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.accordionTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveExpandedBackgroundColor =\n        widget.expandedBackgroundColor ??\n            context.moonTheme?.accordionTheme.colors.expandedBackgroundColor ??\n            MoonColors.light.goku;\n\n    final Color effectiveIconColor = widget.iconColor ??\n        context.moonTheme?.accordionTheme.colors.iconColor ??\n        MoonColors.light.iconPrimary;\n\n    final Color effectiveExpandedIconColor = widget.expandedIconColor ??\n        context.moonTheme?.accordionTheme.colors.expandedIconColor ??\n        MoonColors.light.iconPrimary;\n\n    final Color effectiveTextColor = widget.textColor ??\n        context.moonTheme?.accordionTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    final Color effectiveExpandedTextColor = widget.expandedTextColor ??\n        context.moonTheme?.accordionTheme.colors.expandedTextColor ??\n        MoonColors.light.textPrimary;\n\n    final Color effectiveContentTextColor =\n        context.moonTheme?.accordionTheme.colors.contentColor ??\n            MoonColors.light.textPrimary;\n\n    final TextStyle effectiveHeaderTextStyle =\n        _effectiveMoonAccordionSize.headerTextStyle;\n\n    final TextStyle effectiveContentTextStyle =\n        _effectiveMoonAccordionSize.contentTextStyle;\n\n    final Color effectiveHoverEffectColor =\n        context.moonEffects?.controlHoverEffect.primaryHoverColor ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlHoverEffect\n                .primaryHoverColor;\n\n    final Duration effectiveHoverEffectDuration =\n        context.moonEffects?.controlHoverEffect.hoverDuration ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlHoverEffect\n                .hoverDuration;\n\n    final Curve effectiveHoverEffectCurve =\n        context.moonEffects?.controlHoverEffect.hoverCurve ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlHoverEffect\n                .hoverCurve;\n\n    final Duration effectiveTransitionDuration = widget.transitionDuration ??\n        context.moonTheme?.accordionTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = widget.transitionCurve ??\n        context.moonTheme?.accordionTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    _expansionAnimationController ??=\n        AnimationController(duration: effectiveTransitionDuration, vsync: this);\n\n    _expansionCurvedAnimation ??= CurvedAnimation(\n      parent: _expansionAnimationController!,\n      curve: effectiveTransitionCurve,\n    );\n\n    _hoverAnimationController ??= AnimationController(\n      duration: effectiveHoverEffectDuration,\n      vsync: this,\n    );\n\n    _backgroundColor ??=\n        _backgroundColorTween.animate(_expansionCurvedAnimation!);\n    _backgroundColorTween\n      ..begin = effectiveBackgroundColor\n      ..end = effectiveExpandedBackgroundColor;\n\n    _hoverColor ??= _hoverAnimationController!.drive(\n      _hoverColorTween.chain(CurveTween(curve: effectiveHoverEffectCurve)),\n    );\n    _hoverColorTween\n      ..begin = _backgroundColor!.value\n      ..end = Color.alphaBlend(\n        effectiveHoverEffectColor,\n        _backgroundColor!.value!,\n      );\n\n    _textColor ??= _textColorTween.animate(_expansionCurvedAnimation!);\n    _textColorTween\n      ..begin = effectiveTextColor\n      ..end = effectiveExpandedTextColor;\n\n    _iconColor ??= _iconColorTween.animate(_expansionCurvedAnimation!);\n    _iconColorTween\n      ..begin = effectiveIconColor\n      ..end = effectiveExpandedIconColor;\n\n    final Widget header = SizedBox(\n      height: _effectiveHeaderHeight,\n      child: Padding(\n        padding: _resolvedDirectionalHeaderPadding,\n        child: IconTheme(\n          data: IconThemeData(color: _iconColor!.value),\n          child: DefaultTextStyle(\n            style: effectiveHeaderTextStyle.copyWith(color: _textColor!.value),\n            child: Row(\n              children: [\n                if (widget.leading != null)\n                  Padding(\n                    padding: EdgeInsetsDirectional.only(\n                      end: widget.gap ?? _resolvedDirectionalHeaderPadding.left,\n                    ),\n                    child: widget.leading,\n                  ),\n                Expanded(child: widget.label),\n                Padding(\n                  padding: EdgeInsetsDirectional.only(\n                    start:\n                        widget.gap ?? _resolvedDirectionalHeaderPadding.right,\n                  ),\n                  child: widget.trailing ?? _buildIcon(context)!,\n                ),\n              ],\n            ),\n          ),\n        ),\n      ),\n    );\n\n    final Widget childWrapper = ClipRect(\n      child: IconTheme(\n        data: IconThemeData(color: effectiveContentTextColor),\n        child: DefaultTextStyle(\n          style: effectiveContentTextStyle.copyWith(\n            color: effectiveContentTextColor,\n          ),\n          child: Align(\n            alignment: widget.expandedAlignment ?? Alignment.topCenter,\n            heightFactor: _expansionCurvedAnimation!.value,\n            child: rootChild,\n          ),\n        ),\n      ),\n    );\n\n    return switch (widget.hasContentOutside) {\n      true => Semantics(\n          label: widget.semanticLabel,\n          enabled: _isExpanded,\n          child: Column(\n            mainAxisSize: MainAxisSize.min,\n            children: <Widget>[\n              _buildDecorationContainer(child: header),\n              childWrapper,\n            ],\n          ),\n        ),\n      false => Semantics(\n          label: widget.semanticLabel,\n          enabled: _isExpanded,\n          child: _buildDecorationContainer(\n            child: Column(\n              mainAxisSize: MainAxisSize.min,\n              children: <Widget>[\n                header,\n                childWrapper,\n              ],\n            ),\n          ),\n        ),\n    };\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final Color effectiveDividerColor = widget.dividerColor ??\n        context.moonTheme?.accordionTheme.colors.dividerColor ??\n        MoonColors.light.beerus;\n\n    final Duration effectiveTransitionDuration = widget.transitionDuration ??\n        context.moonTheme?.accordionTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    _expansionAnimationController ??= AnimationController(\n      duration: effectiveTransitionDuration,\n      vsync: this,\n    );\n\n    final bool isClosed =\n        !_isExpanded && _expansionAnimationController!.isDismissed;\n\n    final bool shouldRemoveChildren = isClosed && !widget.maintainState;\n\n    final Widget result = Offstage(\n      offstage: isClosed,\n      child: TickerMode(\n        enabled: !isClosed,\n        child: Column(\n          children: [\n            if (widget.showDivider && !widget.hasContentOutside)\n              Container(height: 1, color: effectiveDividerColor),\n            Padding(\n              padding: widget.childrenPadding ?? EdgeInsets.zero,\n              child: Column(\n                crossAxisAlignment: widget.expandedCrossAxisAlignment ??\n                    CrossAxisAlignment.center,\n                children: widget.children,\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n\n    return RepaintBoundary(\n      child: AnimatedBuilder(\n        animation: _expansionAnimationController!.view,\n        builder: _buildContent,\n        child: shouldRemoveChildren ? null : result,\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/alert/alert.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonAlert extends StatefulWidget {\n  /// Whether to show the alert.\n  final bool show;\n\n  /// Whether to show a border around the alert.\n  final bool showBorder;\n\n  /// The border radius of the alert.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the alert.\n  final Color? backgroundColor;\n\n  /// The border color of the alert.\n  final Color? borderColor;\n\n  /// The text and icon color of the alert.\n  final Color? color;\n\n  /// The border width of the alert.\n  final double? borderWidth;\n\n  /// The horizontal gap between the [leading], [label] and [trailing] widgets\n  /// of the alert.\n  final double? horizontalGap;\n\n  /// The minimum height of the alert.\n  final double? minimumHeight;\n\n  /// The vertical gap between the alert header and [content].\n  final double? verticalGap;\n\n  /// The duration of the alert transition animation (fade in or out).\n  final Duration? transitionDuration;\n\n  /// The curve of the alert transition animation (fade in or out).\n  final Curve? transitionCurve;\n\n  /// The padding of the alert.\n  final EdgeInsetsGeometry? padding;\n\n  /// The custom decoration of the alert.\n  final Decoration? decoration;\n\n  /// The semantic label for the alert.\n  final String? semanticLabel;\n\n  /// The widget to display before the [label] widget of the alert.\n  final Widget? leading;\n\n  /// The primary content of the alert header.\n  final Widget label;\n\n  /// The widget to display after the [label] widget of the alert.\n  final Widget? trailing;\n\n  /// The widget to display below the alert header.\n  final Widget? content;\n\n  /// Creates a Moon Design base alert.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonAlert.filled], Moon Design filled alert.\n  ///   * [MoonAlert.outlined], Moon Design outlined alert.\n  const MoonAlert({\n    super.key,\n    this.show = false,\n    this.showBorder = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.borderColor,\n    this.color,\n    this.borderWidth,\n    this.horizontalGap,\n    this.minimumHeight,\n    this.verticalGap,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.padding,\n    this.decoration,\n    this.semanticLabel,\n    this.leading,\n    required this.label,\n    this.trailing,\n    this.content,\n  });\n\n  /// Creates a Moon Design filled alert.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonAlert.outlined], Moon Design outlined alert.\n  const MoonAlert.filled({\n    super.key,\n    this.show = false,\n    this.borderRadius,\n    this.color,\n    required this.backgroundColor,\n    this.semanticLabel,\n    this.leading,\n    required this.label,\n    this.trailing,\n    this.content,\n  })  : showBorder = false,\n        borderColor = null,\n        borderWidth = null,\n        decoration = null,\n        minimumHeight = null,\n        padding = null,\n        horizontalGap = null,\n        verticalGap = null,\n        transitionDuration = null,\n        transitionCurve = null;\n\n  /// Creates a Moon Design outlined alert.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonAlert.filled], Moon Design filled alert.\n  const MoonAlert.outlined({\n    super.key,\n    this.show = false,\n    this.borderRadius,\n    this.borderWidth,\n    this.color,\n    required this.borderColor,\n    this.semanticLabel,\n    this.leading,\n    required this.label,\n    this.trailing,\n    this.content,\n  })  : showBorder = true,\n        backgroundColor = Colors.transparent,\n        decoration = null,\n        minimumHeight = null,\n        padding = null,\n        horizontalGap = null,\n        verticalGap = null,\n        transitionDuration = null,\n        transitionCurve = null;\n\n  @override\n  State<MoonAlert> createState() => _MoonAlertState();\n}\n\nclass _MoonAlertState extends State<MoonAlert>\n    with SingleTickerProviderStateMixin {\n  bool _isVisible = true;\n\n  AnimationController? _animationController;\n  Animation<double>? _curvedAnimation;\n\n  TextStyle _getLabelTextStyle({required BuildContext context}) {\n    if (widget.content != null) {\n      return context.moonTheme?.alertTheme.properties.labelTextStyle ??\n          MoonTypography.typography.heading.textDefault;\n    } else {\n      return context.moonTheme?.alertTheme.properties.contentTextStyle ??\n          MoonTypography.typography.body.textDefault;\n    }\n  }\n\n  void _showAlert() {\n    _animationController!.forward();\n\n    setState(() => _isVisible = true);\n  }\n\n  void _hideAlert() {\n    _animationController!.reverse().then<void>((void value) {\n      if (mounted) setState(() => _isVisible = false);\n    });\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      if (!mounted) return;\n\n      if (_isVisible) _animationController!.value = 1.0;\n    });\n  }\n\n  @override\n  void didUpdateWidget(MoonAlert oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (oldWidget.show != widget.show) {\n      widget.show ? _showAlert() : _hideAlert();\n    }\n  }\n\n  @override\n  void dispose() {\n    _animationController!.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final BorderRadiusGeometry effectiveBorderRadius = widget.borderRadius ??\n        context.moonTheme?.alertTheme.properties.borderRadius ??\n        MoonBorders.borders.interactiveSm;\n\n    final double effectiveBorderWidth = widget.borderWidth ??\n        context.moonBorders?.defaultBorderWidth ??\n        MoonBorders.borders.defaultBorderWidth;\n\n    final double effectiveHorizontalGap = widget.horizontalGap ??\n        context.moonTheme?.alertTheme.properties.horizontalGap ??\n        MoonSizes.sizes.x3s;\n\n    final double effectiveVerticalGap = widget.verticalGap ??\n        context.moonTheme?.alertTheme.properties.verticalGap ??\n        MoonSizes.sizes.x4s;\n\n    final double effectiveMinimumHeight = widget.minimumHeight ??\n        context.moonTheme?.alertTheme.properties.minimumHeight ??\n        MoonSizes.sizes.xl;\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.alertTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveBorderColor = widget.borderColor ??\n        context.moonTheme?.alertTheme.colors.borderColor ??\n        MoonColors.light.bulma;\n\n    final Color effectiveTextColor = widget.color ??\n        context.moonTheme?.alertTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    final Color effectiveIconColor = widget.color ??\n        context.moonTheme?.alertTheme.colors.iconColor ??\n        MoonColors.light.iconPrimary;\n\n    final EdgeInsetsGeometry effectivePadding = widget.padding ??\n        context.moonTheme?.alertTheme.properties.padding ??\n        EdgeInsets.all(MoonSizes.sizes.x2s);\n\n    final TextStyle effectiveLabelTextStyle =\n        _getLabelTextStyle(context: context);\n\n    final TextStyle effectiveContentTextStyle =\n        context.moonTheme?.alertTheme.properties.contentTextStyle ??\n            MoonTypography.typography.body.textDefault;\n\n    final Duration effectiveTransitionDuration = widget.transitionDuration ??\n        context.moonTheme?.alertTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = widget.transitionCurve ??\n        context.moonTheme?.alertTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    _animationController ??= AnimationController(\n      duration: effectiveTransitionDuration,\n      vsync: this,\n    );\n\n    _curvedAnimation ??= CurvedAnimation(\n      parent: _animationController!,\n      curve: effectiveTransitionCurve,\n    );\n\n    return Visibility(\n      visible: _isVisible,\n      child: Semantics(\n        label: widget.semanticLabel,\n        child: RepaintBoundary(\n          child: FadeTransition(\n            opacity: _curvedAnimation!,\n            child: Container(\n              padding: effectivePadding,\n              constraints: BoxConstraints(minHeight: effectiveMinimumHeight),\n              decoration: widget.decoration ??\n                  ShapeDecorationWithPremultipliedAlpha(\n                    color: effectiveBackgroundColor,\n                    shape: MoonSquircleBorder(\n                      side: BorderSide(\n                        color: effectiveBorderColor,\n                        width: widget.showBorder ? effectiveBorderWidth : 0,\n                        style: widget.showBorder\n                            ? BorderStyle.solid\n                            : BorderStyle.none,\n                      ),\n                      borderRadius:\n                          effectiveBorderRadius.squircleBorderRadius(context),\n                    ),\n                  ),\n              child: IconTheme(\n                data: IconThemeData(\n                  color: effectiveIconColor,\n                ),\n                child: DefaultTextStyle(\n                  style: effectiveContentTextStyle.copyWith(\n                    color: effectiveTextColor,\n                  ),\n                  child: Column(\n                    mainAxisAlignment: MainAxisAlignment.center,\n                    children: [\n                      Row(\n                        children: [\n                          if (widget.leading != null)\n                            Padding(\n                              padding: EdgeInsetsDirectional.only(\n                                end: effectiveHorizontalGap,\n                              ),\n                              child: widget.leading,\n                            ),\n                          DefaultTextStyle(\n                            style: effectiveLabelTextStyle.copyWith(\n                              color: effectiveTextColor,\n                            ),\n                            child: Expanded(\n                              child: widget.label,\n                            ),\n                          ),\n                          if (widget.trailing != null)\n                            Padding(\n                              padding: EdgeInsetsDirectional.only(\n                                start: effectiveHorizontalGap,\n                              ),\n                              child: widget.trailing,\n                            ),\n                        ],\n                      ),\n                      if (widget.content != null)\n                        Row(\n                          children: [\n                            Expanded(\n                              child: Padding(\n                                padding: EdgeInsetsDirectional.only(\n                                  top: effectiveVerticalGap,\n                                ),\n                                child: widget.content,\n                              ),\n                            ),\n                          ],\n                        ),\n                    ],\n                  ),\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/auth_code/auth_code.dart",
    "content": "import 'dart:async';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/opacities.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum AuthFieldShape {\n  box,\n  underline,\n  circle,\n}\n\nenum ErrorAnimationType {\n  noAnimation,\n  shake,\n}\n\ntypedef MoonAuthCodeErrorBuilder = Widget Function(\n  BuildContext context,\n  String? errorText,\n);\n\nclass MoonAuthCode extends StatefulWidget {\n  /// The shape of the auth code input field.\n  final AuthFieldShape? authFieldShape;\n\n  /// Whether to automatically dismiss the keyboard when the last input is\n  /// entered.\n  final bool autoDismissKeyboard;\n\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autoFocus;\n\n  /// Whether to automatically unfocus the auth code.\n  final bool autoUnfocus;\n\n  /// Whether the auth code is enabled.\n  final bool enabled;\n\n  /// Whether to enable the fill color for the auth code input fields.\n  final bool enableInputFill;\n\n  /// Whether to replace all typed characters in the auth code input fields with\n  /// the [obscuringCharacter].\n  final bool obscureText;\n\n  /// Whether to briefly display the typed character before obscuring it with\n  /// the [obscuringCharacter].\n  final bool peekWhenObscuring;\n\n  /// Whether to show the cursor in the selected auth code input field.\n  final bool showAuthFieldCursor;\n\n  /// Whether to use haptic feedback (vibration) for auth code error state.\n  final bool useHapticFeedback;\n\n  /// The border radius of the auth code input field.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The cursor color of the auth code input field.\n  final Color? authFieldCursorColor;\n\n  /// The border color of the selected auth code input field.\n  final Color? selectedBorderColor;\n\n  /// The border color of the auth code input field with input.\n  final Color? activeBorderColor;\n\n  /// The border color of the auth code input field without input.\n  final Color? inactiveBorderColor;\n\n  /// The border color of the auth code input field in error state.\n  final Color? errorBorderColor;\n\n  /// The fill color of the selected auth code input field.\n  ///\n  /// [enableInputFill] has to be set true.\n  final Color? selectedFillColor;\n\n  /// The fill color of the auth code input field with input.\n  ///\n  /// [enableInputFill] has to be set true.\n  final Color? activeFillColor;\n\n  /// The fill color of the auth code input field without input.\n  ///\n  /// [enableInputFill] has to be set true.\n  final Color? inactiveFillColor;\n\n  /// The border width of the auth code input field.\n  final double? borderWidth;\n\n  /// The opacity value of the auth code when [enabled] is false.\n  final double? disabledOpacityValue;\n\n  /// The horizontal gap between the auth code input fields.\n  final double? gap;\n\n  /// The height of the auth code input field.\n  final double? height;\n\n  /// The width of the auth code input field.\n  final double? width;\n\n  /// The duration of the auth code input field transition animation.\n  final Duration? animationDuration;\n\n  /// The duration of the auth code error state animation.\n  final Duration? errorAnimationDuration;\n\n  /// The duration to display the typed character before it is obscured with\n  /// [obscuringCharacter]. The [peekWhenObscuring] has to be set to true.\n  final Duration? peekDuration;\n\n  /// The curve of the auth code input field transition animation.\n  final Curve? animationCurve;\n\n  /// The curve of the auth code error state animation.\n  final Curve? errorAnimationCurve;\n\n  /// The animation type for the auth code validation error.\n  final ErrorAnimationType errorAnimationType;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The total number of input fields to build for the auth code.\n  final int authInputFieldCount;\n\n  /// The list of shadows applied to the auth code input field.\n  final List<BoxShadow>? boxShadows;\n\n  /// The list of shadows applied to the auth code input field with input.\n  final List<BoxShadow>? activeBoxShadows;\n\n  /// The list of shadows applied to the auth code input field without input.\n  final List<BoxShadow>? inActiveBoxShadows;\n\n  /// {@macro flutter.widgets.editableText.inputFormatters}\n  final List<TextInputFormatter>? inputFormatters;\n\n  /// The placement of the auth code input fields along the main axis.\n  final MainAxisAlignment mainAxisAlignment;\n\n  /// The error text can be used to force authentication into an error state\n  /// (useful for asynchronous errors).\n  ///\n  /// The validator errors take precedence over the provided [errorText].\n  final String? errorText;\n\n  /// The character or placeholder to display in the auth code input field when\n  /// its value is empty.\n  final String? hintCharacter;\n\n  /// The character to use to obscure the text when [obscureText] is true.\n  ///\n  /// Defaults to Unicode character U+2022 BULLET (•).\n  final String obscuringCharacter;\n\n  /// The semantic label for the auth code.\n  final String? semanticLabel;\n\n  /// The action to perform by the text input control.\n  final TextInputAction textInputAction;\n\n  /// The keyboard [TextInputType] for the auth code.\n  final TextInputType keyboardType;\n\n  /// The text style of the [hintCharacter].\n  final TextStyle? hintStyle;\n\n  /// The text style of the auth code.\n  final TextStyle? textStyle;\n\n  /// The text style of the auth code in error state.\n  final TextStyle? errorTextStyle;\n\n  /// The [TextEditingController] used to edit the text in the auth code input\n  /// field.\n  final TextEditingController? textController;\n\n  /// The input text validator for the auth code [TextFormField].\n  /// The validator errors take precedence over the provided [errorText].\n  final FormFieldValidator<String> validator;\n\n  /// The callback that is called when the auth code input text changes.\n  final ValueChanged<String>? onChanged;\n\n  /// The callback that is called when all the auth code input fields are\n  /// filled.\n  final ValueChanged<String>? onCompleted;\n\n  /// The callback that is called when the 'done' or 'next' action is triggered\n  /// on the keyboard.\n  final ValueChanged<String>? onSubmitted;\n\n  /// The [onEditingComplete] callback runs when editing is finished.\n  /// It differs from [onSubmitted] by having a default value which\n  /// updates [textController] and yields keyboard focus.\n  ///\n  /// Set this to empty function if keyboard should not close automatically on\n  /// 'done' or 'next' press.\n  final VoidCallback? onEditingComplete;\n\n  /// A builder to build the auth code error widget.\n  final MoonAuthCodeErrorBuilder errorBuilder;\n\n  /// The widget to obscure the auth code input field text.\n  ///\n  /// Overrides the [obscuringCharacter].\n  final Widget? obscuringWidget;\n\n  /// Creates a Moon Design auth code.\n  const MoonAuthCode({\n    super.key,\n    this.authFieldShape = AuthFieldShape.box,\n    this.autoDismissKeyboard = true,\n    this.autoFocus = false,\n    this.autoUnfocus = true,\n    this.enabled = true,\n    this.enableInputFill = false,\n    this.obscureText = false,\n    this.peekWhenObscuring = false,\n    this.showAuthFieldCursor = true,\n    this.useHapticFeedback = false,\n    this.borderRadius,\n    this.authFieldCursorColor,\n    this.selectedBorderColor,\n    this.activeBorderColor,\n    this.inactiveBorderColor,\n    this.errorBorderColor,\n    this.selectedFillColor,\n    this.activeFillColor,\n    this.inactiveFillColor,\n    this.borderWidth,\n    this.disabledOpacityValue,\n    this.gap,\n    this.height,\n    this.width,\n    this.animationDuration,\n    this.errorAnimationDuration,\n    this.peekDuration,\n    this.animationCurve,\n    this.errorAnimationCurve,\n    this.errorAnimationType = ErrorAnimationType.noAnimation,\n    this.focusNode,\n    this.authInputFieldCount = 6,\n    this.boxShadows,\n    this.activeBoxShadows,\n    this.inActiveBoxShadows,\n    this.inputFormatters,\n    this.mainAxisAlignment = MainAxisAlignment.center,\n    this.hintCharacter,\n    this.obscuringCharacter = '•',\n    this.semanticLabel,\n    this.textInputAction = TextInputAction.done,\n    this.keyboardType = TextInputType.visiblePassword,\n    this.errorText,\n    this.hintStyle,\n    this.textStyle,\n    this.errorTextStyle,\n    this.textController,\n    required this.validator,\n    this.onChanged,\n    this.onCompleted,\n    this.onSubmitted,\n    this.onEditingComplete,\n    required this.errorBuilder,\n    this.obscuringWidget,\n  })  : assert(authInputFieldCount > 0),\n        assert(height == null || height > 0),\n        assert(width == null || width > 0);\n\n  @override\n  _MoonAuthCodeState createState() => _MoonAuthCodeState();\n}\n\nclass _MoonAuthCodeState extends State<MoonAuthCode>\n    with TickerProviderStateMixin {\n  late FocusNode _focusNode;\n  late List<String> _inputList;\n\n  late BorderRadiusGeometry _effectiveBorderRadius;\n  late Color _effectiveSelectedBorderColor;\n  late Color _effectiveActiveBorderColor;\n  late Color _effectiveInactiveBorderColor;\n  late Color _effectiveErrorBorderColor;\n  late Color _effectiveSelectedFillColor;\n  late Color _effectiveActiveFillColor;\n  late Color _effectiveInactiveFillColor;\n  late Color _effectiveTextColor;\n  late Color _effectiveCursorColor;\n  late double _effectiveBorderWidth;\n  late double _effectiveGap;\n  late double _effectiveHeight;\n  late double _effectiveWidth;\n  late TextStyle _effectiveTextStyle;\n  late TextStyle _effectiveErrorTextStyle;\n\n  late TextEditingController _textEditingController;\n  late AnimationController _cursorController;\n  late Animation<double> _cursorAnimation;\n\n  AnimationController? _errorAnimationController;\n  Animation<Offset>? _errorOffsetAnimation;\n\n  Duration? _peekDuration;\n  Duration? _animationDuration;\n  Curve? _animationCurve;\n\n  bool _isInErrorMode = false;\n  bool _hasPeeked = false;\n  int _selectedIndex = 0;\n  Timer? _peekDebounce;\n\n  TextStyle get _resolvedTextStyle =>\n      _effectiveTextStyle.merge(widget.textStyle).copyWith(\n            color: _isInErrorMode\n                ? _resolvedErrorTextStyle.color\n                : widget.textStyle?.color ?? _effectiveTextColor,\n          );\n\n  TextStyle get _hintStyle => _resolvedTextStyle.merge(widget.hintStyle);\n\n  TextStyle get _resolvedErrorTextStyle =>\n      _effectiveErrorTextStyle.merge(widget.errorTextStyle).copyWith(\n            color: widget.errorTextStyle?.color ?? _effectiveErrorBorderColor,\n          );\n\n  Color get _resolvedErrorCursorColor => _isInErrorMode\n      ? _resolvedErrorTextStyle.color ?? _effectiveErrorBorderColor\n      : _effectiveCursorColor;\n\n  void _initializeFields() {\n    _initializeFocusNode();\n    _initializeInputList();\n    _initializeErrorAnimationListener();\n    _initializeTextEditingController();\n    _initializeAuthFieldCursor();\n  }\n\n  void _initializeFocusNode() {\n    _focusNode = (widget.focusNode ?? FocusNode())\n      ..addListener(() => setState(() {}));\n  }\n\n  void _initializeInputList() {\n    _inputList = List<String>.filled(widget.authInputFieldCount, '');\n  }\n\n  void _initializeTextEditingController() {\n    _textEditingController = widget.textController ?? TextEditingController();\n\n    _textEditingController.addListener(() {\n      // Since we use custom error builder, manual input validation is required\n      // to trigger validation error. The _validateInput() method returns an\n      // error String in case of an validation error, otherwise null.\n      if (_validateInput() != null) {\n        if (widget.errorAnimationType == ErrorAnimationType.shake) {\n          _errorAnimationController!.forward();\n\n          if (widget.useHapticFeedback) HapticFeedback.lightImpact();\n        }\n        if (!_isInErrorMode) _setState(() => _isInErrorMode = true);\n      } else {\n        if (_isInErrorMode && widget.errorText == null) {\n          _setState(() => _isInErrorMode = false);\n        }\n      }\n\n      _debounceBlink();\n\n      String currentText = _textEditingController.text;\n      if (widget.enabled && _inputList.join() != currentText) {\n        if (currentText.length >= widget.authInputFieldCount) {\n          if (widget.onCompleted != null) {\n            if (currentText.length > widget.authInputFieldCount) {\n              currentText =\n                  currentText.substring(0, widget.authInputFieldCount);\n            }\n            Future.delayed(\n              const Duration(milliseconds: 100),\n              () => widget.onCompleted!(currentText),\n            );\n          }\n          if (widget.autoDismissKeyboard) _focusNode.unfocus();\n        }\n        widget.onChanged?.call(currentText);\n      }\n\n      _updateTextField(currentText);\n    });\n\n    // If a default value is set for the TextEditingController,\n    // update the text field initial value accordingly.\n    if (_textEditingController.text.isNotEmpty) {\n      _updateTextField(_textEditingController.text);\n    }\n  }\n\n  void _initializeAuthFieldCursor() {\n    _cursorController =\n        AnimationController(duration: const Duration(seconds: 1), vsync: this);\n    _cursorAnimation = Tween<double>(begin: 1, end: 0).animate(\n      CurvedAnimation(\n        parent: _cursorController,\n        curve: Curves.easeInOut,\n      ),\n    );\n\n    if (widget.showAuthFieldCursor) _cursorController.repeat();\n  }\n\n  void _initializeErrorAnimationListener() {\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      if (!mounted) return;\n\n      _errorAnimationController!.addStatusListener((AnimationStatus status) {\n        if (status == AnimationStatus.completed) {\n          _errorAnimationController!.reverse();\n        }\n      });\n    });\n  }\n\n  void _debounceBlink() {\n    _hasPeeked = true;\n\n    if (widget.peekWhenObscuring &&\n        _textEditingController.text.length >\n            _inputList.where((x) => x.isNotEmpty).length) {\n      _setState(() => _hasPeeked = false);\n\n      if (_peekDebounce?.isActive ?? false) _peekDebounce!.cancel();\n\n      _peekDebounce = Timer(_peekDuration!, () {\n        _setState(() => _hasPeeked = true);\n      });\n    }\n  }\n\n  void _onFocus() {\n    if (widget.autoUnfocus) {\n      if (_focusNode.hasFocus &&\n          MediaQuery.of(context).viewInsets.bottom == 0) {\n        _focusNode.unfocus();\n        Future.delayed(\n          const Duration(microseconds: 1),\n          () => _focusNode.requestFocus(),\n        );\n      } else {\n        _focusNode.requestFocus();\n      }\n    } else {\n      _focusNode.requestFocus();\n    }\n  }\n\n  Color _getBorderColorFromIndex(int index) {\n    if (((_selectedIndex == index) ||\n            (_selectedIndex == index + 1 &&\n                index + 1 == widget.authInputFieldCount)) &&\n        _focusNode.hasFocus) {\n      return _isInErrorMode\n          ? _effectiveErrorBorderColor\n          : _effectiveSelectedBorderColor;\n    } else if (_selectedIndex > index) {\n      return _isInErrorMode\n          ? _effectiveErrorBorderColor\n          : _effectiveActiveBorderColor;\n    }\n\n    return _isInErrorMode\n        ? _effectiveErrorBorderColor\n        : _effectiveInactiveBorderColor;\n  }\n\n  Color _getFillColorFromIndex(int index) {\n    if (((_selectedIndex == index) ||\n            (_selectedIndex == index + 1 &&\n                index + 1 == widget.authInputFieldCount)) &&\n        _focusNode.hasFocus) {\n      return _effectiveSelectedFillColor;\n    } else if (_selectedIndex > index) {\n      return _effectiveActiveFillColor;\n    }\n\n    return _effectiveInactiveFillColor;\n  }\n\n  double _getBorderWidthFromIndex(int index) {\n    if (((_selectedIndex == index) ||\n            (_selectedIndex == index + 1 &&\n                index + 1 == widget.authInputFieldCount)) &&\n        _focusNode.hasFocus) {\n      return _effectiveBorderWidth + 1;\n    }\n\n    return _effectiveBorderWidth;\n  }\n\n  List<BoxShadow>? _getBoxShadowFromIndex(int index) {\n    if (_selectedIndex == index) {\n      return widget.activeBoxShadows;\n    } else if (_selectedIndex > index) {\n      return widget.inActiveBoxShadows;\n    }\n\n    return [];\n  }\n\n  ShapeBorder _getAuthInputFieldShape({required int elementIndex}) {\n    final BorderSide borderSide = BorderSide(\n      color: _getBorderColorFromIndex(elementIndex),\n      width: _getBorderWidthFromIndex(elementIndex),\n    );\n\n    switch (widget.authFieldShape) {\n      case AuthFieldShape.circle:\n        return CircleBorder(side: borderSide);\n      case AuthFieldShape.underline:\n        return Border(bottom: borderSide);\n      default:\n        return MoonSquircleBorder(\n          borderRadius: _effectiveBorderRadius.squircleBorderRadius(context),\n          side: borderSide,\n        );\n    }\n  }\n\n  Future<void> _updateTextField(String text) async {\n    final List<String> updatedList =\n        List<String>.filled(widget.authInputFieldCount, '');\n\n    for (int i = 0; i < widget.authInputFieldCount; i++) {\n      updatedList[i] = text.length > i ? text[i] : '';\n    }\n\n    _setState(() {\n      _selectedIndex = text.length;\n      _inputList = updatedList;\n    });\n  }\n\n  String? _validateInput() =>\n      widget.validator.call(_textEditingController.text);\n\n  void _setState(void Function() function) {\n    if (mounted) setState(function);\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _isInErrorMode = widget.errorText != null;\n\n    _initializeFields();\n  }\n\n  @override\n  void didUpdateWidget(MoonAuthCode oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (oldWidget.errorText != widget.errorText) {\n      _setState(() {\n        _isInErrorMode = widget.errorText != null || _validateInput() != null;\n      });\n    }\n  }\n\n  @override\n  void dispose() {\n    if (widget.textController == null) _textEditingController.dispose();\n    if (widget.focusNode == null) _focusNode.dispose();\n\n    _errorAnimationController!.dispose();\n    _cursorController.dispose();\n\n    super.dispose();\n  }\n\n  List<Widget> _generateAuthInputFields() {\n    final List<Widget> authInputFields = <Widget>[];\n\n    for (int i = 0; i < widget.authInputFieldCount; i++) {\n      authInputFields.add(\n        Padding(\n          padding: EdgeInsetsDirectional.only(\n            end: i == widget.authInputFieldCount - 1 ? 0 : _effectiveGap,\n          ),\n          child: RepaintBoundary(\n            child: Container(\n              width: _effectiveWidth,\n              height: _effectiveHeight,\n              decoration: ShapeDecorationWithPremultipliedAlpha(\n                shape: _getAuthInputFieldShape(elementIndex: i),\n                color: widget.enableInputFill\n                    ? _getFillColorFromIndex(i)\n                    : Colors.transparent,\n                shadows: (widget.activeBoxShadows != null ||\n                        widget.inActiveBoxShadows != null)\n                    ? _getBoxShadowFromIndex(i)\n                    : widget.boxShadows,\n              ),\n              child: Center(\n                child: _buildChild(i),\n              ),\n            ),\n          ),\n        ),\n      );\n    }\n\n    return authInputFields;\n  }\n\n  Widget _buildChild(int index) {\n    if (((_selectedIndex == index) ||\n            (_selectedIndex == index + 1 &&\n                index + 1 == widget.authInputFieldCount)) &&\n        _focusNode.hasFocus &&\n        widget.showAuthFieldCursor) {\n      final double cursorHeight = _resolvedTextStyle.fontSize!;\n\n      if (_selectedIndex == index + 1 &&\n          index + 1 == widget.authInputFieldCount) {\n        return Stack(\n          alignment: Alignment.center,\n          children: [\n            Center(\n              child: Padding(\n                padding: EdgeInsets.only(\n                  left: _resolvedTextStyle.fontSize! / 1.5,\n                ),\n                child: FadeTransition(\n                  opacity: _cursorAnimation,\n                  child: CustomPaint(\n                    size: Size(0, cursorHeight),\n                    painter: _CursorPainter(\n                      cursorColor: _resolvedErrorCursorColor,\n                    ),\n                  ),\n                ),\n              ),\n            ),\n            _renderAuthInputFieldText(index: index),\n          ],\n        );\n      } else {\n        return Center(\n          child: FadeTransition(\n            opacity: _cursorAnimation,\n            child: CustomPaint(\n              size: Size(0, cursorHeight),\n              painter: _CursorPainter(\n                cursorColor: _resolvedErrorCursorColor,\n              ),\n            ),\n          ),\n        );\n      }\n    }\n    return _renderAuthInputFieldText(index: index);\n  }\n\n  Widget _renderAuthInputFieldText({@required int? index}) {\n    assert(index != null);\n\n    final bool showObscured = !widget.peekWhenObscuring ||\n        (widget.peekWhenObscuring && _hasPeeked) ||\n        index != _inputList.where((x) => x.isNotEmpty).length - 1;\n\n    if (widget.obscuringWidget != null &&\n        showObscured &&\n        _inputList[index!].isNotEmpty) {\n      return widget.obscuringWidget!;\n    }\n\n    if (_inputList[index!].isEmpty && widget.hintCharacter != null) {\n      return Text(\n        widget.hintCharacter!,\n        key: ValueKey(_inputList[index]),\n        style: _hintStyle,\n      );\n    }\n\n    final String text =\n        widget.obscureText && _inputList[index].isNotEmpty && showObscured\n            ? widget.obscuringCharacter\n            : _inputList[index];\n\n    return Text(\n      text,\n      key: ValueKey(_inputList[index]),\n      style: _resolvedTextStyle,\n    );\n  }\n\n  Widget _getTextFormField() {\n    final List<TextInputFormatter> inputFormatters = [\n      LengthLimitingTextInputFormatter(widget.authInputFieldCount),\n    ];\n\n    if (widget.inputFormatters != null) {\n      inputFormatters.addAll(widget.inputFormatters!);\n    }\n\n    return Directionality(\n      textDirection: Directionality.of(context),\n      child: SizedBox(\n        height: _effectiveHeight,\n        child: TextFormField(\n          autocorrect: false,\n          autofocus: widget.autoFocus,\n          autovalidateMode: AutovalidateMode.onUserInteraction,\n          controller: _textEditingController,\n          cursorWidth: 0.01,\n          enabled: widget.enabled,\n          enableInteractiveSelection: false,\n          enableSuggestions: false,\n          focusNode: _focusNode,\n          inputFormatters: inputFormatters,\n          keyboardType: widget.keyboardType,\n          onChanged: widget.onChanged,\n          onEditingComplete: widget.onEditingComplete,\n          onFieldSubmitted: widget.onSubmitted,\n          obscureText: widget.obscureText,\n          obscuringCharacter: widget.obscuringCharacter,\n          scrollPadding: const EdgeInsets.all(24.0),\n          showCursor: true,\n          smartDashesType: SmartDashesType.disabled,\n          textInputAction: widget.textInputAction,\n          decoration: const InputDecoration(\n            contentPadding: EdgeInsets.zero,\n            border: InputBorder.none,\n            enabledBorder: InputBorder.none,\n            focusedBorder: InputBorder.none,\n            disabledBorder: InputBorder.none,\n          ),\n          style: const TextStyle(\n            color: Colors.transparent,\n            fontSize: kIsWeb ? 1 : 0.01,\n            height: .01,\n          ),\n        ),\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    _effectiveBorderRadius = widget.borderRadius ??\n        context.moonTheme?.authCodeTheme.properties.borderRadius ??\n        MoonBorders.borders.interactiveSm;\n\n    _effectiveBorderWidth = widget.borderWidth ??\n        context.moonBorders?.defaultBorderWidth ??\n        MoonBorders.borders.defaultBorderWidth;\n\n    _effectiveGap = widget.gap ??\n        context.moonTheme?.authCodeTheme.properties.gap ??\n        MoonSizes.sizes.x4s;\n\n    _effectiveHeight = widget.height ??\n        context.moonTheme?.authCodeTheme.properties.height ??\n        MoonSizes.sizes.xl;\n\n    _effectiveWidth = widget.width ??\n        context.moonTheme?.authCodeTheme.properties.width ??\n        MoonSizes.sizes.lg;\n\n    _effectiveSelectedBorderColor = widget.selectedBorderColor ??\n        context.moonTheme?.authCodeTheme.colors.selectedBorderColor ??\n        MoonColors.light.piccolo;\n\n    _effectiveActiveBorderColor = widget.activeBorderColor ??\n        context.moonTheme?.authCodeTheme.colors.activeBorderColor ??\n        MoonColors.light.beerus;\n\n    _effectiveInactiveBorderColor = widget.inactiveBorderColor ??\n        context.moonTheme?.authCodeTheme.colors.inactiveBorderColor ??\n        MoonColors.light.beerus;\n\n    _effectiveErrorBorderColor = widget.errorBorderColor ??\n        context.moonTheme?.authCodeTheme.colors.errorBorderColor ??\n        MoonColors.light.chichi;\n\n    _effectiveSelectedFillColor = widget.selectedFillColor ??\n        context.moonTheme?.authCodeTheme.colors.selectedFillColor ??\n        MoonColors.light.goku;\n\n    _effectiveActiveFillColor = widget.activeFillColor ??\n        context.moonTheme?.authCodeTheme.colors.activeFillColor ??\n        MoonColors.light.goku;\n\n    _effectiveInactiveFillColor = widget.inactiveFillColor ??\n        context.moonTheme?.authCodeTheme.colors.inactiveFillColor ??\n        MoonColors.light.goku;\n\n    _effectiveTextStyle =\n        context.moonTheme?.authCodeTheme.properties.textStyle ??\n            MoonTypography.typography.body.text24;\n\n    _effectiveErrorTextStyle =\n        context.moonTheme?.authCodeTheme.properties.errorTextStyle ??\n            MoonTypography.typography.body.text12;\n\n    _effectiveTextColor = context.moonTheme?.authCodeTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    _effectiveCursorColor = widget.authFieldCursorColor ??\n        context.moonTheme?.authCodeTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    _animationDuration ??= widget.animationDuration ??\n        context.moonTheme?.authCodeTheme.properties.animationDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    _animationCurve ??= widget.animationCurve ??\n        context.moonTheme?.authCodeTheme.properties.animationCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    _peekDuration ??= widget.peekDuration ??\n        context.moonTheme?.authCodeTheme.properties.peekDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final double effectiveDisabledOpacityValue = widget.disabledOpacityValue ??\n        context.moonOpacities?.disabled ??\n        MoonOpacities.opacities.disabled;\n\n    final Duration effectiveErrorAnimationDuration = widget\n            .errorAnimationDuration ??\n        context.moonTheme?.authCodeTheme.properties.errorAnimationDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveErrorAnimationCurve = widget.errorAnimationCurve ??\n        context.moonTheme?.authCodeTheme.properties.errorAnimationCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    _errorAnimationController ??= AnimationController(\n      duration: effectiveErrorAnimationDuration,\n      vsync: this,\n    );\n\n    _errorOffsetAnimation ??= Tween<Offset>(\n      begin: Offset.zero,\n      end: const Offset(.01, 0.0),\n    ).animate(\n      CurvedAnimation(\n        parent: _errorAnimationController!,\n        curve: effectiveErrorAnimationCurve,\n      ),\n    );\n\n    return Semantics(\n      label: widget.semanticLabel,\n      child: RepaintBoundary(\n        child: AnimatedOpacity(\n          duration: _animationDuration!,\n          curve: _animationCurve!,\n          opacity: widget.enabled ? 1 : effectiveDisabledOpacityValue,\n          child: Column(\n            children: [\n              SlideTransition(\n                position: _errorOffsetAnimation!,\n                child: Stack(\n                  children: <Widget>[\n                    AbsorbPointer(\n                      child: AutofillGroup(\n                        child: _getTextFormField(),\n                      ),\n                    ),\n                    Positioned(\n                      top: 0,\n                      left: 0,\n                      right: 0,\n                      child: GestureDetector(\n                        onTap: () => _onFocus(),\n                        child: Row(\n                          mainAxisAlignment: widget.mainAxisAlignment,\n                          children: _generateAuthInputFields(),\n                        ),\n                      ),\n                    ),\n                  ],\n                ),\n              ),\n              if (_isInErrorMode)\n                DefaultTextStyle(\n                  style: _resolvedErrorTextStyle,\n                  child: IconTheme(\n                    data: IconThemeData(\n                      color: _resolvedErrorTextStyle.color,\n                    ),\n                    child: widget.errorBuilder(\n                      context,\n                      _validateInput() ?? widget.errorText,\n                    ),\n                  ),\n                ),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _CursorPainter extends CustomPainter {\n  final Color cursorColor;\n\n  _CursorPainter({required this.cursorColor});\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    const Offset p1 = Offset.zero;\n    final Offset p2 = Offset(0, size.height);\n    final Paint paint = Paint()\n      ..color = cursorColor\n      ..strokeWidth = 2;\n\n    canvas.drawLine(p1, p2, paint);\n  }\n\n  @override\n  bool shouldRepaint(CustomPainter old) => false;\n}\n"
  },
  {
    "path": "lib/src/widgets/avatar/avatar.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/avatar/avatar_size_properties.dart';\nimport 'package:moon_design/src/theme/avatar/avatar_sizes.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/widgets/avatar/avatar_clipper.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonAvatarSize {\n  xs,\n  sm,\n  md,\n  lg,\n  xl,\n  x2l,\n}\n\nenum MoonBadgeAlignment {\n  topLeft,\n  topRight,\n  bottomLeft,\n  bottomRight,\n}\n\nclass MoonAvatar extends StatelessWidget {\n  /// Whether to show the avatar badge.\n  final bool showBadge;\n\n  /// The border radius of the avatar.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the avatar.\n  final Color? backgroundColor;\n\n  /// The color of the avatar badge.\n  final Color? badgeColor;\n\n  /// The margin value of the avatar badge.\n  final double? badgeMarginValue;\n\n  /// The size of the avatar badge.\n  final double? badgeSize;\n\n  /// The height of the avatar.\n  final double? height;\n\n  /// The width of the avatar.\n  final double? width;\n\n  /// The background image of the avatar.\n  final ImageProvider<Object>? backgroundImage;\n\n  /// The size of the avatar.\n  final MoonAvatarSize? avatarSize;\n\n  /// The alignment of the avatar badge.\n  final MoonBadgeAlignment badgeAlignment;\n\n  /// The semantic label for the avatar.\n  final String? semanticLabel;\n\n  /// The widget to display within the avatar.\n  final Widget? content;\n\n  /// Creates a Moon Design avatar.\n  const MoonAvatar({\n    super.key,\n    this.showBadge = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.badgeColor,\n    this.badgeMarginValue,\n    this.badgeSize,\n    this.height,\n    this.width,\n    this.backgroundImage,\n    this.avatarSize,\n    this.badgeAlignment = MoonBadgeAlignment.bottomRight,\n    this.semanticLabel,\n    this.content,\n  });\n\n  Alignment _avatarAlignmentMapper(BuildContext context) {\n    final bool isRTL = Directionality.of(context) == TextDirection.rtl;\n\n    if (isRTL) {\n      switch (badgeAlignment) {\n        case MoonBadgeAlignment.topLeft:\n          return Alignment.topRight;\n        case MoonBadgeAlignment.topRight:\n          return Alignment.topLeft;\n        case MoonBadgeAlignment.bottomLeft:\n          return Alignment.bottomRight;\n        case MoonBadgeAlignment.bottomRight:\n          return Alignment.bottomLeft;\n        default:\n          return Alignment.bottomRight;\n      }\n    } else {\n      switch (badgeAlignment) {\n        case MoonBadgeAlignment.topLeft:\n          return Alignment.topLeft;\n        case MoonBadgeAlignment.topRight:\n          return Alignment.topRight;\n        case MoonBadgeAlignment.bottomLeft:\n          return Alignment.bottomLeft;\n        case MoonBadgeAlignment.bottomRight:\n          return Alignment.bottomRight;\n        default:\n          return Alignment.bottomRight;\n      }\n    }\n  }\n\n  MoonAvatarSizeProperties _getMoonAvatarSize(\n    BuildContext context,\n    MoonAvatarSize? moonAvatarSize,\n  ) {\n    switch (moonAvatarSize) {\n      case MoonAvatarSize.xs:\n        return context.moonTheme?.avatarTheme.sizes.xs ??\n            MoonAvatarSizes(tokens: MoonTokens.light).xs;\n      case MoonAvatarSize.sm:\n        return context.moonTheme?.avatarTheme.sizes.sm ??\n            MoonAvatarSizes(tokens: MoonTokens.light).sm;\n      case MoonAvatarSize.md:\n        return context.moonTheme?.avatarTheme.sizes.md ??\n            MoonAvatarSizes(tokens: MoonTokens.light).md;\n      case MoonAvatarSize.lg:\n        return context.moonTheme?.avatarTheme.sizes.lg ??\n            MoonAvatarSizes(tokens: MoonTokens.light).lg;\n      case MoonAvatarSize.xl:\n        return context.moonTheme?.avatarTheme.sizes.xl ??\n            MoonAvatarSizes(tokens: MoonTokens.light).xl;\n      case MoonAvatarSize.x2l:\n        return context.moonTheme?.avatarTheme.sizes.x2l ??\n            MoonAvatarSizes(tokens: MoonTokens.light).x2l;\n      default:\n        return context.moonTheme?.avatarTheme.sizes.md ??\n            MoonAvatarSizes(tokens: MoonTokens.light).md;\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final MoonAvatarSizeProperties effectiveMoonAvatarSize =\n        _getMoonAvatarSize(context, avatarSize);\n\n    final BorderRadiusGeometry effectiveBorderRadius =\n        borderRadius ?? effectiveMoonAvatarSize.borderRadius;\n\n    final resolvedBorderRadius =\n        effectiveBorderRadius.resolve(Directionality.of(context));\n\n    final Color effectiveBackgroundColor = backgroundColor ??\n        context.moonTheme?.avatarTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveBadgeColor = badgeColor ??\n        context.moonTheme?.avatarTheme.colors.badgeColor ??\n        MoonColors.light.roshi;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.avatarTheme.colors.textColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.avatarTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final double effectiveAvatarHeight =\n        height ?? effectiveMoonAvatarSize.avatarSizeValue;\n\n    final double effectiveAvatarWidth =\n        width ?? effectiveMoonAvatarSize.avatarSizeValue;\n\n    final double effectiveBadgeMarginValue =\n        badgeMarginValue ?? effectiveMoonAvatarSize.badgeMarginValue;\n\n    final double effectiveBadgeSize =\n        badgeSize ?? effectiveMoonAvatarSize.badgeSizeValue;\n\n    return Semantics(\n      label: semanticLabel,\n      button: false,\n      focusable: false,\n      image: backgroundImage != null,\n      child: SizedBox(\n        width: effectiveAvatarWidth,\n        height: effectiveAvatarHeight,\n        child: Stack(\n          children: [\n            Positioned.fill(\n              child: ClipPath(\n                // TODO: Since clipper does not work properly on mobile web/PWA,\n                //  we are disabling it. Remove this check when it has been\n                //  fixed from Flutter side.\n                clipper: kIsWeb &&\n                        MediaQueryData.fromView(View.of(context)).size.width <\n                            500\n                    ? null\n                    : AvatarClipper(\n                        showBadge: showBadge,\n                        width: effectiveAvatarWidth,\n                        height: effectiveAvatarHeight,\n                        borderRadius: resolvedBorderRadius,\n                        badgeSize: effectiveBadgeSize,\n                        badgeMarginValue: effectiveBadgeMarginValue,\n                        badgeAlignment: badgeAlignment,\n                        textDirection: Directionality.of(context),\n                      ),\n                child: DefaultTextStyle(\n                  style: effectiveMoonAvatarSize.textStyle\n                      .copyWith(color: effectiveTextColor),\n                  child: IconTheme(\n                    data: IconThemeData(\n                      color: effectiveIconColor,\n                    ),\n                    child: DecoratedBox(\n                      decoration: ShapeDecorationWithPremultipliedAlpha(\n                        color: effectiveBackgroundColor,\n                        image: backgroundImage != null\n                            ? DecorationImage(\n                                image: backgroundImage!,\n                                fit: BoxFit.cover,\n                              )\n                            : null,\n                        shape: MoonSquircleBorder(\n                          borderRadius: resolvedBorderRadius\n                              .squircleBorderRadius(context),\n                        ),\n                      ),\n                      child: Center(child: content),\n                    ),\n                  ),\n                ),\n              ),\n            ),\n            if (showBadge)\n              Align(\n                alignment: _avatarAlignmentMapper(context),\n                child: Container(\n                  height: effectiveBadgeSize,\n                  width: effectiveBadgeSize,\n                  decoration: BoxDecoration(\n                    color: effectiveBadgeColor,\n                    borderRadius: BorderRadius.circular(effectiveBadgeSize / 2),\n                  ),\n                ),\n              ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/avatar/avatar_clipper.dart",
    "content": "import 'package:flutter/rendering.dart';\n\nimport 'package:moon_design/src/utils/squircle/squircle_radius.dart';\nimport 'package:moon_design/src/widgets/avatar/avatar.dart';\n\nclass AvatarClipper extends CustomClipper<Path> {\n  final bool showBadge;\n  final BorderRadius borderRadius;\n  final double height;\n  final double width;\n  final double badgeMarginValue;\n  final double badgeSize;\n  final MoonBadgeAlignment badgeAlignment;\n  final TextDirection textDirection;\n\n  AvatarClipper({\n    required this.showBadge,\n    required this.borderRadius,\n    required this.height,\n    required this.width,\n    required this.badgeMarginValue,\n    required this.badgeSize,\n    required this.badgeAlignment,\n    required this.textDirection,\n  });\n\n  Path _getBadgePath() {\n    final double badgeRadius = badgeSize / 2;\n\n    if (textDirection == TextDirection.rtl) {\n      switch (badgeAlignment) {\n        case MoonBadgeAlignment.topLeft:\n          return Path()\n            ..addOval(\n              Rect.fromCircle(\n                center: Offset(width - badgeRadius, 0 + badgeRadius),\n                radius: badgeRadius + badgeMarginValue,\n              ),\n            );\n        case MoonBadgeAlignment.topRight:\n          return Path()\n            ..addOval(\n              Rect.fromCircle(\n                center: Offset(0 + badgeRadius, 0 + badgeRadius),\n                radius: badgeRadius + badgeMarginValue,\n              ),\n            );\n        case MoonBadgeAlignment.bottomLeft:\n          return Path()\n            ..addOval(\n              Rect.fromCircle(\n                center: Offset(width - badgeRadius, width - badgeRadius),\n                radius: badgeRadius + badgeMarginValue,\n              ),\n            );\n        case MoonBadgeAlignment.bottomRight:\n          return Path()\n            ..addOval(\n              Rect.fromCircle(\n                center: Offset(0 + badgeRadius, width - badgeRadius),\n                radius: badgeRadius + badgeMarginValue,\n              ),\n            );\n        default:\n          return Path()\n            ..addOval(\n              Rect.fromCircle(\n                center: Offset(width - badgeRadius, width - badgeRadius),\n                radius: badgeRadius + badgeMarginValue,\n              ),\n            );\n      }\n    } else {\n      switch (badgeAlignment) {\n        case MoonBadgeAlignment.topLeft:\n          return Path()\n            ..addOval(\n              Rect.fromCircle(\n                center: Offset(0 + badgeRadius, 0 + badgeRadius),\n                radius: badgeRadius + badgeMarginValue,\n              ),\n            );\n        case MoonBadgeAlignment.topRight:\n          return Path()\n            ..addOval(\n              Rect.fromCircle(\n                center: Offset(width - badgeRadius, 0 + badgeRadius),\n                radius: badgeRadius + badgeMarginValue,\n              ),\n            );\n        case MoonBadgeAlignment.bottomLeft:\n          return Path()\n            ..addOval(\n              Rect.fromCircle(\n                center: Offset(0 + badgeRadius, height - badgeRadius),\n                radius: badgeRadius + badgeMarginValue,\n              ),\n            );\n        case MoonBadgeAlignment.bottomRight:\n          return Path()\n            ..addOval(\n              Rect.fromCircle(\n                center: Offset(width - badgeRadius, height - badgeRadius),\n                radius: badgeRadius + badgeMarginValue,\n              ),\n            );\n        default:\n          return Path()\n            ..addOval(\n              Rect.fromCircle(\n                center: Offset(width - badgeRadius, width - badgeRadius),\n                radius: badgeRadius + badgeMarginValue,\n              ),\n            );\n      }\n    }\n  }\n\n  @override\n  Path getClip(Size size) {\n    final Path pathWithBadge = Path.combine(\n      PathOperation.difference,\n      // Avatar shape properties\n      Path()\n        ..addRRect(\n          RRect.fromLTRBAndCorners(\n            0,\n            0,\n            width,\n            height,\n            topLeft: MoonSquircleRadius(cornerRadius: borderRadius.topLeft.x),\n            topRight: MoonSquircleRadius(cornerRadius: borderRadius.topRight.x),\n            bottomLeft:\n                MoonSquircleRadius(cornerRadius: borderRadius.bottomLeft.x),\n            bottomRight:\n                MoonSquircleRadius(cornerRadius: borderRadius.bottomRight.x),\n          ),\n        ),\n\n      _getBadgePath(), // Badge shape properties.\n    );\n\n    final Path pathWithoutBadge = Path()\n      ..addRRect(\n        RRect.fromLTRBAndCorners(\n          0,\n          0,\n          width,\n          height,\n          topLeft: MoonSquircleRadius(cornerRadius: borderRadius.topLeft.x),\n          topRight: MoonSquircleRadius(cornerRadius: borderRadius.topRight.x),\n          bottomLeft:\n              MoonSquircleRadius(cornerRadius: borderRadius.bottomLeft.x),\n          bottomRight:\n              MoonSquircleRadius(cornerRadius: borderRadius.bottomRight.x),\n        ),\n      );\n\n    return showBadge ? pathWithBadge : pathWithoutBadge;\n  }\n\n  @override\n  bool shouldReclip(CustomClipper<Path> oldClipper) => true;\n}\n"
  },
  {
    "path": "lib/src/widgets/bottom_sheet/bottom_sheet.dart",
    "content": "import 'dart:async';\n\nimport 'package:flutter/gestures.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border_radius.dart';\nimport 'package:moon_design/src/widgets/bottom_sheet/modal_bottom_sheet.dart';\nimport 'package:moon_design/src/widgets/bottom_sheet/utils/bottom_sheet_custom_scroll_physics.dart';\nimport 'package:moon_design/src/widgets/bottom_sheet/utils/bottom_sheet_suspended_curve.dart';\nimport 'package:moon_design/src/widgets/bottom_sheet/utils/scroll_to_top_status_bar.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nconst double _minFlingVelocity = 500.0;\nconst double _closeProgressThreshold = 0.6;\n\ntypedef WidgetWithChildBuilder = Widget Function(\n  BuildContext context,\n  Animation<double> animation,\n  Widget child,\n);\n\n/// The Moon Design bottom sheet.\n///\n/// The MoonBottomSheet widget itself is rarely used directly.\n/// Instead, prefer to create a modal bottom sheet with\n/// [showMoonModalBottomSheet].\nclass MoonBottomSheet extends StatefulWidget {\n  /// Whether the bottom sheet can be dragged vertically and dismissed by\n  /// swiping downwards.\n  final bool enableDrag;\n\n  /// Whether the bottom sheet is expanded to its full available width or\n  /// resizes to fit its content.\n  final bool isExpanded;\n\n  /// The border radius of the bottom sheet.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the bottom sheet.\n  final Color? backgroundColor;\n\n  /// The custom decoration of the bottom sheet.\n  final Decoration? decoration;\n\n  /// The minimum velocity required for the bottom sheet to close when flung.\n  final double minFlingVelocity;\n\n  /// The threshold distance that the bottom sheet must be dragged to before it\n  /// triggers dismissal.\n  final double closeProgressThreshold;\n\n  /// The fixed height of the bottom sheet or null to adjust to the content\n  /// height.\n  final double? height;\n\n  /// The duration of the bottom sheet transition animation (slide in or out).\n  final Duration? transitionDuration;\n\n  /// The curve of the bottom sheet transition animation (slide in or out).\n  final Curve? transitionCurve;\n\n  /// The semantic label for the bottom sheet.\n  final String? semanticLabel;\n\n  /// The callback that is called when the bottom sheet begins the closing\n  /// process.\n  ///\n  /// The bottom sheet may not be fully closed (e.g., due to user interaction)\n  /// even after this callback is called. Therefore, this callback may be called\n  /// multiple times for the same bottom sheet.\n  final void Function() onClosing;\n\n  /// The callback that is called to determine whether the bottom sheet should\n  /// close based on user interaction.\n  ///\n  /// If [shouldClose] is null, it is ignored.\n  /// If the return value is true, the bottom sheet closes.\n  /// If the return value is false, the bottom sheet remains open.\n  ///\n  /// If [shouldClose] is not null, the bottom sheet will temporarily\n  /// return to its previous position until the function returns a value.\n  final Future<bool> Function()? shouldClose;\n\n  /// Controls the animation for the bottom sheet entrance and exit transitions.\n  ///\n  /// The bottom sheet will manipulate the position of this animation controller.\n  final AnimationController animationController;\n\n  /// The scroll controller used to navigate the content within the bottom sheet.\n  final ScrollController scrollController;\n\n  /// The widget to display inside the bottom sheet as its content.\n  final Widget child;\n\n  /// Creates a Moon Design modal bottom sheet.\n  const MoonBottomSheet({\n    super.key,\n    this.enableDrag = true,\n    this.isExpanded = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.decoration,\n    double? closeProgressThreshold,\n    this.height,\n    this.minFlingVelocity = _minFlingVelocity,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.semanticLabel,\n    required this.onClosing,\n    this.shouldClose,\n    required this.animationController,\n    required this.scrollController,\n    required this.child,\n  }) : closeProgressThreshold =\n            closeProgressThreshold ?? _closeProgressThreshold;\n\n  @override\n  MoonBottomSheetState createState() => MoonBottomSheetState();\n\n  /// Creates an [AnimationController] specifically designed for a\n  /// [MoonBottomSheet.animationController].\n  ///\n  /// This API serves as a convenient mechanism to create a Material compliant\n  /// bottom sheet animation. If custom animation durations are required, a\n  /// different animation controller should be utilized.\n  static AnimationController createAnimationController(\n    TickerProvider vsync,\n    Duration duration,\n  ) {\n    return AnimationController(\n      duration: duration,\n      debugLabel: 'MoonBottomSheet',\n      vsync: vsync,\n    );\n  }\n}\n\nclass MoonBottomSheetState extends State<MoonBottomSheet>\n    with TickerProviderStateMixin {\n  final GlobalKey _childKey = GlobalKey(debugLabel: 'BottomSheet child');\n\n  // Used in NotificationListener to identify distinct ScrollNotification events\n  // before and after the dragging gesture.\n  bool _isDragging = false;\n\n  bool _verifyingShouldClose = false;\n\n  Curve? _defaultCurve;\n\n  ParametricCurve<double>? transitionCurve;\n\n  DateTime? _startTime;\n\n  // The DragGesture detector of the scroll view cannot be directly accessed,\n  // therefore a VelocityTracker is used to determine the scroll end velocity\n  // when attempting to dismiss the modal via dragging.\n  VelocityTracker? _velocityTracker;\n\n  bool get needsVerifyShouldClose => widget.shouldClose != null;\n\n  bool get _dismissUnderway =>\n      widget.animationController.status == AnimationStatus.reverse;\n\n  bool get _hasReachedCloseThreshold =>\n      widget.animationController.value < widget.closeProgressThreshold;\n\n  double? get _childHeight =>\n      (_childKey.currentContext?.findRenderObject() as RenderBox?)?.size.height;\n\n  ScrollController get _scrollController => widget.scrollController;\n\n  void _close() {\n    _isDragging = false;\n    widget.onClosing();\n  }\n\n  void _cancelClose() {\n    widget.animationController.forward().then((value) {\n      if (!widget.animationController.isCompleted) {\n        widget.animationController.value = 1;\n      }\n    });\n  }\n\n  FutureOr<bool> shouldClose() async {\n    if (_verifyingShouldClose) return false;\n    _verifyingShouldClose = true;\n\n    final bool? result = await widget.shouldClose?.call();\n    _verifyingShouldClose = false;\n\n    return result ?? false;\n  }\n\n  Future<void> _handleDragUpdate(double primaryDelta) async {\n    assert(widget.enableDrag, 'Dragging is disabled');\n\n    transitionCurve = Curves.linear;\n\n    if (_dismissUnderway) return;\n    _isDragging = true;\n\n    final double progress = primaryDelta / (_childHeight ?? primaryDelta);\n\n    if (widget.shouldClose != null) {\n      _cancelClose();\n\n      final bool canClose = await shouldClose();\n\n      if (canClose) {\n        _close();\n        return;\n      } else {\n        _cancelClose();\n      }\n    }\n\n    widget.animationController.value -= progress;\n  }\n\n  Future<void> _handleDragEnd(double velocity) async {\n    assert(widget.enableDrag, 'Dragging is disabled');\n\n    if (_dismissUnderway || !_isDragging) return;\n\n    transitionCurve = BottomSheetSuspendedCurve(\n      widget.animationController.value,\n      curve: _defaultCurve!,\n    );\n\n    _isDragging = false;\n\n    Future<void> tryClose() async {\n      if (widget.shouldClose != null) {\n        _cancelClose();\n\n        final bool canClose = await shouldClose();\n\n        if (canClose) _close();\n      } else {\n        _close();\n      }\n    }\n\n    if (velocity > widget.minFlingVelocity) {\n      tryClose();\n    } else if (_hasReachedCloseThreshold) {\n      if (widget.animationController.value > 0.0) {\n        widget.animationController.fling(velocity: -1.0);\n      }\n      tryClose();\n    } else {\n      _cancelClose();\n    }\n  }\n\n  void _handleScrollUpdate(ScrollNotification notification) {\n    assert(notification.context != null);\n\n    if (!_scrollController.hasClients) return;\n\n    ScrollPosition scrollPosition;\n\n    if (_scrollController.positions.length > 1) {\n      scrollPosition = _scrollController.positions.firstWhere(\n        (p) => p.isScrollingNotifier.value,\n        orElse: () => _scrollController.positions.first,\n      );\n    } else {\n      scrollPosition = _scrollController.position;\n    }\n\n    if (scrollPosition.axis == Axis.horizontal) return;\n\n    final bool isScrollReversed =\n        scrollPosition.axisDirection == AxisDirection.down;\n    final double offset = isScrollReversed\n        ? scrollPosition.pixels\n        : scrollPosition.maxScrollExtent - scrollPosition.pixels;\n\n    if (offset <= 0) {\n      // ClampingScrollPhysics terminates with a ScrollEndNotification that\n      // encompasses a DragEndDetails class, while BouncingScrollPhysics and\n      // other physics that permit overflow do not provide drag end information.\n\n      // We utilize the velocity from DragEndDetails if it is accessible.\n      if (notification is ScrollEndNotification) {\n        final DragEndDetails? dragDetails = notification.dragDetails;\n\n        if (dragDetails != null) {\n          _handleDragEnd(dragDetails.primaryVelocity ?? 0);\n          _velocityTracker = null;\n          _startTime = null;\n\n          return;\n        }\n      }\n\n      // Otherwise, the velocity is calculated using a VelocityTracker.\n      if (_velocityTracker == null) {\n        final PointerDeviceKind pointerKind =\n            _defaultPointerDeviceKind(context);\n\n        _velocityTracker = VelocityTracker.withKind(pointerKind);\n        _startTime = DateTime.now();\n      }\n\n      DragUpdateDetails? dragDetails;\n\n      if (notification is ScrollUpdateNotification) {\n        dragDetails = notification.dragDetails;\n      }\n\n      if (notification is OverscrollNotification) {\n        dragDetails = notification.dragDetails;\n      }\n\n      if (notification is UserScrollNotification) return;\n\n      assert(_velocityTracker != null);\n      assert(_startTime != null);\n\n      final startTime = _startTime!;\n      final velocityTracker = _velocityTracker!;\n\n      if (dragDetails != null) {\n        final Duration duration = startTime.difference(DateTime.now());\n\n        velocityTracker.addPosition(duration, Offset(0, offset));\n\n        _handleDragUpdate(dragDetails.delta.dy);\n\n        return;\n      } else if (_isDragging) {\n        final double velocity =\n            velocityTracker.getVelocity().pixelsPerSecond.dy;\n\n        _velocityTracker = null;\n        _startTime = null;\n\n        _handleDragEnd(velocity);\n      }\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final BorderRadiusGeometry effectiveBorderRadius = widget.borderRadius ??\n        context.moonTheme?.bottomSheetTheme.properties.borderRadius ??\n        MoonBorders.borders.surfaceSm;\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.bottomSheetTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.bottomSheetTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.bottomSheetTheme.colors.textColor ??\n            MoonColors.light.textPrimary;\n\n    final TextStyle effectiveTextStyle =\n        context.moonTheme?.bottomSheetTheme.properties.textStyle ??\n            MoonTypography.typography.body.textDefault;\n\n    _defaultCurve ??= widget.transitionCurve ??\n        context.moonTheme?.bottomSheetTheme.properties.transitionCurve ??\n        const Cubic(0.0, 0.0, 0.2, 1.0);\n\n    transitionCurve ??= _defaultCurve;\n\n    return ScrollToTopStatusBarHandler(\n      scrollController: _scrollController,\n      child: AnimatedBuilder(\n        animation: widget.animationController,\n        builder: (BuildContext context, Widget? child) {\n          assert(child != null);\n\n          final double animationValue =\n              transitionCurve!.transform(widget.animationController.value);\n\n          final draggableChild = widget.enableDrag\n              ? KeyedSubtree(\n                  key: _childKey,\n                  child: GestureDetector(\n                    onVerticalDragUpdate: (DragUpdateDetails details) =>\n                        _handleDragUpdate(details.delta.dy),\n                    onVerticalDragEnd: (DragEndDetails details) =>\n                        _handleDragEnd(details.primaryVelocity ?? 0),\n                    child: NotificationListener<ScrollNotification>(\n                      onNotification: (ScrollNotification notification) {\n                        _handleScrollUpdate(notification);\n\n                        return false;\n                      },\n                      child: child!,\n                    ),\n                  ),\n                )\n              : child;\n\n          return ClipRect(\n            child: CustomSingleChildLayout(\n              delegate: _ModalBottomSheetLayout(\n                progress: animationValue,\n                isExpanded: widget.isExpanded,\n              ),\n              child: draggableChild,\n            ),\n          );\n        },\n        child: ScrollConfiguration(\n          behavior: const ScrollBehavior().copyWith(\n            overscroll: false,\n            scrollbars: false,\n            physics: CustomModalScrollPhysics(\n              controller: widget.animationController,\n              parent: const BouncingScrollPhysics(),\n            ),\n            dragDevices: {\n              PointerDeviceKind.touch,\n              PointerDeviceKind.mouse,\n            },\n          ),\n          child: RepaintBoundary(\n            child: Semantics(\n              label: widget.semanticLabel,\n              child: IconTheme(\n                data: IconThemeData(color: effectiveIconColor),\n                child: DefaultTextStyle(\n                  style: effectiveTextStyle.copyWith(color: effectiveTextColor),\n                  child: Container(\n                    height: widget.height,\n                    decoration: widget.decoration ??\n                        ShapeDecorationWithPremultipliedAlpha(\n                          color: effectiveBackgroundColor,\n                          shape: MoonSquircleBorder(\n                            borderRadius: MoonSquircleBorderRadius.only(\n                              topLeft: effectiveBorderRadius\n                                  .squircleBorderRadius(context)\n                                  .topLeft,\n                              topRight: effectiveBorderRadius\n                                  .squircleBorderRadius(context)\n                                  .topRight,\n                            ),\n                          ),\n                        ),\n                    child: widget.child,\n                  ),\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _ModalBottomSheetLayout extends SingleChildLayoutDelegate {\n  final bool isExpanded;\n  final double progress;\n\n  _ModalBottomSheetLayout({required this.isExpanded, required this.progress});\n\n  @override\n  BoxConstraints getConstraintsForChild(BoxConstraints constraints) {\n    return BoxConstraints(\n      minWidth: constraints.maxWidth,\n      maxWidth: constraints.maxWidth,\n      minHeight: isExpanded ? constraints.maxHeight : 0,\n      maxHeight: isExpanded ? constraints.maxHeight : constraints.minHeight,\n    );\n  }\n\n  @override\n  Offset getPositionForChild(Size size, Size childSize) {\n    return Offset(0.0, size.height - childSize.height * progress);\n  }\n\n  @override\n  bool shouldRelayout(_ModalBottomSheetLayout oldDelegate) {\n    return progress != oldDelegate.progress;\n  }\n}\n\n// Determines the input type of the device's operating system.\n// Mobile platforms default to 'touch' input and desktop to 'mouse' input.\n// Used with VelocityTracker.\n// https://github.com/flutter/flutter/pull/64267#issuecomment-694196304\nPointerDeviceKind _defaultPointerDeviceKind(BuildContext context) {\n  final TargetPlatform platform = Theme.of(context).platform;\n\n  switch (platform) {\n    case TargetPlatform.iOS:\n    case TargetPlatform.android:\n      return PointerDeviceKind.touch;\n    case TargetPlatform.linux:\n    case TargetPlatform.macOS:\n    case TargetPlatform.windows:\n      return PointerDeviceKind.mouse;\n    case TargetPlatform.fuchsia:\n      return PointerDeviceKind.unknown;\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/bottom_sheet/modal_bottom_sheet.dart",
    "content": "import 'dart:async';\n\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/widgets/bottom_sheet/bottom_sheet.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\n/// Displays a Moon Design modal bottom sheet.\nFuture<T?> showMoonModalBottomSheet<T>({\n  required BuildContext context,\n  bool enableDrag = true,\n  bool isExpanded = false,\n  bool isDismissible = true,\n  bool useRootNavigator = false,\n  BorderRadiusGeometry? borderRadius,\n  Color? backgroundColor,\n  Color? barrierColor,\n  Decoration? decoration,\n  double? closeProgressThreshold,\n  double? height,\n  Duration? transitionDuration,\n  Curve? transitionCurve,\n  RouteSettings? settings,\n  String? semanticLabel,\n  AnimationController? animationController,\n  required WidgetBuilder builder,\n}) async {\n  assert(debugCheckHasMediaQuery(context));\n  assert(debugCheckHasMaterialLocalizations(context));\n\n  final bool hasMaterialLocalizations =\n      Localizations.of<MaterialLocalizations>(context, MaterialLocalizations) !=\n          null;\n\n  final String barrierLabel = hasMaterialLocalizations\n      ? MaterialLocalizations.of(context).modalBarrierDismissLabel\n      : '';\n\n  final CapturedThemes themes = InheritedTheme.capture(\n    from: context,\n    to: Navigator.of(context, rootNavigator: useRootNavigator).context,\n  );\n\n  final Color effectiveBarrierColor = barrierColor ??\n      context.moonTheme?.bottomSheetTheme.colors.barrierColor ??\n      MoonColors.light.zeno;\n\n  final Duration effectiveTransitionDuration = transitionDuration ??\n      context.moonTheme?.bottomSheetTheme.properties.transitionDuration ??\n      const Duration(milliseconds: 350);\n\n  final Curve effectiveTransitionCurve = transitionCurve ??\n      context.moonTheme?.bottomSheetTheme.properties.transitionCurve ??\n      const Cubic(0.0, 0.0, 0.2, 1.0);\n\n  final T? result =\n      await Navigator.of(context, rootNavigator: useRootNavigator).push(\n    MoonModalBottomSheetRoute<T>(\n      enableDrag: enableDrag,\n      isExpanded: isExpanded,\n      isDismissible: isDismissible,\n      borderRadius: borderRadius,\n      themes: themes,\n      backgroundColor: backgroundColor,\n      modalBarrierColor: effectiveBarrierColor,\n      decoration: decoration,\n      closeProgressThreshold: closeProgressThreshold,\n      height: height,\n      animationDuration: effectiveTransitionDuration,\n      animationCurve: effectiveTransitionCurve,\n      settings: settings,\n      semanticLabel: semanticLabel,\n      barrierLabel: barrierLabel,\n      animationController: animationController,\n      builder: builder,\n    ),\n  );\n\n  return result;\n}\n\nclass MoonModalBottomSheetRoute<T> extends PageRoute<T> {\n  final bool enableDrag;\n  final bool isExpanded;\n  final bool isDismissible;\n  final BorderRadiusGeometry? borderRadius;\n  final CapturedThemes? themes;\n  final Color? backgroundColor;\n  final Color modalBarrierColor;\n  final Decoration? decoration;\n  final double? closeProgressThreshold;\n  final double? height;\n  final Duration animationDuration;\n  final Curve animationCurve;\n  final String? semanticLabel;\n  final AnimationController? animationController;\n  final ScrollController? scrollController;\n  final WidgetBuilder builder;\n\n  MoonModalBottomSheetRoute({\n    super.settings,\n    this.enableDrag = true,\n    this.isExpanded = false,\n    this.isDismissible = true,\n    this.borderRadius,\n    this.themes,\n    this.backgroundColor,\n    required this.modalBarrierColor,\n    this.decoration,\n    this.closeProgressThreshold,\n    this.height,\n    required this.animationDuration,\n    required this.animationCurve,\n    this.barrierLabel,\n    this.semanticLabel,\n    this.animationController,\n    this.scrollController,\n    required this.builder,\n  });\n\n  AnimationController? _animationController;\n\n  // RoutePopDisposition.pop breaks the bottom sheet drag to close functionality\n  // and eventually causes a crash.\n  bool get _hasScopedWillPopCallback =>\n      popDisposition == RoutePopDisposition.bubble;\n\n  @override\n  bool get maintainState => true;\n\n  @override\n  bool get opaque => false;\n\n  @override\n  bool get barrierDismissible => isDismissible;\n\n  @override\n  Color get barrierColor => modalBarrierColor;\n\n  @override\n  Duration get transitionDuration => animationDuration;\n\n  @override\n  final String? barrierLabel;\n\n  @override\n  AnimationController createAnimationController() {\n    assert(_animationController == null);\n\n    _animationController = MoonBottomSheet.createAnimationController(\n      navigator!.overlay!,\n      transitionDuration,\n    );\n\n    return _animationController!;\n  }\n\n  @override\n  bool canTransitionTo(TransitionRoute<dynamic> nextRoute) =>\n      nextRoute is MoonModalBottomSheetRoute;\n\n  @override\n  bool canTransitionFrom(TransitionRoute<dynamic> previousRoute) =>\n      previousRoute is MoonModalBottomSheetRoute || previousRoute is PageRoute;\n\n  @override\n  Widget buildPage(\n    BuildContext context,\n    Animation<double> animation,\n    Animation<double> secondaryAnimation,\n  ) {\n    // By design, the bottom sheet is positioned at the bottom of the viewport\n    // and is not affected by the top padding of the MediaQuery.\n    final Widget bottomSheet = MediaQuery.removePadding(\n      context: context,\n      child: _ModalBottomSheet<T>(\n        enableDrag: enableDrag,\n        isExpanded: isExpanded,\n        borderRadius: borderRadius,\n        backgroundColor: backgroundColor,\n        decoration: decoration,\n        closeProgressThreshold: closeProgressThreshold,\n        height: height,\n        transitionDuration: animationDuration,\n        transitionCurve: animationCurve,\n        semanticLabel: semanticLabel,\n        animationController: animationController,\n        route: this,\n      ),\n    );\n\n    return themes?.wrap(bottomSheet) ?? bottomSheet;\n  }\n}\n\nclass _ModalBottomSheet<T> extends StatefulWidget {\n  final bool enableDrag;\n  final bool isExpanded;\n  final BorderRadiusGeometry? borderRadius;\n  final Color? backgroundColor;\n  final Decoration? decoration;\n  final double? closeProgressThreshold;\n  final double? height;\n  final Duration? transitionDuration;\n  final Curve? transitionCurve;\n  final String? semanticLabel;\n  final AnimationController? animationController;\n  final MoonModalBottomSheetRoute<T> route;\n\n  const _ModalBottomSheet({\n    super.key,\n    this.enableDrag = true,\n    this.isExpanded = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.decoration,\n    this.closeProgressThreshold,\n    this.height,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.semanticLabel,\n    this.animationController,\n    required this.route,\n  });\n\n  @override\n  _ModalBottomSheetState<T> createState() => _ModalBottomSheetState<T>();\n}\n\nclass _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> {\n  ScrollController? _scrollController;\n\n  String _getRouteLabel() {\n    final TargetPlatform platform = Theme.of(context).platform;\n\n    switch (platform) {\n      case TargetPlatform.iOS:\n      case TargetPlatform.linux:\n      case TargetPlatform.macOS:\n      case TargetPlatform.windows:\n        return '';\n      case TargetPlatform.android:\n      case TargetPlatform.fuchsia:\n        if (Localizations.of<MaterialLocalizations>(\n              context,\n              MaterialLocalizations,\n            ) !=\n            null) {\n          return MaterialLocalizations.of(context).dialogLabel;\n        } else {\n          return const DefaultMaterialLocalizations().dialogLabel;\n        }\n    }\n  }\n\n  Future<bool> _handleShouldClose() async {\n    final RoutePopDisposition willPop = widget.route.popDisposition;\n\n    return willPop != RoutePopDisposition.doNotPop;\n  }\n\n  void _updateController() {\n    final Animation<double>? animation = widget.route.animation;\n\n    // Used to relay the state of the bottom sheet internal animation\n    // controller.\n    if (animation != null) {\n      widget.animationController?.value = animation.value;\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    widget.route.animation?.addListener(_updateController);\n  }\n\n  @override\n  void dispose() {\n    widget.route.animation?.removeListener(_updateController);\n    widget.animationController?.dispose();\n    _scrollController?.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    assert(debugCheckHasMediaQuery(context));\n    assert(widget.route._animationController != null);\n\n    final ScrollController scrollController =\n        PrimaryScrollController.maybeOf(context) ??\n            (_scrollController ??= ScrollController());\n\n    return PrimaryScrollController(\n      controller: scrollController,\n      child: Builder(\n        builder: (BuildContext context) => AnimatedBuilder(\n          animation: widget.route._animationController!,\n          builder: (BuildContext context, Widget? child) {\n            assert(child != null);\n\n            return Semantics(\n              explicitChildNodes: true,\n              label: _getRouteLabel(),\n              namesRoute: true,\n              scopesRoute: true,\n              child: MoonBottomSheet(\n                enableDrag: widget.enableDrag,\n                isExpanded: widget.route.isExpanded,\n                borderRadius: widget.borderRadius,\n                backgroundColor: widget.backgroundColor,\n                decoration: widget.decoration,\n                closeProgressThreshold: widget.closeProgressThreshold,\n                height: widget.height,\n                transitionDuration: widget.transitionDuration,\n                transitionCurve: widget.transitionCurve,\n                semanticLabel: widget.semanticLabel,\n                onClosing: () =>\n                    {if (widget.route.isCurrent) Navigator.of(context).pop()},\n                shouldClose: widget.route._hasScopedWillPopCallback\n                    ? () => _handleShouldClose()\n                    : null,\n                animationController: widget.route._animationController!,\n                scrollController: scrollController,\n                child: child!,\n              ),\n            );\n          },\n          child: widget.route.builder(context),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/bottom_sheet/utils/bottom_sheet_custom_scroll_physics.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nclass CustomModalScrollPhysics extends ScrollPhysics {\n  final AnimationController controller;\n\n  /// Creates scroll physics that restrict the scroll offset from reaching the\n  /// modal's upper boundary. Permits users to drag the bottom sheet up and down\n  /// when the content is scrollable.\n  const CustomModalScrollPhysics({super.parent, required this.controller});\n\n  @override\n  CustomModalScrollPhysics applyTo(ScrollPhysics? ancestor) {\n    return CustomModalScrollPhysics(\n      parent: buildParent(ancestor),\n      controller: controller,\n    );\n  }\n\n  @override\n  double applyBoundaryConditions(ScrollMetrics position, double value) {\n    assert(() {\n      if (value == position.pixels) {\n        throw FlutterError.fromParts(<DiagnosticsNode>[\n          ErrorSummary(\n            '$runtimeType.applyBoundaryConditions() was called redundantly.',\n          ),\n          ErrorDescription(\n            'The proposed new position, $value, is exactly equal to the current '\n            'position of the given ${position.runtimeType}, ${position.pixels}.'\n            '\\n The applyBoundaryConditions method should only be called when '\n            'the value is going to actually change the pixels, otherwise it is '\n            'redundant.',\n          ),\n          DiagnosticsProperty<ScrollPhysics>(\n            'The physics object in question was',\n            this,\n            style: DiagnosticsTreeStyle.errorProperty,\n          ),\n          DiagnosticsProperty<ScrollMetrics>(\n            'The position object in question was',\n            position,\n            style: DiagnosticsTreeStyle.errorProperty,\n          ),\n        ]);\n      }\n      return true;\n    }());\n\n    if (value < position.pixels &&\n        position.pixels <= position.minScrollExtent) {\n      // Under scroll while dragging down.\n      return value - position.pixels;\n    }\n    if (position.maxScrollExtent <= position.pixels &&\n        position.pixels < value) {\n      // Over scroll.\n      return value - position.pixels;\n    }\n    if (value < position.minScrollExtent &&\n        position.minScrollExtent < position.pixels) {\n      // Hit top edge.\n      return value - position.minScrollExtent;\n    }\n    if (position.pixels < position.maxScrollExtent &&\n        position.maxScrollExtent < value) {\n      // Hit bottom edge.\n      return value - position.maxScrollExtent;\n    }\n    if (value > position.pixels &&\n        position.pixels == 0 &&\n        controller.value < 1) {\n      // Under scroll while dragging up.\n      return value - position.pixels;\n    }\n\n    return 0.0;\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/bottom_sheet/utils/bottom_sheet_suspended_curve.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/animation.dart';\nimport 'package:flutter/foundation.dart';\n\n// Copied from bottom_sheet.dart as is a private class\n// https://github.com/flutter/flutter/issues/51627\n\n// TODO(guidezpl): Look into making this public. A copy of this class is in\n//  scaffold.dart, for now, https://github.com/flutter/flutter/issues/51627\n\n/// A curve that progresses linearly until a specified [startingPoint], at which\n/// point [curve] will begin. Unlike [Interval], [curve] will not start at zero,\n/// but will use [startingPoint] as the Y position.\n///\n/// For example, if [startingPoint] is set to `0.5`, and [curve] is set to\n/// [Curves.easeOut], then the bottom-left quarter of the curve will be a\n/// straight line, and the top-right quarter will contain the entire contents of\n/// [Curves.easeOut].\n///\n/// This is useful in situations where a widget must track the user's finger\n/// (which requires a linear animation), and afterwards can be flung using a\n/// curve specified with the [curve] argument, after the finger is released. In\n/// such a case, the value of [startingPoint] would be the progress of the\n/// animation at the time when the finger was released.\n///\n/// The [startingPoint] and [curve] arguments must not be null.\nclass BottomSheetSuspendedCurve extends Curve {\n  /// Creates a suspended curve.\n  const BottomSheetSuspendedCurve(\n    this.startingPoint, {\n    this.curve = Curves.easeOutCubic,\n  });\n\n  /// The progress value at which the transition should begin using the\n  /// specified [curve].\n  final double startingPoint;\n\n  /// The curve to be applied when the specified [startingPoint] is reached.\n  ///\n  /// Defaults to [Curves.easeOutCubic].\n  final Curve curve;\n\n  @override\n  double transform(double t) {\n    assert(t >= 0.0 && t <= 1.0);\n    assert(startingPoint >= 0.0 && startingPoint <= 1.0);\n\n    if (t < startingPoint) {\n      return t;\n    }\n\n    if (t == 1.0) {\n      return t;\n    }\n\n    final curveProgress = (t - startingPoint) / (1 - startingPoint);\n    final transformed = curve.transform(curveProgress);\n    return lerpDouble(startingPoint, 1, transformed)!;\n  }\n\n  @override\n  String toString() {\n    return '${describeIdentity(this)}($startingPoint, $curve)';\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/bottom_sheet/utils/scroll_to_top_status_bar.dart",
    "content": "import 'package:flutter/widgets.dart';\n\n/// The widget that enables the associated ScrollController to scroll to the top\n/// when the status bar is tapped.\n///\n/// Extracted from Scaffold and utilized in modal bottom sheets.\nclass ScrollToTopStatusBarHandler extends StatefulWidget {\n  final ScrollController scrollController;\n  final Widget child;\n\n  const ScrollToTopStatusBarHandler({\n    super.key,\n    required this.scrollController,\n    required this.child,\n  });\n\n  @override\n  ScrollToTopStatusBarState createState() => ScrollToTopStatusBarState();\n}\n\nclass ScrollToTopStatusBarState extends State<ScrollToTopStatusBarHandler> {\n  void _handleStatusBarTap(BuildContext context) {\n    final ScrollController controller = widget.scrollController;\n\n    if (controller.hasClients) {\n      controller.animateTo(\n        0.0,\n        duration: const Duration(milliseconds: 300),\n        curve: Curves.linear,\n      );\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Stack(\n      fit: StackFit.expand,\n      children: [\n        widget.child,\n        Positioned(\n          top: 0,\n          left: 0,\n          right: 0,\n          height: MediaQuery.of(context).padding.top,\n          child: Builder(\n            builder: (BuildContext context) => GestureDetector(\n              behavior: HitTestBehavior.opaque,\n              onTap: () => _handleStatusBarTap(context),\n              // iOS accessibility features automatically enable a scroll-to-top\n              // gesture for the clock in the status bar.\n              excludeFromSemantics: true,\n            ),\n          ),\n        ),\n      ],\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/breadcrumb/breadcrumb.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:moon_design/src/theme/breadcrumb/breadcrumb_theme.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/text_styles.dart';\nimport 'package:moon_design/src/utils/color_tween_premul.dart';\nimport 'package:moon_design/src/widgets/breadcrumb/breadcrumb_item.dart';\nimport 'package:moon_design/src/widgets/common/base_control.dart';\nimport 'package:moon_icons/moon_icons.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonBreadcrumb extends StatefulWidget {\n  /// The color of the breadcrumb divider.\n  final Color? dividerColor;\n\n  /// The icon and text color of the breadcrumb item on hover.\n  final Color? hoverEffectColor;\n\n  /// The custom decoration of the breadcrumb item.\n  final BoxDecoration? itemDecoration;\n\n  /// The gap between the [divider] widget and the breadcrumb item.\n  final double? gap;\n\n  /// The padding of the breadcrumb.\n  final EdgeInsetsGeometry? padding;\n\n  /// The total number of the breadcrumb [items] to display.\n  final int visibleItemCount;\n\n  /// The semantic label for the breadcrumb default [showMoreWidget].\n  final String? semanticLabel;\n\n  /// The text style of the breadcrumb item.\n  final TextStyle? itemTextStyle;\n\n  /// The text style of the current breadcrumb item.\n  final TextStyle? currentItemTextStyle;\n\n  /// The list of breadcrumb items to display as a sequence of steps.\n  final List<MoonBreadcrumbItem> items;\n\n  /// The separating widget to display between the breadcrumb items.\n  final Widget? divider;\n\n  /// The single custom widget to replace all the breadcrumb collapsed items\n  /// with.\n  final MoonBreadcrumbItem? showMoreWidget;\n\n  /// Creates a Moon Design breadcrumb.\n  const MoonBreadcrumb({\n    super.key,\n    this.dividerColor,\n    this.hoverEffectColor,\n    this.itemDecoration,\n    this.gap,\n    this.padding,\n    this.visibleItemCount = 3,\n    this.semanticLabel,\n    this.itemTextStyle,\n    this.currentItemTextStyle,\n    required this.items,\n    this.divider,\n    this.showMoreWidget,\n  });\n\n  @override\n  State<MoonBreadcrumb> createState() => _MoonBreadcrumbState();\n}\n\nclass _MoonBreadcrumbState extends State<MoonBreadcrumb> {\n  bool _showFullPath = false;\n\n  List<Widget> _buildItems() {\n    final MoonBreadcrumbTheme? theme = context.moonTheme?.breadcrumbTheme;\n\n    final double effectiveGap =\n        widget.gap ?? theme?.properties.gap ?? MoonSizes.sizes.x4s;\n\n    final Color effectiveItemTextColor = widget.itemTextStyle?.color ??\n        theme?.colors.itemColor ??\n        MoonColors.light.textSecondary;\n\n    final Color effectiveCurrentItemTextColor =\n        widget.currentItemTextStyle?.color ??\n            theme?.colors.currentItemColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveHoverEffectColor = widget.hoverEffectColor ??\n        theme?.colors.hoverEffectColor ??\n        MoonColors.light.textPrimary;\n\n    final TextStyle effectiveItemTextStyle = widget.itemTextStyle ??\n        theme?.properties.itemTextStyle ??\n        MoonTextStyles.body.textDefault;\n\n    final TextStyle effectiveCurrentItemTextStyle =\n        widget.currentItemTextStyle ??\n            theme?.properties.currentItemTextStyle ??\n            MoonTextStyles.body.textDefault;\n\n    final TextStyle effectiveShowMoreItemTextStyle =\n        theme?.properties.showMoreItemTextStyle ??\n            MoonTextStyles.body.textDefault;\n\n    final Duration effectiveTransitionDuration =\n        theme?.properties.transitionDuration ??\n            MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = theme?.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    final int resolvedItemCountToShow =\n        _showFullPath ? widget.items.length : widget.visibleItemCount;\n\n    final List<MoonBreadcrumbItem> visibleItemsList = _getVisibleItems();\n\n    final List<Widget> customizedVisibleItemsList = visibleItemsList.map(\n      (MoonBreadcrumbItem item) {\n        return Row(\n          children: [\n            if (item != visibleItemsList.first) SizedBox(width: effectiveGap),\n            _BreadcrumbItemBuilder(\n              isCurrent: item == visibleItemsList.last,\n              itemColor: effectiveItemTextColor,\n              currentItemColor: effectiveCurrentItemTextColor,\n              hoverEffectColor: effectiveHoverEffectColor,\n              decoration: widget.itemDecoration,\n              itemTextStyle: effectiveItemTextStyle,\n              currentItemTextStyle: effectiveCurrentItemTextStyle,\n              transitionDuration: effectiveTransitionDuration,\n              transitionCurve: effectiveTransitionCurve,\n              onTap: item.onTap,\n              item: item,\n            ),\n            if (item != visibleItemsList.last) ...[\n              SizedBox(width: effectiveGap),\n              _buildDivider(),\n            ],\n          ],\n        );\n      },\n    ).toList();\n\n    if (widget.items.length > resolvedItemCountToShow &&\n        resolvedItemCountToShow > 1) {\n      customizedVisibleItemsList.insert(\n        1,\n        Row(\n          children: [\n            Padding(\n              padding: EdgeInsets.symmetric(horizontal: effectiveGap),\n              child: _BreadcrumbItemBuilder(\n                isCurrent: false,\n                itemColor: effectiveItemTextColor,\n                currentItemColor: effectiveCurrentItemTextColor,\n                hoverEffectColor: effectiveHoverEffectColor,\n                decoration: widget.itemDecoration,\n                itemTextStyle: effectiveItemTextStyle,\n                currentItemTextStyle: effectiveCurrentItemTextStyle,\n                transitionDuration: effectiveTransitionDuration,\n                transitionCurve: effectiveTransitionCurve,\n                onTap: widget.showMoreWidget?.onTap ??\n                    () => setState(() => _showFullPath = true),\n                item: widget.showMoreWidget ??\n                    MoonBreadcrumbItem(\n                      semanticLabel: widget.semanticLabel,\n                      label: SizedBox(\n                        width: 24,\n                        child: Text(\n                          '...',\n                          textAlign: TextAlign.center,\n                          style: effectiveShowMoreItemTextStyle,\n                        ),\n                      ),\n                    ),\n              ),\n            ),\n            _buildDivider(),\n          ],\n        ),\n      );\n    }\n\n    // Restores the breadcrumb's initial collapsed state during every rebuild.\n    _showFullPath = false;\n\n    return customizedVisibleItemsList;\n  }\n\n  List<MoonBreadcrumbItem> _getVisibleItems() {\n    final int resolvedItemCountToShow =\n        _showFullPath ? widget.items.length : widget.visibleItemCount;\n\n    final List<MoonBreadcrumbItem> visibleItems = resolvedItemCountToShow == 0\n        ? []\n        : widget.items.length > resolvedItemCountToShow\n            ? [\n                widget.items[0],\n                ...List.generate(\n                  resolvedItemCountToShow - 1,\n                  (index) => widget.items.length - index,\n                ).reversed.map((int index) => widget.items[index - 1]),\n              ]\n            : widget.items;\n\n    return visibleItems;\n  }\n\n  Widget _buildDivider() {\n    final Color effectiveDividerColor = widget.dividerColor ??\n        widget.itemTextStyle?.color ??\n        context.moonTheme?.breadcrumbTheme.colors.itemColor ??\n        MoonColors.light.iconSecondary;\n\n    return IconTheme(\n      data: IconThemeData(color: effectiveDividerColor),\n      child: widget.divider ??\n          Icon(\n            Directionality.of(context) == TextDirection.ltr\n                ? MoonIcons.arrows_right_24_light\n                : MoonIcons.arrows_left_24_light,\n            size: 24,\n          ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return SingleChildScrollView(\n      padding: widget.padding,\n      scrollDirection: Axis.horizontal,\n      child: Row(\n        mainAxisSize: MainAxisSize.min,\n        children: _buildItems(),\n      ),\n    );\n  }\n}\n\nclass _BreadcrumbItemBuilder extends StatefulWidget {\n  final bool isCurrent;\n  final Color itemColor;\n  final Color currentItemColor;\n  final Color hoverEffectColor;\n  final BoxDecoration? decoration;\n  final Duration transitionDuration;\n  final Curve transitionCurve;\n  final TextStyle itemTextStyle;\n  final TextStyle currentItemTextStyle;\n  final VoidCallback? onTap;\n  final MoonBreadcrumbItem item;\n\n  const _BreadcrumbItemBuilder({\n    required this.isCurrent,\n    required this.itemColor,\n    required this.currentItemColor,\n    required this.hoverEffectColor,\n    required this.decoration,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.itemTextStyle,\n    required this.currentItemTextStyle,\n    required this.item,\n    required this.onTap,\n  });\n\n  @override\n  State<_BreadcrumbItemBuilder> createState() => _BreadCrumbItemBuilderState();\n}\n\nclass _BreadCrumbItemBuilderState extends State<_BreadcrumbItemBuilder>\n    with SingleTickerProviderStateMixin {\n  final ColorTweenWithPremultipliedAlpha _itemColorTween =\n      ColorTweenWithPremultipliedAlpha();\n\n  Animation<Color?>? _itemColor;\n\n  AnimationController? _animationController;\n\n  void _handleActiveEffect(bool isActive) => isActive\n      ? _animationController?.forward()\n      : _animationController?.reverse();\n\n  @override\n  void initState() {\n    super.initState();\n\n    _animationController = AnimationController(\n      duration: widget.transitionDuration,\n      vsync: this,\n      value: widget.isCurrent ? 1 : 0,\n    );\n  }\n\n  @override\n  void dispose() {\n    _animationController!.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final double effectiveGap = widget.item.gap ??\n        context.moonTheme?.breadcrumbTheme.properties.itemGap ??\n        MoonSizes.sizes.x6s;\n\n    final Color resolvedItemColor =\n        widget.isCurrent ? widget.currentItemColor : widget.itemColor;\n\n    final Color resolvedHoverEffectColor =\n        widget.isCurrent ? widget.currentItemColor : widget.hoverEffectColor;\n\n    final TextStyle resolvedTextStyle =\n        widget.isCurrent ? widget.currentItemTextStyle : widget.itemTextStyle;\n\n    _itemColor ??= _animationController!.drive(\n      _itemColorTween.chain(CurveTween(curve: widget.transitionCurve)),\n    );\n\n    _itemColorTween\n      ..begin = resolvedItemColor\n      ..end = resolvedHoverEffectColor;\n\n    return MoonBaseControl(\n      semanticLabel: widget.item.semanticLabel,\n      backgroundColor: widget.decoration?.color,\n      borderRadius: widget.decoration?.borderRadius,\n      propagateGesturesToChild: true,\n      onTap: widget.onTap,\n      builder: (\n        BuildContext context,\n        bool isEnabled,\n        bool isHovered,\n        bool isFocused,\n        bool isPressed,\n      ) {\n        final bool isActive =\n            isEnabled && (widget.isCurrent || isHovered || isPressed);\n\n        _handleActiveEffect(isActive);\n\n        return AnimatedBuilder(\n          animation: _animationController!,\n          builder: (BuildContext context, Widget? child) {\n            return IconTheme(\n              data: IconThemeData(\n                color: _itemColor!.value,\n              ),\n              child: DefaultTextStyle(\n                style: resolvedTextStyle.copyWith(color: _itemColor?.value),\n                child: child!,\n              ),\n            );\n          },\n          child: DecoratedBox(\n            decoration: widget.decoration ?? const BoxDecoration(),\n            child: Row(\n              mainAxisSize: MainAxisSize.min,\n              mainAxisAlignment: MainAxisAlignment.center,\n              children: [\n                if (widget.item.leading != null) ...[\n                  widget.item.leading!,\n                  SizedBox(width: widget.item.gap ?? effectiveGap),\n                ],\n                widget.item.label,\n                if (widget.item.trailing != null) ...[\n                  SizedBox(width: widget.item.gap ?? effectiveGap),\n                  widget.item.trailing!,\n                ],\n              ],\n            ),\n          ),\n        );\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/breadcrumb/breadcrumb_item.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass MoonBreadcrumbItem {\n  /// The gap between the [leading], [label] and [trailing] widgets of the\n  /// breadcrumb item.\n  final double? gap;\n\n  /// The semantic label for the breadcrumb item.\n  final String? semanticLabel;\n\n  /// The callback that is called when the breadcrumb item is tapped or pressed.\n  /// If null, the breadcrumb item is disabled.\n  ///\n  /// For [MoonBreadcrumb.showMoreWidget], when [onTap] is null, default\n  /// behavior is to display all collapsed breadcrumb items.\n  final VoidCallback? onTap;\n\n  /// The widget to display before the [label] widget of the breadcrumb item.\n  final Widget? leading;\n\n  /// The primary content of the breadcrumb item.\n  final Widget label;\n\n  /// The widget to display after the [label] widget of the breadcrumb item.\n  final Widget? trailing;\n\n  /// Creates a Moon Design breadcrumb item.\n  const MoonBreadcrumbItem({\n    this.gap,\n    this.semanticLabel,\n    this.onTap,\n    this.leading,\n    required this.label,\n    this.trailing,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/buttons/button.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/button/button_size_properties.dart';\nimport 'package:moon_design/src/theme/button/button_sizes.dart';\nimport 'package:moon_design/src/theme/effects/effects_theme.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/utils/color_tween_premul.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/widgets/common/base_control.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonButtonSize {\n  xs,\n  sm,\n  md,\n  lg,\n  xl,\n}\n\nclass MoonButton extends StatefulWidget {\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// Whether the button is focusable.\n  final bool isFocusable;\n\n  /// Whether to ensure a minimum touch target size for the button.\n  final bool ensureMinimalTouchTargetSize;\n\n  /// Whether the button takes up the full width of its parent container.\n  final bool isFullWidth;\n\n  /// Whether to show a border around the button.\n  final bool showBorder;\n\n  /// Whether to show a focus outline effect when the button is focused.\n  final bool showFocusEffect;\n\n  /// Whether to show a continuous pulsating effect.\n  final bool showPulseEffect;\n\n  /// Whether to show a jiggle during the button pulse effect.\n  final bool showPulseEffectJiggle;\n\n  /// Whether to show a scale effect when the button is tapped or long-pressed.\n  final bool showScaleEffect;\n\n  /// The border radius of the button.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the button.\n  final Color? backgroundColor;\n\n  /// The border color of the button.\n  final Color? borderColor;\n\n  /// The color of the button focus effect.\n  final Color? focusEffectColor;\n\n  /// The color of the button hover effect.\n  final Color? hoverEffectColor;\n\n  /// The color of the button pulse effect.\n  final Color? pulseEffectColor;\n\n  /// The text color of the button.\n  final Color? textColor;\n\n  /// The text color of the button on hover.\n  final Color? hoverTextColor;\n\n  /// The custom decoration of the button.\n  final Decoration? decoration;\n\n  /// The border width of the button.\n  final double? borderWidth;\n\n  /// The opacity value of the button when disabled.\n  final double? disabledOpacityValue;\n\n  /// The gap between the [leading], [label] and [trailing] widgets of the\n  /// button.\n  final double? gap;\n\n  /// The height of the button.\n  final double? height;\n\n  /// The width of the button.\n  final double? width;\n\n  /// The minimum size of the button touch target.\n  final double minTouchTargetSize;\n\n  /// The extent of the button focus effect.\n  final double? focusEffectExtent;\n\n  /// The extent of the button pulse effect.\n  final double? pulseEffectExtent;\n\n  /// The degree of scaling applied during the button scale effect.\n  final double? scaleEffectScalar;\n\n  /// The duration of the button focus effect.\n  final Duration? focusEffectDuration;\n\n  /// The duration of the button hover effect.\n  final Duration? hoverEffectDuration;\n\n  /// The duration of the button pulse effect.\n  final Duration? pulseEffectDuration;\n\n  /// The duration of the button scale effect.\n  final Duration? scaleEffectDuration;\n\n  /// The curve of the button focus effect.\n  final Curve? focusEffectCurve;\n\n  /// The curve of the button hover effect.\n  final Curve? hoverEffectCurve;\n\n  /// The curve of the button pulse effect.\n  final Curve? pulseEffectCurve;\n\n  /// The curve of the button scale effect.\n  final Curve? scaleEffectCurve;\n\n  /// The padding of the button.\n  final EdgeInsetsGeometry? padding;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The size of the button.\n  final MoonButtonSize? buttonSize;\n\n  /// The semantic label for the button.\n  final String? semanticLabel;\n\n  /// The callback that is called when the button is tapped or pressed.\n  final VoidCallback? onTap;\n\n  /// The callback that is called when the button is long-pressed.\n  final VoidCallback? onLongPress;\n\n  /// The widget to display before the [label] widget of the button.\n  final Widget? leading;\n\n  /// The primary content of the button widget.\n  final Widget? label;\n\n  /// The widget to display after the [label] widget of the button.\n  final Widget? trailing;\n\n  /// Creates a Moon Design base button.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonFilledButton], Moon Design filled button.\n  ///   * [MoonOutlinedButton], Moon Design outlined button.\n  ///   * [MoonTextButton], Moon Design text button.\n  ///   * [MoonButton.icon], Moon Design icon button.\n  const MoonButton({\n    super.key,\n    this.autofocus = false,\n    this.isFocusable = true,\n    this.ensureMinimalTouchTargetSize = false,\n    this.isFullWidth = false,\n    this.showBorder = false,\n    this.showFocusEffect = true,\n    this.showPulseEffect = false,\n    this.showPulseEffectJiggle = true,\n    this.showScaleEffect = true,\n    this.borderRadius,\n    this.backgroundColor,\n    this.borderColor,\n    this.focusEffectColor,\n    this.hoverEffectColor,\n    this.pulseEffectColor,\n    this.textColor,\n    this.hoverTextColor,\n    this.decoration,\n    this.borderWidth,\n    this.disabledOpacityValue,\n    this.gap,\n    this.height,\n    this.width,\n    this.minTouchTargetSize = 40,\n    this.focusEffectExtent,\n    this.pulseEffectExtent,\n    this.scaleEffectScalar,\n    this.focusEffectDuration,\n    this.hoverEffectDuration,\n    this.pulseEffectDuration,\n    this.scaleEffectDuration,\n    this.focusEffectCurve,\n    this.hoverEffectCurve,\n    this.pulseEffectCurve,\n    this.scaleEffectCurve,\n    this.padding,\n    this.focusNode,\n    this.buttonSize,\n    this.semanticLabel,\n    this.onTap,\n    this.onLongPress,\n    this.leading,\n    this.label,\n    this.trailing,\n  });\n\n  /// Creates a Moon Design icon button.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonFilledButton], Moon Design filled button.\n  ///   * [MoonOutlinedButton], Moon Design outlined button.\n  ///   * [MoonTextButton], Moon Design text button.\n  const MoonButton.icon({\n    super.key,\n    this.autofocus = false,\n    this.isFocusable = true,\n    this.ensureMinimalTouchTargetSize = false,\n    this.isFullWidth = false,\n    this.showBorder = false,\n    this.showFocusEffect = true,\n    this.showPulseEffect = false,\n    this.showPulseEffectJiggle = true,\n    this.showScaleEffect = true,\n    this.borderRadius,\n    this.backgroundColor,\n    this.borderColor,\n    this.focusEffectColor,\n    this.hoverEffectColor,\n    this.pulseEffectColor,\n    this.hoverTextColor,\n    this.borderWidth,\n    this.disabledOpacityValue,\n    this.gap,\n    this.height,\n    this.width,\n    this.minTouchTargetSize = 40,\n    this.focusEffectExtent,\n    this.pulseEffectExtent,\n    this.scaleEffectScalar,\n    this.focusEffectDuration,\n    this.hoverEffectDuration,\n    this.pulseEffectDuration,\n    this.scaleEffectDuration,\n    this.focusEffectCurve,\n    this.hoverEffectCurve,\n    this.pulseEffectCurve,\n    this.scaleEffectCurve,\n    this.padding,\n    this.focusNode,\n    this.buttonSize,\n    this.decoration,\n    this.semanticLabel,\n    this.onTap,\n    this.onLongPress,\n    Color? iconColor,\n    Widget? icon,\n  })  : textColor = iconColor,\n        leading = icon,\n        label = null,\n        trailing = null;\n\n  @override\n  State<MoonButton> createState() => _MoonButtonState();\n}\n\nclass _MoonButtonState extends State<MoonButton>\n    with SingleTickerProviderStateMixin {\n  final ColorTweenWithPremultipliedAlpha _backgroundColorTween =\n      ColorTweenWithPremultipliedAlpha();\n  final ColorTweenWithPremultipliedAlpha _textColorTween =\n      ColorTweenWithPremultipliedAlpha();\n\n  Animation<Color?>? _backgroundColor;\n  Animation<Color?>? _textColor;\n\n  AnimationController? _animationController;\n\n  bool get _isEnabled => widget.onTap != null || widget.onLongPress != null;\n\n  void _handleHoverEffect(bool shouldAnimate) {\n    shouldAnimate\n        ? _animationController?.forward()\n        : _animationController?.reverse();\n  }\n\n  MoonButtonSizeProperties _getMoonButtonSize(\n    BuildContext context,\n    MoonButtonSize? moonButtonSize,\n  ) {\n    switch (moonButtonSize) {\n      case MoonButtonSize.xs:\n        return context.moonTheme?.buttonTheme.sizes.xs ??\n            MoonButtonSizes(tokens: MoonTokens.light).xs;\n      case MoonButtonSize.sm:\n        return context.moonTheme?.buttonTheme.sizes.sm ??\n            MoonButtonSizes(tokens: MoonTokens.light).sm;\n      case MoonButtonSize.md:\n        return context.moonTheme?.buttonTheme.sizes.md ??\n            MoonButtonSizes(tokens: MoonTokens.light).md;\n      case MoonButtonSize.lg:\n        return context.moonTheme?.buttonTheme.sizes.lg ??\n            MoonButtonSizes(tokens: MoonTokens.light).lg;\n      case MoonButtonSize.xl:\n        return context.moonTheme?.buttonTheme.sizes.xl ??\n            MoonButtonSizes(tokens: MoonTokens.light).xl;\n      default:\n        return context.moonTheme?.buttonTheme.sizes.md ??\n            MoonButtonSizes(tokens: MoonTokens.light).md;\n    }\n  }\n\n  @override\n  void dispose() {\n    _animationController?.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final MoonButtonSizeProperties effectiveMoonButtonSize =\n        _getMoonButtonSize(context, widget.buttonSize);\n\n    final BorderRadiusGeometry effectiveBorderRadius =\n        widget.borderRadius ?? effectiveMoonButtonSize.borderRadius;\n\n    final Color effectiveBorderColor = widget.borderColor ??\n        context.moonTheme?.buttonTheme.colors.borderColor ??\n        MoonColors.light.trunks;\n\n    final double effectiveBorderWidth = widget.borderWidth ??\n        context.moonBorders?.defaultBorderWidth ??\n        MoonBorders.borders.defaultBorderWidth;\n\n    final Color effectiveTextColor = widget.textColor ??\n        context.moonTheme?.buttonTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    final Color effectiveHoverEffectColor = widget.hoverEffectColor ??\n        context.moonEffects?.controlHoverEffect.primaryHoverColor ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlHoverEffect\n            .primaryHoverColor;\n\n    final Color hoverColor = Color.alphaBlend(\n      effectiveHoverEffectColor,\n      widget.backgroundColor ?? Colors.transparent,\n    );\n\n    final double effectiveHeight =\n        widget.height ?? effectiveMoonButtonSize.height;\n\n    final double effectiveGap = widget.gap ?? effectiveMoonButtonSize.gap;\n\n    final EdgeInsetsGeometry effectivePadding =\n        widget.padding ?? effectiveMoonButtonSize.padding;\n\n    final EdgeInsets resolvedDirectionalPadding =\n        effectivePadding.resolve(Directionality.of(context));\n\n    final EdgeInsetsGeometry correctedPadding = widget.padding == null\n        ? EdgeInsetsDirectional.fromSTEB(\n            widget.leading == null && widget.label != null\n                ? resolvedDirectionalPadding.left\n                : 0,\n            resolvedDirectionalPadding.top,\n            widget.trailing == null && widget.label != null\n                ? resolvedDirectionalPadding.right\n                : 0,\n            resolvedDirectionalPadding.bottom,\n          )\n        : resolvedDirectionalPadding;\n\n    final Duration effectiveHoverEffectDuration = widget.hoverEffectDuration ??\n        context.moonEffects?.controlHoverEffect.hoverDuration ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlHoverEffect\n            .hoverDuration;\n\n    final Curve effectiveHoverEffectCurve = widget.hoverEffectCurve ??\n        context.moonEffects?.controlHoverEffect.hoverCurve ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlHoverEffect\n            .hoverCurve;\n\n    _animationController ??= AnimationController(\n      duration: effectiveHoverEffectDuration,\n      vsync: this,\n    );\n\n    _backgroundColor ??= _animationController!.drive(\n      _backgroundColorTween.chain(CurveTween(curve: effectiveHoverEffectCurve)),\n    );\n\n    _textColor ??= _animationController!.drive(\n      _textColorTween.chain(CurveTween(curve: effectiveHoverEffectCurve)),\n    );\n\n    _backgroundColorTween\n      ..begin = widget.backgroundColor\n      ..end = hoverColor;\n\n    _textColorTween\n      ..begin = effectiveTextColor\n      ..end = widget.hoverTextColor ?? effectiveTextColor;\n\n    return MoonBaseControl(\n      autofocus: widget.autofocus,\n      isFocusable: widget.isFocusable,\n      ensureMinimalTouchTargetSize: widget.ensureMinimalTouchTargetSize,\n      semanticTypeIsButton: true,\n      showFocusEffect: widget.showFocusEffect,\n      showPulseEffect: widget.showPulseEffect,\n      showPulseEffectJiggle: widget.showPulseEffectJiggle,\n      showScaleEffect: widget.showScaleEffect,\n      borderRadius: effectiveBorderRadius,\n      backgroundColor: widget.backgroundColor,\n      focusEffectColor: widget.focusEffectColor,\n      pulseEffectColor: widget.pulseEffectColor,\n      disabledOpacityValue: widget.disabledOpacityValue,\n      minTouchTargetSize: widget.minTouchTargetSize,\n      focusEffectExtent: widget.focusEffectExtent,\n      pulseEffectExtent: widget.pulseEffectExtent,\n      scaleEffectScalar: widget.scaleEffectScalar,\n      focusEffectDuration: widget.focusEffectDuration,\n      pulseEffectDuration: widget.pulseEffectDuration,\n      scaleEffectDuration: widget.scaleEffectDuration,\n      focusEffectCurve: widget.focusEffectCurve,\n      pulseEffectCurve: widget.pulseEffectCurve,\n      scaleEffectCurve: widget.scaleEffectCurve,\n      focusNode: widget.focusNode,\n      semanticLabel: widget.semanticLabel,\n      onTap: widget.onTap,\n      onLongPress: widget.onLongPress,\n      builder: (\n        BuildContext context,\n        bool isEnabled,\n        bool isHovered,\n        bool isFocused,\n        bool isPressed,\n      ) {\n        final bool canAnimate =\n            _isEnabled && (isHovered || isFocused || isPressed);\n\n        _handleHoverEffect(canAnimate);\n\n        return AnimatedBuilder(\n          animation: _animationController!,\n          builder: (BuildContext context, Widget? child) {\n            return IconTheme(\n              data: IconThemeData(\n                color: _textColor!.value,\n                size: effectiveMoonButtonSize.iconSizeValue,\n              ),\n              child: DefaultTextStyle(\n                style: effectiveMoonButtonSize.textStyle\n                    .copyWith(color: _textColor!.value),\n                child: Container(\n                  width: widget.width,\n                  height: effectiveHeight,\n                  constraints: BoxConstraints(minWidth: effectiveHeight),\n                  decoration: widget.decoration ??\n                      ShapeDecoration(\n                        color: _backgroundColor!.value,\n                        shape: MoonSquircleBorder(\n                          borderRadius: effectiveBorderRadius\n                              .squircleBorderRadius(context),\n                          side: BorderSide(\n                            color: effectiveBorderColor,\n                            width: widget.showBorder ? effectiveBorderWidth : 0,\n                            style: widget.showBorder\n                                ? BorderStyle.solid\n                                : BorderStyle.none,\n                          ),\n                        ),\n                      ),\n                  child: child,\n                ),\n              ),\n            );\n          },\n          child: Padding(\n            padding: widget.isFullWidth ? EdgeInsets.zero : correctedPadding,\n            child: widget.isFullWidth\n                ? Stack(\n                    fit: StackFit.expand,\n                    children: [\n                      if (widget.leading != null)\n                        Container(\n                          margin:\n                              EdgeInsets.symmetric(horizontal: effectiveGap),\n                          alignment:\n                              Directionality.of(context) == TextDirection.ltr\n                                  ? Alignment.centerLeft\n                                  : Alignment.centerRight,\n                          child: widget.leading,\n                        ),\n                      if (widget.label != null)\n                        Align(\n                          child: widget.label,\n                        ),\n                      if (widget.trailing != null)\n                        Container(\n                          margin:\n                              EdgeInsets.symmetric(horizontal: effectiveGap),\n                          alignment:\n                              Directionality.of(context) == TextDirection.ltr\n                                  ? Alignment.centerRight\n                                  : Alignment.centerLeft,\n                          child: widget.trailing,\n                        ),\n                    ],\n                  )\n                : Row(\n                    mainAxisSize: MainAxisSize.min,\n                    mainAxisAlignment: MainAxisAlignment.center,\n                    children: [\n                      if (widget.leading != null)\n                        Padding(\n                          padding:\n                              EdgeInsets.symmetric(horizontal: effectiveGap),\n                          child: widget.leading,\n                        ),\n                      if (widget.label != null) widget.label!,\n                      if (widget.trailing != null)\n                        Padding(\n                          padding:\n                              EdgeInsets.symmetric(horizontal: effectiveGap),\n                          child: widget.trailing,\n                        ),\n                    ],\n                  ),\n          ),\n        );\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/buttons/filled_button.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/widgets/buttons/button.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonFilledButton extends StatelessWidget {\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// Whether the button is focusable.\n  final bool isFocusable;\n\n  /// Whether to ensure a minimum touch target size for the button.\n  final bool ensureMinimalTouchTargetSize;\n\n  /// Whether the button takes up the full width of its parent container.\n  final bool isFullWidth;\n\n  /// Whether to show a continuous pulsating effect.\n  final bool showPulseEffect;\n\n  /// The border radius of the button.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the button.\n  final Color? backgroundColor;\n\n  /// The custom decoration of the button.\n  final Decoration? decoration;\n\n  /// The height of the button.\n  final double? height;\n\n  /// The width of the button.\n  final double? width;\n\n  /// The minimum size of the button touch target.\n  final double minTouchTargetSize;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The size of the button.\n  final MoonButtonSize? buttonSize;\n\n  /// The semantic label for the button.\n  final String? semanticLabel;\n\n  /// The callback that is called when the button is tapped or pressed.\n  final VoidCallback? onTap;\n\n  /// The callback that is called when the button is long-pressed.\n  final VoidCallback? onLongPress;\n\n  /// The widget to display before the [label] widget of the button.\n  final Widget? leading;\n\n  /// The primary content of the button widget.\n  final Widget? label;\n\n  /// The widget to display after the [label] widget of the button.\n  final Widget? trailing;\n\n  /// Creates a Moon Design filled button.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonOutlinedButton], Moon Design outlined button.\n  ///   * [MoonTextButton], Moon Design text button.\n  ///   * [MoonButton.icon], Moon Design icon button.\n  const MoonFilledButton({\n    super.key,\n    this.autofocus = false,\n    this.isFocusable = true,\n    this.ensureMinimalTouchTargetSize = false,\n    this.isFullWidth = false,\n    this.showPulseEffect = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.decoration,\n    this.height,\n    this.width,\n    this.minTouchTargetSize = 40,\n    this.focusNode,\n    this.buttonSize,\n    this.semanticLabel,\n    this.onTap,\n    this.onLongPress,\n    this.leading,\n    this.label,\n    this.trailing,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    final Color effectiveBackgroundColor = backgroundColor ??\n        context.moonTheme?.buttonTheme.colors.filledVariantBackgroundColor ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.buttonTheme.colors.filledVariantTextColor ??\n            MoonColors.light.goten;\n\n    return MoonButton(\n      autofocus: autofocus,\n      isFocusable: isFocusable,\n      ensureMinimalTouchTargetSize: ensureMinimalTouchTargetSize,\n      isFullWidth: isFullWidth,\n      showPulseEffect: showPulseEffect,\n      textColor: effectiveTextColor,\n      borderRadius: borderRadius,\n      backgroundColor: effectiveBackgroundColor,\n      height: height,\n      width: width,\n      minTouchTargetSize: minTouchTargetSize,\n      focusNode: focusNode,\n      buttonSize: buttonSize,\n      decoration: decoration,\n      semanticLabel: semanticLabel,\n      onTap: onTap,\n      onLongPress: onLongPress,\n      label: label,\n      leading: leading,\n      trailing: trailing,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/buttons/outlined_button.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/widgets/buttons/button.dart';\n\nclass MoonOutlinedButton extends StatelessWidget {\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// Whether the button is focusable.\n  final bool isFocusable;\n\n  /// Whether to ensure a minimum touch target size for the button.\n  final bool ensureMinimalTouchTargetSize;\n\n  /// Whether the button takes up the full width of its parent container.\n  final bool isFullWidth;\n\n  /// Whether to show a continuous pulsating effect.\n  final bool showPulseEffect;\n\n  /// The border radius of the button.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The border color of the button.\n  final Color? borderColor;\n\n  /// The custom decoration of the button.\n  final Decoration? decoration;\n\n  /// The height of the button.\n  final double? height;\n\n  /// The width of the button.\n  final double? width;\n\n  /// The minimum size of the button touch target.\n  final double minTouchTargetSize;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The size of the button.\n  final MoonButtonSize? buttonSize;\n\n  /// The semantic label for the button.\n  final String? semanticLabel;\n\n  /// The callback that is called when the button is tapped or pressed.\n  final VoidCallback? onTap;\n\n  /// The callback that is called when the button is long-pressed.\n  final VoidCallback? onLongPress;\n\n  /// The widget to display before the [label] widget of the button.\n  final Widget? leading;\n\n  /// The primary content of the button widget.\n  final Widget? label;\n\n  /// The widget to display after the [label] widget of the button.\n  final Widget? trailing;\n\n  /// Creates a Moon Design outlined button.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonFilledButton], Moon Design filled button.\n  ///   * [MoonTextButton], Moon Design text button.\n  ///   * [MoonButton.icon], Moon Design icon button.\n  const MoonOutlinedButton({\n    super.key,\n    this.autofocus = false,\n    this.isFocusable = true,\n    this.ensureMinimalTouchTargetSize = false,\n    this.isFullWidth = false,\n    this.showPulseEffect = false,\n    this.borderRadius,\n    this.borderColor,\n    this.decoration,\n    this.height,\n    this.width,\n    this.minTouchTargetSize = 40,\n    this.focusNode,\n    this.buttonSize,\n    this.semanticLabel,\n    this.onTap,\n    this.onLongPress,\n    this.label,\n    this.leading,\n    this.trailing,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MoonButton(\n      autofocus: autofocus,\n      isFocusable: isFocusable,\n      ensureMinimalTouchTargetSize: ensureMinimalTouchTargetSize,\n      isFullWidth: isFullWidth,\n      showPulseEffect: showPulseEffect,\n      showBorder: true,\n      borderRadius: borderRadius,\n      borderColor: borderColor,\n      height: height,\n      width: width,\n      minTouchTargetSize: minTouchTargetSize,\n      focusNode: focusNode,\n      buttonSize: buttonSize,\n      decoration: decoration,\n      semanticLabel: semanticLabel,\n      onTap: onTap,\n      onLongPress: onLongPress,\n      label: label,\n      leading: leading,\n      trailing: trailing,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/buttons/text_button.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/widgets/buttons/button.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonTextButton extends StatelessWidget {\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// Whether the button is focusable.\n  final bool isFocusable;\n\n  /// Whether to ensure a minimum touch target size for the button.\n  final bool ensureMinimalTouchTargetSize;\n\n  /// Whether the button takes up the full width of its parent container.\n  final bool isFullWidth;\n\n  /// Whether to show a continuous pulsating effect.\n  final bool showPulseEffect;\n\n  /// The custom decoration of the button.\n  final Decoration? decoration;\n\n  /// The height of the button.\n  final double? height;\n\n  /// The width of the button.\n  final double? width;\n\n  /// The minimum size of the button touch target.\n  final double minTouchTargetSize;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The size of the button.\n  final MoonButtonSize? buttonSize;\n\n  /// The semantic label for the button.\n  final String? semanticLabel;\n\n  /// The callback that is called when the button is tapped or pressed.\n  final VoidCallback? onTap;\n\n  /// The callback that is called when the button is long-pressed.\n  final VoidCallback? onLongPress;\n\n  /// The widget to display before the [label] widget of the button.\n  final Widget? leading;\n\n  /// The primary content of the button widget.\n  final Widget? label;\n\n  /// The widget to display after the [label] widget of the button.\n  final Widget? trailing;\n\n  /// Creates a Moon Design text button.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonFilledButton], Moon Design filled button.\n  ///   * [MoonOutlinedButton], Moon Design outlined button.\n  ///   * [MoonButton.icon], Moon Design icon button.\n  const MoonTextButton({\n    super.key,\n    this.autofocus = false,\n    this.isFocusable = true,\n    this.ensureMinimalTouchTargetSize = false,\n    this.isFullWidth = false,\n    this.showPulseEffect = false,\n    this.decoration,\n    this.height,\n    this.width,\n    this.minTouchTargetSize = 40,\n    this.focusNode,\n    this.buttonSize,\n    this.semanticLabel,\n    this.onTap,\n    this.onLongPress,\n    this.label,\n    this.leading,\n    this.trailing,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    final Color effectiveTextColor =\n        context.moonTheme?.buttonTheme.colors.textVariantTextColor ??\n            MoonColors.light.textSecondary;\n\n    final Color effectiveHoverTextColor =\n        context.moonTheme?.buttonTheme.colors.textColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveHoverColor =\n        context.moonTheme?.buttonTheme.colors.textVariantHoverColor ??\n            MoonColors.light.jiren;\n\n    final Color effectiveFocusColor = context\n            .moonTheme?.buttonTheme.colors.textVariantFocusColor\n            .withOpacity(context.isDarkMode ? 0.8 : 0.2) ??\n        MoonColors.light.piccolo.withOpacity(context.isDarkMode ? 0.8 : 0.2);\n\n    return MoonButton(\n      autofocus: autofocus,\n      isFocusable: isFocusable,\n      ensureMinimalTouchTargetSize: ensureMinimalTouchTargetSize,\n      isFullWidth: isFullWidth,\n      showPulseEffect: showPulseEffect,\n      textColor: effectiveTextColor,\n      hoverTextColor: effectiveHoverTextColor,\n      hoverEffectColor: effectiveHoverColor,\n      focusEffectColor: effectiveFocusColor,\n      height: height,\n      width: width,\n      minTouchTargetSize: minTouchTargetSize,\n      focusNode: focusNode,\n      buttonSize: buttonSize,\n      decoration: decoration,\n      semanticLabel: semanticLabel,\n      onTap: onTap,\n      onLongPress: onLongPress,\n      label: label,\n      leading: leading,\n      trailing: trailing,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/carousel/carousel.dart",
    "content": "import 'dart:async';\nimport 'dart:math' as math;\nimport 'dart:ui';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/physics.dart';\nimport 'package:flutter/rendering.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonCarousel extends StatefulWidget {\n  /// The axis direction in which the carousel scrolls.\n  final Axis axisDirection;\n\n  /// Whether to enable the automatic scrolling for the carousel.\n  final bool autoPlay;\n\n  /// Whether to align the selected carousel item to the center of the viewport.\n  /// When set to true, the [anchor] property is ignored.\n  final bool isCentered;\n\n  /// Whether to limit the 'maxExtent' proportionally based on the [anchor].\n  ///\n  /// This makes the carousel behave like a [ListView] in terms of how the\n  /// 'maxExtent' is calculated\n  /// and makes the last carousel item(s) unreachable for the purposes of the\n  /// [onIndexChanged] callback.\n  final bool clampMaxExtent;\n\n  /// Whether to enable infinite looping for the carousel items.\n  final bool loop;\n\n  /// Positions the selected carousel item within the viewport. Values range\n  /// from 0 to 1.\n  ///\n  /// A value of 0.0 indicates that the selected item is aligned to the start\n  /// of the viewport, and a value of 1.0 indicates that it is aligned to the\n  /// end of the viewport.\n  ///\n  /// This property is ignored when [isCentered] is set to true.\n  final double anchor;\n\n  /// The gap between the carousel items.\n  final double? gap;\n\n  /// The maximum width for each carousel item in the viewport.\n  final double itemExtent;\n\n  /// The factor to adjust and multiply the velocity of carousel scrolling.\n  final double velocityFactor;\n\n  /// The delay between the items in the carousel's automatic scrolling\n  /// sequence.\n  final Duration? autoPlayDelay;\n\n  /// The duration of the MoonCarousel [autoplay] transition animation.\n  final Duration? transitionDuration;\n\n  /// The curve of the MoonCarousel [autoplay] transition animation.\n  final Curve? transitionCurve;\n\n  /// The total number of items to build for the carousel.\n  final int itemCount;\n\n  /// The [ScrollController] used to control the carousel.\n  final ScrollController? controller;\n\n  /// The scroll physics of the carousel.\n  ///\n  /// Defaults to [MoonCarouselScrollPhysics], which ensures that the carousel\n  /// always lands on a specific item after scrolling.\n  final ScrollPhysics? physics;\n\n  /// The custom scroll behavior for the carousel.\n  final ScrollBehavior? scrollBehavior;\n\n  /// The callback that is called when the carousel item index has changed.\n  final void Function(int index)? onIndexChanged;\n\n  /// Builds carousel items lazily within the viewport.\n  ///\n  /// When [loop] is false, 'itemIndex' corresponds to 'realIndex'\n  /// (i.e., the index of the element).\n  ///\n  /// When [loop] is true, two indexes are exposed by the 'itemBuilder'.\n  ///\n  /// The first is 'itemIndex', which represents the modded item index,\n  /// e.g., for a list of 10, 'position(11) = 1', and 'position(-1) = 9'.\n  ///\n  /// The second is 'realIndex', which represents the actual index,\n  /// e.g., [..., -2, -1, 0, 1, 2, ...] in loop.\n  /// The 'realIndex' is essential to support 'jumpToItem' by tapping on it.\n  final Widget Function(BuildContext context, int itemIndex, int realIndex)\n      itemBuilder;\n\n  /// Creates a Moon Design carousel.\n  const MoonCarousel({\n    super.key,\n    this.axisDirection = Axis.horizontal,\n    this.autoPlay = false,\n    this.isCentered = true,\n    this.clampMaxExtent = false,\n    this.loop = false,\n    this.anchor = 0.0,\n    this.gap,\n    required this.itemExtent,\n    this.velocityFactor = 0.5,\n    this.autoPlayDelay,\n    this.transitionDuration,\n    this.transitionCurve,\n    required this.itemCount,\n    this.controller,\n    this.physics,\n    this.scrollBehavior,\n    this.onIndexChanged,\n    required this.itemBuilder,\n  })  : assert(itemExtent > 0),\n        assert(itemCount > 0),\n        assert(velocityFactor > 0.0 && velocityFactor <= 1.0);\n\n  @override\n  State<MoonCarousel> createState() => _MoonCarouselState();\n}\n\nclass _MoonCarouselState extends State<MoonCarousel> {\n  late int _lastReportedItemIndex;\n  late MoonCarouselScrollController _scrollController;\n\n  final Key _forwardListKey = const ValueKey<String>(\"moon_carousel_key\");\n\n  double _effectiveGap = 0;\n\n  // Calculates the anchor position for the viewport to center the selected item\n  // when 'isCentered' is true.\n  double _getCenteredAnchor(BoxConstraints constraints) {\n    if (!widget.isCentered) return widget.anchor;\n\n    final maxExtent = widget.axisDirection == Axis.horizontal\n        ? constraints.maxWidth\n        : constraints.maxHeight;\n\n    return ((maxExtent / 2) - (widget.itemExtent / 2)) / maxExtent;\n  }\n\n  // Determines whether the carousel's anchored content surpasses the viewport's\n  // width. If not, clamping is not applicable.\n  bool _clampMaxExtent(double viewportWidth) {\n    final double itemsWidth = widget.itemCount * widget.itemExtent;\n    final double gapWidth = (widget.itemCount - 1) * _effectiveGap;\n    final double anchor = viewportWidth * widget.anchor * 2;\n    final double totalWidth = itemsWidth + gapWidth + anchor;\n\n    return totalWidth >= viewportWidth && widget.clampMaxExtent;\n  }\n\n  AxisDirection _getDirection(BuildContext context) {\n    switch (widget.axisDirection) {\n      case Axis.horizontal:\n        assert(debugCheckHasDirectionality(context));\n\n        final TextDirection textDirection = Directionality.of(context);\n        final AxisDirection axisDirection =\n            textDirectionToAxisDirection(textDirection);\n\n        return axisDirection;\n\n      case Axis.vertical:\n        return AxisDirection.down;\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _scrollController = (widget.controller as MoonCarouselScrollController?) ??\n        MoonCarouselScrollController();\n\n    _lastReportedItemIndex = _scrollController.initialItem;\n\n    if (widget.autoPlay) {\n      WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n        final Duration effectiveAutoPlayDelay = widget.autoPlayDelay ??\n            context.moonTheme?.carouselTheme.properties.autoPlayDelay ??\n            const Duration(seconds: 3);\n\n        final Duration effectiveTransitionDuration = widget\n                .transitionDuration ??\n            context.moonTheme?.carouselTheme.properties.transitionDuration ??\n            const Duration(milliseconds: 800);\n\n        final Curve effectiveTransitionCurve = widget.transitionCurve ??\n            context.moonTheme?.carouselTheme.properties.transitionCurve ??\n            Curves.fastOutSlowIn;\n\n        _scrollController.startAutoPlay(\n          delay: effectiveAutoPlayDelay,\n          duration: effectiveTransitionDuration,\n          curve: effectiveTransitionCurve,\n        );\n      });\n    }\n  }\n\n  @override\n  void didUpdateWidget(MoonCarousel oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (widget.autoPlay != oldWidget.autoPlay) {\n      if (widget.autoPlay) {\n        final Duration effectiveAutoPlayDelay = widget.autoPlayDelay ??\n            context.moonTheme?.carouselTheme.properties.autoPlayDelay ??\n            const Duration(seconds: 3);\n\n        final Duration effectiveTransitionDuration = widget\n                .transitionDuration ??\n            context.moonTheme?.carouselTheme.properties.transitionDuration ??\n            const Duration(milliseconds: 800);\n\n        final Curve effectiveTransitionCurve = widget.transitionCurve ??\n            context.moonTheme?.carouselTheme.properties.transitionCurve ??\n            Curves.fastOutSlowIn;\n\n        _scrollController.startAutoPlay(\n          delay: effectiveAutoPlayDelay,\n          duration: effectiveTransitionDuration,\n          curve: effectiveTransitionCurve,\n        );\n      } else {\n        _scrollController.stopAutoplay();\n      }\n    }\n  }\n\n  @override\n  void dispose() {\n    if (widget.controller == null) _scrollController.dispose();\n\n    super.dispose();\n  }\n\n  List<Widget> _buildSlivers(\n    BuildContext context, {\n    required AxisDirection axisDirection,\n  }) {\n    final EdgeInsetsDirectional resolvedPadding =\n        widget.axisDirection == Axis.horizontal\n            ? EdgeInsetsDirectional.only(end: _effectiveGap)\n            : EdgeInsetsDirectional.only(bottom: _effectiveGap);\n\n    /// Delegate responsible for building items lazily in the forward direction\n    /// as the viewport scrolls.\n    final SliverChildDelegate childDelegate = SliverChildBuilderDelegate(\n      (context, index) => Padding(\n        padding: resolvedPadding,\n        child: widget.itemBuilder(\n          context,\n          index.abs() % widget.itemCount,\n          index,\n        ),\n      ),\n      childCount: widget.loop ? null : widget.itemCount,\n    );\n\n    /// Delegate responsible for building items lazily in the reverse direction\n    /// as the viewport scrolls.\n    final SliverChildDelegate? reversedChildDelegate = widget.loop\n        ? SliverChildBuilderDelegate(\n            (context, index) => Padding(\n              padding: resolvedPadding,\n              child: widget.itemBuilder(\n                context,\n                widget.itemCount - (index.abs() % widget.itemCount) - 1,\n                -(index + 1),\n              ),\n            ),\n          )\n        : null;\n\n    final Widget forward = SliverFixedExtentList(\n      key: _forwardListKey,\n      delegate: childDelegate,\n      itemExtent: widget.itemExtent + _effectiveGap,\n    );\n\n    if (!widget.loop) return [forward];\n\n    final Widget reversed = SliverFixedExtentList(\n      delegate: reversedChildDelegate!,\n      itemExtent: widget.itemExtent + _effectiveGap,\n    );\n\n    return [reversed, forward];\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final Color effectiveTextColor =\n        context.moonTheme?.carouselTheme.colors.textColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.carouselTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final TextStyle effectiveTextStyle =\n        context.moonTheme?.carouselTheme.properties.textStyle ??\n            MoonTypography.typography.body.textDefault;\n\n    final AxisDirection axisDirection = _getDirection(context);\n\n    final ScrollBehavior effectiveScrollBehavior = widget.scrollBehavior ??\n        ScrollConfiguration.of(context).copyWith(\n          scrollbars: false,\n          overscroll: false,\n          dragDevices: {\n            PointerDeviceKind.touch,\n            PointerDeviceKind.mouse,\n          },\n        );\n\n    _effectiveGap = widget.gap ??\n        context.moonTheme?.carouselTheme.properties.gap ??\n        MoonSizes.sizes.x2s;\n\n    return NotificationListener<ScrollUpdateNotification>(\n      onNotification: (ScrollUpdateNotification notification) {\n        final MoonCarouselExtentMetrics metrics =\n            notification.metrics as MoonCarouselExtentMetrics;\n\n        final int currentItem = metrics.itemIndex;\n\n        if (currentItem != _lastReportedItemIndex) {\n          _lastReportedItemIndex = currentItem;\n\n          final int trueIndex =\n              _getTrueIndex(_lastReportedItemIndex, widget.itemCount);\n\n          widget.onIndexChanged?.call(trueIndex);\n        }\n\n        return false;\n      },\n      child: LayoutBuilder(\n        builder: (BuildContext context, BoxConstraints constraints) {\n          final double centeredAnchor = _getCenteredAnchor(constraints);\n          final bool clampMaxExtent = _clampMaxExtent(constraints.maxWidth);\n\n          return IconTheme(\n            data: IconThemeData(\n              color: effectiveIconColor,\n            ),\n            child: DefaultTextStyle(\n              style: effectiveTextStyle.copyWith(color: effectiveTextColor),\n              child: _MoonCarouselScrollable(\n                anchor: centeredAnchor,\n                axisDirection: axisDirection,\n                controller: _scrollController,\n                clampMaxExtent: clampMaxExtent,\n                gap: _effectiveGap,\n                itemCount: widget.itemCount,\n                itemExtent: widget.itemExtent + _effectiveGap,\n                loop: widget.loop,\n                physics: widget.physics ?? const MoonCarouselScrollPhysics(),\n                scrollBehavior: effectiveScrollBehavior,\n                velocityFactor: widget.velocityFactor,\n                viewportBuilder: (\n                  BuildContext context,\n                  ViewportOffset position,\n                ) {\n                  return Viewport(\n                    anchor: centeredAnchor,\n                    axisDirection: axisDirection,\n                    center: _forwardListKey,\n                    offset: position,\n                    slivers: _buildSlivers(\n                      context,\n                      axisDirection: axisDirection,\n                    ),\n                  );\n                },\n              ),\n            ),\n          );\n        },\n      ),\n    );\n  }\n}\n\n/// Extends Scrollable by including the viewport's itemExtent, itemCount, loop,\n/// and other values. This allows ScrollPosition and Physics to access these\n/// values directly from the scroll context.\nclass _MoonCarouselScrollable extends Scrollable {\n  final bool clampMaxExtent;\n  final bool loop;\n  final double anchor;\n  final double gap;\n  final double itemExtent;\n  final double velocityFactor;\n  final int itemCount;\n\n  const _MoonCarouselScrollable({\n    super.axisDirection = AxisDirection.right,\n    super.controller,\n    super.physics,\n    super.scrollBehavior,\n    required super.viewportBuilder,\n    required this.clampMaxExtent,\n    required this.loop,\n    required this.anchor,\n    required this.gap,\n    required this.itemExtent,\n    required this.velocityFactor,\n    required this.itemCount,\n  });\n\n  @override\n  _MoonCarouselScrollableState createState() => _MoonCarouselScrollableState();\n}\n\nclass _MoonCarouselScrollableState extends ScrollableState {\n  bool get clampMaxExtent => (widget as _MoonCarouselScrollable).clampMaxExtent;\n\n  bool get loop => (widget as _MoonCarouselScrollable).loop;\n\n  double get anchor => (widget as _MoonCarouselScrollable).anchor;\n\n  double get gap => (widget as _MoonCarouselScrollable).gap;\n\n  double get itemExtent => (widget as _MoonCarouselScrollable).itemExtent;\n\n  double get velocityFactor =>\n      (widget as _MoonCarouselScrollable).velocityFactor;\n\n  int get itemCount => (widget as _MoonCarouselScrollable).itemCount;\n}\n\n/// Scroll controller for [MoonCarousel].\nclass MoonCarouselScrollController extends ScrollController {\n  /// The initial carousel item index for [MoonCarouselScrollController].\n  ///\n  /// Defaults to '0'.\n  final int initialItem;\n\n  /// Scroll controller for [MoonCarousel].\n  MoonCarouselScrollController({this.initialItem = 0});\n\n  // Timer for autoplay.\n  Timer? _autoplayTimer;\n\n  void startAutoPlay({\n    Duration delay = const Duration(seconds: 3),\n    Duration? duration,\n    Curve? curve,\n  }) {\n    _autoplayTimer?.cancel();\n\n    _autoplayTimer = Timer.periodic(delay, (timer) {\n      // When the carousel reaches the end, animate it back to the beginning.\n      if (offset >= position.maxScrollExtent && !position.outOfRange) {\n        animateToItem(0, duration: duration, curve: curve);\n      } else {\n        nextItem(duration: duration, curve: curve);\n      }\n    });\n  }\n\n  void stopAutoplay() {\n    _autoplayTimer?.cancel();\n  }\n\n  @override\n  void dispose() {\n    stopAutoplay();\n\n    super.dispose();\n  }\n\n  /// Returns the index of the currently selected item. If [MoonCarousel.loop]\n  /// is true it provides the modded index value.\n  int get selectedItem => _getTrueIndex(\n        (position as _MoonCarouselScrollPosition).itemIndex,\n        (position as _MoonCarouselScrollPosition).itemCount,\n      );\n\n  /// Animate to the specified item index.\n  Future<void> animateToItem(\n    int itemIndex, {\n    Duration? duration,\n    Curve? curve,\n  }) async {\n    if (!hasClients) return;\n\n    await Future.wait<void>([\n      for (final position in positions.cast<_MoonCarouselScrollPosition>())\n        position.animateTo(\n          itemIndex * position.itemExtent,\n          duration: duration ?? const Duration(milliseconds: 800),\n          curve: curve ?? Curves.fastOutSlowIn,\n        ),\n    ]);\n  }\n\n  /// Jump to the specified item index.\n  void jumpToItem(int itemIndex) {\n    for (final position in positions.cast<_MoonCarouselScrollPosition>()) {\n      position.jumpTo(itemIndex * position.itemExtent);\n    }\n  }\n\n  /// Animate to the next item in the viewport.\n  Future<void> nextItem({Duration? duration, Curve? curve}) async {\n    if (!hasClients) return;\n\n    await Future.wait<void>([\n      for (final position in positions.cast<_MoonCarouselScrollPosition>())\n        position.animateTo(\n          offset + position.itemExtent,\n          duration: duration ?? const Duration(milliseconds: 800),\n          curve: curve ?? Curves.fastOutSlowIn,\n        ),\n    ]);\n  }\n\n  /// Animate to the previous item in the viewport.\n  Future<void> previousItem({Duration? duration, Curve? curve}) async {\n    if (!hasClients) return;\n\n    await Future.wait<void>([\n      for (final position in positions.cast<_MoonCarouselScrollPosition>())\n        position.animateTo(\n          offset - position.itemExtent,\n          duration: duration ?? const Duration(milliseconds: 800),\n          curve: curve ?? Curves.fastOutSlowIn,\n        ),\n    ]);\n  }\n\n  @override\n  ScrollPosition createScrollPosition(\n    ScrollPhysics physics,\n    ScrollContext context,\n    ScrollPosition? oldPosition,\n  ) {\n    return _MoonCarouselScrollPosition(\n      context: context,\n      initialItem: initialItem,\n      oldPosition: oldPosition,\n      physics: physics,\n    );\n  }\n}\n\n/// The metrics for the [MoonCarouselScrollController].\nclass MoonCarouselExtentMetrics extends FixedScrollMetrics {\n  /// The index of the currently selected item within the scroll view.\n  final int itemIndex;\n\n  /// Provides an immutable snapshot of the current scroll positions within the\n  /// carousel. This snapshot can be directly accessed by [ScrollNotification]\n  /// to retrieve the currently selected real item index at any given moment.\n  MoonCarouselExtentMetrics({\n    required super.minScrollExtent,\n    required super.maxScrollExtent,\n    required super.pixels,\n    required super.viewportDimension,\n    required super.axisDirection,\n    required super.devicePixelRatio,\n    required this.itemIndex,\n  });\n\n  @override\n  MoonCarouselExtentMetrics copyWith({\n    AxisDirection? axisDirection,\n    double? devicePixelRatio,\n    double? minScrollExtent,\n    double? maxScrollExtent,\n    double? pixels,\n    double? viewportDimension,\n    int? itemIndex,\n  }) {\n    return MoonCarouselExtentMetrics(\n      axisDirection: axisDirection ?? this.axisDirection,\n      devicePixelRatio: devicePixelRatio ?? this.devicePixelRatio,\n      minScrollExtent: minScrollExtent ??\n          (hasContentDimensions ? this.minScrollExtent : 0.0),\n      maxScrollExtent: maxScrollExtent ?? this.maxScrollExtent,\n      pixels: pixels ?? this.pixels,\n      viewportDimension: viewportDimension ?? this.viewportDimension,\n      itemIndex: itemIndex ?? this.itemIndex,\n    );\n  }\n}\n\nint _getItemFromOffset({\n  required double itemExtent,\n  required double minScrollExtent,\n  required double maxScrollExtent,\n  required double offset,\n}) {\n  return (_clipOffsetToScrollableRange(\n            offset,\n            minScrollExtent,\n            maxScrollExtent,\n          ) /\n          itemExtent)\n      .round();\n}\n\ndouble _clipOffsetToScrollableRange(\n  double offset,\n  double minScrollExtent,\n  double maxScrollExtent,\n) {\n  return math.min(math.max(offset, minScrollExtent), maxScrollExtent);\n}\n\n// Returns the modded item index from the real index.\nint _getTrueIndex(int currentIndex, int totalCount) {\n  if (currentIndex >= 0) return currentIndex % totalCount;\n\n  return (totalCount + (currentIndex % totalCount)) % totalCount;\n}\n\nclass _MoonCarouselScrollPosition extends ScrollPositionWithSingleContext\n    implements MoonCarouselExtentMetrics {\n  _MoonCarouselScrollPosition({\n    required super.physics,\n    required super.context,\n    required int initialItem,\n    super.oldPosition,\n  })  : assert(context is _MoonCarouselScrollableState),\n        super(\n          initialPixels: _getItemExtentFromScrollContext(context) * initialItem,\n        );\n\n  double get anchor => _getAnchorFromScrollContext(context);\n\n  static double _getAnchorFromScrollContext(ScrollContext context) =>\n      (context as _MoonCarouselScrollableState).anchor;\n\n  double get itemExtent => _getItemExtentFromScrollContext(context);\n\n  static double _getItemExtentFromScrollContext(ScrollContext context) =>\n      (context as _MoonCarouselScrollableState).itemExtent;\n\n  double get gap => _getGapFromScrollContext(context);\n\n  static double _getGapFromScrollContext(ScrollContext context) =>\n      (context as _MoonCarouselScrollableState).gap;\n\n  int get itemCount => _getItemCountFromScrollContext(context);\n\n  static int _getItemCountFromScrollContext(ScrollContext context) =>\n      (context as _MoonCarouselScrollableState).itemCount;\n\n  bool get clampMaxExtent => _getDeferMaxExtentFromScrollContext(context);\n\n  static bool _getDeferMaxExtentFromScrollContext(ScrollContext context) =>\n      (context as _MoonCarouselScrollableState).clampMaxExtent;\n\n  bool get loop => _getLoopFromScrollContext(context);\n\n  static bool _getLoopFromScrollContext(ScrollContext context) =>\n      (context as _MoonCarouselScrollableState).loop;\n\n  double get velocityFactor => _getVelocityFactorFromScrollContext(context);\n\n  static double _getVelocityFactorFromScrollContext(ScrollContext context) =>\n      (context as _MoonCarouselScrollableState).velocityFactor;\n\n  @override\n  int get itemIndex {\n    return _getItemFromOffset(\n      itemExtent: itemExtent,\n      minScrollExtent: hasContentDimensions ? minScrollExtent : 0.0,\n      maxScrollExtent: maxScrollExtent,\n      offset: pixels,\n    );\n  }\n\n  @override\n  double get maxScrollExtent {\n    if (loop) {\n      return super.hasContentDimensions ? super.maxScrollExtent : 0.0;\n    } else if (clampMaxExtent) {\n      final itemsToSubtract = viewportDimension ~/ itemExtent;\n      final remainderOfViewport = viewportDimension % itemExtent;\n      final anchorWhitespaceFactor = viewportDimension * anchor * 2;\n\n      return itemExtent * (itemCount - itemsToSubtract) -\n          remainderOfViewport +\n          anchorWhitespaceFactor -\n          gap;\n    } else {\n      return itemExtent * (itemCount - 1);\n    }\n  }\n\n  @override\n  MoonCarouselExtentMetrics copyWith({\n    AxisDirection? axisDirection,\n    double? devicePixelRatio,\n    double? minScrollExtent,\n    double? maxScrollExtent,\n    double? pixels,\n    double? viewportDimension,\n    int? itemIndex,\n  }) {\n    return MoonCarouselExtentMetrics(\n      axisDirection: axisDirection ?? this.axisDirection,\n      devicePixelRatio: devicePixelRatio ?? this.devicePixelRatio,\n      minScrollExtent: minScrollExtent ??\n          (hasContentDimensions ? this.minScrollExtent : 0.0),\n      maxScrollExtent: maxScrollExtent ?? this.maxScrollExtent,\n      pixels: pixels ?? this.pixels,\n      viewportDimension: viewportDimension ?? this.viewportDimension,\n      itemIndex: itemIndex ?? this.itemIndex,\n    );\n  }\n}\n\n/// The physics for the [MoonCarousel].\nclass MoonCarouselScrollPhysics extends ScrollPhysics {\n  /// Extends Flutter's [FixedExtentScrollPhysics] to implement\n  /// carousel-specific behavior. When [MoonCarousel.loop] is false, friction is\n  /// applied when the user tries to scroll beyond the viewport. The friction\n  /// factor is calculated the same way as in [BouncingScrollPhysics].\n  const MoonCarouselScrollPhysics({super.parent});\n\n  @override\n  MoonCarouselScrollPhysics applyTo(ScrollPhysics? ancestor) {\n    return MoonCarouselScrollPhysics(parent: buildParent(ancestor));\n  }\n\n  @override\n  double applyBoundaryConditions(ScrollMetrics position, double value) {\n    assert(() {\n      if (value == position.pixels) {\n        throw FlutterError.fromParts(<DiagnosticsNode>[\n          ErrorSummary(\n            '$runtimeType.applyBoundaryConditions() was called redundantly.',\n          ),\n          ErrorDescription(\n            'The proposed new position, $value, is exactly equal to the current '\n            'position of the given ${position.runtimeType}, ${position.pixels}.'\n            '\\n The applyBoundaryConditions method should only be called when '\n            'the value is going to actually change the pixels, otherwise it is '\n            'redundant.',\n          ),\n          DiagnosticsProperty<ScrollPhysics>(\n            'The physics object in question was',\n            this,\n            style: DiagnosticsTreeStyle.errorProperty,\n          ),\n          DiagnosticsProperty<ScrollMetrics>(\n            'The position object in question was',\n            position,\n            style: DiagnosticsTreeStyle.errorProperty,\n          ),\n        ]);\n      }\n\n      return true;\n    }());\n    if (value < position.pixels &&\n        position.pixels <= position.minScrollExtent) {\n      // Under-scroll.\n      return value - position.pixels;\n    }\n    if (position.maxScrollExtent <= position.pixels &&\n        position.pixels < value) {\n      // Overscroll.\n      return value - position.pixels;\n    }\n    if (value < position.minScrollExtent &&\n        position.minScrollExtent < position.pixels) {\n      // Hit top edge.\n      return value - position.minScrollExtent;\n    }\n    if (position.pixels < position.maxScrollExtent &&\n        position.maxScrollExtent < value) {\n      // Hit bottom edge.\n      return value - position.maxScrollExtent;\n    }\n    return 0.0;\n  }\n\n  @override\n  Simulation? createBallisticSimulation(\n    ScrollMetrics position,\n    double velocity,\n  ) {\n    final _MoonCarouselScrollPosition metrics =\n        position as _MoonCarouselScrollPosition;\n\n    // Scenario 1:\n    // If the carousel is out of range and not returning to range, we defer to\n    // the parent ballistics to bring the carousel back into range at the\n    // scrollable boundary.\n    if ((velocity <= 0.0 && metrics.pixels <= metrics.minScrollExtent) ||\n        (velocity >= 0.0 && metrics.pixels >= metrics.maxScrollExtent)) {\n      return super.createBallisticSimulation(metrics, velocity);\n    }\n\n    // Perform a test simulation to determine the carousel's ballistic\n    // trajectory without interference from carousel items, simulating a natural\n    // fall.\n    final Simulation? testFrictionSimulation = super.createBallisticSimulation(\n      metrics,\n      velocity * math.min(metrics.velocityFactor + 0.15, 1.0),\n    );\n\n    // Scenario 2:\n    // If the simulated trajectory would have taken the carousel beyond the\n    // scroll extent, defer back to the parent physics' ballistics to prevent it\n    // from overshooting the scrollable boundary.\n    if (testFrictionSimulation != null &&\n        (testFrictionSimulation.x(double.infinity) == metrics.minScrollExtent ||\n            testFrictionSimulation.x(double.infinity) ==\n                metrics.maxScrollExtent)) {\n      return super.createBallisticSimulation(metrics, velocity);\n    }\n\n    // From the simulated final position, identify the nearest item the carousel\n    // should have settled onto based on its natural trajectory.\n    final int settlingItemIndex = _getItemFromOffset(\n      itemExtent: metrics.itemExtent,\n      minScrollExtent: metrics.minScrollExtent,\n      maxScrollExtent: metrics.maxScrollExtent,\n      offset: testFrictionSimulation?.x(double.infinity) ?? metrics.pixels,\n    );\n\n    final double settlingPixels = settlingItemIndex * metrics.itemExtent;\n\n    // Scenario 3:\n    // If the carousel has zero velocity and is already at the position it\n    // should settle onto, there's no need for further action.\n    final Tolerance tolerance = toleranceFor(metrics);\n\n    if (velocity.abs() < tolerance.velocity &&\n        (settlingPixels - metrics.pixels).abs() < tolerance.distance) {\n      return null;\n    }\n\n    // Scenario 4:\n    // If the simulated trajectory indicates the carousel is likely to return to\n    // its initial position due to a lack of sufficient initial velocity, use a\n    // spring simulation.\n    if (settlingItemIndex == metrics.itemIndex) {\n      return SpringSimulation(\n        spring,\n        metrics.pixels,\n        settlingPixels,\n        velocity * metrics.velocityFactor,\n        tolerance: tolerance,\n      );\n    }\n\n    // Scenario 5:\n    // Create a new friction simulation, adjusting the drag force to ensure the\n    // carousel transitions to the nearest item, aligning with its natural\n    // stopping point.\n    return FrictionSimulation.through(\n      metrics.pixels,\n      settlingPixels,\n      velocity * metrics.velocityFactor,\n      tolerance.velocity * metrics.velocityFactor * velocity.sign,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/checkbox/checkbox.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/effects/effects_theme.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/opacities.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/utils/touch_target_padding.dart';\nimport 'package:moon_design/src/widgets/checkbox/checkbox_painter.dart';\nimport 'package:moon_design/src/widgets/common/effects/focus_effect.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonCheckbox extends StatefulWidget {\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// Whether the checkbox supports a tri-state (indeterminate).\n  ///\n  /// When tri-state is true, the checkbox can be in one of three states: true,\n  /// false, or null.\n  ///\n  /// When tri-state is false (the default), the checkbox [value] can only be\n  /// true or false.\n  ///\n  /// If tri-state is true, the checkbox displays a dash when its [value] is\n  /// null, indicating the mixed state.\n  ///\n  /// When a tri-state checkbox is tapped, its [onChanged] callback is invoked,\n  /// cycling through the three states:\n  /// * If the current value is false, the [value] becomes true.\n  /// * If the current value is true, the [value] becomes null (mixed state).\n  /// * If the current value is null (mixed state), the [value] becomes false.\n  ///\n  /// If tri-state is false, the [value] must not be null.\n  final bool tristate;\n\n  /// Whether the checkbox is checked.\n  ///\n  /// When [tristate] is true, a value of null corresponds to the mixed state.\n  /// When [tristate] is false, this value must not be null.\n  final bool? value;\n\n  /// The background color of the checked checkbox.\n  final Color? activeColor;\n\n  /// The background color of the unchecked checkbox.\n  final Color? inactiveColor;\n\n  /// The border color of the unchecked checkbox.\n  final Color? borderColor;\n\n  /// The color of the check icon when the checkbox is checked.\n  final Color? checkColor;\n\n  /// The size of the checkbox tap target.\n  ///\n  /// Defaults to 40.\n  final double tapAreaSizeValue;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The semantic label for the checkbox.\n  final String? semanticLabel;\n\n  /// The callback that is called when the checkbox value changes.\n  final ValueChanged<bool?>? onChanged;\n\n  /// Creates a Moon Design checkbox.\n  const MoonCheckbox({\n    super.key,\n    this.autofocus = false,\n    this.tristate = false,\n    required this.value,\n    this.activeColor,\n    this.borderColor,\n    this.checkColor,\n    this.inactiveColor,\n    this.tapAreaSizeValue = 40,\n    this.focusNode,\n    this.semanticLabel,\n    required this.onChanged,\n  });\n\n  @override\n  State<MoonCheckbox> createState() => _MoonCheckboxState();\n}\n\nclass _MoonCheckboxState extends State<MoonCheckbox>\n    with TickerProviderStateMixin, ToggleableStateMixin {\n  final MoonCheckboxPainter _painter = MoonCheckboxPainter();\n\n  bool? _previousValue;\n\n  @override\n  ValueChanged<bool?>? get onChanged => widget.onChanged;\n\n  @override\n  bool get tristate => widget.tristate;\n\n  @override\n  bool? get value => widget.value;\n\n  BorderSide? _resolveSide(BorderSide? side) {\n    if (side is MaterialStateBorderSide) {\n      return MaterialStateProperty.resolveAs<BorderSide?>(side, states);\n    }\n\n    if (!states.contains(MaterialState.selected)) return side;\n\n    return null;\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _previousValue = widget.value;\n  }\n\n  @override\n  void didUpdateWidget(MoonCheckbox oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (oldWidget.value != widget.value) {\n      _previousValue = oldWidget.value;\n      animateToValue();\n    }\n  }\n\n  @override\n  void dispose() {\n    _painter.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    const Size size = Size(16, 16);\n\n    final BorderRadiusGeometry effectiveBorderRadius =\n        context.moonTheme?.checkboxTheme.properties.borderRadius ??\n            MoonBorders.borders.interactiveXs;\n\n    final Color effectiveActiveColor = widget.activeColor ??\n        context.moonTheme?.checkboxTheme.colors.activeColor ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveInactiveColor = widget.inactiveColor ??\n        context.moonTheme?.checkboxTheme.colors.inactiveColor ??\n        Colors.transparent;\n\n    final Color effectiveCheckColor = widget.checkColor ??\n        context.moonTheme?.checkboxTheme.colors.checkColor ??\n        MoonColors.light.goten;\n\n    final Color effectiveBorderColor = widget.borderColor ??\n        context.moonTheme?.checkboxTheme.colors.borderColor ??\n        MoonColors.light.trunks;\n\n    final Color effectiveFocusEffectColor =\n        context.moonEffects?.controlFocusEffect.effectColor ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectColor;\n\n    final Duration effectiveFocusEffectDuration =\n        context.moonEffects?.controlFocusEffect.effectDuration ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectDuration;\n\n    final Curve effectiveFocusEffectCurve =\n        context.moonEffects?.controlFocusEffect.effectCurve ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectCurve;\n\n    final double effectiveFocusEffectExtent =\n        context.moonEffects?.controlFocusEffect.effectExtent ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectExtent;\n\n    final double effectiveDisabledOpacityValue =\n        context.moonOpacities?.disabled ?? MoonOpacities.opacities.disabled;\n\n    final MaterialStateProperty<MouseCursor> effectiveMouseCursor =\n        MaterialStateProperty.resolveWith<MouseCursor>(\n            (Set<MaterialState> states) {\n      return MaterialStateMouseCursor.clickable.resolve(states);\n    });\n\n    return Semantics(\n      label: widget.semanticLabel,\n      checked: widget.value ?? false,\n      mixed: widget.tristate ? widget.value == null : null,\n      child: TouchTargetPadding(\n        minSize: Size(widget.tapAreaSizeValue, widget.tapAreaSizeValue),\n        child: RepaintBoundary(\n          child: MoonFocusEffect(\n            show: states.contains(MaterialState.focused),\n            childBorderRadius: effectiveBorderRadius,\n            effectColor: effectiveFocusEffectColor,\n            effectCurve: effectiveFocusEffectCurve,\n            effectDuration: effectiveFocusEffectDuration,\n            effectExtent: effectiveFocusEffectExtent,\n            child: AnimatedOpacity(\n              opacity: states.contains(MaterialState.disabled)\n                  ? effectiveDisabledOpacityValue\n                  : 1,\n              duration: effectiveFocusEffectDuration,\n              child: buildToggleable(\n                mouseCursor: effectiveMouseCursor,\n                focusNode: widget.focusNode,\n                autofocus: widget.autofocus,\n                size: size,\n                painter: _painter\n                  ..position = position\n                  ..activeColor = effectiveActiveColor\n                  ..inactiveColor = effectiveInactiveColor\n                  ..checkColor = effectiveCheckColor\n                  ..value = value\n                  ..previousValue = _previousValue\n                  ..shape = MoonSquircleBorder(\n                    borderRadius:\n                        effectiveBorderRadius.squircleBorderRadius(context),\n                  )\n                  ..side = _resolveSide(\n                    BorderSide(color: effectiveBorderColor),\n                  ),\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/checkbox/checkbox_painter.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\nclass MoonCheckboxPainter extends ToggleablePainter {\n  static const double _kEdgeSize = 16;\n  static const double _kStrokeWidth = 1.0;\n\n  Color get checkColor => _checkColor!;\n  Color? _checkColor;\n\n  set checkColor(Color value) {\n    if (_checkColor == value) return;\n\n    _checkColor = value;\n    notifyListeners();\n  }\n\n  bool? get value => _value;\n  bool? _value;\n\n  set value(bool? value) {\n    if (_value == value) return;\n\n    _value = value;\n    notifyListeners();\n  }\n\n  bool? get previousValue => _previousValue;\n  bool? _previousValue;\n\n  set previousValue(bool? value) {\n    if (_previousValue == value) return;\n\n    _previousValue = value;\n    notifyListeners();\n  }\n\n  OutlinedBorder get shape => _shape!;\n  OutlinedBorder? _shape;\n\n  set shape(OutlinedBorder value) {\n    if (_shape == value) return;\n\n    _shape = value;\n    notifyListeners();\n  }\n\n  BorderSide? get side => _side;\n  BorderSide? _side;\n\n  set side(BorderSide? value) {\n    if (_side == value) return;\n\n    _side = value;\n    notifyListeners();\n  }\n\n  Rect _outerRectAt(Offset origin, double t) {\n    final Rect rect =\n        Rect.fromLTWH(origin.dx, origin.dy, _kEdgeSize, _kEdgeSize);\n\n    return rect;\n  }\n\n  // Controls the checkbox border or fill color based on its checked state.\n  //\n  // When the checkbox is unchecked (value == false), the border color is set to\n  // this value. When the checkbox is checked (value == true) or in the mixed\n  // state (value == null), the fill color is set to this value.\n  Color _colorAt(double t) {\n    // As t goes from 0.0 to 0.25, animate from the inactiveColor to activeColor.\n    return t >= 0.25\n        ? activeColor\n        : colorPremulLerp(inactiveColor, activeColor, t * 4.0)!;\n  }\n\n  // The white stroke is used to paint the check and dash.\n  Paint _createStrokePaint() {\n    return Paint()\n      ..color = checkColor\n      ..style = PaintingStyle.stroke\n      ..strokeWidth = _kStrokeWidth;\n  }\n\n  void _drawBox(\n    Canvas canvas,\n    Rect outer,\n    Paint paint,\n    BorderSide? side,\n    bool fill,\n  ) {\n    if (fill) canvas.drawPath(shape.getOuterPath(outer), paint);\n\n    if (side != null) shape.copyWith(side: side).paint(canvas, outer);\n  }\n\n  void _drawCheck(Canvas canvas, Offset origin, double t, Paint paint) {\n    assert(t >= 0.0 && t <= 1.0);\n    // As t goes from 0.0 to 1.0, animate the two check mark strokes from the\n    // short side to the long side.\n    final Path path = Path();\n\n    const Offset start = Offset(_kEdgeSize * 0.15, _kEdgeSize * 0.45);\n    const Offset mid = Offset(_kEdgeSize * 0.4, _kEdgeSize * 0.7);\n    const Offset end = Offset(_kEdgeSize * 0.85, _kEdgeSize * 0.25);\n\n    if (t < 0.5) {\n      final double strokeT = t * 2.0;\n      final Offset drawMid = Offset.lerp(start, mid, strokeT)!;\n\n      path.moveTo(origin.dx + start.dx, origin.dy + start.dy);\n      path.lineTo(origin.dx + drawMid.dx, origin.dy + drawMid.dy);\n    } else {\n      final double strokeT = (t - 0.5) * 2.0;\n      final Offset drawEnd = Offset.lerp(mid, end, strokeT)!;\n\n      path.moveTo(origin.dx + start.dx, origin.dy + start.dy);\n      path.lineTo(origin.dx + mid.dx, origin.dy + mid.dy);\n      path.lineTo(origin.dx + drawEnd.dx, origin.dy + drawEnd.dy);\n    }\n\n    canvas.drawPath(path, paint);\n  }\n\n  void _drawDash(Canvas canvas, Offset origin, double t, Paint paint) {\n    assert(t >= 0.0 && t <= 1.0);\n    // As t goes from 0.0 to 1.0, animate the horizontal line from the mid point\n    // outwards.\n    const Offset start = Offset(_kEdgeSize * 0.2, _kEdgeSize * 0.5);\n    const Offset mid = Offset(_kEdgeSize * 0.5, _kEdgeSize * 0.5);\n    const Offset end = Offset(_kEdgeSize * 0.8, _kEdgeSize * 0.5);\n\n    final Offset drawStart = Offset.lerp(start, mid, 1.0 - t)!;\n    final Offset drawEnd = Offset.lerp(mid, end, t)!;\n\n    canvas.drawLine(origin + drawStart, origin + drawEnd, paint);\n  }\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final Paint strokePaint = _createStrokePaint();\n    final Offset origin =\n        size / 2.0 - const Size.square(_kEdgeSize) / 2.0 as Offset;\n    final AnimationStatus status = position.status;\n    final double tNormalized =\n        status == AnimationStatus.forward || status == AnimationStatus.completed\n            ? position.value\n            : 1.0 - position.value;\n\n    // Four cases: false to null, false to true, null to false, true to false.\n    if (previousValue == false || value == false) {\n      final double t = value == false ? 1.0 - tNormalized : tNormalized;\n      final Rect outer = _outerRectAt(origin, t);\n      final Paint paint = Paint()..color = _colorAt(t);\n\n      if (t <= 0.5) {\n        final BorderSide border = side ?? BorderSide(color: paint.color);\n\n        _drawBox(canvas, outer, paint, border, true); // Only paint the border.\n      } else {\n        _drawBox(canvas, outer, paint, side, true);\n\n        final double tShrink = (t - 0.5) * 2.0;\n\n        if (previousValue == null || value == null) {\n          _drawDash(canvas, origin, tShrink, strokePaint);\n        } else {\n          _drawCheck(canvas, origin, tShrink, strokePaint);\n        }\n      }\n    } else {\n      // Two cases: null to true, true to null.\n      final Rect outer = _outerRectAt(origin, 1.0);\n      final Paint paint = Paint()..color = _colorAt(1.0);\n\n      _drawBox(canvas, outer, paint, side, true);\n\n      if (tNormalized <= 0.5) {\n        final double tShrink = 1.0 - tNormalized * 2.0;\n\n        if (previousValue ?? false) {\n          _drawCheck(canvas, origin, tShrink, strokePaint);\n        } else {\n          _drawDash(canvas, origin, tShrink, strokePaint);\n        }\n      } else {\n        final double tExpand = (tNormalized - 0.5) * 2.0;\n\n        if (value ?? false) {\n          _drawCheck(canvas, origin, tExpand, strokePaint);\n        } else {\n          _drawDash(canvas, origin, tExpand, strokePaint);\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/chip/chip.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/chip/chip_size_properties.dart';\nimport 'package:moon_design/src/theme/chip/chip_sizes.dart';\nimport 'package:moon_design/src/theme/effects/effects_theme.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/utils/color_tween_premul.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/widgets/common/base_control.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonChipSize {\n  sm,\n  md,\n}\n\nclass MoonChip extends StatefulWidget {\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// Whether the chip is focusable.\n  final bool isFocusable;\n\n  /// Whether to ensure a minimum touch target size for the chip.\n  final bool ensureMinimalTouchTargetSize;\n\n  /// Whether the chip is active (selected).\n  final bool isActive;\n\n  /// Whether to show a border around the chip.\n  final bool showBorder;\n\n  /// Whether to show a focus outline effect when the chip is focused.\n  final bool showFocusEffect;\n\n  /// The border radius of the chip.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The text and border color of the chip when [isActive] is true.\n  final Color? activeColor;\n\n  /// The background color of the chip.\n  final Color? backgroundColor;\n\n  /// The background color of the chip when [isActive] is true.\n  final Color? activeBackgroundColor;\n\n  /// The border color of the chip.\n  final Color? borderColor;\n\n  /// The color of the chip focus effect.\n  final Color? focusEffectColor;\n\n  /// The text color of the chip.\n  final Color? textColor;\n\n  /// The custom decoration of the chip.\n  final Decoration? decoration;\n\n  /// The border width of the chip.\n  final double? borderWidth;\n\n  /// The opacity value of the disabled chip.\n  final double? disabledOpacityValue;\n\n  /// The extent of the chip focus effect.\n  final double? focusEffectExtent;\n\n  /// The gap between the [leading], [label] and [trailing] widgets of the chip.\n  final double? gap;\n\n  /// The height of the chip.\n  final double? height;\n\n  /// The width of the chip.\n  final double? width;\n\n  /// The minimum size of the chip touch target.\n  final double minTouchTargetSize;\n\n  /// The duration of the chip active state effect.\n  final Duration? activeEffectDuration;\n\n  /// The duration of the chip focus effect.\n  final Duration? focusEffectDuration;\n\n  /// The curve of the chip active state effect.\n  final Curve? activeEffectCurve;\n\n  /// The curve of the chip focus effect.\n  final Curve? focusEffectCurve;\n\n  /// The padding of the chip.\n  final EdgeInsetsGeometry? padding;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The size of the chip.\n  final MoonChipSize? chipSize;\n\n  /// The semantic label for the chip.\n  final String? semanticLabel;\n\n  /// The callback that is called when the chip is tapped or pressed.\n  final VoidCallback? onTap;\n\n  /// The callback that is called when the chip is long-pressed.\n  final VoidCallback? onLongPress;\n\n  /// The widget to display before the [label] widget of the chip.\n  final Widget? leading;\n\n  /// The primary content of the chip widget.\n  final Widget? label;\n\n  /// The widget to display after the [label] widget of the chip.\n  final Widget? trailing;\n\n  /// Creates a Moon Design chip.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonChip.text], Moon Design text chip.\n  const MoonChip({\n    super.key,\n    this.autofocus = false,\n    this.isFocusable = true,\n    this.ensureMinimalTouchTargetSize = false,\n    this.isActive = false,\n    this.showBorder = false,\n    this.showFocusEffect = true,\n    this.borderRadius,\n    this.activeColor,\n    this.backgroundColor,\n    this.activeBackgroundColor,\n    this.borderColor,\n    this.focusEffectColor,\n    this.textColor,\n    this.decoration,\n    this.borderWidth,\n    this.disabledOpacityValue,\n    this.focusEffectExtent,\n    this.gap,\n    this.height,\n    this.width,\n    this.minTouchTargetSize = 40,\n    this.activeEffectDuration,\n    this.focusEffectDuration,\n    this.activeEffectCurve,\n    this.focusEffectCurve,\n    this.padding,\n    this.focusNode,\n    this.chipSize,\n    this.semanticLabel,\n    this.onTap,\n    this.onLongPress,\n    this.label,\n    this.leading,\n    this.trailing,\n  });\n\n  /// Creates a Moon Design text chip.\n  const MoonChip.text({\n    super.key,\n    this.autofocus = false,\n    this.isFocusable = true,\n    this.ensureMinimalTouchTargetSize = false,\n    this.isActive = false,\n    this.showBorder = false,\n    this.showFocusEffect = true,\n    this.borderRadius,\n    this.activeColor,\n    this.activeBackgroundColor,\n    this.borderColor,\n    this.focusEffectColor,\n    this.textColor,\n    this.borderWidth,\n    this.disabledOpacityValue,\n    this.focusEffectExtent,\n    this.gap,\n    this.height,\n    this.width,\n    this.minTouchTargetSize = 40,\n    this.focusEffectDuration,\n    this.activeEffectDuration,\n    this.focusEffectCurve,\n    this.activeEffectCurve,\n    this.padding,\n    this.focusNode,\n    this.chipSize,\n    this.decoration,\n    this.semanticLabel,\n    this.onTap,\n    this.onLongPress,\n    this.label,\n    this.leading,\n    this.trailing,\n  }) : backgroundColor = Colors.transparent;\n\n  @override\n  State<MoonChip> createState() => _MoonChipState();\n}\n\nclass _MoonChipState extends State<MoonChip>\n    with SingleTickerProviderStateMixin {\n  final ColorTweenWithPremultipliedAlpha _backgroundColorTween =\n      ColorTweenWithPremultipliedAlpha();\n  final ColorTweenWithPremultipliedAlpha _borderColorTween =\n      ColorTweenWithPremultipliedAlpha();\n  final ColorTweenWithPremultipliedAlpha _textColorTween =\n      ColorTweenWithPremultipliedAlpha();\n\n  Animation<Color?>? _backgroundColor;\n  Animation<Color?>? _borderColor;\n  Animation<Color?>? _textColor;\n\n  AnimationController? _animationController;\n\n  void _handleActiveEffect(bool shouldAnimate) {\n    shouldAnimate\n        ? _animationController?.forward()\n        : _animationController?.reverse();\n  }\n\n  MoonChipSizeProperties _getMoonChipSize(\n    BuildContext context,\n    MoonChipSize? moonChipSize,\n  ) {\n    switch (moonChipSize) {\n      case MoonChipSize.sm:\n        return context.moonTheme?.chipTheme.sizes.sm ??\n            MoonChipSizes(tokens: MoonTokens.light).sm;\n      case MoonChipSize.md:\n        return context.moonTheme?.chipTheme.sizes.md ??\n            MoonChipSizes(tokens: MoonTokens.light).md;\n      default:\n        return context.moonTheme?.chipTheme.sizes.md ??\n            MoonChipSizes(tokens: MoonTokens.light).md;\n    }\n  }\n\n  @override\n  void dispose() {\n    _animationController?.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final MoonChipSizeProperties effectiveMoonChipSize =\n        _getMoonChipSize(context, widget.chipSize);\n\n    final BorderRadiusGeometry effectiveBorderRadius =\n        widget.borderRadius ?? effectiveMoonChipSize.borderRadius;\n\n    final double effectiveBorderWidth = widget.borderWidth ??\n        context.moonBorders?.defaultBorderWidth ??\n        MoonBorders.borders.defaultBorderWidth;\n\n    final double effectiveHeight =\n        widget.height ?? effectiveMoonChipSize.height;\n\n    final double effectiveGap = widget.gap ?? effectiveMoonChipSize.gap;\n\n    final Color effectiveActiveColor = widget.activeColor ??\n        context.moonTheme?.chipTheme.colors.activeColor ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.chipTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveActiveBackgroundColor = widget.activeBackgroundColor ??\n        context.moonTheme?.chipTheme.colors.activeBackgroundColor ??\n        MoonColors.light.jiren;\n\n    final Color effectiveTextColor = widget.textColor ??\n        context.moonTheme?.chipTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    final Duration effectiveActiveEffectDuration =\n        widget.activeEffectDuration ??\n            context.moonEffects?.controlHoverEffect.hoverDuration ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlHoverEffect\n                .hoverDuration;\n\n    final Curve effectiveActiveEffectCurve = widget.activeEffectCurve ??\n        context.moonEffects?.controlHoverEffect.hoverCurve ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlHoverEffect\n            .hoverCurve;\n\n    final EdgeInsetsGeometry effectivePadding =\n        widget.padding ?? effectiveMoonChipSize.padding;\n\n    final EdgeInsets resolvedDirectionalPadding =\n        effectivePadding.resolve(Directionality.of(context));\n\n    final EdgeInsetsGeometry correctedPadding = widget.padding == null\n        ? EdgeInsetsDirectional.fromSTEB(\n            widget.leading == null && widget.label != null\n                ? resolvedDirectionalPadding.left\n                : 0,\n            resolvedDirectionalPadding.top,\n            widget.trailing == null && widget.label != null\n                ? resolvedDirectionalPadding.right\n                : 0,\n            resolvedDirectionalPadding.bottom,\n          )\n        : resolvedDirectionalPadding;\n\n    _animationController ??= AnimationController(\n      duration: effectiveActiveEffectDuration,\n      vsync: this,\n    );\n\n    _backgroundColor ??= _animationController!.drive(\n      _backgroundColorTween\n          .chain(CurveTween(curve: effectiveActiveEffectCurve)),\n    );\n\n    _borderColor ??= _animationController!.drive(\n      _borderColorTween.chain(CurveTween(curve: effectiveActiveEffectCurve)),\n    );\n\n    _textColor ??= _animationController!.drive(\n      _textColorTween.chain(CurveTween(curve: effectiveActiveEffectCurve)),\n    );\n\n    _backgroundColorTween\n      ..begin = effectiveBackgroundColor\n      ..end = effectiveActiveBackgroundColor;\n\n    _borderColorTween\n      ..begin = Colors.transparent\n      ..end = widget.borderColor ?? effectiveActiveColor;\n\n    _textColorTween\n      ..begin = effectiveTextColor\n      ..end = effectiveActiveColor;\n\n    return MoonBaseControl(\n      autofocus: widget.autofocus,\n      isFocusable: widget.isFocusable,\n      ensureMinimalTouchTargetSize: widget.ensureMinimalTouchTargetSize,\n      showFocusEffect: widget.showFocusEffect,\n      borderRadius: effectiveBorderRadius,\n      backgroundColor: widget.backgroundColor,\n      focusEffectColor: widget.focusEffectColor,\n      disabledOpacityValue: widget.disabledOpacityValue,\n      minTouchTargetSize: widget.minTouchTargetSize,\n      focusEffectExtent: widget.focusEffectExtent,\n      focusEffectDuration: widget.focusEffectDuration,\n      focusEffectCurve: widget.focusEffectCurve,\n      focusNode: widget.focusNode,\n      semanticLabel: widget.semanticLabel,\n      onTap: widget.onTap ?? () {},\n      onLongPress: widget.onLongPress,\n      builder: (\n        BuildContext context,\n        bool isEnabled,\n        bool isHovered,\n        bool isFocused,\n        bool isPressed,\n      ) {\n        final bool canAnimate = widget.isActive || isHovered || isFocused;\n\n        _handleActiveEffect(canAnimate);\n\n        return AnimatedBuilder(\n          animation: _animationController!,\n          builder: (BuildContext context, Widget? child) {\n            return IconTheme(\n              data: IconThemeData(\n                color: _textColor!.value,\n                size: effectiveMoonChipSize.iconSizeValue,\n              ),\n              child: DefaultTextStyle(\n                style: effectiveMoonChipSize.textStyle\n                    .copyWith(color: _textColor!.value),\n                child: Container(\n                  width: widget.width,\n                  height: effectiveHeight,\n                  padding: correctedPadding,\n                  constraints: BoxConstraints(minWidth: effectiveHeight),\n                  decoration: widget.decoration ??\n                      ShapeDecoration(\n                        color: _backgroundColor!.value,\n                        shape: MoonSquircleBorder(\n                          borderRadius: effectiveBorderRadius\n                              .squircleBorderRadius(context),\n                          side: BorderSide(\n                            color: widget.showBorder\n                                ? _borderColor!.value!\n                                : Colors.transparent,\n                            width: widget.showBorder ? effectiveBorderWidth : 0,\n                            style: widget.showBorder\n                                ? BorderStyle.solid\n                                : BorderStyle.none,\n                          ),\n                        ),\n                      ),\n                  child: child,\n                ),\n              ),\n            );\n          },\n          child: Row(\n            mainAxisSize: MainAxisSize.min,\n            mainAxisAlignment: MainAxisAlignment.center,\n            children: [\n              if (widget.leading != null)\n                Padding(\n                  padding: EdgeInsets.symmetric(horizontal: effectiveGap),\n                  child: widget.leading,\n                ),\n              if (widget.label != null) widget.label!,\n              if (widget.trailing != null)\n                Padding(\n                  padding: EdgeInsets.symmetric(horizontal: effectiveGap),\n                  child: widget.trailing,\n                ),\n            ],\n          ),\n        );\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/animated_icon_theme.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:moon_design/src/utils/color_tween_premul.dart';\n\nclass AnimatedIconTheme extends ImplicitlyAnimatedWidget {\n  /// The target color for the icon.\n  ///\n  /// The color must not be null.\n  ///\n  /// When this property is set, the icon color will be animated over the\n  /// specified [duration] time.\n  final Color? color;\n\n  /// The target size for the icon.\n  ///\n  /// The size must not be null.\n  ///\n  /// When this property is set, the icon size will be animated over the\n  /// specified [duration] time.\n  final double? size;\n\n  /// The widget below this animated icon theme widget in the tree.\n  ///\n  /// {@macro flutter.widgets.ProxyWidget.child}\n  final Widget child;\n\n  /// Creates a widget that animates the icon properties implicitly.\n  ///\n  /// The [child] and [duration] arguments must not be null.\n  const AnimatedIconTheme({\n    super.key,\n    super.onEnd,\n    super.curve,\n    required super.duration,\n    this.color,\n    this.size,\n    required this.child,\n  });\n\n  @override\n  AnimatedWidgetBaseState<AnimatedIconTheme> createState() =>\n      _AnimatedIconThemeState();\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties.add(\n      DiagnosticsProperty<Color>('iconColor', color, defaultValue: null),\n    );\n    properties.add(\n      DiagnosticsProperty<double>('iconSize', size, defaultValue: null),\n    );\n  }\n}\n\nclass _AnimatedIconThemeState\n    extends AnimatedWidgetBaseState<AnimatedIconTheme> {\n  ColorTweenWithPremultipliedAlpha? _color;\n  SizeTween? _size;\n\n  @override\n  void forEachTween(TweenVisitor<dynamic> visitor) {\n    if (widget.color != null) {\n      _color = visitor(\n        _color,\n        widget.color,\n        (dynamic value) =>\n            ColorTweenWithPremultipliedAlpha(begin: value as Color),\n      ) as ColorTweenWithPremultipliedAlpha?;\n    }\n\n    if (widget.size != null) {\n      _size = visitor(\n        _size,\n        Size(widget.size!, widget.size!),\n        (dynamic value) => SizeTween(begin: value as Size),\n      ) as SizeTween?;\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return IconTheme(\n      data: IconThemeData(\n        color: _color?.evaluate(animation),\n        size: _size?.evaluate(animation)?.height,\n      ),\n      child: widget.child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/base_control.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/effects/effects_theme.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/opacities.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/touch_target_padding.dart';\nimport 'package:moon_design/src/widgets/common/effects/focus_effect.dart';\nimport 'package:moon_design/src/widgets/common/effects/pulse_effect.dart';\n\ntypedef MoonBaseControlBuilder = Widget Function(\n  BuildContext context,\n  bool isEnabled,\n  bool isHovered,\n  bool isFocused,\n  bool isPressed,\n);\n\nclass MoonBaseControl extends StatefulWidget {\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// Whether to absorb the drag events of the base control.\n  final bool absorbDragEvents;\n\n  /// Whether the base control is focusable.\n  final bool isFocusable;\n\n  /// Whether to ensure a minimum touch target size for the base control.\n  final bool ensureMinimalTouchTargetSize;\n\n  /// Whether the semantic type of the base control is button.\n  final bool semanticTypeIsButton;\n\n  /// Whether to propagate gestures to the child of the base control.\n  final bool propagateGesturesToChild;\n\n  /// Whether the base control shows a focus effect.\n  final bool showFocusEffect;\n\n  /// Whether the base control shows a pulse effect.\n  final bool showPulseEffect;\n\n  /// Whether the base control shows a jiggle during the pulse effect.\n  final bool showPulseEffectJiggle;\n\n  /// Whether the base control shows a scale effect.\n  final bool showScaleEffect;\n\n  /// The border radius of the base control.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the base control.\n  final Color? backgroundColor;\n\n  /// The color of the base control focus effect.\n  final Color? focusEffectColor;\n\n  /// The color of the base control pulse effect.\n  final Color? pulseEffectColor;\n\n  /// The opacity value of the base control when disabled.\n  final double? disabledOpacityValue;\n\n  /// The minimum size of the base control touch target.\n  final double minTouchTargetSize;\n\n  /// The extent of the base control focus effect.\n  final double? focusEffectExtent;\n\n  /// The extent of the base control pulse effect.\n  final double? pulseEffectExtent;\n\n  /// The degree of scaling applied during the scale effect.\n  final double? scaleEffectScalar;\n\n  /// The duration of the focus effect.\n  final Duration? focusEffectDuration;\n\n  /// The duration of the pulse effect.\n  final Duration? pulseEffectDuration;\n\n  /// The duration of the scale effect.\n  final Duration? scaleEffectDuration;\n\n  /// The curve of the focus effect.\n  final Curve? focusEffectCurve;\n\n  /// The curve of the pulse effect.\n  final Curve? pulseEffectCurve;\n\n  /// The curve of the scale effect.\n  final Curve? scaleEffectCurve;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// A builder to build a custom child for the base control.\n  /// Cannot be used in conjunction with the [child] property, one of them must\n  /// be null.\n  final MoonBaseControlBuilder? builder;\n\n  /// The mouse cursor of the base control.\n  final MouseCursor cursor;\n\n  /// The semantic label for the base control.\n  final String? semanticLabel;\n\n  /// The callback that is called when the base control focus state changes.\n  final void Function(bool)? onFocus;\n\n  /// The callback that is called when the base control hover state changes.\n  final void Function(bool)? onHover;\n\n  /// The callback that is called when the base control is tapped or pressed.\n  final VoidCallback? onTap;\n\n  /// The callback that is called when the base control is long-pressed.\n  final VoidCallback? onLongPress;\n\n  /// The child of the base control.\n  /// Cannot be used in conjunction with the [builder] property, one of them\n  /// must be null.\n  final Widget? child;\n\n  /// Creates a Moon Design base control.\n  const MoonBaseControl({\n    super.key,\n    this.autofocus = false,\n    this.absorbDragEvents = false,\n    this.isFocusable = true,\n    this.ensureMinimalTouchTargetSize = false,\n    this.semanticTypeIsButton = false,\n    this.propagateGesturesToChild = false,\n    this.showFocusEffect = true,\n    this.showPulseEffect = false,\n    this.showPulseEffectJiggle = true,\n    this.showScaleEffect = false,\n    this.borderRadius = BorderRadius.zero,\n    this.backgroundColor,\n    this.focusEffectColor,\n    this.pulseEffectColor,\n    this.disabledOpacityValue,\n    this.minTouchTargetSize = 40.0,\n    this.focusEffectExtent,\n    this.pulseEffectExtent,\n    this.scaleEffectScalar,\n    this.focusEffectDuration,\n    this.pulseEffectDuration,\n    this.scaleEffectDuration,\n    this.focusEffectCurve,\n    this.pulseEffectCurve,\n    this.scaleEffectCurve,\n    this.focusNode,\n    this.builder,\n    this.cursor = SystemMouseCursors.click,\n    this.semanticLabel,\n    this.onFocus,\n    this.onHover,\n    this.onTap,\n    this.onLongPress,\n    this.child,\n  }) : assert(\n          (child == null) != (builder == null),\n          \"Only either a child or a builder can be provided, not both.\",\n        );\n\n  @override\n  State<MoonBaseControl> createState() => _MoonBaseControlState();\n}\n\nclass _MoonBaseControlState extends State<MoonBaseControl> {\n  late Map<Type, Action<Intent>> _actions;\n\n  FocusNode? _focusNode;\n\n  bool _isFocused = false;\n  bool _isHovered = false;\n  bool _isPressed = false;\n  bool _isLongPressed = false;\n\n  bool get _isEnabled => widget.onTap != null || widget.onLongPress != null;\n\n  MouseCursor get _cursor =>\n      _isEnabled ? widget.cursor : SystemMouseCursors.basic;\n\n  FocusNode get _effectiveFocusNode =>\n      widget.focusNode ??\n      (_focusNode ??= FocusNode(skipTraversal: !widget.isFocusable));\n\n  bool get _hasPrimaryFocus => _effectiveFocusNode.hasPrimaryFocus;\n\n  bool get _canAnimateFocus =>\n      widget.showFocusEffect && _isEnabled && _isFocused && _hasPrimaryFocus;\n\n  bool get _canAnimatePulse => widget.showPulseEffect && _isEnabled;\n\n  bool get _canAnimateScale =>\n      widget.showScaleEffect && _isEnabled && (_isPressed || _isLongPressed);\n\n  void _handleHover(bool hover) {\n    if (hover != _isHovered) {\n      setState(() => _isHovered = hover);\n\n      widget.onHover?.call(hover);\n    }\n  }\n\n  void _handleFocus(bool focus) {\n    if (focus != _isFocused && _hasPrimaryFocus) {\n      setState(() => _isFocused = focus);\n\n      widget.onFocus?.call(focus);\n    }\n  }\n\n  void _handleFocusChange(bool hasFocus) {\n    setState(() {\n      _isFocused = hasFocus && _hasPrimaryFocus;\n\n      if (!hasFocus) {\n        _isPressed = false;\n      }\n    });\n  }\n\n  void _handleTap() {\n    if (_isEnabled) {\n      setState(() => _isPressed = true);\n\n      widget.onTap?.call();\n\n      setState(() => _isPressed = false);\n    }\n  }\n\n  void _handleTapDown(_) {\n    if (!_isPressed) {\n      setState(() => _isPressed = true);\n    }\n  }\n\n  void _handleTapUp(_) {\n    if (_isPressed) {\n      setState(() => _isPressed = false);\n    }\n  }\n\n  void _handleTapCancel() {\n    if (_isPressed) {\n      setState(() => _isPressed = false);\n    }\n  }\n\n  void _handleLongPress() {\n    if (widget.onLongPress == null) return;\n\n    if (_isEnabled) {\n      widget.onLongPress?.call();\n    }\n  }\n\n  void _handleLongPressStart(_) {\n    if (!_isLongPressed) {\n      setState(() => _isLongPressed = true);\n    }\n\n    if (!_isPressed) {\n      setState(() => _isPressed = true);\n    }\n  }\n\n  void _handleLongPressUp() {\n    if (widget.onLongPress == null) {\n      widget.onTap?.call();\n    }\n\n    if (_isLongPressed) {\n      setState(() => _isLongPressed = false);\n    }\n\n    if (_isPressed) {\n      setState(() => _isPressed = false);\n    }\n  }\n\n  void _handleHorizontalDragStart(DragStartDetails dragStartDetails) =>\n      _handleTapDown(null);\n\n  void _handleHorizontalDragEnd(DragEndDetails dragEndDetails) =>\n      _handleTapUp(null);\n\n  void _handleVerticalDragStart(DragStartDetails dragStartDetails) =>\n      _handleTapDown(null);\n\n  void _handleVerticalDragEnd(DragEndDetails dragEndDetails) =>\n      _handleTapUp(null);\n\n  Color _getFocusColor({required Color focusColor}) {\n    if (widget.backgroundColor != null) {\n      return context.isDarkMode\n          ? widget.backgroundColor!.withOpacity(0.8)\n          : widget.backgroundColor!.withOpacity(0.2);\n    } else {\n      return focusColor;\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _actions = <Type, Action<Intent>>{\n      ActivateIntent: CallbackAction<Intent>(onInvoke: (_) => _handleTap()),\n    };\n\n    _focusNode = FocusNode(\n      canRequestFocus: _isEnabled,\n      skipTraversal: !widget.isFocusable,\n    );\n    _effectiveFocusNode.canRequestFocus = _isEnabled;\n\n    if (widget.autofocus) {\n      _effectiveFocusNode.requestFocus();\n    }\n  }\n\n  @override\n  void didUpdateWidget(MoonBaseControl oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (widget.onTap != oldWidget.onTap ||\n        widget.onLongPress != oldWidget.onLongPress) {\n      if (!_isEnabled) {\n        _isHovered = _isPressed = false;\n      }\n    }\n\n    _effectiveFocusNode.canRequestFocus = _isEnabled;\n  }\n\n  @override\n  void dispose() {\n    _focusNode!.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final double effectiveDisabledOpacityValue = widget.disabledOpacityValue ??\n        context.moonOpacities?.disabled ??\n        MoonOpacities.opacities.disabled;\n\n    // Focus effect properties.\n    final Color effectiveFocusEffectColor = widget.focusEffectColor ??\n        context.moonEffects?.controlFocusEffect.effectColor ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlFocusEffect\n            .effectColor;\n\n    final Color focusColor =\n        _getFocusColor(focusColor: effectiveFocusEffectColor);\n\n    final double effectiveFocusEffectExtent = widget.focusEffectExtent ??\n        context.moonEffects?.controlFocusEffect.effectExtent ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlFocusEffect\n            .effectExtent;\n\n    final Duration effectiveFocusEffectDuration = widget.focusEffectDuration ??\n        context.moonEffects?.controlFocusEffect.effectDuration ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlFocusEffect\n            .effectDuration;\n\n    final Curve effectiveFocusEffectCurve = widget.focusEffectCurve ??\n        context.moonEffects?.controlFocusEffect.effectCurve ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlFocusEffect\n            .effectCurve;\n\n    // Pulse effect properties.\n    final Color effectivePulseEffectColor = widget.pulseEffectColor ??\n        context.moonEffects?.controlPulseEffect.effectColor ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlPulseEffect\n            .effectColor!;\n\n    final double effectivePulseEffectExtent = widget.pulseEffectExtent ??\n        context.moonEffects?.controlPulseEffect.effectExtent ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlPulseEffect\n            .effectExtent!;\n\n    final Duration effectivePulseEffectDuration = widget.pulseEffectDuration ??\n        context.moonEffects?.controlPulseEffect.effectDuration ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlPulseEffect\n            .effectDuration;\n\n    final Curve effectivePulseEffectCurve = widget.pulseEffectCurve ??\n        context.moonEffects?.controlPulseEffect.effectCurve ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlPulseEffect\n            .effectCurve;\n\n    // Scale effect properties.\n    final double effectiveScaleEffectScalar = widget.scaleEffectScalar ??\n        context.moonEffects?.controlScaleEffect.effectScalar ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlScaleEffect\n            .effectScalar!;\n\n    final Duration effectiveScaleEffectDuration = widget.scaleEffectDuration ??\n        context.moonEffects?.controlScaleEffect.effectDuration ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlScaleEffect\n            .effectDuration;\n\n    final Curve effectiveScaleEffectCurve = widget.scaleEffectCurve ??\n        context.moonEffects?.controlScaleEffect.effectCurve ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlScaleEffect\n            .effectCurve;\n\n    final Widget child = widget.child ??\n        widget.builder!(\n          context,\n          _isEnabled,\n          _isHovered,\n          _isFocused,\n          _isPressed,\n        );\n\n    return MergeSemantics(\n      child: Semantics(\n        label: widget.semanticLabel,\n        button: widget.semanticTypeIsButton,\n        enabled: _isEnabled,\n        focusable: _isEnabled,\n        focused: _isFocused,\n        child: AbsorbPointer(\n          absorbing: !_isEnabled,\n          child: FocusableActionDetector(\n            enabled: _isEnabled,\n            actions: _actions,\n            mouseCursor: _cursor,\n            focusNode: _effectiveFocusNode,\n            autofocus: _isEnabled && widget.isFocusable && widget.autofocus,\n            descendantsAreFocusable: _isEnabled,\n            descendantsAreTraversable: _isEnabled,\n            onFocusChange: _handleFocusChange,\n            onShowFocusHighlight: _handleFocus,\n            onShowHoverHighlight: _handleHover,\n            child: GestureDetector(\n              excludeFromSemantics: true,\n              onTap: _handleTap,\n              onTapDown: _handleTapDown,\n              onTapUp: _handleTapUp,\n              onLongPress: _handleLongPress,\n              onLongPressStart: _handleLongPressStart,\n              onLongPressUp: _handleLongPressUp,\n              onTapCancel: _handleTapCancel,\n              onHorizontalDragStart:\n                  widget.absorbDragEvents ? _handleHorizontalDragStart : null,\n              onHorizontalDragEnd:\n                  widget.absorbDragEvents ? _handleHorizontalDragEnd : null,\n              onVerticalDragStart:\n                  widget.absorbDragEvents ? _handleVerticalDragStart : null,\n              onVerticalDragEnd:\n                  widget.absorbDragEvents ? _handleVerticalDragEnd : null,\n              child: TouchTargetPadding(\n                minSize: widget.ensureMinimalTouchTargetSize\n                    ? Size(widget.minTouchTargetSize, widget.minTouchTargetSize)\n                    : Size.zero,\n                child: AbsorbPointer(\n                  absorbing: !widget.propagateGesturesToChild,\n                  child: RepaintBoundary(\n                    child: AnimatedScale(\n                      scale: _canAnimateScale ? effectiveScaleEffectScalar : 1,\n                      duration: effectiveScaleEffectDuration,\n                      curve: effectiveScaleEffectCurve,\n                      child: MoonPulseEffect(\n                        show: _canAnimatePulse,\n                        showJiggle: widget.showPulseEffectJiggle,\n                        childBorderRadius: widget.borderRadius,\n                        effectColor: effectivePulseEffectColor,\n                        effectExtent: effectivePulseEffectExtent,\n                        effectCurve: effectivePulseEffectCurve,\n                        effectDuration: effectivePulseEffectDuration,\n                        child: AnimatedOpacity(\n                          opacity:\n                              _isEnabled ? 1 : effectiveDisabledOpacityValue,\n                          duration: context\n                                  .moonTransitions?.defaultTransitionDuration ??\n                              MoonTransitions\n                                  .transitions.defaultTransitionDuration,\n                          curve:\n                              context.moonTransitions?.defaultTransitionCurve ??\n                                  MoonTransitions\n                                      .transitions.defaultTransitionCurve,\n                          child: MoonFocusEffect(\n                            show: _canAnimateFocus,\n                            effectColor: focusColor,\n                            effectExtent: effectiveFocusEffectExtent,\n                            effectCurve: effectiveFocusEffectCurve,\n                            effectDuration: effectiveFocusEffectDuration,\n                            childBorderRadius: widget.borderRadius,\n                            child: child,\n                          ),\n                        ),\n                      ),\n                    ),\n                  ),\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/base_segmented_tab_bar.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass BaseSegmentedTabBar extends StatefulWidget {\n  final bool isExpanded;\n  final double gap;\n  final TabController? tabController;\n  final ValueChanged<int> valueChanged;\n  final List<Widget> children;\n\n  /// Creates a Moon Design base segmented tab bar.\n  const BaseSegmentedTabBar({\n    super.key,\n    required this.isExpanded,\n    required this.gap,\n    this.tabController,\n    required this.valueChanged,\n    required this.children,\n  });\n\n  @override\n  _BaseSegmentedTabBarState createState() => _BaseSegmentedTabBarState();\n}\n\nclass _BaseSegmentedTabBarState extends State<BaseSegmentedTabBar>\n    with TickerProviderStateMixin {\n  late TabController? _controller;\n\n  @override\n  void didChangeDependencies() {\n    super.didChangeDependencies();\n\n    _controller = widget.tabController ?? DefaultTabController.maybeOf(context);\n  }\n\n  void _handleTap(int index) {\n    assert(index >= 0 && index < widget.children.length);\n\n    _controller?.index = index;\n    widget.valueChanged.call(index);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Row(\n      mainAxisSize: MainAxisSize.min,\n      children: List.generate(\n        widget.children.length * 2 - 1,\n        (int index) {\n          final int derivedIndex = index ~/ 2;\n\n          final Widget child = Listener(\n            onPointerDown: (_) => _handleTap(derivedIndex),\n            child: widget.children[derivedIndex],\n          );\n\n          return index.isEven\n              ? widget.isExpanded\n                  ? Expanded(child: child)\n                  : child\n              : SizedBox(width: widget.gap);\n        },\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/border_container.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/moon_design.dart';\n\nclass BorderContainer extends StatefulWidget {\n  final bool expands;\n  final Clip clipBehavior;\n  final Color? backgroundColor;\n  final Decoration? decoration;\n  final double? height;\n  final double? width;\n  final ShapeBorder border;\n  final Duration duration;\n  final Curve curve;\n  final Widget child;\n\n  /// Creates a utility widget for animating the border of a container.\n  /// Primarily utilized in [MoonTextInput] and [MoonTextInputGroup].\n  const BorderContainer({\n    super.key,\n    this.expands = false,\n    this.clipBehavior = Clip.none,\n    this.backgroundColor,\n    this.decoration,\n    this.height,\n    this.width,\n    required this.border,\n    required this.duration,\n    required this.curve,\n    required this.child,\n  });\n\n  @override\n  _BorderContainerState createState() => _BorderContainerState();\n}\n\nclass _BorderContainerState extends State<BorderContainer>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _controller;\n  late Animation<double> _borderAnimation;\n  late ShapeBorderTween _border;\n\n  @override\n  void initState() {\n    super.initState();\n\n    _controller = AnimationController(\n      duration: widget.duration,\n      vsync: this,\n    );\n    _borderAnimation = CurvedAnimation(\n      parent: _controller,\n      curve: widget.curve,\n      reverseCurve: widget.curve.flipped,\n    );\n    _border = ShapeBorderTween(\n      begin: widget.border,\n      end: widget.border,\n    );\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  void didUpdateWidget(BorderContainer oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (widget.border != oldWidget.border) {\n      _border = ShapeBorderTween(\n        begin: oldWidget.border,\n        end: widget.border,\n      );\n      _controller\n        ..value = 0.0\n        ..forward();\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AnimatedBuilder(\n      animation: _borderAnimation,\n      builder: (context, child) {\n        return Container(\n          constraints: BoxConstraints(\n            minHeight: widget.height ?? 0,\n            minWidth: widget.width ?? 0,\n            maxHeight: widget.expands\n                ? double.infinity\n                : widget.height ?? double.infinity,\n            maxWidth: widget.expands\n                ? double.infinity\n                : widget.width ?? double.infinity,\n          ),\n          clipBehavior: widget.clipBehavior,\n          decoration: widget.decoration ??\n              ShapeDecorationWithPremultipliedAlpha(\n                color: widget.backgroundColor,\n                shape: _border.evaluate(_borderAnimation)!,\n              ),\n          child: child,\n        );\n      },\n      child: widget.child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/default_animated_text_style.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass MoonAnimatedDefaultTextStyle extends StatefulWidget {\n  final TextStyle textStyle;\n  final Duration duration;\n  final Curve curve;\n  final Widget child;\n\n  /// Creates a utility widget for animating text style.\n  const MoonAnimatedDefaultTextStyle({\n    super.key,\n    required this.textStyle,\n    required this.duration,\n    required this.curve,\n    required this.child,\n  });\n\n  @override\n  _MoonAnimatedDefaultTextStyleState createState() =>\n      _MoonAnimatedDefaultTextStyleState();\n}\n\nclass _MoonAnimatedDefaultTextStyleState\n    extends State<MoonAnimatedDefaultTextStyle>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _controller;\n  late Animation<double> _textStyleAnimation;\n  late TextStyleTween _textStyle;\n\n  @override\n  void initState() {\n    super.initState();\n\n    _controller = AnimationController(\n      duration: widget.duration,\n      vsync: this,\n    );\n    _textStyleAnimation = CurvedAnimation(\n      parent: _controller,\n      curve: widget.curve,\n    );\n    _textStyle = TextStyleTween(\n      begin: widget.textStyle,\n      end: widget.textStyle,\n    );\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  void didUpdateWidget(MoonAnimatedDefaultTextStyle oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (widget.textStyle != oldWidget.textStyle) {\n      _textStyle = TextStyleTween(\n        begin: oldWidget.textStyle,\n        end: widget.textStyle,\n      );\n      _controller\n        ..value = 0.0\n        ..forward();\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AnimatedBuilder(\n      animation: _textStyleAnimation,\n      builder: (context, child) {\n        return DefaultTextStyle(\n          style: _textStyle.evaluate(_textStyleAnimation),\n          child: child!,\n        );\n      },\n      child: widget.child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/effects/focus_effect.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/widgets/common/effects/painters/focus_effect_painter.dart';\n\nclass MoonFocusEffect extends StatefulWidget {\n  final bool show;\n  final BorderRadiusGeometry? childBorderRadius;\n  final Color effectColor;\n  final double effectExtent;\n  final Duration effectDuration;\n  final Curve effectCurve;\n  final Widget child;\n\n  /// Creates a Moon Design focus effect.\n  const MoonFocusEffect({\n    super.key,\n    required this.show,\n    this.childBorderRadius,\n    required this.effectColor,\n    required this.effectExtent,\n    required this.effectDuration,\n    required this.effectCurve,\n    required this.child,\n  });\n\n  @override\n  State<MoonFocusEffect> createState() => _MoonFocusEffectState();\n}\n\nclass _MoonFocusEffectState extends State<MoonFocusEffect>\n    with SingleTickerProviderStateMixin {\n  late final AnimationController _animationController = AnimationController(\n    vsync: this,\n    duration: widget.effectDuration,\n    debugLabel: \"MoonFocusEffect animation controller.\",\n  );\n\n  late final CurvedAnimation _focusAnimation = CurvedAnimation(\n    parent: _animationController,\n    curve: widget.effectCurve,\n  );\n\n  @override\n  void didUpdateWidget(MoonFocusEffect oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    widget.show\n        ? _animationController.forward()\n        : _animationController.reverse();\n  }\n\n  @override\n  void dispose() {\n    _animationController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final resolvedBorderRadius =\n        widget.childBorderRadius?.resolve(Directionality.of(context)) ??\n            BorderRadius.zero;\n\n    return AnimatedBuilder(\n      animation: _animationController,\n      builder: (BuildContext context, Widget? child) {\n        return CustomPaint(\n          willChange: true,\n          painter: FocusEffectPainter(\n            color: widget.effectColor,\n            effectExtent: widget.effectExtent,\n            borderRadius: resolvedBorderRadius,\n            animation: _focusAnimation,\n          ),\n          child: child,\n        );\n      },\n      child: widget.child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/effects/painters/focus_effect_painter.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_radius.dart';\n\nclass FocusEffectPainter extends CustomPainter {\n  final Animation<double> animation;\n  final bool isFilled;\n  final BorderRadius borderRadius;\n  final Color color;\n  final double effectExtent;\n\n  FocusEffectPainter({\n    required this.animation,\n    required this.borderRadius,\n    this.isFilled = false,\n    required this.color,\n    required this.effectExtent,\n  }) : super(repaint: animation);\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    if (!animation.isDismissed) {\n      final Rect rect = Rect.fromLTRB(0.0, 0.0, size.width, size.height);\n      final Color transformedColor =\n          colorPremulLerp(null, color, animation.value)!;\n      final double newWidth = rect.width + effectExtent;\n      final double newHeight = rect.height + effectExtent;\n      final double widthIncrease = newWidth / rect.width;\n      final double heightIncrease = newHeight / rect.height;\n      final double widthOffset = (widthIncrease - 1) / 2;\n      final double heightOffset = (heightIncrease - 1) / 2;\n      final double resolvedExtent =\n          borderRadius != BorderRadius.zero ? (effectExtent / 2) : 0;\n\n      final Paint paint = isFilled\n          ? (Paint()\n            ..color = transformedColor\n            ..style = PaintingStyle.fill)\n          : (Paint()\n            ..color = transformedColor\n            ..style = PaintingStyle.stroke\n            ..strokeWidth = effectExtent +\n                1); // +1 for squircle hairline border correction.\n\n      canvas.drawRRect(\n        RRect.fromRectAndCorners(\n          Rect.fromLTWH(\n            -rect.width * widthOffset,\n            -rect.height * heightOffset,\n            rect.width * widthIncrease,\n            rect.height * heightIncrease,\n          ),\n          topLeft: MoonSquircleRadius(\n            cornerRadius: borderRadius.topLeft.x + resolvedExtent,\n          ),\n          topRight: MoonSquircleRadius(\n            cornerRadius: borderRadius.topRight.x + resolvedExtent,\n          ),\n          bottomLeft: MoonSquircleRadius(\n            cornerRadius: borderRadius.bottomLeft.x + resolvedExtent,\n          ),\n          bottomRight: MoonSquircleRadius(\n            cornerRadius: borderRadius.bottomRight.x + resolvedExtent,\n          ),\n        ),\n        paint,\n      );\n    }\n  }\n\n  @override\n  bool shouldRepaint(FocusEffectPainter oldDelegate) {\n    return animation != oldDelegate.animation || color != oldDelegate.color;\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/effects/painters/pulse_effect_painter.dart",
    "content": "import 'dart:ui';\n\nimport 'package:flutter/animation.dart';\nimport 'package:flutter/rendering.dart';\n\nimport 'package:moon_design/src/utils/squircle/squircle_radius.dart';\n\nclass PulseEffectPainter extends CustomPainter {\n  static const double _animationRangeStartValue = 0.286;\n\n  final Color color;\n  final Animation<double> animation;\n  final double effectExtent;\n  final BorderRadius borderRadius;\n\n  PulseEffectPainter({\n    required this.color,\n    required this.animation,\n    required this.effectExtent,\n    required this.borderRadius,\n  }) : super(repaint: animation);\n\n  double animationRange({\n    required double begin,\n    required double end,\n    required double animationValue,\n  }) {\n    return clampDouble((animationValue - begin) / (end - begin), 0.0, 1.0);\n  }\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    if (!animation.isDismissed) {\n      final double rangeValue = animationRange(\n        begin: _animationRangeStartValue,\n        end: 1.0,\n        animationValue: animation.value,\n      );\n      final Rect rect = Rect.fromLTRB(0.0, 0.0, size.width, size.height);\n      final double opacity =\n          (rangeValue == 0.0 ? 0.0 : 1.0 - rangeValue).clamp(0.0, 1.0);\n      final Color transformedColor = color.withOpacity(opacity);\n      final double newWidth = rect.width + rangeValue * effectExtent;\n      final double newHeight = rect.height + rangeValue * effectExtent;\n      final double widthIncrease = newWidth / rect.width;\n      final double heightIncrease = newHeight / rect.height;\n      final double widthOffset = (widthIncrease - 1) / 2;\n      final double heightOffset = (heightIncrease - 1) / 2;\n      final double resolvedExtent =\n          borderRadius != BorderRadius.zero ? (effectExtent / 2) : 0;\n      final double topLeftLerp = lerpDouble(\n        borderRadius.topLeft.x,\n        borderRadius.topLeft.x + resolvedExtent,\n        rangeValue,\n      )!;\n      final double topRightLerp = lerpDouble(\n        borderRadius.topRight.x,\n        borderRadius.topRight.x + resolvedExtent,\n        rangeValue,\n      )!;\n      final double bottomLeftLerp = lerpDouble(\n        borderRadius.bottomLeft.x,\n        borderRadius.bottomLeft.x + resolvedExtent,\n        rangeValue,\n      )!;\n      final double bottomRightLerp = lerpDouble(\n        borderRadius.bottomRight.x,\n        borderRadius.bottomRight.x + resolvedExtent,\n        rangeValue,\n      )!;\n\n      final Paint paint = Paint()\n        ..color = transformedColor\n        ..style = PaintingStyle.stroke\n        ..strokeWidth = rangeValue * effectExtent +\n            1; // +1 for squircle hairline border correction.\n\n      canvas.drawRRect(\n        RRect.fromRectAndCorners(\n          Rect.fromLTWH(\n            -rect.width * widthOffset,\n            -rect.height * heightOffset,\n            rect.width * widthIncrease,\n            rect.height * heightIncrease,\n          ),\n          topLeft: MoonSquircleRadius(cornerRadius: topLeftLerp),\n          topRight: MoonSquircleRadius(cornerRadius: topRightLerp),\n          bottomLeft: MoonSquircleRadius(cornerRadius: bottomLeftLerp),\n          bottomRight: MoonSquircleRadius(cornerRadius: bottomRightLerp),\n        ),\n        paint,\n      );\n    }\n  }\n\n  @override\n  bool shouldRepaint(PulseEffectPainter oldDelegate) => false;\n}\n"
  },
  {
    "path": "lib/src/widgets/common/effects/pulse_effect.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/widgets/common/effects/painters/pulse_effect_painter.dart';\n\nclass MoonPulseEffect extends StatefulWidget {\n  final bool show;\n  final bool showJiggle;\n  final BorderRadiusGeometry? childBorderRadius;\n  final Color effectColor;\n  final double effectExtent;\n  final Duration effectDuration;\n  final Curve effectCurve;\n  final Widget child;\n\n  /// Creates a Moon Design pulse effect.\n  const MoonPulseEffect({\n    super.key,\n    required this.show,\n    required this.showJiggle,\n    this.childBorderRadius,\n    required this.effectColor,\n    required this.effectExtent,\n    required this.effectDuration,\n    required this.effectCurve,\n    required this.child,\n  });\n\n  @override\n  State<MoonPulseEffect> createState() => _MoonPulseEffectState();\n}\n\nclass _MoonPulseEffectState extends State<MoonPulseEffect>\n    with SingleTickerProviderStateMixin {\n  static const double _jiggleTimePercentage = 28.6;\n  static const double _jiggleRestTimePercentage =\n      100 - _jiggleTimePercentage * 2;\n\n  late final AnimationController _animationController = AnimationController(\n    animationBehavior: AnimationBehavior.preserve,\n    vsync: this,\n    duration: widget.effectDuration,\n    debugLabel: \"MoonPulseEffect animation controller.\",\n  );\n\n  late final CurvedAnimation _pulseAnimation = CurvedAnimation(\n    parent: _animationController,\n    curve: widget.effectCurve,\n  );\n\n  late final Animation<double> _jiggleAnimation = TweenSequence<double>(\n    [\n      TweenSequenceItem<double>(\n        tween: Tween<double>(begin: 0.0, end: -1.0)\n            .chain(CurveTween(curve: widget.effectCurve)),\n        weight: _jiggleRestTimePercentage / 2,\n      ),\n      TweenSequenceItem<double>(\n        tween: Tween<double>(begin: -1.0, end: 0.0)\n            .chain(CurveTween(curve: widget.effectCurve)),\n        weight: _jiggleRestTimePercentage / 2,\n      ),\n      TweenSequenceItem<double>(\n        tween: ConstantTween<double>(0.0),\n        weight: _jiggleRestTimePercentage,\n      ),\n      TweenSequenceItem<double>(\n        tween: Tween<double>(begin: 0.0, end: -1.0)\n            .chain(CurveTween(curve: widget.effectCurve)),\n        weight: _jiggleRestTimePercentage / 2,\n      ),\n      TweenSequenceItem<double>(\n        tween: Tween<double>(begin: -1.0, end: 0.0)\n            .chain(CurveTween(curve: widget.effectCurve)),\n        weight: _jiggleRestTimePercentage / 2,\n      ),\n    ],\n  ).animate(_animationController);\n\n  @override\n  void didUpdateWidget(covariant MoonPulseEffect oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (widget.show != oldWidget.show) {\n      if (widget.show) {\n        _animationController.repeat();\n      } else {\n        _animationController\n            .forward()\n            .then((_) => _animationController.reset());\n      }\n    }\n  }\n\n  @override\n  void dispose() {\n    _animationController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    // TODO: Revisit this at a later date, when Impeller is more stable,\n    //  to determine if we can use CurvedAnimation with Interval. Currently,\n    //  there is a bug in Interval where the internal method curve.transform(t)\n    //  causes uneven and buggy animations.\n    final BorderRadius resolvedBorderRadius =\n        widget.childBorderRadius?.resolve(Directionality.of(context)) ??\n            BorderRadius.zero;\n\n    return AnimatedBuilder(\n      animation: _animationController,\n      builder: (BuildContext context, Widget? child) {\n        return Transform.translate(\n          offset: Offset(widget.showJiggle ? _jiggleAnimation.value : 0.0, 0.0),\n          child: CustomPaint(\n            isComplex: true,\n            willChange: true,\n            painter: PulseEffectPainter(\n              color: widget.effectColor,\n              effectExtent: widget.effectExtent,\n              borderRadius: resolvedBorderRadius,\n              animation: _pulseAnimation,\n            ),\n            child: child,\n          ),\n        );\n      },\n      child: widget.child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/error_message_widgets.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_icons/moon_icons.dart';\n\nclass MoonErrorMessages extends StatelessWidget {\n  final List<String> errors;\n\n  /// Creates a default error message widget, utilized in [MoonTextInputGroup].\n  const MoonErrorMessages({required this.errors});\n\n  List<String> get _nonEmptyErrors =>\n      errors.where((String error) => error.isNotEmpty).toList();\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      mainAxisSize: MainAxisSize.min,\n      children: List.generate(_nonEmptyErrors.length * 2 - 1, (int index) {\n        final int derivedIndex = index ~/ 2;\n\n        return index.isEven\n            ? MoonErrorMessage(errorText: _nonEmptyErrors[derivedIndex])\n            : SizedBox(height: context.moonSizes?.x5s ?? 4);\n      }),\n    );\n  }\n}\n\nclass MoonErrorMessage extends StatefulWidget {\n  final String errorText;\n  final Duration duration;\n  final Curve curve;\n\n  /// Creates a default error message widget, utilized in [MoonTextInput]\n  /// and [MoonTextArea].\n  const MoonErrorMessage({\n    super.key,\n    required this.errorText,\n    this.duration = const Duration(milliseconds: 167),\n    this.curve = Curves.fastOutSlowIn,\n  });\n\n  @override\n  State<MoonErrorMessage> createState() => _MoonErrorMessageState();\n}\n\nclass _MoonErrorMessageState extends State<MoonErrorMessage>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _controller;\n  late Animation<double> _opacityAnimation;\n\n  @override\n  void initState() {\n    super.initState();\n\n    _controller = AnimationController(\n      duration: widget.duration,\n      vsync: this,\n    );\n    _opacityAnimation = CurvedAnimation(\n      parent: _controller,\n      curve: widget.curve,\n      reverseCurve: widget.curve.flipped,\n    );\n\n    _controller\n      ..value = 0.0\n      ..forward();\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return FadeTransition(\n      opacity: _opacityAnimation,\n      child: Row(\n        children: [\n          Icon(\n            MoonIcons.generic_info_16_light,\n            size: context.moonSizes?.x2s ?? 16,\n          ),\n          SizedBox(width: context.moonSizes?.x5s ?? 4),\n          Text(widget.errorText),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/progress_indicators/base_progress.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\n/// The base class for the Moon Design progress indicators.\n///\n/// This class defines the common properties and behavior for Moon Design\n/// progress indicators. It can not be instantiated directly.\n/// Use [MoonLinearProgressIndicator] for a linear progress indicator and\n/// [MoonCircularProgressIndicator] for a circular progress indicator.\nabstract class MoonBaseProgressIndicator extends StatefulWidget {\n  /// The progress indicator's color as an animated value.\n  final Animation<Color?>? valueColor;\n\n  /// The background color of the progress indicator.\n  ///\n  /// Subclasses must override this method to define the visual representation\n  /// of the progress indicator. See the subclass documentation for details.\n  final Color backgroundColor;\n\n  /// The color of the progress indicator.\n  final Color color;\n\n  /// The progress value of the progress indicator.\n  ///\n  /// A value of 0.0 indicates no progress, 1.0 indicates complete progress, and\n  /// values in between represent the percentage of progress completed.\n  /// The value will be clamped to be in the range 0.0-1.0.\n  ///\n  /// If `value` is null, this progress indicator is indeterminate, meaning it\n  /// displays a predetermined animation that does not reflect actual progress.\n  final double? value;\n\n  /// The [SemanticsProperties.label] for the progress indicator.\n  ///\n  /// Determines the text that screen readers will read out to describe the\n  /// purpose of this progress indicator.\n  final String? semanticsLabel;\n\n  /// The [SemanticsProperties.value] for the progress indicator.\n  ///\n  /// Used in conjunction with the [semanticsLabel] to provide additional\n  /// context for screen readers to understand the progress indicator's current\n  /// state.\n  ///\n  /// Primarily intended for use with determinate progress indicators, which\n  /// defaults to the [ProgressIndicator.value] expressed as a percentage, i.e.\n  /// `0.1` will become '10%'.\n  final String? semanticsValue;\n\n  /// Creates a Moon Design progress indicator.\n  ///\n  /// The [value] argument determines whether the progress indicator is\n  /// determinate or indeterminate:\n  ///\n  /// * If [value] is null, the progress indicator is indeterminate and will\n  ///   display a predetermined animation that does not indicate how much\n  ///   progress is being made.\n  /// * If [value] is a non-null number between 0.0 and 1.0, the progress\n  ///   indicator is determinate and will display the progress percentage as a\n  ///   value between 0% and 100%.\n  ///\n  /// ## Accessibility\n  ///\n  /// The [semanticsLabel] can be used to identify the purpose of this progress\n  /// bar for screen reading software.\n  /// The [semanticsValue] property may be used for determinate progress\n  /// indicators to announce how much progress has been made.\n  const MoonBaseProgressIndicator({\n    super.key,\n    this.valueColor,\n    required this.backgroundColor,\n    required this.color,\n    this.value,\n    this.semanticsLabel,\n    this.semanticsValue,\n  });\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n\n    properties.add(\n      PercentProperty(\n        'value',\n        value,\n        showName: false,\n        ifNull: '<indeterminate>',\n      ),\n    );\n  }\n\n  Widget buildSemanticsWrapper({\n    required BuildContext context,\n    required Widget child,\n  }) {\n    String? expandedSemanticsValue = semanticsValue;\n\n    if (value != null) {\n      expandedSemanticsValue ??= '${(value! * 100).round()}%';\n    }\n\n    return Semantics(\n      label: semanticsLabel,\n      value: expandedSemanticsValue,\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/progress_indicators/circular_progress_indicator.dart",
    "content": "import 'package:flutter/widgets.dart';\n\nimport 'package:moon_design/src/widgets/common/progress_indicators/base_progress.dart';\nimport 'package:moon_design/src/widgets/common/progress_indicators/painters/circular_progress_indicator_painter.dart';\n\nclass MoonCircularProgressIndicator extends MoonBaseProgressIndicator {\n  /// The width of the stroke for the circular progress indicator.\n  final double strokeWidth;\n\n  /// The shape of the end of the stroke (stroke-cap) for the circular progress\n  /// indicator.\n  final StrokeCap strokeCap;\n\n  /// Creates a Moon Design circular progress indicator.\n  const MoonCircularProgressIndicator({\n    super.key,\n    super.value,\n    required super.backgroundColor,\n    required super.color,\n    super.valueColor,\n    super.semanticsLabel,\n    super.semanticsValue,\n    this.strokeWidth = 4.0,\n    this.strokeCap = StrokeCap.round,\n  });\n\n  /// The color of the circular track that forms the background for the circular\n  /// progress indicator.\n  @override\n  Color get backgroundColor => super.backgroundColor;\n\n  @override\n  State<MoonCircularProgressIndicator> createState() =>\n      _MoonCircularProgressIndicatorState();\n}\n\nclass _MoonCircularProgressIndicatorState\n    extends State<MoonCircularProgressIndicator>\n    with SingleTickerProviderStateMixin {\n  static const double _kMinMoonCircularProgressIndicatorSize = 36.0;\n  static const int _kIndeterminateCircularDuration = 1333 * 2222;\n  static const int _pathCount = _kIndeterminateCircularDuration ~/ 1333;\n  static const int _rotationCount = _kIndeterminateCircularDuration ~/ 2222;\n\n  static final Animatable<double> _strokeHeadTween = CurveTween(\n    curve: const Interval(0.0, 0.5, curve: Curves.fastOutSlowIn),\n  ).chain(CurveTween(curve: const SawTooth(_pathCount)));\n\n  static final Animatable<double> _strokeTailTween = CurveTween(\n    curve: const Interval(0.5, 1.0, curve: Curves.fastOutSlowIn),\n  ).chain(CurveTween(curve: const SawTooth(_pathCount)));\n\n  static final Animatable<double> _offsetTween =\n      CurveTween(curve: const SawTooth(_pathCount));\n  static final Animatable<double> _rotationTween =\n      CurveTween(curve: const SawTooth(_rotationCount));\n\n  late AnimationController _controller;\n\n  @override\n  void initState() {\n    super.initState();\n\n    _controller = AnimationController(\n      duration: const Duration(milliseconds: _kIndeterminateCircularDuration),\n      vsync: this,\n    );\n\n    if (widget.value == null) _controller.repeat();\n  }\n\n  @override\n  void didUpdateWidget(MoonCircularProgressIndicator oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (widget.value == null && !_controller.isAnimating) {\n      _controller.repeat();\n    } else if (widget.value != null && _controller.isAnimating) {\n      _controller.stop();\n    }\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n\n    super.dispose();\n  }\n\n  Widget _buildStaticProgressIndicator(\n    BuildContext context,\n    double headValue,\n    double tailValue,\n    double offsetValue,\n    double rotationValue,\n  ) {\n    return widget.buildSemanticsWrapper(\n      context: context,\n      child: Container(\n        constraints: const BoxConstraints(\n          minWidth: _kMinMoonCircularProgressIndicatorSize,\n          minHeight: _kMinMoonCircularProgressIndicatorSize,\n        ),\n        child: RepaintBoundary(\n          child: CustomPaint(\n            painter: MoonCircularProgressIndicatorPainter(\n              backgroundColor: widget.backgroundColor,\n              valueColor: widget.color,\n              value: widget.value,\n              // May be null.\n              headValue: headValue,\n              // If 'widget.value' is not null, all remaining arguments are\n              // ignored.\n              tailValue: tailValue,\n              offsetValue: offsetValue,\n              rotationValue: rotationValue,\n              strokeWidth: widget.strokeWidth,\n              strokeCap: widget.strokeCap,\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n\n  Widget _buildAnimation() {\n    return AnimatedBuilder(\n      animation: _controller,\n      builder: (BuildContext context, Widget? child) {\n        return _buildStaticProgressIndicator(\n          context,\n          _strokeHeadTween.evaluate(_controller),\n          _strokeTailTween.evaluate(_controller),\n          _offsetTween.evaluate(_controller),\n          _rotationTween.evaluate(_controller),\n        );\n      },\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    if (widget.value != null) {\n      _buildStaticProgressIndicator(context, 0.0, 0.0, 0, 0.0);\n    }\n\n    return _buildAnimation();\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/progress_indicators/linear_progress_indicator.dart",
    "content": "import 'package:flutter/widgets.dart';\n\nimport 'package:moon_design/src/widgets/common/progress_indicators/base_progress.dart';\nimport 'package:moon_design/src/widgets/common/progress_indicators/painters/linear_progress_indicator_painter.dart';\n\nclass MoonLinearProgressIndicator extends MoonBaseProgressIndicator {\n  /// The container radius of the linear progress indicator.\n  final BorderRadiusGeometry containerRadius;\n\n  /// The progress radius of the linear progress indicator.\n  final BorderRadiusGeometry progressRadius;\n\n  /// The minimum height of the linear progress indicator.\n  final double minHeight;\n\n  /// Creates a Moon Design linear progress indicator.\n  const MoonLinearProgressIndicator({\n    super.key,\n    super.value,\n    required super.backgroundColor,\n    required super.color,\n    super.valueColor,\n    super.semanticsLabel,\n    super.semanticsValue,\n    this.minHeight = 4,\n    this.containerRadius = BorderRadius.zero,\n    this.progressRadius = BorderRadius.zero,\n  }) : assert(minHeight > 0);\n\n  /// The color of the linear track that forms the background for the linear\n  /// progress indicator.\n  @override\n  Color get backgroundColor => super.backgroundColor;\n\n  @override\n  State<MoonLinearProgressIndicator> createState() =>\n      _MoonLinearProgressIndicatorState();\n}\n\nclass _MoonLinearProgressIndicatorState\n    extends State<MoonLinearProgressIndicator>\n    with SingleTickerProviderStateMixin {\n  static const int _kIndeterminateLinearDuration = 1800;\n\n  late AnimationController _controller;\n\n  @override\n  void initState() {\n    super.initState();\n\n    _controller = AnimationController(\n      duration: const Duration(milliseconds: _kIndeterminateLinearDuration),\n      vsync: this,\n    );\n\n    if (widget.value == null) _controller.repeat();\n  }\n\n  @override\n  void didUpdateWidget(MoonLinearProgressIndicator oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (widget.value == null && !_controller.isAnimating) {\n      _controller.repeat();\n    } else if (widget.value != null && _controller.isAnimating) {\n      _controller.stop();\n    }\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n\n    super.dispose();\n  }\n\n  Widget buildStaticProgressIndicator(\n    BuildContext context,\n    double animationValue,\n    TextDirection textDirection,\n  ) {\n    final BorderRadius resolvedContainerRadius =\n        widget.containerRadius.resolve(Directionality.of(context));\n    final BorderRadius resolvedProgressRadius =\n        widget.progressRadius.resolve(Directionality.of(context));\n\n    return widget.buildSemanticsWrapper(\n      context: context,\n      child: ConstrainedBox(\n        constraints: BoxConstraints(\n          minWidth: double.infinity,\n          minHeight: widget.minHeight,\n        ),\n        child: RepaintBoundary(\n          child: CustomPaint(\n            painter: MoonLinearProgressIndicatorPainter(\n              backgroundColor: widget.backgroundColor,\n              valueColor: widget.color,\n              value: widget.value,\n              // May be null.\n              animationValue: animationValue,\n              // Ignored if 'widget.value' is not null.\n              containerRadius: resolvedContainerRadius,\n              progressRadius: resolvedProgressRadius,\n              textDirection: textDirection,\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final TextDirection textDirection = Directionality.of(context);\n\n    if (widget.value != null) {\n      return buildStaticProgressIndicator(\n        context,\n        _controller.value,\n        textDirection,\n      );\n    }\n\n    return AnimatedBuilder(\n      animation: _controller.view,\n      builder: (BuildContext context, Widget? child) {\n        return buildStaticProgressIndicator(\n          context,\n          _controller.value,\n          textDirection,\n        );\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/progress_indicators/painters/circular_progress_indicator_painter.dart",
    "content": "import 'dart:math' as math;\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/rendering.dart';\n\nclass MoonCircularProgressIndicatorPainter extends CustomPainter {\n  static const double _twoPi = math.pi * 2.0;\n  static const double _epsilon = .001;\n  static const double _sweep = _twoPi - _epsilon;\n  static const double _startAngle = -math.pi / 2.0;\n\n  final Color? backgroundColor;\n  final Color valueColor;\n  final double? value;\n  final double headValue;\n  final double tailValue;\n  final double offsetValue;\n  final double rotationValue;\n  final double strokeWidth;\n  final double arcStart;\n  final double arcSweep;\n  final StrokeCap strokeCap;\n\n  MoonCircularProgressIndicatorPainter({\n    this.backgroundColor,\n    required this.valueColor,\n    required this.value,\n    required this.headValue,\n    required this.tailValue,\n    required this.offsetValue,\n    required this.rotationValue,\n    required this.strokeWidth,\n    required this.strokeCap,\n  })  : arcStart = value != null\n            ? _startAngle\n            : _startAngle +\n                tailValue * 3 / 2 * math.pi +\n                rotationValue * math.pi * 2.0 +\n                offsetValue * 0.5 * math.pi,\n        arcSweep = value != null\n            ? clampDouble(value, 0.0, 1.0) * _sweep\n            : math.max(\n                headValue * 3 / 2 * math.pi - tailValue * 3 / 2 * math.pi,\n                _epsilon,\n              );\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final Paint paint = Paint()\n      ..color = valueColor\n      ..strokeWidth = strokeWidth\n      ..style = PaintingStyle.stroke;\n    if (backgroundColor != null) {\n      final Paint backgroundPaint = Paint()\n        ..color = backgroundColor!\n        ..strokeWidth = strokeWidth\n        ..style = PaintingStyle.stroke;\n      canvas.drawArc(Offset.zero & size, 0, _sweep, false, backgroundPaint);\n    }\n\n    paint.strokeCap = strokeCap;\n\n    canvas.drawArc(Offset.zero & size, arcStart, arcSweep, false, paint);\n  }\n\n  @override\n  bool shouldRepaint(MoonCircularProgressIndicatorPainter oldPainter) {\n    return oldPainter.backgroundColor != backgroundColor ||\n        oldPainter.valueColor != valueColor ||\n        oldPainter.value != value ||\n        oldPainter.headValue != headValue ||\n        oldPainter.tailValue != tailValue ||\n        oldPainter.offsetValue != offsetValue ||\n        oldPainter.rotationValue != rotationValue ||\n        oldPainter.strokeCap != strokeCap ||\n        oldPainter.strokeWidth != strokeWidth;\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/common/progress_indicators/painters/linear_progress_indicator_painter.dart",
    "content": "import 'package:flutter/animation.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/rendering.dart';\n\nimport 'package:moon_design/src/utils/squircle/squircle_radius.dart';\n\nclass MoonLinearProgressIndicatorPainter extends CustomPainter {\n  static const int _kIndeterminateLinearDuration = 1800;\n\n  // The indeterminate progress animation consists of two lines, each with a\n  // leading (head) and trailing (tail) endpoint, defined by the following four\n  // curves.\n  static const Curve _line1Head = Interval(\n    0.0,\n    750.0 / _kIndeterminateLinearDuration,\n    curve: Cubic(0.2, 0.0, 0.8, 1.0),\n  );\n\n  static const Curve _line1Tail = Interval(\n    333.0 / _kIndeterminateLinearDuration,\n    (333.0 + 750.0) / _kIndeterminateLinearDuration,\n    curve: Cubic(0.4, 0.0, 1.0, 1.0),\n  );\n\n  static const Curve _line2Head = Interval(\n    1000.0 / _kIndeterminateLinearDuration,\n    (1000.0 + 567.0) / _kIndeterminateLinearDuration,\n    curve: Cubic(0.0, 0.0, 0.65, 1.0),\n  );\n\n  static const Curve _line2Tail = Interval(\n    1267.0 / _kIndeterminateLinearDuration,\n    (1267.0 + 533.0) / _kIndeterminateLinearDuration,\n    curve: Cubic(0.10, 0.0, 0.45, 1.0),\n  );\n\n  final Color backgroundColor;\n  final Color valueColor;\n  final double? value;\n  final double animationValue;\n  final BorderRadius containerRadius;\n  final BorderRadius progressRadius;\n  final TextDirection textDirection;\n\n  const MoonLinearProgressIndicatorPainter({\n    required this.backgroundColor,\n    required this.valueColor,\n    this.value,\n    required this.animationValue,\n    required this.containerRadius,\n    required this.progressRadius,\n    required this.textDirection,\n  });\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final Paint paint = Paint()\n      ..color = backgroundColor\n      ..style = PaintingStyle.fill;\n\n    final containerRect = RRect.fromRectAndCorners(\n      Offset.zero & size,\n      topLeft: MoonSquircleRadius(cornerRadius: containerRadius.topLeft.x),\n      topRight: MoonSquircleRadius(cornerRadius: containerRadius.topRight.x),\n      bottomLeft:\n          MoonSquircleRadius(cornerRadius: containerRadius.bottomLeft.x),\n      bottomRight:\n          MoonSquircleRadius(cornerRadius: containerRadius.bottomRight.x),\n    );\n    canvas.drawRRect(containerRect, paint);\n\n    paint.color = valueColor;\n\n    void drawBar(double x, double width) {\n      if (width <= 0.0) return;\n\n      final double left;\n      switch (textDirection) {\n        case TextDirection.rtl:\n          left = size.width - width - x;\n        case TextDirection.ltr:\n          left = x;\n      }\n\n      final progressRect = RRect.fromRectAndCorners(\n        Offset(left, 0.0) & Size(width, size.height),\n        topLeft: MoonSquircleRadius(cornerRadius: progressRadius.topLeft.x),\n        topRight: MoonSquircleRadius(cornerRadius: progressRadius.topRight.x),\n        bottomLeft:\n            MoonSquircleRadius(cornerRadius: progressRadius.bottomLeft.x),\n        bottomRight:\n            MoonSquircleRadius(cornerRadius: progressRadius.bottomRight.x),\n      );\n\n      // Clipping progressRect with containerRect.\n      canvas.clipRRect(containerRect);\n\n      canvas.drawRRect(progressRect, paint);\n    }\n\n    if (value != null) {\n      drawBar(0.0, clampDouble(value!, 0.0, 1.0) * size.width);\n    } else {\n      final double x1 = size.width * _line1Tail.transform(animationValue);\n      final double width1 =\n          size.width * _line1Head.transform(animationValue) - x1;\n\n      final double x2 = size.width * _line2Tail.transform(animationValue);\n      final double width2 =\n          size.width * _line2Head.transform(animationValue) - x2;\n\n      drawBar(x1, width1);\n      drawBar(x2, width2);\n    }\n  }\n\n  @override\n  bool shouldRepaint(MoonLinearProgressIndicatorPainter oldPainter) {\n    return oldPainter.backgroundColor != backgroundColor ||\n        oldPainter.valueColor != valueColor ||\n        oldPainter.value != value ||\n        oldPainter.animationValue != animationValue ||\n        oldPainter.containerRadius != containerRadius ||\n        oldPainter.progressRadius != progressRadius ||\n        oldPainter.textDirection != textDirection;\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/dot_indicator/dot_indicator.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/utils/color_tween_premul.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonDotIndicator extends StatefulWidget {\n  /// The color of the selected dot.\n  final Color? selectedColor;\n\n  /// The color of the unselected dots.\n  final Color? unselectedColor;\n\n  /// The gap between the dots.\n  final double? gap;\n\n  /// The size of each dot.\n  final double? size;\n\n  /// The duration of the dot indicator transition animation.\n  final Duration? transitionDuration;\n\n  /// The curve of the dot indicator transition animation.\n  final Curve? transitionCurve;\n\n  /// The index of the currently selected dot.\n  final int selectedDot;\n\n  /// The total number of dots to build for the indicator.\n  final int dotCount;\n\n  /// Creates a Moon Design dot indicator.\n  const MoonDotIndicator({\n    this.selectedColor,\n    this.unselectedColor,\n    this.gap,\n    this.size,\n    this.transitionDuration,\n    this.transitionCurve,\n    required this.selectedDot,\n    required this.dotCount,\n  });\n\n  @override\n  _CarouselIndicatorState createState() => _CarouselIndicatorState();\n}\n\nclass _CarouselIndicatorState extends State<MoonDotIndicator>\n    with TickerProviderStateMixin {\n  final ColorTweenWithPremultipliedAlpha _dotColorTween =\n      ColorTweenWithPremultipliedAlpha();\n\n  List<AnimationController>? _animationControllers;\n  List<Animation<Color?>>? _animations;\n\n  @override\n  void initState() {\n    super.initState();\n\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      _animationControllers![widget.selectedDot].forward();\n    });\n  }\n\n  @override\n  void didUpdateWidget(MoonDotIndicator oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (widget.selectedDot != oldWidget.selectedDot) {\n      _animationControllers![oldWidget.selectedDot].reverse();\n      _animationControllers![widget.selectedDot].forward();\n    }\n  }\n\n  @override\n  void dispose() {\n    for (final controller in _animationControllers!) {\n      controller.dispose();\n    }\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final double effectiveSize = widget.size ??\n        context.moonTheme?.dotIndicatorTheme.properties.size ??\n        MoonSizes.sizes.x4s;\n\n    final double effectiveGap = widget.gap ??\n        context.moonTheme?.dotIndicatorTheme.properties.gap ??\n        MoonSizes.sizes.x4s;\n\n    final Color effectiveSelectedColor = widget.selectedColor ??\n        context.moonTheme?.dotIndicatorTheme.colors.selectedColor ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveUnselectedColor = widget.unselectedColor ??\n        context.moonTheme?.dotIndicatorTheme.colors.unselectedColor ??\n        MoonColors.light.beerus;\n\n    final Duration effectiveTransitionDuration = widget.transitionDuration ??\n        context.moonTheme?.dotIndicatorTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = widget.transitionCurve ??\n        context.moonTheme?.dotIndicatorTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    _animationControllers ??= List.generate(\n      widget.dotCount,\n      (index) => AnimationController(\n        duration: effectiveTransitionDuration,\n        vsync: this,\n      ),\n    );\n\n    _animations ??= List.generate(\n      widget.dotCount,\n      (index) => _animationControllers![index].drive(\n        _dotColorTween.chain(CurveTween(curve: effectiveTransitionCurve)),\n      ),\n    );\n\n    _dotColorTween\n      ..begin = effectiveUnselectedColor\n      ..end = effectiveSelectedColor;\n\n    return RepaintBoundary(\n      child: Row(\n        mainAxisAlignment: MainAxisAlignment.center,\n        children: List<Widget>.generate(\n          widget.dotCount,\n          (int index) => AnimatedBuilder(\n            animation: _animations![index],\n            builder: (BuildContext context, Widget? _) {\n              return Container(\n                width: effectiveSize,\n                height: effectiveSize,\n                margin: EdgeInsets.symmetric(horizontal: effectiveGap / 2),\n                decoration: BoxDecoration(\n                  shape: BoxShape.circle,\n                  color: _animations![index].value,\n                ),\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/drawer/drawer.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/shadows.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonDrawer extends StatelessWidget {\n  /// The border radius of the drawer.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the drawer.\n  final Color? backgroundColor;\n\n  /// The custom decoration of the drawer.\n  final Decoration? decoration;\n\n  /// The width of the drawer.\n  final double? width;\n\n  /// The list of shadows applied to the drawer.\n  final List<BoxShadow>? drawerShadows;\n\n  /// The semantic label for the drawer.\n  final String? semanticLabel;\n\n  /// The widget to display inside the drawer as its content.\n  final Widget child;\n\n  /// Creates a Moon Design drawer.\n  const MoonDrawer({\n    super.key,\n    this.borderRadius,\n    this.backgroundColor,\n    this.decoration,\n    this.width,\n    this.drawerShadows,\n    this.semanticLabel,\n    required this.child,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    final BorderRadiusGeometry effectiveBorderRadius = borderRadius ??\n        context.moonTheme?.drawerTheme.properties.borderRadius ??\n        BorderRadius.zero;\n\n    final Color effectiveBackgroundColor = backgroundColor ??\n        context.moonTheme?.drawerTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.drawerTheme.colors.textColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.drawerTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final double effectiveWidthFromTheme =\n        context.moonTheme?.drawerTheme.properties.width ?? 448;\n\n    final double effectiveWidth = width ??\n        (MediaQuery.of(context).size.width < effectiveWidthFromTheme\n            ? MediaQuery.of(context).size.width\n            : effectiveWidthFromTheme);\n\n    final List<BoxShadow> effectiveDrawerShadows = drawerShadows ??\n        context.moonTheme?.drawerTheme.shadows.drawerShadows ??\n        MoonShadows.light.lg;\n\n    final TextStyle effectiveTextStyle =\n        context.moonTheme?.drawerTheme.properties.textStyle ??\n            MoonTypography.typography.body.textDefault;\n\n    return Semantics(\n      explicitChildNodes: true,\n      namesRoute: true,\n      scopesRoute: true,\n      label: semanticLabel,\n      child: IconTheme(\n        data: IconThemeData(color: effectiveIconColor),\n        child: DefaultTextStyle(\n          style: effectiveTextStyle.copyWith(color: effectiveTextColor),\n          child: Container(\n            width: effectiveWidth,\n            decoration: decoration ??\n                ShapeDecorationWithPremultipliedAlpha(\n                  color: effectiveBackgroundColor,\n                  shadows: effectiveDrawerShadows,\n                  shape: MoonSquircleBorder(\n                    borderRadius:\n                        effectiveBorderRadius.squircleBorderRadius(context),\n                  ),\n                ),\n            child: child,\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/dropdown/dropdown.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/shadows.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonDropdownAnchorPosition {\n  top,\n  topLeft,\n  topRight,\n  bottom,\n  bottomLeft,\n  bottomRight,\n  left,\n  right,\n  vertical,\n  horizontal,\n}\n\nclass MoonDropdown extends StatefulWidget {\n  /// Sets the dropdown anchor position on dropdown [content] (follower).\n  ///\n  /// Overrides the [MoonDropdownAnchorPosition] property.\n  final Alignment? followerAnchor;\n\n  /// Sets the dropdown anchor position on the [child] (target).\n  ///\n  /// Overrides the [MoonDropdownAnchorPosition] property.\n  final Alignment? targetAnchor;\n\n  /// Whether to constrain the dropdown to the width of its [child] (target).\n  final bool constrainWidthToChild;\n\n  /// Whether to show the dropdown.\n  final bool show;\n\n  /// The border radius of the dropdown.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the dropdown.\n  final Color? backgroundColor;\n\n  /// The border color of the dropdown.\n  final Color borderColor;\n\n  /// The custom decoration of the dropdown.\n  final Decoration? decoration;\n\n  /// The border width of the dropdown.\n  final double borderWidth;\n\n  /// The distance between the dropdown and the [child] (target).\n  ///\n  /// Overridden by the [offset] property if set.\n  final double? distanceToTarget;\n\n  /// An optional size constraint for the dropdown [content] to define its\n  /// minimum height.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to the\n  /// [content].\n  final double? minHeight;\n\n  /// An optional size constraint for the dropdown [content] to define its\n  /// minimum width.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to the\n  /// [content].\n  final double? minWidth;\n\n  /// An optional size constraint for the dropdown [content] to define its\n  /// maximum height.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to the\n  /// [content].\n  final double? maxHeight;\n\n  /// An optional size constraint for the dropdown [content] to define its\n  /// maximum width.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to the\n  /// [content].\n  final double? maxWidth;\n\n  /// The duration of the dropdown transition animation (fade in or out).\n  final Duration? transitionDuration;\n\n  /// The curve of the dropdown transition animation (fade in or out).\n  final Curve? transitionCurve;\n\n  /// The padding of the dropdown [content].\n  final EdgeInsetsGeometry? contentPadding;\n\n  /// The margin of the dropdown. Prevents the dropdown from touching the edges\n  /// of the viewport.\n  final EdgeInsetsGeometry? dropdownMargin;\n\n  /// The list of shadows applied to the dropdown.\n  final List<BoxShadow>? dropdownShadows;\n\n  /// Sets the dropdown anchor position on the [child] (target).\n  ///\n  /// This is a convenience shorthand for setting the anchor position.\n  /// This will be overridden by the [followerAnchor], [targetAnchor], [offset],\n  /// or [maxWidth] properties if set.\n  final MoonDropdownAnchorPosition dropdownAnchorPosition;\n\n  /// The offset of the dropdown.\n  ///\n  /// Overrides the [distanceToTarget] property.\n  final Offset? offset;\n\n  /// The observer to keep track of the route changes and automatically hide\n  /// the dropdown when the widget's route is not active.\n  final RouteObserver<PageRoute<dynamic>>? routeObserver;\n\n  /// The unique group ID of the dropdown.\n  /// This ID is used to associate nested dropdowns and prevent them from\n  /// closing when tapped inside each other.\n  final String? groupId;\n\n  /// The semantic label for the dropdown.\n  final String? semanticLabel;\n\n  /// The callback that is called when the user taps outside the dropdown.\n  final VoidCallback? onTapOutside;\n\n  /// The widget to display as the child (target) of the dropdown.\n  final Widget child;\n\n  /// The widget to display inside the dropdown as its content.\n  final Widget content;\n\n  /// Creates a Moon Design dropdown.\n  const MoonDropdown({\n    super.key,\n    required this.show,\n    this.followerAnchor,\n    this.targetAnchor,\n    this.constrainWidthToChild = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.borderColor = Colors.transparent,\n    this.decoration,\n    this.borderWidth = 0,\n    this.distanceToTarget,\n    this.minHeight,\n    this.minWidth,\n    this.maxHeight,\n    this.maxWidth,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.contentPadding,\n    this.dropdownMargin,\n    this.dropdownShadows,\n    this.dropdownAnchorPosition = MoonDropdownAnchorPosition.bottom,\n    this.offset,\n    this.routeObserver,\n    this.groupId,\n    this.semanticLabel,\n    this.onTapOutside,\n    required this.child,\n    required this.content,\n  });\n\n  @override\n  _MoonDropdownState createState() => _MoonDropdownState();\n}\n\nclass _MoonDropdownState extends State<MoonDropdown>\n    with RouteAware, SingleTickerProviderStateMixin {\n  late final Key _regionKey =\n      widget.groupId != null ? ValueKey(widget.groupId) : ObjectKey(widget);\n  final LayerLink _layerLink = LayerLink();\n\n  AnimationController? _animationController;\n  CurvedAnimation? _curvedAnimation;\n\n  OverlayEntry? _overlayEntry;\n\n  bool _routeIsShowing = true;\n\n  bool get shouldShowDropdown => widget.show && _routeIsShowing;\n\n  void _showDropdown() {\n    _overlayEntry = OverlayEntry(\n      builder: (BuildContext context) => _createOverlayContent(),\n    );\n    Overlay.of(context).insert(_overlayEntry!);\n\n    _animationController!.value = 0;\n    _animationController!.forward();\n  }\n\n  void _updateDropdown() {\n    _overlayEntry?.markNeedsBuild();\n  }\n\n  void _removeDropdown({bool immediately = false}) {\n    if (immediately) {\n      _clearOverlayEntry();\n    } else {\n      _animationController!.value = 1;\n      _animationController!.reverse().then((value) => _clearOverlayEntry());\n    }\n  }\n\n  void _handleTapOutside() {\n    widget.onTapOutside?.call();\n  }\n\n  void _clearOverlayEntry() {\n    if (_overlayEntry != null) {\n      _overlayEntry!.remove();\n      _overlayEntry = null;\n    }\n  }\n\n  _DropdownPositionProperties _resolveDropdownPositionParameters({\n    required MoonDropdownAnchorPosition dropdownAnchorPosition,\n    required double distanceToTarget,\n    required double overlayWidth,\n    required double dropdownTargetGlobalLeft,\n    required double dropdownTargetGlobalCenter,\n    required double dropdownTargetGlobalRight,\n    required EdgeInsets dropdownMargin,\n  }) {\n    switch (dropdownAnchorPosition) {\n      case MoonDropdownAnchorPosition.top:\n        return _DropdownPositionProperties(\n          offset: Offset(0, -distanceToTarget),\n          targetAnchor: Alignment.topCenter,\n          followerAnchor: Alignment.bottomCenter,\n          dropdownMaxWidth: overlayWidth -\n              ((overlayWidth / 2 - dropdownTargetGlobalCenter) * 2).abs() -\n              dropdownMargin.horizontal,\n        );\n\n      case MoonDropdownAnchorPosition.bottom:\n        return _DropdownPositionProperties(\n          offset: Offset(0, distanceToTarget),\n          targetAnchor: Alignment.bottomCenter,\n          followerAnchor: Alignment.topCenter,\n          dropdownMaxWidth: overlayWidth -\n              ((overlayWidth / 2 - dropdownTargetGlobalCenter) * 2).abs() -\n              dropdownMargin.horizontal,\n        );\n\n      case MoonDropdownAnchorPosition.left:\n        return _DropdownPositionProperties(\n          offset: Offset(-distanceToTarget, 0),\n          targetAnchor: Alignment.centerLeft,\n          followerAnchor: Alignment.centerRight,\n          dropdownMaxWidth:\n              dropdownTargetGlobalLeft - distanceToTarget - dropdownMargin.left,\n        );\n\n      case MoonDropdownAnchorPosition.right:\n        return _DropdownPositionProperties(\n          offset: Offset(distanceToTarget, 0),\n          targetAnchor: Alignment.centerRight,\n          followerAnchor: Alignment.centerLeft,\n          dropdownMaxWidth: overlayWidth -\n              dropdownTargetGlobalRight -\n              distanceToTarget -\n              dropdownMargin.right,\n        );\n\n      case MoonDropdownAnchorPosition.topLeft:\n        return _DropdownPositionProperties(\n          offset: Offset(0, -distanceToTarget),\n          targetAnchor: Alignment.topLeft,\n          followerAnchor: Alignment.bottomLeft,\n          dropdownMaxWidth:\n              overlayWidth - dropdownTargetGlobalLeft - dropdownMargin.left,\n        );\n\n      case MoonDropdownAnchorPosition.topRight:\n        return _DropdownPositionProperties(\n          offset: Offset(0, -distanceToTarget),\n          targetAnchor: Alignment.topRight,\n          followerAnchor: Alignment.bottomRight,\n          dropdownMaxWidth: dropdownTargetGlobalRight - dropdownMargin.right,\n        );\n\n      case MoonDropdownAnchorPosition.bottomLeft:\n        return _DropdownPositionProperties(\n          offset: Offset(0, distanceToTarget),\n          targetAnchor: Alignment.bottomLeft,\n          followerAnchor: Alignment.topLeft,\n          dropdownMaxWidth:\n              overlayWidth - dropdownTargetGlobalLeft - dropdownMargin.left,\n        );\n\n      case MoonDropdownAnchorPosition.bottomRight:\n        return _DropdownPositionProperties(\n          offset: Offset(0, distanceToTarget),\n          targetAnchor: Alignment.bottomRight,\n          followerAnchor: Alignment.topRight,\n          dropdownMaxWidth: dropdownTargetGlobalRight - dropdownMargin.right,\n        );\n\n      default:\n        throw AssertionError(\"No match: $dropdownAnchorPosition\");\n    }\n  }\n\n  @override\n  void didPush() {\n    _routeIsShowing = true;\n    // Route was added to the navigator and is now the top-most route.\n    if (shouldShowDropdown) {\n      _removeDropdown();\n\n      WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n        if (!mounted) return;\n\n        _showDropdown();\n      });\n    }\n  }\n\n  @override\n  void didPushNext() {\n    _routeIsShowing = false;\n\n    _removeDropdown();\n  }\n\n  @override\n  Future<void> didPopNext() async {\n    _routeIsShowing = true;\n\n    if (shouldShowDropdown) {\n      // The covering route was popped off the navigator.\n      _removeDropdown();\n\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        if (mounted) _showDropdown();\n      });\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      widget.routeObserver\n          ?.subscribe(this, ModalRoute.of(context)! as PageRoute<dynamic>);\n    });\n  }\n\n  @override\n  void didUpdateWidget(MoonDropdown oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (oldWidget.routeObserver != widget.routeObserver) {\n      oldWidget.routeObserver?.unsubscribe(this);\n      widget.routeObserver\n          ?.subscribe(this, ModalRoute.of(context)! as PageRoute<dynamic>);\n    }\n\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      if (!_routeIsShowing) return;\n\n      if (oldWidget.dropdownAnchorPosition != widget.dropdownAnchorPosition) {\n        _removeDropdown(immediately: true);\n        _showDropdown();\n      } else if (shouldShowDropdown && _overlayEntry == null) {\n        _showDropdown();\n      } else if (!shouldShowDropdown && _overlayEntry != null) {\n        _removeDropdown();\n      }\n\n      _updateDropdown();\n    });\n  }\n\n  @override\n  void deactivate() {\n    if (_overlayEntry != null) _removeDropdown(immediately: true);\n\n    super.deactivate();\n  }\n\n  @override\n  void dispose() {\n    if (_overlayEntry != null) _removeDropdown(immediately: true);\n\n    widget.routeObserver?.unsubscribe(this);\n\n    super.dispose();\n  }\n\n  Widget _createOverlayContent() {\n    final BorderRadiusGeometry effectiveBorderRadius = widget.borderRadius ??\n        context.moonTheme?.dropdownTheme.properties.borderRadius ??\n        BorderRadius.circular(12);\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.dropdownTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.dropdownTheme.colors.textColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.dropdownTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final TextStyle effectiveTextStyle =\n        context.moonTheme?.dropdownTheme.properties.textStyle ??\n            MoonTypography.typography.body.textDefault;\n\n    final double effectiveDistanceToTarget = widget.distanceToTarget ??\n        context.moonTheme?.dropdownTheme.properties.distanceToTarget ??\n        MoonSizes.sizes.x4s;\n\n    final EdgeInsetsGeometry effectiveContentPadding = widget.contentPadding ??\n        context.moonTheme?.dropdownTheme.properties.contentPadding ??\n        const EdgeInsets.all(4);\n\n    final EdgeInsets resolvedContentPadding =\n        effectiveContentPadding.resolve(Directionality.of(context));\n\n    final EdgeInsetsGeometry effectiveDropdownMargin = widget.dropdownMargin ??\n        context.moonTheme?.dropdownTheme.properties.dropdownMargin ??\n        const EdgeInsets.all(8);\n\n    final EdgeInsets resolvedDropdownMargin =\n        effectiveDropdownMargin.resolve(Directionality.of(context));\n\n    final List<BoxShadow> effectiveDropdownShadows = widget.dropdownShadows ??\n        context.moonTheme?.dropdownTheme.shadows.dropdownShadows ??\n        MoonShadows.light.sm;\n\n    MoonDropdownAnchorPosition dropdownAnchorPosition =\n        widget.dropdownAnchorPosition;\n\n    final RenderBox overlayRenderBox =\n        Overlay.of(context).context.findRenderObject()! as RenderBox;\n\n    final RenderBox targetRenderBox = context.findRenderObject()! as RenderBox;\n\n    final Offset dropdownTargetGlobalCenter = targetRenderBox.localToGlobal(\n      targetRenderBox.size.center(Offset.zero),\n      ancestor: overlayRenderBox,\n    );\n\n    final Offset dropdownTargetGlobalLeft = targetRenderBox.localToGlobal(\n      targetRenderBox.size.centerLeft(Offset.zero),\n      ancestor: overlayRenderBox,\n    );\n\n    final Offset dropdownTargetGlobalRight = targetRenderBox.localToGlobal(\n      targetRenderBox.size.centerRight(Offset.zero),\n      ancestor: overlayRenderBox,\n    );\n\n    if (Directionality.of(context) == TextDirection.rtl ||\n        dropdownAnchorPosition == MoonDropdownAnchorPosition.horizontal ||\n        dropdownAnchorPosition == MoonDropdownAnchorPosition.vertical) {\n      switch (dropdownAnchorPosition) {\n        case MoonDropdownAnchorPosition.left:\n          dropdownAnchorPosition = MoonDropdownAnchorPosition.right;\n        case MoonDropdownAnchorPosition.right:\n          dropdownAnchorPosition = MoonDropdownAnchorPosition.left;\n        case MoonDropdownAnchorPosition.topLeft:\n          dropdownAnchorPosition = MoonDropdownAnchorPosition.topRight;\n        case MoonDropdownAnchorPosition.topRight:\n          dropdownAnchorPosition = MoonDropdownAnchorPosition.topLeft;\n        case MoonDropdownAnchorPosition.bottomLeft:\n          dropdownAnchorPosition = MoonDropdownAnchorPosition.bottomRight;\n        case MoonDropdownAnchorPosition.bottomRight:\n          dropdownAnchorPosition = MoonDropdownAnchorPosition.bottomLeft;\n        case MoonDropdownAnchorPosition.vertical:\n          dropdownAnchorPosition = dropdownTargetGlobalCenter.dy <\n                  overlayRenderBox.size.center(Offset.zero).dy\n              ? MoonDropdownAnchorPosition.bottom\n              : MoonDropdownAnchorPosition.top;\n        case MoonDropdownAnchorPosition.horizontal:\n          dropdownAnchorPosition = dropdownTargetGlobalCenter.dx <\n                  overlayRenderBox.size.center(Offset.zero).dx\n              ? MoonDropdownAnchorPosition.right\n              : MoonDropdownAnchorPosition.left;\n        default:\n          break;\n      }\n    }\n\n    final _DropdownPositionProperties dropdownAnchorPositionParameters =\n        _resolveDropdownPositionParameters(\n      dropdownAnchorPosition: dropdownAnchorPosition,\n      distanceToTarget: effectiveDistanceToTarget,\n      overlayWidth: overlayRenderBox.size.width,\n      dropdownTargetGlobalLeft: dropdownTargetGlobalLeft.dx,\n      dropdownTargetGlobalCenter: dropdownTargetGlobalCenter.dx,\n      dropdownTargetGlobalRight: dropdownTargetGlobalRight.dx,\n      dropdownMargin: resolvedDropdownMargin,\n    );\n\n    final double targetWidth = targetRenderBox.size.width;\n\n    final double effectiveDropdownWidth = widget.constrainWidthToChild\n        ? targetWidth\n        : widget.maxWidth != null\n            ? widget.maxWidth!\n            : dropdownAnchorPositionParameters.dropdownMaxWidth;\n\n    return Semantics(\n      label: widget.semanticLabel,\n      child: UnconstrainedBox(\n        child: CompositedTransformFollower(\n          link: _layerLink,\n          showWhenUnlinked: false,\n          offset: widget.offset ?? dropdownAnchorPositionParameters.offset,\n          followerAnchor: widget.followerAnchor ??\n              dropdownAnchorPositionParameters.followerAnchor,\n          targetAnchor: widget.targetAnchor ??\n              dropdownAnchorPositionParameters.targetAnchor,\n          child: TapRegion(\n            groupId: _regionKey,\n            behavior: HitTestBehavior.translucent,\n            onTapOutside: (PointerDownEvent _) => _handleTapOutside(),\n            child: RepaintBoundary(\n              child: FadeTransition(\n                opacity: _curvedAnimation!,\n                child: IconTheme(\n                  data: IconThemeData(color: effectiveIconColor),\n                  child: DefaultTextStyle(\n                    style:\n                        effectiveTextStyle.copyWith(color: effectiveTextColor),\n                    child: Container(\n                      constraints: BoxConstraints(\n                        minHeight: widget.minHeight ?? 0,\n                        maxHeight: widget.maxHeight ?? double.infinity,\n                        minWidth: widget.minWidth ?? 0,\n                        maxWidth: effectiveDropdownWidth,\n                      ),\n                      padding: resolvedContentPadding,\n                      decoration: widget.decoration ??\n                          ShapeDecorationWithPremultipliedAlpha(\n                            color: effectiveBackgroundColor,\n                            shadows: effectiveDropdownShadows,\n                            shape: MoonSquircleBorder(\n                              borderRadius: effectiveBorderRadius\n                                  .squircleBorderRadius(context),\n                              side: BorderSide(color: widget.borderColor),\n                            ),\n                          ),\n                      child: Directionality(\n                        textDirection: Directionality.of(context),\n                        child: widget.content,\n                      ),\n                    ),\n                  ),\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final Duration effectiveTransitionDuration = widget.transitionDuration ??\n        context.moonTheme?.dropdownTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = widget.transitionCurve ??\n        context.moonTheme?.dropdownTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    _animationController ??= AnimationController(\n      duration: effectiveTransitionDuration,\n      vsync: this,\n    );\n\n    _curvedAnimation ??= CurvedAnimation(\n      parent: _animationController!,\n      curve: effectiveTransitionCurve,\n    );\n\n    return TapRegion(\n      groupId: _regionKey,\n      behavior: HitTestBehavior.translucent,\n      child: CompositedTransformTarget(\n        link: _layerLink,\n        child: widget.child,\n      ),\n    );\n  }\n}\n\nclass _DropdownPositionProperties {\n  final Alignment followerAnchor;\n  final Alignment targetAnchor;\n  final double dropdownMaxWidth;\n  final Offset offset;\n\n  _DropdownPositionProperties({\n    required this.followerAnchor,\n    required this.targetAnchor,\n    required this.dropdownMaxWidth,\n    required this.offset,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/loaders/circular_loader.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/loaders/circular_loader/circular_loader_size_properties.dart';\nimport 'package:moon_design/src/theme/loaders/circular_loader/circular_loader_sizes.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/widgets/common/progress_indicators/circular_progress_indicator.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonCircularLoaderSize {\n  x2s,\n  xs,\n  sm,\n  md,\n  lg,\n}\n\nclass MoonCircularLoader extends StatelessWidget {\n  /// The color of the circular loader.\n  final Color? color;\n\n  /// The background color of the circular loader.\n  final Color? backgroundColor;\n\n  /// The custom size value of the circular loader. For predefined sizes, use\n  /// [circularLoaderSize].\n  final double? sizeValue;\n\n  /// The width of the stroke for the circular loader.\n  final double? strokeWidth;\n\n  /// The size of the circular loader.\n  final MoonCircularLoaderSize? circularLoaderSize;\n\n  /// The shape of the end of the stroke (stroke-cap) for the circular loader.\n  final StrokeCap? strokeCap;\n\n  /// Creates a Moon Design circular loader.\n  const MoonCircularLoader({\n    super.key,\n    this.color,\n    this.backgroundColor,\n    this.sizeValue,\n    this.strokeWidth,\n    this.circularLoaderSize,\n    this.strokeCap,\n  });\n\n  MoonCircularLoaderSizeProperties _getMoonLoaderSize(\n    BuildContext context,\n    MoonCircularLoaderSize? moonLoaderSize,\n  ) {\n    switch (moonLoaderSize) {\n      case MoonCircularLoaderSize.x2s:\n        return context.moonTheme?.circularLoaderTheme.sizes.x2s ??\n            MoonCircularLoaderSizes(tokens: MoonTokens.light).x2s;\n      case MoonCircularLoaderSize.xs:\n        return context.moonTheme?.circularLoaderTheme.sizes.xs ??\n            MoonCircularLoaderSizes(tokens: MoonTokens.light).xs;\n      case MoonCircularLoaderSize.sm:\n        return context.moonTheme?.circularLoaderTheme.sizes.sm ??\n            MoonCircularLoaderSizes(tokens: MoonTokens.light).sm;\n      case MoonCircularLoaderSize.md:\n        return context.moonTheme?.circularLoaderTheme.sizes.md ??\n            MoonCircularLoaderSizes(tokens: MoonTokens.light).md;\n      case MoonCircularLoaderSize.lg:\n        return context.moonTheme?.circularLoaderTheme.sizes.lg ??\n            MoonCircularLoaderSizes(tokens: MoonTokens.light).lg;\n      default:\n        return context.moonTheme?.circularLoaderTheme.sizes.md ??\n            MoonCircularLoaderSizes(tokens: MoonTokens.light).md;\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final MoonCircularLoaderSizeProperties effectiveLoaderSize =\n        _getMoonLoaderSize(context, circularLoaderSize);\n\n    final Color effectiveColor = color ??\n        context.moonTheme?.circularLoaderTheme.colors.color ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveBackgroundColor = backgroundColor ??\n        context.moonTheme?.circularLoaderTheme.colors.backgroundColor ??\n        Colors.transparent;\n\n    final double effectiveSize =\n        sizeValue ?? effectiveLoaderSize.loaderSizeValue;\n\n    final double effectiveStrokeWidth =\n        strokeWidth ?? effectiveLoaderSize.loaderStrokeWidth;\n\n    final StrokeCap effectiveStrokeCap = strokeCap ?? StrokeCap.round;\n\n    return SizedBox(\n      height: effectiveSize,\n      width: effectiveSize,\n      child: MoonCircularProgressIndicator(\n        color: effectiveColor,\n        backgroundColor: effectiveBackgroundColor,\n        strokeWidth: effectiveStrokeWidth,\n        strokeCap: effectiveStrokeCap,\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/loaders/linear_loader.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/loaders/linear_loader/linear_loader_size_properties.dart';\nimport 'package:moon_design/src/theme/loaders/linear_loader/linear_loader_sizes.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/widgets/common/progress_indicators/linear_progress_indicator.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonLinearLoaderSize {\n  x6s,\n  x5s,\n  x4s,\n  x3s,\n  x2s,\n}\n\nclass MoonLinearLoader extends StatelessWidget {\n  /// The border radius of the linear loader.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The color of the linear loader.\n  final Color? color;\n\n  /// The background color of the linear loader.\n  final Color? backgroundColor;\n\n  /// The height of the linear loader.\n  final double? height;\n\n  /// The size of the linear loader.\n  final MoonLinearLoaderSize? linearLoaderSize;\n\n  /// Creates a Moon Design linear loader.\n  const MoonLinearLoader({\n    super.key,\n    this.borderRadius,\n    this.color,\n    this.backgroundColor,\n    this.height,\n    this.linearLoaderSize,\n  });\n\n  MoonLinearLoaderSizeProperties _getMoonLoaderSize(\n    BuildContext context,\n    MoonLinearLoaderSize? moonLoaderSize,\n  ) {\n    switch (moonLoaderSize) {\n      case MoonLinearLoaderSize.x6s:\n        return context.moonTheme?.linearLoaderTheme.sizes.x6s ??\n            MoonLinearLoaderSizes(tokens: MoonTokens.light).x6s;\n      case MoonLinearLoaderSize.x5s:\n        return context.moonTheme?.linearLoaderTheme.sizes.x5s ??\n            MoonLinearLoaderSizes(tokens: MoonTokens.light).x5s;\n      case MoonLinearLoaderSize.x4s:\n        return context.moonTheme?.linearLoaderTheme.sizes.x4s ??\n            MoonLinearLoaderSizes(tokens: MoonTokens.light).x4s;\n      case MoonLinearLoaderSize.x3s:\n        return context.moonTheme?.linearLoaderTheme.sizes.x3s ??\n            MoonLinearLoaderSizes(tokens: MoonTokens.light).x3s;\n      case MoonLinearLoaderSize.x2s:\n        return context.moonTheme?.linearLoaderTheme.sizes.x2s ??\n            MoonLinearLoaderSizes(tokens: MoonTokens.light).x2s;\n      default:\n        return context.moonTheme?.linearLoaderTheme.sizes.x4s ??\n            MoonLinearLoaderSizes(tokens: MoonTokens.light).x4s;\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final MoonLinearLoaderSizeProperties effectiveLoaderSize =\n        _getMoonLoaderSize(context, linearLoaderSize);\n\n    final BorderRadiusGeometry effectiveBorderRadius =\n        borderRadius ?? effectiveLoaderSize.borderRadius;\n\n    final Color effectiveColor = color ??\n        context.moonTheme?.linearLoaderTheme.colors.color ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveBackgroundColor = backgroundColor ??\n        context.moonTheme?.linearLoaderTheme.colors.backgroundColor ??\n        Colors.transparent;\n\n    final double effectiveHeight = height ?? effectiveLoaderSize.loaderHeight;\n\n    return MoonLinearProgressIndicator(\n      color: effectiveColor,\n      backgroundColor: effectiveBackgroundColor,\n      containerRadius: effectiveBorderRadius,\n      progressRadius: effectiveBorderRadius,\n      minHeight: effectiveHeight,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/menu_item/menu_item.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/effects/effects_theme.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/color_tween_premul.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/widgets/common/base_control.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonMenuItem extends StatefulWidget {\n  /// Defines how the widgets of the menu item are aligned along the cross axis.\n  ///\n  /// Defaults to the [CrossAxisAlignment.center].\n  final CrossAxisAlignment? menuItemCrossAxisAlignment;\n\n  /// Defines how the [label] and [content] widgets of the menu item are aligned\n  /// along the cross axis within [label] and [content] slots.\n  ///\n  /// Defaults to the [CrossAxisAlignment.start].\n  final CrossAxisAlignment? labelAndContentCrossAxisAlignment;\n\n  /// Whether the menu item should absorb gestures. If this is true the menu\n  /// item children will not receive gestures.\n  final bool absorbGestures;\n\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// The border radius of the menu item.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the menu item.\n  final Color? backgroundColor;\n\n  /// The color of the menu item hover effect.\n  final Color? hoverEffectColor;\n\n  /// The custom decoration of the menu item.\n  final Decoration? decoration;\n\n  /// The height of the menu item.\n  final double? height;\n\n  /// The width of the menu item.\n  final double? width;\n\n  /// The horizontal gap between the [leading], [label] and [trailing] widgets\n  /// of the menu item.\n  final double? horizontalGap;\n\n  /// The vertical gap between the [label] and [content] widgets of the menu\n  /// item.\n  final double? verticalGap;\n\n  /// The duration of the menu item hover effect.\n  final Duration? hoverEffectDuration;\n\n  /// The curve of the menu item hover effect.\n  final Curve? hoverEffectCurve;\n\n  /// The padding of the menu item.\n  final EdgeInsetsGeometry? menuItemPadding;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The semantic label for the menu item.\n  final String? semanticLabel;\n\n  /// The callback that is called when the menu item is tapped or pressed.\n  /// The menu item is disabled when both [onTap] and [onLongPress] are null.\n  final VoidCallback? onTap;\n\n  /// The callback that is called when the menu item is long pressed.\n  /// The menu item is disabled when both [onLongPress] and [onTap] are null.\n  final VoidCallback? onLongPress;\n\n  /// The widget to display before the [label] widget of the menu item.\n  final Widget? leading;\n\n  /// The primary content of the menu item header.\n  final Widget label;\n\n  /// The widget to display below the [label] widget of the menu item.\n  /// The secondary content of the menu item header.\n  final Widget? content;\n\n  /// The widget to display after the [label] widget of the menu item.\n  final Widget? trailing;\n\n  /// Creates a Moon Design menu item.\n  const MoonMenuItem({\n    super.key,\n    this.menuItemCrossAxisAlignment,\n    this.labelAndContentCrossAxisAlignment,\n    this.absorbGestures = false,\n    this.autofocus = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.hoverEffectColor,\n    this.decoration,\n    this.height,\n    this.width,\n    this.horizontalGap,\n    this.verticalGap,\n    this.hoverEffectDuration,\n    this.hoverEffectCurve,\n    this.menuItemPadding,\n    this.focusNode,\n    this.semanticLabel,\n    this.onTap,\n    this.onLongPress,\n    this.leading,\n    required this.label,\n    this.content,\n    this.trailing,\n  }) : assert(\n          labelAndContentCrossAxisAlignment != CrossAxisAlignment.baseline,\n          'The CrossAxisAlignment.baseline is not supported since the label and '\n          'content of menu item are aligned in a column, not in a row. '\n          'Try using another constant.',\n        );\n\n  static Iterable<Widget> divideMenuItems({\n    required BuildContext context,\n    required Iterable<Widget> menuItems,\n    Color? color,\n    double? width,\n  }) {\n    menuItems = menuItems.toList();\n\n    if (menuItems.isEmpty || menuItems.length == 1) return menuItems;\n\n    final Color effectiveColor = color ??\n        context.moonTheme?.menuItemTheme.colors.dividerColor ??\n        MoonColors.light.beerus;\n\n    Widget wrapMenuItem(Widget menuItems) {\n      return DecoratedBox(\n        position: DecorationPosition.foreground,\n        decoration: BoxDecoration(\n          border: Border(\n            bottom: Divider.createBorderSide(\n              context,\n              color: effectiveColor,\n              width: width,\n            ),\n          ),\n        ),\n        child: menuItems,\n      );\n    }\n\n    return <Widget>[\n      ...menuItems.take(menuItems.length - 1).map(wrapMenuItem),\n      menuItems.last,\n    ];\n  }\n\n  @override\n  State<MoonMenuItem> createState() => _MoonMenuItemState();\n}\n\nclass _MoonMenuItemState extends State<MoonMenuItem>\n    with TickerProviderStateMixin {\n  final ColorTweenWithPremultipliedAlpha _backgroundColorTween =\n      ColorTweenWithPremultipliedAlpha();\n\n  AnimationController? _animationController;\n  Animation<Color?>? _backgroundColor;\n\n  void _handleActiveStatus(bool isActive) {\n    isActive\n        ? _animationController!.forward()\n        : _animationController!.reverse();\n  }\n\n  @override\n  void dispose() {\n    _animationController!.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final BorderRadiusGeometry effectiveBorderRadius = widget.borderRadius ??\n        context.moonTheme?.menuItemTheme.properties.borderRadius ??\n        MoonBorders.borders.interactiveSm;\n\n    final double effectiveMinimumHeaderHeight = widget.height ??\n        context.moonTheme?.menuItemTheme.properties.minimumHeight ??\n        MoonSizes.sizes.md;\n\n    final double effectiveVerticalGap = widget.verticalGap ??\n        context.moonTheme?.menuItemTheme.properties.verticalGap ??\n        MoonSizes.sizes.x5s;\n\n    final EdgeInsetsGeometry effectiveHeaderPadding = widget.menuItemPadding ??\n        context.moonTheme?.menuItemTheme.properties.padding ??\n        EdgeInsets.all(MoonSizes.sizes.x3s);\n\n    final EdgeInsets resolvedDirectionalHeaderPadding =\n        effectiveHeaderPadding.resolve(Directionality.of(context));\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.menuItemTheme.colors.backgroundColor ??\n        Colors.transparent;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.menuItemTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final Color effectiveLabelTextColor =\n        context.moonTheme?.menuItemTheme.colors.labelTextColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveContentTextColor =\n        context.moonTheme?.menuItemTheme.colors.contentTextColor ??\n            MoonColors.light.textSecondary;\n\n    final TextStyle effectiveLabelTextStyle =\n        context.moonTheme?.menuItemTheme.properties.labelTextStyle ??\n            MoonTypography.typography.body.textDefault;\n\n    final TextStyle effectiveContentTextStyle =\n        context.moonTheme?.menuItemTheme.properties.contentTextStyle ??\n            MoonTypography.typography.body.text12;\n\n    final Color effectiveHoverEffectColor = widget.hoverEffectColor ??\n        context.moonEffects?.controlHoverEffect.primaryHoverColor ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlHoverEffect\n            .primaryHoverColor;\n\n    final Color resolvedHoverColor = Color.alphaBlend(\n      effectiveHoverEffectColor,\n      widget.backgroundColor ?? Colors.transparent,\n    );\n\n    final Duration effectiveHoverEffectDuration = widget.hoverEffectDuration ??\n        context.moonEffects?.controlHoverEffect.hoverDuration ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlHoverEffect\n            .hoverDuration;\n\n    final Curve effectiveHoverEffectCurve = widget.hoverEffectCurve ??\n        context.moonEffects?.controlHoverEffect.hoverCurve ??\n        MoonEffectsTheme(tokens: MoonTokens.light)\n            .controlHoverEffect\n            .hoverCurve;\n\n    _animationController ??= AnimationController(\n      duration: effectiveHoverEffectDuration,\n      vsync: this,\n    );\n\n    _backgroundColor ??= _animationController!.drive(\n      _backgroundColorTween.chain(CurveTween(curve: effectiveHoverEffectCurve)),\n    );\n\n    _backgroundColorTween\n      ..begin = effectiveBackgroundColor\n      ..end = resolvedHoverColor;\n\n    return Semantics(\n      label: widget.semanticLabel,\n      enabled: widget.onTap != null,\n      child: MoonBaseControl(\n        onTap: widget.onTap,\n        onLongPress: widget.onLongPress,\n        propagateGesturesToChild: !widget.absorbGestures,\n        autofocus: widget.autofocus,\n        focusNode: widget.focusNode,\n        borderRadius: effectiveBorderRadius.squircleBorderRadius(context),\n        builder: (\n          BuildContext context,\n          bool isEnabled,\n          bool isHovered,\n          bool isFocused,\n          bool isPressed,\n        ) {\n          final bool isActive = isHovered || isFocused;\n\n          _handleActiveStatus(isActive);\n\n          return AnimatedBuilder(\n            animation: _animationController!,\n            builder: (BuildContext context, Widget? child) {\n              return Container(\n                height: widget.height,\n                width: widget.width,\n                constraints: BoxConstraints(\n                  minHeight: effectiveMinimumHeaderHeight,\n                ),\n                padding: resolvedDirectionalHeaderPadding,\n                decoration: widget.decoration ??\n                    ShapeDecoration(\n                      color: _backgroundColor!.value,\n                      shape: MoonSquircleBorder(\n                        borderRadius:\n                            effectiveBorderRadius.squircleBorderRadius(context),\n                      ),\n                    ),\n                child: child,\n              );\n            },\n            child: IconTheme(\n              data: IconThemeData(color: effectiveIconColor),\n              child: DefaultTextStyle(\n                style: effectiveLabelTextStyle.copyWith(\n                  color: effectiveLabelTextColor,\n                ),\n                child: Row(\n                  crossAxisAlignment: widget.menuItemCrossAxisAlignment ??\n                      CrossAxisAlignment.center,\n                  children: [\n                    if (widget.leading != null)\n                      Padding(\n                        padding: EdgeInsetsDirectional.only(\n                          end: widget.horizontalGap ??\n                              resolvedDirectionalHeaderPadding.left,\n                        ),\n                        child: widget.leading,\n                      ),\n                    Expanded(\n                      child: Column(\n                        mainAxisSize: MainAxisSize.min,\n                        crossAxisAlignment:\n                            widget.labelAndContentCrossAxisAlignment ??\n                                CrossAxisAlignment.start,\n                        children: [\n                          widget.label,\n                          if (widget.content != null)\n                            DefaultTextStyle(\n                              style: effectiveContentTextStyle.copyWith(\n                                color: effectiveContentTextColor,\n                              ),\n                              child: Padding(\n                                padding: EdgeInsets.only(\n                                  top: effectiveVerticalGap,\n                                ),\n                                child: widget.content,\n                              ),\n                            ),\n                        ],\n                      ),\n                    ),\n                    if (widget.trailing != null)\n                      Padding(\n                        padding: EdgeInsetsDirectional.only(\n                          start: widget.horizontalGap ??\n                              resolvedDirectionalHeaderPadding.right,\n                        ),\n                        child: widget.trailing,\n                      ),\n                  ],\n                ),\n              ),\n            ),\n          );\n        },\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/modal/modal.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\n/// Displays a modal overlay over the app's current content, incorporating\n/// entrance and exit animations, modal barrier color, and modal barrier\n/// behavior, enabling dialog dismissal via barrier taps. Intended for use in\n/// conjunction with [MoonModal].\nFuture<T?> showMoonModal<T>({\n  bool barrierDismissible = true,\n  bool useRootNavigator = true,\n  bool useSafeArea = true,\n  Color? barrierColor,\n  Curve? transitionCurve,\n  Duration? transitionDuration,\n  Offset? anchorPoint,\n  RouteSettings? routeSettings,\n  String? barrierLabel = \"Dismiss\",\n  required BuildContext context,\n  required WidgetBuilder builder,\n}) {\n  assert(!barrierDismissible || barrierLabel != null);\n  assert(_debugIsActive(context));\n\n  final CapturedThemes themes = InheritedTheme.capture(\n    from: context,\n    to: Navigator.of(context, rootNavigator: useRootNavigator).context,\n  );\n\n  final Color effectiveBarrierColor = barrierColor ??\n      context.moonTheme?.modalTheme.colors.barrierColor ??\n      MoonColors.light.zeno;\n\n  final Duration effectiveTransitionDuration = transitionDuration ??\n      context.moonTheme?.modalTheme.properties.transitionDuration ??\n      MoonTransitions.transitions.defaultTransitionDuration;\n\n  final Curve effectiveTransitionCurve = transitionCurve ??\n      context.moonTheme?.modalTheme.properties.transitionCurve ??\n      MoonTransitions.transitions.defaultTransitionCurve;\n\n  return Navigator.of(context, rootNavigator: useRootNavigator).push<T>(\n    MoonModalRoute<T>(\n      context: context,\n      builder: builder,\n      barrierDismissible: barrierDismissible,\n      barrierLabel: barrierLabel,\n      barrierColor: effectiveBarrierColor,\n      transitionDuration: effectiveTransitionDuration,\n      transitionCurve: effectiveTransitionCurve,\n      useSafeArea: useSafeArea,\n      settings: routeSettings,\n      anchorPoint: anchorPoint,\n      themes: themes,\n    ),\n  );\n}\n\nbool _debugIsActive(BuildContext context) {\n  if (context is Element && !context.debugIsActive) {\n    throw FlutterError.fromParts(<DiagnosticsNode>[\n      ErrorSummary('This BuildContext is no longer valid.'),\n      ErrorDescription(\n        'The showMoonModal function context parameter is a BuildContext that is '\n        'no longer valid.',\n      ),\n      ErrorHint(\n        'This can commonly occur when the showMoonModal function is called after '\n        'awaiting a Future. In this situation the BuildContext might refer to a '\n        'widget that has already been disposed during the await. Consider using '\n        'a parent context instead.',\n      ),\n    ]);\n  }\n\n  return true;\n}\n\nclass MoonModalRoute<T> extends RawDialogRoute<T> {\n  /// A Moon Design modal route with entrance and exit animations, modal barrier\n  /// color, and modal barrier behavior that allows dismissing the modal when\n  /// tapped on the barrier.\n  MoonModalRoute({\n    super.anchorPoint,\n    required super.barrierColor,\n    super.barrierDismissible,\n    String? barrierLabel,\n    super.settings,\n    CapturedThemes? themes,\n    required super.transitionDuration,\n    required Curve transitionCurve,\n    bool useSafeArea = true,\n    required BuildContext context,\n    required WidgetBuilder builder,\n  }) : super(\n          barrierLabel: barrierLabel ??\n              MaterialLocalizations.of(context).modalBarrierDismissLabel,\n          pageBuilder: (\n            BuildContext buildContext,\n            Animation<double> animation,\n            Animation<double> secondaryAnimation,\n          ) {\n            final Widget pageChild = Builder(builder: builder);\n\n            Widget modal = themes?.wrap(pageChild) ?? pageChild;\n\n            if (useSafeArea) modal = SafeArea(child: modal);\n\n            return modal;\n          },\n          transitionBuilder: (\n            BuildContext context,\n            Animation<double> animation,\n            Animation<double> secondaryAnimation,\n            Widget child,\n          ) {\n            return RepaintBoundary(\n              child: FadeTransition(\n                opacity: CurvedAnimation(\n                  parent: animation,\n                  curve: transitionCurve,\n                ),\n                child: child,\n              ),\n            );\n          },\n        );\n}\n\nclass MoonModal extends StatelessWidget {\n  /// The border radius of the modal.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the modal.\n  final Color? backgroundColor;\n\n  /// The custom decoration of the modal.\n  final Decoration? decoration;\n\n  /// The semantic label for the modal.\n  final String? semanticLabel;\n\n  /// The widget to display inside the modal as its content.\n  final Widget child;\n\n  /// Creates a Moon Design modal.\n  const MoonModal({\n    super.key,\n    this.borderRadius,\n    this.backgroundColor,\n    this.decoration,\n    this.semanticLabel,\n    required this.child,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    final BorderRadiusGeometry effectiveBorderRadius = borderRadius ??\n        context.moonTheme?.modalTheme.properties.borderRadius ??\n        MoonBorders.borders.surfaceSm;\n\n    final Color effectiveBackgroundColor = backgroundColor ??\n        context.moonTheme?.modalTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.modalTheme.colors.textColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.modalTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final TextStyle effectiveTextStyle =\n        context.moonTheme?.modalTheme.properties.textStyle ??\n            MoonTypography.typography.body.textDefault;\n\n    return Semantics(\n      label: semanticLabel,\n      child: IconTheme(\n        data: IconThemeData(color: effectiveIconColor),\n        child: DefaultTextStyle(\n          style: effectiveTextStyle.copyWith(color: effectiveTextColor),\n          child: Center(\n            child: Container(\n              decoration: decoration ??\n                  ShapeDecorationWithPremultipliedAlpha(\n                    color: effectiveBackgroundColor,\n                    shape: MoonSquircleBorder(\n                      borderRadius:\n                          effectiveBorderRadius.squircleBorderRadius(context),\n                    ),\n                  ),\n              child: child,\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/popover/popover.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/shadows.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonPopoverPosition {\n  top,\n  topLeft,\n  topRight,\n  bottom,\n  bottomLeft,\n  bottomRight,\n  left,\n  right,\n  vertical,\n  horizontal,\n}\n\nclass MoonPopover extends StatefulWidget {\n  // This is necessary to ensure that only one popover is visible at a time.\n  static final List<MoonPopoverState> _openedPopovers = [];\n\n  /// Whether to show the popover.\n  final bool show;\n\n  /// The border radius of the popover.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the popover.\n  final Color? backgroundColor;\n\n  /// The border color of the popover.\n  final Color borderColor;\n\n  /// The custom decoration of the popover.\n  final Decoration? decoration;\n\n  /// The border width of the popover.\n  final double borderWidth;\n\n  /// The distance between the popover and the [child] (target).\n  final double? distanceToTarget;\n\n  /// An optional size constraint for the popover [content] to define its\n  /// minimum height.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to\n  /// the [content].\n  final double? minHeight;\n\n  /// An optional size constraint for the popover [content] to define its\n  /// minimum width.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to\n  /// the [content].\n  final double? minWidth;\n\n  /// An optional size constraint for the popover [content] to define its\n  /// maximum height.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to\n  /// the [content].\n  final double? maxHeight;\n\n  /// An optional size constraint for the popover [content] to define its\n  /// maximum width.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to\n  /// the [content].\n  final double? maxWidth;\n\n  /// The margin around the popover. Prevents the popover from touching the\n  /// edges of the viewport.\n  final double popoverMargin;\n\n  /// The duration of the popover transition animation (fade in or out).\n  final Duration? transitionDuration;\n\n  /// The curve of the popover transition animation (fade in or out).\n  final Curve? transitionCurve;\n\n  /// The padding of the popover [content].\n  final EdgeInsetsGeometry? contentPadding;\n\n  /// The list of shadows applied to the popover.\n  final List<BoxShadow>? popoverShadows;\n\n  /// Sets the popover position relative to the [child] (target).\n  /// Defaults to [MoonPopoverPosition.vertical].\n  final MoonPopoverPosition popoverPosition;\n\n  /// The observer to keep track of the route changes and automatically hide\n  /// the popover when the widget's route is not active.\n  final RouteObserver<PageRoute<dynamic>>? routeObserver;\n\n  /// The semantic label for the popover.\n  final String? semanticLabel;\n\n  /// The callback that is called when the user taps outside the popover.\n  final VoidCallback? onTapOutside;\n\n  /// The widget to display as the child (target) of the popover.\n  final Widget child;\n\n  /// The widget to display inside the popover as its content.\n  final Widget content;\n\n  /// Creates a Moon Design popover.\n  const MoonPopover({\n    super.key,\n    required this.show,\n    this.borderRadius,\n    this.backgroundColor,\n    this.borderColor = Colors.transparent,\n    this.decoration,\n    this.borderWidth = 0,\n    this.distanceToTarget,\n    this.minHeight,\n    this.minWidth,\n    this.maxHeight,\n    this.maxWidth,\n    this.popoverMargin = 8,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.contentPadding,\n    this.popoverShadows,\n    this.popoverPosition = MoonPopoverPosition.top,\n    this.routeObserver,\n    this.semanticLabel,\n    this.onTapOutside,\n    required this.child,\n    required this.content,\n  });\n\n  // Remove all existing popovers except the provided one.\n  static void _removeOtherPopovers(MoonPopoverState current) {\n    if (_openedPopovers.isNotEmpty) {\n      // Avoid concurrent modification.\n      final List<MoonPopoverState> openedPopovers = _openedPopovers.toList();\n\n      for (final MoonPopoverState state in openedPopovers) {\n        if (state == current) continue;\n\n        state._clearOverlayEntry();\n      }\n    }\n  }\n\n  @override\n  MoonPopoverState createState() => MoonPopoverState();\n}\n\nclass MoonPopoverState extends State<MoonPopover>\n    with RouteAware, SingleTickerProviderStateMixin {\n  late final ObjectKey _regionKey = ObjectKey(widget);\n  final LayerLink _layerLink = LayerLink();\n\n  AnimationController? _animationController;\n  CurvedAnimation? _curvedAnimation;\n\n  OverlayEntry? _overlayEntry;\n\n  bool _routeIsShowing = true;\n\n  bool get shouldShowPopover => widget.show && _routeIsShowing;\n\n  void _showPopover() {\n    _overlayEntry = OverlayEntry(\n      builder: (BuildContext context) => _createOverlayContent(),\n    );\n    Overlay.of(context).insert(_overlayEntry!);\n\n    MoonPopover._openedPopovers.add(this);\n    MoonPopover._removeOtherPopovers(this);\n\n    _animationController!.value = 0;\n    _animationController!.forward();\n  }\n\n  void _updatePopover() {\n    _overlayEntry?.markNeedsBuild();\n  }\n\n  void _removePopover({bool immediately = false}) {\n    if (immediately) {\n      _clearOverlayEntry();\n    } else {\n      _animationController!.value = 1;\n      _animationController!.reverse().then((value) => _clearOverlayEntry());\n    }\n  }\n\n  void _handleTapOutside() {\n    widget.onTapOutside?.call();\n  }\n\n  void _clearOverlayEntry() {\n    if (_overlayEntry != null) {\n      MoonPopover._openedPopovers.remove(this);\n      _overlayEntry!.remove();\n      _overlayEntry = null;\n    }\n  }\n\n  _PopoverPositionProperties _resolvePopoverPositionParameters({\n    required MoonPopoverPosition popoverPosition,\n    required double distanceToTarget,\n    required double overlayWidth,\n    required double popoverTargetGlobalLeft,\n    required double popoverTargetGlobalCenter,\n    required double popoverTargetGlobalRight,\n  }) {\n    return switch (popoverPosition) {\n      MoonPopoverPosition.top => _PopoverPositionProperties(\n          offset: Offset(0, -distanceToTarget),\n          targetAnchor: Alignment.topCenter,\n          followerAnchor: Alignment.bottomCenter,\n          popoverMaxWidth: overlayWidth -\n              ((overlayWidth / 2 - popoverTargetGlobalCenter) * 2).abs() -\n              widget.popoverMargin * 2,\n        ),\n      MoonPopoverPosition.bottom => _PopoverPositionProperties(\n          offset: Offset(0, distanceToTarget),\n          targetAnchor: Alignment.bottomCenter,\n          followerAnchor: Alignment.topCenter,\n          popoverMaxWidth: overlayWidth -\n              ((overlayWidth / 2 - popoverTargetGlobalCenter) * 2).abs() -\n              widget.popoverMargin * 2,\n        ),\n      MoonPopoverPosition.left => _PopoverPositionProperties(\n          offset: Offset(-distanceToTarget, 0),\n          targetAnchor: Alignment.centerLeft,\n          followerAnchor: Alignment.centerRight,\n          popoverMaxWidth:\n              popoverTargetGlobalLeft - distanceToTarget - widget.popoverMargin,\n        ),\n      MoonPopoverPosition.right => _PopoverPositionProperties(\n          offset: Offset(distanceToTarget, 0),\n          targetAnchor: Alignment.centerRight,\n          followerAnchor: Alignment.centerLeft,\n          popoverMaxWidth: overlayWidth -\n              popoverTargetGlobalRight -\n              distanceToTarget -\n              widget.popoverMargin,\n        ),\n      MoonPopoverPosition.topLeft => _PopoverPositionProperties(\n          offset: Offset(0, -distanceToTarget),\n          targetAnchor: Alignment.topRight,\n          followerAnchor: Alignment.bottomRight,\n          popoverMaxWidth: popoverTargetGlobalRight - widget.popoverMargin,\n        ),\n      MoonPopoverPosition.topRight => _PopoverPositionProperties(\n          offset: Offset(0, -distanceToTarget),\n          targetAnchor: Alignment.topLeft,\n          followerAnchor: Alignment.bottomLeft,\n          popoverMaxWidth:\n              overlayWidth - popoverTargetGlobalLeft - widget.popoverMargin,\n        ),\n      MoonPopoverPosition.bottomLeft => _PopoverPositionProperties(\n          offset: Offset(0, distanceToTarget),\n          targetAnchor: Alignment.bottomRight,\n          followerAnchor: Alignment.topRight,\n          popoverMaxWidth: popoverTargetGlobalRight - widget.popoverMargin,\n        ),\n      MoonPopoverPosition.bottomRight => _PopoverPositionProperties(\n          offset: Offset(0, distanceToTarget),\n          targetAnchor: Alignment.bottomLeft,\n          followerAnchor: Alignment.topLeft,\n          popoverMaxWidth:\n              overlayWidth - popoverTargetGlobalLeft - widget.popoverMargin,\n        ),\n      _ => throw AssertionError(\"No match: $popoverPosition\"),\n    };\n  }\n\n  @override\n  void didPush() {\n    _routeIsShowing = true;\n    // Route was added to the navigator and is now the top-most route.\n    if (shouldShowPopover) {\n      _removePopover();\n\n      WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n        if (mounted) _showPopover();\n      });\n    }\n  }\n\n  @override\n  void didPushNext() {\n    _routeIsShowing = false;\n\n    _removePopover();\n  }\n\n  @override\n  Future<void> didPopNext() async {\n    _routeIsShowing = true;\n\n    if (shouldShowPopover) {\n      // The covering route was popped off the navigator.\n      _removePopover();\n\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        if (mounted) _showPopover();\n      });\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      widget.routeObserver\n          ?.subscribe(this, ModalRoute.of(context)! as PageRoute<dynamic>);\n    });\n  }\n\n  @override\n  void didUpdateWidget(MoonPopover oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (oldWidget.routeObserver != widget.routeObserver) {\n      oldWidget.routeObserver?.unsubscribe(this);\n      widget.routeObserver\n          ?.subscribe(this, ModalRoute.of(context)! as PageRoute<dynamic>);\n    }\n\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      if (!_routeIsShowing) return;\n\n      if (oldWidget.popoverPosition != widget.popoverPosition) {\n        _removePopover(immediately: true);\n        _showPopover();\n      } else if (shouldShowPopover && _overlayEntry == null) {\n        _showPopover();\n      } else if (!shouldShowPopover && _overlayEntry != null) {\n        _removePopover();\n      }\n\n      _updatePopover();\n    });\n  }\n\n  @override\n  void deactivate() {\n    if (_overlayEntry != null) _removePopover(immediately: true);\n\n    super.deactivate();\n  }\n\n  @override\n  void dispose() {\n    _animationController?.dispose();\n\n    if (_overlayEntry != null) _removePopover(immediately: true);\n\n    widget.routeObserver?.unsubscribe(this);\n\n    super.dispose();\n  }\n\n  Widget _createOverlayContent() {\n    MoonPopoverPosition popoverPosition = widget.popoverPosition;\n\n    final BorderRadiusGeometry effectiveBorderRadius = widget.borderRadius ??\n        context.moonTheme?.popoverTheme.properties.borderRadius ??\n        BorderRadius.circular(12);\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.popoverTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.popoverTheme.colors.textColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.popoverTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final TextStyle effectiveTextStyle =\n        context.moonTheme?.popoverTheme.properties.textStyle ??\n            MoonTypography.typography.body.textDefault;\n\n    final double effectiveDistanceToTarget = widget.distanceToTarget ??\n        context.moonTheme?.popoverTheme.properties.distanceToTarget ??\n        8;\n\n    final EdgeInsetsGeometry effectiveContentPadding = widget.contentPadding ??\n        context.moonTheme?.popoverTheme.properties.contentPadding ??\n        const EdgeInsets.all(12);\n\n    final EdgeInsets resolvedContentPadding =\n        effectiveContentPadding.resolve(Directionality.of(context));\n\n    final List<BoxShadow> effectivePopoverShadows = widget.popoverShadows ??\n        context.moonTheme?.popoverTheme.shadows.popoverShadows ??\n        MoonShadows.light.sm;\n\n    final RenderBox overlayRenderBox =\n        Overlay.of(context).context.findRenderObject()! as RenderBox;\n\n    final RenderBox targetRenderBox = context.findRenderObject()! as RenderBox;\n\n    final Offset popoverTargetGlobalCenter = targetRenderBox.localToGlobal(\n      targetRenderBox.size.center(Offset.zero),\n      ancestor: overlayRenderBox,\n    );\n\n    final Offset popoverTargetGlobalLeft = targetRenderBox.localToGlobal(\n      targetRenderBox.size.centerLeft(Offset.zero),\n      ancestor: overlayRenderBox,\n    );\n\n    final Offset popoverTargetGlobalRight = targetRenderBox.localToGlobal(\n      targetRenderBox.size.centerRight(Offset.zero),\n      ancestor: overlayRenderBox,\n    );\n\n    if (Directionality.of(context) == TextDirection.rtl ||\n        popoverPosition == MoonPopoverPosition.horizontal ||\n        popoverPosition == MoonPopoverPosition.vertical) {\n      switch (popoverPosition) {\n        case MoonPopoverPosition.left:\n          popoverPosition = MoonPopoverPosition.right;\n        case MoonPopoverPosition.right:\n          popoverPosition = MoonPopoverPosition.left;\n        case MoonPopoverPosition.topLeft:\n          popoverPosition = MoonPopoverPosition.topRight;\n        case MoonPopoverPosition.topRight:\n          popoverPosition = MoonPopoverPosition.topLeft;\n        case MoonPopoverPosition.bottomLeft:\n          popoverPosition = MoonPopoverPosition.bottomRight;\n        case MoonPopoverPosition.bottomRight:\n          popoverPosition = MoonPopoverPosition.bottomLeft;\n        case MoonPopoverPosition.vertical:\n          popoverPosition = popoverTargetGlobalCenter.dy <\n                  overlayRenderBox.size.center(Offset.zero).dy\n              ? MoonPopoverPosition.bottom\n              : MoonPopoverPosition.top;\n        case MoonPopoverPosition.horizontal:\n          popoverPosition = popoverTargetGlobalCenter.dx <\n                  overlayRenderBox.size.center(Offset.zero).dx\n              ? MoonPopoverPosition.right\n              : MoonPopoverPosition.left;\n        default:\n          break;\n      }\n    }\n\n    final _PopoverPositionProperties popoverPositionParameters =\n        _resolvePopoverPositionParameters(\n      popoverPosition: popoverPosition,\n      distanceToTarget: effectiveDistanceToTarget,\n      overlayWidth: overlayRenderBox.size.width,\n      popoverTargetGlobalLeft: popoverTargetGlobalLeft.dx,\n      popoverTargetGlobalCenter: popoverTargetGlobalCenter.dx,\n      popoverTargetGlobalRight: popoverTargetGlobalRight.dx,\n    );\n\n    return Semantics(\n      label: widget.semanticLabel,\n      child: UnconstrainedBox(\n        child: CompositedTransformFollower(\n          link: _layerLink,\n          showWhenUnlinked: false,\n          offset: popoverPositionParameters.offset,\n          followerAnchor: popoverPositionParameters.followerAnchor,\n          targetAnchor: popoverPositionParameters.targetAnchor,\n          child: TapRegion(\n            groupId: _regionKey,\n            behavior: HitTestBehavior.translucent,\n            onTapOutside: (PointerDownEvent _) => _handleTapOutside(),\n            child: RepaintBoundary(\n              child: FadeTransition(\n                opacity: _curvedAnimation!,\n                child: IconTheme(\n                  data: IconThemeData(color: effectiveIconColor),\n                  child: DefaultTextStyle(\n                    style: effectiveTextStyle.copyWith(\n                      color: effectiveTextColor,\n                    ),\n                    child: Container(\n                      constraints: BoxConstraints(\n                        minHeight: widget.minHeight ?? 0,\n                        minWidth: widget.minWidth ?? 0,\n                        maxHeight: widget.maxHeight ?? double.infinity,\n                        maxWidth: widget.maxWidth ??\n                            popoverPositionParameters.popoverMaxWidth,\n                      ),\n                      padding: resolvedContentPadding,\n                      decoration: widget.decoration ??\n                          ShapeDecorationWithPremultipliedAlpha(\n                            color: effectiveBackgroundColor,\n                            shadows: effectivePopoverShadows,\n                            shape: MoonSquircleBorder(\n                              borderRadius: effectiveBorderRadius\n                                  .squircleBorderRadius(context),\n                              side: BorderSide(\n                                color: widget.borderColor,\n                                width: widget.borderWidth,\n                              ),\n                            ),\n                          ),\n                      child: Directionality(\n                        textDirection: Directionality.of(context),\n                        child: widget.content,\n                      ),\n                    ),\n                  ),\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final Duration effectiveTransitionDuration = widget.transitionDuration ??\n        context.moonTheme?.popoverTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = widget.transitionCurve ??\n        context.moonTheme?.popoverTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    _animationController ??= AnimationController(\n      duration: effectiveTransitionDuration,\n      vsync: this,\n    );\n\n    _curvedAnimation ??= CurvedAnimation(\n      parent: _animationController!,\n      curve: effectiveTransitionCurve,\n    );\n\n    return TapRegion(\n      groupId: _regionKey,\n      behavior: HitTestBehavior.translucent,\n      child: CompositedTransformTarget(\n        link: _layerLink,\n        child: widget.child,\n      ),\n    );\n  }\n}\n\nclass _PopoverPositionProperties {\n  final Alignment followerAnchor;\n  final Alignment targetAnchor;\n  final double popoverMaxWidth;\n  final Offset offset;\n\n  _PopoverPositionProperties({\n    required this.followerAnchor,\n    required this.targetAnchor,\n    required this.popoverMaxWidth,\n    required this.offset,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/progress/circular_progress.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/progress/circular_progress/circular_progress_size_properties.dart';\nimport 'package:moon_design/src/theme/progress/circular_progress/circular_progress_sizes.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/widgets/common/progress_indicators/circular_progress_indicator.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonCircularProgressSize {\n  x2s,\n  xs,\n  sm,\n  md,\n  lg,\n}\n\nclass MoonCircularProgress extends StatelessWidget {\n  /// The color of the circular progress.\n  final Color? color;\n\n  /// The background color of the circular progress.\n  final Color? backgroundColor;\n\n  /// The custom size value of the circular progress. For predefined sizes, use\n  /// [circularProgressSize].\n  final double? sizeValue;\n\n  /// The width of the stroke for the circular progress.\n  final double? strokeWidth;\n\n  /// The progress value of the circular progress.\n  final double value;\n\n  /// The size of the circular progress.\n  final MoonCircularProgressSize? circularProgressSize;\n\n  /// The semantic label for the circular progress.\n  final String? semanticLabel;\n\n  /// The shape of the end of the stroke (stroke-cap) for the circular progress.\n  final StrokeCap? strokeCap;\n\n  /// Creates a Moon Design circular progress.\n  const MoonCircularProgress({\n    super.key,\n    this.color,\n    this.backgroundColor,\n    this.sizeValue,\n    this.strokeWidth,\n    required this.value,\n    this.circularProgressSize,\n    this.semanticLabel,\n    this.strokeCap,\n  });\n\n  MoonCircularProgressSizeProperties _getMoonCircularProgressSize(\n    BuildContext context,\n    MoonCircularProgressSize? moonCircularProgressSize,\n  ) {\n    switch (moonCircularProgressSize) {\n      case MoonCircularProgressSize.x2s:\n        return context.moonTheme?.circularProgressTheme.sizes.x2s ??\n            MoonCircularProgressSizes(tokens: MoonTokens.light).x2s;\n      case MoonCircularProgressSize.xs:\n        return context.moonTheme?.circularProgressTheme.sizes.xs ??\n            MoonCircularProgressSizes(tokens: MoonTokens.light).xs;\n      case MoonCircularProgressSize.sm:\n        return context.moonTheme?.circularProgressTheme.sizes.sm ??\n            MoonCircularProgressSizes(tokens: MoonTokens.light).sm;\n      case MoonCircularProgressSize.md:\n        return context.moonTheme?.circularProgressTheme.sizes.md ??\n            MoonCircularProgressSizes(tokens: MoonTokens.light).md;\n      case MoonCircularProgressSize.lg:\n        return context.moonTheme?.circularProgressTheme.sizes.lg ??\n            MoonCircularProgressSizes(tokens: MoonTokens.light).lg;\n      default:\n        return context.moonTheme?.circularProgressTheme.sizes.md ??\n            MoonCircularProgressSizes(tokens: MoonTokens.light).md;\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final Color effectiveColor = color ??\n        context.moonTheme?.circularProgressTheme.colors.color ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveBackgroundColor = backgroundColor ??\n        context.moonTheme?.circularProgressTheme.colors.backgroundColor ??\n        MoonColors.light.beerus;\n\n    final MoonCircularProgressSizeProperties effectiveMoonCircularProgressSize =\n        _getMoonCircularProgressSize(context, circularProgressSize);\n\n    final double effectiveSize =\n        sizeValue ?? effectiveMoonCircularProgressSize.progressSizeValue;\n\n    final double effectiveStrokeWidth =\n        strokeWidth ?? effectiveMoonCircularProgressSize.progressStrokeWidth;\n\n    final StrokeCap effectiveStrokeCap = strokeCap ?? StrokeCap.round;\n\n    return Semantics(\n      label: semanticLabel,\n      value: \"${value * 100}%\",\n      child: SizedBox(\n        height: effectiveSize,\n        width: effectiveSize,\n        child: MoonCircularProgressIndicator(\n          color: effectiveColor,\n          backgroundColor: effectiveBackgroundColor,\n          strokeWidth: effectiveStrokeWidth,\n          value: value,\n          strokeCap: effectiveStrokeCap,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/progress/linear_progress.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/progress/linear_progress/linear_progress_size_properties.dart';\nimport 'package:moon_design/src/theme/progress/linear_progress/linear_progress_sizes.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/widgets/common/progress_indicators/linear_progress_indicator.dart';\nimport 'package:moon_design/src/widgets/progress_pin/pin_style.dart';\nimport 'package:moon_design/src/widgets/progress_pin/progress_pin.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonLinearProgressSize {\n  x6s,\n  x5s,\n  x4s,\n  x3s,\n  x2s,\n}\n\nclass MoonLinearProgress extends StatelessWidget {\n  /// Whether to show the thumb and the pin for the linear progress.\n  final bool showPin;\n\n  /// Whether to show the [minLabel] widget for the linear progress.\n  final bool showMinLabel;\n\n  /// Whether to show the [maxLabel] widget for the linear progress.\n  final bool showMaxLabel;\n\n  /// Whether the pin height is added to the linear progress height.\n  /// Applies only when both this and [showPin] are true.\n  /// Otherwise, the pin acts as an overlay without affecting the linear\n  /// progress height.\n  final bool pinAffectsHeight;\n\n  /// The border radius of the linear progress.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The color of the linear progress.\n  final Color? color;\n\n  /// The background color of the linear progress.\n  final Color? backgroundColor;\n\n  /// The text color of the [minLabel] and [maxLabel] widgets.\n  final Color? textColor;\n\n  /// The height of the linear progress.\n  final double? height;\n\n  /// The vertical gap between the linear progress and the [minLabel] and\n  /// [maxLabel] widgets.\n  ///\n  /// Has effect only if [showMinLabel] and [showMaxLabel] are true.\n  final double? verticalGap;\n\n  /// The progress value of the linear progress.\n  final double value;\n\n  /// The size of the linear progress.\n  final MoonLinearProgressSize? linearProgressSize;\n\n  /// The styling options for the linear progress pin.\n  final PinStyle? pinStyle;\n\n  /// The semantic label for the linear progress.\n  final String? semanticLabel;\n\n  /// The widget to display the minimum progress value of the linear progress.\n  final Widget? minLabel;\n\n  /// The widget to display the maximum progress value of the linear progress.\n  final Widget? maxLabel;\n\n  /// Creates a Moon Design linear progress.\n  const MoonLinearProgress({\n    super.key,\n    this.showPin = false,\n    this.showMinLabel = false,\n    this.showMaxLabel = false,\n    this.pinAffectsHeight = true,\n    this.borderRadius,\n    this.color,\n    this.backgroundColor,\n    this.textColor,\n    this.height,\n    this.verticalGap,\n    required this.value,\n    this.linearProgressSize,\n    this.pinStyle,\n    this.semanticLabel,\n    this.minLabel,\n    this.maxLabel,\n  });\n\n  MoonLinearProgressSizeProperties _getMoonProgressSize(\n    BuildContext context,\n    MoonLinearProgressSize? moonProgressSize,\n  ) {\n    switch (moonProgressSize) {\n      case MoonLinearProgressSize.x6s:\n        return context.moonTheme?.linearProgressTheme.sizes.x6s ??\n            MoonLinearProgressSizes(tokens: MoonTokens.light).x6s;\n      case MoonLinearProgressSize.x5s:\n        return context.moonTheme?.linearProgressTheme.sizes.x5s ??\n            MoonLinearProgressSizes(tokens: MoonTokens.light).x5s;\n      case MoonLinearProgressSize.x4s:\n        return context.moonTheme?.linearProgressTheme.sizes.x4s ??\n            MoonLinearProgressSizes(tokens: MoonTokens.light).x4s;\n      case MoonLinearProgressSize.x3s:\n        return context.moonTheme?.linearProgressTheme.sizes.x3s ??\n            MoonLinearProgressSizes(tokens: MoonTokens.light).x3s;\n      case MoonLinearProgressSize.x2s:\n        return context.moonTheme?.linearProgressTheme.sizes.x2s ??\n            MoonLinearProgressSizes(tokens: MoonTokens.light).x2s;\n      default:\n        return context.moonTheme?.linearProgressTheme.sizes.x4s ??\n            MoonLinearProgressSizes(tokens: MoonTokens.light).x4s;\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final MoonLinearProgressSizeProperties effectiveProgressSize =\n        _getMoonProgressSize(context, linearProgressSize);\n\n    final BorderRadiusGeometry effectiveBorderRadius =\n        borderRadius ?? effectiveProgressSize.borderRadius;\n\n    // This is used to ensure that the corners of the progress bar properly\n    // touch the thumb with bigger bar variants.\n    final BorderRadiusGeometry progressRadius = switch (effectiveBorderRadius) {\n      BorderRadiusDirectional() when showPin == true =>\n        BorderRadiusDirectional.only(\n          topStart: effectiveBorderRadius.topStart,\n          bottomStart: effectiveBorderRadius.bottomStart,\n        ),\n      BorderRadius() when showPin == true => BorderRadiusDirectional.only(\n          topStart: effectiveBorderRadius.topLeft,\n          bottomStart: effectiveBorderRadius.bottomLeft,\n        ),\n      _ => effectiveBorderRadius,\n    };\n\n    final Color effectiveColor = color ??\n        context.moonTheme?.linearProgressTheme.colors.color ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveBackgroundColor = backgroundColor ??\n        context.moonTheme?.linearProgressTheme.colors.backgroundColor ??\n        MoonColors.light.beerus;\n\n    final Color effectiveTextColor = textColor ??\n        context.moonTheme?.linearProgressTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    final double effectiveHeight =\n        height ?? effectiveProgressSize.progressHeight;\n\n    final double effectiveVerticalGap =\n        verticalGap ?? effectiveProgressSize.verticalGap;\n\n    final double effectiveThumbSizeValue =\n        pinStyle?.thumbSizeValue ?? effectiveProgressSize.thumbSizeValue;\n\n    final double effectivePinWidth = pinStyle?.pinWidth ??\n        context.moonTheme?.progressPinTheme.properties.pinWidth ??\n        36;\n\n    final double effectivePinDistance = pinStyle?.pinDistance ??\n        context.moonTheme?.progressPinTheme.properties.pinDistance ??\n        MoonSizes.sizes.x5s;\n\n    final double effectivePinArrowHeight = pinStyle?.arrowHeight ??\n        context.moonTheme?.progressPinTheme.properties.arrowHeight ??\n        6;\n\n    final TextStyle effectiveTextStyle = effectiveProgressSize.textStyle;\n\n    final double resolvedPaddingValue =\n        effectiveThumbSizeValue - effectiveHeight > 0\n            ? effectiveThumbSizeValue / 2 - effectiveHeight / 2\n            : 0;\n\n    final double heightWithPin = effectivePinWidth +\n        effectivePinArrowHeight +\n        effectivePinDistance +\n        effectiveThumbSizeValue;\n\n    Widget child = MoonLinearProgressIndicator(\n      value: value,\n      color: effectiveColor,\n      backgroundColor: effectiveBackgroundColor,\n      containerRadius: effectiveBorderRadius,\n      progressRadius: showPin ? progressRadius : effectiveBorderRadius,\n      minHeight: effectiveHeight,\n    );\n\n    if (showPin) {\n      child = MoonProgressPin(\n        progressValue: value,\n        pinText: '${(value * 100).round()}%',\n        pinStyle: pinStyle?.copyWith(thumbSizeValue: effectiveThumbSizeValue),\n        child: child,\n      );\n    }\n\n    if (showMinLabel || showMaxLabel) {\n      child = Column(\n        mainAxisSize: MainAxisSize.min,\n        mainAxisAlignment: MainAxisAlignment.end,\n        children: [\n          Row(\n            mainAxisAlignment: MainAxisAlignment.spaceBetween,\n            children: [\n              if (showMinLabel)\n                Expanded(\n                  child: DefaultTextStyle(\n                    style:\n                        effectiveTextStyle.copyWith(color: effectiveTextColor),\n                    child: Align(\n                      alignment: AlignmentDirectional.centerStart,\n                      child: minLabel ?? const Text(\"0%\"),\n                    ),\n                  ),\n                ),\n              if (showMaxLabel)\n                Expanded(\n                  child: DefaultTextStyle(\n                    style:\n                        effectiveTextStyle.copyWith(color: effectiveTextColor),\n                    child: Align(\n                      alignment: AlignmentDirectional.centerEnd,\n                      child: maxLabel ?? const Text(\"100%\"),\n                    ),\n                  ),\n                ),\n            ],\n          ),\n          SizedBox(height: effectiveVerticalGap),\n          child,\n        ],\n      );\n    }\n\n    if (showPin && pinAffectsHeight) {\n      child = Container(\n        height: heightWithPin,\n        padding: EdgeInsets.only(bottom: resolvedPaddingValue),\n        alignment: Alignment.bottomCenter,\n        child: child,\n      );\n    }\n\n    return Semantics(\n      label: semanticLabel,\n      value: \"${value * 100}%\",\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/progress_pin/pin_style.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass PinStyle {\n  /// Whether to show a shadow around the progress pin.\n  final bool? showShadow;\n\n  /// The color of the progress pin.\n  final Color? pinColor;\n\n  /// The border color of the progress pin.\n  final Color? pinBorderColor;\n\n  /// The color of the progress thumb.\n  final Color? thumbColor;\n\n  /// The shadow color of the progress pin.\n  final Color? shadowColor;\n\n  /// The height of the progress pin arrow.\n  final double? arrowHeight;\n\n  /// The width of the progress pin arrow.\n  final double? arrowWidth;\n\n  /// The size value of the progress thumb.\n  final double? thumbSizeValue;\n\n  /// The width of the progress pin.\n  final double? pinWidth;\n\n  /// The border width of the progress pin.\n  final double? pinBorderWidth;\n\n  /// The vertical distance between the progress pin and the linear progress\n  /// widget.\n  final double? pinDistance;\n\n  /// The shadow elevation of the progress pin.\n  final double? shadowElevation;\n\n  /// The text style of the progress pin.\n  final TextStyle? textStyle;\n\n  /// Defines a Moon Design linear progress pin style.\n  const PinStyle({\n    this.showShadow = true,\n    this.pinColor,\n    this.pinBorderColor,\n    this.thumbColor,\n    this.shadowColor,\n    this.arrowHeight,\n    this.arrowWidth,\n    this.thumbSizeValue,\n    this.pinWidth,\n    this.pinBorderWidth,\n    this.pinDistance,\n    this.shadowElevation,\n    this.textStyle,\n  });\n\n  PinStyle copyWith({\n    bool? showShadow,\n    Color? pinColor,\n    Color? pinBorderColor,\n    Color? thumbColor,\n    Color? shadowColor,\n    double? arrowHeight,\n    double? arrowWidth,\n    double? thumbSizeValue,\n    double? pinWidth,\n    double? pinBorderWidth,\n    double? pinDistance,\n    double? shadowElevation,\n    TextStyle? textStyle,\n  }) {\n    return PinStyle(\n      showShadow: showShadow ?? this.showShadow,\n      pinColor: pinColor ?? this.pinColor,\n      pinBorderColor: pinBorderColor ?? this.pinBorderColor,\n      thumbColor: thumbColor ?? this.thumbColor,\n      shadowColor: shadowColor ?? this.shadowColor,\n      arrowHeight: arrowHeight ?? this.arrowHeight,\n      arrowWidth: arrowWidth ?? this.arrowWidth,\n      thumbSizeValue: thumbSizeValue ?? this.thumbSizeValue,\n      pinWidth: pinWidth ?? this.pinWidth,\n      pinBorderWidth: pinBorderWidth ?? this.pinBorderWidth,\n      pinDistance: pinDistance ?? this.pinDistance,\n      shadowElevation: shadowElevation ?? this.shadowElevation,\n      textStyle: textStyle ?? this.textStyle,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/progress_pin/progress_pin.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/widgets/progress_pin/pin_style.dart';\nimport 'package:moon_design/src/widgets/progress_pin/progress_pin_painter.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonProgressPin extends StatelessWidget {\n  final double progressValue;\n  final PinStyle? pinStyle;\n  final String pinText;\n  final Widget child;\n\n  /// Creates a Moon Design progress pin.\n  const MoonProgressPin({\n    super.key,\n    required this.progressValue,\n    this.pinStyle,\n    required this.pinText,\n    required this.child,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    final Color effectivePinColor = pinStyle?.pinColor ??\n        context.moonTheme?.progressPinTheme.colors.pinColor ??\n        MoonColors.light.popo;\n\n    final Color effectivePinBorderColor = pinStyle?.pinBorderColor ??\n        context.moonTheme?.progressPinTheme.colors.pinBorderColor ??\n        MoonColors.light.goten;\n\n    final Color effectiveThumbColor = pinStyle?.thumbColor ??\n        context.moonTheme?.progressPinTheme.colors.thumbColor ??\n        MoonColors.light.goten;\n\n    final Color effectiveShadowColor = pinStyle?.shadowColor ??\n        context.moonTheme?.progressPinTheme.colors.shadowColor ??\n        MoonColors.light.popo;\n\n    final Color effectiveTextColor = pinStyle?.textStyle?.color ??\n        context.moonTheme?.progressPinTheme.colors.textColor ??\n        MoonColors.light.goten;\n\n    final TextStyle effectiveTextStyle = pinStyle?.textStyle ??\n        context.moonTheme?.progressPinTheme.properties.textStyle ??\n        MoonTypography.typography.body.text10;\n\n    final double effectivePinWidth = pinStyle?.pinWidth ??\n        context.moonTheme?.progressPinTheme.properties.pinWidth ??\n        36;\n\n    final double effectivePinBorderWidth = pinStyle?.pinBorderWidth ??\n        context.moonTheme?.progressPinTheme.properties.pinBorderWidth ??\n        MoonSizes.sizes.x6s;\n\n    final double effectivePinDistance = pinStyle?.pinDistance ??\n        context.moonTheme?.progressPinTheme.properties.pinDistance ??\n        MoonSizes.sizes.x5s;\n\n    final double effectiveArrowHeight = pinStyle?.arrowHeight ??\n        context.moonTheme?.progressPinTheme.properties.arrowHeight ??\n        6;\n\n    final double effectiveArrowWidth = pinStyle?.arrowWidth ??\n        context.moonTheme?.progressPinTheme.properties.arrowWidth ??\n        MoonSizes.sizes.x4s;\n\n    final double effectiveShadowElevation = pinStyle?.shadowElevation ??\n        context.moonTheme?.progressPinTheme.properties.shadowElevation ??\n        6;\n\n    final TextDirection effectiveTextDirection = Directionality.of(context);\n\n    return CustomPaint(\n      foregroundPainter: ProgressPinPainter(\n        showShadow: pinStyle?.showShadow ?? true,\n        pinColor: effectivePinColor,\n        thumbColor: effectiveThumbColor,\n        shadowColor: effectiveShadowColor,\n        pinBorderColor: effectivePinBorderColor,\n        pinBorderWidth: effectivePinBorderWidth,\n        arrowHeight: effectiveArrowHeight,\n        arrowWidth: effectiveArrowWidth,\n        pinDistance: effectivePinDistance,\n        pinWidth: effectivePinWidth,\n        thumbSizeValue: pinStyle?.thumbSizeValue,\n        progressValue: progressValue,\n        shadowElevation: effectiveShadowElevation,\n        pinText: pinText,\n        textDirection: effectiveTextDirection,\n        textStyle: effectiveTextStyle.copyWith(color: effectiveTextColor),\n      ),\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/progress_pin/progress_pin_painter.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass ProgressPinPainter extends CustomPainter {\n  final bool showShadow;\n  final Color pinColor;\n  final Color thumbColor;\n  final Color shadowColor;\n  final Color pinBorderColor;\n  final double arrowHeight;\n  final double arrowWidth;\n  final double pinBorderWidth;\n  final double pinDistance;\n  final double pinWidth;\n  final double? thumbSizeValue;\n  final double progressValue;\n  final double shadowElevation;\n  final String pinText;\n  final TextStyle textStyle;\n  final TextDirection textDirection;\n\n  const ProgressPinPainter({\n    required this.showShadow,\n    required this.pinColor,\n    required this.thumbColor,\n    required this.shadowColor,\n    required this.pinBorderColor,\n    required this.pinBorderWidth,\n    required this.arrowHeight,\n    required this.arrowWidth,\n    required this.pinDistance,\n    required this.pinWidth,\n    this.thumbSizeValue,\n    required this.progressValue,\n    required this.shadowElevation,\n    required this.pinText,\n    required this.textStyle,\n    required this.textDirection,\n  });\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final double radius = pinWidth / 2;\n    final double thumbRadius = switch (thumbSizeValue) {\n      _ when thumbSizeValue != null => thumbSizeValue! / 2,\n      _ => size.height / 2,\n    };\n    final double offsetY =\n        -(radius + arrowHeight + pinDistance) + (size.height / 2 - thumbRadius);\n\n    // Offset based on directionality.\n    double offsetX = progressValue * size.width;\n\n    switch (textDirection) {\n      case TextDirection.rtl:\n        offsetX = size.width - progressValue * size.width;\n      case TextDirection.ltr:\n        offsetX = progressValue * size.width;\n    }\n\n    // Assign colors.\n    final Paint outerCirclePaint = Paint()..color = pinBorderColor;\n    final Paint innerCirclePaint = Paint()..color = pinColor;\n    final Paint thumbCirclePaint = Paint()..color = thumbColor;\n\n    // Create outer circle with triangle path.\n    final Path path = Path()\n      ..addOval(\n        Rect.fromCircle(center: Offset(offsetX, offsetY), radius: radius),\n      )\n      ..addOval(\n        Rect.fromCircle(center: Offset(offsetX, offsetY), radius: radius),\n      )\n      ..moveTo(\n        offsetX - arrowWidth / 2,\n        offsetY + radius - 0.5,\n      ) // shift the origin \"up\" by 0.5 to avoid aliasing\n      ..lineTo(offsetX, offsetY + radius + arrowHeight)\n      ..lineTo(\n        offsetX + arrowWidth / 2,\n        offsetY + radius - 0.5,\n      ) // shift the destination \"up\" by 0.5 to avoid aliasing\n      ..close();\n\n    // Draw shadow around outer path.\n    if (showShadow) {\n      canvas.drawShadow(path, shadowColor, shadowElevation, false);\n    }\n\n    // Draw outer path.\n    canvas.drawPath(path, outerCirclePaint);\n\n    // Draw inner circle.\n    canvas.drawCircle(\n      Offset(offsetX, offsetY),\n      radius - pinBorderWidth,\n      innerCirclePaint,\n    );\n\n    // Draw thumb.\n    canvas.drawCircle(\n      Offset(offsetX, size.height / 2),\n      thumbRadius,\n      thumbCirclePaint,\n    );\n\n    // Draw pin text.\n    final TextPainter pinTextPainter = TextPainter(\n      text: TextSpan(text: pinText, style: textStyle),\n      textDirection: textDirection,\n    );\n\n    pinTextPainter.layout();\n    pinTextPainter.paint(\n      canvas,\n      Offset(\n        offsetX - pinTextPainter.width / 2,\n        offsetY - pinTextPainter.height / 2,\n      ),\n    );\n  }\n\n  @override\n  bool shouldRepaint(ProgressPinPainter oldPainter) {\n    return oldPainter.progressValue != progressValue ||\n        oldPainter.pinWidth != pinWidth ||\n        oldPainter.pinBorderWidth != pinBorderWidth ||\n        oldPainter.pinColor != pinColor ||\n        oldPainter.pinBorderColor != pinBorderColor ||\n        oldPainter.pinDistance != pinDistance ||\n        oldPainter.thumbColor != thumbColor ||\n        oldPainter.thumbSizeValue != thumbSizeValue ||\n        oldPainter.showShadow != showShadow ||\n        oldPainter.shadowColor != shadowColor ||\n        oldPainter.shadowElevation != shadowElevation ||\n        oldPainter.textDirection != textDirection;\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/radio/radio.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/effects/effects_theme.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/opacities.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/utils/touch_target_padding.dart';\nimport 'package:moon_design/src/widgets/common/effects/focus_effect.dart';\nimport 'package:moon_design/src/widgets/radio/radio_painter.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nclass MoonRadio<T> extends StatefulWidget {\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// Set to true if this radio button is allowed to be returned to an\n  /// indeterminate state by selecting it again when selected.\n  ///\n  /// To indicate returning to an indeterminate state, [onChanged] is called\n  /// with null.\n  ///\n  /// If true, [onChanged] is called with [value] when selected while\n  /// [groupValue] != [value], or with null when selected again while\n  /// [groupValue] == [value].\n  ///\n  /// If false, [onChanged] is called with [value] when selected while\n  /// [groupValue] != [value], and only by selecting another radio button in the\n  /// group (i.e. changing the value of [groupValue]) can this radio button be\n  /// unselected.\n  final bool toggleable;\n\n  /// The color of the active (selected) radio button.\n  final Color? activeColor;\n\n  /// The background color of the inactive (unselected) radio button.\n  final Color? inactiveColor;\n\n  /// The size of the radio button tap target.\n  ///\n  /// Defaults to 40.\n  final double tapAreaSizeValue;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The semantic label for the radio button.\n  final String? semanticLabel;\n\n  /// The value of the radio button.\n  final T value;\n\n  /// The value of a group of radio buttons.\n  ///\n  /// This radio button is considered selected if its [value] matches the\n  /// [groupValue].\n  final T? groupValue;\n\n  /// The callback that is called when the user selects the radio button.\n  ///\n  /// The radio button passes its [value] as a parameter to [onChanged]\n  /// callback. The radio button does not actually change state until the parent\n  /// widget rebuilds the radio button with the new [groupValue].\n  ///\n  /// If null, the radio button is displayed as disabled.\n  ///\n  /// The provided callback is not invoked if this radio button is already\n  /// selected.\n  ///\n  /// The callback provided to [onChanged] should update the state of the parent\n  /// [StatefulWidget] using the [State.setState] method, so that the parent\n  /// gets rebuilt.\n  final ValueChanged<T?>? onChanged;\n\n  /// Creates a Moon Design radio button.\n  const MoonRadio({\n    super.key,\n    this.autofocus = false,\n    this.toggleable = false,\n    this.activeColor,\n    this.inactiveColor,\n    this.tapAreaSizeValue = 40,\n    this.focusNode,\n    this.semanticLabel,\n    required this.value,\n    required this.groupValue,\n    required this.onChanged,\n  });\n\n  bool get _selected => value == groupValue;\n\n  @override\n  State<MoonRadio<T>> createState() => _RadioState<T>();\n}\n\nclass _RadioState<T> extends State<MoonRadio<T>>\n    with TickerProviderStateMixin, ToggleableStateMixin {\n  final MoonRadioPainter _painter = MoonRadioPainter();\n\n  void _handleChanged(bool? selected) {\n    if (selected == null) {\n      widget.onChanged!(null);\n\n      return;\n    }\n    if (selected) {\n      widget.onChanged!(widget.value);\n    }\n  }\n\n  @override\n  void didUpdateWidget(MoonRadio<T> oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (widget._selected != oldWidget._selected) animateToValue();\n  }\n\n  @override\n  void dispose() {\n    _painter.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  ValueChanged<bool?>? get onChanged =>\n      widget.onChanged != null ? _handleChanged : null;\n\n  @override\n  bool get tristate => widget.toggleable;\n\n  @override\n  bool? get value => widget._selected;\n\n  @override\n  Widget build(BuildContext context) {\n    const Size size = Size(16, 16);\n\n    final Color effectiveActiveColor = widget.activeColor ??\n        context.moonTheme?.radioTheme.colors.activeColor ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveInactiveColor = widget.inactiveColor ??\n        context.moonTheme?.radioTheme.colors.inactiveColor ??\n        MoonColors.light.trunks;\n\n    final Color effectiveFocusEffectColor =\n        context.moonEffects?.controlFocusEffect.effectColor ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectColor;\n\n    final double effectiveFocusEffectExtent =\n        context.moonEffects?.controlFocusEffect.effectExtent ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectExtent;\n\n    final Duration effectiveFocusEffectDuration =\n        context.moonEffects?.controlFocusEffect.effectDuration ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectDuration;\n\n    final Curve effectiveFocusEffectCurve =\n        context.moonEffects?.controlFocusEffect.effectCurve ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectCurve;\n\n    final double effectiveDisabledOpacityValue =\n        context.moonOpacities?.disabled ?? MoonOpacities.opacities.disabled;\n\n    final MaterialStateProperty<MouseCursor> effectiveMouseCursor =\n        MaterialStateProperty.resolveWith<MouseCursor>(\n            (Set<MaterialState> states) {\n      return MaterialStateMouseCursor.clickable.resolve(states);\n    });\n\n    return Semantics(\n      label: widget.semanticLabel,\n      inMutuallyExclusiveGroup: true,\n      checked: widget._selected,\n      child: TouchTargetPadding(\n        minSize: Size(widget.tapAreaSizeValue, widget.tapAreaSizeValue),\n        child: MoonFocusEffect(\n          show: states.contains(MaterialState.focused),\n          effectExtent: effectiveFocusEffectExtent,\n          childBorderRadius: BorderRadius.circular(8),\n          effectColor: effectiveFocusEffectColor,\n          effectCurve: effectiveFocusEffectCurve,\n          effectDuration: effectiveFocusEffectDuration,\n          child: RepaintBoundary(\n            child: AnimatedOpacity(\n              opacity: states.contains(MaterialState.disabled)\n                  ? effectiveDisabledOpacityValue\n                  : 1,\n              duration: effectiveFocusEffectDuration,\n              child: buildToggleable(\n                focusNode: widget.focusNode,\n                autofocus: widget.autofocus,\n                mouseCursor: effectiveMouseCursor,\n                size: size,\n                painter: _painter\n                  ..position = position\n                  ..activeColor = effectiveActiveColor\n                  ..inactiveColor = effectiveInactiveColor,\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/radio/radio_painter.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/color_premul_lerp.dart';\n\nclass MoonRadioPainter extends ToggleablePainter {\n  static const double _kOuterRadius = 8.0;\n  static const double _kInnerRadius = 4.0;\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final Offset center = (Offset.zero & size).center;\n\n    // Outer circle.\n    final Paint paint = Paint()\n      ..color = colorPremulLerp(inactiveColor, activeColor, position.value)!\n      ..style = PaintingStyle.stroke\n      ..strokeWidth = 1.0;\n\n    canvas.drawCircle(center, _kOuterRadius, paint);\n\n    // Inner circle.\n    if (!position.isDismissed) {\n      paint.style = PaintingStyle.fill;\n\n      canvas.drawCircle(center, _kInnerRadius * position.value, paint);\n    }\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/segmented_control/segment.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/widgets/segmented_control/segment_style.dart';\n\nclass Segment {\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autoFocus;\n\n  /// Whether the segment is focusable.\n  final bool isFocusable;\n\n  /// Whether to show a focus outline effect when the segment is focused.\n  final bool showFocusEffect;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The styling options for the segment.\n  final SegmentStyle? segmentStyle;\n\n  /// The semantic label for the segment.\n  final String? semanticLabel;\n\n  /// The callback that returns the current selection status of the segment as a\n  /// boolean value.\n  final ValueChanged<bool>? isSelected;\n\n  /// The widget to display before the [label] widget of the segment.\n  final Widget? leading;\n\n  /// The primary content of the segment widget.\n  final Widget? label;\n\n  /// The widget to display after the [label] widget of the segment.\n  final Widget? trailing;\n\n  /// Creates a Moon Design segment.\n  const Segment({\n    this.autoFocus = false,\n    this.isFocusable = true,\n    this.showFocusEffect = true,\n    this.focusNode,\n    this.segmentStyle,\n    this.semanticLabel,\n    this.isSelected,\n    this.leading,\n    this.label,\n    this.trailing,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/segmented_control/segment_style.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/widgets/segmented_control/segment.dart';\n\nclass SegmentStyle {\n  /// The border radius of the segment.\n  final BorderRadiusGeometry? segmentBorderRadius;\n\n  /// The color of the segment focus effect.\n  final Color? focusEffectColor;\n\n  /// The color of the selected segment.\n  final Color? selectedSegmentColor;\n\n  /// The default text color of the segment.\n  final Color? textColor;\n\n  /// The text color of the selected segment.\n  final Color? selectedTextColor;\n\n  /// The custom decoration of the segment.\n  final Decoration? decoration;\n\n  /// The gap between the [Segment.leading], [Segment.label] and\n  /// [Segment.trailing] widgets of the segment.\n  final double? segmentGap;\n\n  /// The padding of the segment.\n  final EdgeInsetsGeometry? segmentPadding;\n\n  /// The text style of the segment.\n  ///\n  /// If [TextStyle] color is used, then it overrides the [textColor] and\n  /// [selectedTextColor].\n  final TextStyle? textStyle;\n\n  /// Defines a Moon Design segment style.\n  const SegmentStyle({\n    this.segmentBorderRadius,\n    this.focusEffectColor,\n    this.selectedSegmentColor,\n    this.textColor,\n    this.selectedTextColor,\n    this.decoration,\n    this.segmentGap,\n    this.segmentPadding,\n    this.textStyle,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/segmented_control/segmented_control.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/segmented_control/segmented_control_size_properties.dart';\nimport 'package:moon_design/src/theme/segmented_control/segmented_control_sizes.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/opacities.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/utils/color_tween_premul.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/widgets/common/base_control.dart';\nimport 'package:moon_design/src/widgets/common/base_segmented_tab_bar.dart';\nimport 'package:moon_design/src/widgets/segmented_control/segment.dart';\nimport 'package:moon_design/src/widgets/segmented_control/segment_style.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonSegmentedControlSize {\n  sm,\n  md,\n}\n\ntypedef MoonCustomSegmentBuilder = Widget Function(\n  BuildContext context,\n  bool isSelected,\n);\n\nclass MoonSegmentedControl extends StatefulWidget {\n  /// Whether the segmented control is disabled.\n  final bool isDisabled;\n\n  /// Whether the segmented control is expanded to its full available\n  /// width horizontally.\n  final bool isExpanded;\n\n  /// The border radius of the segmented control.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the segmented control.\n  final Color? backgroundColor;\n\n  /// The gap between the segmented control segments.\n  final double? gap;\n\n  /// The height of the segmented control.\n  final double? height;\n\n  /// The width of the segmented control.\n  final double? width;\n\n  /// The duration of the segmented control transition animation.\n  final Duration? transitionDuration;\n\n  /// The curve of the segmented control transition animation.\n  final Curve? transitionCurve;\n\n  /// The padding of the segmented control.\n  final EdgeInsetsGeometry? padding;\n\n  /// The index of the initially selected segment.\n  /// This property is overridden by the [tabController]'s initial index if the\n  /// [tabController] is provided. For external updates to the segment index,\n  /// use [tabController].\n  final int initialIndex;\n\n  /// The size of the segmented control.\n  final MoonSegmentedControlSize? segmentedControlSize;\n\n  /// The custom decoration of the segmented control.\n  final Decoration? decoration;\n\n  /// The external controller for managing segment selection and animation in\n  /// segmented control. If tabController is provided, then [initialIndex] is\n  /// ignored and tabController's index is used instead.\n  final TabController? tabController;\n\n  /// The callback that returns the index of the currently selected segment.\n  final ValueChanged<int>? onSegmentChanged;\n\n  /// The list of segments to display as the children of the segmented control.\n  /// At least one child is required when this property is used. Cannot be used\n  /// in conjunction with the [customSegments] property, one of them must be\n  /// null.\n  final List<Segment>? segments;\n\n  /// The list of custom segments to display as the children of the segmented\n  /// control. At least one child is required when this property is used. Cannot\n  /// be used in conjunction with the [segments] property, one of them must be\n  /// null.\n  final List<MoonCustomSegmentBuilder>? customSegments;\n\n  /// Creates a Moon Design segmented control.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonSegmentedControl.custom], Moon Design custom segmented control.\n  const MoonSegmentedControl({\n    super.key,\n    this.isDisabled = false,\n    this.isExpanded = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.gap,\n    this.height,\n    this.width,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.padding,\n    this.initialIndex = 0,\n    this.segmentedControlSize,\n    this.decoration,\n    this.tabController,\n    this.onSegmentChanged,\n    required this.segments,\n  })  : assert(height == null || height > 0),\n        assert(segments != null && segments.length > 0),\n        customSegments = null;\n\n  /// Creates a Moon Design custom segmented control.\n  const MoonSegmentedControl.custom({\n    super.key,\n    this.isDisabled = false,\n    this.isExpanded = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.gap,\n    this.height,\n    this.width,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.padding,\n    this.initialIndex = 0,\n    this.segmentedControlSize,\n    this.decoration,\n    this.tabController,\n    this.onSegmentChanged,\n    required this.customSegments,\n  })  : assert(height == null || height > 0),\n        assert(customSegments != null && customSegments.length > 0),\n        segments = null;\n\n  @override\n  State<MoonSegmentedControl> createState() => _MoonSegmentedControlState();\n}\n\nclass _MoonSegmentedControlState extends State<MoonSegmentedControl> {\n  late final bool _hasDefaultSegments = widget.segments != null;\n\n  late int _selectedIndex = widget.tabController?.index ?? widget.initialIndex;\n\n  MoonSegmentedControlSizeProperties _getMoonSegmentedControlSize(\n    BuildContext context,\n    MoonSegmentedControlSize? segmentedControlSize,\n  ) {\n    switch (segmentedControlSize) {\n      case MoonSegmentedControlSize.sm:\n        return context.moonTheme?.segmentedControlTheme.sizes.sm ??\n            MoonSegmentedControlSizes(tokens: MoonTokens.light).sm;\n      case MoonSegmentedControlSize.md:\n        return context.moonTheme?.segmentedControlTheme.sizes.md ??\n            MoonSegmentedControlSizes(tokens: MoonTokens.light).md;\n      default:\n        return context.moonTheme?.segmentedControlTheme.sizes.md ??\n            MoonSegmentedControlSizes(tokens: MoonTokens.light).md;\n    }\n  }\n\n  void _updateSegmentsSelectedStatus() {\n    if (_hasDefaultSegments) {\n      widget.segments?.asMap().forEach((int index, Segment segment) {\n        segment.isSelected?.call(index == _selectedIndex);\n      });\n    } else {\n      widget.customSegments?.asMap().forEach(\n          (int index, Widget Function(BuildContext, bool) customSegment) {\n        customSegment.call(context, index == _selectedIndex);\n      });\n    }\n  }\n\n  void _handleSegmentChange() {\n    final int animationValue =\n        widget.tabController?.animation?.value.round() ?? 0;\n    if (animationValue != _selectedIndex) {\n      setState(() {\n        _selectedIndex = animationValue;\n\n        widget.onSegmentChanged?.call(animationValue);\n        _updateSegmentsSelectedStatus();\n      });\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _updateSegmentsSelectedStatus();\n\n    widget.tabController?.animation?.addListener(_handleSegmentChange);\n  }\n\n  @override\n  void dispose() {\n    widget.tabController?.animation?.removeListener(_handleSegmentChange);\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final MoonSegmentedControlSizeProperties effectiveMoonSegmentControlSize =\n        _getMoonSegmentedControlSize(context, widget.segmentedControlSize);\n\n    final BorderRadiusGeometry effectiveBorderRadius = widget.borderRadius ??\n        context.moonTheme?.segmentedControlTheme.properties.borderRadius ??\n        MoonBorders.borders.interactiveMd;\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.segmentedControlTheme.colors.backgroundColor ??\n        MoonColors.light.gohan;\n\n    final double effectiveDisabledOpacityValue =\n        context.moonOpacities?.disabled ?? MoonOpacities.opacities.disabled;\n\n    final double effectiveHeight =\n        widget.height ?? effectiveMoonSegmentControlSize.height;\n\n    final double effectiveGap = widget.gap ??\n        context.moonTheme?.segmentedControlTheme.properties.gap ??\n        MoonSizes.sizes.x5s;\n\n    final Duration effectiveTransitionDuration = widget.transitionDuration ??\n        context\n            .moonTheme?.segmentedControlTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = widget.transitionCurve ??\n        context.moonTheme?.segmentedControlTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    final EdgeInsetsGeometry effectivePadding = widget.padding ??\n        context.moonTheme?.segmentedControlTheme.properties.padding ??\n        const EdgeInsets.all(4);\n\n    return AnimatedOpacity(\n      opacity: widget.isDisabled ? effectiveDisabledOpacityValue : 1,\n      duration: effectiveTransitionDuration,\n      child: Container(\n        height: effectiveHeight,\n        width: widget.width,\n        padding: effectivePadding,\n        constraints: BoxConstraints(minWidth: effectiveHeight),\n        decoration: widget.decoration ??\n            ShapeDecorationWithPremultipliedAlpha(\n              color: effectiveBackgroundColor,\n              shape: MoonSquircleBorder(\n                borderRadius:\n                    effectiveBorderRadius.squircleBorderRadius(context),\n              ),\n            ),\n        child: BaseSegmentedTabBar(\n          gap: effectiveGap,\n          isExpanded: widget.isExpanded,\n          tabController: widget.tabController,\n          valueChanged: (int newIndex) {\n            if (_selectedIndex == newIndex) return;\n            if (widget.isDisabled) return;\n\n            setState(() {\n              _selectedIndex = newIndex;\n\n              if (widget.tabController == null) {\n                widget.onSegmentChanged?.call(newIndex);\n                _updateSegmentsSelectedStatus();\n              }\n            });\n          },\n          children: _hasDefaultSegments\n              ? List.generate(\n                  widget.segments!.length,\n                  (int index) {\n                    return _SegmentBuilder(\n                      isDisabled: widget.isDisabled,\n                      transitionDuration: effectiveTransitionDuration,\n                      transitionCurve: effectiveTransitionCurve,\n                      isSelected: index == _selectedIndex,\n                      backgroundColor: effectiveBackgroundColor,\n                      moonSegmentedControlSizeProperties:\n                          effectiveMoonSegmentControlSize,\n                      segment: widget.segments![index],\n                    );\n                  },\n                )\n              : List.generate(\n                  widget.customSegments!.length,\n                  (int index) {\n                    return widget.customSegments![index](\n                      context,\n                      index == _selectedIndex,\n                    );\n                  },\n                ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _SegmentBuilder extends StatefulWidget {\n  final bool isDisabled;\n  final bool isSelected;\n  final Color backgroundColor;\n  final Duration transitionDuration;\n  final Curve transitionCurve;\n  final MoonSegmentedControlSizeProperties moonSegmentedControlSizeProperties;\n  final Segment segment;\n\n  const _SegmentBuilder({\n    required this.isDisabled,\n    required this.isSelected,\n    required this.backgroundColor,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.moonSegmentedControlSizeProperties,\n    required this.segment,\n  });\n\n  @override\n  State<_SegmentBuilder> createState() => _SegmentBuilderState();\n}\n\nclass _SegmentBuilderState extends State<_SegmentBuilder>\n    with SingleTickerProviderStateMixin {\n  final ColorTweenWithPremultipliedAlpha _segmentColorTween =\n      ColorTweenWithPremultipliedAlpha();\n  final ColorTweenWithPremultipliedAlpha _textColorTween =\n      ColorTweenWithPremultipliedAlpha();\n\n  Animation<Color?>? _segmentColor;\n  Animation<Color?>? _textColor;\n\n  AnimationController? _animationController;\n\n  void _handleActiveEffect(bool isActive) {\n    isActive\n        ? _animationController?.forward()\n        : _animationController?.reverse();\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _animationController =\n        AnimationController(duration: widget.transitionDuration, vsync: this);\n\n    if (widget.isSelected) _animationController?.value = 1;\n  }\n\n  @override\n  void dispose() {\n    _animationController!.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final SegmentStyle? segmentStyle = widget.segment.segmentStyle;\n\n    final BorderRadiusGeometry effectiveSegmentBorderRadius =\n        segmentStyle?.segmentBorderRadius ??\n            widget.moonSegmentedControlSizeProperties.segmentBorderRadius;\n\n    final Color effectiveSelectedSegmentColor = segmentStyle\n            ?.selectedSegmentColor ??\n        context.moonTheme?.segmentedControlTheme.colors.selectedSegmentColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveTextColor = segmentStyle?.textStyle?.color ??\n        segmentStyle?.textColor ??\n        context.moonTheme?.segmentedControlTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    final Color effectiveSelectedTextColor = segmentStyle?.selectedTextColor ??\n        context.moonTheme?.segmentedControlTheme.colors.selectedTextColor ??\n        MoonColors.light.piccolo;\n\n    final TextStyle effectiveTextStyle = widget\n        .moonSegmentedControlSizeProperties.textStyle\n        .merge(segmentStyle?.textStyle);\n\n    final double effectiveSegmentGap = segmentStyle?.segmentGap ??\n        widget.moonSegmentedControlSizeProperties.segmentGap;\n\n    final EdgeInsetsGeometry effectiveSegmentPadding =\n        segmentStyle?.segmentPadding ??\n            widget.moonSegmentedControlSizeProperties.segmentPadding;\n\n    final EdgeInsets resolvedDirectionalPadding =\n        effectiveSegmentPadding.resolve(Directionality.of(context));\n\n    final EdgeInsetsGeometry correctedSegmentPadding =\n        segmentStyle?.segmentPadding == null\n            ? EdgeInsetsDirectional.fromSTEB(\n                widget.segment.leading == null && widget.segment.label != null\n                    ? resolvedDirectionalPadding.left\n                    : 0,\n                resolvedDirectionalPadding.top,\n                widget.segment.trailing == null && widget.segment.label != null\n                    ? resolvedDirectionalPadding.right\n                    : 0,\n                resolvedDirectionalPadding.bottom,\n              )\n            : resolvedDirectionalPadding;\n\n    _segmentColor ??= _animationController!.drive(\n      _segmentColorTween.chain(CurveTween(curve: widget.transitionCurve)),\n    );\n\n    _textColor ??= _animationController!.drive(\n      _textColorTween.chain(CurveTween(curve: widget.transitionCurve)),\n    );\n\n    _segmentColorTween.end = effectiveSelectedSegmentColor;\n\n    _textColorTween\n      ..begin = effectiveTextColor\n      ..end = effectiveSelectedTextColor;\n\n    return MoonBaseControl(\n      onLongPress: widget.isDisabled ? null : () => {},\n      autofocus: widget.segment.autoFocus,\n      focusNode: widget.segment.focusNode,\n      isFocusable: widget.segment.isFocusable,\n      showFocusEffect: widget.segment.showFocusEffect,\n      focusEffectColor: segmentStyle?.focusEffectColor,\n      semanticLabel: widget.segment.semanticLabel,\n      borderRadius: effectiveSegmentBorderRadius.squircleBorderRadius(context),\n      cursor: widget.isSelected\n          ? SystemMouseCursors.basic\n          : SystemMouseCursors.click,\n      builder: (\n        BuildContext context,\n        bool isEnabled,\n        bool isHovered,\n        bool isFocused,\n        bool isPressed,\n      ) {\n        final bool isActive =\n            isEnabled && (widget.isSelected || isHovered || isPressed);\n\n        _handleActiveEffect(isActive);\n\n        return AnimatedBuilder(\n          animation: _animationController!,\n          builder: (BuildContext context, Widget? child) {\n            return DecoratedBox(\n              decoration: segmentStyle?.decoration ??\n                  ShapeDecoration(\n                    color: _segmentColor!.value,\n                    shape: MoonSquircleBorder(\n                      borderRadius: effectiveSegmentBorderRadius\n                          .squircleBorderRadius(context),\n                    ),\n                  ),\n              child: IconTheme(\n                data: IconThemeData(\n                  size: widget.moonSegmentedControlSizeProperties.iconSizeValue,\n                  color: _textColor!.value,\n                ),\n                child: DefaultTextStyle(\n                  style: effectiveTextStyle.copyWith(color: _textColor!.value),\n                  child: child!,\n                ),\n              ),\n            );\n          },\n          child: Center(\n            child: Padding(\n              padding: correctedSegmentPadding,\n              child: Row(\n                mainAxisSize: MainAxisSize.min,\n                mainAxisAlignment: MainAxisAlignment.center,\n                children: [\n                  if (widget.segment.leading != null)\n                    Padding(\n                      padding:\n                          EdgeInsets.symmetric(horizontal: effectiveSegmentGap),\n                      child: widget.segment.leading,\n                    ),\n                  if (widget.segment.label != null) widget.segment.label!,\n                  if (widget.segment.trailing != null)\n                    Padding(\n                      padding:\n                          EdgeInsets.symmetric(horizontal: effectiveSegmentGap),\n                      child: widget.segment.trailing,\n                    ),\n                ],\n              ),\n            ),\n          ),\n        );\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/switch/switch.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\n\nimport 'package:moon_design/src/theme/effects/effects_theme.dart';\nimport 'package:moon_design/src/theme/switch/switch_size_properties.dart';\nimport 'package:moon_design/src/theme/switch/switch_sizes.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/opacities.dart';\nimport 'package:moon_design/src/theme/tokens/shadows.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border_radius.dart';\nimport 'package:moon_design/src/widgets/common/effects/focus_effect.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonSwitchSize {\n  x2s,\n  xs,\n  sm,\n}\n\nclass MoonSwitch extends StatefulWidget {\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autofocus;\n\n  /// Whether to use haptic feedback (vibration) when the switch is toggled.\n  final bool hasHapticFeedback;\n\n  /// Whether the switch is in active (on) state.\n  final bool value;\n\n  /// The background color of the active (on) switch track.\n  final Color? activeTrackColor;\n\n  /// The background color of the inactive (off) switch track.\n  final Color? inactiveTrackColor;\n\n  /// The color of the switch thumb.\n  final Color? thumbColor;\n\n  /// The height of the switch.\n  final double? height;\n\n  /// The width of the switch.\n  final double? width;\n\n  /// The size of the switch thumb.\n  final double? thumbSizeValue;\n\n  /// The duration of the switch toggle animation.\n  final Duration? duration;\n\n  /// The curve of the switch toggle animation.\n  final Curve? curve;\n\n  /// The padding of the switch.\n  final EdgeInsetsGeometry? padding;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The size of the switch.\n  final MoonSwitchSize? switchSize;\n\n  /// The semantic label for the switch.\n  final String? semanticLabel;\n\n  /// The callback that is called when the switch toggles between the\n  /// active (on) and inactive (off) states.\n  final ValueChanged<bool>? onChanged;\n\n  /// The widget to display on the left side of the switch track when the switch\n  /// is active (on).\n  final Widget? activeTrackWidget;\n\n  /// The widget to display on the right side of the switch track when the\n  /// switch is inactive (off).\n  final Widget? inactiveTrackWidget;\n\n  /// The widget to display inside the thumb when the switch is active (on).\n  final Widget? activeThumbWidget;\n\n  /// The widget to display inside the thumb when the switch is inactive (off).\n  final Widget? inactiveThumbWidget;\n\n  /// Creates a Moon Design switch.\n  const MoonSwitch({\n    super.key,\n    this.autofocus = false,\n    this.hasHapticFeedback = true,\n    required this.value,\n    this.activeTrackColor,\n    this.inactiveTrackColor,\n    this.thumbColor,\n    this.height,\n    this.width,\n    this.thumbSizeValue,\n    this.duration,\n    this.curve,\n    this.padding,\n    this.focusNode,\n    this.switchSize,\n    this.semanticLabel,\n    this.onChanged,\n    this.activeTrackWidget,\n    this.inactiveTrackWidget,\n    this.activeThumbWidget,\n    this.inactiveThumbWidget,\n  });\n\n  @override\n  _MoonSwitchState createState() => _MoonSwitchState();\n}\n\nclass _MoonSwitchState extends State<MoonSwitch>\n    with SingleTickerProviderStateMixin {\n  late final Map<Type, Action<Intent>> _actions = {\n    ActivateIntent: CallbackAction<Intent>(onInvoke: (_) => _handleTap()),\n  };\n\n  late Animation<Alignment>? _alignmentAnimation;\n  late Animation<Decoration>? _trackDecorationAnimation;\n\n  AnimationController? _animationController;\n  Animation<double>? _thumbFadeAnimation;\n  Animation<double>? _activeTrackWidgetFadeAnimation;\n  Animation<double>? _inactiveTrackWidgetFadeAnimation;\n  CurvedAnimation? _curvedAnimation;\n  CurvedAnimation? _curvedAnimationWithOvershoot;\n\n  bool _isFocused = false;\n\n  // Whether to animate the switch to its new position (based on widget value)\n  // using _curvedAnimationWithOvershoot after a drag ends.\n  // Changes to true at the end of a drag.\n  bool _needsPositionAnimation = false;\n\n  bool get _isInteractive => widget.onChanged != null;\n\n  MoonSwitchSizeProperties _getMoonSwitchSize(\n    BuildContext context,\n    MoonSwitchSize? moonSwitchSize,\n  ) {\n    switch (moonSwitchSize) {\n      case MoonSwitchSize.x2s:\n        return context.moonTheme?.switchTheme.sizes.x2s ??\n            MoonSwitchSizes(tokens: MoonTokens.light).x2s;\n      case MoonSwitchSize.xs:\n        return context.moonTheme?.switchTheme.sizes.xs ??\n            MoonSwitchSizes(tokens: MoonTokens.light).xs;\n      case MoonSwitchSize.sm:\n        return context.moonTheme?.switchTheme.sizes.sm ??\n            MoonSwitchSizes(tokens: MoonTokens.light).sm;\n      default:\n        return context.moonTheme?.switchTheme.sizes.xs ??\n            MoonSwitchSizes(tokens: MoonTokens.light).xs;\n    }\n  }\n\n  // The `isLinear` flag is set to true when the `_curvedAnimationWithOvershoot`\n  // animation attempts to move the thumb to the closest end after the most\n  // recent drag animation. This ensures that the curve remains unchanged when\n  // the controller's value is not 0 or 1.\n  // It can be set to false when it's an implicit animation triggered by changes\n  // in widget.value.\n  void _resumePositionAnimation({bool isLinear = true}) {\n    _needsPositionAnimation = false;\n\n    _curvedAnimationWithOvershoot!\n      ..curve = isLinear ? Curves.linear : Curves.ease\n      ..reverseCurve = isLinear ? Curves.linear : Curves.ease.flipped;\n\n    widget.value\n        ? _animationController!.forward()\n        : _animationController!.reverse();\n  }\n\n  void _handleFocus(bool focus) {\n    if (focus != _isFocused) {\n      setState(() => _isFocused = focus);\n    }\n  }\n\n  void _handleFocusChange(bool hasFocus) {\n    setState(() => _isFocused = hasFocus);\n  }\n\n  void _handleTapDown(TapDownDetails details) {\n    if (_isInteractive) {\n      _needsPositionAnimation = false;\n    }\n  }\n\n  void _handleTap() {\n    if (_isInteractive) {\n      widget.onChanged!(!widget.value);\n      _emitVibration();\n    }\n  }\n\n  void _handleTapUp(TapUpDetails details) {\n    if (_isInteractive) {\n      _needsPositionAnimation = false;\n    }\n  }\n\n  void _handleDragStart(DragStartDetails details) {\n    if (_isInteractive) {\n      _needsPositionAnimation = false;\n      _emitVibration();\n    }\n  }\n\n  void _handleDragUpdate({\n    required DragUpdateDetails details,\n    required double switchWidth,\n    required double thumbSizeValue,\n    required EdgeInsets padding,\n  }) {\n    if (_isInteractive) {\n      _curvedAnimationWithOvershoot!\n        ..curve = Curves.linear\n        ..reverseCurve = Curves.linear;\n\n      switch (Directionality.of(context)) {\n        case TextDirection.rtl:\n          _animationController!.value += -details.primaryDelta! /\n              (switchWidth - (thumbSizeValue + padding.right + padding.left));\n        case TextDirection.ltr:\n          _animationController!.value += details.primaryDelta! /\n              (switchWidth - (thumbSizeValue + padding.right + padding.left));\n      }\n    }\n  }\n\n  void _handleDragEnd(DragEndDetails details) {\n    // Deferring the animation to the next build phase.\n    setState(() => _needsPositionAnimation = true);\n    // Trigger onChanged when the user's intent to change the value is evident.\n    if (_curvedAnimationWithOvershoot!.value >= 0.5 != widget.value) {\n      widget.onChanged!(!widget.value);\n    }\n  }\n\n  void _emitVibration() {\n    if (widget.hasHapticFeedback) HapticFeedback.lightImpact();\n  }\n\n  @override\n  void didUpdateWidget(MoonSwitch oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (_needsPositionAnimation || oldWidget.value != widget.value) {\n      _resumePositionAnimation(isLinear: _needsPositionAnimation);\n    }\n\n    if (_curvedAnimationWithOvershoot!.value == 0.0 ||\n        _curvedAnimationWithOvershoot!.value == 1.0) {\n      _curvedAnimationWithOvershoot!\n        ..curve = Curves.easeOutBack\n        ..reverseCurve = Curves.easeOutBack.flipped;\n    }\n  }\n\n  @override\n  void dispose() {\n    _animationController!.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    if (_needsPositionAnimation) _resumePositionAnimation();\n\n    final MoonSwitchSizeProperties effectiveMoonSwitchSize =\n        _getMoonSwitchSize(context, widget.switchSize);\n\n    final Color effectiveActiveTrackColor = widget.activeTrackColor ??\n        context.moonTheme?.switchTheme.colors.activeTrackColor ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveInactiveTrackColor = widget.inactiveTrackColor ??\n        context.moonTheme?.switchTheme.colors.inactiveTrackColor ??\n        MoonColors.light.beerus;\n\n    final Color effectiveThumbColor = widget.thumbColor ??\n        context.moonTheme?.switchTheme.colors.thumbColor ??\n        MoonColors.light.goten;\n\n    final double effectiveHeight =\n        widget.height ?? effectiveMoonSwitchSize.height;\n\n    final double effectiveWidth = widget.width ?? effectiveMoonSwitchSize.width;\n\n    final double effectiveThumbSizeValue =\n        widget.thumbSizeValue ?? effectiveMoonSwitchSize.thumbSizeValue;\n\n    final double effectiveDisabledOpacityValue =\n        context.moonOpacities?.disabled ?? MoonOpacities.opacities.disabled;\n\n    final EdgeInsetsGeometry effectivePadding =\n        widget.padding ?? effectiveMoonSwitchSize.padding;\n\n    final EdgeInsets resolvedDirectionalPadding =\n        effectivePadding.resolve(Directionality.of(context));\n\n    final BorderRadiusGeometry effectiveBorderRadius =\n        BorderRadius.circular(effectiveThumbSizeValue / 2);\n\n    final List<BoxShadow> effectiveThumbShadow =\n        context.moonTheme?.switchTheme.shadows.thumbShadows ??\n            MoonShadows.light.sm;\n\n    final Duration effectiveDuration = widget.duration ??\n        context.moonTheme?.switchTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = widget.curve ??\n        context.moonTheme?.switchTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    final double effectiveFocusEffectExtent =\n        context.moonEffects?.controlFocusEffect.effectExtent ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectExtent;\n\n    final Color effectiveFocusEffectColor =\n        context.moonEffects?.controlFocusEffect.effectColor ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectColor;\n\n    final Duration effectiveFocusEffectDuration =\n        context.moonEffects?.controlFocusEffect.effectDuration ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectDuration;\n\n    final Curve effectiveFocusEffectCurve =\n        context.moonEffects?.controlFocusEffect.effectCurve ??\n            MoonEffectsTheme(tokens: MoonTokens.light)\n                .controlFocusEffect\n                .effectCurve;\n\n    _animationController ??= AnimationController(\n      vsync: this,\n      value: widget.value ? 1.0 : 0.0,\n      duration: effectiveDuration,\n    );\n\n    _curvedAnimation ??= CurvedAnimation(\n      parent: _animationController!,\n      curve: effectiveTransitionCurve,\n    );\n\n    _curvedAnimationWithOvershoot ??= CurvedAnimation(\n      parent: _animationController!,\n      curve: effectiveTransitionCurve,\n    );\n\n    _alignmentAnimation = AlignmentTween(\n      begin: Directionality.of(context) == TextDirection.ltr\n          ? Alignment.centerLeft\n          : Alignment.centerRight,\n      end: Directionality.of(context) == TextDirection.ltr\n          ? Alignment.centerRight\n          : Alignment.centerLeft,\n    ).animate(_curvedAnimationWithOvershoot!);\n\n    _trackDecorationAnimation = DecorationTween(\n      begin: ShapeDecorationWithPremultipliedAlpha(\n        color: effectiveInactiveTrackColor,\n        shape: MoonSquircleBorder(\n          borderRadius: MoonSquircleBorderRadius(\n            cornerRadius: effectiveHeight / 2,\n          ),\n        ),\n      ),\n      end: ShapeDecorationWithPremultipliedAlpha(\n        color: effectiveActiveTrackColor,\n        shape: MoonSquircleBorder(\n          borderRadius: MoonSquircleBorderRadius(\n            cornerRadius: effectiveHeight / 2,\n          ),\n        ),\n      ),\n    ).animate(_curvedAnimation!);\n\n    _thumbFadeAnimation ??= TweenSequence<double>([\n      TweenSequenceItem<double>(\n        tween: Tween<double>(begin: 1.0, end: 0.0),\n        weight: 50.0,\n      ),\n      TweenSequenceItem<double>(\n        tween: Tween<double>(begin: 0.0, end: 1.0),\n        weight: 50.0,\n      ),\n    ]).animate(_curvedAnimation!);\n\n    _activeTrackWidgetFadeAnimation ??=\n        Tween<double>(begin: 0.0, end: 1.0).animate(\n      CurvedAnimation(\n        parent: _animationController!,\n        curve: const Interval(0.7, 1.0),\n      ),\n    );\n\n    _inactiveTrackWidgetFadeAnimation ??=\n        Tween<double>(begin: 1.0, end: 0.0).animate(\n      CurvedAnimation(\n        parent: _animationController!,\n        curve: const Interval(0.0, 0.3),\n      ),\n    );\n\n    final Color effectiveActiveTextColor =\n        context.moonTheme?.switchTheme.colors.activeTextColor ??\n            MoonTokens.dark.colors.textPrimary;\n\n    final Color effectiveInactiveTextColor =\n        context.moonTheme?.switchTheme.colors.inactiveTextColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveActiveIconColor =\n        context.moonTheme?.switchTheme.colors.activeIconColor ??\n            MoonTokens.dark.colors.iconPrimary;\n\n    final Color effectiveInactiveIconColor =\n        context.moonTheme?.switchTheme.colors.inactiveIconColor ??\n            MoonColors.light.iconPrimary;\n\n    final Color effectiveThumbIconColor =\n        context.moonTheme?.switchTheme.colors.thumbIconColor ??\n            MoonColors.light.iconPrimary;\n\n    return Semantics(\n      label: widget.semanticLabel,\n      toggled: widget.value,\n      child: FocusableActionDetector(\n        enabled: _isInteractive,\n        actions: _actions,\n        autofocus: widget.autofocus,\n        focusNode: widget.focusNode,\n        onFocusChange: _handleFocusChange,\n        onShowFocusHighlight: _handleFocus,\n        mouseCursor: _isInteractive\n            ? SystemMouseCursors.click\n            : SystemMouseCursors.basic,\n        child: GestureDetector(\n          excludeFromSemantics: true,\n          onTap: _handleTap,\n          onTapDown: _handleTapDown,\n          onTapUp: _handleTapUp,\n          onHorizontalDragStart: _handleDragStart,\n          onHorizontalDragUpdate: (DragUpdateDetails details) =>\n              _handleDragUpdate(\n            details: details,\n            switchWidth: effectiveWidth,\n            thumbSizeValue: effectiveThumbSizeValue,\n            padding: resolvedDirectionalPadding,\n          ),\n          onHorizontalDragEnd: _handleDragEnd,\n          child: RepaintBoundary(\n            child: AnimatedBuilder(\n              animation: _animationController!,\n              builder: (BuildContext context, Widget? child) {\n                return AnimatedOpacity(\n                  opacity: _isInteractive ? 1 : effectiveDisabledOpacityValue,\n                  duration: effectiveDuration,\n                  curve: effectiveTransitionCurve,\n                  child: SizedBox(\n                    width: effectiveWidth,\n                    height: effectiveHeight,\n                    child: DecoratedBoxTransition(\n                      decoration: _trackDecorationAnimation!,\n                      child: Padding(\n                        padding: resolvedDirectionalPadding,\n                        child: Stack(\n                          alignment: Alignment.center,\n                          children: <Widget>[\n                            Row(\n                              mainAxisAlignment: MainAxisAlignment.center,\n                              children: [\n                                IconTheme(\n                                  data: IconThemeData(\n                                    color: effectiveActiveIconColor,\n                                    size: effectiveMoonSwitchSize.iconSizeValue,\n                                  ),\n                                  child: DefaultTextStyle(\n                                    style: effectiveMoonSwitchSize.textStyle\n                                        .copyWith(\n                                      color: effectiveActiveTextColor,\n                                    ),\n                                    child: Expanded(\n                                      child: FadeTransition(\n                                        opacity:\n                                            _activeTrackWidgetFadeAnimation!,\n                                        child: widget.activeTrackWidget ??\n                                            const SizedBox.shrink(),\n                                      ),\n                                    ),\n                                  ),\n                                ),\n                                SizedBox(\n                                  width: resolvedDirectionalPadding.left,\n                                ),\n                                IconTheme(\n                                  data: IconThemeData(\n                                    color: effectiveInactiveIconColor,\n                                    size: effectiveMoonSwitchSize.iconSizeValue,\n                                  ),\n                                  child: DefaultTextStyle(\n                                    style: effectiveMoonSwitchSize.textStyle\n                                        .copyWith(\n                                      color: effectiveInactiveTextColor,\n                                    ),\n                                    child: Expanded(\n                                      child: FadeTransition(\n                                        opacity:\n                                            _inactiveTrackWidgetFadeAnimation!,\n                                        child: widget.inactiveTrackWidget ??\n                                            const SizedBox.shrink(),\n                                      ),\n                                    ),\n                                  ),\n                                ),\n                              ],\n                            ),\n                            Align(\n                              alignment: _alignmentAnimation!.value,\n                              child: IconTheme(\n                                data: IconThemeData(\n                                  color: effectiveThumbIconColor,\n                                  size: effectiveMoonSwitchSize.iconSizeValue,\n                                ),\n                                child: DefaultTextStyle(\n                                  style: effectiveMoonSwitchSize.textStyle\n                                      .copyWith(\n                                    color: effectiveInactiveTextColor,\n                                  ),\n                                  child: MoonFocusEffect(\n                                    show: _isFocused,\n                                    effectColor: effectiveFocusEffectColor,\n                                    childBorderRadius: effectiveBorderRadius,\n                                    effectExtent: effectiveFocusEffectExtent,\n                                    effectDuration:\n                                        effectiveFocusEffectDuration,\n                                    effectCurve: effectiveFocusEffectCurve,\n                                    child: Container(\n                                      width: effectiveThumbSizeValue,\n                                      height: effectiveThumbSizeValue,\n                                      alignment: Alignment.center,\n                                      decoration:\n                                          ShapeDecorationWithPremultipliedAlpha(\n                                        color: effectiveThumbColor,\n                                        shadows: effectiveThumbShadow,\n                                        shape: MoonSquircleBorder(\n                                          borderRadius: effectiveBorderRadius\n                                              .squircleBorderRadius(context),\n                                        ),\n                                      ),\n                                      child: FadeTransition(\n                                        opacity: _thumbFadeAnimation!,\n                                        child: _curvedAnimation!.value > 0.5\n                                            ? widget.activeThumbWidget\n                                            : widget.inactiveThumbWidget,\n                                      ),\n                                    ),\n                                  ),\n                                ),\n                              ),\n                            ),\n                          ],\n                        ),\n                      ),\n                    ),\n                  ),\n                );\n              },\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/tab_bar/pill_tab.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/widgets/tab_bar/pill_tab_style.dart';\n\nclass MoonPillTab {\n  /// Whether the tab is disabled.\n  final bool disabled;\n\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autoFocus;\n\n  /// Whether the tab is focusable.\n  final bool isFocusable;\n\n  /// Whether to show a focus outline effect when the tab is focused.\n  final bool showFocusEffect;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The styling options for the tab.\n  final MoonPillTabStyle? tabStyle;\n\n  /// The semantic label for the tab.\n  final String? semanticLabel;\n\n  /// The callback that returns the current selection status of the tab as a\n  /// boolean value.\n  final ValueChanged<bool>? isSelected;\n\n  /// The widget to display before the [label] widget of the tab.\n  final Widget? leading;\n\n  /// The primary content of the tab widget.\n  final Widget? label;\n\n  /// The widget to display after the [label] widget of the tab.\n  final Widget? trailing;\n\n  /// Creates a Moon Design pill tab.\n  const MoonPillTab({\n    this.disabled = false,\n    this.autoFocus = false,\n    this.isFocusable = true,\n    this.showFocusEffect = true,\n    this.focusNode,\n    this.tabStyle,\n    this.semanticLabel,\n    this.isSelected,\n    this.leading,\n    this.label,\n    this.trailing,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/tab_bar/pill_tab_style.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/widgets/tab_bar/pill_tab.dart';\n\nclass MoonPillTabStyle {\n  /// The border radius of the tab.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The color of the tab focus effect.\n  final Color? focusEffectColor;\n\n  /// The color of the selected tab.\n  final Color? selectedTabColor;\n\n  /// The default text color of the tab.\n  final Color? textColor;\n\n  /// The text color of the selected tab.\n  final Color? selectedTextColor;\n\n  /// The custom decoration of the tab.\n  final Decoration? decoration;\n\n  /// The gap between the [MoonPillTab.leading], [MoonPillTab.label] and\n  /// [MoonPillTab.trailing] widgets of the tab.\n  final double? tabGap;\n\n  /// The padding of the tab.\n  final EdgeInsetsGeometry? tabPadding;\n\n  /// The text style of the tab.\n  ///\n  /// If [TextStyle] color is used, then it overrides the [textColor] and\n  /// [selectedTextColor].\n  final TextStyle? textStyle;\n\n  /// Defines a Moon Design pill tab style.\n  const MoonPillTabStyle({\n    this.borderRadius,\n    this.focusEffectColor,\n    this.selectedTabColor,\n    this.textColor,\n    this.selectedTextColor,\n    this.decoration,\n    this.tabGap,\n    this.tabPadding,\n    this.textStyle,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/tab_bar/tab.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/widgets/tab_bar/tab_style.dart';\n\nclass MoonTab {\n  /// Whether the tab is disabled.\n  final bool disabled;\n\n  /// {@macro flutter.widgets.Focus.autofocus}\n  final bool autoFocus;\n\n  /// Whether the tab is focusable.\n  final bool isFocusable;\n\n  /// Whether to show a focus outline effect when the tab is focused.\n  final bool showFocusEffect;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The styling options for the tab.\n  final MoonTabStyle? tabStyle;\n\n  /// The semantic label for the tab.\n  final String? semanticLabel;\n\n  /// The callback that returns the current selection status of the tab as a\n  /// boolean value.\n  final ValueChanged<bool>? isSelected;\n\n  /// The widget to display before the [label] widget of the tab.\n  final Widget? leading;\n\n  /// The primary content of the tab widget.\n  final Widget? label;\n\n  /// The widget to display after the [label] widget of the tab.\n  final Widget? trailing;\n\n  /// Creates a Moon Design tab.\n  const MoonTab({\n    this.disabled = false,\n    this.autoFocus = false,\n    this.isFocusable = true,\n    this.showFocusEffect = true,\n    this.focusNode,\n    this.tabStyle,\n    this.semanticLabel,\n    this.isSelected,\n    this.leading,\n    this.label,\n    this.trailing,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/tab_bar/tab_bar.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/tab_bar/tab_bar_size_properties.dart';\nimport 'package:moon_design/src/theme/tab_bar/tab_bar_sizes.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/utils/color_tween_premul.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/widgets/common/base_control.dart';\nimport 'package:moon_design/src/widgets/common/base_segmented_tab_bar.dart';\nimport 'package:moon_design/src/widgets/tab_bar/pill_tab.dart';\nimport 'package:moon_design/src/widgets/tab_bar/pill_tab_style.dart';\nimport 'package:moon_design/src/widgets/tab_bar/tab.dart';\nimport 'package:moon_design/src/widgets/tab_bar/tab_style.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonTabBarVariant {\n  indicator,\n  pill,\n  custom,\n}\n\nenum MoonTabBarSize {\n  sm,\n  md,\n}\n\ntypedef MoonCustomTabBuilder = Widget Function(\n  BuildContext context,\n  bool isSelected,\n);\n\nclass MoonTabBar extends StatefulWidget {\n  /// Whether the tab bar is expanded to its full available width horizontally\n  /// or resizes to fit its content.\n  final bool isExpanded;\n\n  /// The gap between the tab bar tabs.\n  final double? gap;\n\n  /// The height of the tab bar.\n  final double? height;\n\n  /// The width of the tab bar.\n  final double? width;\n\n  /// The duration of the tab bar transition animation.\n  final Duration? transitionDuration;\n\n  /// The curve of the tab bar transition animation.\n  final Curve? transitionCurve;\n\n  /// The padding of the tab bar.\n  final EdgeInsetsGeometry? padding;\n\n  /// The index of the initially selected tab.\n  /// This property is overridden by the [tabController]'s initial index if\n  /// the [tabController] is provided.\n  /// For external updates to the tab index, use [tabController].\n  final int initialIndex;\n\n  /// The size of the tab bar.\n  final MoonTabBarSize? tabBarSize;\n\n  /// The custom decoration of the tab bar.\n  final Decoration? decoration;\n\n  /// The external controller for managing tab selection and animation in tab\n  /// bar. If tabController is provided, then [initialIndex] is ignored and\n  /// tabController's index is used instead.\n  final TabController? tabController;\n\n  /// The callback that returns the index of the currently selected tab.\n  final ValueChanged<int>? onTabChanged;\n\n  /// The list of tabs to display as the children of the tab bar.\n  /// At least one child is required when this property is used.\n  /// This property cannot be used in conjunction with the [pillTabs] or\n  /// [customTabs] properties; both must be set to null.\n  final List<MoonTab>? tabs;\n\n  /// The list of pill tabs to display as the children of the pill tab bar.\n  /// At least one child is required when this property is used.\n  /// This property cannot be used in conjunction with the [tabs] or\n  /// [customTabs] properties; both must be set to null.\n  final List<MoonPillTab>? pillTabs;\n\n  /// The list of custom tabs to display as the children of the custom tab bar.\n  /// At least one child is required when this property is used.\n  /// This property cannot be used in conjunction with the [tabs] or [pillTabs]\n  /// properties; both must be set to null.\n  final List<MoonCustomTabBuilder>? customTabs;\n\n  /// Creates a Moon Design tab bar.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonTabBar.pill], Moon Design pill tab bar.\n  ///   * [MoonTabBar.custom], Moon Design custom tab bar.\n  const MoonTabBar({\n    super.key,\n    this.isExpanded = false,\n    this.gap,\n    this.height,\n    this.width,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.padding,\n    this.initialIndex = 0,\n    this.tabBarSize,\n    this.decoration,\n    this.tabController,\n    this.onTabChanged,\n    required this.tabs,\n  })  : assert(height == null || height > 0),\n        assert(tabs != null && tabs.length > 0),\n        pillTabs = null,\n        customTabs = null;\n\n  /// Creates a Moon Design pill tab bar.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonTabBar.custom], Moon Design custom tab bar.\n  const MoonTabBar.pill({\n    super.key,\n    this.isExpanded = false,\n    this.gap,\n    this.height,\n    this.width,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.padding,\n    this.initialIndex = 0,\n    this.tabBarSize,\n    this.decoration,\n    this.tabController,\n    this.onTabChanged,\n    required this.pillTabs,\n  })  : assert(height == null || height > 0),\n        assert(pillTabs != null && pillTabs.length > 0),\n        tabs = null,\n        customTabs = null;\n\n  /// Creates a Moon Design custom tab bar.\n  ///\n  /// See also:\n  ///\n  ///   * [MoonTabBar.pill], Moon Design pill tab bar.\n  const MoonTabBar.custom({\n    super.key,\n    this.isExpanded = false,\n    this.gap,\n    this.height,\n    this.width,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.padding,\n    this.initialIndex = 0,\n    this.tabBarSize,\n    this.decoration,\n    this.tabController,\n    this.onTabChanged,\n    required this.customTabs,\n  })  : assert(height == null || height > 0),\n        assert(customTabs != null && customTabs.length > 0),\n        tabs = null,\n        pillTabs = null;\n\n  @override\n  State<MoonTabBar> createState() => _MoonTabBarState();\n}\n\nclass _MoonTabBarState extends State<MoonTabBar> {\n  late int _selectedIndex = widget.tabController?.index ?? widget.initialIndex;\n  late MoonTabBarVariant _tabBarVariant;\n\n  late Duration _effectiveTransitionDuration;\n  late Curve _effectiveTransitionCurve;\n  late MoonTabBarSizeProperties _effectiveMoonTabBarSize;\n\n  MoonTabBarSizeProperties _getMoonTabBarSize(\n    BuildContext context,\n    MoonTabBarSize? tabBarSize,\n  ) {\n    switch (tabBarSize) {\n      case MoonTabBarSize.sm:\n        return context.moonTheme?.tabBarTheme.sizes.sm ??\n            MoonTabBarSizes(tokens: MoonTokens.light).sm;\n      case MoonTabBarSize.md:\n        return context.moonTheme?.tabBarTheme.sizes.md ??\n            MoonTabBarSizes(tokens: MoonTokens.light).md;\n      default:\n        return context.moonTheme?.tabBarTheme.sizes.md ??\n            MoonTabBarSizes(tokens: MoonTokens.light).md;\n    }\n  }\n\n  void _setSelectedTabBarVariant() {\n    if (widget.tabs != null) {\n      _tabBarVariant = MoonTabBarVariant.indicator;\n    } else if (widget.pillTabs != null) {\n      _tabBarVariant = MoonTabBarVariant.pill;\n    } else {\n      _tabBarVariant = MoonTabBarVariant.custom;\n    }\n  }\n\n  void _updateTabsSelectedStatus() {\n    if (_tabBarVariant == MoonTabBarVariant.indicator) {\n      widget.tabs?.asMap().forEach((int index, MoonTab tab) {\n        tab.isSelected?.call(index == _selectedIndex);\n      });\n    } else if (_tabBarVariant == MoonTabBarVariant.pill) {\n      widget.pillTabs?.asMap().forEach((int index, MoonPillTab pillTab) {\n        pillTab.isSelected?.call(index == _selectedIndex);\n      });\n    } else {\n      widget.customTabs\n          ?.asMap()\n          .forEach((int index, Widget Function(BuildContext, bool) customTab) {\n        customTab.call(context, index == _selectedIndex);\n      });\n    }\n  }\n\n  void _handleTabChange() {\n    final int animationValue =\n        widget.tabController?.animation?.value.round() ?? 0;\n\n    if (animationValue != _selectedIndex) {\n      setState(() {\n        _selectedIndex = animationValue;\n\n        widget.onTabChanged?.call(animationValue);\n        _updateTabsSelectedStatus();\n      });\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _setSelectedTabBarVariant();\n    _updateTabsSelectedStatus();\n\n    widget.tabController?.animation?.addListener(_handleTabChange);\n  }\n\n  @override\n  void dispose() {\n    super.dispose();\n\n    widget.tabController?.animation?.removeListener(_handleTabChange);\n  }\n\n  List<Widget> _generateTabs() {\n    switch (_tabBarVariant) {\n      case MoonTabBarVariant.indicator:\n        return _generateIndicatorTabs();\n      case MoonTabBarVariant.pill:\n        return _generatePillTabs();\n      default:\n        return _generateCustomTabs();\n    }\n  }\n\n  List<Widget> _generateIndicatorTabs() {\n    return List.generate(\n      widget.tabs!.length,\n      (int index) {\n        return _IndicatorTabBuilder(\n          transitionDuration: _effectiveTransitionDuration,\n          transitionCurve: _effectiveTransitionCurve,\n          isSelected: index == _selectedIndex,\n          moonTabBarSizeProperties: _effectiveMoonTabBarSize,\n          tab: widget.tabs![index],\n        );\n      },\n    );\n  }\n\n  List<Widget> _generatePillTabs() {\n    return List.generate(\n      widget.pillTabs!.length,\n      (int index) {\n        return _PillTabBuilder(\n          transitionDuration: _effectiveTransitionDuration,\n          transitionCurve: _effectiveTransitionCurve,\n          isSelected: index == _selectedIndex,\n          moonTabBarSizeProperties: _effectiveMoonTabBarSize,\n          tab: widget.pillTabs![index],\n        );\n      },\n    );\n  }\n\n  List<Widget> _generateCustomTabs() {\n    return List.generate(\n      widget.customTabs!.length,\n      (int index) {\n        return widget.customTabs![index](context, index == _selectedIndex);\n      },\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    _effectiveMoonTabBarSize = _getMoonTabBarSize(context, widget.tabBarSize);\n\n    _effectiveTransitionDuration = widget.transitionDuration ??\n        context.moonTheme?.tabBarTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    _effectiveTransitionCurve = widget.transitionCurve ??\n        context.moonTheme?.tabBarTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    final double effectiveHeight =\n        widget.height ?? _effectiveMoonTabBarSize.height;\n\n    final double effectiveGap = widget.gap ??\n        context.moonTheme?.tabBarTheme.properties.gap ??\n        MoonSizes.sizes.x5s;\n\n    return Container(\n      height: effectiveHeight,\n      width: widget.width,\n      padding: widget.padding,\n      decoration: widget.decoration,\n      constraints: BoxConstraints(minWidth: effectiveHeight),\n      child: BaseSegmentedTabBar(\n        gap: effectiveGap,\n        isExpanded: widget.isExpanded,\n        tabController: widget.tabController,\n        valueChanged: (int newIndex) {\n          if (_selectedIndex == newIndex) return;\n          if (widget.tabs != null && widget.tabs![newIndex].disabled) return;\n          if (widget.pillTabs != null && widget.pillTabs![newIndex].disabled) {\n            return;\n          }\n\n          setState(() {\n            _selectedIndex = newIndex;\n\n            if (widget.tabController == null) {\n              widget.onTabChanged?.call(newIndex);\n              _updateTabsSelectedStatus();\n            }\n          });\n        },\n        children: _generateTabs(),\n      ),\n    );\n  }\n}\n\nclass _IndicatorTabBuilder extends StatefulWidget {\n  final bool isSelected;\n  final Duration transitionDuration;\n  final Curve transitionCurve;\n  final MoonTabBarSizeProperties moonTabBarSizeProperties;\n  final MoonTab tab;\n\n  const _IndicatorTabBuilder({\n    required this.isSelected,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.moonTabBarSizeProperties,\n    required this.tab,\n  });\n\n  @override\n  State<_IndicatorTabBuilder> createState() => _IndicatorTabBuilderState();\n}\n\nclass _IndicatorTabBuilderState extends State<_IndicatorTabBuilder>\n    with SingleTickerProviderStateMixin {\n  final ColorTweenWithPremultipliedAlpha _indicatorColorTween =\n      ColorTweenWithPremultipliedAlpha();\n  final ColorTweenWithPremultipliedAlpha _textColorTween =\n      ColorTweenWithPremultipliedAlpha();\n  final Tween<double> _indicatorWidthTween = Tween<double>(begin: 0, end: 0);\n\n  Animation<Color?>? _indicatorColor;\n  Animation<Color?>? _textColor;\n  Animation<double?>? _indicatorWidth;\n\n  AnimationController? _animationController;\n\n  void _handleActiveEffect(bool isActive) {\n    isActive\n        ? _animationController?.forward()\n        : _animationController?.reverse();\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _animationController = AnimationController(\n      duration: widget.transitionDuration,\n      vsync: this,\n    );\n\n    if (widget.isSelected) _animationController?.value = 1;\n  }\n\n  @override\n  void dispose() {\n    _animationController!.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final MoonTabStyle? tabStyle = widget.tab.tabStyle;\n\n    final Color effectiveIndicatorColor = tabStyle?.indicatorColor ??\n        context.moonTheme?.tabBarTheme.colors.indicatorColor ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveTextColor = tabStyle?.textStyle?.color ??\n        tabStyle?.textColor ??\n        context.moonTheme?.tabBarTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    final Color effectiveSelectedTextColor = tabStyle?.selectedTextColor ??\n        context.moonTheme?.tabBarTheme.colors.selectedTextColor ??\n        MoonColors.light.piccolo;\n\n    final TextStyle effectiveTextStyle =\n        widget.moonTabBarSizeProperties.textStyle.merge(tabStyle?.textStyle);\n\n    final double effectiveIndicatorHeight = tabStyle?.indicatorHeight ??\n        widget.moonTabBarSizeProperties.indicatorHeight;\n\n    final double effectiveTabGap =\n        tabStyle?.tabGap ?? widget.moonTabBarSizeProperties.tabGap;\n\n    final EdgeInsetsGeometry effectiveTabPadding =\n        tabStyle?.tabPadding ?? widget.moonTabBarSizeProperties.tabPadding;\n\n    final EdgeInsets resolvedDirectionalPadding =\n        effectiveTabPadding.resolve(Directionality.of(context));\n\n    final EdgeInsetsGeometry correctedTabPadding = tabStyle?.tabPadding == null\n        ? EdgeInsetsDirectional.fromSTEB(\n            widget.tab.leading == null && widget.tab.label != null\n                ? resolvedDirectionalPadding.left\n                : 0,\n            resolvedDirectionalPadding.top,\n            widget.tab.trailing == null && widget.tab.label != null\n                ? resolvedDirectionalPadding.right\n                : 0,\n            resolvedDirectionalPadding.bottom,\n          )\n        : resolvedDirectionalPadding;\n\n    _indicatorColor ??= _animationController!.drive(\n      _indicatorColorTween.chain(CurveTween(curve: widget.transitionCurve)),\n    );\n\n    _textColor ??= _animationController!.drive(\n      _textColorTween.chain(CurveTween(curve: widget.transitionCurve)),\n    );\n\n    _indicatorWidth ??= _animationController!.drive(\n      _indicatorWidthTween.chain(CurveTween(curve: widget.transitionCurve)),\n    );\n\n    _indicatorColorTween.end = effectiveIndicatorColor;\n\n    _textColorTween\n      ..begin = effectiveTextColor\n      ..end = effectiveSelectedTextColor;\n\n    return MoonBaseControl(\n      semanticLabel: widget.tab.semanticLabel,\n      onLongPress: widget.tab.disabled ? null : () => {},\n      autofocus: widget.tab.autoFocus,\n      focusNode: widget.tab.focusNode,\n      isFocusable: widget.tab.isFocusable,\n      showFocusEffect: widget.tab.showFocusEffect,\n      focusEffectColor: tabStyle?.focusEffectColor,\n      cursor: widget.isSelected\n          ? SystemMouseCursors.basic\n          : SystemMouseCursors.click,\n      builder: (\n        BuildContext context,\n        bool isEnabled,\n        bool isHovered,\n        bool isFocused,\n        bool isPressed,\n      ) {\n        final bool isActive =\n            isEnabled && (widget.isSelected || isHovered || isPressed);\n\n        _handleActiveEffect(isActive);\n\n        return Container(\n          decoration: tabStyle?.decoration,\n          child: Stack(\n            children: [\n              AnimatedBuilder(\n                animation: _animationController!,\n                builder: (BuildContext context, Widget? child) {\n                  return IconTheme(\n                    data: IconThemeData(\n                      color: _textColor!.value,\n                      size: widget.moonTabBarSizeProperties.iconSizeValue,\n                    ),\n                    child: DefaultTextStyle(\n                      style: effectiveTextStyle.copyWith(\n                        color: _textColor!.value,\n                      ),\n                      child: child!,\n                    ),\n                  );\n                },\n                child: Center(\n                  child: Padding(\n                    padding: correctedTabPadding,\n                    child: Row(\n                      mainAxisSize: MainAxisSize.min,\n                      mainAxisAlignment: MainAxisAlignment.center,\n                      children: [\n                        if (widget.tab.leading != null)\n                          Padding(\n                            padding: EdgeInsets.symmetric(\n                              horizontal: effectiveTabGap,\n                            ),\n                            child: widget.tab.leading,\n                          ),\n                        if (widget.tab.label != null)\n                          ConstrainedBox(\n                            constraints: BoxConstraints(\n                              minHeight:\n                                  widget.moonTabBarSizeProperties.iconSizeValue,\n                            ),\n                            child: Center(child: widget.tab.label),\n                          ),\n                        if (widget.tab.trailing != null)\n                          Padding(\n                            padding: EdgeInsets.symmetric(\n                              horizontal: effectiveTabGap,\n                            ),\n                            child: widget.tab.trailing,\n                          ),\n                      ],\n                    ),\n                  ),\n                ),\n              ),\n              Positioned(\n                bottom: 0,\n                left: 0,\n                right: 0,\n                child: LayoutBuilder(\n                  builder: (BuildContext context, BoxConstraints constraints) {\n                    _indicatorWidthTween.end = constraints.maxWidth;\n\n                    return Align(\n                      alignment: Directionality.of(context) == TextDirection.ltr\n                          ? Alignment.bottomLeft\n                          : Alignment.bottomRight,\n                      child: AnimatedBuilder(\n                        animation: _animationController!,\n                        builder: (BuildContext context, Widget? child) {\n                          return Container(\n                            color: effectiveIndicatorColor,\n                            height: effectiveIndicatorHeight,\n                            width: _indicatorWidth!.value,\n                          );\n                        },\n                      ),\n                    );\n                  },\n                ),\n              ),\n            ],\n          ),\n        );\n      },\n    );\n  }\n}\n\nclass _PillTabBuilder extends StatefulWidget {\n  final bool isSelected;\n  final Duration transitionDuration;\n  final Curve transitionCurve;\n  final MoonTabBarSizeProperties moonTabBarSizeProperties;\n  final MoonPillTab tab;\n\n  const _PillTabBuilder({\n    required this.isSelected,\n    required this.transitionDuration,\n    required this.transitionCurve,\n    required this.moonTabBarSizeProperties,\n    required this.tab,\n  });\n\n  @override\n  State<_PillTabBuilder> createState() => _PillTabBuilderState();\n}\n\nclass _PillTabBuilderState extends State<_PillTabBuilder>\n    with SingleTickerProviderStateMixin {\n  final ColorTweenWithPremultipliedAlpha _tabColorTween =\n      ColorTweenWithPremultipliedAlpha();\n  final ColorTweenWithPremultipliedAlpha _textColorTween =\n      ColorTweenWithPremultipliedAlpha();\n\n  Animation<Color?>? _tabColor;\n  Animation<Color?>? _textColor;\n\n  AnimationController? _animationController;\n\n  void _handleActiveEffect(bool isActive) {\n    isActive\n        ? _animationController?.forward()\n        : _animationController?.reverse();\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _animationController = AnimationController(\n      duration: widget.transitionDuration,\n      vsync: this,\n    );\n\n    if (widget.isSelected) _animationController?.value = 1;\n  }\n\n  @override\n  void dispose() {\n    _animationController!.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final MoonPillTabStyle? tabStyle = widget.tab.tabStyle;\n\n    final BorderRadiusGeometry effectiveTabBorderRadius =\n        tabStyle?.borderRadius ?? widget.moonTabBarSizeProperties.borderRadius;\n\n    final Color effectiveSelectedTabColor = tabStyle?.selectedTabColor ??\n        context.moonTheme?.tabBarTheme.colors.selectedPillTabColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveTextColor = tabStyle?.textStyle?.color ??\n        tabStyle?.textColor ??\n        context.moonTheme?.tabBarTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    final Color effectiveSelectedTextColor = tabStyle?.selectedTextColor ??\n        context.moonTheme?.tabBarTheme.colors.selectedPillTextColor ??\n        MoonColors.light.textPrimary;\n\n    final TextStyle effectiveTextStyle =\n        widget.moonTabBarSizeProperties.textStyle.merge(tabStyle?.textStyle);\n\n    final double effectiveTabGap =\n        tabStyle?.tabGap ?? widget.moonTabBarSizeProperties.tabGap;\n\n    final EdgeInsetsGeometry effectiveTabPadding =\n        tabStyle?.tabPadding ?? widget.moonTabBarSizeProperties.tabPadding;\n\n    final EdgeInsets resolvedDirectionalPadding =\n        effectiveTabPadding.resolve(Directionality.of(context));\n\n    final EdgeInsetsGeometry correctedTabPadding = tabStyle?.tabPadding == null\n        ? EdgeInsetsDirectional.fromSTEB(\n            widget.tab.leading == null && widget.tab.label != null\n                ? resolvedDirectionalPadding.left\n                : 0,\n            resolvedDirectionalPadding.top,\n            widget.tab.trailing == null && widget.tab.label != null\n                ? resolvedDirectionalPadding.right\n                : 0,\n            resolvedDirectionalPadding.bottom,\n          )\n        : resolvedDirectionalPadding;\n\n    _tabColor ??= _animationController!.drive(\n      _tabColorTween.chain(CurveTween(curve: widget.transitionCurve)),\n    );\n\n    _textColor ??= _animationController!.drive(\n      _textColorTween.chain(CurveTween(curve: widget.transitionCurve)),\n    );\n\n    _tabColorTween.end = effectiveSelectedTabColor;\n\n    _textColorTween\n      ..begin = effectiveTextColor\n      ..end = effectiveSelectedTextColor;\n\n    return MoonBaseControl(\n      semanticLabel: widget.tab.semanticLabel,\n      onLongPress: widget.tab.disabled ? null : () => {},\n      autofocus: widget.tab.autoFocus,\n      focusNode: widget.tab.focusNode,\n      isFocusable: widget.tab.isFocusable,\n      showFocusEffect: widget.tab.showFocusEffect,\n      focusEffectColor: tabStyle?.focusEffectColor,\n      borderRadius: effectiveTabBorderRadius.squircleBorderRadius(context),\n      cursor: widget.isSelected\n          ? SystemMouseCursors.basic\n          : SystemMouseCursors.click,\n      builder: (\n        BuildContext context,\n        bool isEnabled,\n        bool isHovered,\n        bool isFocused,\n        bool isPressed,\n      ) {\n        final bool isActive =\n            isEnabled && (widget.isSelected || isHovered || isPressed);\n\n        _handleActiveEffect(isActive);\n\n        return AnimatedBuilder(\n          animation: _animationController!,\n          builder: (BuildContext context, Widget? child) {\n            return DecoratedBox(\n              decoration: tabStyle?.decoration ??\n                  ShapeDecoration(\n                    color: _tabColor!.value,\n                    shape: MoonSquircleBorder(\n                      borderRadius: effectiveTabBorderRadius\n                          .squircleBorderRadius(context),\n                    ),\n                  ),\n              child: IconTheme(\n                data: IconThemeData(\n                  size: widget.moonTabBarSizeProperties.iconSizeValue,\n                  color: _textColor!.value,\n                ),\n                child: DefaultTextStyle(\n                  style: effectiveTextStyle.copyWith(color: _textColor!.value),\n                  child: child!,\n                ),\n              ),\n            );\n          },\n          child: Center(\n            child: Padding(\n              padding: correctedTabPadding,\n              child: Row(\n                mainAxisSize: MainAxisSize.min,\n                mainAxisAlignment: MainAxisAlignment.center,\n                children: [\n                  if (widget.tab.leading != null)\n                    Padding(\n                      padding: EdgeInsets.symmetric(\n                        horizontal: effectiveTabGap,\n                      ),\n                      child: widget.tab.leading,\n                    ),\n                  if (widget.tab.label != null) widget.tab.label!,\n                  if (widget.tab.trailing != null)\n                    Padding(\n                      padding: EdgeInsets.symmetric(\n                        horizontal: effectiveTabGap,\n                      ),\n                      child: widget.tab.trailing,\n                    ),\n                ],\n              ),\n            ),\n          ),\n        );\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/tab_bar/tab_style.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/widgets/tab_bar/tab.dart';\n\nclass MoonTabStyle {\n  /// The color of the tab focus effect.\n  final Color? focusEffectColor;\n\n  /// The color of the tab indicator.\n  final Color? indicatorColor;\n\n  /// The default text color of the tab.\n  final Color? textColor;\n\n  /// The text color of the selected tab.\n  final Color? selectedTextColor;\n\n  /// The custom decoration of the tab.\n  final Decoration? decoration;\n\n  /// The height of the tab indicator.\n  final double? indicatorHeight;\n\n  /// The gap between the [MoonTab.leading], [MoonTab.label] and\n  /// [MoonTab.trailing] widgets of the tab.\n  final double? tabGap;\n\n  /// The padding of the tab.\n  final EdgeInsetsGeometry? tabPadding;\n\n  /// The text style of the tab.\n  ///\n  /// If [TextStyle] color is used, then it overrides the [textColor] and\n  /// [selectedTextColor].\n  final TextStyle? textStyle;\n\n  /// Defines a Moon Design tab style.\n  const MoonTabStyle({\n    this.focusEffectColor,\n    this.indicatorColor,\n    this.textColor,\n    this.selectedTextColor,\n    this.decoration,\n    this.indicatorHeight,\n    this.tabGap,\n    this.tabPadding,\n    this.textStyle,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/table/table.dart",
    "content": "import 'dart:math';\nimport 'dart:ui';\n\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/moon_design.dart';\nimport 'package:moon_design/src/theme/table/table_size_properties.dart';\nimport 'package:moon_design/src/theme/table/table_sizes.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/widgets/common/default_animated_text_style.dart';\nimport 'package:moon_design/src/widgets/table/table_controllers.dart';\n\nclass MoonTableRow {\n  /// Whether the table row is selected.\n  final bool selected;\n\n  /// The height of the table row, primarily determined by this value. If not\n  /// explicitly specified, [MoonTable.rowSize] is used. If [MoonTable.rowSize]\n  /// is also unspecified, the height will dynamically adjust based on the\n  /// content of the table row.\n  final double? height;\n\n  /// The custom decoration of the table row.\n  final Decoration? decoration;\n\n  /// The callback that returns the current selection status of the table row as\n  /// a boolean value.\n  final ValueChanged<bool?>? onSelectChanged;\n\n  /// The callback that is called when the table row is tapped.\n  final VoidCallback? onTap;\n\n  /// A widget to display inside the table row, spanning the full width above\n  /// the row cells.\n  final MoonTableRowLabel? label;\n\n  /// The list of widgets to display as the cells of the table row. Must contain\n  /// the same number of cells as [MoonTableHeader.columns] and cannot be empty.\n  final List<Widget> cells;\n\n  /// Creates a Moon Design table row.\n  const MoonTableRow({\n    this.selected = false,\n    this.height,\n    this.decoration,\n    this.onSelectChanged,\n    this.onTap,\n    this.label,\n    required this.cells,\n  }) : assert(cells.length > 0, 'Cells length must not be empty.');\n}\n\nclass MoonTableRowLabel {\n  /// Whether the table row label is pinned or scrolls horizontally with the\n  /// table body during horizontal scrolling.\n  final bool pinned;\n\n  /// The duration of the table row label transition animation during horizontal\n  /// scrolling.\n  final Duration? transitionDuration;\n\n  /// The curve of the table row label transition animation during horizontal\n  /// scrolling.\n  final Curve? transitionCurve;\n\n  /// The padding of the table row label.\n  final EdgeInsetsGeometry? padding;\n\n  /// The text style of the table row label when [pinned] is true and the table\n  /// is being horizontally scrolled.\n  final TextStyle? textStyle;\n\n  /// The animated text style of the table row label when [pinned] is true and\n  /// the table is being horizontally scrolled.\n  final TextStyle? pinnedAnimatedTextStyle;\n\n  /// The widget displayed inside the table row above the row cells, spanning\n  /// the full width of the row.\n  final Widget label;\n\n  /// Creates a Moon Design table row label.\n  const MoonTableRowLabel({\n    this.pinned = true,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.padding,\n    this.textStyle,\n    this.pinnedAnimatedTextStyle,\n    required this.label,\n  });\n}\n\ntypedef ColumnSortCallback = void Function(int columnIndex, bool ascending);\n\nclass MoonTableColumn {\n  /// Whether to show the [sortingIcon] in the table column.\n  final bool showSortingIcon;\n\n  /// The gap between the [cell] content and [sortingIcon] of the table column.\n  final double? sortingIconGap;\n\n  /// The width of the table column.\n  /// Either width for each column or [MoonTable.width] must be provided.\n  /// Cannot be used in conjunction with the [MoonTable.width] property, one of\n  /// them must be null.\n  final double? width;\n\n  /// The horizontal alignment of the [cell] and [sortingIcon] of the table\n  /// column.\n  final MainAxisAlignment sortingIconAlignment;\n\n  /// The callback that is called when the table column is sorted.\n  final ColumnSortCallback? onSort;\n\n  /// The callback that is called when the table column is tapped.\n  final VoidCallback? onTap;\n\n  /// The widget to display as the content of the table column.\n  final Widget? cell;\n\n  /// An icon to display when sorting is applied to the table column.\n  /// If not set, the default icon is [MoonIcons.chevron_up_16].\n  /// Displayed only if the [showSortingIcon] is true and [onSort] is not null.\n  final Widget? sortingIcon;\n\n  /// Creates a Moon Design table column.\n  const MoonTableColumn({\n    this.showSortingIcon = true,\n    this.sortingIconGap,\n    this.width,\n    this.sortingIconAlignment = MainAxisAlignment.start,\n    this.onSort,\n    this.onTap,\n    this.cell,\n    this.sortingIcon,\n  });\n}\n\nclass MoonTableHeader {\n  /// The custom decoration of the table header row.\n  final Decoration? decoration;\n\n  /// The height of the table header row, primarily determined by this value.\n  /// If not specified, [MoonTable.rowSize] is used. If [MoonTable.rowSize] is\n  /// also unspecified, the height will dynamically adjust based on the content\n  /// of the table row.\n  final double? height;\n\n  /// The list of table columns to display as the content of the table header.\n  final List<MoonTableColumn> columns;\n\n  /// Creates a Moon Design table header.\n  const MoonTableHeader({\n    this.decoration,\n    this.height,\n    required this.columns,\n  }) : assert(\n          columns.length > 0,\n          'If header is provided, columns must not be empty.',\n        );\n}\n\nclass MoonTableFooter {\n  /// The custom decoration of the table footer row.\n  final Decoration? decoration;\n\n  /// The height of the table footer row, primarily determined by this value.\n  /// If not specified, [MoonTable.rowSize] is used. If [MoonTable.rowSize] is\n  /// also unspecified, the height will dynamically adjust based on the row\n  /// content.\n  final double? height;\n\n  /// The list of widgets to display as the cells of the table footer. Cells\n  /// length must be equal to [MoonTableHeader.columns] length. If footer is\n  /// provided, [cells] must not be empty.\n  final List<Widget> cells;\n\n  /// Creates a Moon Design table footer.\n  const MoonTableFooter({\n    this.decoration,\n    this.height,\n    required this.cells,\n  }) : assert(\n          cells.length > 0,\n          'If footer is provided, cells must not be empty.',\n        );\n}\n\nenum MoonTableRowSize {\n  xs,\n  sm,\n  md,\n  lg,\n  xl,\n  x2l,\n}\n\ntypedef OnScrollControllersReady = void Function(\n  ScrollController verticalController,\n  ScrollController horizontalController,\n);\n\nclass MoonTable extends StatefulWidget {\n  /// Whether the header of the table is pinned or vertically scrollable with\n  /// the table body.\n  final bool isHeaderPinned;\n\n  /// Whether the footer of the table is pinned or vertically scrollable with\n  /// the table body.\n  final bool isFooterPinned;\n\n  /// Whether the [rowsPlaceholder] is pinned or horizontally scrollable with\n  /// the table body.\n  final bool isRowsPlaceholderPinned;\n\n  /// Whether to sort the table column in ascending or descending order.\n  final bool sortAscending;\n\n  /// The custom decoration of the table.\n  final Decoration? decoration;\n\n  /// The vertical gap between the table rows.\n  final double? rowGap;\n\n  /// The height of the table. By default, the table expands to fill all\n  /// available space.\n  final double? height;\n\n  /// The width of the table.\n  /// Either the width for the table or the [MoonTableColumn.width] for each\n  /// column must be provided. Cannot be used in conjunction with the\n  /// [MoonTableColumn.width] property, one of them must be null.\n  final double? width;\n\n  /// The padding of the table row cells.\n  final EdgeInsetsGeometry? cellPadding;\n\n  /// The padding of the table.\n  final EdgeInsetsGeometry? tablePadding;\n\n  /// The index of the column to sort the table by.\n  final int sortColumnIndex;\n\n  /// The number of columns to build for the table.\n  final int columnsCount;\n\n  /// The size of the table row.\n  /// Applied to table header, footer and rows; unless these widgets have their\n  /// own height specified. If [MoonTable.rowSize] is unspecified, the height\n  /// will dynamically adjust based on the content of the table row.\n  final MoonTableRowSize? rowSize;\n\n  /// The scrolling behavior of the table.\n  final ScrollBehavior? scrollBehaviour;\n\n  /// The vertical scroll physics of the table.\n  final ScrollPhysics? verticalScrollPhysics;\n\n  /// The horizontal scroll physics of the table.\n  final ScrollPhysics? horizontalScrollPhysics;\n\n  /// The semantic label for the table.\n  final String? semanticLabel;\n\n  /// The callback that returns the vertical and horizontal scroll controller\n  /// for external usage.\n  final OnScrollControllersReady? onScrollControllersReady;\n\n  /// The header of the table.\n  final MoonTableHeader? header;\n\n  /// The footer of the table.\n  final MoonTableFooter? footer;\n\n  /// The list of table rows to display as the table body.\n  final List<MoonTableRow> rows;\n\n  /// The widget to display when the provided [rows] property is empty.\n  /// By default it is not horizontally scrollable. To make it scrollable,\n  /// set the [isRowsPlaceholderPinned] to false.\n  final Widget? rowsPlaceholder;\n\n  /// The widget that separates the table rows horizontally.\n  final Widget? rowDivider;\n\n  /// The widget to display at the end of an infinite scrolling list\n  /// to signify ongoing content loading while scrolling down.\n  final Widget? loadingIndicator;\n\n  /// Creates a Moon Design table.\n  const MoonTable({\n    super.key,\n    this.width,\n    this.isHeaderPinned = true,\n    this.isFooterPinned = true,\n    this.isRowsPlaceholderPinned = true,\n    this.sortAscending = false,\n    this.sortColumnIndex = 0,\n    required this.columnsCount,\n    this.decoration,\n    this.rowGap,\n    this.height,\n    this.cellPadding,\n    this.tablePadding,\n    this.rowSize,\n    this.scrollBehaviour,\n    this.verticalScrollPhysics,\n    this.horizontalScrollPhysics,\n    this.semanticLabel,\n    this.onScrollControllersReady,\n    this.header,\n    this.footer,\n    required this.rows,\n    this.rowsPlaceholder,\n    this.rowDivider,\n    this.loadingIndicator,\n  })  : assert(\n          height == null || height > 0,\n          'Table height can only be null or > 0.',\n        ),\n        assert(sortColumnIndex >= 0, 'SortColumnIndex can only be >= 0.'),\n        assert(columnsCount > 0, 'Columns count must be > 0');\n\n  @override\n  State<StatefulWidget> createState() => _MoonTableState();\n}\n\nclass _MoonTableState extends State<MoonTable> {\n  late TableControllers _tableControllers;\n  late MoonTableSizeProperties _effectiveMoonTableRowSize;\n  late double _tableWidth;\n  late EdgeInsetsGeometry _effectiveCellPadding;\n\n  double _columnEqualWidth = 0;\n\n  void _assertRequirements() {\n    final bool hasTableFooter = widget.footer != null;\n    final bool hasTableHeader = widget.header != null;\n\n    assert(\n      !hasTableFooter ||\n          hasTableFooter && widget.footer!.cells.length == widget.columnsCount,\n      'If footer is not null, footer.cells.length must be equal to '\n      'widget.columnsCount.',\n    );\n\n    assert(\n      !hasTableHeader ||\n          hasTableHeader &&\n              widget.header!.columns.length == widget.columnsCount,\n      'If header is not null, header.columns.length must be equal to '\n      'widget.columnsCount.',\n    );\n\n    if (widget.header != null) {\n      for (final column in widget.header!.columns) {\n        if (widget.width == null) {\n          assert(\n            column.width != null,\n            'If table width is null, each provided header column must have a '\n            'width specified.',\n          );\n        } else {\n          assert(\n            column.width == null,\n            'If table width is not null, each provided column width must be '\n            'null.',\n          );\n        }\n      }\n    } else {\n      assert(\n        widget.width != null,\n        'If table header is null, table width must be specified.',\n      );\n    }\n  }\n\n  MoonTableSizeProperties _getMoonTableRowSize(\n    BuildContext context,\n    MoonTableRowSize? moonTableRowSize,\n  ) {\n    switch (moonTableRowSize) {\n      case MoonTableRowSize.xs:\n        return context.moonTheme?.tableTheme.sizes.xs ??\n            MoonTableSizes(tokens: MoonTokens.light).xs;\n      case MoonTableRowSize.sm:\n        return context.moonTheme?.tableTheme.sizes.sm ??\n            MoonTableSizes(tokens: MoonTokens.light).sm;\n      case MoonTableRowSize.md:\n        return context.moonTheme?.tableTheme.sizes.md ??\n            MoonTableSizes(tokens: MoonTokens.light).md;\n      case MoonTableRowSize.lg:\n        return context.moonTheme?.tableTheme.sizes.lg ??\n            MoonTableSizes(tokens: MoonTokens.light).lg;\n      case MoonTableRowSize.xl:\n        return context.moonTheme?.tableTheme.sizes.xl ??\n            MoonTableSizes(tokens: MoonTokens.light).xl;\n      case MoonTableRowSize.x2l:\n        return context.moonTheme?.tableTheme.sizes.x2l ??\n            MoonTableSizes(tokens: MoonTokens.light).x2l;\n      default:\n        return context.moonTheme?.tableTheme.sizes.md ??\n            MoonTableSizes(tokens: MoonTokens.light).md;\n    }\n  }\n\n  void _calculateTableWidth() {\n    // If a fixed table width is specified, the remaining space is uniformly\n    // distributed across columns.\n    if (widget.width != null) {\n      _columnEqualWidth = widget.width! / widget.columnsCount;\n\n      _tableWidth = widget.width!;\n    } else {\n      // Calculates the overall table width based on the combined widths of all\n      // its columns.\n      _tableWidth = widget.header!.columns.fold<double>(\n        0,\n        (double totalWidth, MoonTableColumn column) =>\n            totalWidth + (column.width!),\n      );\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    _assertRequirements();\n\n    _tableControllers = TableControllers(\n      isHeaderPinned: widget.isHeaderPinned,\n      isFooterPinned: widget.isFooterPinned,\n      hasPinnedEmptyPlaceholder: widget.isRowsPlaceholderPinned,\n    );\n\n    _tableControllers.init();\n\n    widget.onScrollControllersReady?.call(\n      _tableControllers.verticalScrollController,\n      _tableControllers.horizontalScrollController,\n    );\n  }\n\n  @override\n  void dispose() {\n    _tableControllers.dispose();\n\n    super.dispose();\n  }\n\n  Widget _buildHeader() {\n    assert(widget.header != null);\n\n    final MoonTableHeader header = widget.header!;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.tableTheme.colors.columnTextColor ??\n            MoonColors.light.textPrimary;\n\n    final double? effectiveHeight = header.height ??\n        (widget.rowSize == null ? null : _effectiveMoonTableRowSize.rowHeight);\n\n    final double effectiveSortIconSize =\n        _effectiveMoonTableRowSize.sortIconSizeValue;\n\n    final TextStyle effectiveTextStyle = _effectiveMoonTableRowSize\n        .columnTextStyle\n        .copyWith(color: effectiveTextColor);\n\n    return Container(\n      height: effectiveHeight,\n      width: _tableWidth,\n      decoration: header.decoration,\n      child: Row(\n        children: List.generate(\n          header.columns.length,\n          (int index) {\n            final MoonTableColumn currentColumn = header.columns[index];\n            final bool showSortingIcon =\n                currentColumn.onSort != null && currentColumn.showSortingIcon;\n\n            final double effectiveColumnWidth =\n                currentColumn.width ?? _columnEqualWidth;\n\n            final double effectiveSortingIconGap =\n                currentColumn.sortingIconGap ??\n                    _effectiveMoonTableRowSize.sortIconGap;\n\n            final Widget effectiveSortingIcon = currentColumn.sortingIcon ??\n                Icon(\n                  MoonIcons.controls_chevron_up_16_light,\n                  size: effectiveSortIconSize,\n                );\n\n            return GestureDetector(\n              behavior: HitTestBehavior.translucent,\n              onTap: () {\n                currentColumn.onTap?.call();\n                currentColumn.onSort?.call(index, !widget.sortAscending);\n              },\n              child: SizedBox(\n                width: effectiveColumnWidth,\n                child: Padding(\n                  padding: _effectiveCellPadding,\n                  child: DefaultTextStyle(\n                    style: effectiveTextStyle,\n                    child: showSortingIcon && index == widget.sortColumnIndex\n                        ? Row(\n                            mainAxisAlignment:\n                                currentColumn.sortingIconAlignment,\n                            children: [\n                              currentColumn.cell ?? const SizedBox(),\n                              _SortIcon(\n                                gap: effectiveSortingIconGap,\n                                icon: effectiveSortingIcon,\n                                iconSize: effectiveSortIconSize,\n                                visible: index == widget.sortColumnIndex,\n                                up: index == widget.sortColumnIndex\n                                    ? widget.sortAscending\n                                    : null,\n                              ),\n                            ],\n                          )\n                        : Align(\n                            alignment: AlignmentDirectional.centerStart,\n                            child: currentColumn.cell ?? const SizedBox(),\n                          ),\n                  ),\n                ),\n              ),\n            );\n          },\n        ),\n      ),\n    );\n  }\n\n  Widget _buildFooter() {\n    final Color effectiveTextColor =\n        context.moonTheme?.tableTheme.colors.columnTextColor ??\n            MoonColors.light.textPrimary;\n\n    final double? effectiveFooterHeight = widget.footer?.height ??\n        (widget.rowSize == null ? null : _effectiveMoonTableRowSize.rowHeight);\n\n    final TextStyle effectiveTextStyle = _effectiveMoonTableRowSize\n        .columnTextStyle\n        .copyWith(color: effectiveTextColor);\n\n    return Container(\n      height: effectiveFooterHeight,\n      width: _tableWidth,\n      decoration: widget.footer!.decoration,\n      child: Row(\n        children: List.generate(\n          widget.footer!.cells.length,\n          (int index) {\n            final double effectiveColumnWidth =\n                widget.header?.columns[index].width ?? _columnEqualWidth;\n\n            return SizedBox(\n              width: effectiveColumnWidth,\n              child: DefaultTextStyle(\n                style: effectiveTextStyle,\n                child: Padding(\n                  padding: _effectiveCellPadding,\n                  child: Align(\n                    alignment: AlignmentDirectional.centerStart,\n                    child: widget.footer!.cells[index],\n                  ),\n                ),\n              ),\n            );\n          },\n        ),\n      ),\n    );\n  }\n\n  Widget _buildRows() {\n    final bool hasScrollableHeader = !widget.isHeaderPinned;\n    final bool hasScrollableFooter =\n        !widget.isFooterPinned && widget.footer != null;\n\n    final BorderRadiusGeometry effectiveBorderRadius =\n        _effectiveMoonTableRowSize.rowBorderRadius;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.tableTheme.colors.rowTextColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveBackgroundColor =\n        context.moonTheme?.tableTheme.colors.rowBackgroundColor ??\n            MoonColors.light.gohan;\n\n    final double effectiveGap =\n        widget.rowGap ?? _effectiveMoonTableRowSize.rowGap;\n\n    final TextStyle effectiveTextStyle = _effectiveMoonTableRowSize.rowTextStyle\n        .copyWith(color: effectiveTextColor);\n\n    return CustomScrollView(\n      controller: _tableControllers.verticalScrollController,\n      physics: widget.verticalScrollPhysics,\n      slivers: <Widget>[\n        if (hasScrollableHeader && widget.header != null)\n          SliverToBoxAdapter(\n            child: _buildHeader(),\n          ),\n        if (widget.rows.isNotEmpty)\n          SliverList.separated(\n            itemCount: widget.rows.length + 1,\n            separatorBuilder: (BuildContext context, int index) =>\n                widget.rowDivider ?? const SizedBox(),\n            itemBuilder: (BuildContext context, int index) {\n              if (index < widget.rows.length) {\n                final MoonTableRow currentRow = widget.rows[index];\n                final bool firstRow = index == 0;\n                final bool lastRow = index == widget.rows.length - 1;\n\n                assert(\n                  currentRow.cells.length == widget.columnsCount,\n                  'Table row cells count must be equal to table columns count.',\n                );\n\n                final double? effectiveRowHeight = currentRow.height ??\n                    (widget.rowSize == null\n                        ? null\n                        : _effectiveMoonTableRowSize.rowHeight);\n\n                final EdgeInsetsGeometry effectiveLabelPadding =\n                    currentRow.label?.padding ??\n                        _effectiveMoonTableRowSize.rowLabelPadding;\n\n                final TextStyle effectiveLabelTextStyle =\n                    _effectiveMoonTableRowSize.rowLabelTextStyle\n                        .merge(currentRow.label?.textStyle);\n\n                final TextStyle effectiveAnimatedLabelTextStyle =\n                    _effectiveMoonTableRowSize.rowPinnedAnimatedLabelTextStyle\n                        .merge(currentRow.label?.pinnedAnimatedTextStyle);\n\n                return GestureDetector(\n                  onTap: () {\n                    currentRow.onSelectChanged?.call(!currentRow.selected);\n                    currentRow.onTap?.call();\n                  },\n                  child: Container(\n                    height: effectiveRowHeight,\n                    margin: EdgeInsets.only(\n                      top: firstRow ? 0 : effectiveGap / 2,\n                      bottom: lastRow ? 0 : effectiveGap / 2,\n                    ),\n                    decoration: currentRow.decoration ??\n                        ShapeDecorationWithPremultipliedAlpha(\n                          color: effectiveBackgroundColor,\n                          shape: MoonSquircleBorder(\n                            borderRadius: effectiveBorderRadius\n                                .squircleBorderRadius(context),\n                          ),\n                        ),\n                    child: Column(\n                      mainAxisAlignment: MainAxisAlignment.center,\n                      crossAxisAlignment: CrossAxisAlignment.start,\n                      children: [\n                        if (currentRow.label != null)\n                          Padding(\n                            padding: effectiveLabelPadding,\n                            child: _TableRowLabel(\n                              label: currentRow.label!,\n                              labelTextStyle: effectiveLabelTextStyle,\n                              animatedLabelTextStyle:\n                                  effectiveAnimatedLabelTextStyle,\n                              horizontalScrollController:\n                                  _tableControllers.horizontalScrollController,\n                            ),\n                          ),\n                        Row(\n                          children: [\n                            for (var i = 0; i < currentRow.cells.length; i++)\n                              SizedBox(\n                                width: widget.header?.columns[i].width ??\n                                    _columnEqualWidth,\n                                height: currentRow.label != null\n                                    ? null\n                                    : effectiveRowHeight,\n                                child: DefaultTextStyle(\n                                  style: effectiveTextStyle,\n                                  child: Padding(\n                                    padding: _effectiveCellPadding,\n                                    child: Align(\n                                      alignment:\n                                          AlignmentDirectional.centerStart,\n                                      child: currentRow.cells[i],\n                                    ),\n                                  ),\n                                ),\n                              ),\n                          ],\n                        ),\n                      ],\n                    ),\n                  ),\n                );\n              } else {\n                return widget.loadingIndicator ?? const SizedBox();\n              }\n            },\n          ),\n        if (hasScrollableFooter)\n          SliverToBoxAdapter(\n            child: _buildFooter(),\n          ),\n      ],\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    _calculateTableWidth();\n\n    _effectiveMoonTableRowSize = _getMoonTableRowSize(context, widget.rowSize);\n\n    _effectiveCellPadding =\n        widget.cellPadding ?? _effectiveMoonTableRowSize.cellPadding;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.tableTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final ScrollBehavior effectiveScrollBehavior = widget.scrollBehaviour ??\n        ScrollConfiguration.of(context).copyWith(\n          scrollbars: false,\n          overscroll: false,\n          dragDevices: {\n            PointerDeviceKind.touch,\n            PointerDeviceKind.mouse,\n          },\n        );\n\n    return Semantics(\n      label: widget.semanticLabel,\n      child: Container(\n        width: _tableWidth,\n        height: widget.height,\n        decoration: widget.decoration,\n        padding: widget.tablePadding,\n        clipBehavior: widget.decoration == null ? Clip.none : Clip.hardEdge,\n        child: IconTheme(\n          data: IconThemeData(color: effectiveIconColor),\n          child: ScrollConfiguration(\n            behavior: effectiveScrollBehavior,\n            child: Column(\n              children: [\n                if (widget.isHeaderPinned && widget.header != null)\n                  SingleChildScrollView(\n                    physics: widget.horizontalScrollPhysics,\n                    controller:\n                        _tableControllers.headerHorizontalScrollController,\n                    scrollDirection: Axis.horizontal,\n                    clipBehavior: Clip.none,\n                    child: _buildHeader(),\n                  ),\n                if (widget.rows.isEmpty && widget.rowsPlaceholder != null)\n                  widget.isRowsPlaceholderPinned\n                      ? widget.rowsPlaceholder!\n                      : SingleChildScrollView(\n                          physics: widget.horizontalScrollPhysics,\n                          controller: _tableControllers\n                              .rowsPlaceholderHorizontalScrollController,\n                          scrollDirection: Axis.horizontal,\n                          clipBehavior: Clip.none,\n                          child: SizedBox(\n                            width: _tableWidth,\n                            child: widget.rowsPlaceholder,\n                          ),\n                        ),\n                Expanded(\n                  child: SingleChildScrollView(\n                    physics: widget.horizontalScrollPhysics,\n                    controller: _tableControllers.horizontalScrollController,\n                    scrollDirection: Axis.horizontal,\n                    clipBehavior: Clip.none,\n                    child: SizedBox(\n                      width: _tableWidth,\n                      child: _buildRows(),\n                    ),\n                  ),\n                ),\n                if (widget.isFooterPinned && widget.footer != null)\n                  SingleChildScrollView(\n                    physics: widget.horizontalScrollPhysics,\n                    controller:\n                        _tableControllers.footerHorizontalScrollController,\n                    scrollDirection: Axis.horizontal,\n                    clipBehavior: Clip.none,\n                    child: _buildFooter(),\n                  ),\n              ],\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _TableRowLabel extends StatelessWidget {\n  final MoonTableRowLabel label;\n  final TextStyle labelTextStyle;\n  final TextStyle animatedLabelTextStyle;\n  final ScrollController horizontalScrollController;\n\n  const _TableRowLabel({\n    required this.label,\n    required this.labelTextStyle,\n    required this.animatedLabelTextStyle,\n    required this.horizontalScrollController,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    final Color effectiveLableTextColor = labelTextStyle.color ??\n        context.moonTheme?.tableTheme.colors.rowLabelTextColor ??\n        MoonColors.light.textPrimary;\n\n    final Color effectiveAnimatedLabelTextColor = animatedLabelTextStyle\n            .color ??\n        context.moonTheme?.tableTheme.colors.rowPinnedAnimatedLabelTextColor ??\n        MoonColors.light.trunks;\n\n    final Duration effectiveTransitionDuration = label.transitionDuration ??\n        context.moonTheme?.tableTheme.properties.transitionDuration ??\n        const Duration(milliseconds: 400);\n\n    final Curve effectiveTransitionCurve = label.transitionCurve ??\n        context.moonTheme?.tableTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    final TextStyle resolvedLabelTextStyle =\n        labelTextStyle.copyWith(color: effectiveLableTextColor);\n\n    final TextStyle resolvedAnimatedLabelTextStyle =\n        animatedLabelTextStyle.copyWith(color: effectiveAnimatedLabelTextColor);\n\n    return label.pinned\n        ? AnimatedBuilder(\n            animation: horizontalScrollController,\n            builder: (BuildContext context, Widget? child) {\n              double widgetOffset = 0;\n              double scrollOffset = horizontalScrollController.offset;\n\n              final bool offsetIsIncreasing = (scrollOffset - widgetOffset) > 0;\n\n              if (scrollOffset < 0) scrollOffset = 0;\n              if (widgetOffset != scrollOffset) widgetOffset = scrollOffset;\n\n              return Padding(\n                padding: EdgeInsetsDirectional.only(start: widgetOffset),\n                child: MoonAnimatedDefaultTextStyle(\n                  textStyle: offsetIsIncreasing\n                      ? resolvedAnimatedLabelTextStyle\n                      : resolvedLabelTextStyle,\n                  curve: effectiveTransitionCurve,\n                  duration: effectiveTransitionDuration,\n                  child: child!,\n                ),\n              );\n            },\n            child: label.label,\n          )\n        : DefaultTextStyle(\n            style: resolvedLabelTextStyle,\n            child: label.label,\n          );\n  }\n}\n\nclass _SortIcon extends StatefulWidget {\n  final bool visible;\n  final bool? up;\n  final double gap;\n  final double iconSize;\n  final Widget icon;\n\n  const _SortIcon({\n    required this.visible,\n    required this.up,\n    required this.gap,\n    required this.iconSize,\n    required this.icon,\n  });\n\n  @override\n  _SortIconState createState() => _SortIconState();\n}\n\nclass _SortIconState extends State<_SortIcon> with TickerProviderStateMixin {\n  final Animatable<double> _turnTween = Tween<double>(begin: 0.0, end: pi)\n      .chain(CurveTween(curve: Curves.easeIn));\n\n  final Duration _animationDuration = const Duration(milliseconds: 200);\n\n  late AnimationController _opacityController;\n  late Animation<double> _opacityAnimation;\n\n  late AnimationController _orientationController;\n  late Animation<double> _orientationAnimation;\n\n  bool? _up;\n  double _orientationOffset = 0.0;\n\n  @override\n  void initState() {\n    super.initState();\n\n    _up = widget.up;\n\n    _opacityAnimation = CurvedAnimation(\n      parent: _opacityController =\n          AnimationController(duration: _animationDuration, vsync: this),\n      curve: Curves.fastOutSlowIn,\n    )..addListener(_rebuild);\n    _opacityController.value = widget.visible ? 1.0 : 0.0;\n\n    _orientationController =\n        AnimationController(duration: _animationDuration, vsync: this);\n    _orientationAnimation = _orientationController.drive(_turnTween)\n      ..addListener(_rebuild)\n      ..addStatusListener(_resetOrientationAnimation);\n\n    if (widget.visible) _orientationOffset = widget.up! ? 0.0 : pi;\n  }\n\n  void _rebuild() {\n    setState(() {\n      // The animation changed, so we need to rebuild.\n    });\n  }\n\n  void _resetOrientationAnimation(AnimationStatus status) {\n    if (status == AnimationStatus.completed) {\n      assert(_orientationAnimation.value == pi);\n\n      _orientationOffset += pi;\n      _orientationController.value = 0.0;\n    }\n  }\n\n  @override\n  void didUpdateWidget(_SortIcon oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    final bool? newUp = widget.up ?? _up;\n    bool skipIcon = false;\n\n    if (oldWidget.visible != widget.visible) {\n      if (widget.visible &&\n          (_opacityController.status == AnimationStatus.dismissed)) {\n        _orientationController.stop();\n        _orientationController.value = 0.0;\n        _orientationOffset = newUp! ? 0.0 : pi;\n        skipIcon = true;\n      }\n\n      widget.visible\n          ? _opacityController.forward()\n          : _opacityController.reverse();\n    }\n\n    if (_up != newUp && !skipIcon) {\n      _orientationController.status == AnimationStatus.dismissed\n          ? _orientationController.forward()\n          : _orientationController.reverse();\n    }\n\n    _up = newUp;\n  }\n\n  @override\n  void dispose() {\n    _opacityController.dispose();\n    _orientationController.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Padding(\n      padding: EdgeInsetsDirectional.only(start: widget.gap),\n      child: FadeTransition(\n        opacity: _opacityAnimation,\n        child: Transform(\n          transform: Matrix4.rotationZ(\n            _orientationOffset + _orientationAnimation.value,\n          ),\n          alignment: Alignment.center,\n          child: widget.icon,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/table/table_controllers.dart",
    "content": "import 'package:flutter/cupertino.dart';\n\nimport 'package:moon_design/src/utils/linked_scroll_controller.dart';\n\nclass TableControllers {\n  late ScrollController verticalScrollController;\n  late ScrollController horizontalScrollController;\n\n  final LinkedScrollControllerGroup _horizontalControllersGroup =\n      LinkedScrollControllerGroup();\n\n  final bool isHeaderPinned;\n  final bool isFooterPinned;\n  final bool hasPinnedEmptyPlaceholder;\n\n  ScrollController? headerHorizontalScrollController;\n  ScrollController? footerHorizontalScrollController;\n  ScrollController? rowsPlaceholderHorizontalScrollController;\n\n  /// Creates Moon Design table controllers.\n  TableControllers({\n    required this.isHeaderPinned,\n    required this.isFooterPinned,\n    required this.hasPinnedEmptyPlaceholder,\n  });\n\n  void init() {\n    verticalScrollController = ScrollController();\n    horizontalScrollController = _horizontalControllersGroup.addAndGet();\n\n    if (isHeaderPinned) {\n      headerHorizontalScrollController =\n          _horizontalControllersGroup.addAndGet();\n    }\n    if (isFooterPinned) {\n      footerHorizontalScrollController =\n          _horizontalControllersGroup.addAndGet();\n    }\n    if (!hasPinnedEmptyPlaceholder) {\n      rowsPlaceholderHorizontalScrollController =\n          _horizontalControllersGroup.addAndGet();\n    }\n  }\n\n  void dispose() {\n    verticalScrollController.dispose();\n    horizontalScrollController.dispose();\n\n    if (isHeaderPinned) headerHorizontalScrollController?.dispose();\n    if (isFooterPinned) footerHorizontalScrollController?.dispose();\n    if (!hasPinnedEmptyPlaceholder) {\n      rowsPlaceholderHorizontalScrollController?.dispose();\n    }\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/tag/tag.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/tag/tag_size_properties.dart';\nimport 'package:moon_design/src/theme/tag/tag_sizes.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonTagSize {\n  x2s,\n  xs,\n  sm,\n}\n\nclass MoonTag extends StatelessWidget {\n  /// The border radius of the tag.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the tag.\n  final Color? backgroundColor;\n\n  /// The height of the tag.\n  final double? height;\n\n  /// The width of the tag.\n  final double? width;\n\n  /// The gap between the [leading], [label] and [trailing] widgets of the tag.\n  final double? gap;\n\n  /// The padding of the tag.\n  final EdgeInsetsGeometry? padding;\n\n  /// The size of the tag.\n  final MoonTagSize? tagSize;\n\n  /// The custom decoration of the tag.\n  final Decoration? decoration;\n\n  /// The semantic label for the tag.\n  final String? semanticLabel;\n\n  /// The callback that is called when the tag is tapped or pressed.\n  final VoidCallback? onTap;\n\n  /// The callback that is called when the tag is long-pressed.\n  final VoidCallback? onLongPress;\n\n  /// The widget to display before the [label] widget of the tag.\n  final Widget? leading;\n\n  /// The primary content of the tag widget.\n  final Widget? label;\n\n  /// The widget to display after the [label] widget of the tag.\n  final Widget? trailing;\n\n  /// Creates a Moon Design tag.\n  const MoonTag({\n    super.key,\n    this.borderRadius,\n    this.backgroundColor,\n    this.height,\n    this.width,\n    this.gap,\n    this.padding,\n    this.tagSize,\n    this.decoration,\n    this.semanticLabel,\n    this.onTap,\n    this.onLongPress,\n    this.leading,\n    this.label,\n    this.trailing,\n  });\n\n  MoonTagSizeProperties _getMoonTagSize(\n    BuildContext context,\n    MoonTagSize? moonTagSize,\n  ) {\n    return switch (moonTagSize) {\n      MoonTagSize.x2s => context.moonTheme?.tagTheme.sizes.x2s ??\n          MoonTagSizes(tokens: MoonTokens.light).x2s,\n      MoonTagSize.xs => context.moonTheme?.tagTheme.sizes.xs ??\n          MoonTagSizes(tokens: MoonTokens.light).xs,\n      MoonTagSize.sm => context.moonTheme?.tagTheme.sizes.sm ??\n          MoonTagSizes(tokens: MoonTokens.light).sm,\n      _ => context.moonTheme?.tagTheme.sizes.xs ??\n          MoonTagSizes(tokens: MoonTokens.light).xs,\n    };\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final MoonTagSizeProperties effectiveMoonTagSize =\n        _getMoonTagSize(context, tagSize);\n\n    final BorderRadiusGeometry effectiveBorderRadius =\n        borderRadius ?? effectiveMoonTagSize.borderRadius;\n\n    final Color effectiveBackgroundColor = backgroundColor ??\n        context.moonTheme?.tagTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.tagTheme.colors.textColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.tagTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final double effectiveHeight = height ?? effectiveMoonTagSize.height;\n\n    final double effectiveGap = gap ?? effectiveMoonTagSize.gap;\n\n    final EdgeInsetsGeometry effectivePadding =\n        padding ?? effectiveMoonTagSize.padding;\n\n    final EdgeInsets resolvedDirectionalPadding =\n        effectivePadding.resolve(Directionality.of(context));\n\n    final EdgeInsetsGeometry correctedPadding = padding == null\n        ? EdgeInsetsDirectional.fromSTEB(\n            leading == null && label != null\n                ? resolvedDirectionalPadding.left\n                : 0,\n            resolvedDirectionalPadding.top,\n            trailing == null && label != null\n                ? resolvedDirectionalPadding.right\n                : 0,\n            resolvedDirectionalPadding.bottom,\n          )\n        : resolvedDirectionalPadding;\n\n    return Semantics(\n      label: semanticLabel,\n      button: false,\n      focusable: false,\n      child: GestureDetector(\n        excludeFromSemantics: true,\n        onTap: onTap,\n        onLongPress: onLongPress,\n        child: MouseRegion(\n          cursor: onTap != null\n              ? SystemMouseCursors.click\n              : SystemMouseCursors.basic,\n          child: Container(\n            width: width,\n            height: effectiveHeight,\n            padding: correctedPadding,\n            constraints: BoxConstraints(minWidth: effectiveHeight),\n            decoration: decoration ??\n                ShapeDecorationWithPremultipliedAlpha(\n                  color: effectiveBackgroundColor,\n                  shape: MoonSquircleBorder(\n                    borderRadius:\n                        effectiveBorderRadius.squircleBorderRadius(context),\n                  ),\n                ),\n            child: IconTheme(\n              data: IconThemeData(\n                color: effectiveIconColor,\n                size: effectiveMoonTagSize.iconSizeValue,\n              ),\n              child: DefaultTextStyle(\n                style: effectiveMoonTagSize.textStyle.copyWith(\n                  color: effectiveTextColor,\n                ),\n                child: Row(\n                  mainAxisSize: MainAxisSize.min,\n                  mainAxisAlignment: MainAxisAlignment.center,\n                  children: [\n                    if (leading != null)\n                      Padding(\n                        padding: EdgeInsets.symmetric(horizontal: effectiveGap),\n                        child: leading,\n                      ),\n                    if (label != null) label!,\n                    if (trailing != null)\n                      Padding(\n                        padding: EdgeInsets.symmetric(horizontal: effectiveGap),\n                        child: trailing,\n                      ),\n                  ],\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/text_area/text_area.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/widgets/text_input/form_text_input.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\ntypedef MoonTextAreaErrorBuilder = Widget Function(\n  BuildContext context,\n  String? errorText,\n);\n\nclass MoonTextArea extends StatelessWidget {\n  /// Sets the auto validation mode of the text area.\n  final AutovalidateMode autovalidateMode;\n\n  /// {@macro flutter.widgets.editableText.autocorrect}\n  final bool autocorrect;\n\n  /// {@macro flutter.widgets.editableText.autofocus}\n  final bool autofocus;\n\n  /// Whether the text area is enabled. When false, taps are ignored and the\n  /// opacity reduced.\n  final bool enabled;\n\n  /// {@macro flutter.services.TextInputConfiguration.enableIMEPersonalizedLearning}\n  final bool enableIMEPersonalizedLearning;\n\n  /// {@macro flutter.widgets.editableText.enableInteractiveSelection}\n  final bool? enableInteractiveSelection;\n\n  /// {@macro flutter.services.TextInputConfiguration.enableSuggestions}\n  final bool enableSuggestions;\n\n  /// {@macro flutter.widgets.editableText.expands}\n  final bool expands;\n\n  /// {@macro flutter.widgets.editableText.readOnly}\n  final bool readOnly;\n\n  /// {@macro flutter.widgets.editableText.scribbleEnabled}\n  final bool scribbleEnabled;\n\n  /// {@macro flutter.widgets.editableText.showCursor}\n  final bool? showCursor;\n\n  /// The border radius of the text area.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The appearance of the keyboard.\n  ///\n  /// This setting is only honored on iOS devices.\n  ///\n  /// If unset, defaults to [ThemeData.brightness].\n  final Brightness? keyboardAppearance;\n\n  /// {@macro flutter.material.Material.clipBehavior}\n  ///\n  /// Defaults to [Clip.hardEdge].\n  final Clip? clipBehavior;\n\n  /// The background color of the text area.\n  final Color? backgroundColor;\n\n  /// The border color of the active or focused text area.\n  final Color? activeBorderColor;\n\n  /// The border color of the inactive text area.\n  final Color? inactiveBorderColor;\n\n  /// The color of the text area in error state.\n  final Color? errorColor;\n\n  /// The border color of the text area on hover.\n  final Color? hoverBorderColor;\n\n  /// The text color of the text area.\n  final Color? textColor;\n\n  /// The text color of the text area hint.\n  final Color? hintTextColor;\n\n  /// The height of the text area (does not include the space taken by\n  /// [MoonTextArea.errorBuilder]).\n  final double? height;\n\n  /// The duration of the text area transition animation (enable and disable).\n  final Duration? transitionDuration;\n\n  /// The curve of the text area transition animation (enable and disable).\n  final Curve? transitionCurve;\n\n  /// {@macro flutter.widgets.editableText.scrollPadding}\n  final EdgeInsets scrollPadding;\n\n  /// The padding of the [helper] and [errorBuilder] widgets.\n  final EdgeInsetsGeometry? helperPadding;\n\n  /// The padding of the text content.\n  final EdgeInsetsGeometry? textPadding;\n\n  /// {@macro flutter.widgets.Focus.focusNode}\n  final FocusNode? focusNode;\n\n  /// The maximum number of characters (unicode grapheme clusters) to allow in\n  /// the text area.\n  ///\n  /// {@macro flutter.services.lengthLimitingTextInputFormatter.maxLength}\n  final int? maxLength;\n\n  /// {@macro flutter.widgets.editableText.minLines}\n  ///  * [expands], which determines whether the field should fill the height of\n  ///  its parent.\n  final int? minLines;\n\n  /// {@macro flutter.widgets.editableText.autofillHints}\n  /// {@macro flutter.services.AutofillConfiguration.autofillHints}\n  final Iterable<String>? autofillHints;\n\n  /// {@macro flutter.widgets.editableText.inputFormatters}\n  final List<TextInputFormatter>? inputFormatters;\n\n  /// Determines how the [maxLength] limit should be enforced.\n  ///\n  /// {@macro flutter.services.textFormatter.effectiveMaxLengthEnforcement}\n  ///\n  /// {@macro flutter.services.textFormatter.maxLengthEnforcement}\n  final MaxLengthEnforcement? maxLengthEnforcement;\n\n  /// {@macro flutter.widgets.editableText.scrollController}\n  final ScrollController? scrollController;\n\n  /// {@macro flutter.widgets.editableText.scrollPhysics}\n  final ScrollPhysics? scrollPhysics;\n\n  /// The custom decoration of the text area.\n  final Decoration? decoration;\n\n  /// The hint text to display in the text area.\n  final String? hintText;\n\n  /// The initial value of the text area.\n  final String? initialValue;\n\n  /// {@template flutter.material.textfield.restorationId}\n  /// Restoration ID to save and restore the state of the text field.\n  ///\n  /// See also:\n  ///\n  ///  * [RestorationManager], which explains how state restoration works in\n  ///  Flutter.\n  /// {@endtemplate}\n  final String? restorationId;\n\n  /// The semantic label for the text area.\n  final String? semanticLabel;\n\n  /// {@macro flutter.widgets.editableText.strutStyle}\n  final StrutStyle? strutStyle;\n\n  /// {@macro flutter.widgets.editableText.textAlign}\n  final TextAlign textAlign;\n\n  /// {@macro flutter.widgets.editableText.textCapitalization}\n  final TextCapitalization textCapitalization;\n\n  /// {@macro flutter.widgets.editableText.textDirection}\n  final TextDirection? textDirection;\n\n  /// The [TextEditingController] used to edit the text in the text area.\n  final TextEditingController? controller;\n\n  /// The type of action button to use for the keyboard.\n  ///\n  /// Defaults to [TextInputAction.newline] if [keyboardType] is\n  /// [TextInputType.multiline] and [TextInputAction.done] otherwise.\n  final TextInputAction? textInputAction;\n\n  /// The text style of the input text.\n  ///\n  /// This text style is also used as the base style for the [decoration].\n  final TextStyle? textStyle;\n\n  /// The text style of the [helper] widget or error state text.\n  final TextStyle? helperTextStyle;\n\n  /// The text validator for the text area widget.\n  final FormFieldValidator<String>? validator;\n\n  /// The callback that is called when the user taps on the text area.\n  final GestureTapCallback? onTap;\n\n  /// The callback that is called when the user taps outside the text area.\n  final TapRegionCallback? onTapOutside;\n\n  /// {@macro flutter.widgets.editableText.onChanged}\n  ///\n  /// See also:\n  ///\n  ///  * [inputFormatters]: called before the [onChanged] runs and can validate\n  ///  and change/format the input value.\n  ///  * [onEditingComplete], [onSubmitted]: more specialized input change\n  ///  notifications.\n  final ValueChanged<String>? onChanged;\n\n  /// {@macro flutter.widgets.editableText.onEditingComplete}\n  final VoidCallback? onEditingComplete;\n\n  /// [FormState.save].\n  final ValueChanged<String?>? onSaved;\n\n  /// {@macro flutter.widgets.editableText.onSubmitted}\n  ///\n  /// See also:\n  ///\n  ///  * [TextInputAction.next] and [TextInputAction.previous], which\n  ///  automatically shift the focus to the next/previous focusable item when\n  ///  the user is done editing.\n  final ValueChanged<String>? onSubmitted;\n\n  /// A builder to build the text area error widget.\n  final MoonTextAreaErrorBuilder? errorBuilder;\n\n  /// The widget to display below the text area. Not displayed in error state.\n  final Widget? helper;\n\n  /// Creates a Moon Design text area.\n  const MoonTextArea({\n    super.key,\n    this.autovalidateMode = AutovalidateMode.disabled,\n    this.autocorrect = true,\n    this.autofocus = false,\n    this.enabled = true,\n    this.enableIMEPersonalizedLearning = true,\n    this.enableInteractiveSelection,\n    this.enableSuggestions = true,\n    this.expands = false,\n    this.readOnly = false,\n    this.scribbleEnabled = true,\n    this.showCursor,\n    this.borderRadius,\n    this.keyboardAppearance,\n    this.clipBehavior,\n    this.backgroundColor,\n    this.activeBorderColor,\n    this.inactiveBorderColor,\n    this.errorColor,\n    this.hoverBorderColor,\n    this.textColor,\n    this.hintTextColor,\n    this.height,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.scrollPadding = const EdgeInsets.all(24.0),\n    this.helperPadding,\n    this.textPadding,\n    this.focusNode,\n    this.validator,\n    this.maxLength,\n    this.minLines,\n    this.autofillHints,\n    this.inputFormatters,\n    this.maxLengthEnforcement,\n    this.scrollController,\n    this.scrollPhysics,\n    this.decoration,\n    this.hintText,\n    this.initialValue,\n    this.restorationId,\n    this.semanticLabel,\n    this.strutStyle,\n    this.textAlign = TextAlign.start,\n    this.textCapitalization = TextCapitalization.none,\n    this.textDirection,\n    this.controller,\n    this.textInputAction,\n    this.textStyle,\n    this.helperTextStyle,\n    this.onTap,\n    this.onTapOutside,\n    this.onChanged,\n    this.onEditingComplete,\n    this.onSaved,\n    this.onSubmitted,\n    this.errorBuilder,\n    this.helper,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    final BorderRadiusGeometry effectiveBorderRadius = borderRadius ??\n        context.moonTheme?.textAreaTheme.properties.borderRadius ??\n        BorderRadius.circular(8);\n\n    final Color effectiveBackgroundColor = backgroundColor ??\n        context.moonTheme?.textAreaTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveActiveBorderColor = activeBorderColor ??\n        context.moonTheme?.textAreaTheme.colors.activeBorderColor ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveInactiveBorderColor = inactiveBorderColor ??\n        context.moonTheme?.textAreaTheme.colors.inactiveBorderColor ??\n        MoonColors.light.beerus;\n\n    final Color effectiveErrorColor = errorColor ??\n        context.moonTheme?.textAreaTheme.colors.errorColor ??\n        MoonColors.light.chichi;\n\n    final Color effectiveHoverBorderColor = hoverBorderColor ??\n        context.moonTheme?.textAreaTheme.colors.hoverBorderColor ??\n        MoonColors.light.beerus;\n\n    final Color effectiveTextColor = textColor ??\n        context.moonTheme?.textAreaTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    final Color effectiveHelperTextColor = hintTextColor ??\n        context.moonTheme?.textAreaTheme.colors.helperTextColor ??\n        MoonColors.light.trunks;\n\n    final EdgeInsetsGeometry effectiveHelperPadding = helperPadding ??\n        context.moonTheme?.textAreaTheme.properties.helperPadding ??\n        EdgeInsets.only(\n          left: MoonSizes.sizes.x3s,\n          top: MoonSizes.sizes.x4s,\n          right: MoonSizes.sizes.x3s,\n        );\n\n    final EdgeInsetsGeometry effectiveTextPadding = textPadding ??\n        context.moonTheme?.textAreaTheme.properties.textPadding ??\n        const EdgeInsets.all(16);\n\n    final TextStyle effectiveTextStyle = textStyle ??\n        context.moonTheme?.textAreaTheme.properties.textStyle ??\n        MoonTypography.typography.body.text16;\n\n    final TextStyle effectiveHelperTextStyle = helperTextStyle ??\n        context.moonTheme?.textAreaTheme.properties.helperTextStyle ??\n        MoonTypography.typography.body.text12;\n\n    final Duration effectiveTransitionDuration = transitionDuration ??\n        context.moonTheme?.textAreaTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = transitionCurve ??\n        context.moonTheme?.textAreaTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    return MoonFormTextInput(\n      activeBorderColor: effectiveActiveBorderColor,\n      autocorrect: autocorrect,\n      autofillHints: autofillHints,\n      autofocus: autofocus,\n      autovalidateMode: autovalidateMode,\n      backgroundColor: effectiveBackgroundColor,\n      borderRadius: effectiveBorderRadius,\n      controller: controller,\n      cursorColor: effectiveTextColor,\n      cursorErrorColor: effectiveErrorColor,\n      enabled: enabled,\n      enableIMEPersonalizedLearning: enableIMEPersonalizedLearning,\n      enableInteractiveSelection: enableInteractiveSelection,\n      enableSuggestions: enableSuggestions,\n      errorColor: effectiveErrorColor,\n      errorBuilder: errorBuilder,\n      expands: expands,\n      focusNode: focusNode,\n      height: height,\n      helper: helper,\n      helperPadding: effectiveHelperPadding,\n      helperTextStyle: effectiveHelperTextStyle,\n      hintText: hintText,\n      hintTextColor: effectiveHelperTextColor,\n      hoverBorderColor: effectiveHoverBorderColor,\n      inactiveBorderColor: effectiveInactiveBorderColor,\n      initialValue: initialValue,\n      inputFormatters: inputFormatters,\n      keyboardAppearance: keyboardAppearance,\n      keyboardType: TextInputType.multiline,\n      maxLength: maxLength,\n      maxLengthEnforcement: maxLengthEnforcement,\n      maxLines: null,\n      minLines: minLines,\n      onChanged: onChanged,\n      onEditingComplete: onEditingComplete,\n      onSubmitted: onSubmitted,\n      onSaved: onSaved,\n      onTap: onTap,\n      onTapOutside: onTapOutside,\n      padding: effectiveTextPadding,\n      readOnly: readOnly,\n      restorationId: restorationId,\n      scrollController: scrollController,\n      scrollPadding: scrollPadding,\n      scrollPhysics: scrollPhysics,\n      decoration: decoration,\n      showCursor: showCursor,\n      strutStyle: strutStyle,\n      style: effectiveTextStyle.copyWith(color: effectiveTextColor),\n      textAlign: textAlign,\n      textAlignVertical: TextAlignVertical.top,\n      textCapitalization: textCapitalization,\n      textColor: effectiveTextColor,\n      textDirection: textDirection,\n      textInputAction: textInputAction,\n      transitionCurve: effectiveTransitionCurve,\n      transitionDuration: effectiveTransitionDuration,\n      validator: validator,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/text_input/form_text_input.dart",
    "content": "import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle;\n\nimport 'package:flutter/gestures.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\n\nimport 'package:moon_design/src/widgets/text_input/text_input.dart';\n\nexport 'package:flutter/services.dart' show SmartDashesType, SmartQuotesType;\n\ntypedef MoonFormTextInputValidationStatusCallback = void Function(\n  String? validationErrorText,\n);\n\nclass MoonFormTextInput extends FormField<String> {\n  final MoonFormTextInputConfiguration configuration;\n\n  /// Creates a Moon Design [MoonFormTextInput] with a [MoonTextInput].\n  ///\n  /// If a [controller] is specified, [initialValue] must be null.\n  /// If [controller] is null, a [TextEditingController] is automatically\n  /// created with its `text` initialized to [initialValue] or an empty string.\n  ///\n  /// See [MoonTextInput] documentation for details on various parameters.\n  ///\n  /// Validator errors take precedence over the provided [errorText].\n  MoonFormTextInput({\n    super.key,\n    // Moon Design system properties.\n    bool hasFloatingLabel = false,\n    BorderRadiusGeometry? borderRadius,\n    Color? backgroundColor,\n    Color? activeBorderColor,\n    Color? inactiveBorderColor,\n    Color? errorColor,\n    Color? errorBorderColor,\n    Color? hoverBorderColor,\n    Color? textColor,\n    Color? hintTextColor,\n    Decoration? decoration,\n    double? gap,\n    double? height,\n    double? width,\n    Duration? transitionDuration,\n    Curve? transitionCurve,\n    EdgeInsetsGeometry? padding,\n    EdgeInsetsGeometry? helperPadding,\n    MoonFormTextInputValidationStatusCallback? validationStatusCallback,\n    MoonTextInputSize? textInputSize,\n    String? errorText,\n    String? hintText,\n    String? initialValue,\n    TextStyle? helperTextStyle,\n    MoonTextInputErrorBuilder? errorBuilder,\n    Widget? leading,\n    Widget? trailing,\n    Widget? helper,\n\n    // Flutter properties.\n    this.controller,\n    FocusNode? focusNode,\n    TextInputType? keyboardType,\n    TextCapitalization textCapitalization = TextCapitalization.none,\n    TextInputAction? textInputAction,\n    TextStyle? style,\n    StrutStyle? strutStyle,\n    TextDirection? textDirection,\n    TextAlign textAlign = TextAlign.start,\n    TextAlignVertical? textAlignVertical,\n    bool autofocus = false,\n    bool readOnly = false,\n    bool? showCursor,\n    String obscuringCharacter = '•',\n    bool obscureText = false,\n    bool autocorrect = true,\n    SmartDashesType? smartDashesType,\n    SmartQuotesType? smartQuotesType,\n    bool enableSuggestions = true,\n    MaxLengthEnforcement? maxLengthEnforcement,\n    int? maxLines = 1,\n    int? minLines,\n    bool expands = false,\n    int? maxLength,\n    ValueChanged<String>? onChanged,\n    GestureTapCallback? onTap,\n    bool onTapAlwaysCalled = false,\n    TapRegionCallback? onTapOutside,\n    VoidCallback? onEditingComplete,\n    ValueChanged<String>? onSubmitted,\n    super.onSaved,\n    super.validator,\n    List<TextInputFormatter>? inputFormatters,\n    bool? enabled,\n    double cursorWidth = 2.0,\n    double? cursorHeight,\n    Radius? cursorRadius,\n    Color? cursorColor,\n    Color? cursorErrorColor,\n    Brightness? keyboardAppearance,\n    EdgeInsets scrollPadding = const EdgeInsets.all(20.0),\n    bool? enableInteractiveSelection,\n    TextSelectionControls? selectionControls,\n    ScrollPhysics? scrollPhysics,\n    Iterable<String>? autofillHints,\n    AutovalidateMode? autovalidateMode,\n    ScrollController? scrollController,\n    super.restorationId,\n    bool enableIMEPersonalizedLearning = true,\n    MouseCursor? mouseCursor,\n    EditableTextContextMenuBuilder? contextMenuBuilder =\n        defaultContextMenuBuilder,\n    SpellCheckConfiguration? spellCheckConfiguration,\n    TextMagnifierConfiguration? magnifierConfiguration,\n\n    // Flutter missing properties.\n    AppPrivateCommandCallback? onAppPrivateCommand,\n    bool canRequestFocus = true,\n    bool scribbleEnabled = true,\n    bool? cursorOpacityAnimates,\n    Clip clipBehavior = Clip.hardEdge,\n    ContentInsertionConfiguration? contentInsertionConfiguration,\n    DragStartBehavior dragStartBehavior = DragStartBehavior.start,\n    ui.BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,\n    ui.BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,\n    UndoHistoryController? undoController,\n  })  : assert(obscuringCharacter.length == 1),\n        assert(maxLines == null || maxLines > 0),\n        assert(minLines == null || minLines > 0),\n        assert(\n          (maxLines == null) || (minLines == null) || (maxLines >= minLines),\n          \"MinLines can not be greater than maxLines\",\n        ),\n        assert(\n          !expands || (maxLines == null && minLines == null),\n          \"MinLines and maxLines must be null when 'expands' is true.\",\n        ),\n        assert(\n          !obscureText || maxLines == 1,\n          \"Obscured fields cannot be multiline.\",\n        ),\n        assert(\n          maxLength == null ||\n              maxLength == MoonTextInput.noMaxLength ||\n              maxLength > 0,\n        ),\n        configuration = MoonFormTextInputConfiguration(\n          activeBorderColor: activeBorderColor,\n          autocorrect: autocorrect,\n          autofillHints: autofillHints,\n          autofocus: autofocus,\n          autovalidateMode: autovalidateMode ?? AutovalidateMode.disabled,\n          backgroundColor: backgroundColor,\n          borderRadius: borderRadius,\n          canRequestFocus: canRequestFocus,\n          clipBehavior: clipBehavior,\n          contentInsertionConfiguration: contentInsertionConfiguration,\n          contextMenuBuilder: contextMenuBuilder,\n          controller: controller,\n          cursorColor: cursorColor,\n          cursorErrorColor: cursorErrorColor,\n          cursorHeight: cursorHeight,\n          cursorOpacityAnimates: cursorOpacityAnimates,\n          cursorRadius: cursorRadius,\n          cursorWidth: cursorWidth,\n          decoration: decoration,\n          dragStartBehavior: dragStartBehavior,\n          enabled: enabled ?? true,\n          enableIMEPersonalizedLearning: enableIMEPersonalizedLearning,\n          enableInteractiveSelection:\n              enableInteractiveSelection ?? (!obscureText || !readOnly),\n          enableSuggestions: enableSuggestions,\n          errorBorderColor: errorBorderColor,\n          errorBuilder: errorBuilder,\n          errorColor: errorColor,\n          errorText: errorText,\n          expands: expands,\n          focusNode: focusNode,\n          gap: gap,\n          hasFloatingLabel: hasFloatingLabel,\n          height: height,\n          helper: helper,\n          helperPadding: helperPadding,\n          helperTextStyle: helperTextStyle,\n          hintText: hintText,\n          hintTextColor: hintTextColor,\n          hoverBorderColor: hoverBorderColor,\n          inactiveBorderColor: inactiveBorderColor,\n          initialValue: initialValue,\n          inputFormatters: inputFormatters,\n          keyboardAppearance: keyboardAppearance,\n          keyboardType: keyboardType,\n          leading: leading,\n          magnifierConfiguration: magnifierConfiguration,\n          maxLength: maxLength,\n          maxLengthEnforcement: maxLengthEnforcement,\n          maxLines: maxLines,\n          minLines: minLines,\n          mouseCursor: mouseCursor,\n          obscureText: obscureText,\n          obscuringCharacter: obscuringCharacter,\n          onAppPrivateCommand: onAppPrivateCommand,\n          onChanged: onChanged,\n          onEditingComplete: onEditingComplete,\n          validationStatusCallback: validationStatusCallback,\n          onSaved: onSaved,\n          onSubmitted: onSubmitted,\n          onTap: onTap,\n          onTapAlwaysCalled: onTapAlwaysCalled,\n          onTapOutside: onTapOutside,\n          padding: padding,\n          readOnly: readOnly,\n          restorationId: restorationId,\n          scribbleEnabled: scribbleEnabled,\n          scrollController: scrollController,\n          scrollPadding: scrollPadding,\n          scrollPhysics: scrollPhysics,\n          selectionControls: selectionControls,\n          selectionHeightStyle: selectionHeightStyle,\n          selectionWidthStyle: selectionWidthStyle,\n          showCursor: showCursor,\n          smartDashesType: smartDashesType ??\n              (obscureText\n                  ? SmartDashesType.disabled\n                  : SmartDashesType.enabled),\n          smartQuotesType: smartQuotesType ??\n              (obscureText\n                  ? SmartQuotesType.disabled\n                  : SmartQuotesType.enabled),\n          spellCheckConfiguration: spellCheckConfiguration,\n          strutStyle: strutStyle,\n          style: style,\n          textAlign: textAlign,\n          textAlignVertical: textAlignVertical,\n          textCapitalization: textCapitalization,\n          textColor: textColor,\n          textDirection: textDirection,\n          textInputAction: textInputAction,\n          textInputSize: textInputSize,\n          trailing: trailing,\n          transitionCurve: transitionCurve,\n          transitionDuration: transitionDuration,\n          undoController: undoController,\n          validator: validator,\n          width: width,\n        ),\n        super(\n          initialValue:\n              controller != null ? controller.text : (initialValue ?? \"\"),\n          enabled: enabled ?? true,\n          autovalidateMode: autovalidateMode ?? AutovalidateMode.disabled,\n          builder: (FormFieldState<String> field) {\n            final _MoonFormTextInputState state =\n                field as _MoonFormTextInputState;\n\n            validationStatusCallback?.call(field.errorText);\n\n            void onChangedHandler(String value) {\n              field.didChange(value);\n              if (onChanged != null) {\n                onChanged(value);\n              }\n            }\n\n            return UnmanagedRestorationScope(\n              bucket: field.bucket,\n              child: MoonTextInput(\n                activeBorderColor: activeBorderColor,\n                autocorrect: autocorrect,\n                autofillHints: autofillHints,\n                autofocus: autofocus,\n                backgroundColor: backgroundColor,\n                borderRadius: borderRadius,\n                canRequestFocus: canRequestFocus,\n                clipBehavior: clipBehavior,\n                contentInsertionConfiguration: contentInsertionConfiguration,\n                contextMenuBuilder: contextMenuBuilder,\n                controller: state._effectiveController,\n                cursorColor: cursorColor,\n                cursorErrorColor: cursorErrorColor,\n                cursorHeight: cursorHeight,\n                cursorOpacityAnimates: cursorOpacityAnimates,\n                cursorRadius: cursorRadius,\n                cursorWidth: cursorWidth,\n                decoration: decoration,\n                dragStartBehavior: dragStartBehavior,\n                enabled: enabled ?? true,\n                enableIMEPersonalizedLearning: enableIMEPersonalizedLearning,\n                enableInteractiveSelection:\n                    enableInteractiveSelection ?? (!obscureText || !readOnly),\n                enableSuggestions: enableSuggestions,\n                errorBorderColor: errorBorderColor,\n                errorBuilder: errorBuilder,\n                errorColor: errorColor,\n                errorText: field.errorText ?? errorText,\n                expands: expands,\n                focusNode: focusNode,\n                gap: gap,\n                hasFloatingLabel: hasFloatingLabel,\n                height: height,\n                helper: helper,\n                helperPadding: helperPadding,\n                helperTextStyle: helperTextStyle,\n                hintText: hintText,\n                hintTextColor: hintTextColor,\n                hoverBorderColor: hoverBorderColor,\n                inactiveBorderColor: inactiveBorderColor,\n                initialValue: initialValue,\n                inputFormatters: inputFormatters,\n                keyboardAppearance: keyboardAppearance,\n                keyboardType: keyboardType,\n                leading: leading,\n                magnifierConfiguration: magnifierConfiguration,\n                maxLength: maxLength,\n                maxLengthEnforcement: maxLengthEnforcement,\n                maxLines: maxLines,\n                minLines: minLines,\n                mouseCursor: mouseCursor,\n                obscureText: obscureText,\n                obscuringCharacter: obscuringCharacter,\n                onAppPrivateCommand: onAppPrivateCommand,\n                onChanged: onChangedHandler,\n                onEditingComplete: onEditingComplete,\n                onSubmitted: onSubmitted,\n                onTap: onTap,\n                onTapAlwaysCalled: onTapAlwaysCalled,\n                onTapOutside: onTapOutside,\n                padding: padding,\n                readOnly: readOnly,\n                restorationId: restorationId,\n                scribbleEnabled: scribbleEnabled,\n                scrollController: scrollController,\n                scrollPadding: scrollPadding,\n                scrollPhysics: scrollPhysics,\n                selectionControls: selectionControls,\n                selectionHeightStyle: selectionHeightStyle,\n                selectionWidthStyle: selectionWidthStyle,\n                showCursor: showCursor,\n                smartDashesType: smartDashesType ??\n                    (obscureText\n                        ? SmartDashesType.disabled\n                        : SmartDashesType.enabled),\n                smartQuotesType: smartQuotesType ??\n                    (obscureText\n                        ? SmartQuotesType.disabled\n                        : SmartQuotesType.enabled),\n                spellCheckConfiguration: spellCheckConfiguration,\n                strutStyle: strutStyle,\n                style: style,\n                textAlign: textAlign,\n                textAlignVertical: textAlignVertical,\n                textCapitalization: textCapitalization,\n                textColor: textColor,\n                textDirection: textDirection,\n                textInputAction: textInputAction,\n                textInputSize: textInputSize,\n                trailing: trailing,\n                transitionCurve: transitionCurve,\n                transitionDuration: transitionDuration,\n                undoController: undoController,\n                width: width,\n              ),\n            );\n          },\n        );\n\n  /// Controls the input text.\n  ///\n  /// If null, this widget will create its own [TextEditingController] and initialize its [TextEditingController.text]\n  /// with [initialValue].\n  final TextEditingController? controller;\n\n  static Widget defaultContextMenuBuilder(\n    BuildContext context,\n    EditableTextState editableTextState,\n  ) {\n    return AdaptiveTextSelectionToolbar.editableText(\n      editableTextState: editableTextState,\n    );\n  }\n\n  @override\n  FormFieldState<String> createState() => _MoonFormTextInputState();\n}\n\nclass _MoonFormTextInputState extends FormFieldState<String> {\n  RestorableTextEditingController? _controller;\n\n  TextEditingController get _effectiveController =>\n      _moonFormTextInput.controller ?? _controller!.value;\n\n  MoonFormTextInput get _moonFormTextInput => super.widget as MoonFormTextInput;\n\n  @override\n  void restoreState(RestorationBucket? oldBucket, bool initialRestore) {\n    super.restoreState(oldBucket, initialRestore);\n    if (_controller != null) {\n      _registerController();\n    }\n    // Update the internal [FormFieldState] value to synchronize with the text editing controller value.\n    setValue(_effectiveController.text);\n  }\n\n  void _registerController() {\n    assert(_controller != null);\n    registerForRestoration(_controller!, 'controller');\n  }\n\n  void _createLocalController([TextEditingValue? value]) {\n    assert(_controller == null);\n    _controller = value == null\n        ? RestorableTextEditingController()\n        : RestorableTextEditingController.fromValue(value);\n    if (!restorePending) {\n      _registerController();\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    if (_moonFormTextInput.controller == null) {\n      _createLocalController(\n        widget.initialValue != null\n            ? TextEditingValue(text: widget.initialValue!)\n            : null,\n      );\n    } else {\n      _moonFormTextInput.controller!.addListener(_handleControllerChanged);\n    }\n  }\n\n  @override\n  void didUpdateWidget(MoonFormTextInput oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (_moonFormTextInput.controller != oldWidget.controller) {\n      oldWidget.controller?.removeListener(_handleControllerChanged);\n      _moonFormTextInput.controller?.addListener(_handleControllerChanged);\n\n      if (oldWidget.controller != null &&\n          _moonFormTextInput.controller == null) {\n        _createLocalController(oldWidget.controller!.value);\n      }\n\n      if (_moonFormTextInput.controller != null) {\n        setValue(_moonFormTextInput.controller!.text);\n        if (oldWidget.controller == null) {\n          unregisterFromRestoration(_controller!);\n          _controller!.dispose();\n          _controller = null;\n        }\n      }\n    }\n  }\n\n  @override\n  void dispose() {\n    _moonFormTextInput.controller?.removeListener(_handleControllerChanged);\n    _controller?.dispose();\n    super.dispose();\n  }\n\n  @override\n  void didChange(String? value) {\n    super.didChange(value);\n\n    if (_effectiveController.text != value) {\n      _effectiveController.text = value ?? \"\";\n    }\n  }\n\n  @override\n  void reset() {\n    // SetState is handled in the superclass, no additional call needed here.\n    _effectiveController.text = widget.initialValue ?? '';\n    super.reset();\n  }\n\n  void _handleControllerChanged() {\n    // Suppress changes originating from within this class.\n    // When a controller is provided, this change listener is registered. In such cases, we may receive notifications\n    // for changes within this class (e.g., the reset() method), but the FormField value will already be set.\n    if (_effectiveController.text != value) {\n      didChange(_effectiveController.text);\n    }\n  }\n}\n\nclass MoonFormTextInputConfiguration {\n  // Moon Design System properties.\n  final bool hasFloatingLabel;\n  final BorderRadiusGeometry? borderRadius;\n  final Color? backgroundColor;\n  final Color? activeBorderColor;\n  final Color? errorBorderColor;\n  final Color? inactiveBorderColor;\n  final Color? errorColor;\n  final Color? hoverBorderColor;\n  final Color? textColor;\n  final Color? hintTextColor;\n  final Decoration? decoration;\n  final double? gap;\n  final double? height;\n  final double? width;\n  final Duration? transitionDuration;\n  final Curve? transitionCurve;\n  final EdgeInsetsGeometry? padding;\n  final EdgeInsetsGeometry? helperPadding;\n  final MoonFormTextInputValidationStatusCallback? validationStatusCallback;\n  final MoonTextInputSize? textInputSize;\n  final String? errorText;\n  final String? hintText;\n  final String? initialValue;\n  final TextStyle? helperTextStyle;\n  final MoonTextInputErrorBuilder? errorBuilder;\n  final Widget? leading;\n  final Widget? trailing;\n  final Widget? helper;\n\n  // Flutter properties.\n  final TextMagnifierConfiguration? magnifierConfiguration;\n  final TextEditingController? controller;\n  final FocusNode? focusNode;\n  final TextInputType keyboardType;\n  final TextInputAction? textInputAction;\n  final TextCapitalization textCapitalization;\n  final TextStyle? style;\n  final StrutStyle? strutStyle;\n  final TextAlign textAlign;\n  final TextAlignVertical? textAlignVertical;\n  final TextDirection? textDirection;\n  final bool autofocus;\n  final String obscuringCharacter;\n  final bool obscureText;\n  final bool autocorrect;\n  final SmartDashesType smartDashesType;\n  final SmartQuotesType smartQuotesType;\n  final bool enableSuggestions;\n  final int? maxLines;\n  final int? minLines;\n  final bool expands;\n  final bool readOnly;\n  final bool? showCursor;\n  final int? maxLength;\n  final MaxLengthEnforcement? maxLengthEnforcement;\n  final ValueChanged<String>? onChanged;\n  final VoidCallback? onEditingComplete;\n  final ValueChanged<String>? onSubmitted;\n  final AppPrivateCommandCallback? onAppPrivateCommand;\n  final List<TextInputFormatter>? inputFormatters;\n  final bool enabled;\n  final double cursorWidth;\n  final double? cursorHeight;\n  final Radius? cursorRadius;\n  final bool? cursorOpacityAnimates;\n  final Color? cursorColor;\n  final Color? cursorErrorColor;\n  final ui.BoxHeightStyle selectionHeightStyle;\n  final ui.BoxWidthStyle selectionWidthStyle;\n  final Brightness? keyboardAppearance;\n  final EdgeInsets scrollPadding;\n  final bool enableInteractiveSelection;\n  final TextSelectionControls? selectionControls;\n  final DragStartBehavior dragStartBehavior;\n  final GestureTapCallback? onTap;\n  final bool onTapAlwaysCalled;\n  final TapRegionCallback? onTapOutside;\n  final MouseCursor? mouseCursor;\n  final ScrollPhysics? scrollPhysics;\n  final ScrollController? scrollController;\n  final Iterable<String>? autofillHints;\n  final Clip clipBehavior;\n  final String? restorationId;\n  final bool scribbleEnabled;\n  final bool enableIMEPersonalizedLearning;\n  final ContentInsertionConfiguration? contentInsertionConfiguration;\n  final EditableTextContextMenuBuilder? contextMenuBuilder;\n  final bool canRequestFocus;\n  final UndoHistoryController? undoController;\n  final SpellCheckConfiguration? spellCheckConfiguration;\n  final FormFieldSetter<String>? onSaved;\n  final FormFieldValidator<String>? validator;\n  final AutovalidateMode autovalidateMode;\n\n  const MoonFormTextInputConfiguration({\n    // Moon Design System properties.\n    this.hasFloatingLabel = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.activeBorderColor,\n    this.errorBorderColor,\n    this.inactiveBorderColor,\n    this.errorColor,\n    this.hoverBorderColor,\n    this.textColor,\n    this.hintTextColor,\n    this.decoration,\n    this.gap,\n    this.height,\n    this.width,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.padding,\n    this.helperPadding,\n    this.validationStatusCallback,\n    this.textInputSize,\n    this.errorText,\n    this.hintText,\n    this.initialValue,\n    this.helperTextStyle,\n    this.errorBuilder,\n    this.leading,\n    this.trailing,\n    this.helper,\n\n    // Flutter properties.\n    this.controller,\n    this.focusNode,\n    this.undoController,\n    TextInputType? keyboardType,\n    this.textInputAction,\n    this.textCapitalization = TextCapitalization.none,\n    this.style,\n    this.strutStyle,\n    this.textAlign = TextAlign.start,\n    this.textAlignVertical,\n    this.textDirection,\n    this.readOnly = false,\n    this.showCursor,\n    this.autofocus = false,\n    this.obscuringCharacter = '•',\n    this.obscureText = false,\n    this.autocorrect = true,\n    SmartDashesType? smartDashesType,\n    SmartQuotesType? smartQuotesType,\n    this.enableSuggestions = true,\n    this.maxLines = 1,\n    this.minLines,\n    this.expands = false,\n    this.maxLength,\n    this.maxLengthEnforcement,\n    this.onChanged,\n    this.onEditingComplete,\n    this.onSubmitted,\n    this.onAppPrivateCommand,\n    this.inputFormatters,\n    this.enabled = true,\n    this.cursorWidth = 2.0,\n    this.cursorHeight,\n    this.cursorRadius,\n    this.cursorOpacityAnimates,\n    this.cursorColor,\n    this.cursorErrorColor,\n    this.selectionHeightStyle = ui.BoxHeightStyle.tight,\n    this.selectionWidthStyle = ui.BoxWidthStyle.tight,\n    this.keyboardAppearance,\n    this.scrollPadding = const EdgeInsets.all(20.0),\n    this.dragStartBehavior = DragStartBehavior.start,\n    bool? enableInteractiveSelection,\n    this.selectionControls,\n    this.onTap,\n    this.onTapAlwaysCalled = false,\n    this.onTapOutside,\n    this.mouseCursor,\n    this.scrollController,\n    this.scrollPhysics,\n    this.autofillHints = const <String>[],\n    this.contentInsertionConfiguration,\n    this.clipBehavior = Clip.hardEdge,\n    this.restorationId,\n    this.scribbleEnabled = true,\n    this.enableIMEPersonalizedLearning = true,\n    this.contextMenuBuilder = MoonFormTextInput.defaultContextMenuBuilder,\n    this.canRequestFocus = true,\n    this.spellCheckConfiguration,\n    this.magnifierConfiguration,\n    this.onSaved,\n    this.validator,\n    this.autovalidateMode = AutovalidateMode.disabled,\n  })  : smartDashesType = smartDashesType ??\n            (obscureText ? SmartDashesType.disabled : SmartDashesType.enabled),\n        smartQuotesType = smartQuotesType ??\n            (obscureText ? SmartQuotesType.disabled : SmartQuotesType.enabled),\n        keyboardType = keyboardType ??\n            (maxLines == 1 ? TextInputType.text : TextInputType.multiline),\n        enableInteractiveSelection =\n            enableInteractiveSelection ?? (!readOnly || !obscureText);\n}\n"
  },
  {
    "path": "lib/src/widgets/text_input/text_input.dart",
    "content": "import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle;\n\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/gestures.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/rendering.dart';\nimport 'package:flutter/services.dart';\n\nimport 'package:moon_design/src/theme/text_input/text_input_size_properties.dart';\nimport 'package:moon_design/src/theme/text_input/text_input_sizes.dart';\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/opacities.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/tokens.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/widgets/common/border_container.dart';\nimport 'package:moon_design/src/widgets/common/error_message_widgets.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nexport 'package:flutter/services.dart'\n    show\n        SmartDashesType,\n        SmartQuotesType,\n        TextCapitalization,\n        TextInputAction,\n        TextInputType;\n\nenum MoonTextInputSize {\n  sm,\n  md,\n  lg,\n  xl,\n}\n\ntypedef MoonTextInputErrorBuilder = Widget Function(\n  BuildContext context,\n  String? errorText,\n);\n\nclass MoonTextInput extends StatefulWidget {\n  /// If [maxLength] is set to this value, only the \"current input length\" part\n  /// of the character counter is displayed.\n  static const int noMaxLength = -1;\n\n  static Widget _defaultContextMenuBuilder(\n    BuildContext context,\n    EditableTextState editableTextState,\n  ) {\n    return AdaptiveTextSelectionToolbar.editableText(\n      editableTextState: editableTextState,\n    );\n  }\n\n  // Moon Design System properties.\n  /// Whether the text input has floating label.\n  final bool hasFloatingLabel;\n\n  /// The border radius of the text input.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the text input.\n  final Color? backgroundColor;\n\n  /// The border color of the active or focused text input.\n  final Color? activeBorderColor;\n\n  /// The border color of the text input in error state.\n  final Color? errorBorderColor;\n\n  /// The border color of the inactive text input.\n  final Color? inactiveBorderColor;\n\n  /// The color of the text input in error state.\n  final Color? errorColor;\n\n  /// The border color of the text input on hover.\n  final Color? hoverBorderColor;\n\n  /// The text color of the text input.\n  final Color? textColor;\n\n  /// The text color of the text input hint.\n  final Color? hintTextColor;\n\n  /// The custom decoration of the text input.\n  final Decoration? decoration;\n\n  /// The gap between the [leading] widget, text input and [trailing] widget.\n  final double? gap;\n\n  /// The height of the text input (does not include the space taken by [MoonTextInput.errorBuilder]).\n  final double? height;\n\n  /// The width of the text input.\n  final double? width;\n\n  /// The duration of the text input transition animation (enable and disable).\n  final Duration? transitionDuration;\n\n  /// The curve of the text input transition animation (enable and disable).\n  final Curve? transitionCurve;\n\n  /// The padding of the text input.\n  final EdgeInsetsGeometry? padding;\n\n  /// The padding of the [helper] and [errorBuilder] widget.\n  final EdgeInsetsGeometry? helperPadding;\n\n  /// The size of the text input.\n  final MoonTextInputSize? textInputSize;\n\n  /// The error text can be used to force text input into an error state (useful for asynchronous errors).\n  ///\n  /// The validator errors take precedence over the provided [errorText].\n  final String? errorText;\n\n  /// The hint text to display in the text area.\n  final String? hintText;\n\n  /// The initial value of the text input. If [controller] is provided,\n  /// this value is ignored and [controller]'s value is used.\n  final String? initialValue;\n\n  /// The text style of the [helper] widget or error state text.\n  final TextStyle? helperTextStyle;\n\n  /// A builder to build the text input error widget.\n  final MoonTextInputErrorBuilder? errorBuilder;\n\n  /// The widget to display before the text input.\n  final Widget? leading;\n\n  /// The widget to display after the text input.\n  final Widget? trailing;\n\n  /// The widget to display below the text input. Not displayed in error state.\n  final Widget? helper;\n\n  // Flutter properties.\n\n  /// {@macro flutter.widgets.magnifier.TextMagnifierConfiguration.intro}\n  ///\n  /// {@macro flutter.widgets.magnifier.intro}\n  ///\n  /// {@macro flutter.widgets.magnifier.TextMagnifierConfiguration.details}\n  ///\n  /// By default, builds a [CupertinoTextMagnifier] on iOS and [TextMagnifier]\n  /// on Android, and builds nothing on all other platforms. If it is desired to\n  /// suppress the magnifier, consider passing [TextMagnifierConfiguration.disabled].\n  ///\n  /// {@tool dartpad}\n  /// This sample demonstrates how to customize the magnifier that this text field uses.\n  ///\n  /// ** See code in examples/api/lib/widgets/text_magnifier/text_magnifier.0.dart **\n  /// {@end-tool}\n  final TextMagnifierConfiguration? magnifierConfiguration;\n\n  /// Controls the input text.\n  ///\n  /// If null, this widget will create its own [TextEditingController].\n  final TextEditingController? controller;\n\n  /// Defines the keyboard focus for this widget.\n  ///\n  /// The [focusNode] is a long-lived object that is typically managed by a\n  /// [StatefulWidget] parent. See [FocusNode] for more information.\n  ///\n  /// To give the keyboard focus to this widget, provide a [focusNode] and then\n  /// use the current [FocusScope] to request the focus:\n  ///\n  /// ```dart\n  /// FocusScope.of(context).requestFocus(myFocusNode);\n  /// ```\n  ///\n  /// This happens automatically when the widget is tapped.\n  ///\n  /// To be notified when the widget gains or loses the focus, add a listener\n  /// to the [focusNode]:\n  ///\n  /// ```dart\n  /// myFocusNode.addListener(() { print(myFocusNode.hasFocus); });\n  /// ```\n  ///\n  /// If null, this widget will create its own [FocusNode].\n  ///\n  /// ## Keyboard\n  ///\n  /// Requesting the focus will typically cause the keyboard to be shown\n  /// if it is not showing already.\n  ///\n  /// On Android, the user can hide the keyboard - without changing the focus -\n  /// with the system back button. They can restore the keyboard's visibility\n  /// by tapping on a text field. The user might hide the keyboard and\n  /// switch to a physical keyboard, or they might just need to get it\n  /// out of the way for a moment, to expose something it's\n  /// obscuring. In this case requesting the focus again will not\n  /// cause the focus to change, and will not make the keyboard visible.\n  ///\n  /// This widget builds an [EditableText] and will ensure that the keyboard is\n  /// showing when it is tapped by calling [EditableTextState.requestKeyboard()].\n  final FocusNode? focusNode;\n\n  /// {@macro flutter.widgets.editableText.keyboardType}\n  final TextInputType keyboardType;\n\n  /// {@template flutter.widgets.TextField.textInputAction}\n  /// The type of action button to use for the keyboard.\n  ///\n  /// Defaults to [TextInputAction.newline] if [keyboardType] is\n  /// [TextInputType.multiline] and [TextInputAction.done] otherwise.\n  /// {@endtemplate}\n  final TextInputAction? textInputAction;\n\n  /// {@macro flutter.widgets.editableText.textCapitalization}\n  final TextCapitalization textCapitalization;\n\n  /// The text style of the input text.\n  ///\n  /// This text style is also used as the base style for the [decoration].\n  ///\n  /// If null, defaults to 'titleMedium' text style from the current [Theme].\n  final TextStyle? style;\n\n  /// {@macro flutter.widgets.editableText.strutStyle}\n  final StrutStyle? strutStyle;\n\n  /// {@macro flutter.widgets.editableText.textAlign}\n  final TextAlign textAlign;\n\n  /// {@macro flutter.material.InputDecorator.textAlignVertical}\n  final TextAlignVertical? textAlignVertical;\n\n  /// {@macro flutter.widgets.editableText.textDirection}\n  final TextDirection? textDirection;\n\n  /// {@macro flutter.widgets.editableText.autofocus}\n  final bool autofocus;\n\n  /// {@macro flutter.widgets.editableText.obscuringCharacter}\n  final String obscuringCharacter;\n\n  /// {@macro flutter.widgets.editableText.obscureText}\n  final bool obscureText;\n\n  /// {@macro flutter.widgets.editableText.autocorrect}\n  final bool autocorrect;\n\n  /// {@macro flutter.services.TextInputConfiguration.smartDashesType}\n  final SmartDashesType smartDashesType;\n\n  /// {@macro flutter.services.TextInputConfiguration.smartQuotesType}\n  final SmartQuotesType smartQuotesType;\n\n  /// {@macro flutter.services.TextInputConfiguration.enableSuggestions}\n  final bool enableSuggestions;\n\n  /// {@macro flutter.widgets.editableText.maxLines}\n  ///  * [expands], which determines whether the field should fill the height of\n  ///    its parent.\n  final int? maxLines;\n\n  /// {@macro flutter.widgets.editableText.minLines}\n  ///  * [expands], which determines whether the field should fill the height of\n  ///    its parent.\n  final int? minLines;\n\n  /// {@macro flutter.widgets.editableText.expands}\n  final bool expands;\n\n  /// {@macro flutter.widgets.editableText.readOnly}\n  final bool readOnly;\n\n  /// Configuration of toolbar options.\n  ///\n  /// If not set, 'select all' and 'paste' default to enabled.\n  /// 'Copy' and 'cut' will be disabled if [obscureText] is true.\n  /// If [readOnly] is true, 'paste' and 'cut' will be disabled regardless.\n\n  /// {@macro flutter.widgets.editableText.showCursor}\n  final bool? showCursor;\n\n  /// The maximum number of characters (unicode grapheme clusters) to allow in the text field.\n  ///\n  /// If set, a character counter will be displayed below the\n  /// field showing how many characters have been entered. If set to a number\n  /// greater than 0, it will also display the maximum number allowed. If set\n  /// to [MoonTextInput.noMaxLength] then only the current character count is displayed.\n  ///\n  /// After [maxLength] characters have been input, additional input\n  /// is ignored, unless [maxLengthEnforcement] is set to [MaxLengthEnforcement.none].\n  ///\n  /// The text field enforces the length with a [LengthLimitingTextInputFormatter],\n  /// which is evaluated after the supplied [inputFormatters], if any.\n  ///\n  /// This value must be either null, [MoonTextInput.noMaxLength], or greater than 0.\n  /// If null (the default) then there is no limit to the number of characters\n  /// that can be entered. If set to [MoonTextInput.noMaxLength], then no limit will\n  /// be enforced, but the number of characters entered will still be displayed.\n  ///\n  /// Whitespace characters (e.g. newline, space, tab) are included in the character count.\n  ///\n  /// If [maxLengthEnforcement] is [MaxLengthEnforcement.none], then more than\n  /// [maxLength] characters may be entered, but the error counter and divider\n  /// will switch to the [decoration]'s [InputDecoration.errorStyle] when the limit is exceeded.\n  ///\n  /// {@macro flutter.services.lengthLimitingTextInputFormatter.maxLength}\n  final int? maxLength;\n\n  /// Determines how the [maxLength] limit should be enforced.\n  ///\n  /// {@macro flutter.services.textFormatter.effectiveMaxLengthEnforcement}\n  ///\n  /// {@macro flutter.services.textFormatter.maxLengthEnforcement}\n  final MaxLengthEnforcement? maxLengthEnforcement;\n\n  /// {@macro flutter.widgets.editableText.onChanged}\n  ///\n  /// See also:\n  ///\n  ///  * [inputFormatters], which are called before [onChanged]\n  ///    runs and can validate and change (\"format\") the input value.\n  ///  * [onEditingComplete], [onSubmitted]:\n  ///    which are more specialized input change notifications.\n  final ValueChanged<String>? onChanged;\n\n  /// {@macro flutter.widgets.editableText.onEditingComplete}\n  final VoidCallback? onEditingComplete;\n\n  /// {@macro flutter.widgets.editableText.onSubmitted}\n  ///\n  /// See also:\n  ///\n  ///  * [TextInputAction.next] and [TextInputAction.previous], which\n  ///    automatically shift the focus to the next/previous focusable item when\n  ///    the user is done editing.\n  final ValueChanged<String>? onSubmitted;\n\n  /// {@macro flutter.widgets.editableText.onAppPrivateCommand}\n  final AppPrivateCommandCallback? onAppPrivateCommand;\n\n  /// {@macro flutter.widgets.editableText.inputFormatters}\n  final List<TextInputFormatter>? inputFormatters;\n\n  /// If false the text field is \"disabled\": it ignores taps and its\n  /// [decoration] is rendered in grey.\n  ///\n  /// If non-null this property overrides the [decoration]'s\n  /// [InputDecoration.enabled] property.\n  final bool enabled;\n\n  /// {@macro flutter.widgets.editableText.cursorWidth}\n  final double cursorWidth;\n\n  /// {@macro flutter.widgets.editableText.cursorHeight}\n  final double? cursorHeight;\n\n  /// {@macro flutter.widgets.editableText.cursorRadius}\n  final Radius? cursorRadius;\n\n  /// {@macro flutter.widgets.editableText.cursorOpacityAnimates}\n  final bool? cursorOpacityAnimates;\n\n  /// The color of the cursor.\n  ///\n  /// The cursor indicates the current location of text insertion point in\n  /// the field.\n  final Color? cursorColor;\n\n  /// The color of the cursor when the [MoonTextInput] is showing an error.\n  final Color? cursorErrorColor;\n\n  /// Controls how tall the selection highlight boxes are computed to be.\n  ///\n  /// See [ui.BoxHeightStyle] for details on available styles.\n  final ui.BoxHeightStyle selectionHeightStyle;\n\n  /// Controls how wide the selection highlight boxes are computed to be.\n  ///\n  /// See [ui.BoxWidthStyle] for details on available styles.\n  final ui.BoxWidthStyle selectionWidthStyle;\n\n  /// The appearance of the keyboard.\n  ///\n  /// This setting is only honored on iOS devices.\n  ///\n  /// If unset, defaults to [ThemeData.brightness].\n  final Brightness? keyboardAppearance;\n\n  /// {@macro flutter.widgets.editableText.scrollPadding}\n  final EdgeInsets scrollPadding;\n\n  /// {@macro flutter.widgets.editableText.enableInteractiveSelection}\n  final bool enableInteractiveSelection;\n\n  /// {@macro flutter.widgets.editableText.selectionControls}\n  final TextSelectionControls? selectionControls;\n\n  /// {@macro flutter.widgets.scrollable.dragStartBehavior}\n  final DragStartBehavior dragStartBehavior;\n\n  /// {@template flutter.material.textfield.onTap}\n  /// Called for the first tap in a series of taps.\n  ///\n  /// The text field builds a [GestureDetector] to handle input events like tap,\n  /// to trigger focus requests, to move the caret, adjust the selection, etc.\n  /// Handling some of those events by wrapping the text field with a competing\n  /// GestureDetector is problematic.\n  ///\n  /// To unconditionally handle taps, without interfering with the text field's\n  /// internal gesture detector, provide this callback.\n  ///\n  /// If the text field is created with [enabled] false, taps will not be\n  /// recognized.\n  ///\n  /// To be notified when the text field gains or loses the focus, provide a\n  /// [focusNode] and add a listener to that.\n  ///\n  /// To listen to arbitrary pointer events without competing with the\n  /// text field's internal gesture detector, use a [Listener].\n  /// {@endtemplate}\n  ///\n  /// If [onTapAlwaysCalled] is enabled, this will also be called for consecutive\n  /// taps.\n  final GestureTapCallback? onTap;\n\n  /// Whether [onTap] should be called for every tap.\n  ///\n  /// Defaults to false, so [onTap] is only called for each distinct tap. When\n  /// enabled, [onTap] is called for every tap including consecutive taps.\n  final bool onTapAlwaysCalled;\n\n  /// {@macro flutter.widgets.editableText.onTapOutside}\n  ///\n  /// {@tool dartpad}\n  /// This example shows how to use a 'TextFieldTapRegion' to wrap a set of\n  /// \"spinner\" buttons that increment and decrement a value in the [MoonTextInput]\n  /// without causing the text field to lose keyboard focus.\n  ///\n  /// This example includes a generic 'SpinnerField<T>' class that you can copy\n  /// into your own project and customize.\n  ///\n  /// ** See code in examples/api/lib/widgets/tap_region/text_field_tap_region.0.dart **\n  /// {@end-tool}\n  ///\n  /// See also:\n  ///\n  ///  * [TapRegion] for how the region group is determined.\n  final TapRegionCallback? onTapOutside;\n\n  /// The cursor for a mouse pointer when it enters or is hovering over the\n  /// widget.\n  final MouseCursor? mouseCursor;\n\n  /// {@macro flutter.widgets.editableText.scrollPhysics}\n  final ScrollPhysics? scrollPhysics;\n\n  /// {@macro flutter.widgets.editableText.scrollController}\n  final ScrollController? scrollController;\n\n  /// {@macro flutter.widgets.editableText.autofillHints}\n  /// {@macro flutter.services.AutofillConfiguration.autofillHints}\n  final Iterable<String>? autofillHints;\n\n  /// {@macro flutter.material.Material.clipBehavior}\n  ///\n  /// Defaults to [Clip.hardEdge].\n  final Clip clipBehavior;\n\n  /// {@template flutter.material.textfield.restorationId}\n  /// Restoration ID to save and restore the state of the text field.\n  ///\n  /// If non-null, the text field will persist and restore its current scroll\n  /// offset and - if no [controller] has been provided - the content of the\n  /// text field. If a [controller] has been provided, it is the responsibility\n  /// of the owner of that controller to persist and restore it, e.g. by using\n  /// a [RestorableTextEditingController].\n  ///\n  /// The state of this widget is persisted in a [RestorationBucket] claimed\n  /// from the surrounding [RestorationScope] using the provided restoration ID.\n  ///\n  /// See also:\n  ///\n  ///  * [RestorationManager], which explains how state restoration works in\n  ///    Flutter.\n  /// {@endtemplate}\n  final String? restorationId;\n\n  /// {@macro flutter.widgets.editableText.scribbleEnabled}\n  final bool scribbleEnabled;\n\n  /// {@macro flutter.services.TextInputConfiguration.enableIMEPersonalizedLearning}\n  final bool enableIMEPersonalizedLearning;\n\n  /// {@macro flutter.widgets.editableText.contentInsertionConfiguration}\n  final ContentInsertionConfiguration? contentInsertionConfiguration;\n\n  /// {@macro flutter.widgets.EditableText.contextMenuBuilder}\n  ///\n  /// If not provided, will build a default menu based on the platform.\n  ///\n  /// See also:\n  ///\n  ///  * [AdaptiveTextSelectionToolbar], which is built by default.\n  final EditableTextContextMenuBuilder? contextMenuBuilder;\n\n  /// Determines whether this text field can request the primary focus.\n  ///\n  /// Defaults to true. If false, the text field will not request focus\n  /// when tapped, or when its context menu is displayed. If false it will not\n  /// be possible to move the focus to the text field with tab key.\n  final bool canRequestFocus;\n\n  /// {@macro flutter.widgets.undoHistory.controller}\n  final UndoHistoryController? undoController;\n\n  /// {@macro flutter.widgets.EditableText.spellCheckConfiguration}\n  ///\n  /// If [SpellCheckConfiguration.misspelledTextStyle] is not specified in this\n  /// configuration, then [materialMisspelledTextStyle] is used by default.\n  final SpellCheckConfiguration? spellCheckConfiguration;\n\n  /// Creates a Moon Design text input.\n  ///\n  /// The [maxLines] property can be set to null to remove the restriction on\n  /// the number of lines. By default, it is one, meaning this is a single-line\n  /// text field. [maxLines] must not be zero.\n  ///\n  /// The [maxLength] property is set to null by default, which means the\n  /// number of characters allowed in the text field is not restricted. If\n  /// [maxLength] is set a character counter will be displayed below the\n  /// field showing how many characters have been entered. If the value is\n  /// set to a positive integer it will also display the maximum allowed\n  /// number of characters to be entered. If the value is set to\n  /// [MoonTextInput.noMaxLength] then only the current length is displayed.\n  ///\n  /// After [maxLength] characters have been input, additional input\n  /// is ignored, unless [maxLengthEnforcement] is set to\n  /// [MaxLengthEnforcement.none].\n  /// The text field enforces the length with a [LengthLimitingTextInputFormatter],\n  /// which is evaluated after the supplied [inputFormatters], if any.\n  /// The [maxLength] value must be either null or greater than zero.\n  ///\n  /// If [maxLengthEnforcement] is set to [MaxLengthEnforcement.none], then more\n  /// than [maxLength] characters may be entered, and the error counter and\n  /// divider will switch to the [decoration].errorStyle when the limit is\n  /// exceeded.\n  ///\n  /// The text cursor is not shown if [showCursor] is false or if [showCursor]\n  /// is null (the default) and [readOnly] is true.\n  ///\n  /// The [selectionHeightStyle] and [selectionWidthStyle] properties allow\n  /// changing the shape of the selection highlighting. These properties default\n  /// to [ui.BoxHeightStyle.tight] and [ui.BoxWidthStyle.tight] respectively and\n  /// must not be null.\n  ///\n  /// The [textAlign], [autofocus], [obscureText], [readOnly], [autocorrect],\n  /// [scrollPadding], [maxLines], [maxLength], [selectionHeightStyle],\n  /// [selectionWidthStyle], [enableSuggestions], and\n  /// [enableIMEPersonalizedLearning] arguments must not be null.\n  ///\n  /// See also:\n  ///\n  ///  * [maxLength], which discusses the precise meaning of \"number of\n  ///    characters\" and how it may differ from the intuitive meaning.\n  const MoonTextInput({\n    // Moon Design System properties.\n    this.hasFloatingLabel = false,\n    this.borderRadius,\n    this.backgroundColor,\n    this.activeBorderColor,\n    this.errorBorderColor,\n    this.inactiveBorderColor,\n    this.errorColor,\n    this.hoverBorderColor,\n    this.textColor,\n    this.hintTextColor,\n    this.decoration,\n    this.gap,\n    this.height,\n    this.width,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.padding,\n    this.helperPadding,\n    this.textInputSize,\n    this.errorText,\n    this.hintText,\n    this.initialValue,\n    this.helperTextStyle,\n    this.errorBuilder,\n    this.leading,\n    this.trailing,\n    this.helper,\n\n    // Flutter properties.\n    super.key,\n    this.controller,\n    this.focusNode,\n    this.undoController,\n    TextInputType? keyboardType,\n    this.textInputAction,\n    this.textCapitalization = TextCapitalization.none,\n    this.style,\n    this.strutStyle,\n    this.textAlign = TextAlign.start,\n    this.textAlignVertical,\n    this.textDirection,\n    this.readOnly = false,\n    this.showCursor,\n    this.autofocus = false,\n    this.obscuringCharacter = '•',\n    this.obscureText = false,\n    this.autocorrect = true,\n    SmartDashesType? smartDashesType,\n    SmartQuotesType? smartQuotesType,\n    this.enableSuggestions = true,\n    this.maxLines = 1,\n    this.minLines,\n    this.expands = false,\n    this.maxLength,\n    this.maxLengthEnforcement,\n    this.onChanged,\n    this.onEditingComplete,\n    this.onSubmitted,\n    this.onAppPrivateCommand,\n    this.inputFormatters,\n    this.enabled = true,\n    this.cursorWidth = 2.0,\n    this.cursorHeight,\n    this.cursorRadius,\n    this.cursorOpacityAnimates,\n    this.cursorColor,\n    this.cursorErrorColor,\n    this.selectionHeightStyle = ui.BoxHeightStyle.tight,\n    this.selectionWidthStyle = ui.BoxWidthStyle.tight,\n    this.keyboardAppearance,\n    this.scrollPadding = const EdgeInsets.all(20.0),\n    this.dragStartBehavior = DragStartBehavior.start,\n    bool? enableInteractiveSelection,\n    this.selectionControls,\n    this.onTap,\n    this.onTapAlwaysCalled = false,\n    this.onTapOutside,\n    this.mouseCursor,\n    this.scrollController,\n    this.scrollPhysics,\n    this.autofillHints = const <String>[],\n    this.contentInsertionConfiguration,\n    this.clipBehavior = Clip.hardEdge,\n    this.restorationId,\n    this.scribbleEnabled = true,\n    this.enableIMEPersonalizedLearning = true,\n    this.contextMenuBuilder = _defaultContextMenuBuilder,\n    this.canRequestFocus = true,\n    this.spellCheckConfiguration,\n    this.magnifierConfiguration,\n  })  : assert(obscuringCharacter.length == 1),\n        assert(maxLines == null || maxLines > 0),\n        assert(minLines == null || minLines > 0),\n        assert(\n          (maxLines == null) || (minLines == null) || (maxLines >= minLines),\n          \"MinLines can't be greater than maxLines.\",\n        ),\n        assert(\n          !expands || !hasFloatingLabel,\n          'Text input cannot both expand and have a floating label.',\n        ),\n        assert(\n          !expands || (maxLines == null && minLines == null),\n          'MinLines and maxLines must be null when expands is true.',\n        ),\n        assert(\n          !obscureText || maxLines == 1,\n          'Obscured fields cannot be multiline.',\n        ),\n        assert(\n          maxLength == null ||\n              maxLength == MoonTextInput.noMaxLength ||\n              maxLength > 0,\n        ),\n        // Assert the following to prevent unexpected changes in the user's set value.\n        assert(\n          !identical(textInputAction, TextInputAction.newline) ||\n              maxLines == 1 ||\n              !identical(keyboardType, TextInputType.text),\n          'Use keyboardType TextInputType.multiline when using TextInputAction.newline on a multiline MoonTextInput.',\n        ),\n        smartDashesType = smartDashesType ??\n            (obscureText ? SmartDashesType.disabled : SmartDashesType.enabled),\n        smartQuotesType = smartQuotesType ??\n            (obscureText ? SmartQuotesType.disabled : SmartQuotesType.enabled),\n        keyboardType = keyboardType ??\n            (maxLines == 1 ? TextInputType.text : TextInputType.multiline),\n        enableInteractiveSelection =\n            enableInteractiveSelection ?? (!readOnly || !obscureText);\n\n  /// {@macro flutter.widgets.editableText.selectionEnabled}\n  bool get selectionEnabled => enableInteractiveSelection;\n\n  @override\n  State<MoonTextInput> createState() => _MoonTextInputState();\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties.add(\n      DiagnosticsProperty<TextEditingController>(\n        'controller',\n        controller,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<FocusNode>(\n        'focusNode',\n        focusNode,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<UndoHistoryController>(\n        'undoController',\n        undoController,\n        defaultValue: null,\n      ),\n    );\n    properties\n        .add(DiagnosticsProperty<bool>('enabled', enabled, defaultValue: null));\n    properties.add(\n      DiagnosticsProperty<TextInputType>(\n        'keyboardType',\n        keyboardType,\n        defaultValue: TextInputType.text,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<TextStyle>('style', style, defaultValue: null),\n    );\n    properties.add(\n      DiagnosticsProperty<bool>('autofocus', autofocus, defaultValue: false),\n    );\n    properties.add(\n      DiagnosticsProperty<String>(\n        'obscuringCharacter',\n        obscuringCharacter,\n        defaultValue: '•',\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<bool>(\n        'obscureText',\n        obscureText,\n        defaultValue: false,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<bool>(\n        'autocorrect',\n        autocorrect,\n        defaultValue: true,\n      ),\n    );\n    properties.add(\n      EnumProperty<SmartDashesType>(\n        'smartDashesType',\n        smartDashesType,\n        defaultValue:\n            obscureText ? SmartDashesType.disabled : SmartDashesType.enabled,\n      ),\n    );\n    properties.add(\n      EnumProperty<SmartQuotesType>(\n        'smartQuotesType',\n        smartQuotesType,\n        defaultValue:\n            obscureText ? SmartQuotesType.disabled : SmartQuotesType.enabled,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<bool>(\n        'enableSuggestions',\n        enableSuggestions,\n        defaultValue: true,\n      ),\n    );\n    properties.add(IntProperty('maxLines', maxLines, defaultValue: 1));\n    properties.add(IntProperty('minLines', minLines, defaultValue: null));\n    properties.add(\n      DiagnosticsProperty<bool>('expands', expands, defaultValue: false),\n    );\n    properties.add(IntProperty('maxLength', maxLength, defaultValue: null));\n    properties.add(\n      EnumProperty<MaxLengthEnforcement>(\n        'maxLengthEnforcement',\n        maxLengthEnforcement,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      EnumProperty<TextInputAction>(\n        'textInputAction',\n        textInputAction,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      EnumProperty<TextCapitalization>(\n        'textCapitalization',\n        textCapitalization,\n        defaultValue: TextCapitalization.none,\n      ),\n    );\n    properties.add(\n      EnumProperty<TextAlign>(\n        'textAlign',\n        textAlign,\n        defaultValue: TextAlign.start,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<TextAlignVertical>(\n        'textAlignVertical',\n        textAlignVertical,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      EnumProperty<TextDirection>(\n        'textDirection',\n        textDirection,\n        defaultValue: null,\n      ),\n    );\n    properties\n        .add(DoubleProperty('cursorWidth', cursorWidth, defaultValue: 2.0));\n    properties\n        .add(DoubleProperty('cursorHeight', cursorHeight, defaultValue: null));\n    properties.add(\n      DiagnosticsProperty<Radius>(\n        'cursorRadius',\n        cursorRadius,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<bool>(\n        'cursorOpacityAnimates',\n        cursorOpacityAnimates,\n        defaultValue: null,\n      ),\n    );\n    properties\n        .add(ColorProperty('cursorColor', cursorColor, defaultValue: null));\n    properties.add(\n      ColorProperty(\n        'cursorErrorColor',\n        cursorErrorColor,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<Brightness>(\n        'keyboardAppearance',\n        keyboardAppearance,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<EdgeInsetsGeometry>(\n        'scrollPadding',\n        scrollPadding,\n        defaultValue: const EdgeInsets.all(20.0),\n      ),\n    );\n    properties.add(\n      FlagProperty(\n        'selectionEnabled',\n        value: selectionEnabled,\n        defaultValue: true,\n        ifFalse: 'selection disabled',\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<TextSelectionControls>(\n        'selectionControls',\n        selectionControls,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<ScrollController>(\n        'scrollController',\n        scrollController,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<ScrollPhysics>(\n        'scrollPhysics',\n        scrollPhysics,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<Clip>(\n        'clipBehavior',\n        clipBehavior,\n        defaultValue: Clip.hardEdge,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<bool>(\n        'scribbleEnabled',\n        scribbleEnabled,\n        defaultValue: true,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<bool>(\n        'enableIMEPersonalizedLearning',\n        enableIMEPersonalizedLearning,\n        defaultValue: true,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<SpellCheckConfiguration>(\n        'spellCheckConfiguration',\n        spellCheckConfiguration,\n        defaultValue: null,\n      ),\n    );\n    properties.add(\n      DiagnosticsProperty<List<String>>(\n        'contentCommitMimeTypes',\n        contentInsertionConfiguration?.allowedMimeTypes ?? const <String>[],\n        defaultValue: contentInsertionConfiguration == null\n            ? const <String>[]\n            : kDefaultContentInsertionMimeTypes,\n      ),\n    );\n  }\n}\n\nclass _MoonTextInputState extends State<MoonTextInput>\n    with RestorationMixin\n    implements TextSelectionGestureDetectorBuilderDelegate, AutofillClient {\n  @override\n  final GlobalKey<EditableTextState> editableTextKey =\n      GlobalKey<EditableTextState>();\n\n  @override\n  late bool forcePressEnabled;\n\n  late _MoonTextInputSelectionGestureDetectorBuilder\n      _selectionGestureDetectorBuilder;\n\n  RestorableTextEditingController? _controller;\n  FocusNode? _focusNode;\n  bool _isHovering = false;\n  bool _showSelectionHandles = false;\n\n  bool get _isEnabled => widget.enabled;\n\n  bool get _hasError => _hasIntrinsicError || widget.errorText != null;\n\n  bool get _hasFocus => _effectiveFocusNode.hasFocus;\n\n  int get _currentLength => _effectiveController.value.text.characters.length;\n\n  EditableTextState? get _editableText => editableTextKey.currentState;\n\n  FocusNode get _effectiveFocusNode =>\n      widget.focusNode ?? (_focusNode ??= FocusNode());\n\n  TextEditingController get _effectiveController =>\n      widget.controller ?? _controller!.value;\n\n  bool get _canRequestFocus {\n    final NavigationMode mode =\n        MediaQuery.maybeNavigationModeOf(context) ?? NavigationMode.traditional;\n    switch (mode) {\n      case NavigationMode.traditional:\n        return widget.canRequestFocus && _isEnabled;\n      case NavigationMode.directional:\n        return true;\n    }\n  }\n\n  bool get _hasIntrinsicError =>\n      widget.maxLength != null &&\n      widget.maxLength! > 0 &&\n      (widget.controller == null\n          ? !restorePending &&\n              _effectiveController.value.text.characters.length >\n                  widget.maxLength!\n          : _effectiveController.value.text.characters.length >\n              widget.maxLength!);\n\n  MaxLengthEnforcement get _effectiveMaxLengthEnforcement =>\n      widget.maxLengthEnforcement ??\n      LengthLimitingTextInputFormatter.getDefaultMaxLengthEnforcement(\n        Theme.of(context).platform,\n      );\n\n  Set<MaterialState> get _materialState {\n    return <MaterialState>{\n      if (!_isEnabled) MaterialState.disabled,\n      if (_isHovering) MaterialState.hovered,\n      if (_hasFocus) MaterialState.focused,\n      if (_hasError) MaterialState.error,\n    };\n  }\n\n  @override\n  String? get restorationId => widget.restorationId;\n\n  @override\n  String get autofillId => _editableText!.autofillId;\n\n  @override\n  bool get selectionEnabled => widget.selectionEnabled;\n\n  @override\n  TextInputConfiguration get textInputConfiguration {\n    final List<String>? autofillHints =\n        widget.autofillHints?.toList(growable: false);\n    final AutofillConfiguration autofillConfiguration = autofillHints != null\n        ? AutofillConfiguration(\n            uniqueIdentifier: autofillId,\n            autofillHints: autofillHints,\n            currentEditingValue: _effectiveController.value,\n          )\n        : AutofillConfiguration.disabled;\n\n    return _editableText!.textInputConfiguration\n        .copyWith(autofillConfiguration: autofillConfiguration);\n  }\n\n  void _createLocalController([TextEditingValue? value]) {\n    assert(_controller == null);\n\n    _controller = value == null\n        ? RestorableTextEditingController()\n        : RestorableTextEditingController.fromValue(value);\n\n    if (!restorePending) _registerController();\n  }\n\n  void _handleFocusChanged() {\n    setState(() {\n      // Rebuilds the widget on focus change to toggle text selection highlight.\n    });\n  }\n\n  void _handleSelectionChanged(\n    TextSelection selection,\n    SelectionChangedCause? cause,\n  ) {\n    final bool willShowSelectionHandles = _shouldShowSelectionHandles(cause);\n\n    if (willShowSelectionHandles != _showSelectionHandles) {\n      setState(() => _showSelectionHandles = willShowSelectionHandles);\n    }\n\n    switch (Theme.of(context).platform) {\n      case TargetPlatform.iOS:\n      case TargetPlatform.macOS:\n      case TargetPlatform.linux:\n      case TargetPlatform.windows:\n      case TargetPlatform.fuchsia:\n      case TargetPlatform.android:\n        if (cause == SelectionChangedCause.longPress) {\n          _editableText?.bringIntoView(selection.extent);\n        }\n    }\n\n    switch (Theme.of(context).platform) {\n      case TargetPlatform.iOS:\n      case TargetPlatform.fuchsia:\n      case TargetPlatform.android:\n        break;\n      case TargetPlatform.macOS:\n      case TargetPlatform.linux:\n      case TargetPlatform.windows:\n        if (cause == SelectionChangedCause.drag) _editableText?.hideToolbar();\n    }\n  }\n\n  void _handleHover(bool hovering) {\n    if (_isEnabled && hovering != _isHovering) {\n      setState(() => _isHovering = hovering);\n    }\n  }\n\n  /// Toggle the toolbar when a selection handle is tapped.\n  void _handleSelectionHandleTapped() {\n    if (_effectiveController.selection.isCollapsed) {\n      _editableText!.toggleToolbar();\n    }\n  }\n\n  void _registerController() {\n    assert(_controller != null);\n\n    registerForRestoration(_controller!, 'controller');\n  }\n\n  void _requestKeyboard() => _editableText?.requestKeyboard();\n\n  bool _shouldShowSelectionHandles(SelectionChangedCause? cause) {\n    // Handles are not shown when the text field is activated by events that don't trigger the selection overlay.\n    if (!_selectionGestureDetectorBuilder.shouldShowSelectionToolbar) {\n      return false;\n    }\n    if (cause == SelectionChangedCause.keyboard) return false;\n    if (widget.readOnly && _effectiveController.selection.isCollapsed) {\n      return false;\n    }\n    if (!_isEnabled) return false;\n    if (cause == SelectionChangedCause.longPress ||\n        cause == SelectionChangedCause.scribble) return true;\n    if (_effectiveController.text.isNotEmpty) return true;\n\n    return false;\n  }\n\n  MoonTextInputSizeProperties _getMoonTextInputSize(\n    BuildContext context,\n    MoonTextInputSize? moonTextInputSize,\n  ) {\n    switch (moonTextInputSize) {\n      case MoonTextInputSize.sm:\n        return context.moonTheme?.textInputTheme.sizes.sm ??\n            MoonTextInputSizes(tokens: MoonTokens.light).sm;\n      case MoonTextInputSize.md:\n        return context.moonTheme?.textInputTheme.sizes.md ??\n            MoonTextInputSizes(tokens: MoonTokens.light).md;\n      case MoonTextInputSize.lg:\n        return context.moonTheme?.textInputTheme.sizes.lg ??\n            MoonTextInputSizes(tokens: MoonTokens.light).lg;\n      case MoonTextInputSize.xl:\n        return context.moonTheme?.textInputTheme.sizes.xl ??\n            MoonTextInputSizes(tokens: MoonTokens.light).xl;\n      default:\n        return context.moonTheme?.textInputTheme.sizes.md ??\n            MoonTextInputSizes(tokens: MoonTokens.light).md;\n    }\n  }\n\n  @override\n  void autofill(TextEditingValue newEditingValue) =>\n      _editableText!.autofill(newEditingValue);\n\n  @override\n  void initState() {\n    super.initState();\n\n    _selectionGestureDetectorBuilder =\n        _MoonTextInputSelectionGestureDetectorBuilder(state: this);\n\n    if (widget.controller == null) _createLocalController();\n\n    _effectiveFocusNode.canRequestFocus = widget.canRequestFocus && _isEnabled;\n    _effectiveFocusNode.addListener(_handleFocusChanged);\n  }\n\n  @override\n  void didChangeDependencies() {\n    super.didChangeDependencies();\n\n    _effectiveFocusNode.canRequestFocus = _canRequestFocus;\n  }\n\n  @override\n  void didUpdateWidget(MoonTextInput oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (widget.controller == null && oldWidget.controller != null) {\n      _createLocalController(oldWidget.controller!.value);\n    } else if (widget.controller != null && oldWidget.controller == null) {\n      unregisterFromRestoration(_controller!);\n      _controller!.dispose();\n      _controller = null;\n    }\n\n    if (widget.focusNode != oldWidget.focusNode) {\n      (oldWidget.focusNode ?? _focusNode)?.removeListener(_handleFocusChanged);\n      (widget.focusNode ?? _focusNode)?.addListener(_handleFocusChanged);\n    }\n\n    _effectiveFocusNode.canRequestFocus = _canRequestFocus;\n\n    if (_hasFocus && widget.readOnly != oldWidget.readOnly && _isEnabled) {\n      if (_effectiveController.selection.isCollapsed) {\n        _showSelectionHandles = !widget.readOnly;\n      }\n    }\n  }\n\n  @override\n  void restoreState(RestorationBucket? oldBucket, bool initialRestore) {\n    if (_controller != null) _registerController();\n  }\n\n  @override\n  void dispose() {\n    _effectiveFocusNode.removeListener(_handleFocusChanged);\n    _focusNode?.dispose();\n    _controller?.dispose();\n\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    assert(debugCheckHasMaterial(context));\n    assert(debugCheckHasMaterialLocalizations(context));\n    assert(debugCheckHasDirectionality(context));\n    assert(\n      !(widget.style != null &&\n          widget.style!.inherit == false &&\n          (widget.style!.fontSize == null ||\n              widget.style!.textBaseline == null)),\n      'Inherit false style must supply fontSize and textBaseline.',\n    );\n\n    final ThemeData theme = Theme.of(context);\n    final DefaultSelectionStyle selectionStyle =\n        DefaultSelectionStyle.of(context);\n    final Brightness keyboardAppearance =\n        widget.keyboardAppearance ?? theme.brightness;\n    final TextEditingController controller = _effectiveController;\n    final FocusNode focusNode = _effectiveFocusNode;\n\n    final MoonTextInputSizeProperties effectiveMoonTextInputSize =\n        _getMoonTextInputSize(context, widget.textInputSize);\n\n    final BorderRadiusGeometry effectiveBorderRadius =\n        widget.borderRadius ?? effectiveMoonTextInputSize.borderRadius;\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.textInputTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveActiveBorderColor = widget.activeBorderColor ??\n        context.moonTheme?.textInputTheme.colors.activeBorderColor ??\n        MoonColors.light.piccolo;\n\n    final Color effectiveInactiveBorderColor = widget.inactiveBorderColor ??\n        context.moonTheme?.textInputTheme.colors.inactiveBorderColor ??\n        MoonColors.light.beerus;\n\n    final Color effectiveErrorColor = widget.errorColor ??\n        context.moonTheme?.textInputTheme.colors.errorColor ??\n        MoonColors.light.chichi;\n\n    final Color effectiveCursorErrorColor = widget.cursorErrorColor ??\n        context.moonTheme?.textInputTheme.colors.errorColor ??\n        MoonColors.light.chichi;\n\n    final Color effectiveHoverBorderColor = widget.hoverBorderColor ??\n        context.moonTheme?.textInputTheme.colors.hoverBorderColor ??\n        MoonColors.light.beerus;\n\n    final Color effectiveTextColor = widget.textColor ??\n        context.moonTheme?.textInputTheme.colors.textColor ??\n        MoonColors.light.textPrimary;\n\n    final Color effectiveHintTextColor = widget.hintTextColor ??\n        context.moonTheme?.textInputTheme.colors.helperTextColor ??\n        MoonColors.light.trunks;\n\n    final double effectiveGap = widget.gap ?? effectiveMoonTextInputSize.gap;\n\n    final double effectiveHeight =\n        widget.height ?? effectiveMoonTextInputSize.height;\n\n    final double effectiveDisabledOpacityValue =\n        context.moonOpacities?.disabled ?? MoonOpacities.opacities.disabled;\n\n    final Duration effectiveTransitionDuration = widget.transitionDuration ??\n        context.moonTheme?.textInputTheme.properties.transitionDuration ??\n        const Duration(milliseconds: 167);\n\n    final Curve effectiveTransitionCurve = widget.transitionCurve ??\n        context.moonTheme?.textInputTheme.properties.transitionCurve ??\n        Curves.fastOutSlowIn;\n\n    final EdgeInsetsGeometry effectivePadding =\n        widget.padding ?? effectiveMoonTextInputSize.padding;\n\n    final EdgeInsets resolvedContentPadding =\n        effectivePadding.resolve(Directionality.of(context));\n\n    final EdgeInsetsGeometry effectiveHelperPadding = widget.helperPadding ??\n        context.moonTheme?.textInputTheme.properties.helperPadding ??\n        EdgeInsets.only(\n          left: MoonSizes.sizes.x3s,\n          top: MoonSizes.sizes.x4s,\n          right: MoonSizes.sizes.x3s,\n        );\n\n    final TextStyle effectiveTextStyle =\n        widget.style ?? effectiveMoonTextInputSize.textStyle;\n\n    final TextStyle effectiveHelperTextStyle = widget.helperTextStyle ??\n        context.moonTheme?.textInputTheme.properties.helperTextStyle ??\n        MoonTypography.typography.body.text12;\n\n    final MoonSquircleBorder defaultBorder = MoonSquircleBorder(\n      borderRadius: effectiveBorderRadius.squircleBorderRadius(context),\n      side: BorderSide(\n        color: effectiveInactiveBorderColor,\n        width: MoonBorders.borders.defaultBorderWidth,\n      ),\n    );\n\n    final MoonSquircleBorder hoverBorder = MoonSquircleBorder(\n      borderRadius: effectiveBorderRadius.squircleBorderRadius(context),\n      side: BorderSide(\n        color: effectiveHoverBorderColor,\n        width: MoonBorders.borders.activeBorderWidth,\n      ),\n    );\n\n    final MoonSquircleBorder focusBorder = MoonSquircleBorder(\n      borderRadius: effectiveBorderRadius.squircleBorderRadius(context),\n      side: BorderSide(\n        color: effectiveActiveBorderColor,\n        width: MoonBorders.borders.activeBorderWidth,\n      ),\n    );\n\n    final MoonSquircleBorder errorBorder = MoonSquircleBorder(\n      borderRadius: effectiveBorderRadius.squircleBorderRadius(context),\n      side: BorderSide(\n        color: widget.errorBorderColor ?? effectiveErrorColor,\n        width: MoonBorders.borders.activeBorderWidth,\n      ),\n    );\n\n    final MoonSquircleBorder resolvedBorder = _hasError\n        ? errorBorder\n        : _hasFocus\n            ? focusBorder\n            : _isHovering\n                ? hoverBorder\n                : defaultBorder;\n\n    final bool paintCursorAboveText;\n    final Color cursorColor;\n    final Color selectionColor;\n\n    bool? cursorOpacityAnimates = widget.cursorOpacityAnimates;\n    Color? autocorrectionTextRectColor;\n    Offset? cursorOffset;\n    Radius? cursorRadius = widget.cursorRadius;\n    VoidCallback? handleDidGainAccessibilityFocus;\n    TextSelectionControls? textSelectionControls = widget.selectionControls;\n\n    final MouseCursor effectiveMouseCursor =\n        MaterialStateProperty.resolveAs<MouseCursor>(\n      widget.mouseCursor ?? MaterialStateMouseCursor.textable,\n      _materialState,\n    );\n\n    final List<TextInputFormatter> formatters = <TextInputFormatter>[\n      ...?widget.inputFormatters,\n      if (widget.maxLength != null)\n        LengthLimitingTextInputFormatter(\n          widget.maxLength,\n          maxLengthEnforcement: _effectiveMaxLengthEnforcement,\n        ),\n    ];\n\n    // Sets configuration as disabled if not specified; otherwise, ensures the correct style\n    // for misspelled words on the current platform, unless a custom style is provided.\n    final SpellCheckConfiguration spellCheckConfiguration;\n    switch (defaultTargetPlatform) {\n      case TargetPlatform.iOS:\n      case TargetPlatform.macOS:\n        spellCheckConfiguration =\n            CupertinoTextField.inferIOSSpellCheckConfiguration(\n          widget.spellCheckConfiguration,\n        );\n      case TargetPlatform.android:\n      case TargetPlatform.fuchsia:\n      case TargetPlatform.linux:\n      case TargetPlatform.windows:\n        spellCheckConfiguration = TextField.inferAndroidSpellCheckConfiguration(\n          widget.spellCheckConfiguration,\n        );\n    }\n\n    final int? semanticsMaxValueLength;\n    if (_effectiveMaxLengthEnforcement != MaxLengthEnforcement.none &&\n        widget.maxLength != null &&\n        widget.maxLength! > 0) {\n      semanticsMaxValueLength = widget.maxLength;\n    } else {\n      semanticsMaxValueLength = null;\n    }\n\n    switch (theme.platform) {\n      case TargetPlatform.iOS:\n        final CupertinoThemeData cupertinoTheme = CupertinoTheme.of(context);\n        forcePressEnabled = true;\n        textSelectionControls ??= cupertinoTextSelectionHandleControls;\n        paintCursorAboveText = true;\n        cursorOpacityAnimates ??= true;\n        cursorColor = _hasError\n            ? effectiveCursorErrorColor\n            : widget.cursorColor ?? effectiveTextColor;\n        selectionColor = selectionStyle.selectionColor ??\n            cupertinoTheme.primaryColor.withOpacity(0.40);\n        cursorRadius ??= const Radius.circular(2.0);\n        cursorOffset = Offset(\n          iOSHorizontalOffset / MediaQuery.devicePixelRatioOf(context),\n          0,\n        );\n        autocorrectionTextRectColor = selectionColor;\n\n      case TargetPlatform.macOS:\n        final CupertinoThemeData cupertinoTheme = CupertinoTheme.of(context);\n        forcePressEnabled = false;\n        textSelectionControls ??= cupertinoDesktopTextSelectionHandleControls;\n        paintCursorAboveText = true;\n        cursorOpacityAnimates ??= false;\n        cursorColor = _hasError\n            ? effectiveCursorErrorColor\n            : widget.cursorColor ?? effectiveTextColor;\n        selectionColor = selectionStyle.selectionColor ??\n            cupertinoTheme.primaryColor.withOpacity(0.40);\n        cursorRadius ??= const Radius.circular(2.0);\n        cursorOffset = Offset(\n          iOSHorizontalOffset / MediaQuery.devicePixelRatioOf(context),\n          0,\n        );\n        handleDidGainAccessibilityFocus = () {\n          // Automatically activates MoonTextInput on receiving accessibility focus.\n          if (!_hasFocus && _effectiveFocusNode.canRequestFocus) {\n            _effectiveFocusNode.requestFocus();\n          }\n        };\n\n      case TargetPlatform.android:\n      case TargetPlatform.fuchsia:\n        forcePressEnabled = false;\n        textSelectionControls ??= materialTextSelectionHandleControls;\n        paintCursorAboveText = false;\n        cursorOpacityAnimates ??= false;\n        cursorColor = _hasError\n            ? effectiveCursorErrorColor\n            : widget.cursorColor ?? effectiveTextColor;\n        selectionColor = selectionStyle.selectionColor ??\n            theme.colorScheme.primary.withOpacity(0.40);\n\n      case TargetPlatform.linux:\n        forcePressEnabled = false;\n        textSelectionControls ??= desktopTextSelectionHandleControls;\n        paintCursorAboveText = false;\n        cursorOpacityAnimates ??= false;\n        cursorColor = _hasError\n            ? effectiveCursorErrorColor\n            : widget.cursorColor ?? effectiveTextColor;\n        selectionColor = selectionStyle.selectionColor ??\n            theme.colorScheme.primary.withOpacity(0.40);\n\n      case TargetPlatform.windows:\n        forcePressEnabled = false;\n        textSelectionControls ??= desktopTextSelectionHandleControls;\n        paintCursorAboveText = false;\n        cursorOpacityAnimates ??= false;\n        cursorColor = _hasError\n            ? effectiveCursorErrorColor\n            : widget.cursorColor ?? effectiveTextColor;\n        selectionColor = selectionStyle.selectionColor ??\n            theme.colorScheme.primary.withOpacity(0.40);\n        handleDidGainAccessibilityFocus = () {\n          // Automatically activates MoonTextInput on receiving accessibility focus.\n          if (!_hasFocus && _effectiveFocusNode.canRequestFocus) {\n            _effectiveFocusNode.requestFocus();\n          }\n        };\n    }\n\n    Widget child = RepaintBoundary(\n      child: UnmanagedRestorationScope(\n        bucket: bucket,\n        child: EditableText(\n          key: editableTextKey,\n          autocorrect: widget.autocorrect,\n          autocorrectionTextRectColor: autocorrectionTextRectColor,\n          autofillClient: this,\n          autofocus: widget.autofocus,\n          backgroundCursorColor: CupertinoColors.inactiveGray,\n          clipBehavior: widget.clipBehavior,\n          contentInsertionConfiguration: widget.contentInsertionConfiguration,\n          contextMenuBuilder: widget.contextMenuBuilder,\n          controller: controller,\n          cursorColor: cursorColor,\n          cursorHeight: widget.cursorHeight,\n          cursorOffset: cursorOffset,\n          cursorOpacityAnimates: cursorOpacityAnimates,\n          cursorRadius: cursorRadius,\n          cursorWidth: widget.cursorWidth,\n          dragStartBehavior: widget.dragStartBehavior,\n          enableIMEPersonalizedLearning: widget.enableIMEPersonalizedLearning,\n          enableInteractiveSelection: widget.enableInteractiveSelection,\n          enableSuggestions: widget.enableSuggestions,\n          expands: widget.expands,\n          focusNode: focusNode,\n          inputFormatters: formatters,\n          keyboardAppearance: keyboardAppearance,\n          keyboardType: widget.keyboardType,\n          magnifierConfiguration: widget.magnifierConfiguration ??\n              TextMagnifier.adaptiveMagnifierConfiguration,\n          maxLines: widget.maxLines,\n          minLines: widget.minLines,\n          mouseCursor: MouseCursor.defer,\n          // MoonTextInput will handle the cursor.\n          obscureText: widget.obscureText,\n          obscuringCharacter: widget.obscuringCharacter,\n          onAppPrivateCommand: widget.onAppPrivateCommand,\n          onChanged: widget.onChanged,\n          onEditingComplete: widget.onEditingComplete,\n          onSelectionChanged: _handleSelectionChanged,\n          onSelectionHandleTapped: _handleSelectionHandleTapped,\n          onSubmitted: widget.onSubmitted,\n          onTapOutside: widget.onTapOutside,\n          paintCursorAboveText: paintCursorAboveText,\n          readOnly: widget.readOnly || !_isEnabled,\n          rendererIgnoresPointer: true,\n          restorationId: 'editable',\n          scribbleEnabled: widget.scribbleEnabled,\n          scrollController: widget.scrollController,\n          scrollPadding: widget.scrollPadding,\n          scrollPhysics: widget.scrollPhysics,\n          selectionColor: focusNode.hasFocus ? selectionColor : null,\n          selectionControls:\n              widget.selectionEnabled ? textSelectionControls : null,\n          selectionHeightStyle: widget.selectionHeightStyle,\n          selectionWidthStyle: widget.selectionWidthStyle,\n          showCursor: widget.showCursor,\n          showSelectionHandles: _showSelectionHandles,\n          smartDashesType: widget.smartDashesType,\n          smartQuotesType: widget.smartQuotesType,\n          spellCheckConfiguration: spellCheckConfiguration,\n          strutStyle: widget.strutStyle,\n          style: effectiveTextStyle.copyWith(color: effectiveTextColor),\n          textAlign: widget.textAlign,\n          textCapitalization: widget.textCapitalization,\n          textDirection: widget.textDirection,\n          textInputAction: widget.textInputAction,\n          undoController: widget.undoController,\n        ),\n      ),\n    );\n\n    child = AnimatedBuilder(\n      animation: Listenable.merge(<Listenable>[focusNode, controller]),\n      builder: (BuildContext context, Widget? child) {\n        return BorderContainer(\n          backgroundColor: effectiveBackgroundColor,\n          border: resolvedBorder,\n          decoration: widget.decoration,\n          expands: widget.expands,\n          width: widget.width,\n          height: effectiveHeight,\n          duration: effectiveTransitionDuration,\n          curve: effectiveTransitionCurve,\n          child: Row(\n            crossAxisAlignment: widget.expands\n                ? CrossAxisAlignment.center\n                : CrossAxisAlignment.stretch,\n            children: [\n              if (widget.leading != null)\n                Padding(\n                  padding: EdgeInsetsDirectional.only(\n                    start: resolvedContentPadding.left,\n                    end: effectiveGap,\n                  ),\n                  child: widget.leading,\n                ),\n              Expanded(\n                child: Padding(\n                  padding: EdgeInsetsDirectional.only(\n                    start: widget.leading != null\n                        ? 0\n                        : resolvedContentPadding.left,\n                    end: widget.trailing != null\n                        ? 0\n                        : resolvedContentPadding.right,\n                  ),\n                  child: Stack(\n                    children: [\n                      Align(\n                        alignment: widget.hasFloatingLabel\n                            ? Alignment.bottomCenter\n                            : widget.textAlignVertical == TextAlignVertical.top\n                                ? Alignment.topCenter\n                                : Alignment.center,\n                        child: Padding(\n                          padding: EdgeInsets.symmetric(\n                            vertical: resolvedContentPadding.bottom,\n                          ),\n                          child: child,\n                        ),\n                      ),\n                      if (widget.hintText != null)\n                        Padding(\n                          padding: EdgeInsets.symmetric(\n                            vertical: resolvedContentPadding.top,\n                          ),\n                          child: AnimatedScale(\n                            alignment:\n                                Directionality.of(context) == TextDirection.ltr\n                                    ? Alignment.topLeft\n                                    : Alignment.topRight,\n                            duration: effectiveTransitionDuration,\n                            scale: widget.hasFloatingLabel &&\n                                    (focusNode.hasFocus ||\n                                        controller.value.text.isNotEmpty)\n                                ? 0.75\n                                : 1.0,\n                            child: AnimatedAlign(\n                              duration: effectiveTransitionDuration,\n                              alignment: widget.textAlignVertical ==\n                                          TextAlignVertical.top ||\n                                      (widget.hasFloatingLabel &&\n                                          (focusNode.hasFocus ||\n                                              controller.value.text.isNotEmpty))\n                                  ? AlignmentDirectional.topStart\n                                  : AlignmentDirectional.centerStart,\n                              child: AnimatedOpacity(\n                                opacity: (controller.value.text.isEmpty ||\n                                        widget.hasFloatingLabel)\n                                    ? 1.0\n                                    : 0.0,\n                                duration: effectiveTransitionDuration,\n                                curve: effectiveTransitionCurve,\n                                child: Text(\n                                  widget.hintText!,\n                                  maxLines: 1,\n                                  overflow: TextOverflow.ellipsis,\n                                  textAlign: widget.textAlign,\n                                  style: effectiveTextStyle.copyWith(\n                                    color: effectiveHintTextColor,\n                                  ),\n                                ),\n                              ),\n                            ),\n                          ),\n                        ),\n                    ],\n                  ),\n                ),\n              ),\n              if (widget.trailing != null)\n                Padding(\n                  padding: EdgeInsetsDirectional.only(\n                    start: effectiveGap,\n                    end: resolvedContentPadding.right,\n                  ),\n                  child: widget.trailing,\n                ),\n            ],\n          ),\n        );\n      },\n      child: child,\n    );\n\n    child = AnimatedOpacity(\n      opacity: widget.enabled ? 1.0 : effectiveDisabledOpacityValue,\n      curve: effectiveTransitionCurve,\n      duration: effectiveTransitionDuration,\n      child: Column(\n        mainAxisSize: MainAxisSize.min,\n        children: [\n          child,\n          if (widget.helper != null || (widget.errorText != null))\n            RepaintBoundary(\n              child: IconTheme(\n                data: IconThemeData(\n                  color: widget.errorText != null\n                      ? effectiveErrorColor\n                      : effectiveHintTextColor,\n                ),\n                child: DefaultTextStyle(\n                  style: effectiveHelperTextStyle.copyWith(\n                    color: widget.errorText != null\n                        ? effectiveErrorColor\n                        : effectiveHintTextColor,\n                  ),\n                  child: widget.errorText != null\n                      ? widget.errorBuilder?.call(context, widget.errorText) ??\n                          Padding(\n                            padding: effectiveHelperPadding,\n                            child:\n                                MoonErrorMessage(errorText: widget.errorText!),\n                          )\n                      : Padding(\n                          padding: effectiveHelperPadding,\n                          child: widget.helper,\n                        ),\n                ),\n              ),\n            ),\n        ],\n      ),\n    );\n\n    return MouseRegion(\n      cursor: effectiveMouseCursor,\n      onEnter: (PointerEnterEvent event) => _handleHover(true),\n      onExit: (PointerExitEvent event) => _handleHover(false),\n      child: TextFieldTapRegion(\n        child: IgnorePointer(\n          ignoring: !_isEnabled,\n          child: AnimatedBuilder(\n            animation: controller, // Changes the _currentLength.\n            builder: (BuildContext context, Widget? child) {\n              return Semantics(\n                maxValueLength: semanticsMaxValueLength,\n                currentValueLength: _currentLength,\n                onTap: widget.readOnly\n                    ? null\n                    : () {\n                        if (!_effectiveController.selection.isValid) {\n                          _effectiveController.selection =\n                              TextSelection.collapsed(\n                            offset: _effectiveController.text.length,\n                          );\n                        }\n                        _requestKeyboard();\n                      },\n                onDidGainAccessibilityFocus: handleDidGainAccessibilityFocus,\n                child: child,\n              );\n            },\n            child: _selectionGestureDetectorBuilder.buildGestureDetector(\n              behavior: HitTestBehavior.translucent,\n              child: child,\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _MoonTextInputSelectionGestureDetectorBuilder\n    extends TextSelectionGestureDetectorBuilder {\n  _MoonTextInputSelectionGestureDetectorBuilder({\n    required _MoonTextInputState state,\n  })  : _state = state,\n        super(delegate: state);\n\n  final _MoonTextInputState _state;\n\n  @override\n  void onForcePressStart(ForcePressDetails details) {\n    super.onForcePressStart(details);\n    if (delegate.selectionEnabled && shouldShowSelectionToolbar) {\n      editableText.showToolbar();\n    }\n  }\n\n  @override\n  void onForcePressEnd(ForcePressDetails details) {\n    // Not required.\n  }\n\n  @override\n  void onSingleTapUp(TapDragUpDetails details) {\n    super.onSingleTapUp(details);\n    _state._requestKeyboard();\n  }\n\n  @override\n  bool get onUserTapAlwaysCalled => _state.widget.onTapAlwaysCalled;\n\n  @override\n  void onUserTap() {\n    _state.widget.onTap?.call();\n  }\n\n  @override\n  void onSingleLongTapStart(LongPressStartDetails details) {\n    super.onSingleLongTapStart(details);\n    if (delegate.selectionEnabled) {\n      switch (Theme.of(_state.context).platform) {\n        case TargetPlatform.iOS:\n        case TargetPlatform.macOS:\n          break;\n        case TargetPlatform.android:\n        case TargetPlatform.fuchsia:\n        case TargetPlatform.linux:\n        case TargetPlatform.windows:\n          Feedback.forLongPress(_state.context);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/text_input_group/text_input_group.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_design/src/widgets/common/base_control.dart';\nimport 'package:moon_design/src/widgets/common/border_container.dart';\nimport 'package:moon_design/src/widgets/common/error_message_widgets.dart';\nimport 'package:moon_design/src/widgets/text_input/form_text_input.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonTextInputGroupOrientation {\n  vertical,\n  horizontal,\n}\n\ntypedef MoonTextInputGroupErrorBuilder = Widget Function(\n  BuildContext context,\n  List<String> errorText,\n);\n\nclass MoonTextInputGroup extends StatefulWidget {\n  /// Whether the text input group is enabled. When false, taps are ignored and\n  /// the opacity reduced.\n  final bool enabled;\n\n  /// The border radius of the text input group.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// {@macro flutter.material.Material.clipBehavior}\n  ///\n  /// Defaults to [Clip.hardEdge].\n  final Clip? clipBehavior;\n\n  /// The background color of the text input group.\n  final Color? backgroundColor;\n\n  /// The default border color of the text input group.\n  final Color? borderColor;\n\n  /// The color of the text input group in error state.\n  final Color? errorColor;\n\n  /// The text color of the text input group hint.\n  final Color? hintTextColor;\n\n  /// The border color of the text input group on hover.\n  final Color? hoverBorderColor;\n\n  /// The duration of the text input group transition animation\n  /// (enable and disable).\n  final Duration? transitionDuration;\n\n  /// The curve of the text input group transition animation\n  /// (enable and disable).\n  final Curve? transitionCurve;\n\n  /// The padding of the [helper] and [errorBuilder] widgets.\n  final EdgeInsetsGeometry? helperPadding;\n\n  /// The padding of the text content.\n  final EdgeInsetsGeometry? textPadding;\n\n  /// The custom decoration of the text input group.\n  final Decoration? decoration;\n\n  /// The semantic label for the text input group widget.\n  final String? semanticLabel;\n\n  /// The text style of the [helper] or error state text.\n  final TextStyle? helperTextStyle;\n\n  /// The orientation of the text input group.\n  final MoonTextInputGroupOrientation orientation;\n\n  /// The list of text inputs to display as the children of the text input group.\n  final List<MoonFormTextInput> children;\n\n  /// A builder to build the text input group error widget.\n  final MoonTextInputGroupErrorBuilder? errorBuilder;\n\n  /// The widget to display below the text input group. Not displayed in error\n  /// state.\n  final Widget? helper;\n\n  /// Creates a Moon Design text input group.\n  const MoonTextInputGroup({\n    super.key,\n    this.enabled = true,\n    this.borderRadius,\n    this.clipBehavior,\n    this.backgroundColor,\n    this.borderColor,\n    this.errorColor,\n    this.hintTextColor,\n    this.hoverBorderColor,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.helperPadding,\n    this.textPadding,\n    this.decoration,\n    this.semanticLabel,\n    this.helperTextStyle,\n    this.orientation = MoonTextInputGroupOrientation.vertical,\n    required this.children,\n    this.errorBuilder,\n    this.helper,\n  });\n\n  @override\n  State<MoonTextInputGroup> createState() => _MoonTextInputGroupState();\n}\n\nclass _MoonTextInputGroupState extends State<MoonTextInputGroup> {\n  late final List<String?> _validatorErrors =\n      List.filled(widget.children.length, null);\n\n  late List<String?> _previousValidatorErrors;\n\n  bool get _groupHasValidationError =>\n      _validatorErrors.nonNulls.toList().isNotEmpty;\n\n  bool get _groupHasErrorText => widget.children\n      .any((MoonFormTextInput child) => child.configuration.errorText != null);\n\n  bool get _groupHasError => _groupHasValidationError || _groupHasErrorText;\n\n  bool get _groupHasAllValidationErrors =>\n      _validatorErrors.nonNulls.length == widget.children.length;\n\n  bool get _groupHasAllErrorTexts => widget.children.every(\n        (MoonFormTextInput child) => child.configuration.errorText != null,\n      );\n\n  bool get _groupIsInErrorState =>\n      _groupHasAllValidationErrors || _groupHasAllErrorTexts;\n\n  bool get _shouldShowError => _groupHasError || _groupIsInErrorState;\n\n  void _handleValidationError(int index, String? errorText) {\n    _previousValidatorErrors = _validatorErrors;\n\n    if (_previousValidatorErrors[index] == errorText) return;\n\n    _validatorErrors[index] = errorText;\n\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      // Rebuild the widget to show the error.\n      if (mounted) setState(() {});\n    });\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final BorderRadiusGeometry effectiveBorderRadius = widget.borderRadius ??\n        context.moonTheme?.textInputGroupTheme.properties.borderRadius ??\n        BorderRadius.circular(8);\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.textInputGroupTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveBorderColor = widget.borderColor ??\n        context.moonTheme?.textInputGroupTheme.colors.borderColor ??\n        MoonColors.light.beerus;\n\n    final Color effectiveErrorColor = widget.errorColor ??\n        context.moonTheme?.textInputGroupTheme.colors.errorColor ??\n        MoonColors.light.chichi;\n\n    final Color effectiveHelperTextColor = widget.hintTextColor ??\n        context.moonTheme?.textInputGroupTheme.colors.helperTextColor ??\n        MoonColors.light.trunks;\n\n    final EdgeInsetsGeometry effectiveHelperPadding = widget.helperPadding ??\n        context.moonTheme?.textInputGroupTheme.properties.helperPadding ??\n        EdgeInsets.only(\n          left: MoonSizes.sizes.x3s,\n          top: MoonSizes.sizes.x4s,\n          right: MoonSizes.sizes.x3s,\n        );\n\n    final TextStyle effectiveHelperTextStyle = widget.helperTextStyle ??\n        context.moonTheme?.textInputGroupTheme.properties.helperTextStyle ??\n        MoonTypography.typography.body.text12;\n\n    final Duration effectiveTransitionDuration = widget.transitionDuration ??\n        context.moonTheme?.textInputGroupTheme.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = widget.transitionCurve ??\n        context.moonTheme?.textInputGroupTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    final List<String> effectiveErrorMessages =\n        _validatorErrors.nonNulls.toList().isNotEmpty\n            ? _validatorErrors.nonNulls.toList()\n            : widget.children\n                .map((MoonFormTextInput child) => child.configuration.errorText)\n                .nonNulls\n                .toList();\n\n    List<Widget> childrenWithDivider({required bool shouldHideDivider}) =>\n        List.generate(\n          widget.children.length * 2 - 1,\n          (int index) {\n            final int derivedIndex = index ~/ 2;\n\n            final MoonFormTextInputConfiguration configuration =\n                widget.children[derivedIndex].configuration;\n\n            final bool selfShowError = ((configuration.errorText != null &&\n                        _validatorErrors[derivedIndex] == null) &&\n                    !_groupHasValidationError &&\n                    !_groupHasAllErrorTexts) ||\n                (_validatorErrors[derivedIndex] != null &&\n                    !_groupHasAllValidationErrors);\n\n            Widget child = MoonFormTextInput(\n              activeBorderColor: configuration.activeBorderColor,\n              autocorrect: configuration.autocorrect,\n              autofillHints: configuration.autofillHints,\n              autofocus: configuration.autofocus,\n              autovalidateMode: configuration.autovalidateMode,\n              backgroundColor: Colors.transparent,\n              borderRadius: configuration.borderRadius,\n              canRequestFocus: configuration.canRequestFocus,\n              clipBehavior: configuration.clipBehavior,\n              contentInsertionConfiguration:\n                  configuration.contentInsertionConfiguration,\n              contextMenuBuilder: configuration.contextMenuBuilder,\n              controller: configuration.controller,\n              cursorColor: configuration.cursorColor,\n              cursorHeight: configuration.cursorHeight,\n              cursorOpacityAnimates: configuration.cursorOpacityAnimates,\n              cursorRadius: configuration.cursorRadius,\n              cursorWidth: configuration.cursorWidth,\n              decoration: configuration.decoration,\n              dragStartBehavior: configuration.dragStartBehavior,\n              enabled: configuration.enabled,\n              enableIMEPersonalizedLearning:\n                  configuration.enableIMEPersonalizedLearning,\n              enableInteractiveSelection:\n                  configuration.enableInteractiveSelection,\n              enableSuggestions: configuration.enableSuggestions,\n              errorBorderColor:\n                  selfShowError ? configuration.errorColor : Colors.transparent,\n              errorBuilder: (BuildContext context, String? errorText) =>\n                  const SizedBox.shrink(),\n              errorColor: configuration.errorColor,\n              errorText: configuration.errorText,\n              expands: configuration.expands,\n              focusNode: configuration.focusNode,\n              gap: configuration.gap,\n              hasFloatingLabel: configuration.hasFloatingLabel,\n              height: configuration.height,\n              helper: configuration.helper,\n              helperPadding: configuration.helperPadding,\n              helperTextStyle: configuration.helperTextStyle,\n              hintText: configuration.hintText,\n              hintTextColor: configuration.hintTextColor,\n              hoverBorderColor: configuration.hoverBorderColor,\n              inactiveBorderColor: Colors.transparent,\n              initialValue: configuration.initialValue,\n              inputFormatters: configuration.inputFormatters,\n              keyboardAppearance: configuration.keyboardAppearance,\n              keyboardType: configuration.keyboardType,\n              leading: configuration.leading,\n              magnifierConfiguration: configuration.magnifierConfiguration,\n              maxLength: configuration.maxLength,\n              maxLengthEnforcement: configuration.maxLengthEnforcement,\n              maxLines: configuration.maxLines,\n              minLines: configuration.minLines,\n              mouseCursor: configuration.mouseCursor,\n              obscureText: configuration.obscureText,\n              obscuringCharacter: configuration.obscuringCharacter,\n              onAppPrivateCommand: configuration.onAppPrivateCommand,\n              onChanged: configuration.onChanged,\n              onEditingComplete: configuration.onEditingComplete,\n              onSubmitted: configuration.onSubmitted,\n              onSaved: configuration.onSaved,\n              onTap: configuration.onTap,\n              onTapOutside: configuration.onTapOutside,\n              padding: configuration.padding,\n              readOnly: configuration.readOnly,\n              restorationId: configuration.restorationId,\n              scribbleEnabled: configuration.scribbleEnabled,\n              scrollController: configuration.scrollController,\n              scrollPadding: configuration.scrollPadding,\n              scrollPhysics: configuration.scrollPhysics,\n              selectionControls: configuration.selectionControls,\n              selectionHeightStyle: configuration.selectionHeightStyle,\n              selectionWidthStyle: configuration.selectionWidthStyle,\n              showCursor: configuration.showCursor,\n              smartDashesType: configuration.smartDashesType,\n              smartQuotesType: configuration.smartQuotesType,\n              spellCheckConfiguration: configuration.spellCheckConfiguration,\n              strutStyle: configuration.strutStyle,\n              style: configuration.style,\n              textAlign: configuration.textAlign,\n              textAlignVertical: configuration.textAlignVertical,\n              textCapitalization: configuration.textCapitalization,\n              textColor: configuration.textColor,\n              textDirection: configuration.textDirection,\n              textInputAction: configuration.textInputAction,\n              textInputSize: configuration.textInputSize,\n              trailing: configuration.trailing,\n              transitionCurve: configuration.transitionCurve,\n              transitionDuration: configuration.transitionDuration,\n              undoController: configuration.undoController,\n              validationStatusCallback: (errorText) =>\n                  _handleValidationError(derivedIndex, errorText),\n              validator: configuration.validator,\n              width: configuration.width,\n            );\n\n            child = configuration.width != null\n                ? SizedBox(\n                    width: configuration.width,\n                    child: child,\n                  )\n                : Flexible(child: child);\n\n            return index.isEven\n                ? child\n                // Animated divider\n                : BorderContainer(\n                    height: widget.orientation ==\n                            MoonTextInputGroupOrientation.horizontal\n                        ? double.infinity\n                        : 1,\n                    width: widget.orientation ==\n                            MoonTextInputGroupOrientation.vertical\n                        ? double.infinity\n                        : 1,\n                    duration: effectiveTransitionDuration,\n                    curve: effectiveTransitionCurve,\n                    border: MoonSquircleBorder(\n                      borderRadius:\n                          effectiveBorderRadius.squircleBorderRadius(context),\n                      side: BorderSide(\n                        color: (!_groupHasValidationError &&\n                                    _groupHasAllErrorTexts) ||\n                                _groupHasAllValidationErrors\n                            ? effectiveErrorColor\n                            : shouldHideDivider ||\n                                    (_groupHasError || _groupHasValidationError)\n                                ? Colors.transparent\n                                : effectiveBorderColor,\n                      ),\n                    ),\n                    child: const SizedBox.shrink(),\n                  );\n          },\n          growable: false,\n        );\n\n    return Column(\n      mainAxisSize: MainAxisSize.min,\n      crossAxisAlignment: CrossAxisAlignment.stretch,\n      children: [\n        MoonBaseControl(\n          semanticLabel: widget.semanticLabel,\n          isFocusable: false,\n          showFocusEffect: false,\n          onTap: widget.enabled ? () {} : null,\n          propagateGesturesToChild: true,\n          builder: (\n            BuildContext context,\n            bool isEnabled,\n            bool isHovered,\n            bool isFocused,\n            bool isPressed,\n          ) {\n            return BorderContainer(\n              clipBehavior: widget.clipBehavior ?? Clip.none,\n              backgroundColor: effectiveBackgroundColor,\n              decoration: widget.decoration,\n              duration: effectiveTransitionDuration,\n              curve: effectiveTransitionCurve,\n              border: MoonSquircleBorder(\n                borderRadius:\n                    effectiveBorderRadius.squircleBorderRadius(context),\n                side: BorderSide(\n                  color:\n                      (!_groupHasValidationError && _groupHasAllErrorTexts) ||\n                              _groupHasAllValidationErrors\n                          ? effectiveErrorColor\n                          : effectiveBorderColor,\n                ),\n              ),\n              child: _InputGroupOrientation(\n                orientation: widget.orientation,\n                children: childrenWithDivider(\n                  shouldHideDivider: isHovered || isFocused,\n                ),\n              ),\n            );\n          },\n        ),\n        if (widget.helper != null || _shouldShowError)\n          IconTheme(\n            data: IconThemeData(\n              color: _shouldShowError\n                  ? effectiveErrorColor\n                  : effectiveHelperTextColor,\n            ),\n            child: DefaultTextStyle(\n              style: effectiveHelperTextStyle.copyWith(\n                color: _shouldShowError\n                    ? effectiveErrorColor\n                    : effectiveHelperTextColor,\n              ),\n              child: Padding(\n                padding: effectiveHelperPadding,\n                child: _shouldShowError\n                    ? (widget.errorBuilder\n                            ?.call(context, effectiveErrorMessages) ??\n                        MoonErrorMessages(errors: effectiveErrorMessages))\n                    : widget.helper,\n              ),\n            ),\n          ),\n      ],\n    );\n  }\n}\n\nclass _InputGroupOrientation extends StatelessWidget {\n  final MoonTextInputGroupOrientation orientation;\n  final List<Widget> children;\n\n  const _InputGroupOrientation({\n    required this.orientation,\n    required this.children,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return switch (orientation) {\n      MoonTextInputGroupOrientation.vertical => Column(\n          mainAxisSize: MainAxisSize.min,\n          crossAxisAlignment: CrossAxisAlignment.stretch,\n          children: children,\n        ),\n      MoonTextInputGroupOrientation.horizontal => SizedBox(\n          height: 56,\n          width: 300,\n          child: Row(\n            mainAxisSize: MainAxisSize.min,\n            children: children,\n          ),\n        ),\n    };\n  }\n}\n"
  },
  {
    "path": "lib/src/widgets/toast/toast.dart",
    "content": "import 'dart:async';\n\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/toast/toast_theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/shadows.dart';\nimport 'package:moon_design/src/theme/tokens/sizes.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/extensions.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/utils/squircle/squircle_border.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonToastVariant {\n  original,\n  inverted,\n}\n\nclass MoonToast {\n  static const double _toastTravelDistance = 64.0;\n  static const Duration _timeBetweenToasts = Duration(milliseconds: 200);\n\n  static final _toastQueue = <_ToastEntry>[];\n\n  static Timer? _timer;\n  static OverlayEntry? _entry;\n\n  /// Creates a Moon Design toast.\n  const MoonToast();\n\n  /// Displays a Moon Design toast.\n  static void show(\n    BuildContext context, {\n    /// The alignment (position) of the toast.\n    AlignmentGeometry toastAlignment = Alignment.bottomCenter,\n\n    /// Whether the toast is persistent (attaches to root navigator).\n    bool isPersistent = true,\n\n    /// Whether to use the [SafeArea] for the toast (takes into account notches\n    /// and native system bars).\n    bool useSafeArea = true,\n\n    /// The border radius of the toast.\n    BorderRadiusGeometry? borderRadius,\n\n    /// The background color of the toast.\n    Color? backgroundColor,\n\n    /// The horizontal gap between the leading, label and trailing widgets of\n    /// the toast.\n    double? horizontalGap,\n\n    /// The vertical gap between the toast header and content.\n    double? verticalGap,\n\n    /// The width of the toast. If not specified, adjusts automatically to fit\n    /// its child elements.\n    double? width,\n\n    /// The duration to display the toast.\n    Duration? displayDuration,\n\n    /// The duration of the toast transition animation (slide in or out).\n    Duration? transitionDuration,\n\n    /// The curve of the toast transition animation (slide in or out).\n    Curve? transitionCurve,\n\n    /// The margin of the toast.\n    EdgeInsetsGeometry? margin,\n\n    /// The padding of the toast.\n    EdgeInsetsGeometry? padding,\n\n    /// The list of shadows applied to the toast.\n    List<BoxShadow>? toastShadows,\n\n    /// The theming color scheme variant for the toast.\n    /// Inverted variant flips the theming color scheme (uses dark colors\n    /// instead of light colors).\n    MoonToastVariant variant = MoonToastVariant.original,\n\n    /// The custom decoration of the toast.\n    Decoration? decoration,\n\n    /// The semantic label for the toast.\n    String? semanticLabel,\n\n    /// The widget to display before the label widget of the toast.\n    Widget? leading,\n\n    /// The primary content of the toast widget.\n    required Widget label,\n\n    /// The widget to display after the label widget of the toast.\n    Widget? trailing,\n\n    /// The widget to display below the toast header.\n    Widget? content,\n  }) {\n    assert(\n      displayDuration == null || (displayDuration > _timeBetweenToasts),\n      'The display duration must be greater than the time between toasts '\n      '(200 ms).',\n    );\n\n    final MoonToastTheme? toastTheme = context.moonTheme?.toastTheme;\n\n    final BorderRadiusGeometry effectiveBorderRadius = borderRadius ??\n        toastTheme?.properties.borderRadius ??\n        MoonBorders.borders.surfaceSm;\n\n    final Color effectiveBackgroundColor = backgroundColor ??\n        (variant == MoonToastVariant.original\n            ? (toastTheme?.colors.lightVariantBackgroundColor ??\n                MoonColors.light.goku)\n            : (toastTheme?.colors.darkVariantBackgroundColor ??\n                MoonColors.dark.goku));\n\n    final Color effectiveTextColor = variant == MoonToastVariant.original\n        ? (toastTheme?.colors.lightVariantTextColor ??\n            MoonColors.light.textPrimary)\n        : (toastTheme?.colors.darkVariantTextColor ??\n            MoonColors.dark.textPrimary);\n\n    final Color effectiveIconColor = variant == MoonToastVariant.original\n        ? (toastTheme?.colors.lightVariantIconColor ??\n            MoonColors.light.iconPrimary)\n        : (toastTheme?.colors.darkVariantIconColor ??\n            MoonColors.dark.iconPrimary);\n\n    final TextStyle effectiveTextStyle = toastTheme?.properties.textStyle ??\n        MoonTypography.typography.body.textDefault;\n\n    final double effectiveHorizontalGap = horizontalGap ??\n        toastTheme?.properties.horizontalGap ??\n        MoonSizes.sizes.x2s;\n\n    final double effectiveVerticalGap = verticalGap ??\n        toastTheme?.properties.verticalGap ??\n        MoonSizes.sizes.x3s;\n\n    final Duration effectiveDisplayDuration = displayDuration ??\n        toastTheme?.properties.displayDuration ??\n        const Duration(seconds: 3);\n\n    final Duration effectiveTransitionDuration = transitionDuration ??\n        toastTheme?.properties.transitionDuration ??\n        MoonTransitions.transitions.defaultTransitionDuration;\n\n    final Curve effectiveTransitionCurve = transitionCurve ??\n        toastTheme?.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    final EdgeInsetsGeometry effectiveContentPadding = padding ??\n        toastTheme?.properties.contentPadding ??\n        EdgeInsets.all(MoonSizes.sizes.x2s);\n\n    final EdgeInsets resolvedContentPadding =\n        effectiveContentPadding.resolve(Directionality.of(context));\n\n    final List<BoxShadow> effectiveToastShadows = toastShadows ??\n        toastTheme?.shadows.toastShadows ??\n        MoonShadows.light.lg;\n\n    final effectiveContext = isPersistent\n        ? (Navigator.maybeOf(context, rootNavigator: true)?.context ?? context)\n        : context;\n\n    final CapturedThemes themes = InheritedTheme.capture(\n      from: context,\n      to: Navigator.of(effectiveContext).context,\n    );\n\n    final OverlayEntry entry = OverlayEntry(\n      builder: (BuildContext context) {\n        return RepaintBoundary(\n          child: TweenAnimationBuilder(\n            duration: effectiveTransitionDuration,\n            curve: effectiveTransitionCurve,\n            tween: Tween(begin: 0.0, end: 1.0),\n            builder: (BuildContext context, double progress, Widget? child) {\n              return SafeArea(\n                left: useSafeArea,\n                top: useSafeArea,\n                right: useSafeArea,\n                bottom: useSafeArea,\n                maintainBottomViewPadding: true,\n                child: Align(\n                  alignment: toastAlignment,\n                  child: Transform(\n                    transform: Matrix4.translationValues(\n                      switch (toastAlignment) {\n                        Alignment.topLeft ||\n                        Alignment.centerLeft ||\n                        Alignment.bottomLeft =>\n                          -_toastTravelDistance +\n                              progress * _toastTravelDistance,\n                        Alignment.topRight ||\n                        Alignment.centerRight ||\n                        Alignment.bottomRight =>\n                          (1 - progress) * _toastTravelDistance,\n                        _ => 0\n                      },\n                      switch (toastAlignment) {\n                        Alignment.topCenter => -_toastTravelDistance +\n                            progress * _toastTravelDistance,\n                        Alignment.bottomCenter =>\n                          (1 - progress) * _toastTravelDistance,\n                        _ => 0\n                      },\n                      0,\n                    ),\n                    child: Opacity(\n                      opacity: progress,\n                      child: child,\n                    ),\n                  ),\n                ),\n              );\n            },\n            child: themes.wrap(\n              Semantics(\n                label: semanticLabel,\n                child: IconTheme(\n                  data: IconThemeData(color: effectiveIconColor),\n                  child: DefaultTextStyle(\n                    style: effectiveTextStyle.copyWith(\n                      color: effectiveTextColor,\n                    ),\n                    child: Container(\n                      margin: margin ?? resolvedContentPadding,\n                      padding: resolvedContentPadding,\n                      width: width,\n                      decoration: decoration ??\n                          ShapeDecorationWithPremultipliedAlpha(\n                            color: effectiveBackgroundColor,\n                            shadows: effectiveToastShadows,\n                            shape: MoonSquircleBorder(\n                              borderRadius: effectiveBorderRadius\n                                  .squircleBorderRadius(context),\n                            ),\n                          ),\n                      child: Column(\n                        mainAxisSize: MainAxisSize.min,\n                        children: [\n                          Row(\n                            mainAxisSize: MainAxisSize.min,\n                            mainAxisAlignment: width != null\n                                ? MainAxisAlignment.spaceBetween\n                                : MainAxisAlignment.center,\n                            textDirection: Directionality.of(context),\n                            children: [\n                              if (leading != null) ...[\n                                leading,\n                                SizedBox(width: effectiveHorizontalGap),\n                              ],\n                              Flexible(child: label),\n                              if (trailing != null) ...[\n                                SizedBox(width: effectiveHorizontalGap),\n                                trailing,\n                              ],\n                            ],\n                          ),\n                          if (content != null) ...[\n                            SizedBox(height: effectiveVerticalGap),\n                            content,\n                          ],\n                        ],\n                      ),\n                    ),\n                  ),\n                ),\n              ),\n            ),\n          ),\n        );\n      },\n    );\n\n    final toastEntry = _ToastEntry(\n      buildContext: effectiveContext,\n      overlayEntry: entry,\n    );\n\n    _toastQueue.add(toastEntry);\n\n    if (_timer == null) _showToastOverlay(duration: effectiveDisplayDuration);\n  }\n\n  /// Clear the toast queue.\n  static void clearToastQueue() {\n    _timer?.cancel();\n    _timer = null;\n\n    _entry?.remove();\n    _entry = null;\n\n    _toastQueue.clear();\n  }\n\n  static void _showToastOverlay({required Duration duration}) {\n    if (_toastQueue.isEmpty) {\n      _entry = null;\n      return;\n    }\n\n    final toastEntry = _toastQueue.removeAt(0);\n\n    if (!toastEntry.buildContext.mounted) {\n      clearToastQueue();\n      return;\n    }\n\n    _entry = toastEntry.overlayEntry;\n    _timer = Timer(duration, () => _removeToastOverlay(duration: duration));\n\n    Future.delayed(\n      _timeBetweenToasts,\n      () {\n        if (toastEntry.buildContext.mounted) {\n          Navigator.of(toastEntry.buildContext).overlay?.insert(_entry!);\n        }\n      },\n    );\n  }\n\n  static void _removeToastOverlay({required Duration duration}) {\n    _timer?.cancel();\n    _timer = null;\n\n    _entry?.remove();\n    _entry = null;\n\n    _showToastOverlay(duration: duration);\n  }\n}\n\nclass _ToastEntry {\n  final BuildContext buildContext;\n  final OverlayEntry overlayEntry;\n\n  _ToastEntry({\n    required this.buildContext,\n    required this.overlayEntry,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/tooltip/tooltip.dart",
    "content": "import 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/theme/theme.dart';\nimport 'package:moon_design/src/theme/tokens/borders.dart';\nimport 'package:moon_design/src/theme/tokens/shadows.dart';\nimport 'package:moon_design/src/theme/tokens/transitions.dart';\nimport 'package:moon_design/src/theme/tokens/typography/typography.dart';\nimport 'package:moon_design/src/utils/shape_decoration_premul.dart';\nimport 'package:moon_design/src/widgets/tooltip/tooltip_shape.dart';\nimport 'package:moon_tokens/moon_tokens.dart';\n\nenum MoonTooltipPosition {\n  top,\n  topLeft,\n  topRight,\n  bottom,\n  bottomLeft,\n  bottomRight,\n  left,\n  right,\n  vertical,\n  horizontal,\n}\n\nclass MoonTooltip extends StatefulWidget {\n  // This is required to show only one tooltip at a time.\n  static final List<_MoonTooltipState> _openedTooltips = [];\n\n  /// Whether the tooltip has an arrow (tail).\n  final bool hasArrow;\n\n  /// Whether to hide (dismiss) the tooltip on tap. Defaults to true.\n  /// For finer control over dismissal, use [show] and [onTap] properties.\n  final bool hideOnTap;\n\n  /// Whether to show the tooltip.\n  final bool show;\n\n  /// The border radius of the tooltip.\n  final BorderRadiusGeometry? borderRadius;\n\n  /// The background color of the tooltip.\n  final Color? backgroundColor;\n\n  /// The border color of the tooltip. Displayed when [borderWidth] is larger\n  /// than 0.\n  final Color borderColor;\n\n  /// The base width of the tooltip arrow (tail).\n  final double? arrowBaseWidth;\n\n  /// The length of the tooltip arrow (tail).\n  final double? arrowLength;\n\n  /// The offset of the tooltip arrow (tail) from the center of the tooltip.\n  final double arrowOffsetValue;\n\n  /// The distance from the tip of the tooltip arrow (tail) to the\n  /// [child] (target).\n  final double? arrowTipDistance;\n\n  /// The width of the tooltip border.\n  final double borderWidth;\n\n  /// An optional size constraint for the tooltip [content] to define its\n  /// minimum height.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to\n  /// the [content].\n  final double? minHeight;\n\n  /// An optional size constraint for the tooltip [content] to define its\n  /// minimum width.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to\n  /// the [content].\n  final double? minWidth;\n\n  /// An optional size constraint for the tooltip [content] to define its\n  /// maximum height.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to\n  /// the [content].\n  final double? maxHeight;\n\n  /// An optional size constraint for the tooltip [content] to define its\n  /// maximum width.\n  ///\n  /// If a constraint is not provided, the size will automatically adjust to\n  /// the [content].\n  final double? maxWidth;\n\n  /// The margin of the tooltip. Prevents the tooltip from touching the edges of\n  /// the viewport.\n  final double tooltipMargin;\n\n  /// The duration of the tooltip transition animation (fade in or out).\n  final Duration? transitionDuration;\n\n  /// The curve of the tooltip transition animation (fade in or out).\n  final Curve? transitionCurve;\n\n  /// The padding of the tooltip [content].\n  final EdgeInsetsGeometry? contentPadding;\n\n  /// The list of shadows applied to the tooltip.\n  final List<BoxShadow>? tooltipShadows;\n\n  /// The tooltip position relative to the [child] (target).\n  /// Defaults to [MoonTooltipPosition.vertical].\n  final MoonTooltipPosition tooltipPosition;\n\n  /// The observer to track route changes and automatically hide the tooltip\n  /// when the widget's route is not active.\n  final RouteObserver<PageRoute<dynamic>>? routeObserver;\n\n  /// The semantic label for the tooltip.\n  final String? semanticLabel;\n\n  /// The callback that is called when the tooltip is tapped.\n  final VoidCallback? onTap;\n\n  /// The widget to display as the child (target) of the tooltip.\n  final Widget child;\n\n  /// The widget to display inside the tooltip as its content.\n  final Widget content;\n\n  /// Creates a Moon Design tooltip.\n  const MoonTooltip({\n    super.key,\n    this.hasArrow = true,\n    this.hideOnTap = true,\n    required this.show,\n    this.borderRadius,\n    this.backgroundColor,\n    this.borderColor = Colors.transparent,\n    this.arrowBaseWidth,\n    this.arrowLength,\n    this.arrowOffsetValue = 0,\n    this.arrowTipDistance,\n    this.borderWidth = 0,\n    this.minHeight,\n    this.minWidth,\n    this.maxHeight,\n    this.maxWidth,\n    this.tooltipMargin = 8,\n    this.transitionDuration,\n    this.transitionCurve,\n    this.contentPadding,\n    this.tooltipShadows,\n    this.tooltipPosition = MoonTooltipPosition.top,\n    this.routeObserver,\n    this.semanticLabel,\n    this.onTap,\n    required this.child,\n    required this.content,\n  });\n\n  // Clear existing tooltips, excluding the supplied one.\n  static void _removeOtherTooltips(_MoonTooltipState current) {\n    if (_openedTooltips.isNotEmpty) {\n      // Avoid concurrent modification.\n      final List<_MoonTooltipState> openedTooltips = _openedTooltips.toList();\n\n      for (final _MoonTooltipState state in openedTooltips) {\n        if (state == current) continue;\n\n        state._clearOverlayEntry();\n      }\n    }\n  }\n\n  @override\n  _MoonTooltipState createState() => _MoonTooltipState();\n}\n\nclass _MoonTooltipState extends State<MoonTooltip>\n    with RouteAware, SingleTickerProviderStateMixin {\n  final GlobalKey _tooltipKey = GlobalKey();\n  final LayerLink _layerLink = LayerLink();\n\n  AnimationController? _animationController;\n  CurvedAnimation? _curvedAnimation;\n\n  OverlayEntry? _overlayEntry;\n\n  bool _routeIsShowing = true;\n\n  bool get shouldShowTooltip => widget.show && _routeIsShowing;\n\n  void _showTooltip() {\n    _overlayEntry = OverlayEntry(\n      builder: (BuildContext context) => _createOverlayContent(),\n    );\n    Overlay.of(context).insert(_overlayEntry!);\n\n    MoonTooltip._openedTooltips.add(this);\n    MoonTooltip._removeOtherTooltips(this);\n\n    _animationController!.value = 0;\n    _animationController!.forward();\n  }\n\n  void _updateTooltip() {\n    _overlayEntry?.markNeedsBuild();\n  }\n\n  void _removeTooltip({bool immediately = false}) {\n    if (immediately) {\n      _clearOverlayEntry();\n    } else {\n      _animationController!.value = 1;\n      _animationController!.reverse().then((value) => _clearOverlayEntry());\n    }\n  }\n\n  void _clearOverlayEntry() {\n    if (_overlayEntry != null) {\n      MoonTooltip._openedTooltips.remove(this);\n      _overlayEntry!.remove();\n      _overlayEntry = null;\n    }\n  }\n\n  void _handleTap(TapDownDetails details) {\n    final RenderBox? tooltipRenderBox =\n        _tooltipKey.currentContext?.findRenderObject() as RenderBox?;\n    final RenderBox? overlayRenderBox =\n        Overlay.of(context).context.findRenderObject() as RenderBox?;\n    final Offset? tooltipPosition = tooltipRenderBox?.localToGlobal(\n      Offset.zero,\n      ancestor: overlayRenderBox,\n    );\n\n    if (widget.hideOnTap ||\n        tooltipPosition != null &&\n            !tooltipRenderBox!.size\n                .contains(details.localPosition - tooltipPosition)) {\n      _removeTooltip();\n    }\n\n    widget.onTap?.call();\n  }\n\n  _TooltipPositionProperties _resolveTooltipPositionParameters({\n    required MoonTooltipPosition tooltipPosition,\n    required double arrowTipDistance,\n    required double arrowLength,\n    required double overlayWidth,\n    required double tooltipTargetGlobalLeft,\n    required double tooltipTargetGlobalCenter,\n    required double tooltipTargetGlobalRight,\n  }) {\n    return switch (tooltipPosition) {\n      MoonTooltipPosition.top => _TooltipPositionProperties(\n          offset: Offset(0, -(arrowTipDistance + arrowLength)),\n          targetAnchor: Alignment.topCenter,\n          followerAnchor: Alignment.bottomCenter,\n          tooltipMaxWidth: overlayWidth -\n              ((overlayWidth / 2 - tooltipTargetGlobalCenter) * 2).abs() -\n              widget.tooltipMargin * 2,\n        ),\n      MoonTooltipPosition.bottom => _TooltipPositionProperties(\n          offset: Offset(0, arrowTipDistance + arrowLength),\n          targetAnchor: Alignment.bottomCenter,\n          followerAnchor: Alignment.topCenter,\n          tooltipMaxWidth: overlayWidth -\n              ((overlayWidth / 2 - tooltipTargetGlobalCenter) * 2).abs() -\n              widget.tooltipMargin * 2,\n        ),\n      MoonTooltipPosition.left => _TooltipPositionProperties(\n          offset: Offset(-(arrowTipDistance + arrowLength), 0),\n          targetAnchor: Alignment.centerLeft,\n          followerAnchor: Alignment.centerRight,\n          tooltipMaxWidth: tooltipTargetGlobalLeft -\n              arrowLength -\n              arrowTipDistance -\n              widget.tooltipMargin,\n        ),\n      MoonTooltipPosition.right => _TooltipPositionProperties(\n          offset: Offset(arrowTipDistance + arrowLength, 0),\n          targetAnchor: Alignment.centerRight,\n          followerAnchor: Alignment.centerLeft,\n          tooltipMaxWidth: overlayWidth -\n              tooltipTargetGlobalRight -\n              arrowLength -\n              arrowTipDistance -\n              widget.tooltipMargin,\n        ),\n      MoonTooltipPosition.topLeft => _TooltipPositionProperties(\n          offset: Offset(0, -(arrowTipDistance + arrowLength)),\n          targetAnchor: Alignment.topRight,\n          followerAnchor: Alignment.bottomRight,\n          tooltipMaxWidth: tooltipTargetGlobalRight - widget.tooltipMargin,\n        ),\n      MoonTooltipPosition.topRight => _TooltipPositionProperties(\n          offset: Offset(0, -(arrowTipDistance + arrowLength)),\n          targetAnchor: Alignment.topLeft,\n          followerAnchor: Alignment.bottomLeft,\n          tooltipMaxWidth:\n              overlayWidth - tooltipTargetGlobalLeft - widget.tooltipMargin,\n        ),\n      MoonTooltipPosition.bottomLeft => _TooltipPositionProperties(\n          offset: Offset(0, arrowTipDistance + arrowLength),\n          targetAnchor: Alignment.bottomRight,\n          followerAnchor: Alignment.topRight,\n          tooltipMaxWidth: tooltipTargetGlobalRight - widget.tooltipMargin,\n        ),\n      MoonTooltipPosition.bottomRight => _TooltipPositionProperties(\n          offset: Offset(0, arrowTipDistance + arrowLength),\n          targetAnchor: Alignment.bottomLeft,\n          followerAnchor: Alignment.topLeft,\n          tooltipMaxWidth:\n              overlayWidth - tooltipTargetGlobalLeft - widget.tooltipMargin,\n        ),\n      _ => throw AssertionError(tooltipPosition),\n    };\n  }\n\n  @override\n  void didPush() {\n    _routeIsShowing = true;\n\n    // Route was added to the navigator and is now the top-most route.\n    if (shouldShowTooltip) {\n      _removeTooltip();\n\n      WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n        if (mounted) _showTooltip();\n      });\n    }\n  }\n\n  @override\n  void didPushNext() {\n    _routeIsShowing = false;\n    _removeTooltip();\n  }\n\n  @override\n  Future<void> didPopNext() async {\n    _routeIsShowing = true;\n\n    if (shouldShowTooltip) {\n      // The covering route was popped off the navigator.\n      _removeTooltip();\n\n      await Future.delayed(const Duration(milliseconds: 100), () {\n        if (mounted) _showTooltip();\n      });\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      widget.routeObserver\n          ?.subscribe(this, ModalRoute.of(context)! as PageRoute<dynamic>);\n\n      if (widget.show) _showTooltip();\n    });\n  }\n\n  @override\n  void didUpdateWidget(MoonTooltip oldWidget) {\n    super.didUpdateWidget(oldWidget);\n\n    if (oldWidget.routeObserver != widget.routeObserver) {\n      oldWidget.routeObserver?.unsubscribe(this);\n      widget.routeObserver\n          ?.subscribe(this, ModalRoute.of(context)! as PageRoute<dynamic>);\n    }\n\n    WidgetsBinding.instance.addPostFrameCallback((Duration _) {\n      if (!_routeIsShowing) return;\n\n      if (oldWidget.tooltipPosition != widget.tooltipPosition) {\n        _removeTooltip(immediately: true);\n        _showTooltip();\n      } else if (shouldShowTooltip && _overlayEntry == null) {\n        _showTooltip();\n      } else if (!shouldShowTooltip && _overlayEntry != null) {\n        _removeTooltip();\n      }\n\n      _updateTooltip();\n    });\n  }\n\n  @override\n  void deactivate() {\n    if (_overlayEntry != null) _removeTooltip(immediately: true);\n\n    super.deactivate();\n  }\n\n  @override\n  void dispose() {\n    _animationController?.dispose();\n\n    if (_overlayEntry != null) _removeTooltip(immediately: true);\n\n    widget.routeObserver?.unsubscribe(this);\n\n    super.dispose();\n  }\n\n  Widget _createOverlayContent() {\n    MoonTooltipPosition tooltipPosition = widget.tooltipPosition;\n\n    final BorderRadiusGeometry effectiveBorderRadius = widget.borderRadius ??\n        context.moonTheme?.tooltipTheme.properties.borderRadius ??\n        MoonBorders.borders.interactiveXs;\n\n    final resolvedBorderRadius =\n        effectiveBorderRadius.resolve(Directionality.of(context));\n\n    final Color effectiveBackgroundColor = widget.backgroundColor ??\n        context.moonTheme?.tooltipTheme.colors.backgroundColor ??\n        MoonColors.light.goku;\n\n    final Color effectiveTextColor =\n        context.moonTheme?.tooltipTheme.colors.textColor ??\n            MoonColors.light.textPrimary;\n\n    final Color effectiveIconColor =\n        context.moonTheme?.tooltipTheme.colors.iconColor ??\n            MoonColors.light.iconPrimary;\n\n    final double effectiveArrowBaseWidth = widget.arrowBaseWidth ??\n        context.moonTheme?.tooltipTheme.properties.arrowBaseWidth ??\n        16;\n\n    final double effectiveArrowLength = widget.hasArrow\n        ? (widget.arrowLength ??\n            context.moonTheme?.tooltipTheme.properties.arrowLength ??\n            8)\n        : 0;\n\n    final double effectiveArrowTipDistance = widget.arrowTipDistance ??\n        context.moonTheme?.tooltipTheme.properties.arrowTipDistance ??\n        8;\n\n    final EdgeInsetsGeometry effectiveContentPadding = widget.contentPadding ??\n        context.moonTheme?.tooltipTheme.properties.contentPadding ??\n        const EdgeInsets.all(12);\n\n    final EdgeInsets resolvedContentPadding =\n        effectiveContentPadding.resolve(Directionality.of(context));\n\n    final List<BoxShadow> effectiveTooltipShadows = widget.tooltipShadows ??\n        context.moonTheme?.tooltipTheme.shadows.tooltipShadows ??\n        MoonShadows.light.sm;\n\n    final TextStyle effectiveTextStyle =\n        context.moonTheme?.tooltipTheme.properties.textStyle ??\n            MoonTypography.typography.body.text12;\n\n    final overlayRenderBox =\n        Overlay.of(context).context.findRenderObject()! as RenderBox;\n\n    final targetRenderBox = context.findRenderObject()! as RenderBox;\n\n    final tooltipTargetGlobalCenter = targetRenderBox.localToGlobal(\n      targetRenderBox.size.center(Offset.zero),\n      ancestor: overlayRenderBox,\n    );\n\n    final tooltipTargetGlobalLeft = targetRenderBox.localToGlobal(\n      targetRenderBox.size.centerLeft(Offset.zero),\n      ancestor: overlayRenderBox,\n    );\n\n    final tooltipTargetGlobalRight = targetRenderBox.localToGlobal(\n      targetRenderBox.size.centerRight(Offset.zero),\n      ancestor: overlayRenderBox,\n    );\n\n    if (Directionality.of(context) == TextDirection.rtl ||\n        tooltipPosition == MoonTooltipPosition.horizontal ||\n        tooltipPosition == MoonTooltipPosition.vertical) {\n      switch (tooltipPosition) {\n        case MoonTooltipPosition.left:\n          tooltipPosition = MoonTooltipPosition.right;\n        case MoonTooltipPosition.right:\n          tooltipPosition = MoonTooltipPosition.left;\n        case MoonTooltipPosition.topLeft:\n          tooltipPosition = MoonTooltipPosition.topRight;\n        case MoonTooltipPosition.topRight:\n          tooltipPosition = MoonTooltipPosition.topLeft;\n        case MoonTooltipPosition.bottomLeft:\n          tooltipPosition = MoonTooltipPosition.bottomRight;\n        case MoonTooltipPosition.bottomRight:\n          tooltipPosition = MoonTooltipPosition.bottomLeft;\n        case MoonTooltipPosition.vertical:\n          tooltipPosition = tooltipTargetGlobalCenter.dy <\n                  overlayRenderBox.size.center(Offset.zero).dy\n              ? MoonTooltipPosition.bottom\n              : MoonTooltipPosition.top;\n        case MoonTooltipPosition.horizontal:\n          tooltipPosition = tooltipTargetGlobalCenter.dx <\n                  overlayRenderBox.size.center(Offset.zero).dx\n              ? MoonTooltipPosition.right\n              : MoonTooltipPosition.left;\n        default:\n          break;\n      }\n    }\n\n    final tooltipPositionParameters = _resolveTooltipPositionParameters(\n      tooltipPosition: tooltipPosition,\n      arrowTipDistance: effectiveArrowTipDistance,\n      arrowLength: effectiveArrowLength,\n      overlayWidth: overlayRenderBox.size.width,\n      tooltipTargetGlobalLeft: tooltipTargetGlobalLeft.dx,\n      tooltipTargetGlobalCenter: tooltipTargetGlobalCenter.dx,\n      tooltipTargetGlobalRight: tooltipTargetGlobalRight.dx,\n    );\n\n    return Semantics(\n      label: widget.semanticLabel,\n      child: GestureDetector(\n        excludeFromSemantics: true,\n        behavior: HitTestBehavior.translucent,\n        onTapDown: _handleTap,\n        child: UnconstrainedBox(\n          child: CompositedTransformFollower(\n            link: _layerLink,\n            showWhenUnlinked: false,\n            offset: tooltipPositionParameters.offset,\n            followerAnchor: tooltipPositionParameters.followerAnchor,\n            targetAnchor: tooltipPositionParameters.targetAnchor,\n            child: RepaintBoundary(\n              child: FadeTransition(\n                opacity: _curvedAnimation!,\n                child: DefaultTextStyle(\n                  style: effectiveTextStyle.copyWith(color: effectiveTextColor),\n                  child: IconTheme(\n                    data: IconThemeData(color: effectiveIconColor),\n                    child: Container(\n                      key: _tooltipKey,\n                      constraints: BoxConstraints(\n                        minHeight: widget.minHeight ?? 0,\n                        minWidth: widget.minWidth ?? 0,\n                        maxHeight: widget.maxHeight ?? double.infinity,\n                        maxWidth: widget.maxWidth ??\n                            tooltipPositionParameters.tooltipMaxWidth,\n                      ),\n                      padding: resolvedContentPadding,\n                      decoration: ShapeDecorationWithPremultipliedAlpha(\n                        color: effectiveBackgroundColor,\n                        shadows: effectiveTooltipShadows,\n                        shape: TooltipShape(\n                          arrowBaseWidth: effectiveArrowBaseWidth,\n                          arrowLength: effectiveArrowLength,\n                          arrowOffset: widget.arrowOffsetValue,\n                          arrowTipDistance: effectiveArrowTipDistance,\n                          borderColor: widget.borderColor,\n                          borderRadius: resolvedBorderRadius,\n                          borderWidth: widget.borderWidth,\n                          childWidth: targetRenderBox.size.width,\n                          tooltipPosition: tooltipPosition,\n                        ),\n                      ),\n                      child: widget.content,\n                    ),\n                  ),\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final Duration effectiveTransitionDuration = widget.transitionDuration ??\n        context.moonTheme?.tooltipTheme.properties.transitionDuration ??\n        const Duration(milliseconds: 150);\n\n    final Curve effectiveTransitionCurve = widget.transitionCurve ??\n        context.moonTheme?.tooltipTheme.properties.transitionCurve ??\n        MoonTransitions.transitions.defaultTransitionCurve;\n\n    _animationController ??= AnimationController(\n      duration: effectiveTransitionDuration,\n      vsync: this,\n    );\n\n    _curvedAnimation ??= CurvedAnimation(\n      parent: _animationController!,\n      curve: effectiveTransitionCurve,\n    );\n\n    return CompositedTransformTarget(\n      link: _layerLink,\n      child: widget.child,\n    );\n  }\n}\n\nclass _TooltipPositionProperties {\n  final Offset offset;\n  final Alignment followerAnchor;\n  final Alignment targetAnchor;\n  final double tooltipMaxWidth;\n\n  _TooltipPositionProperties({\n    required this.offset,\n    required this.followerAnchor,\n    required this.targetAnchor,\n    required this.tooltipMaxWidth,\n  });\n}\n"
  },
  {
    "path": "lib/src/widgets/tooltip/tooltip_shape.dart",
    "content": "import 'dart:math';\n\nimport 'package:flutter/material.dart';\n\nimport 'package:moon_design/src/utils/squircle/squircle_radius.dart';\nimport 'package:moon_design/src/widgets/tooltip/tooltip.dart';\n\nclass TooltipShape extends ShapeBorder {\n  final BorderRadius borderRadius;\n  final Color borderColor;\n  final double borderWidth;\n  final double arrowOffset;\n  final double arrowBaseWidth;\n  final double arrowLength;\n  final double arrowTipDistance;\n  final double childWidth;\n  final MoonTooltipPosition tooltipPosition;\n\n  const TooltipShape({\n    required this.borderRadius,\n    required this.borderColor,\n    required this.borderWidth,\n    this.arrowOffset = 0,\n    required this.arrowBaseWidth,\n    required this.arrowLength,\n    required this.arrowTipDistance,\n    required this.childWidth,\n    required this.tooltipPosition,\n  });\n\n  @override\n  EdgeInsetsGeometry get dimensions => EdgeInsets.zero;\n\n  @override\n  Path getInnerPath(Rect rect, {TextDirection? textDirection}) {\n    return Path()\n      ..fillType = PathFillType.evenOdd\n      ..addPath(getOuterPath(rect), Offset.zero);\n  }\n\n  @override\n  Path getOuterPath(Rect rect, {TextDirection? textDirection}) {\n    final double topLeftRadius = borderRadius.topLeft.x;\n    final double topRightRadius = borderRadius.topRight.x;\n    final double bottomLeftRadius = borderRadius.bottomLeft.x;\n    final double bottomRightRadius = borderRadius.bottomRight.x;\n\n    Offset tooltipCenter = rect.center;\n\n    Path getLeftTopPath(Rect rect) {\n      return Path()\n        ..moveTo(rect.left, rect.bottom - bottomLeftRadius)\n        ..lineTo(rect.left, rect.top + topLeftRadius)\n        ..arcToPoint(\n          Offset(rect.left + topLeftRadius, rect.top),\n          radius: MoonSquircleRadius(cornerRadius: topLeftRadius),\n        )\n        ..lineTo(rect.right - topRightRadius, rect.top)\n        ..arcToPoint(\n          Offset(rect.right, rect.top + topRightRadius),\n          radius: MoonSquircleRadius(cornerRadius: topRightRadius),\n        );\n    }\n\n    Path getBottomRightPath(Rect rect) {\n      return Path()\n        ..moveTo(rect.left + bottomLeftRadius, rect.bottom)\n        ..lineTo(rect.right - bottomRightRadius, rect.bottom)\n        ..arcToPoint(\n          Offset(rect.right, rect.bottom - bottomRightRadius),\n          radius: MoonSquircleRadius(cornerRadius: bottomRightRadius),\n          clockwise: false,\n        )\n        ..lineTo(rect.right, rect.top + topRightRadius)\n        ..arcToPoint(\n          Offset(rect.right - topRightRadius, rect.top),\n          radius: MoonSquircleRadius(cornerRadius: topRightRadius),\n          clockwise: false,\n        );\n    }\n\n    if (tooltipPosition == MoonTooltipPosition.right) {\n      tooltipCenter =\n          rect.centerLeft.translate(-arrowLength - arrowTipDistance, 0);\n    } else if (tooltipPosition == MoonTooltipPosition.left) {\n      tooltipCenter =\n          rect.centerRight.translate(arrowLength + arrowTipDistance, 0);\n    }\n\n    switch (tooltipPosition) {\n      case MoonTooltipPosition.top:\n        return getLeftTopPath(rect)\n          ..lineTo(rect.right, rect.bottom - bottomRightRadius)\n          ..arcToPoint(\n            Offset(rect.right - bottomRightRadius, rect.bottom),\n            radius: MoonSquircleRadius(cornerRadius: bottomRightRadius),\n          )\n          // To corner of arrow base.\n          ..lineTo(\n            min(\n              max(\n                arrowOffset + tooltipCenter.dx + arrowBaseWidth / 2,\n                rect.left + bottomLeftRadius + arrowBaseWidth,\n              ),\n              rect.right - bottomRightRadius,\n            ),\n            rect.bottom,\n          )\n          // To arrow tip.\n          ..lineTo(arrowOffset + tooltipCenter.dx, rect.bottom + arrowLength)\n          // To opposite corner of arrow base.\n          ..lineTo(\n            max(\n              min(\n                arrowOffset + tooltipCenter.dx - arrowBaseWidth / 2,\n                rect.right - bottomRightRadius - arrowBaseWidth,\n              ),\n              rect.left + bottomLeftRadius,\n            ),\n            rect.bottom,\n          )\n          ..lineTo(rect.left + bottomLeftRadius, rect.bottom)\n          ..arcToPoint(\n            Offset(rect.left, rect.bottom - bottomLeftRadius),\n            radius: MoonSquircleRadius(cornerRadius: bottomLeftRadius),\n          )\n          ..lineTo(rect.left, rect.top + topLeftRadius)\n          ..arcToPoint(\n            Offset(rect.left + topLeftRadius, rect.top),\n            radius: MoonSquircleRadius(cornerRadius: topLeftRadius),\n          );\n\n      case MoonTooltipPosition.bottom:\n        return getBottomRightPath(rect)\n          // To corner of arrow base.\n          ..lineTo(\n            min(\n              max(\n                arrowOffset + tooltipCenter.dx + arrowBaseWidth / 2,\n                rect.left + topRightRadius + arrowBaseWidth,\n              ),\n              rect.right - topRightRadius,\n            ),\n            rect.top,\n          )\n          // To arrow tip.\n          ..lineTo(arrowOffset + tooltipCenter.dx, rect.top - arrowLength)\n          // To opposite corner of arrow base.\n          ..lineTo(\n            max(\n              min(\n                arrowOffset + tooltipCenter.dx - arrowBaseWidth / 2,\n                rect.right - topLeftRadius - arrowBaseWidth,\n              ),\n              rect.left + topLeftRadius,\n            ),\n            rect.top,\n          )\n          ..lineTo(rect.left + topLeftRadius, rect.top)\n          ..arcToPoint(\n            Offset(rect.left, rect.top + topLeftRadius),\n            radius: MoonSquircleRadius(cornerRadius: topLeftRadius),\n            clockwise: false,\n          )\n          ..lineTo(rect.left, rect.bottom - bottomLeftRadius)\n          ..arcToPoint(\n            Offset(rect.left + bottomLeftRadius, rect.bottom),\n            radius: MoonSquircleRadius(cornerRadius: bottomLeftRadius),\n            clockwise: false,\n          );\n\n      case MoonTooltipPosition.left:\n        return getLeftTopPath(rect)\n          // To corner of arrow base.\n          ..lineTo(\n            rect.right,\n            max(\n              min(\n                -arrowOffset + tooltipCenter.dy - arrowBaseWidth / 2,\n                rect.bottom - bottomRightRadius - arrowBaseWidth,\n              ),\n              rect.top + topRightRadius,\n            ),\n          )\n          // To arrow tip.\n          ..lineTo(\n            tooltipCenter.dx - arrowTipDistance,\n            -arrowOffset + tooltipCenter.dy,\n          )\n          // To opposite corner of arrow base.\n          ..lineTo(\n            rect.right,\n            min(\n              max(\n                -arrowOffset + tooltipCenter.dy + arrowBaseWidth / 2,\n                rect.top + topRightRadius + arrowBaseWidth,\n              ),\n              rect.bottom - bottomRightRadius,\n            ),\n          )\n          ..lineTo(rect.right, rect.bottom - bottomRightRadius)\n          ..arcToPoint(\n            Offset(rect.right - bottomRightRadius, rect.bottom),\n            radius: MoonSquircleRadius(cornerRadius: bottomRightRadius),\n          )\n          ..lineTo(rect.left + bottomLeftRadius, rect.bottom)\n          ..arcToPoint(\n            Offset(rect.left, rect.bottom - bottomLeftRadius),\n            radius: MoonSquircleRadius(cornerRadius: bottomLeftRadius),\n          );\n\n      case MoonTooltipPosition.right:\n        return getBottomRightPath(rect)\n          ..lineTo(rect.left + topLeftRadius, rect.top)\n          ..arcToPoint(\n            Offset(rect.left, rect.top + topLeftRadius),\n            radius: MoonSquircleRadius(cornerRadius: topLeftRadius),\n            clockwise: false,\n          )\n          // To corner of arrow base.\n          ..lineTo(\n            rect.left,\n            max(\n              min(\n                -arrowOffset + tooltipCenter.dy - arrowBaseWidth / 2,\n                rect.bottom - bottomLeftRadius - arrowBaseWidth,\n              ),\n              rect.top + topLeftRadius,\n            ),\n          )\n          // To arrow tip.\n          ..lineTo(\n            tooltipCenter.dx + arrowTipDistance,\n            -arrowOffset + tooltipCenter.dy,\n          )\n          // To opposite corner of arrow base.\n          ..lineTo(\n            rect.left,\n            min(\n              max(\n                -arrowOffset + tooltipCenter.dy + arrowBaseWidth / 2,\n                rect.top + topLeftRadius + arrowBaseWidth,\n              ),\n              rect.bottom - bottomLeftRadius,\n            ),\n          )\n          ..lineTo(rect.left, rect.bottom - bottomLeftRadius)\n          ..arcToPoint(\n            Offset(rect.left + bottomLeftRadius, rect.bottom),\n            radius: MoonSquircleRadius(cornerRadius: bottomLeftRadius),\n            clockwise: false,\n          );\n\n      case MoonTooltipPosition.topLeft:\n        return getLeftTopPath(rect)\n          ..lineTo(rect.right, rect.bottom - bottomRightRadius)\n          ..arcToPoint(\n            Offset(rect.right - bottomRightRadius, rect.bottom),\n            radius: MoonSquircleRadius(cornerRadius: bottomRightRadius),\n          )\n          // To corner of arrow base.\n          ..lineTo(\n            min(\n              rect.right - bottomRightRadius,\n              max(\n                arrowOffset +\n                    rect.right -\n                    (childWidth / 2) +\n                    (arrowBaseWidth / 2),\n                rect.left + bottomLeftRadius + arrowBaseWidth,\n              ),\n            ),\n            rect.bottom,\n          )\n          // To arrow tip.\n          ..lineTo(\n            arrowOffset + rect.right - (childWidth / 2),\n            rect.bottom + arrowLength,\n          )\n          // To opposite corner of arrow base.\n          ..lineTo(\n            max(\n              min(\n                arrowOffset +\n                    rect.right -\n                    (childWidth / 2) -\n                    (arrowBaseWidth / 2),\n                rect.right - bottomRightRadius - arrowBaseWidth,\n              ),\n              rect.left + bottomLeftRadius,\n            ),\n            rect.bottom,\n          )\n          ..lineTo(rect.left + bottomLeftRadius, rect.bottom)\n          ..arcToPoint(\n            Offset(rect.left, rect.bottom - bottomLeftRadius),\n            radius: MoonSquircleRadius(cornerRadius: bottomLeftRadius),\n          )\n          ..lineTo(rect.left, rect.top + topLeftRadius)\n          ..arcToPoint(\n            Offset(rect.left + topLeftRadius, rect.top),\n            radius: MoonSquircleRadius(cornerRadius: topLeftRadius),\n          );\n\n      case MoonTooltipPosition.topRight:\n        return getLeftTopPath(rect)\n          ..lineTo(rect.right, rect.bottom - bottomRightRadius)\n          ..arcToPoint(\n            Offset(rect.right - bottomRightRadius, rect.bottom),\n            radius: MoonSquircleRadius(cornerRadius: bottomRightRadius),\n          )\n          // To corner of arrow base.\n          ..lineTo(\n            min(\n              max(\n                arrowOffset +\n                    rect.left +\n                    (childWidth / 2) +\n                    (arrowBaseWidth / 2),\n                rect.left + bottomLeftRadius + arrowBaseWidth,\n              ),\n              rect.right - bottomRightRadius,\n            ),\n            rect.bottom,\n          )\n          // To arrow tip.\n          ..lineTo(\n            arrowOffset + rect.left + (childWidth / 2),\n            rect.bottom + arrowLength,\n          )\n          // To opposite corner of arrow base.\n          ..lineTo(\n            max(\n              min(\n                arrowOffset +\n                    rect.left +\n                    (childWidth / 2) -\n                    (arrowBaseWidth / 2),\n                rect.right - bottomRightRadius - arrowBaseWidth,\n              ),\n              rect.left + bottomLeftRadius,\n            ),\n            rect.bottom,\n          )\n          ..lineTo(rect.left + bottomLeftRadius, rect.bottom)\n          ..arcToPoint(\n            Offset(rect.left, rect.bottom - bottomLeftRadius),\n            radius: MoonSquircleRadius(cornerRadius: bottomLeftRadius),\n          )\n          ..lineTo(rect.left, rect.top + topLeftRadius)\n          ..arcToPoint(\n            Offset(rect.left + topLeftRadius, rect.top),\n            radius: MoonSquircleRadius(cornerRadius: topLeftRadius),\n          );\n\n      case MoonTooltipPosition.bottomLeft:\n        return getBottomRightPath(rect)\n          // To corner of arrow base.\n          ..lineTo(\n            min(\n              max(\n                arrowOffset +\n                    rect.right -\n                    (childWidth / 2) +\n                    (arrowBaseWidth / 2),\n                rect.left + topRightRadius + arrowBaseWidth,\n              ),\n              rect.right - topRightRadius,\n            ),\n            rect.top,\n          )\n          // To arrow tip.\n          ..lineTo(\n            arrowOffset + rect.right - (childWidth / 2),\n            rect.top - arrowLength,\n          )\n          // To opposite corner of arrow base.\n          ..lineTo(\n            max(\n              min(\n                arrowOffset +\n                    rect.right -\n                    (childWidth / 2) -\n                    (arrowBaseWidth / 2),\n                rect.right - bottomRightRadius - arrowBaseWidth,\n              ),\n              rect.left + topLeftRadius,\n            ),\n            rect.top,\n          )\n          ..lineTo(rect.left + topLeftRadius, rect.top)\n          ..arcToPoint(\n            Offset(rect.left, rect.top + topLeftRadius),\n            radius: MoonSquircleRadius(cornerRadius: topLeftRadius),\n            clockwise: false,\n          )\n          ..lineTo(rect.left, rect.bottom - bottomLeftRadius)\n          ..arcToPoint(\n            Offset(rect.left + bottomLeftRadius, rect.bottom),\n            radius: MoonSquircleRadius(cornerRadius: bottomLeftRadius),\n            clockwise: false,\n          );\n\n      case MoonTooltipPosition.bottomRight:\n        return getBottomRightPath(rect)\n          // To corner of arrow base.\n          ..lineTo(\n            min(\n              max(\n                arrowOffset +\n                    rect.left +\n                    (childWidth / 2) +\n                    (arrowBaseWidth / 2),\n                rect.left + topRightRadius + arrowBaseWidth,\n              ),\n              rect.right - topRightRadius,\n            ),\n            rect.top,\n          )\n          // To arrow tip.\n          ..lineTo(\n            arrowOffset + rect.left + (childWidth / 2),\n            rect.top - arrowLength,\n          )\n          // To opposite corner of arrow base.\n          ..lineTo(\n            max(\n              min(\n                arrowOffset +\n                    rect.left +\n                    (childWidth / 2) -\n                    (arrowBaseWidth / 2),\n                rect.right - bottomRightRadius - arrowBaseWidth,\n              ),\n              rect.left + topLeftRadius,\n            ),\n            rect.top,\n          )\n          ..lineTo(rect.left + topLeftRadius, rect.top)\n          ..arcToPoint(\n            Offset(rect.left, rect.top + topLeftRadius),\n            radius: MoonSquircleRadius(cornerRadius: topLeftRadius),\n            clockwise: false,\n          )\n          ..lineTo(rect.left, rect.bottom - bottomLeftRadius)\n          ..arcToPoint(\n            Offset(rect.left + bottomLeftRadius, rect.bottom),\n            radius: MoonSquircleRadius(cornerRadius: bottomLeftRadius),\n            clockwise: false,\n          );\n\n      default:\n        throw AssertionError(tooltipPosition);\n    }\n  }\n\n  @override\n  void paint(Canvas canvas, Rect rect, {TextDirection? textDirection}) {\n    final Paint paint = Paint()\n      // If borderWidth is set to 0, set the color to be transparent to avoid\n      // strange behavior with border.\n      ..color = borderWidth == 0 ? Colors.transparent : borderColor\n      ..style = PaintingStyle.stroke\n      ..strokeWidth = borderWidth;\n\n    canvas.drawPath(getOuterPath(rect), paint);\n    canvas.clipPath(getOuterPath(rect));\n  }\n\n  @override\n  ShapeBorder scale(double t) {\n    return TooltipShape(\n      tooltipPosition: tooltipPosition,\n      arrowOffset: arrowOffset,\n      arrowBaseWidth: arrowBaseWidth,\n      arrowLength: arrowLength,\n      arrowTipDistance: arrowTipDistance,\n      borderRadius: borderRadius,\n      borderWidth: borderWidth,\n      childWidth: childWidth,\n      borderColor: borderColor,\n    );\n  }\n}\n"
  },
  {
    "path": "pubspec.yaml",
    "content": "name: moon_design\ndescription: Moon Design System for Flutter. A set of coherent, themable, and extensible widgets following the Moon Design System.\nversion: 1.1.0\nhomepage: https://flutter.moon.io/\nrepository: https://github.com/coingaming/moon_flutter\n\nenvironment:\n  sdk: '>=3.3.1 <4.0.0'\n  flutter: \">=1.17.0\"\n\ndependencies:\n  flutter:\n    sdk: flutter\n  moon_icons: ^1.1.0\n  moon_tokens: ^0.0.6\n\ndev_dependencies:\n  flutter_test:\n    sdk: flutter    \n  lint: ^2.1.2\n\nflutter:\n  uses-material-design: true\n"
  },
  {
    "path": "release-please-config.json",
    "content": "{\n  \"include-component-in-tag\": false,\n  \"packages\": {\n    \".\": {\n      \"release-type\": \"dart\",\n      \"draft\": false,\n      \"prerelease\": false,\n      \"extra-files\": [\n        {\n          \"type\": \"yaml\",\n          \"path\": \"example/pubspec.yaml\",\n          \"jsonpath\": \"$.version\"\n        }\n      ]\n    }\n  }\n}"
  },
  {
    "path": "test/accordion_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nenum _AccordionItems { first, second }\n\nconst Key _accordionKey = Key(\"accordionKey\");\nconst Key _firstAccordionKey = Key(\"firstAccordionKey\");\nconst Key _firstAccordionChildKey = Key(\"firstAccordionChildKey\");\nconst Key _secondAccordionKey = Key(\"secondAccordionKey\");\nconst Key _secondAccordionChildKey = Key(\"secondAccordionChildKey\");\n\nconst String _accordionLabel = \"Label\";\nconst String _accordionContent = \"Content\";\nconst IconData _accordionTrailingIcon = MoonIcons.other_frame_24_light;\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _AccordionTestWidget(\n        accordionKey: _accordionKey,\n      ),\n    );\n\n    expect(find.byKey(_accordionKey), findsOneWidget);\n  });\n\n  group('Single accordion', () {\n    testWidgets(\"Accordion expands when tapped.\", (tester) async {\n      await tester.pumpWidget(const _SingleAccordionTestWidget());\n      final accordion = find.byKey(_firstAccordionKey);\n      final child = find.byKey(_firstAccordionChildKey);\n\n      expect(accordion, findsOneWidget);\n      expect(child, findsNothing);\n      expect(find.text(_accordionLabel), findsOneWidget);\n      expect(find.byIcon(_accordionTrailingIcon), findsOneWidget);\n\n      await tester.tap(accordion);\n      await tester.pumpAndSettle();\n\n      expect(child, findsOneWidget);\n      expect(find.text(_accordionContent), findsOneWidget);\n    });\n\n    testWidgets(\"Disabled accordion does not expand when tapped.\",\n        (tester) async {\n      await tester.pumpWidget(\n        const _SingleAccordionTestWidget(\n          isDisabled: true,\n        ),\n      );\n      final accordion = find.byKey(_firstAccordionKey);\n      final child = find.byKey(_firstAccordionChildKey);\n\n      expect(accordion, findsOneWidget);\n      expect(child, findsNothing);\n\n      await tester.tap(accordion);\n      await tester.pumpAndSettle();\n\n      expect(child, findsNothing);\n    });\n  });\n\n  group('Grouped accordion', () {\n    testWidgets(\"First accordion collapses when second accordion expands.\",\n        (tester) async {\n      await tester.pumpWidget(const _GroupedAccordionTestWidget());\n      // First accordion.\n      final accordion1 = find.byKey(_firstAccordionKey);\n      final child1 = find.byKey(_firstAccordionChildKey);\n      // Second accordion.\n      final accordion2 = find.byKey(_secondAccordionKey);\n      final child2 = find.byKey(_secondAccordionChildKey);\n\n      // Initially, the first accordion is expanded.\n      expect(accordion1, findsOneWidget);\n      expect(accordion2, findsOneWidget);\n      expect(child1, findsOneWidget);\n      expect(child2, findsNothing);\n\n      // Tap on the second accordion to expand it and collapse the first one.\n      await tester.tap(accordion2);\n      await tester.pumpAndSettle();\n\n      expect(child2, findsOneWidget);\n      expect(child1, findsNothing);\n\n      // Tap on the second accordion again to collapse it.\n      await tester.tap(accordion2);\n      await tester.pumpAndSettle();\n\n      expect(child2, findsNothing);\n      expect(child1, findsNothing);\n    });\n  });\n}\n\nclass _AccordionTestWidget extends StatelessWidget {\n  final Key? accordionKey;\n\n  const _AccordionTestWidget({this.accordionKey});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonAccordion<_AccordionItems>(\n          key: accordionKey,\n          label: const Text(_accordionLabel),\n        ),\n      ),\n    );\n  }\n}\n\nclass _SingleAccordionTestWidget extends StatelessWidget {\n  final bool isDisabled;\n\n  const _SingleAccordionTestWidget({this.isDisabled = false});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonAccordion<_AccordionItems>(\n          key: _firstAccordionKey,\n          isDisabled: isDisabled,\n          leading: const Icon(_accordionTrailingIcon),\n          label: const Text(_accordionLabel),\n          children: const [\n            Text(\n              key: _firstAccordionChildKey,\n              _accordionContent,\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n\nclass _GroupedAccordionTestWidget extends StatefulWidget {\n  const _GroupedAccordionTestWidget();\n\n  @override\n  State<_GroupedAccordionTestWidget> createState() =>\n      _GroupedAccordionTestWidgetState();\n}\n\nclass _GroupedAccordionTestWidgetState\n    extends State<_GroupedAccordionTestWidget> {\n  _AccordionItems? _currentlyOpenAccordionItem = _AccordionItems.first;\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: ListView(\n          children: [\n            MoonAccordion<_AccordionItems>(\n              key: _firstAccordionKey,\n              identityValue: _AccordionItems.first,\n              groupIdentityValue: _currentlyOpenAccordionItem,\n              onExpansionChanged: (_AccordionItems? value) =>\n                  setState(() => _currentlyOpenAccordionItem = value),\n              leading: const Icon(MoonIcons.other_frame_24_light),\n              label: const Text(\"Grouped MoonAccordion item #1\"),\n              children: const [\n                Text(\n                  key: _firstAccordionChildKey,\n                  _accordionContent,\n                ),\n              ],\n            ),\n            MoonAccordion<_AccordionItems>(\n              key: _secondAccordionKey,\n              identityValue: _AccordionItems.second,\n              groupIdentityValue: _currentlyOpenAccordionItem,\n              onExpansionChanged: (_AccordionItems? value) =>\n                  setState(() => _currentlyOpenAccordionItem = value),\n              leading: const Icon(MoonIcons.other_frame_24_light),\n              label: const Text(\"Grouped MoonAccordion item #2\"),\n              children: const [\n                Text(\n                  key: _secondAccordionChildKey,\n                  _accordionContent,\n                ),\n              ],\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/alert_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _alertKey = Key(\"alertKey\");\nconst Key _closeButtonKey = Key(\"closeButtonKey\");\n\nconst String _alertLabel = \"Label\";\nconst String _alertBody = \"Body\";\nconst IconData _alertLeadingIcon = MoonIcons.other_frame_24_light;\nconst IconData _alertTrailingIcon = MoonIcons.controls_close_small_24_light;\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _AlertTestWidget(\n        alertKey: _alertKey,\n      ),\n    );\n\n    expect(find.byKey(_alertKey), findsOneWidget);\n  });\n\n  testWidgets(\n      \"Alert has only label widget and no leading, trailing or body widget.\",\n      (tester) async {\n    await tester.pumpWidget(const _AlertTestWidget());\n\n    expect(find.text(_alertLabel), findsOneWidget);\n    expect(find.text(_alertBody), findsNothing);\n    expect(find.byIcon(_alertTrailingIcon), findsNothing);\n    expect(find.byIcon(_alertLeadingIcon), findsNothing);\n  });\n\n  testWidgets(\"Alert has a leading, trailing and body widget.\", (tester) async {\n    await tester.pumpWidget(\n      const _AlertTestWidget(\n        showLeading: true,\n        showBody: true,\n        showTrailing: true,\n      ),\n    );\n\n    expect(find.text(_alertLabel), findsOneWidget);\n    expect(find.text(_alertBody), findsOneWidget);\n    expect(find.byIcon(_alertTrailingIcon), findsOneWidget);\n    expect(find.byIcon(_alertLeadingIcon), findsOneWidget);\n  });\n\n  testWidgets(\"Alert is not visible when the 'close' button is tapped.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _AlertTestWidget(\n        showTrailing: true,\n      ),\n    );\n    final trailing = find.byKey(_closeButtonKey);\n\n    expect(find.text(_alertLabel), findsOneWidget);\n    expect(trailing, findsOneWidget);\n\n    await tester.tap(trailing, warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(find.text(_alertLabel), findsNothing);\n  });\n}\n\nclass _AlertTestWidget extends StatefulWidget {\n  final Key? alertKey;\n  final bool showLeading;\n  final bool showTrailing;\n  final bool showBody;\n\n  const _AlertTestWidget({\n    this.alertKey,\n    this.showLeading = false,\n    this.showTrailing = false,\n    this.showBody = false,\n  });\n\n  @override\n  State<_AlertTestWidget> createState() => _AlertTestWidgetState();\n}\n\nclass _AlertTestWidgetState extends State<_AlertTestWidget> {\n  bool _showAlert = true;\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonAlert(\n          key: widget.alertKey,\n          show: _showAlert,\n          leading: widget.showLeading ? const Icon(_alertLeadingIcon) : null,\n          label: const Text(_alertLabel),\n          trailing: widget.showTrailing\n              ? MoonButton.icon(\n                  key: _closeButtonKey,\n                  icon: const Icon(_alertTrailingIcon),\n                  onTap: () => setState(() => _showAlert = !_showAlert),\n                )\n              : null,\n          content: widget.showBody ? const Text(_alertBody) : null,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/auth_code_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _authCodeKey = Key(\"authCodeKey\");\n\nconst String _validatorErrorMessage = 'Validator error message.';\nconst String _providedErrorMessage = 'Provided error message.';\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _AuthCodeTestWidget(\n        authCodeKey: _authCodeKey,\n      ),\n    );\n\n    expect(find.byKey(_authCodeKey), findsOneWidget);\n  });\n\n  testWidgets(\"When valid code is entered, error message is not shown.\",\n      (tester) async {\n    await tester.pumpWidget(const _AuthCodeTestWidget());\n    final widget = find.byType(TextFormField).first;\n\n    await tester.enterText(widget, '9921');\n    await tester.pump();\n\n    expect(find.text(_validatorErrorMessage), findsNothing);\n  });\n\n  testWidgets(\"When invalid code is entered, error message is shown.\",\n      (tester) async {\n    await tester.pumpWidget(const _AuthCodeTestWidget());\n    final widget = find.byType(TextFormField).first;\n\n    await tester.enterText(widget, '1111');\n    await tester.pump();\n\n    expect(find.text(_validatorErrorMessage), findsOneWidget);\n  });\n\n  testWidgets(\"Validator errors take precedence over the provided errorText.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _AuthCodeTestWidget(\n        providedErrorMessage: _providedErrorMessage,\n      ),\n    );\n    final widget = find.byType(TextFormField).first;\n\n    expect(find.text(_providedErrorMessage), findsOneWidget);\n\n    await tester.enterText(widget, '1111');\n    await tester.pump();\n\n    expect(find.text(_providedErrorMessage), findsNothing);\n    expect(find.text(_validatorErrorMessage), findsOneWidget);\n  });\n}\n\nclass _AuthCodeTestWidget extends StatelessWidget {\n  final Key? authCodeKey;\n  final String? providedErrorMessage;\n\n  const _AuthCodeTestWidget({this.authCodeKey, this.providedErrorMessage});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Directionality(\n          textDirection: TextDirection.ltr,\n          child: MoonAuthCode(\n            key: authCodeKey,\n            authInputFieldCount: 4,\n            errorText: providedErrorMessage,\n            validator: (String? pin) => pin?.length == 4 && pin != '9921'\n                ? _validatorErrorMessage\n                : null,\n            errorBuilder: (BuildContext context, String? errorText) =>\n                Text(errorText ?? ''),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/bottom_sheet_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _bottomSheetKey = Key(\"bottomSheetKey\");\nconst Key _showButtonKey = Key(\"showButtonKey\");\n\nconst Widget _bottomSheetContent = Text(\"Content\");\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _BottomSheetTestWidget(\n        key: _bottomSheetKey,\n      ),\n    );\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byKey(_bottomSheetKey), findsOneWidget);\n  });\n\n  testWidgets(\"Bottom sheet is displayed when the 'show' button is tapped.\",\n      (tester) async {\n    await tester.pumpWidget(const _BottomSheetTestWidget());\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_bottomSheetContent), findsOneWidget);\n  });\n\n  testWidgets(\n      \"Bottom sheet closes when a tap occurs outside its content, \"\n      \"if dismissible.\", (tester) async {\n    await tester.pumpWidget(const _BottomSheetTestWidget());\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_bottomSheetContent), findsOneWidget);\n\n    await tester.tapAt(const Offset(10, 10));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_bottomSheetContent), findsNothing);\n  });\n\n  testWidgets(\n      \"Bottom sheet stays visible when a tap occurs outside its content, \"\n      \"if not dismissible.\", (tester) async {\n    await tester.pumpWidget(\n      const _BottomSheetTestWidget(\n        isDismissible: false,\n      ),\n    );\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_bottomSheetContent), findsOneWidget);\n\n    await tester.tapAt(const Offset(10, 10));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_bottomSheetContent), findsOneWidget);\n  });\n\n  testWidgets(\"Bottom sheet is expanded.\", (tester) async {\n    await tester.pumpWidget(\n      const _BottomSheetTestWidget(\n        isExpanded: true,\n      ),\n    );\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_bottomSheetContent), findsOneWidget);\n\n    await tester.tapAt(const Offset(1, 1));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_bottomSheetContent), findsOneWidget);\n\n    await tester.tapAt(const Offset(100, 1));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_bottomSheetContent), findsOneWidget);\n  });\n}\n\nclass _BottomSheetTestWidget extends StatelessWidget {\n  final bool isDismissible;\n  final bool isExpanded;\n\n  const _BottomSheetTestWidget({\n    super.key,\n    this.isDismissible = true,\n    this.isExpanded = false,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Builder(\n          builder: (BuildContext context) {\n            return MoonFilledButton(\n              key: _showButtonKey,\n              onTap: () => bottomSheetBuilder(context),\n            );\n          },\n        ),\n      ),\n    );\n  }\n\n  Future<dynamic> bottomSheetBuilder(BuildContext context) {\n    return showMoonModalBottomSheet(\n      context: context,\n      isExpanded: isExpanded,\n      isDismissible: isDismissible,\n      builder: (BuildContext context) => _bottomSheetContent,\n    );\n  }\n}\n"
  },
  {
    "path": "test/breadcrumb_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _breadcrumbKey = Key(\"breadcrumbKey\");\n\nconst String _showMoreButtonText = '...';\nconst String _breadcrumbItem = 'breadcrumb item';\nconst IconData _breadcrumbLeadingIcon = MoonIcons.other_frame_24_light;\nconst IconData _breadcrumbDividerIcon =\n    MoonIcons.arrows_chevron_right_double_16_light;\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _BreadCrumbTestWidget(\n        breadcrumbKey: _breadcrumbKey,\n      ),\n    );\n\n    expect(find.byKey(_breadcrumbKey), findsOneWidget);\n  });\n\n  testWidgets(\n      \"Tapping on a 'show more' button expands collapsed items, and the \"\n      \"button itself becomes hidden.\", (tester) async {\n    await tester.pumpWidget(const _BreadCrumbTestWidget());\n    final moreButton = find.text(_showMoreButtonText);\n\n    expect(moreButton, findsOneWidget);\n    // Collapsed item with index 1 is not visible.\n    expect(find.textContaining('1'), findsNothing);\n\n    await tester.tap(moreButton, warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    // Collapsed item with index 1 is visible.\n    expect(find.textContaining('1'), findsOneWidget);\n    expect(find.textContaining(_showMoreButtonText), findsNothing);\n  });\n\n  testWidgets(\"Breadcrumb item has a leading, divider and label widget.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _BreadCrumbTestWidget(\n        showLeading: true,\n      ),\n    );\n\n    expect(find.textContaining(_breadcrumbItem), findsWidgets);\n    expect(find.byIcon(_breadcrumbLeadingIcon), findsWidgets);\n    expect(find.byIcon(_breadcrumbDividerIcon), findsWidgets);\n  });\n\n  testWidgets(\n      \"Only N items are shown, where N is defined by the value of itemsToShow.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _BreadCrumbTestWidget(\n        itemsToShow: 3,\n      ),\n    );\n    final moreButton = find.textContaining(_showMoreButtonText);\n\n    expect(moreButton, findsOneWidget);\n    expect(find.textContaining(_breadcrumbItem), findsNWidgets(3));\n\n    await tester.tap(moreButton, warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(find.textContaining(_breadcrumbItem), findsNWidgets(4));\n  });\n\n  testWidgets(\"Breadcrumb item callback works.\", (tester) async {\n    int value = 0;\n\n    await tester.pumpWidget(\n      _BreadCrumbTestWidget(\n        onTap: (index) => value = index,\n      ),\n    );\n    final moreButton = find.text(_showMoreButtonText);\n\n    // Find breadcrumb item with index 2 and tap on it.\n    await tester.tap(find.textContaining('2'), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 2);\n\n    // Find breadcrumb item with index 0 and tap on it.\n    await tester.tap(find.textContaining('0'), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 0);\n    expect(moreButton, findsOneWidget);\n\n    await tester.tap(moreButton, warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    // Find initially collapsed breadcrumb item with index 1 and tap on it.\n    await tester.tap(find.textContaining('1'), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 1);\n    // Tapping on a 'show more' button expands collapsed items, and the button\n    // itself becomes hidden.\n    expect(moreButton, findsNothing);\n  });\n}\n\nclass _BreadCrumbTestWidget extends StatelessWidget {\n  final Key? breadcrumbKey;\n  final bool showLeading;\n  final int? itemsToShow;\n  final void Function(int)? onTap;\n\n  const _BreadCrumbTestWidget({\n    this.breadcrumbKey,\n    this.showLeading = false,\n    this.itemsToShow,\n    this.onTap,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: SingleChildScrollView(\n          scrollDirection: Axis.horizontal,\n          child: MoonBreadcrumb(\n            key: breadcrumbKey,\n            visibleItemCount: itemsToShow ?? 3,\n            divider: const Icon(_breadcrumbDividerIcon),\n            items: [\n              ...List.generate(4, (i) => i).map(\n                (int index) {\n                  return MoonBreadcrumbItem(\n                    label: Text('$_breadcrumbItem $index'),\n                    leading:\n                        showLeading ? const Icon(_breadcrumbLeadingIcon) : null,\n                    onTap: () => onTap?.call(index),\n                  );\n                },\n              ),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/button_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _buttonKey = Key(\"buttonKey\");\n\nconst String _buttonLabel = \"Label\";\nconst IconData _buttonLeadingIcon = MoonIcons.other_frame_24_light;\nconst IconData _buttonTrailingIcon = MoonIcons.controls_close_small_24_light;\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _ButtonTestWidget(\n        buttonKey: _buttonKey,\n      ),\n    );\n\n    expect(find.byKey(_buttonKey), findsOneWidget);\n  });\n\n  testWidgets(\"Button has a leading, label and trailing widget.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _ButtonTestWidget(\n        showLeading: true,\n        showLabel: true,\n        showTrailing: true,\n      ),\n    );\n\n    expect(find.text(_buttonLabel), findsOneWidget);\n    expect(find.byIcon(_buttonTrailingIcon), findsOneWidget);\n    expect(find.byIcon(_buttonLeadingIcon), findsOneWidget);\n  });\n\n  testWidgets(\"Button onTap callback works.\", (tester) async {\n    bool tapped = false;\n\n    await tester.pumpWidget(\n      _ButtonTestWidget(\n        buttonKey: _buttonKey,\n        onTap: () => tapped = true,\n      ),\n    );\n\n    await tester.tap(find.byKey(_buttonKey));\n    await tester.pumpAndSettle();\n\n    expect(tapped, true);\n  });\n\n  testWidgets(\"Button onLongPress callback works.\", (tester) async {\n    bool longPressed = false;\n\n    await tester.pumpWidget(\n      _ButtonTestWidget(\n        buttonKey: _buttonKey,\n        onLongPress: () => longPressed = true,\n      ),\n    );\n\n    await tester.longPress(find.byKey(_buttonKey));\n    await tester.pumpAndSettle();\n\n    expect(longPressed, true);\n  });\n}\n\nclass _ButtonTestWidget extends StatelessWidget {\n  final Key? buttonKey;\n  final bool showLeading;\n  final bool showTrailing;\n  final bool showLabel;\n  final VoidCallback? onTap;\n  final VoidCallback? onLongPress;\n\n  const _ButtonTestWidget({\n    this.buttonKey,\n    this.showLeading = false,\n    this.showTrailing = false,\n    this.showLabel = false,\n    this.onTap,\n    this.onLongPress,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonButton(\n          key: buttonKey,\n          onLongPress: onLongPress,\n          onTap: onTap,\n          leading: showLeading ? const Icon(_buttonLeadingIcon) : null,\n          label: showLabel ? const Text(_buttonLabel) : null,\n          trailing: showTrailing ? const Icon(_buttonTrailingIcon) : null,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/carousel_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _carouselKey = Key(\"carouselKey\");\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _CarouselTestWidget(\n        carouselKey: _carouselKey,\n      ),\n    );\n\n    expect(find.byKey(_carouselKey), findsOneWidget);\n  });\n\n  testWidgets(\"Carousel items visibility changes on scroll.\", (tester) async {\n    await tester\n        .pumpWidget(const _CarouselTestWidget(carouselKey: _carouselKey));\n\n    expect(find.text('0'), findsOneWidget);\n    expect(find.text('1'), findsOneWidget);\n    expect(find.text('2'), findsNothing);\n\n    await tester.drag(find.byKey(_carouselKey), const Offset(-150, 0));\n    await tester.pumpAndSettle();\n\n    expect(find.text('0'), findsNothing);\n    expect(find.text('1'), findsOneWidget);\n    expect(find.text('2'), findsOneWidget);\n    expect(find.text('3'), findsOneWidget);\n    expect(find.text('4'), findsNothing);\n  });\n}\n\nclass _CarouselTestWidget extends StatelessWidget {\n  final Key? carouselKey;\n\n  const _CarouselTestWidget({this.carouselKey});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: SizedBox(\n          height: 114,\n          width: 200,\n          child: MoonCarousel(\n            key: carouselKey,\n            gap: 0,\n            itemCount: 10,\n            itemExtent: 100,\n            itemBuilder: (BuildContext _, int itemIndex, int __) =>\n                Text(\"$itemIndex\"),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/checkbox_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _checkboxKey = Key(\"checkboxKey\");\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _CheckboxTestWidget(\n        checkboxKey: _checkboxKey,\n      ),\n    );\n\n    expect(find.byKey(_checkboxKey), findsOneWidget);\n  });\n\n  testWidgets(\"Checkbox value changes after a tap.\", (tester) async {\n    bool? checkboxValue = false;\n\n    await tester.pumpWidget(\n      _CheckboxTestWidget(\n        checkboxKey: _checkboxKey,\n        onChanged: (bool? newValue) => checkboxValue = newValue,\n      ),\n    );\n    final checkbox = find.byKey(_checkboxKey);\n\n    await tester.tap(checkbox);\n    await tester.pumpAndSettle();\n\n    expect(checkboxValue, true);\n\n    await tester.tap(checkbox);\n    await tester.pumpAndSettle();\n\n    expect(checkboxValue, false);\n  });\n\n  testWidgets(\n      \"Tristate checkbox value changes correctly when tapped multiple times.\",\n      (tester) async {\n    bool? checkboxValue = false;\n\n    await tester.pumpWidget(\n      _CheckboxTestWidget(\n        checkboxKey: _checkboxKey,\n        isTristate: true,\n        onChanged: (newValue) => checkboxValue = newValue,\n      ),\n    );\n    final checkbox = find.byKey(_checkboxKey);\n\n    await tester.tap(checkbox);\n    await tester.pumpAndSettle();\n\n    expect(checkboxValue, true);\n\n    await tester.tap(checkbox);\n    await tester.pumpAndSettle();\n\n    expect(checkboxValue, null);\n\n    await tester.tap(checkbox);\n    await tester.pumpAndSettle();\n\n    expect(checkboxValue, false);\n  });\n}\n\nclass _CheckboxTestWidget extends StatefulWidget {\n  final Key? checkboxKey;\n  final bool isTristate;\n  final void Function(bool?)? onChanged;\n\n  const _CheckboxTestWidget({\n    this.checkboxKey,\n    this.isTristate = false,\n    this.onChanged,\n  });\n\n  @override\n  State<_CheckboxTestWidget> createState() => _CheckboxTestWidgetState();\n}\n\nclass _CheckboxTestWidgetState extends State<_CheckboxTestWidget> {\n  bool? _checkboxValue = false;\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonCheckbox(\n          key: widget.checkboxKey,\n          value: _checkboxValue,\n          tristate: widget.isTristate,\n          onChanged: (bool? newValue) {\n            setState(() => _checkboxValue = newValue);\n            widget.onChanged?.call(newValue);\n          },\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/chip_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _chipKey = Key(\"chipKey\");\n\nconst String _chipLabel = \"Label\";\nconst IconData _chipLeadingIcon = MoonIcons.other_frame_24_light;\nconst IconData _chipTrailingIcon = MoonIcons.controls_close_small_24_light;\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _ChipTestWidget(\n        chipKey: _chipKey,\n      ),\n    );\n\n    expect(find.byKey(_chipKey), findsOneWidget);\n  });\n\n  testWidgets(\"Chip has only a label and no leading or trailing widget.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _ChipTestWidget(\n        showLabel: true,\n      ),\n    );\n\n    expect(find.text(_chipLabel), findsOneWidget);\n    expect(find.byIcon(_chipTrailingIcon), findsNothing);\n    expect(find.byIcon(_chipLeadingIcon), findsNothing);\n  });\n\n  testWidgets(\"Chip has a leading, label and trailing widget.\", (tester) async {\n    await tester.pumpWidget(\n      const _ChipTestWidget(\n        showLeading: true,\n        showLabel: true,\n        showTrailing: true,\n      ),\n    );\n\n    expect(find.byIcon(_chipLeadingIcon), findsOneWidget);\n    expect(find.text(_chipLabel), findsOneWidget);\n    expect(find.byIcon(_chipTrailingIcon), findsOneWidget);\n  });\n}\n\nclass _ChipTestWidget extends StatelessWidget {\n  final Key? chipKey;\n  final bool showLeading;\n  final bool showTrailing;\n  final bool showLabel;\n\n  const _ChipTestWidget({\n    this.chipKey,\n    this.showLeading = false,\n    this.showLabel = false,\n    this.showTrailing = false,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonChip(\n          key: chipKey,\n          leading: showLeading ? const Icon(_chipLeadingIcon) : null,\n          label: showLabel ? const Text(_chipLabel) : null,\n          trailing: showTrailing ? const Icon(_chipTrailingIcon) : null,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/drawer_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _drawerKey = Key(\"drawerKey\");\nconst Key _openButtonKey = Key(\"openButtonKey\");\nconst Key _closeButtonKey = Key(\"closeButtonKey\");\n\nconst Widget _drawerContent = Text(\"Content\");\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _DrawerTestWidget(\n        drawerKey: _drawerKey,\n      ),\n    );\n\n    final button = find.byKey(_openButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byKey(_drawerKey), findsOneWidget);\n  });\n\n  testWidgets(\"Drawer is displayed when the open button is tapped.\",\n      (tester) async {\n    await tester.pumpWidget(const _DrawerTestWidget());\n\n    final button = find.byKey(_openButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsOneWidget);\n  });\n\n  testWidgets(\"Drawer closes when a tap occurs outside its content.\",\n      (tester) async {\n    await tester.pumpWidget(const _DrawerTestWidget());\n\n    final button = find.byKey(_openButtonKey);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsOneWidget);\n\n    await tester.tapAt(const Offset(210, 10));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsNothing);\n  });\n\n  testWidgets(\"Drawer closes when the 'close' button is tapped.\",\n      (tester) async {\n    await tester.pumpWidget(const _DrawerTestWidget());\n\n    final button = find.byKey(_openButtonKey);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsOneWidget);\n\n    await tester.tap(find.byKey(_closeButtonKey));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsNothing);\n  });\n}\n\nclass _DrawerTestWidget extends StatelessWidget {\n  final Key? drawerKey;\n\n  const _DrawerTestWidget({this.drawerKey});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        drawer: MoonDrawer(\n          key: drawerKey,\n          width: 200,\n          child: Column(\n            children: [\n              _drawerContent,\n              Builder(\n                builder: (BuildContext context) {\n                  return MoonFilledButton(\n                    key: _closeButtonKey,\n                    onTap: () => Navigator.of(context).pop(),\n                  );\n                },\n              ),\n            ],\n          ),\n        ),\n        body: Builder(\n          builder: (BuildContext context) {\n            return MoonFilledButton(\n              key: _openButtonKey,\n              onTap: () => Scaffold.of(context).openDrawer(),\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/dropdown_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\n\nimport 'package:moon_design/src/widgets/buttons/filled_button.dart';\nimport 'package:moon_design/src/widgets/dropdown/dropdown.dart';\n\nconst Key _dropdownKey = Key(\"dropdownKey\");\nconst Key _showButtonKey = Key(\"showButtonKey\");\n\nconst Widget _drawerContent = Text(\"Content\");\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _DropdownTestWidget(\n        dropdownKey: _dropdownKey,\n      ),\n    );\n\n    expect(find.byKey(_dropdownKey), findsOneWidget);\n  });\n\n  testWidgets(\"Dropdown is displayed when the 'show' button is tapped.\",\n      (tester) async {\n    await tester.pumpWidget(const _DropdownTestWidget());\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsOneWidget);\n  });\n\n  testWidgets(\n      \"Dropdown collapses when a tap occurs outside its content, if dismissible.\",\n      (tester) async {\n    await tester.pumpWidget(const _DropdownTestWidget());\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsOneWidget);\n\n    await tester.tapAt(const Offset(10, 10));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsNothing);\n  });\n\n  testWidgets(\n      \"Dropdown stays expanded when a tap occurs outside its content, if not dismissible.\",\n      (tester) async {\n    await tester.pumpWidget(const _DropdownTestWidget(isDismissible: false));\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsOneWidget);\n\n    await tester.tapAt(const Offset(10, 10));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsOneWidget);\n  });\n\n  testWidgets(\"Provided background color is used for dropdown.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _DropdownTestWidget(\n        color: Colors.blue,\n      ),\n    );\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_drawerContent), findsOneWidget);\n    expect(\n      find.byWidgetPredicate(\n        (Widget widget) =>\n            widget is MoonDropdown && widget.backgroundColor == Colors.blue,\n      ),\n      findsOneWidget,\n    );\n  });\n}\n\nclass _DropdownTestWidget extends StatefulWidget {\n  final Key? dropdownKey;\n  final bool isDismissible;\n  final Color color;\n\n  const _DropdownTestWidget({\n    this.dropdownKey,\n    this.isDismissible = true,\n    this.color = Colors.white,\n  });\n\n  @override\n  State<_DropdownTestWidget> createState() => _DropdownTestWidgetState();\n}\n\nclass _DropdownTestWidgetState extends State<_DropdownTestWidget> {\n  bool _show = false;\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Center(\n          child: MoonDropdown(\n            key: widget.dropdownKey,\n            show: _show,\n            backgroundColor: widget.color,\n            onTapOutside: () => setState(() => _show = !widget.isDismissible),\n            content: _drawerContent,\n            child: MoonFilledButton(\n              key: _showButtonKey,\n              onTap: () => setState(() => _show = true),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/menu_item_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _menuItemKey = Key(\"menuItemKey\");\n\nconst String _menuItemLabel = \"Label\";\nconst String _menuItemContent = \"Content\";\nconst IconData _menuItemLeadingIcon = MoonIcons.other_frame_24_light;\nconst IconData _menuItemTrailingIcon = MoonIcons.controls_close_small_24_light;\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _MenuItemTestWidget(\n        menuItemKey: _menuItemKey,\n      ),\n    );\n\n    expect(find.byKey(_menuItemKey), findsOneWidget);\n  });\n\n  testWidgets(\n      \"Menu item has only label and no leading, trailing or content widget.\",\n      (tester) async {\n    await tester.pumpWidget(const _MenuItemTestWidget());\n\n    expect(find.text(_menuItemLabel), findsOneWidget);\n    expect(find.byIcon(_menuItemLeadingIcon), findsNothing);\n    expect(find.byIcon(_menuItemTrailingIcon), findsNothing);\n    expect(find.text(_menuItemContent), findsNothing);\n  });\n\n  testWidgets(\"Menu item has a leading, label, trailing and content widget.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _MenuItemTestWidget(\n        showLeading: true,\n        showTrailing: true,\n        showContent: true,\n      ),\n    );\n\n    expect(find.text(_menuItemLabel), findsOneWidget);\n    expect(find.byIcon(_menuItemLeadingIcon), findsOneWidget);\n    expect(find.byIcon(_menuItemTrailingIcon), findsOneWidget);\n    expect(find.text(_menuItemContent), findsOneWidget);\n  });\n\n  testWidgets(\"Menu item onTap callback works.\", (tester) async {\n    bool value = false;\n\n    await tester.pumpWidget(\n      _MenuItemTestWidget(\n        menuItemKey: _menuItemKey,\n        onTap: () => value = !value,\n      ),\n    );\n\n    await tester.tap(find.byKey(_menuItemKey));\n    await tester.pumpAndSettle();\n\n    expect(value, true);\n  });\n}\n\nclass _MenuItemTestWidget extends StatelessWidget {\n  final Key? menuItemKey;\n  final bool showLeading;\n  final bool showTrailing;\n  final bool showContent;\n  final VoidCallback? onTap;\n\n  const _MenuItemTestWidget({\n    this.menuItemKey,\n    this.showLeading = false,\n    this.showTrailing = false,\n    this.showContent = false,\n    this.onTap,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonMenuItem(\n          key: menuItemKey,\n          onTap: onTap,\n          leading: showLeading ? const Icon(_menuItemLeadingIcon) : null,\n          label: const Text(_menuItemLabel),\n          trailing: showTrailing ? const Icon(_menuItemTrailingIcon) : null,\n          content: showContent ? const Text(_menuItemContent) : null,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/modal_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _modalKey = Key(\"modalKey\");\nconst Key _showButtonKey = Key(\"showButtonKey\");\nconst Key _closeButtonKey = Key(\"closeButtonKey\");\n\nconst Widget _modalContent = Text('Content');\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _ModalTestWidget(\n        modalKey: _modalKey,\n      ),\n    );\n\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byKey(_modalKey), findsOneWidget);\n  });\n\n  testWidgets(\"Modal is displayed when the 'show' button is tapped.\",\n      (tester) async {\n    await tester.pumpWidget(const _ModalTestWidget());\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_modalContent), findsOneWidget);\n  });\n\n  testWidgets(\n      \"Modal closes when a tap occurs outside its content, if dismissible.\", (\n    tester,\n  ) async {\n    await tester.pumpWidget(const _ModalTestWidget());\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_modalContent), findsOneWidget);\n\n    await tester.tapAt(const Offset(10, 10));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_modalContent), findsNothing);\n  });\n\n  testWidgets(\n      \"Modal stays visible when a tap occurs outside its content,\"\n      \" if not dismissible.\", (tester) async {\n    await tester.pumpWidget(\n      const _ModalTestWidget(\n        isDismissible: false,\n      ),\n    );\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_modalContent), findsOneWidget);\n\n    await tester.tapAt(const Offset(10, 10));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_modalContent), findsOneWidget);\n  });\n\n  testWidgets(\"Modal closes when the 'close' button is tapped.\",\n      (tester) async {\n    await tester.pumpWidget(const _ModalTestWidget());\n    final button = find.byKey(_showButtonKey);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_modalContent), findsOneWidget);\n\n    await tester.tap(find.byKey(_closeButtonKey));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_modalContent), findsNothing);\n  });\n}\n\nclass _ModalTestWidget extends StatelessWidget {\n  final Key? modalKey;\n  final bool isDismissible;\n\n  const _ModalTestWidget({\n    this.modalKey,\n    this.isDismissible = true,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Center(\n          child: Builder(\n            builder: (context) {\n              return MoonFilledButton(\n                key: _showButtonKey,\n                onTap: () => modalBuilder(context),\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n\n  Future<void> modalBuilder(BuildContext context) {\n    return showMoonModal<void>(\n      context: context,\n      barrierDismissible: isDismissible,\n      builder: (BuildContext context) {\n        return Directionality(\n          textDirection: Directionality.of(context),\n          child: MoonModal(\n            key: modalKey,\n            child: SizedBox(\n              width: 300,\n              child: Column(\n                children: [\n                  _modalContent,\n                  MoonFilledButton(\n                    key: _closeButtonKey,\n                    onTap: () => Navigator.of(context).pop(),\n                  ),\n                ],\n              ),\n            ),\n          ),\n        );\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "test/popover_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _popoverKey = Key(\"popoverKey\");\nconst Key _showButtonKey = Key(\"showButtonKey\");\nconst Key _closeButtonKey = Key(\"closeButtonKey\");\n\nconst Widget _content = Text(\"Content\");\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _PopoverTestWidget(\n        popoverKey: _popoverKey,\n      ),\n    );\n\n    expect(find.byKey(_popoverKey), findsOneWidget);\n  });\n\n  testWidgets(\"Popover is displayed when the 'show' button is tapped.\",\n      (tester) async {\n    await tester.pumpWidget(const _PopoverTestWidget());\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_content), findsOneWidget);\n  });\n\n  testWidgets(\n      \"Popover closes when a tap occurs outside its content, if dismissible.\",\n      (tester) async {\n    await tester.pumpWidget(const _PopoverTestWidget());\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_content), findsOneWidget);\n\n    await tester.tapAt(const Offset(10, 10));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_content), findsNothing);\n  });\n\n  testWidgets(\n      \"Popover stays visible when a tap occurs outside its content, \"\n      \"if not dismissible.\", (tester) async {\n    await tester.pumpWidget(\n      const _PopoverTestWidget(\n        isDismissible: false,\n      ),\n    );\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_content), findsOneWidget);\n\n    await tester.tapAt(const Offset(10, 10));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_content), findsOneWidget);\n  });\n\n  testWidgets(\"Popover closes when the 'close' button is tapped.\",\n      (tester) async {\n    await tester.pumpWidget(const _PopoverTestWidget());\n    final button = find.byKey(_showButtonKey);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_content), findsOneWidget);\n\n    await tester.tap(find.byKey(_closeButtonKey));\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_content), findsNothing);\n  });\n}\n\nclass _PopoverTestWidget extends StatefulWidget {\n  final Key? popoverKey;\n  final bool isDismissible;\n\n  const _PopoverTestWidget({\n    this.popoverKey,\n    this.isDismissible = true,\n  });\n\n  @override\n  State<_PopoverTestWidget> createState() => _PopoverTestWidgetState();\n}\n\nclass _PopoverTestWidgetState extends State<_PopoverTestWidget> {\n  bool _show = false;\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Center(\n          child: MoonPopover(\n            key: widget.popoverKey,\n            show: _show,\n            onTapOutside: () => setState(() => _show = !widget.isDismissible),\n            content: ConstrainedBox(\n              constraints: const BoxConstraints(maxWidth: 190),\n              child: Column(\n                children: [\n                  _content,\n                  MoonFilledButton(\n                    key: _closeButtonKey,\n                    onTap: () => setState(() => _show = false),\n                  ),\n                ],\n              ),\n            ),\n            child: MoonFilledButton(\n              key: _showButtonKey,\n              onTap: () => setState(() => _show = !_show),\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/radio_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nenum _Choice { first, second }\n\nconst Key _firstRadioKey = Key(\"firstRadioKey\");\nconst Key _secondRadioKey = Key(\"secondRadioKey\");\n\nvoid main() {\n  Finder findSelectorFirstRadio() {\n    return find.byWidgetPredicate(\n      (Widget widget) =>\n          widget is MoonRadio &&\n          widget.key == _firstRadioKey &&\n          widget.value == _Choice.first &&\n          widget.groupValue == _Choice.first,\n    );\n  }\n\n  Finder findSelectorSecondRadio() {\n    return find.byWidgetPredicate(\n      (Widget widget) =>\n          widget is MoonRadio &&\n          widget.key == _secondRadioKey &&\n          widget.value == _Choice.second &&\n          widget.groupValue == _Choice.second,\n    );\n  }\n\n  testWidgets(\"Provided keys are used.\", (tester) async {\n    await tester.pumpWidget(\n      const _RadioTestWidget(\n        firstRadioKey: _firstRadioKey,\n        secondRadioKey: _secondRadioKey,\n      ),\n    );\n\n    expect(find.byKey(_firstRadioKey), findsOneWidget);\n    expect(find.byKey(_secondRadioKey), findsOneWidget);\n  });\n\n  testWidgets(\"The selection of radio buttons can be changed.\", (tester) async {\n    await tester.pumpWidget(\n      const _RadioTestWidget(\n        firstRadioKey: _firstRadioKey,\n        secondRadioKey: _secondRadioKey,\n      ),\n    );\n\n    await tester.tap(find.byKey(_firstRadioKey));\n    await tester.pumpAndSettle();\n\n    expect(findSelectorFirstRadio(), findsOneWidget);\n\n    await tester.tap(find.byKey(_secondRadioKey));\n    await tester.pumpAndSettle();\n\n    expect(findSelectorFirstRadio(), findsNothing);\n    expect(findSelectorSecondRadio(), findsOneWidget);\n\n    await tester.tap(find.byKey(_firstRadioKey));\n    await tester.pumpAndSettle();\n\n    expect(findSelectorFirstRadio(), findsOneWidget);\n    expect(findSelectorSecondRadio(), findsNothing);\n  });\n\n  testWidgets(\"Selected radio button can be unselected.\", (tester) async {\n    await tester.pumpWidget(\n      const _RadioTestWidget(\n        firstRadioKey: _firstRadioKey,\n        secondRadioKey: _secondRadioKey,\n        toggleable: true,\n      ),\n    );\n\n    await tester.tap(find.byKey(_firstRadioKey));\n    await tester.pumpAndSettle();\n\n    expect(findSelectorFirstRadio(), findsOneWidget);\n\n    await tester.tap(find.byKey(_secondRadioKey));\n    await tester.pumpAndSettle();\n\n    expect(findSelectorFirstRadio(), findsNothing);\n    expect(findSelectorSecondRadio(), findsOneWidget);\n\n    await tester.tap(find.byKey(_secondRadioKey));\n    await tester.pumpAndSettle();\n\n    expect(findSelectorFirstRadio(), findsNothing);\n    expect(findSelectorSecondRadio(), findsNothing);\n  });\n}\n\nclass _RadioTestWidget extends StatefulWidget {\n  final bool toggleable;\n  final Key? firstRadioKey;\n  final Key? secondRadioKey;\n\n  const _RadioTestWidget({\n    this.firstRadioKey,\n    this.secondRadioKey,\n    this.toggleable = false,\n  });\n\n  @override\n  State<_RadioTestWidget> createState() => _RadioTestWidgetState();\n}\n\nclass _RadioTestWidgetState extends State<_RadioTestWidget> {\n  _Choice? _value;\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Column(\n          children: [\n            MoonRadio(\n              key: widget.firstRadioKey,\n              toggleable: widget.toggleable,\n              value: _Choice.first,\n              groupValue: _value,\n              onChanged: (_Choice? choice) => setState(() => _value = choice),\n            ),\n            const SizedBox(height: 8),\n            MoonRadio(\n              key: widget.secondRadioKey,\n              toggleable: widget.toggleable,\n              value: _Choice.second,\n              groupValue: _value,\n              onChanged: (_Choice? choice) => setState(() => _value = choice),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/segmented_control_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _segmentedControlKey = Key(\"segmentControlKey\");\n\nconst String _firstSegmentLabel = \"Label 1\";\nconst String _secondSegmentLabel = \"Label 2\";\nconst String _thirdSegmentLabel = \"Label 3\";\nconst IconData _segmentLeadingIcon = MoonIcons.other_frame_24_light;\nconst IconData _segmentTrailingIcon = MoonIcons.controls_close_small_24_light;\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _SegmentedControlTestWidget(\n        segmentedControlKey: _segmentedControlKey,\n      ),\n    );\n\n    expect(find.byKey(_segmentedControlKey), findsOneWidget);\n  });\n\n  testWidgets(\"Segment has a leading, label and trailing widget.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _SegmentedControlTestWidget(\n        showLabel: true,\n        showLeading: true,\n        showTrailing: true,\n      ),\n    );\n\n    expect(find.textContaining(_firstSegmentLabel), findsWidgets);\n    expect(find.textContaining(_secondSegmentLabel), findsWidgets);\n    expect(find.textContaining(_thirdSegmentLabel), findsWidgets);\n    expect(find.byIcon(_segmentLeadingIcon), findsWidgets);\n    expect(find.byIcon(_segmentTrailingIcon), findsWidgets);\n  });\n\n  testWidgets(\"Segment onTap callback works.\", (tester) async {\n    var value = 0;\n\n    await tester.pumpWidget(\n      _SegmentedControlTestWidget(\n        showLabel: true,\n        onTap: (int index) => value = index,\n      ),\n    );\n\n    await tester.tap(find.text(_secondSegmentLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 1);\n\n    await tester.tap(find.text(_firstSegmentLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 0);\n\n    await tester.tap(find.text(_thirdSegmentLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 2);\n  });\n\n  testWidgets(\n      \"The onTap callbacks of segments are ignored if segmented control is \"\n      \"disabled.\", (tester) async {\n    var value = 0;\n\n    await tester.pumpWidget(\n      _SegmentedControlTestWidget(\n        showLabel: true,\n        isDisabled: true,\n        onTap: (int index) => value = index,\n      ),\n    );\n\n    await tester.tap(find.text(_secondSegmentLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 0);\n\n    await tester.tap(find.text(_firstSegmentLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 0);\n\n    await tester.tap(find.text(_thirdSegmentLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 0);\n  });\n}\n\nclass _SegmentedControlTestWidget extends StatelessWidget {\n  final Key? segmentedControlKey;\n  final bool showLeading;\n  final bool showLabel;\n  final bool showTrailing;\n  final bool isDisabled;\n  final void Function(int)? onTap;\n\n  const _SegmentedControlTestWidget({\n    this.segmentedControlKey,\n    this.showLeading = false,\n    this.showLabel = false,\n    this.showTrailing = false,\n    this.isDisabled = false,\n    this.onTap,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonSegmentedControl(\n          key: segmentedControlKey,\n          isDisabled: isDisabled,\n          onSegmentChanged: onTap,\n          segments: [\n            Segment(\n              leading: showLeading ? const Icon(_segmentLeadingIcon) : null,\n              label: showLabel ? const Text(_firstSegmentLabel) : null,\n              trailing: showTrailing ? const Icon(_segmentTrailingIcon) : null,\n            ),\n            Segment(\n              leading: showLeading ? const Icon(_segmentLeadingIcon) : null,\n              label: showLabel ? const Text(_secondSegmentLabel) : null,\n              trailing: showTrailing ? const Icon(_segmentTrailingIcon) : null,\n            ),\n            Segment(\n              leading: showLeading ? const Icon(_segmentLeadingIcon) : null,\n              label: showLabel ? const Text(_thirdSegmentLabel) : null,\n              trailing: showTrailing ? const Icon(_segmentTrailingIcon) : null,\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/switch_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _switchKey = Key(\"switchKey\");\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _SwitchTestWidget(\n        switchKey: _switchKey,\n      ),\n    );\n\n    expect(find.byKey(_switchKey), findsOneWidget);\n  });\n\n  testWidgets(\"Tapping on a switch changes its value.\", (tester) async {\n    await tester.pumpWidget(\n      const _SwitchTestWidget(\n        switchKey: _switchKey,\n      ),\n    );\n\n    expect(\n      find.byWidgetPredicate(\n        (Widget widget) => widget is MoonSwitch && widget.value == true,\n      ),\n      findsOneWidget,\n    );\n\n    await tester.tap(find.byKey(_switchKey));\n    await tester.pumpAndSettle();\n\n    expect(\n      find.byWidgetPredicate(\n        (Widget widget) => widget is MoonSwitch && widget.value == false,\n      ),\n      findsOneWidget,\n    );\n\n    await tester.tap(find.byKey(_switchKey));\n    await tester.pumpAndSettle();\n\n    expect(\n      find.byWidgetPredicate(\n        (Widget widget) => widget is MoonSwitch && widget.value == true,\n      ),\n      findsOneWidget,\n    );\n  });\n}\n\nclass _SwitchTestWidget extends StatefulWidget {\n  final Key? switchKey;\n\n  const _SwitchTestWidget({this.switchKey});\n\n  @override\n  State<_SwitchTestWidget> createState() => _SwitchTestWidgetState();\n}\n\nclass _SwitchTestWidgetState extends State<_SwitchTestWidget> {\n  bool _switchValue = true;\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonSwitch(\n          key: widget.switchKey,\n          value: _switchValue,\n          onChanged: (bool newValue) => setState(() => _switchValue = newValue),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/tab_bar_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _tabBarKey = Key(\"tab_bar_test\");\n\nconst String _firstTabLabel = \"Label 1\";\nconst String _secondTabLabel = \"Label 2\";\nconst String _thirdTabLabel = \"Label 3\";\nconst String _fourthTabLabel = \"Label 4\";\nconst IconData _tabLeadingIcon = MoonIcons.other_frame_24_light;\nconst IconData _tabTrailingIcon = MoonIcons.controls_close_small_24_light;\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _TabBarTestWidget(\n        tabBarKey: _tabBarKey,\n      ),\n    );\n\n    expect(find.byKey(_tabBarKey), findsOneWidget);\n  });\n\n  testWidgets(\"Tab bar has a leading, label and trailing widget.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _TabBarTestWidget(\n        showLabel: true,\n        showLeading: true,\n        showTrailing: true,\n      ),\n    );\n\n    expect(find.textContaining(_firstTabLabel), findsWidgets);\n    expect(find.textContaining(_secondTabLabel), findsWidgets);\n    expect(find.textContaining(_thirdTabLabel), findsWidgets);\n    expect(find.textContaining(_fourthTabLabel), findsWidgets);\n    expect(find.byIcon(_tabLeadingIcon), findsWidgets);\n    expect(find.byIcon(_tabTrailingIcon), findsWidgets);\n  });\n\n  testWidgets(\"Tab onTap callback works.\", (tester) async {\n    var value = 0;\n\n    await tester.pumpWidget(\n      _TabBarTestWidget(\n        showLabel: true,\n        onTap: (index) => value = index,\n      ),\n    );\n\n    await tester.tap(find.text(_secondTabLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 1);\n\n    await tester.tap(find.text(_firstTabLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 0);\n\n    await tester.tap(find.text(_thirdTabLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 2);\n  });\n\n  testWidgets(\"OnTap callback of a disabled tab is ignored.\", (tester) async {\n    var value = 0;\n\n    await tester.pumpWidget(\n      _TabBarTestWidget(\n        showLabel: true,\n        isDisabled: true,\n        onTap: (index) => value = index,\n      ),\n    );\n\n    await tester.tap(find.text(_secondTabLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 0);\n\n    await tester.tap(find.text(_firstTabLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 0);\n\n    await tester.tap(find.text(_thirdTabLabel), warnIfMissed: false);\n    await tester.pumpAndSettle();\n\n    expect(value, 0);\n  });\n}\n\nclass _TabBarTestWidget extends StatelessWidget {\n  final Key? tabBarKey;\n  final bool showLeading;\n  final bool showLabel;\n  final bool showTrailing;\n  final bool isDisabled;\n  final void Function(int)? onTap;\n\n  const _TabBarTestWidget({\n    this.tabBarKey,\n    this.showLeading = false,\n    this.showLabel = false,\n    this.showTrailing = false,\n    this.isDisabled = false,\n    this.onTap,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonTabBar(\n          key: tabBarKey,\n          onTabChanged: onTap,\n          tabs: [\n            MoonTab(\n              disabled: isDisabled,\n              leading: showLeading ? const Icon(_tabLeadingIcon) : null,\n              label: showLabel ? const Text(_firstTabLabel) : null,\n              trailing: showTrailing ? const Icon(_tabTrailingIcon) : null,\n            ),\n            MoonTab(\n              disabled: isDisabled,\n              leading: showLeading ? const Icon(_tabLeadingIcon) : null,\n              label: showLabel ? const Text(_secondTabLabel) : null,\n              trailing: showTrailing ? const Icon(_tabTrailingIcon) : null,\n            ),\n            MoonTab(\n              disabled: isDisabled,\n              leading: showLeading ? const Icon(_tabLeadingIcon) : null,\n              label: showLabel ? const Text(_thirdTabLabel) : null,\n              trailing: showTrailing ? const Icon(_tabTrailingIcon) : null,\n            ),\n            MoonTab(\n              disabled: isDisabled,\n              leading: showLeading ? const Icon(_tabLeadingIcon) : null,\n              label: showLabel ? const Text(_fourthTabLabel) : null,\n              trailing: showTrailing ? const Icon(_tabTrailingIcon) : null,\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/tag_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _tagKey = Key(\"tagKey\");\n\nconst String _tagLabel = \"Label\";\nconst IconData _tagLeadingIcon = MoonIcons.other_frame_24_light;\nconst IconData _tagTrailingIcon = MoonIcons.controls_close_small_24_light;\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _TagTestWidget(\n        tagKey: _tagKey,\n      ),\n    );\n\n    expect(find.byKey(_tagKey), findsOneWidget);\n  });\n\n  testWidgets(\"Default tag has no leading, label or trailing widget.\",\n      (tester) async {\n    await tester.pumpWidget(const _TagTestWidget());\n\n    expect(find.text(_tagLabel), findsNothing);\n    expect(find.text(_tagLabel), findsNothing);\n    expect(find.text(_tagLabel), findsNothing);\n  });\n\n  testWidgets(\"Tag has a leading, label and trailing widget.\", (tester) async {\n    await tester.pumpWidget(\n      const _TagTestWidget(\n        showLeading: true,\n        showLabel: true,\n        showTrailing: true,\n      ),\n    );\n\n    expect(find.text(_tagLabel), findsOneWidget);\n    expect(find.byIcon(_tagTrailingIcon), findsOneWidget);\n    expect(find.byIcon(_tagLeadingIcon), findsOneWidget);\n  });\n\n  testWidgets(\"Tag onTap callback works.\", (tester) async {\n    bool isTapped = false;\n\n    await tester.pumpWidget(\n      _TagTestWidget(\n        tagKey: _tagKey,\n        showTrailing: true,\n        onTap: () => isTapped = true,\n      ),\n    );\n\n    await tester.tap(find.byKey(_tagKey));\n    await tester.pumpAndSettle();\n\n    expect(isTapped, true);\n  });\n\n  testWidgets(\"Tag onLongPress callback works.\", (tester) async {\n    bool longPressed = false;\n    bool tapped = false;\n\n    await tester.pumpWidget(\n      _TagTestWidget(\n        tagKey: _tagKey,\n        onLongPress: () => longPressed = true,\n        onTap: () => tapped = true,\n      ),\n    );\n\n    await tester.longPress(find.byKey(_tagKey));\n    await tester.pumpAndSettle();\n\n    expect(longPressed, true);\n    expect(tapped, false);\n  });\n}\n\nclass _TagTestWidget extends StatelessWidget {\n  final Key? tagKey;\n  final bool showLeading;\n  final bool showLabel;\n  final bool showTrailing;\n  final VoidCallback? onTap;\n  final VoidCallback? onLongPress;\n\n  const _TagTestWidget({\n    this.tagKey,\n    this.showLeading = false,\n    this.showLabel = false,\n    this.showTrailing = false,\n    this.onTap,\n    this.onLongPress,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: MoonTag(\n          key: tagKey,\n          onTap: onTap,\n          onLongPress: onLongPress,\n          leading: showLeading ? const Icon(_tagLeadingIcon) : null,\n          label: showLabel ? const Text(_tagLabel) : null,\n          trailing: showTrailing ? const Icon(_tagTrailingIcon) : null,\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/text_area_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _textAreaKey = Key(\"textAreaKey\");\nconst Key _submitButtonKey = Key(\"submitButtonKey\");\n\nconst String _hintText = 'Hint text';\nconst String _errorText = 'Error text';\nconst String _helperText = 'Helper text';\nconst String _validText = 'Valid text';\nconst String _invalidText = 'Invalid text';\n\nvoid main() {\n  Future<void> submit(WidgetTester tester) async {\n    await tester.tap(find.byKey(_submitButtonKey));\n    await tester.pumpAndSettle();\n  }\n\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _TextAreaTestWidget(\n        textAreaKey: _textAreaKey,\n      ),\n    );\n\n    expect(find.byKey(_textAreaKey), findsOneWidget);\n  });\n\n  testWidgets(\"When valid text is entered and submitted, error is not shown.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _TextAreaTestWidget(\n        textAreaKey: _textAreaKey,\n      ),\n    );\n    final textArea = find.byKey(_textAreaKey);\n\n    await tester.enterText(textArea, _validText);\n    await tester.pumpAndSettle();\n\n    expect(find.text(_validText), findsOneWidget);\n\n    await submit(tester);\n\n    expect(find.text(_errorText), findsNothing);\n  });\n\n  testWidgets(\"When invalid text is entered and submitted, error is shown.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _TextAreaTestWidget(\n        textAreaKey: _textAreaKey,\n      ),\n    );\n    final textArea = find.byKey(_textAreaKey);\n\n    await tester.enterText(textArea, _invalidText);\n    await tester.pumpAndSettle();\n\n    expect(find.text(_invalidText), findsOneWidget);\n\n    await submit(tester);\n\n    expect(find.text(_errorText), findsOneWidget);\n  });\n\n  testWidgets(\"Helper text is shown.\", (tester) async {\n    await tester.pumpWidget(\n      const _TextAreaTestWidget(\n        showHelper: true,\n      ),\n    );\n\n    expect(find.text(_helperText), findsOneWidget);\n  });\n\n  testWidgets(\"Hint text is shown.\", (tester) async {\n    await tester.pumpWidget(\n      const _TextAreaTestWidget(\n        showHelper: true,\n      ),\n    );\n\n    expect(find.text(_hintText), findsOneWidget);\n  });\n\n  testWidgets(\"When text area is disabled, input cannot be entered.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _TextAreaTestWidget(\n        textAreaKey: _textAreaKey,\n        enabled: false,\n      ),\n    );\n\n    final textArea = find.byKey(_textAreaKey);\n\n    await tester.enterText(textArea, _validText);\n    await tester.pumpAndSettle();\n\n    expect(find.text(_validText), findsNothing);\n  });\n}\n\nclass _TextAreaTestWidget extends StatelessWidget {\n  final Key? textAreaKey;\n  final bool enabled;\n  final bool showHelper;\n\n  const _TextAreaTestWidget({\n    this.textAreaKey,\n    this.enabled = true,\n    this.showHelper = false,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Form(\n          child: Builder(\n            builder: (BuildContext context) {\n              return Column(\n                children: [\n                  MoonTextArea(\n                    key: textAreaKey,\n                    enabled: enabled,\n                    hintText: _hintText,\n                    validator: (String? value) =>\n                        value?.length != null && value!.length > 10\n                            ? _errorText\n                            : null,\n                    helper: showHelper ? const Text(_helperText) : null,\n                  ),\n                  MoonFilledButton(\n                    key: _submitButtonKey,\n                    onTap: () => Form.of(context).validate(),\n                  ),\n                ],\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/text_input_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _textInputKey = Key(\"textInputKey\");\nconst Key _submitButtonKey = Key(\"submitButtonKey\");\n\nconst String _hintText = 'Hint text';\nconst String _errorText = 'Error text';\nconst String _helperText = 'Helper text';\nconst String _validText = 'Valid text';\nconst String _invalidText = 'Invalid text';\nconst IconData _textInputLeadingIcon = MoonIcons.other_frame_24_light;\nconst IconData _textInputTrailingIcon = MoonIcons.controls_close_small_24_light;\n\nvoid main() {\n  Future<void> submit(WidgetTester tester) async {\n    await tester.tap(find.byKey(_submitButtonKey));\n    await tester.pumpAndSettle();\n  }\n\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _TextInputTestWidget(\n        textInputKey: _textInputKey,\n      ),\n    );\n\n    expect(find.byKey(_textInputKey), findsOneWidget);\n  });\n\n  testWidgets(\"When valid text is entered and submitted, error is not shown.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _TextInputTestWidget(\n        textInputKey: _textInputKey,\n      ),\n    );\n    final textInput = find.byKey(_textInputKey);\n\n    await tester.enterText(textInput, _validText);\n    await tester.pumpAndSettle();\n\n    expect(find.text(_validText), findsOneWidget);\n\n    await submit(tester);\n\n    expect(find.text(_errorText), findsNothing);\n  });\n\n  testWidgets(\"When invalid text is entered and submitted, error is shown.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _TextInputTestWidget(\n        textInputKey: _textInputKey,\n      ),\n    );\n    final textInput = find.byKey(_textInputKey);\n\n    await tester.enterText(textInput, _invalidText);\n    await tester.pumpAndSettle();\n\n    expect(find.text(_invalidText), findsOneWidget);\n\n    await submit(tester);\n\n    expect(find.text(_errorText), findsOneWidget);\n  });\n\n  testWidgets(\"Helper text is shown.\", (tester) async {\n    await tester.pumpWidget(\n      const _TextInputTestWidget(\n        showHelper: true,\n      ),\n    );\n\n    expect(find.text(_helperText), findsOneWidget);\n  });\n\n  testWidgets(\"Hint text is shown.\", (tester) async {\n    await tester.pumpWidget(\n      const _TextInputTestWidget(\n        showHelper: true,\n      ),\n    );\n\n    expect(find.text(_hintText), findsOneWidget);\n  });\n\n  testWidgets(\"Text input has a leading and trailing widget.\", (tester) async {\n    await tester.pumpWidget(\n      const _TextInputTestWidget(\n        showLeading: true,\n        showTrailing: true,\n      ),\n    );\n\n    expect(find.byIcon(_textInputLeadingIcon), findsOneWidget);\n    expect(find.byIcon(_textInputTrailingIcon), findsOneWidget);\n  });\n\n  testWidgets(\"When text input is disabled, input cannot be entered.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _TextInputTestWidget(\n        textInputKey: _textInputKey,\n        enabled: false,\n      ),\n    );\n\n    final textArea = find.byKey(_textInputKey);\n\n    await tester.enterText(textArea, _validText);\n    await tester.pumpAndSettle();\n\n    expect(find.text(_validText), findsNothing);\n  });\n}\n\nclass _TextInputTestWidget extends StatelessWidget {\n  final Key? textInputKey;\n  final bool enabled;\n  final bool showHelper;\n  final bool showLeading;\n  final bool showTrailing;\n\n  const _TextInputTestWidget({\n    this.textInputKey,\n    this.enabled = true,\n    this.showHelper = false,\n    this.showLeading = false,\n    this.showTrailing = false,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Form(\n          child: Builder(\n            builder: (BuildContext context) {\n              return Column(\n                children: [\n                  MoonFormTextInput(\n                    key: textInputKey,\n                    enabled: enabled,\n                    hintText: _hintText,\n                    validator: (String? value) =>\n                        value != null && value.length > 10 ? _errorText : null,\n                    leading:\n                        showLeading ? const Icon(_textInputLeadingIcon) : null,\n                    trailing: showTrailing\n                        ? const Icon(_textInputTrailingIcon)\n                        : null,\n                    helper: showHelper ? const Text(_helperText) : null,\n                  ),\n                  MoonFilledButton(\n                    key: _submitButtonKey,\n                    onTap: () => Form.of(context).validate(),\n                  ),\n                ],\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/toast_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:moon_design/moon_design.dart';\n\nconst Key _showButtonKey = Key('showButtonKey');\n\nconst String _toastLabel = 'Label';\nconst String _toastBody = 'Body';\nconst IconData _toastLeadingIcon = MoonIcons.other_frame_24_light;\nconst IconData _toastTrailingIcon = MoonIcons.controls_close_small_24_light;\n\nvoid main() {\n  testWidgets(\n      \"Toast is displayed when the 'show' button is tapped and dismissed after \"\n      \"2 seconds.\", (tester) async {\n    await tester.pumpWidget(_ToastTestWidget());\n    await tester.tap(find.byKey(_showButtonKey));\n    await tester.pump(const Duration(milliseconds: 200));\n\n    expect(find.text(_toastLabel), findsOneWidget);\n    expect(find.text(_toastBody), findsOneWidget);\n    expect(find.byIcon(_toastLeadingIcon), findsOneWidget);\n    expect(find.byIcon(_toastTrailingIcon), findsOneWidget);\n\n    await tester.pump(const Duration(seconds: 2));\n\n    expect(find.text(_toastLabel), findsNothing);\n  });\n}\n\nclass _ToastTestWidget extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Builder(\n          builder: (context) {\n            return MoonFilledButton(\n              key: _showButtonKey,\n              onTap: () {\n                MoonToast.show(\n                  context,\n                  displayDuration: const Duration(seconds: 2),\n                  transitionDuration: Duration.zero,\n                  leading: const Icon(_toastLeadingIcon),\n                  label: const Text(_toastLabel),\n                  trailing: const Icon(_toastTrailingIcon),\n                  content: const Text(_toastBody),\n                );\n              },\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "test/tooltip_test.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\n\nimport 'package:moon_design/src/widgets/buttons/filled_button.dart';\nimport 'package:moon_design/src/widgets/tooltip/tooltip.dart';\n\nconst Key _tooltipKey = Key(\"tooltipKey\");\nconst Key _showButtonKey = Key(\"_showButtonKey\");\n\nconst Widget _tooltipContent = Text(\"Content\");\n\nvoid main() {\n  testWidgets(\"Provided key is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _ToastTestWidget(\n        tooltipKey: _tooltipKey,\n      ),\n    );\n\n    expect(find.byKey(_tooltipKey), findsOneWidget);\n  });\n\n  testWidgets(\"Tooltip is displayed when the 'show' button is tapped.\",\n      (tester) async {\n    await tester.pumpWidget(\n      const _ToastTestWidget(\n        tooltipKey: _tooltipKey,\n      ),\n    );\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_tooltipContent), findsOneWidget);\n  });\n\n  testWidgets(\"Tooltip closes when tapped.\", (tester) async {\n    await tester.pumpWidget(\n      const _ToastTestWidget(\n        tooltipKey: _tooltipKey,\n      ),\n    );\n    final button = find.byKey(_showButtonKey);\n    final tooltipContent = find.byWidget(_tooltipContent);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    await tester.tap(tooltipContent);\n    await tester.pumpAndSettle();\n\n    expect(tooltipContent, findsNothing);\n  });\n\n  testWidgets(\"Provided background color is used.\", (tester) async {\n    await tester.pumpWidget(\n      const _ToastTestWidget(\n        tooltipKey: _tooltipKey,\n        color: Colors.blue,\n      ),\n    );\n    final button = find.byKey(_showButtonKey);\n\n    expect(button, findsOneWidget);\n\n    await tester.tap(button);\n    await tester.pumpAndSettle();\n\n    expect(find.byWidget(_tooltipContent), findsOneWidget);\n    expect(\n      find.byWidgetPredicate(\n        (Widget widget) =>\n            widget is MoonTooltip && widget.backgroundColor == Colors.blue,\n      ),\n      findsOneWidget,\n    );\n  });\n}\n\nclass _ToastTestWidget extends StatefulWidget {\n  final Key? tooltipKey;\n  final Color color;\n\n  const _ToastTestWidget({\n    this.tooltipKey,\n    this.color = Colors.white,\n  });\n\n  @override\n  State<_ToastTestWidget> createState() => _ToastTestWidgetState();\n}\n\nclass _ToastTestWidgetState extends State<_ToastTestWidget> {\n  bool _show = false;\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Builder(\n          builder: (BuildContext context) {\n            return Center(\n              child: MoonTooltip(\n                key: widget.tooltipKey,\n                show: _show,\n                backgroundColor: widget.color,\n                content: _tooltipContent,\n                child: MoonFilledButton(\n                  key: _showButtonKey,\n                  onTap: () => setState(() => _show = true),\n                ),\n              ),\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n"
  }
]