diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index ac51a6c51..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -name: Bug report -about: Something is wrong with Surf Gear. -title: "[BUG] " -labels: bug -assignees: artem-zaitsev ---- - - - -## Prior Issues - -Are there any existing issues or PRs that relate to this problem? If so, link them here. - -## Describe the bug - -A clear and concise description of what the bug is. -Please show the code you wrote as completely as possible. - -```dart -/// your code here -``` - -## Steps to Reproduce - -If the current behavior is a bug, please provide the steps to reproduce. - -## What is the expected behavior? - -A clear and concise description of what you expected to happen. - -## Additional context - -* What package and OS are affected by this issue? Did this work in previous versions of a package? - -* If applicable, add screenshots to help explain your problem. - -* Please provide output from `flutter doctor -v` and `flutter analyze`. - -* Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/documentation_update.md b/.github/ISSUE_TEMPLATE/documentation_update.md deleted file mode 100644 index e25fe3635..000000000 --- a/.github/ISSUE_TEMPLATE/documentation_update.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Documentation update -about: Fixing a problem or improve in an existing docs page. -labels: documentation -assignees: artem-zaitsev, saturov ---- - - - -## Describe what scenario you think is uncovered by the existing examples / articles - -A clear and concise description of the problem that you want explained. - -## Describe why existing examples / articles do not cover this case - -Explain which examples / articles you have seen before making this request, and -why they did not help you with your problem. - -## Additional context - -Add any other context or screenshots about the documentation request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 911662f92..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Feature Request -about: I'd like Surf Gear to do something new. -labels: enhancement -assignees: artem-zaitsev ---- - - - -## What is the new or updated feature that you are suggesting? - -A clear and concise description of what you want to happen. - -## Why should this feature be included? - -Is your feature request related to a problem? Please describe a clear and concise description of what the problem is. If you investigated any alternative solutions please describe. - -## Additional context - -Please provide any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE/bug_fix.md b/.github/PULL_REQUEST_TEMPLATE/bug_fix.md deleted file mode 100644 index 753789406..000000000 --- a/.github/PULL_REQUEST_TEMPLATE/bug_fix.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Bug fix -about: Fixing a problem with Surf Gear. -assignees: artem-zaitsev ---- - - - -## Checklist - -- [ ] Have you added an explanation of what your changes do and why you'd like us to include them? -- [ ] Is there an existing issue for this PR? - - _link issue here_ -- [ ] Have the files been linted and formatted? -- [ ] Have the docs been updated to match the changes in the PR? -- [ ] Have the tests been updated to match the changes in the PR? -- [ ] Have you run the tests locally to confirm they pass? - -## Changes - -### What is the current behavior, and the steps to reproduce the issue? - -### What is the expected behavior? - -### How does this PR fix the problem? diff --git a/.github/PULL_REQUEST_TEMPLATE/documentation_update.md b/.github/PULL_REQUEST_TEMPLATE/documentation_update.md deleted file mode 100644 index 461b1e769..000000000 --- a/.github/PULL_REQUEST_TEMPLATE/documentation_update.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Documentation update -about: Fixing a problem or improve in an existing docs page. -labels: documentation -assignees: artem-zaitsev, saturov ---- - - - -## Checklist - -- [ ] Is there an existing issue for this PR? - - _link issue here_ -- [ ] Have the files been linted and formatted? - -## Changes - -### What docs page needs to be fixed? - -- **Section**: -- **Page**: - -## What is the problem? - -## What changes does this PR make to fix the problem? diff --git a/.github/PULL_REQUEST_TEMPLATE/new_feature.md b/.github/PULL_REQUEST_TEMPLATE/new_feature.md deleted file mode 100644 index ca8518a67..000000000 --- a/.github/PULL_REQUEST_TEMPLATE/new_feature.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: New feature -labels: enhancement -assignees: artem-zaitsev ---- - - - -## Checklist - -- [ ] Have you added an explanation of what your changes do and why you'd like us to include them? -- [ ] Is there an existing issue for this PR? - - _link issue here_ -- [ ] Have the files been linted and formatted? -- [ ] Have the docs been updated to match the changes in the PR? -- [ ] Have the tests been updated to match the changes in the PR? -- [ ] Have you run the tests locally to confirm they pass? - -## New Features - -### What new capabilities does this PR add? - -### What docs changes are needed to explain this? diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index d957e7dd4..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,24 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - reviewers: - - "dkrutskikh" - commit-message: - prefix: "chore: " - - - package-ecosystem: "npm" - directory: "/tools/ide/vs_code/extensions/mwwm_generator" - schedule: - interval: "daily" - reviewers: - - "dkrutskikh" - commit-message: - prefix: "chore: " diff --git a/.github/workflows/analytics.yaml b/.github/workflows/analytics.yaml deleted file mode 100644 index 8919ffc3b..000000000 --- a/.github/workflows/analytics.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build analytics - -on: - pull_request: - branches: - - main - paths: - - "packages/analytics/**" - - ".github/workflows/analytics.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/analytics - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - dart pub global activate dependency_validator - dart pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F analytics - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/analytics - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/analytics diff --git a/.github/workflows/auto_reload.yaml b/.github/workflows/auto_reload.yaml deleted file mode 100644 index 8a342e743..000000000 --- a/.github/workflows/auto_reload.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build auto_reload - -on: - pull_request: - branches: - - main - paths: - - "packages/auto_reload/**" - - ".github/workflows/auto_reload.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/auto_reload - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F auto_reload - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/auto_reload - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/auto_reload diff --git a/.github/workflows/bottom_navigation_bar.yaml b/.github/workflows/bottom_navigation_bar.yaml deleted file mode 100644 index 33efaa5a7..000000000 --- a/.github/workflows/bottom_navigation_bar.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build bottom_navigation_bar - -on: - pull_request: - branches: - - main - paths: - - "packages/bottom_navigation_bar/**" - - ".github/workflows/bottom_navigation_bar.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/bottom_navigation_bar - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F bottom_navigation_bar - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/bottom_navigation_bar - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/bottom_navigation_bar diff --git a/.github/workflows/bottom_sheet.yaml b/.github/workflows/bottom_sheet.yaml deleted file mode 100644 index e6990bb73..000000000 --- a/.github/workflows/bottom_sheet.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build bottom_sheet - -on: - pull_request: - branches: - - main - paths: - - "packages/bottom_sheet/**" - - ".github/workflows/bottom_sheet.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/bottom_sheet - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F bottom_sheet - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/bottom_sheet - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/bottom_sheet diff --git a/.github/workflows/datalist.yaml b/.github/workflows/datalist.yaml deleted file mode 100644 index 52ee48665..000000000 --- a/.github/workflows/datalist.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: build datalist - -on: - pull_request: - branches: - - main - paths: - - "packages/datalist/**" - - ".github/workflows/datalist.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - container: - image: google/dart:latest - - defaults: - run: - shell: bash - working-directory: packages/datalist - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: dart pub get - - - name: Run dependency validator 🔍 - run: | - dart pub global activate dependency_validator - dart pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: | - dart analyze --fatal-warnings --fatal-infos lib - dart analyze --fatal-warnings --fatal-infos test - - - name: Run formatter ⚙️ - run: dart format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - dart run ../../tools/coverage/fake_test_generator.dart dart - dart test --coverage=coverage - dart pub global activate coverage - dart pub global run coverage:format_coverage --packages=.packages -i coverage -o coverage/lcov.info --lcov --report-on=lib - dart pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F datalist - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/datalist - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/datalist diff --git a/.github/workflows/in_app_rate.yaml b/.github/workflows/in_app_rate.yaml deleted file mode 100644 index 2dfcb6312..000000000 --- a/.github/workflows/in_app_rate.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: build in_app_rate - -on: - pull_request: - branches: - - main - paths: - - "packages/in_app_rate/**" - - ".github/workflows/in_app_rate.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/in_app_rate - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/in_app_rate - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/in_app_rate diff --git a/.github/workflows/ink_widget.yaml b/.github/workflows/ink_widget.yaml deleted file mode 100644 index 0c5d1dfff..000000000 --- a/.github/workflows/ink_widget.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build ink_widget - -on: - pull_request: - branches: - - main - paths: - - "packages/ink_widget/**" - - ".github/workflows/ink_widget.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/ink_widget - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - dart pub global activate dependency_validator - dart pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F ink_widget - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/ink_widget - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/ink_widget diff --git a/.github/workflows/keyboard_listener.yaml b/.github/workflows/keyboard_listener.yaml deleted file mode 100644 index 6afe786a6..000000000 --- a/.github/workflows/keyboard_listener.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: build keyboard_listener - -on: - pull_request: - branches: - - main - paths: - - "packages/keyboard_listener/**" - - ".github/workflows/keyboard_listener.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/keyboard_listener - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/keyboard_listener - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/keyboard_listener diff --git a/.github/workflows/mwwm.yaml b/.github/workflows/mwwm.yaml deleted file mode 100644 index f5751fe8b..000000000 --- a/.github/workflows/mwwm.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build mwwm - -on: - pull_request: - branches: - - main - paths: - - "packages/mwwm/**" - - ".github/workflows/mwwm.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/mwwm - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - dart pub global activate dependency_validator - dart pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F mwwm - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/mwwm - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/mwwm diff --git a/.github/workflows/otp_autofill.yaml b/.github/workflows/otp_autofill.yaml deleted file mode 100644 index fdea31b31..000000000 --- a/.github/workflows/otp_autofill.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build otp_autofill - -on: - pull_request: - branches: - - main - paths: - - "packages/otp_autofill/**" - - ".github/workflows/otp_autofill.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/otp_autofill - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F otp_autofill - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/otp_autofill - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/otp_autofill diff --git a/.github/workflows/publish_coverage.yaml b/.github/workflows/publish_coverage.yaml deleted file mode 100644 index 02b2a005b..000000000 --- a/.github/workflows/publish_coverage.yaml +++ /dev/null @@ -1,110 +0,0 @@ -name: Publish coverage to codecov.io - -on: - pull_request: - paths: - - ".github/workflows/publish_coverage.yaml" - - push: - branches: - - main - -jobs: - flutter: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - package: - - auto_reload - - bottom_navigation_bar - - bottom_sheet - - ink_widget - - mwwm - - otp_autofill - - push_notification - - relation - - render_metrics - - surf_mwwm - - surf_util - - swipe_refresh - - tabnavigator - - defaults: - run: - shell: bash - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Install dependencies 🔧 - run: flutter pub get - working-directory: packages/${{matrix.package}} - - - name: Run tests ⚙️ - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - working-directory: packages/${{matrix.package}} - - - name: Deploy coverage 🚀 - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - run: bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F ${{matrix.package}} - working-directory: packages/${{matrix.package}} - - dart: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - package: - - analytics - - datalist - - surf_logger - - container: - image: google/dart:latest - - defaults: - run: - shell: bash - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install dependencies 🔧 - run: dart pub upgrade - working-directory: packages/${{matrix.package}} - - - name: Run tests ⚙️ - run: | - dart run ../../tools/coverage/fake_test_generator.dart dart - dart test --coverage=coverage - dart pub global activate coverage - dart pub global run coverage:format_coverage --packages=.packages -i coverage -o coverage/lcov.info --lcov --report-on=lib - dart pub run ../../tools/coverage/patch_lcov.dart - working-directory: packages/${{matrix.package}} - - - name: Deploy coverage 🚀 - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - run: bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F ${{matrix.package}} - working-directory: packages/${{matrix.package}} diff --git a/.github/workflows/publish_to_pub_stable.yaml b/.github/workflows/publish_to_pub_stable.yaml deleted file mode 100644 index 55cfbcc1b..000000000 --- a/.github/workflows/publish_to_pub_stable.yaml +++ /dev/null @@ -1,54 +0,0 @@ -name: Publish to pub.dev - -on: - push: - branches: - - main - -jobs: - publish_stable: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - package: - - analytics - - auto_reload - - bottom_navigation_bar - - bottom_sheet - - datalist - - ink_widget - - mwwm - - otp_autofill - - push_notification - - relation - - render_metrics - - surf_controllers - - surf_lint_rules - - surf_logger - - surf_mwwm - - surf_util - - swipe_refresh - max-parallel: 1 - - container: - image: google/dart:latest - - defaults: - run: - shell: bash - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Prepare to deploy ⚙️ - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Deploy stable version 🚀 - env: - PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }} - run: dart run ../../tools/ci-cd/bin/ci.dart publish-stable-version - working-directory: packages/${{matrix.package}} diff --git a/.github/workflows/publish_to_pub_unstable.yaml b/.github/workflows/publish_to_pub_unstable.yaml deleted file mode 100644 index 34ab40230..000000000 --- a/.github/workflows/publish_to_pub_unstable.yaml +++ /dev/null @@ -1,54 +0,0 @@ -name: Publish to pub.dev - -on: - push: - branches: - - main - -jobs: - publish_dev: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - package: - - analytics - - auto_reload - - bottom_navigation_bar - - bottom_sheet - - datalist - - ink_widget - - mwwm - - otp_autofill - - push_notification - - relation - - render_metrics - - surf_controllers - - surf_lint_rules - - surf_logger - - surf_mwwm - - surf_util - - swipe_refresh - max-parallel: 1 - - container: - image: google/dart:latest - - defaults: - run: - shell: bash - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Prepare check our conventions ⚙️ - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Deploy unstable version 🚀 - env: - PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }} - run: dart run ../../tools/ci-cd/bin/ci.dart publish-dev-version - working-directory: packages/${{matrix.package}} diff --git a/.github/workflows/push_notification.yaml b/.github/workflows/push_notification.yaml deleted file mode 100644 index 1482a1b88..000000000 --- a/.github/workflows/push_notification.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build push_notification - -on: - pull_request: - branches: - - main - paths: - - "packages/push_notification/**" - - ".github/workflows/push_notification.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/push_notification - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F push_notification - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/push_notification - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/push_notification diff --git a/.github/workflows/relation.yaml b/.github/workflows/relation.yaml deleted file mode 100644 index b25d414b4..000000000 --- a/.github/workflows/relation.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build relation - -on: - pull_request: - branches: - - main - paths: - - "packages/relation/**" - - ".github/workflows/relation.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/relation - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F relation - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/relation - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/relation diff --git a/.github/workflows/render_metrics.yaml b/.github/workflows/render_metrics.yaml deleted file mode 100644 index 92cebe01c..000000000 --- a/.github/workflows/render_metrics.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build render_metrics - -on: - pull_request: - branches: - - main - paths: - - "packages/render_metrics/**" - - ".github/workflows/render_metrics.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/render_metrics - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F render_metrics - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/render_metrics - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/render_metrics diff --git a/.github/workflows/surf_controllers.yaml b/.github/workflows/surf_controllers.yaml deleted file mode 100644 index fc098b50d..000000000 --- a/.github/workflows/surf_controllers.yaml +++ /dev/null @@ -1,65 +0,0 @@ -name: build surf_controllers - -on: - pull_request: - branches: - - main - paths: - - "packages/surf_controllers/**" - - ".github/workflows/surf_controllers.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/surf_controllers - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/surf_controllers - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/surf_controllers diff --git a/.github/workflows/surf_lint_rules.yaml b/.github/workflows/surf_lint_rules.yaml deleted file mode 100644 index 8e6b67787..000000000 --- a/.github/workflows/surf_lint_rules.yaml +++ /dev/null @@ -1,65 +0,0 @@ -name: build surf_lint_rules - -on: - pull_request: - branches: - - main - paths: - - "packages/surf_lint_rules/**" - - ".github/workflows/surf_lint_rules.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/surf_lint_rules - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/surf_lint_rules - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/surf_lint_rules diff --git a/.github/workflows/surf_logger.yaml b/.github/workflows/surf_logger.yaml deleted file mode 100644 index 6112a728a..000000000 --- a/.github/workflows/surf_logger.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build surf_logger - -on: - pull_request: - branches: - - main - paths: - - "packages/surf_logger/**" - - ".github/workflows/surf_logger.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/surf_logger - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F surf_logger - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/surf_logger - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/surf_logger diff --git a/.github/workflows/surf_mwwm.yaml b/.github/workflows/surf_mwwm.yaml deleted file mode 100644 index 2eaf60ef2..000000000 --- a/.github/workflows/surf_mwwm.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build surf_mwwm - -on: - pull_request: - branches: - - main - paths: - - "packages/surf_mwwm/**" - - ".github/workflows/surf_mwwm.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/surf_mwwm - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F surf_mwwm - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/surf_mwwm - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/surf_mwwm diff --git a/.github/workflows/surf_util.yaml b/.github/workflows/surf_util.yaml deleted file mode 100644 index 510882da8..000000000 --- a/.github/workflows/surf_util.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build surf_util - -on: - pull_request: - branches: - - main - paths: - - "packages/surf_util/**" - - ".github/workflows/surf_util.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/surf_util - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F surf_util - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/surf_util - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/surf_util diff --git a/.github/workflows/swipe_refresh.yaml b/.github/workflows/swipe_refresh.yaml deleted file mode 100644 index cefd591c5..000000000 --- a/.github/workflows/swipe_refresh.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build swipe_refresh - -on: - pull_request: - branches: - - main - paths: - - "packages/swipe_refresh/**" - - ".github/workflows/swipe_refresh.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/swipe_refresh - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F swipe_refresh - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/swipe_refresh - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/swipe_refresh diff --git a/.github/workflows/tabnavigator.yaml b/.github/workflows/tabnavigator.yaml deleted file mode 100644 index b23ed419c..000000000 --- a/.github/workflows/tabnavigator.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: build tabnavigator - -on: - pull_request: - branches: - - main - paths: - - "packages/tabnavigator/**" - - ".github/workflows/tabnavigator.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/tabnavigator - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install lcov 🔧 - run: | - sudo apt-get update - sudo apt-get install -y lcov - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Prepare check our conventions 🔧 - run: dart pub upgrade - working-directory: tools/ci-cd - - - name: Check our conventions 🔍 - run: dart run ../../tools/ci-cd/bin/ci.dart check-dev-branch - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - - name: Run tests ⚙️ - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - if: success() - run: | - flutter test --coverage - mv coverage/lcov.info coverage/lcov.base.info - flutter pub run ../../tools/coverage/fake_test_generator.dart - flutter test --coverage --merge-coverage test/fake_test.dart - flutter pub run ../../tools/coverage/patch_lcov.dart - bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F tabnavigator - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/tabnavigator - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/tabnavigator diff --git a/.github/workflows/virtual_keyboard.yaml b/.github/workflows/virtual_keyboard.yaml deleted file mode 100644 index 2eecc9da8..000000000 --- a/.github/workflows/virtual_keyboard.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: build virtual_keyboard - -on: - pull_request: - branches: - - main - paths: - - "packages/virtual_keyboard/**" - - ".github/workflows/virtual_keyboard.yaml" - -jobs: - build: - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - working-directory: packages/virtual_keyboard - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Install Flutter 🔧 - uses: subosito/flutter-action@v1 - with: - channel: "stable" - - - name: Install dependencies 🔧 - run: flutter pub get - - - name: Run dependency validator 🔍 - run: | - flutter pub global activate dependency_validator - flutter pub global run dependency_validator:dependency_validator - - - name: Run analyzer 🔍 - run: flutter analyze --fatal-warnings --fatal-infos . - - - name: Run formatter ⚙️ - run: flutter format --set-exit-if-changed . - - package-analysis: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: packages/virtual_keyboard - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - - name: Run package analyzer 🔍 - uses: axel-op/dart-package-analyzer@v3 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - relativePath: packages/virtual_keyboard diff --git a/.gitignore b/.gitignore index 2a8873ea8..c009fb981 100644 --- a/.gitignore +++ b/.gitignore @@ -1,29 +1,3 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ -*.lock - -.idea - -build/ -**/android/**/GeneratedPluginRegistrant.java -ios/.generated/ -ios/Flutter/Generated.xcconfig -ios/Runner/GeneratedPluginRegistrant.* - -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - # IntelliJ related *.iml *.ipr @@ -31,67 +5,4 @@ ios/Runner/GeneratedPluginRegistrant.* .idea/ # Visual Studio Code related -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ -*.lock - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/flutter_export_environment.sh -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages - -# Support file for ci -~changed_list_file -packages/template/ios/Flutter/flutter_export_environment.sh -.last_build_id - -# Unit test runner related -**/coverage/**.info -fake_test.dart -examples/cat_facts/test/golden/app/failures +.vscode/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 4e50b3b5a..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "cSpell.language": "en,ru", - "cSpell.words": [ - "Dependabot", - "codecov", - "datalist", - "lcov", - "mwwm", - "subosito", - "surfstudio", - "tabnavigator" - ] -} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 93f11c6d7..52f57863d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,12 +6,13 @@ Thank you for your help! Before you start, let's take a look at some agreements. Make sure that your code: -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -4. Contains no errors -5. New functionality is covered by tests. New functionality passes old tests -6. Create example that demonstrate new functionality if it is possible +1. Does not contain analyzer errors. +2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style). +3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting). +4. Contains no errors. +5. New functionality is covered by tests. New functionality passes old tests. +6. Create example that demonstrate new functionality if it is possible. +7. The code follows the rules of the package to which you are making a pull request. ## Accepting the changes @@ -21,43 +22,9 @@ After your pull request passes the review code, the project maintainers will mer Feel free to report any issues and bugs. -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required - -## How to update package - -All packages uses [semver](https://semver.org/) form for maintaining versions. - -Meaning that, versions contains 3 numbers: `MAJOR.MINOR.PATCH`. - -For example, you'd like to create a patch, that doesn't break backward compatibility. - -1. Create branch from `main` with name describing patch update. -2. Make some package updates. -3. Update package `Changelog` file with following lines: - - ``` markdown - ## PATCH - - * short summary of proposed changes - - ``` - -4. Create PR and add reviewer. - -When reviewer accepts your PR, and merge it into `main` branch, [GH Actions script](https://github.com/surfstudio/SurfGear/blob/main/.github/workflows/publish_to_pub.yaml) will analyse `Changelog` file for MAJOR, MINOR or PATCH tag. Selecting the highest severity of changes updates the corresponding digit in the package version, then cleans the semver tags from the changelog and publishes the package. - -Note that you don't need to update version in pubspec.yaml. The script does it for you. - -So, your `Changelog` updates will be replaced with - -``` markdown -## latest-stable-version-dev.xx - -* short summary of proposed changes (PATCH … ) - -``` +1. To report about the problem, create an issue on GitHub in the package repository. +2. In the issue add the description of the problem. +3. Do not forget to mention your development environment, Flutter version, libraries required for illustration of the problem. +4. It is necessary to attach the code part that causes an issue or to make a small demo project that shows the issue. +5. Attach stack trace so it helps us to deal with the issue. +6. If the issue is related to graphics, screen recording is required. diff --git a/README.md b/README.md index d2e9eb0e5..7d99994e4 100644 --- a/README.md +++ b/README.md @@ -2,43 +2,10 @@ ![SurfGear Cover](https://i.ibb.co/k6d07BK/logo-surf-gear.png) -A set of libraries, standards, tools used by Surf studio when developing on Flutter. +A set of libraries and tools used by [Surf](https://surf.ru/) when developing with Flutter. +This repository is a showcase. All packages are in separate repositories, which you can find at the links. -This repository is intended **for demonstration**. - -[**Documentation and standards**](docs/en/main.md) - -## Modules - -### Architecture - -* [MWWM](#mwwm) -* [Relation](#relation) -* [Surf Controllers](#surf-controllers) -* [Surf MWWM](#surf-mwwm) - -### Widgets - -* [Bottom Navigation Bar](#bottom-navigation-bar) -* [Bottom Sheet](#bottom-sheet) -* [In App Rate](#in-app-rate) -* [Ink Widget](#ink-widget) -* [Swipe Refresh](#swipe-refresh) -* [Tab Navigator](#tab-navigator) -* [Virtual Keyboard](#virtual-keyboard) - -### Services - -* [Analytics](#analytics) -* [Auto Reload](#auto-reload) -* [Data List](#data-list) -* [Keyboard Listener](#keyboard-listener) -* [OTP autofill](#otp-autofill) -* [Push Notification](#push-notification) -* [Render Metrics](#render-metrics) -* [Surf Lint Rules](#surf-lint-rules) -* [Surf Logger](#surf-logger) -* [Surf Util](#surf-util) +Our other solutions are also in separate repositories, but they are under development. --- @@ -50,37 +17,9 @@ This repository is intended **for demonstration**. [![Pub Popularity](https://badgen.net/pub/popularity/analytics?label=pub%20popularity)](https://pub.dev/packages/analytics/score) [![Flutter Platform](https://badgen.net/pub/flutter-platform/analytics)](https://pub.dev/packages/analytics/) -Interface for working with analytic services. The library is supposed to unify work with various analytic services. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/analytics/README.md) +Interface for working with analytic services. The library is supposed to unify work with various analytic services. [Learn More](https://github.com/surfstudio/flutter-analytics/blob/main/README.md) -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/analytics) - ---- - -#### `Auto Reload` - -> [![Pub Version](https://img.shields.io/pub/v/auto_reload?logo=dart&logoColor=white)](https://pub.dev/packages/auto_reload/) -[![Pub Likes](https://badgen.net/pub/likes/auto_reload?label=pub%20likes)](https://pub.dev/packages/auto_reload/score) -[![Pub Points](https://badgen.net/pub/points/auto_reload?label=pub%20points)](https://pub.dev/packages/auto_reload/score) -[![Pub Popularity](https://badgen.net/pub/popularity/auto_reload?label=pub%20popularity)](https://pub.dev/packages/auto_reload/score) -[![Flutter Platform](https://badgen.net/pub/flutter-platform/auto_reload)](https://pub.dev/packages/auto_reload/) - -A library that helps to perform actions with some periodicity. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/auto_reload/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/auto_reload) - ---- - -#### `Bottom Navigation Bar` - -> [![Pub Version](https://img.shields.io/pub/v/bottom_navigation_bar?logo=dart&logoColor=white)](https://pub.dev/packages/bottom_navigation_bar/) -[![Pub Likes](https://badgen.net/pub/likes/bottom_navigation_bar?label=pub%20likes)](https://pub.dev/packages/bottom_navigation_bar/score) -[![Pub Points](https://badgen.net/pub/points/bottom_navigation_bar?label=pub%20points)](https://pub.dev/packages/bottom_navigation_bar/score) -[![Pub Popularity](https://badgen.net/pub/popularity/bottom_navigation_bar?label=pub%20popularity)](https://pub.dev/packages/bottom_navigation_bar/score) -[![Flutter Platform](https://badgen.net/pub/flutter-platform/bottom_navigation_bar)](https://pub.dev/packages/bottom_navigation_bar/) - -Bottom navigation bar. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/bottom_navigation_bar/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/bottom_navigation_bar) +[View Source](https://github.com/surfstudio/flutter-analytics) --- @@ -92,67 +31,9 @@ Bottom navigation bar. [Learn More](https://github.com/surfstudio/SurfGear/blob/ [![Pub Popularity](https://badgen.net/pub/popularity/bottom_sheet?label=pub%20popularity)](https://pub.dev/packages/bottom_sheet/score) [![Flutter Platform](https://badgen.net/pub/flutter-platform/bottom_sheet)](https://pub.dev/packages/bottom_sheet/) -Custom bottom sheet widget, that can resize by drag and then scroll. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/bottom_sheet/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/bottom_sheet) - ---- - -#### `Data List` - -> [![Pub Version](https://img.shields.io/pub/v/datalist?logo=dart&logoColor=white)](https://pub.dev/packages/datalist/) -[![Pub Likes](https://badgen.net/pub/likes/datalist?label=pub%20likes)](https://pub.dev/packages/datalist/score) -[![Pub Points](https://badgen.net/pub/points/datalist?label=pub%20points)](https://pub.dev/packages/datalist/score) -[![Pub Popularity](https://badgen.net/pub/popularity/datalist?label=pub%20popularity)](https://pub.dev/packages/datalist/score) -[![Flutter Platform](https://badgen.net/pub/flutter-platform/datalist)](https://pub.dev/packages/datalist/) - -Implementation DataList in Flutter. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/datalist/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/datalist) - ---- - -#### `In App Rate` - -Plugin open native dialog for application rate/review. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/in_app_rate/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/in_app_rate) - ---- - -#### `Ink Widget` - -> [![Pub Version](https://img.shields.io/pub/v/ink_widget?logo=dart&logoColor=white)](https://pub.dev/packages/ink_widget/) -[![Pub Likes](https://badgen.net/pub/likes/ink_widget?label=pub%20likes)](https://pub.dev/packages/ink_widget/score) -[![Pub Points](https://badgen.net/pub/points/ink_widget?label=pub%20points)](https://pub.dev/packages/ink_widget/score) -[![Pub Popularity](https://badgen.net/pub/popularity/ink_widget?label=pub%20popularity)](https://pub.dev/packages/ink_widget/score) -[![Flutter Platform](https://badgen.net/pub/flutter-platform/ink_widget)](https://pub.dev/packages/ink_widget/) - -Widget library with ink effect without problems with decoration for child. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/ink_widget/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/ink_widget) - ---- - -#### `Keyboard Listener` - -Keyboard listener created only on Flutter. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/keyboard_listener/README.md) +Custom bottom sheet widget, that can resize by drag and then scroll. [Learn More](https://github.com/surfstudio/flutter-bottom-sheet/blob/main/README.md) -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/keyboard_listener) - ---- - -#### `MWWM` - -> [![Pub Version](https://img.shields.io/pub/v/mwwm?logo=dart&logoColor=white)](https://pub.dev/packages/mwwm/) -[![Pub Likes](https://badgen.net/pub/likes/mwwm?label=pub%20likes)](https://pub.dev/packages/mwwm/score) -[![Pub Points](https://badgen.net/pub/points/mwwm?label=pub%20points)](https://pub.dev/packages/mwwm/score) -[![Pub Popularity](https://badgen.net/pub/popularity/mwwm?label=pub%20popularity)](https://pub.dev/packages/mwwm/score) -[![Flutter Platform](https://badgen.net/pub/flutter-platform/mwwm)](https://pub.dev/packages/mwwm/) - -MVVM-inspired lightweight architectural framework for Flutter apps made with respect to Clean Architecture. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/mwwm/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/mwwm) +[View Source](https://github.com/surfstudio/flutter-bottom-sheet) --- @@ -164,9 +45,9 @@ MVVM-inspired lightweight architectural framework for Flutter apps made with res [![Pub Popularity](https://badgen.net/pub/popularity/otp_autofill?label=pub%20popularity)](https://pub.dev/packages/otp_autofill/score) [![Flutter Platform](https://badgen.net/pub/flutter-platform/otp_autofill)](https://pub.dev/packages/otp_autofill/) -This plugin uses [SMS User Consent API](https://developers.google.com/identity/sms-retriever/user-consent/overview) and [SMS Retriever API](https://developers.google.com/identity/sms-retriever/overview) on Android. You could use autofill from another input by using OTPStrategy. (e.g. from push-notification). [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/otp_autofill/README.md) +This plugin uses [SMS User Consent API](https://developers.google.com/identity/sms-retriever/user-consent/overview) and [SMS Retriever API](https://developers.google.com/identity/sms-retriever/overview) on Android. You could use autofill from another input by using OTPStrategy. (e.g. from push-notification). [Learn More](https://github.com/surfstudio/flutter-otp-autofill/blob/main/README.md) -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/otp_autofill) +[View Source](https://github.com/surfstudio/flutter-otp-autofill) --- @@ -178,51 +59,9 @@ This plugin uses [SMS User Consent API](https://developers.google.com/identity/s [![Pub Popularity](https://badgen.net/pub/popularity/push_notification?label=pub%20popularity)](https://pub.dev/packages/push_notification/score) [![Flutter Platform](https://badgen.net/pub/flutter-platform/push_notification)](https://pub.dev/packages/push_notification/) -Library for implementing push notifications. The module contains the main work with push notifications. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/push_notification/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/push_notification) - ---- - -#### `Relation` - -> [![Pub Version](https://img.shields.io/pub/v/relation?logo=dart&logoColor=white)](https://pub.dev/packages/relation/) -[![Pub Likes](https://badgen.net/pub/likes/relation?label=pub%20likes)](https://pub.dev/packages/relation/score) -[![Pub Points](https://badgen.net/pub/points/relation?label=pub%20points)](https://pub.dev/packages/relation/score) -[![Pub Popularity](https://badgen.net/pub/popularity/relation?label=pub%20popularity)](https://pub.dev/packages/relation/score) -[![Flutter Platform](https://badgen.net/pub/flutter-platform/relation)](https://pub.dev/packages/relation/) - -The stream representation of the relations of the entities and widget utilities. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/relation/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/relation) - ---- - -#### `Render Metrics` - -> [![Pub Version](https://img.shields.io/pub/v/render_metrics?logo=dart&logoColor=white)](https://pub.dev/packages/render_metrics/) -[![Pub Likes](https://badgen.net/pub/likes/render_metrics?label=pub%20likes)](https://pub.dev/packages/render_metrics/score) -[![Pub Points](https://badgen.net/pub/points/render_metrics?label=pub%20points)](https://pub.dev/packages/render_metrics/score) -[![Pub Popularity](https://badgen.net/pub/popularity/render_metrics?label=pub%20popularity)](https://pub.dev/packages/render_metrics/score) -[![Flutter Platform](https://badgen.net/pub/flutter-platform/render_metrics)](https://pub.dev/packages/render_metrics/) - -This package helps retrieve the current positioning coordinates of any widget in a widgets tree in your Flutter application. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/render_metrics/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/render_metrics) - ---- - -#### `Surf Controllers` - -> [![Pub Version](https://img.shields.io/pub/v/surf_controllers?logo=dart&logoColor=white)](https://pub.dev/packages/surf_controllers/) -[![Pub Likes](https://badgen.net/pub/likes/surf_controllers?label=pub%20likes)](https://pub.dev/packages/surf_controllers/score) -[![Pub Points](https://badgen.net/pub/points/surf_controllers?label=pub%20points)](https://pub.dev/packages/surf_controllers/score) -[![Pub Popularity](https://badgen.net/pub/popularity/surf_controllers?label=pub%20popularity)](https://pub.dev/packages/surf_controllers/score) -[![Flutter Platform](https://badgen.net/pub/flutter-platform/surf_controllers)](https://pub.dev/packages/surf_controllers/) - -Common controller for call dialogs. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/surf_controllers/README.md) +Library for implementing push notifications. The module contains the main work with push notifications. [Learn More](https://github.com/surfstudio/flutter-push-notification/blob/main/README.md) -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/surf_controllers) +[View Source](https://github.com/surfstudio/flutter-push-notification) --- @@ -234,9 +73,9 @@ Common controller for call dialogs. [Learn More](https://github.com/surfstudio/S [![Pub Popularity](https://badgen.net/pub/popularity/surf_lint_rules?label=pub%20popularity)](https://pub.dev/packages/surf_lint_rules/score) [![Flutter Platform](https://badgen.net/pub/flutter-platform/surf_lint_rules)](https://pub.dev/packages/surf_lint_rules/) -Lint rules used in "Surf" company. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/surf_lint_rules/README.md) +Lint rules used in [Surf](https://surf.ru/). [Learn More](https://github.com/surfstudio/flutter-surf-lint-rules/blob/main/README.md) -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/surf_lint_rules) +[View Source](https://github.com/surfstudio/flutter-surf-lint-rules) --- @@ -248,23 +87,9 @@ Lint rules used in "Surf" company. [Learn More](https://github.com/surfstudio/Su [![Pub Popularity](https://badgen.net/pub/popularity/surf_logger?label=pub%20popularity)](https://pub.dev/packages/surf_logger/score) [![Flutter Platform](https://badgen.net/pub/flutter-platform/surf_logger)](https://pub.dev/packages/surf_logger/) -Logger for Dart & Flutter. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/surf_logger/README.md) +Logger for Dart & Flutter. [Learn More](https://github.com/surfstudio/flutter-surf-logger/blob/main/README.md) -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/surf_logger) - ---- - -#### `Surf MWWM` - -> [![Pub Version](https://img.shields.io/pub/v/surf_mwwm?logo=dart&logoColor=white)](https://pub.dev/packages/surf_mwwm/) -[![Pub Likes](https://badgen.net/pub/likes/surf_mwwm?label=pub%20likes)](https://pub.dev/packages/surf_mwwm/score) -[![Pub Points](https://badgen.net/pub/points/surf_mwwm?label=pub%20points)](https://pub.dev/packages/surf_mwwm/score) -[![Pub Popularity](https://badgen.net/pub/popularity/surf_mwwm?label=pub%20popularity)](https://pub.dev/packages/surf_mwwm/score) -[![Flutter Platform](https://badgen.net/pub/flutter-platform/surf_mwwm)](https://pub.dev/packages/surf_mwwm/) - -Reflection of widget in a single entity. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/surf_mwwm/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/surf_mwwm) +[View Source](https://github.com/surfstudio/flutter-surf-logger) --- @@ -276,9 +101,9 @@ Reflection of widget in a single entity. [Learn More](https://github.com/surfstu [![Pub Popularity](https://badgen.net/pub/popularity/surf_util?label=pub%20popularity)](https://pub.dev/packages/surf_util/score) [![Flutter Platform](https://badgen.net/pub/flutter-platform/surf_util)](https://pub.dev/packages/surf_util/) -A library with set of common classes and utilities used in different modules. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/surf_util/README.md) +A library with set of common classes and utilities used in different modules. [Learn More](https://github.com/surfstudio/flutter-surf-util/blob/main/README.md) -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/surf_util) +[View Source](https://github.com/surfstudio/flutter-surf-util) --- @@ -290,38 +115,15 @@ A library with set of common classes and utilities used in different modules. [L [![Pub Popularity](https://badgen.net/pub/popularity/swipe_refresh?label=pub%20popularity)](https://pub.dev/packages/swipe_refresh/score) [![Flutter Platform](https://badgen.net/pub/flutter-platform/swipe_refresh)](https://pub.dev/packages/swipe_refresh/) -Widget for refresh by swipe. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/swipe_refresh/README.md) +Widget for refresh by swipe. [Learn More](https://github.com/surfstudio/flutter-swipe-refresh/blob/main/README.md) -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/swipe_refresh) - ---- - -#### `Tab Navigator` - -> [![Pub Version](https://img.shields.io/pub/v/tabnavigator?logo=dart&logoColor=white)](https://pub.dev/packages/tabnavigator/) -[![Pub Likes](https://badgen.net/pub/likes/tabnavigator?label=pub%20likes)](https://pub.dev/packages/tabnavigator/score) -[![Pub Points](https://badgen.net/pub/points/tabnavigator?label=pub%20points)](https://pub.dev/packages/tabnavigator/score) -[![Pub Popularity](https://badgen.net/pub/popularity/tabnavigator?label=pub%20popularity)](https://pub.dev/packages/tabnavigator/score) -[![Flutter Platform](https://badgen.net/pub/flutter-platform/tabnavigator)](https://pub.dev/packages/tabnavigator/) - -Possibly the most common style of navigation in mobile apps is tab-based navigation. This module can manage the tabs on the screen. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/tabnavigator/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/tabnavigator) - ---- - -#### `Virtual Keyboard` - -Keyboard widget for use in widget tree. [Learn More](https://github.com/surfstudio/SurfGear/blob/main/packages/virtual_keyboard/README.md) - -[View Source](https://github.com/surfstudio/SurfGear/blob/main/packages/virtual_keyboard) +[View Source](https://github.com/surfstudio/flutter-swipe-refresh) --- ## How to ask questions? -You can ask questions of interest either in the [Issue](https://github.com/surfstudio/SurfGear/issues) or [Discussion](https://github.com/surfstudio/SurfGear/discussions) to the repository, or in a special [chat on Telegram](https://t.me/SurfGear). - +You can ask questions of interest either in the Release, or in the Discussion in the repository of the package to which the question relates, or in a special [chat in Telegram](https://t.me/SurfGear). ## Thanks Many thanks to the entire **Surf team** for their contribution to the development of the repository! diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index aa7ac080f..000000000 --- a/codecov.yml +++ /dev/null @@ -1,105 +0,0 @@ -coverage: - precision: 2 - round: nearest - status: - patch: off - project: - default: off - analytics: - flags: analytics - auto_reload: - flags: auto_reload - bottom_navigation_bar: - flags: bottom_navigation_bar - bottom_sheet: - flags: bottom_sheet - datalist: - flags: datalist - ink_widget: - flags: ink_widget - mwwm: - flags: mwwm - otp_autofill: - flags: otp_autofill - push_notification: - flags: push_notification - relation: - flags: relation - render_metrics: - flags: render_metrics - surf_logger: - flags: surf_logger - surf_mwwm: - flags: surf_mwwm - surf_utils: - flags: surf_utils - swipe_refresh: - flags: swipe_refresh - tabnavigator: - flags: tabnavigator - -flags: - analytics: - paths: - - packages/analytics/ - carryforward: true - auto_reload: - paths: - - packages/auto_reload/ - carryforward: true - bottom_navigation_bar: - paths: - - packages/bottom_navigation_bar/ - carryforward: true - bottom_sheet: - paths: - - packages/bottom_sheet/ - carryforward: true - datalist: - paths: - - packages/datalist/ - carryforward: true - ink_widget: - paths: - - packages/ink_widget/ - carryforward: true - mwwm: - paths: - - packages/mwwm/ - carryforward: true - otp_autofill: - paths: - - packages/otp_autofill/ - carryforward: true - push_notification: - paths: - - packages/push_notification/ - carryforward: true - relation: - paths: - - packages/relation/ - carryforward: true - render_metrics: - paths: - - packages/render_metrics/ - carryforward: true - surf_logger: - paths: - - packages/surf_logger/ - carryforward: true - surf_mwwm: - paths: - - packages/surf_mwwm/ - carryforward: true - surf_utils: - paths: - - packages/surf_utils/ - carryforward: true - swipe_refresh: - paths: - - packages/swipe_refresh/ - carryforward: true - tabnavigator: - paths: - - packages/tabnavigator/ - carryforward: true diff --git a/docs/en/best_practice/flavors/flavors_for_devs.md b/docs/en/best_practice/flavors/flavors_for_devs.md deleted file mode 100644 index 68c7d3394..000000000 --- a/docs/en/best_practice/flavors/flavors_for_devs.md +++ /dev/null @@ -1,199 +0,0 @@ -[Main](../../main.md) - -[Full article on Medium.](https://medium.com/surfstudio/setting-up-flavors-in-flutter-e455834818d4) - -# Setting Up Flavors in Flutter - -All steps already done in template. - -You can change identifier in common.xcconfig. - -The information below is accompanying. - -### Android - - It’s really straightforward and by no means different from usual methods on Android. - - Here’s what you need at a minimum: - - ```groovy - flavorDimensions "release-type" - - productFlavors { - dev { - dimension "release-type" - applicationIdSuffix ".dev" - versionNameSuffix "-dev" - } - - prod { - dimension "release-type" - } - } -``` - -That’s it! Now you can easily run this command: -``` -flutter run --flavor dev -``` -on your Android device. - -### iOS - -1. Create two configurations. -1. Add suffix to the dev one. -1. Profit! - - -### Configuration files - -There are two configurations in your projects: dev and prod. -Their contents are as follows: - -```с -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-dev.xcconfig" -#include "Generated.xcconfig" -#include "common.xcconfig" - -bundle_suffix=.dev -IDENTIFIER=$(identifier)$(bundle_suffix) -``` - -Create two configurations and add them to the following directories: -``` -ios/Flutter/dev.xcconfig -ios/Flutter/prod.xcconfig -``` - -This can also be done through Xcode (even better — to add them as configuration files). -**Right-click on Runner -> New File -> Configuration Settings File -> select the save location**. - -Create one more configuration file, in which you will set the basic part of your RODUCT_BUNDLE_IDENTIFIER. - -File contents are defined in a single line: -``` -identifier=your.bundle.identifier -``` - -Include this file in other configs and set a new User Defined Variable IDENTIFIER: -``` -#include "common.xcconfig" - -IDENTIFIER=$(identifier)$(bundle_suffix) -``` - -### Build Configurations. Make it double - -It’s time to get familiar with build configurations. In Xcode, open Runner.xcworkspace and select the Runner project. - -Find ’+’ in the Configurations section and create four new configurations: two for Release and two for Debug adding a postfix with the name of your config and future app scheme. - -Like this: - -![configs](../../../img/best_practice/configs.png) - -Unfortunately, duplication of configurations is still necessary, since iOS build script is very sensitive to naming. - - - -### Adding schemes - -Apart from creating config files, you need to correctly configure application schemes — there will also be two of them. - -![schemes](../../../img/best_practice/schemes.png) - -This one is really easy. Important note: choose the correct target — Runner. - -Now, select Edit Scheme and add the necessary configurations to each of the scheme processes. - -### Update variables - -Now, let’s do some mouse work in Xcode. Select your target and click the Build Settings button: -![build_settings](../../../img/best_practice/bs_step1.png) - -Do a search for Product Bundle Identifier (the Packaging section): -![build_settings](../../../img/best_practice/bs_step2.png) - -Change values for all configs to: -``` -$(IDENTIFIER) -``` - -![build_settings](../../../img/best_practice/bs_step3.png) - -Now go to Info.plist and remove bundle suffix from the identifier line, leaving only: -``` -$(PRODUCT_BUNFLE_IDENTIFIER) -``` - -### Separate files for different Bundle IDs - -...But you’ve decided to integrate analytics. If you use Firebase, you’ll need two projects and four apps respectively (two platforms for two versions). - -Most importantly, you’ll need to have two google-services.json files (Google-Services.Info.plist). With Android, it’s easily managed: just create a folder with your flavor’s name and add your file there. - -#### Creating and locating files - -You need to create a new folder in the project to store these files. Use the following structure: - -![dirs](../../../img/best_practice/files_and_dirs.png) - -**Important note**: do not create them via XCode. The files should not be mapped to the project. If Xcode is your favorite IDE, uncheck the Add to Targets checkbox when creating the files. - -The next step is adding your files to the corresponding folders. - -#### Adding files to the app at build time - -Since the files are not mapped to the project, they won’t get into the target archive. You should add them here manually. - -Add an extra build phase in the form of Run Script (let’s name it Setup Firebase, for example): - ![build_phase](../../../img/best_practice/build_phase.png) - - You need to pay attention to the location, it’s crucial.! - - Now, add the script. As an option, you can use the following one: - - ``` - # Name of the resource we're selectively copying -GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist - -# Get references to dev and prod versions of the GoogleService-Info.plist -# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually) -GOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/dev/${GOOGLESERVICE_INFO_PLIST} -GOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/prod/${GOOGLESERVICE_INFO_PLIST} - -# Make sure the dev version of GoogleService-Info.plist exists -echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_DEV}" -if [ ! -f $GOOGLESERVICE_INFO_DEV ] -then -echo "No Development GoogleService-Info.plist found. Please ensure it's in the proper directory." -exit 1 # 1 -fi - -# Make sure the prod version of GoogleService-Info.plist exists -echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_PROD}" -if [ ! -f $GOOGLESERVICE_INFO_PROD ] -then -echo "No Production GoogleService-Info.plist found. Please ensure it's in the proper directory." -exit 1 # 1 -fi - -# Get a reference to the destination location for the GoogleService-Info.plist -PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app -echo "Will copy ${GOOGLESERVICE_INFO_PLIST} to final destination: ${PLIST_DESTINATION}" - -# Copy over the prod GoogleService-Info.plist for Release builds -if [[ "${CONFIGURATION}" == *-prod ]] -then -echo "Using ${GOOGLESERVICE_INFO_PROD}" -cp "${GOOGLESERVICE_INFO_PROD}" "${PLIST_DESTINATION}" -else -echo "Using ${GOOGLESERVICE_INFO_DEV}" -cp "${GOOGLESERVICE_INFO_DEV}" "${PLIST_DESTINATION}" -fi -``` - - - - - diff --git a/docs/en/best_practice/reduce_app_size.md b/docs/en/best_practice/reduce_app_size.md deleted file mode 100644 index 59c707367..000000000 --- a/docs/en/best_practice/reduce_app_size.md +++ /dev/null @@ -1,101 +0,0 @@ -[Main](../main.md) - -# Reduce application size - -## Android - -Files -Files taking up the most space in build: -- `libflutter.so` - run-time framework's library. Flutter team promises to optimize the size of this file in future versions, or to put it in a separately installed run-time package; -- `libapp.so` - compiled application; -- `classes.dex` - Native part of used libraries in one file. Most libraries have already passed through an obfuscator; -- catalog `res` - system resources, such like Material and Cupertino icons, assets collection from project catalog; -- others in the amount of less than 1% of size; - -Files `libflutter.so` and `libapp.so` included in all builds for all supported platform, so if try to build one for x86, x86_64, armeabiv7a, arm64_v8a, then build occupies much more space. -Another choice is to start build with argument `--split-per-abi`: -``` -flutter build apk --split-per-abi -``` -In this case we have a few separeted builds, one for each platform, each bilds take less then 10 Mb for release. - -### App Bundles - -Aab-file is a download format, that content all compiled code and resources of application iin one build artifact. - -If start build with argument - App Bundles: -``` -flutter build appbundle -``` -then it compiled to `*.aab` file, wich size correspond to fat apk-file. - -If you need to distribute the application via Google Play, then it is more profitable to use an aab-file. -Because, in this case, after downloading the signed application package on Google Play, there is everything you need, -to create and sign application apk files and provide them to users through dynamic delivery. -That is, the user will download the apk file from Google Play, which will contain binary files of only one, the required platform. - -If the application is distributed using other services, or simply by transferring files, then there is no point in transferring an aab file, -because it cannot be installed on the device. -Using utilities, you need to prepare from it either a fat apk file for all platforms, or separate apk files for different platforms. -In this case, it is easier to use the apk assembly with the argument `--split-per-abi`. - -The steps of the flutter team over the release build size of the application can be observed [there](https://github.com/flutter/flutter/issues/16833) -The flutter team periodically reduce size of `libflutter.so` by optimizing the libraries used and by using the latest versions -a compiler that generates more compact code. - - -## iOS -Application build for iOS is larger than build for same application for Android. -Mainly because Apple encrypts binary files within the IPA, making compression less efficient. - -The general recommendation is to prefer loading large data from assets instead of declaring static constants in the code. - -Apple has taken care to partially download application updates from the App Store. -Quote from the knowledge base: -``` -For devices running iOS 7.1 and later, the service pack may only contain differences -between the old and new versions of the modified file, not the full file. This can significantly reduce the package size. -updates if only a small part of the large file is changed, but the update installation time will increase -on the device. -``` - - -## Resources - -What data format to prefer for storing graphic files? - -- `PNG` - format for the presentation of raster images, has its own, sufficient effective compression. -- `JPG` - format for the presentation of raster images, has its own, sufficient effective compression. - It is preferable to use the `PNG` format, since the `JPG` format has lossy compression and artifacts may be noticeable on the image. -- `SVG` - presentation format of vector images, basically it has a text format, is compressed inside the assembly artifact. -- `TTF` - the font file format that can be created from a set of svg files, the binary format is compressed inside the assembly artifact. - To get a font file from a set of svg files, you can use [utility](https://github.com/ilikerobots/polyicon) -- `FLR` - Flare animation format, it is text format that compressed inside the assembly artifact - -None of the listed formats gives a significant advantage in the amount of information stored inside the assembly artifact. - -The general recommendation is to prefer loading large data from assets instead of declaring static constants in the code. - - -## Obfuscated Dart Code - -On the example of a real application (ROS) size of fat apk: - -- without obfuscation - 16 131 443 B -- with obfuscation - 16 031 895 B - -However, the obfuscation gives some more side effects. -For example, printing a string representation of an object type, a stack trace, and more, -will behave a little differently than expected from a Dart program running in normal mode - because the identifiers will be distorted. - -All identifiers that return methods, such as: -Object.runtimeType, -Type.toString, -Enum.toString, -Stacktrace.toString, -Symbol.toString, -will return distorted results. Any code or tests that rely on the result of these functions will stop working. - -However, for example, to decrypt the stack trace, you can add the argument -`--save-obfuscation-map=` which forces the VM to store the mapping between the original names and the distorted ones in the given `filename`. -The mapping is encoded as a JSON array `[original_name_0, obfuscated_name_0, original_name_1, obfuscated_name_1, ...]`. diff --git a/docs/en/common/arch.md b/docs/en/common/arch.md deleted file mode 100644 index c105d03a9..000000000 --- a/docs/en/common/arch.md +++ /dev/null @@ -1,36 +0,0 @@ -[Main](../main.md) - -# Architecture - -The architecture of the projects is based on the adapted Clean Architecture. -The UI layer is based on a variation of MVVM + a bit of MVI. - -Identified the following layers: - -**Widget** - UI layer, contains only declarative logic. Interacts with WidgetModel through *Action* and *StreamedState* (in fact analog binding in mvvm). - -**WidgetModel** - associates a widget layer with business logic through a model. May contain the logic needed for the UI layer. - -**Model** - WidgetModel link layer with pure business logic. It is a set of contracts (performer) that a model can execute. Each contract is an isolated atomic part of the business logic. WidgetModel initiates an action with a change message (change). The model searches for the contract corresponding to this change and executes it. - -**BusinessLogic** - the business logic layer, contains pure dart logic, is completely independent of Flutter. - -![](../../img/mwwm.png) - -The business logic layer usually contains the following types of entities, each of which has its own area of responsibility. - -**Interactor** - -An interactor is an entity that implements the logic of some business process. The interactor is platform independent, it only implements the use case logic. - -**Repository** - -Speaking about repositories, we should recall the pattern, which is actually called the “Repository”. The main idea is to create a layer of abstraction over any specific data sources, for example, a database or a web service. The purpose of the repository is to become an intermediary between those who request data and those who give it. It is important to understand that everything above the repository should not know how it is organized and where it gets this data from. This can be a network request, a request to the database, or all together, the so-called hybrid request, which implies the concatenation of requests to the server and cache according to some rule you set. - -**Storage** - -Data Source Wrap. Following the principles of SOLID, each class must have a single responsibility. You cannot mix the logic of several classes into one. The Storage entity is designed to abstract the operation of data storage. For example, there is a case when you need to save user data to a local device. You have to do it in various formats. For example xml and json. In this case, the correct solution would be to implement a separately low-level api for working with the device’s file system - FileSystem. Then implement two "wrappers" JsonStorage and XmlStorage, which will use the FileSystem to access the file system, and the data storage logic will be implemented directly in these classes. - -**Mapper** - -An object that transform one data type to another. \ No newline at end of file diff --git a/docs/en/common/async.md b/docs/en/common/async.md deleted file mode 100644 index 410ae04f3..000000000 --- a/docs/en/common/async.md +++ /dev/null @@ -1,91 +0,0 @@ -[Main](../main.md) - -# Asynchronous interactions - -The UI does not directly interact with receiving data. -All asynchronous actions are performed in WidgetModel. -To perform asynchronous operations in projects, the most commonly used library is [rxDart][rx_dart_link] -How to use it is described in detail in [this article][rx_dart_habr]. - - -## subscribeHandleError - -In WidgetModel, subscribing to change data in Observable occurs using the subscribeHandleError method -from class [WidgetModel](../../../packages/mwwm/lib/src/widget_model.dart). This approach allows you to standardize -processing received data and achieve modular error handling; - -Example: - -```dart - subscribeHandleError( - _authInteractor.signIn(smsCodeState.value, _phoneNumber), - (_) => _navigateToMain(), - onError: (_) smsInputState.error(), - ); -``` - -## subscribe -Subscription without centralized error handling. - -Example: - -```dart - //selectNotificationSubject this is entity of BehaviorSubject - one of the types of streams from rxDart - //onSelect Future data type method. Run when a change occurs in selectNotificationSubject - subscribe( - _notificationController.selectNotificationSubject, - _notificationHandler.onSelect, - ); -``` - -## Future -Standard Dart Asynchronous Processing Engine. see details -possible in [official documentation][future_link]. - -Пример: - -```dart -FlatButton( - child: Text('Run Future'), - onPressed: () { - runMyFuture(); - }, -) - -void runMyFuture() { - myTypedFuture().then((value) { - print(value); - }, onError: (error) { - print(error); - }); -} - -Future myTypedFuture() async { - await Future.delayed(Duration(seconds: 1)); - return Future.error('Error from return'); -} -``` - -## ErrorHandler -To handle errors received from a stream in the studio -extensions to the [ErrorHandler](../../../packages/mwwm/lib/src/error/error_handler.dart) class are used. -The ErrorHandler is passed to WidgetModel through the WidgetModelDependencies class - this is a wrapper over the required WidgetModel elements. -If you do not configure ErrorHandler in a screen component, using the subscribeHandleError method -errors will not be caught. - -## bind -To track single actions (clicking on a button, changing text, scrolling list) in the studio -used [Action](../../../packages/relation/lib/src/relation/action/action.dart). Represents a wrapper over a stream that registers -single actions and returns the first event from the stream. For convenience of subscribing to such events, the bind method was created. - -Example: - -```dart -void _bindActions() { - bind(showCardAction, (_) => _navigateToShowCardScreen()); - } -``` - -[rx_dart_link]:https://pub.dev/packages/rxdart -[rx_dart_habr]:https://www.burkharts.net/apps/blog/rxdart-magical-transformations-of-streams/ -[future_link]:https://api.flutter.dev/flutter/dart-async/Future-class.html \ No newline at end of file diff --git a/docs/en/common/build.md b/docs/en/common/build.md deleted file mode 100644 index 94f47c305..000000000 --- a/docs/en/common/build.md +++ /dev/null @@ -1,63 +0,0 @@ -[Main](../main.md) - -# Build/deploy project - -## Set SDK version - -In most cases, all projects use the same SDK version in stable. -This version must be installed in the file [./script/version.sh](../../../template/script/version) - -``` -current_version=*sdk version* -``` - -## Build - -Scripts from the /script directory are provided for building artifacts. -Their execution takes place on Jenkins with Pr and Tag jobs. -It is also possible to manually execute scripts from the console. - -- ./script/android/build.sh - build qa/release (x64) -- ./script/ios/build.sh - ios build -- ./script/version.sh - checkout Flutter SDK version for prokect - -**IMPORTANT**: All commands execute from **project's** root (where the pubspec.yaml of application is located) - -**IMPORTANT**: Before IOs build is necessary - -* Download certificates from Apple Account and Provisioning Profile and put them in a folder `./ios/certs` -* Fill todo in script `./ios/scripts/init_certs.sh` - -* Execute following commands: - -``` -make -C ios/ init -``` - -In case of unclear errors (актуально для iOS сборок): - -1. Quite Xcode -1. Disconnect devices -1. Clear project: -``` -./clean_ios.sh -``` - -1. Repeat all the steps to build the project - - -## Deployment artifacts - -To deploy artifacts we use **Beta by Fabric**. -To upload Build in this service, fastlane is used. - -Basically commands: - -``` -cd android/; fastlane android beta //android build - -make -C ios beta //ios build -``` - -**IMPORTANT**: When uploading locally before it, you should build the project using one of the described -above build scripts. diff --git a/docs/en/common/cd.md b/docs/en/common/cd.md deleted file mode 100644 index e1e6bccef..000000000 --- a/docs/en/common/cd.md +++ /dev/null @@ -1,29 +0,0 @@ -`NOT_ACTUAL` - -[Main](../main.md) - -# Continious Delivery - -To deliver artifacts to testers we use fastlane (responsible for unload) -and Beta by Fabric (build distribution service). - -The build and deployment stages are written [here](./build.md). - -This document describes how to configure Fabric. - -The basic configuration for deployment to Beta is configured in a template project. -In a specific project, the following steps must be taken: - -1. Create [organization in Fabric](https://www.fabric.io/settings/organizations) -1. Android: - 1. ./android/app/fabric.properties - add relevant API_KEY/API_SECRET - 1. ./android/fastlane/Fastfile - add relevant API_KEY/API_SECRET - 1. ./android/fastlane/Appfile - add relevant package-name -1. iOS: - 1. ./ios/Runner/Info.plist - add relevant API_KEY/API_SECRET into the necessary keys - 1. ./ios/fastlane/Appfile - add credentials - 1. ./ios/fastlane/Fastfile - add relevant API_KEY/API_SECRET and app_identifier -1. Stimulate a fatal error on one of the initial screens of the application. -1. Run the application on devices of both platforms. - -After these steps, two projects corresponding to the applications should appear in Fabric. \ No newline at end of file diff --git a/docs/en/common/check_connect.md b/docs/en/common/check_connect.md deleted file mode 100644 index 37b4d73d7..000000000 --- a/docs/en/common/check_connect.md +++ /dev/null @@ -1,48 +0,0 @@ -# Connection check - -[Main](../main.md) - -# Connectivity - -Checking your network connection is very important for almost any application. -There are cases when you need to check the application’s connection to the Internet or to a wi-fi network. -If the user has an Internet connection, the application continues to work, -for example, receiving data via the Internet, etc., and if the user does not have an Internet connection, -The application shows a warning window that you need to turn on wi-fi or cellular. - -To test the Internet connection in studio practice, a [Connectivity](https://pub.dev/packages/connectivity) plugin is used. -This plugin allows Flutter applications to detect network connectivity and configure -yourself accordingly. He knows the difference between cellular and wi-fi. -This plugin works for iOS and Android. - -You can read more about this in [article](https://medium.com/flutter-community/build-a-network-sensitive-ui-in-flutter-using-provider-and-connectivity-ddad140c9ff8) on the Medium. - -# Usage - -```dart -import 'package:connectivity/connectivity.dart'; - -var connectivityResult = await (Connectivity().checkConnectivity()); -if (connectivityResult == ConnectivityResult.mobile) { - print("Connected to Mobile Network"); -} else if (connectivityResult == ConnectivityResult.wifi) { - print("Connected to WiFi"); -} else { - print("Unable to connect. Please Check Internet Connection"); -} -``` - -You can also listen to network status changes by subscribing to the stream provided by the plug-in. -Thus, you can find out when the status of the network has changed. - -```dart -initState() { - subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) { - print("Connection Status has Changed"); - }); -} - -dispose() { - subscription.cancel(); -} -``` \ No newline at end of file diff --git a/docs/en/common/code_style.md b/docs/en/common/code_style.md deleted file mode 100644 index 1ee65f81f..000000000 --- a/docs/en/common/code_style.md +++ /dev/null @@ -1,156 +0,0 @@ -[Main](../main.md) - -# Code style - -## Key Points - -This document describes code style conventions. We are following the recommendations -described in [Effective Dart](https://www.dartlang.org/guides/language/effective-dart) -and before starting development, we strongly recommend that you familiarize yourself with them. - -Before each pull request, you must format the code with dartfmt -(Ctrl + Alt + L for Android Studio, Ctrl + Alt + F for VS Code, the plugin for Flutter must be installed). - -## Documentation, сomments - -discribed in [Docs](https://www.dartlang.org/guides/language/effective-dart/documentation) - -## Names - -### file names - -Files are named in **snake_case**. - -Files of the main components of the screen should end with the following suffixes: - -- *screen* — file with screen widget - -- *wm* — file with screens's WidgetModel - -- *route* - file with screens's Route - -### Resource naming - -Resources (strings, asset file names) are declared using the const modifier, -so that in widget constructor they can be used as the default value. - -### Naming variables and methods - - Constants are named in lowerCamelCase (as written in [Effective Dart](https://dart.dev/guides/language/effective-dart/style#prefer-using-lowercamelcase-for-constant-names)): -```dart - const String keyAlias = "KEY_ALIAS" -``` - - Boolean variables must begin with the auxiliary verbs is / was / has. - -he following suffixes exist for widget and model widgets fields: - - - *State* — StreamedState class entity - - - *Action* — Action class entity - - - *Controller* — various controllers (AnimationController, TextEditingController, etc.) - - The names of methods and functions must contain a verb that reflects the logic being executed. ** And / Or ** unions in method names should be avoided.(They are triggers for refactoring) - - or named methods, the following prefixes are recommended: - - - *build* — for methods that return part of the widget tree (used to simplify layout) - - - *reload* — data loading/reloading methods - -### Class naming - -Should use the following postfixes for entities: - -- *Widget/Screen* — separate widget or layout of the whole screen - -- *WidgetModel* — widget model - -- *Component* — component for configuring dependencies - -- *Interactor* — business logic interactors - -- *Repository* — repositories - -## Code organization - -### File structure - -Dart allows you to store several classes in one file, therefore it is recommended to combine several classes that are related in functionality into a single file. - -A typical file and folder file structure is described [here](./structure.md). - -Additionally: - - - The screen directory should contain a di-component settings folder - - - Global functions should be collected in utils suffix files - -### Class structure - -Inside the class, use the following order method and fields: -1. static const fields - -1. static fields - -1. final fields - -1. private fields (get/set) - -1. public fields (get/set) - -1. consctructors - -1. @override - -1. public methods (static too) - -1. @protected methods - -1. private methods - -## Formatting - -**IMPORTANT**: For better readability, it is recommended to insert a comma after the last argument in calls of methods and constructors, as well as in the description of their parameters, if they do not fit on the same line (trailing comma). - -Bad: -```dart - func( - "foobar", - "barfoo", - "asdf1234", - "orange", - "apple", - "banana", - "foobar", - "barfoo", - "asdf1234", - "orange", - "apple", - "banana"); -``` -Good: -```dart - func( - "foobar", - "barfoo", - "asdf1234", - "orange", - "apple", - "banana", - "foobar", - "barfoo", - "asdf1234", - "orange", - "apple", - "banana", //This is trailing comma - ); -``` - - -## Recommendations - -When developing, you should use the rules and approaches described [here](https://www.dartlang.org/guides/language/effective-dart/design) - - diff --git a/docs/en/common/dependencies.md b/docs/en/common/dependencies.md deleted file mode 100644 index 90380cf5b..000000000 --- a/docs/en/common/dependencies.md +++ /dev/null @@ -1,12 +0,0 @@ -[Main](../main.md) - -# Adding dependencies (before adding to pub.dev) - -In the case when you need to connect a dependency that has not yet been published, you need to connect it -locally. If you connect via a direct link to git, you can get the problem of resolving dependencies. -Adding example: - -``` - logger: - path: ../logger -``` \ No newline at end of file diff --git a/docs/en/common/di.md b/docs/en/common/di.md deleted file mode 100644 index 97beeaa44..000000000 --- a/docs/en/common/di.md +++ /dev/null @@ -1,8 +0,0 @@ -[Main](../main.md) - -# DI - -Based on InheritedWidget. - - - `Injector` — class that allows you to get any `Component` widget higher in the tree - - `Component` — class providing WidgetModel's necessary dependencies diff --git a/docs/en/common/init_project.md b/docs/en/common/init_project.md deleted file mode 100644 index ed42719fc..000000000 --- a/docs/en/common/init_project.md +++ /dev/null @@ -1,49 +0,0 @@ -[Main](../main.md) - -# Initializing a project from Template - -For quick initialization of a new Flutter project, there is a special -Template. -You have a few simple steps to do: - -1. Create a folder for the repository with the name of the project. Folder Name = -GitLab repository name; -1. Copy the contents of the folder ***/template*** from **flutter-standard** -to the directory created in the previous step; -1. In file ***pubspec.yaml*** set `name` of your application (not -may contain hyphens). **IMPORTENT:** this is not the package-name of your application. -Real package-name is set separately for each platform. -and may vary; -1. Replace the string `flutter_template` throughout the project *(Ctrl+Shift+R)* - on the `name` of the application specified in the previous step. - -### Common: - -`NOT_ACTUAL` -A project cannot be built without **Firebase** and **Fabric** projects created. -In case these projects must be created on the customer side, -but not yet, the right solution would be to create a temporary project in -account surfstudio36@gmail.com ([you can find out the password here](https://docs.google.com/document/d/13BpXmgwBrbrliGxn80Mr70E2D3NIEdRcybpWLuHzzco/edit)). - -1. It is necessary to create a project which will contain 4 applications -(**Android** - *prod* and *dev*, **iOS** - *prod* and *dev*); -1. **Android:** Download `google-services.json` (common to all types -builds) and put it in `android/app`; -1. **iOS:** Download two `GoogleService-Info.plist` (for each type -build) and put it in `ios/Runner/Firebase/dev` and `ios/Runner/Firebase/prod`; - -You can read more about setting up a CD [here](./cd.md). - -### Android: -1. In **AndroidManifest.xml** replace `package` on package-name for -Android application builds. **IMPORTANT:** there are three manifest files in the project -(`app/src/debug`, `app/src/main`, `app/src/profile`), update -package-name is needed in each; -1. Change the path to `MainActivity` to match the application's package-name; -1. Run the console command `flutter packages get`. - -
Flavors are pre-configured, no additional action is required. - -### iOS: -1. Open file `ios/Flutter/common.xcconfig`; -1. Replace there `identifier` with the package-name of your application. \ No newline at end of file diff --git a/docs/en/common/logging.md b/docs/en/common/logging.md deleted file mode 100644 index 0bab4b572..000000000 --- a/docs/en/common/logging.md +++ /dev/null @@ -1,20 +0,0 @@ -[Main](../main.md) - -# Logging - -[Logging module discription](../../../packages/surf_logger/README.md) - -Be sure to log: - -* Url requests and server response status. - -* Non-fatal exceptions: the state of the application when something went wrong, -but the application continues to work. For example, incorrect parsing of the server response. - -* State's main events. - -**IMPORTANT** : - -- Logs that do not carry important information should be deleted. - -- Rx stream error handlers must not be left empty. \ No newline at end of file diff --git a/docs/en/common/message.md b/docs/en/common/message.md deleted file mode 100644 index 2e63cf2ee..000000000 --- a/docs/en/common/message.md +++ /dev/null @@ -1,18 +0,0 @@ -[Main](../main.md) - -# Messages - -The principle of working with messages is the same with [dialogs](../ui/dialog.md). - -To work with messages, you need to connect the implementation -of the abstract class MessageController to WidgetModel. For example MaterialMessageController. -To display the message, you must call the method - `_msgController.show(type, msg: “message“)`. -By default, customizing the design of the message is not necessary, it takes the form of a standard snack. - -To customize the design of the message, mixin CustomSnackBarOwner is used. -This entity is implemented on the necessary screen and connected to MessageController, -which is used to display dialogs in WidgetModel. Thus, customization of appearance -messages occur on the ui layer, and processing logic in WidgetModel, while maintaining the principle -of single responsibility. - -The implementation of the message invocation logic occurs only in the WidgetModel entity. \ No newline at end of file diff --git a/docs/en/common/navigation.md b/docs/en/common/navigation.md deleted file mode 100644 index ff2b1b03c..000000000 --- a/docs/en/common/navigation.md +++ /dev/null @@ -1,67 +0,0 @@ -[Main](../main.md) - -# Navigation - -Navigation is done using the standard framework mechanism — [Navigator](https://flutter.dev/docs/cookbook/navigation) - -In studio practice, the navigator is used only in entity of [WidgetModel](../ui/widget_model.md). - -## Usage example - -```dart -class InputNumberRoute extends CupertinoPageRoute { - InputNumberRoute() : super(builder: (ctx) => InputNumberScreen()); -} - -class SomeWidgetModel{ - void _goToNextScreen() { - _navigator.push(InputNumberRoute()); - } -} -``` - -## Usage example with arguments - -```dart - -class Screen2Route extends CupertinoPageRoute { - Screen2Route(String param) : super(builder: (ctx) => Screen2(param)); -} - -class Screen1 extends StatelessWidget { - - void goToScreen2(){ - _navigator.push(Screen2Route("Hello from first screen!")); - } -} - - -class Screen2 extends StatelessWidget { - final String someParam; - - // In the constructor, require a Todo. - DetailScreen({Key key, @required this.someParam}) : super(key: key); - - @override - Widget build(BuildContext context) { - // Use the Todo to create the UI. - return Scaffold( - appBar: AppBar( - title: Text("screen2"), - ), - body: Padding( - child: Text(someParam), - ), - ); - } -} -``` - -# Route - -The route defines the transition animation. -The most commonly used MaterialPageRoute and CupertinoPageRoute. -For more information on creating routes, see [this article][route_link] - - -[route_link]:https://medium.com/@agungsurya/create-custom-router-transition-in-flutter-using-pageroutebuilder-73a1a9c4a171 \ No newline at end of file diff --git a/docs/en/common/structure.md b/docs/en/common/structure.md deleted file mode 100644 index 8064f33a1..000000000 --- a/docs/en/common/structure.md +++ /dev/null @@ -1,27 +0,0 @@ -[Main](../main.md) - -# Project Structure - -- / - project folder -- /res - - /assets - graphic resource location directory -- /docs - project's documentation(technical doc, technical debt) -- /android - folder with native Android code -- /ios - folder with native iOS code -- /lib - Dart code , Flutter-application - - /domain - Domain-layer - - /interactor - Interactor-layer - - /common - common classes used - - /*some_interactor*/repository - repository for interactor - - /ui - UI-layer - - /app - package with the main application widget - - /base - base classes for ui - - /common - commonly used UI classes - - /res - package with resources (colors.dart, text_styles.dart, etc.) - - /strings - string resources - - /common_strings.dart - strings that commmon for all projects - - /strings.dart - strings that specific for project - - /screen - packages of specific screens / widgets (widget + WM) - - /*some_screen*/di - DI for screen - - /util - utilities -- /test - tests diff --git a/docs/en/common/tabnavigator.md b/docs/en/common/tabnavigator.md deleted file mode 100644 index 45193214d..000000000 --- a/docs/en/common/tabnavigator.md +++ /dev/null @@ -1,29 +0,0 @@ -# TabNavigator - -[Main](../main.md) -[Navigation](./navigation.md) - -In addition to the usual transitions between tabs, sometimes you need to implement nested navigation. -Each tab is required to have its own navigation stack. -This is necessary so that the user does not lose navigation history when switching tabs. - -To solve this problem, TabNavigator was developed. - -# Principle of work - -When initializing TabNavigator, you need to add Map if screens -on which you need to implement nested navigation. -Selected screens are wrapped in a list of navigators that sequentially follow each other. -Thus, nested navigation is implemented. - -When adding a widget to TabNavigator, the "parent" buildContext is passed to it. -So, when you need to switch to a new screen from a nested widget, -you need to call the ```dart TabNavigatorState of(BuildContext context)``` method. -It returns the state of the navigator, which is used in the root context. -Thanks to this mechanism, from the embedded screen you can -which is outside the current nesting chain. - -TabNavigator can be combined with any graphic component. For example, BottomNavigation. - -For determining the index of the opened tab, Stream\ selectedTabStream is responsible. -To track information about an open tab, you must use ObserversBuilder. \ No newline at end of file diff --git a/docs/en/common/test_api.md b/docs/en/common/test_api.md deleted file mode 100644 index 3f4856572..000000000 --- a/docs/en/common/test_api.md +++ /dev/null @@ -1,11 +0,0 @@ -# API Testing - -To verify the execution of the request, you need to use api testing. - -For this it is necessary: -- add interactor (including all its dependencies) with test method to MockAppComponent -- through expect(request, emits(*what we expect from the request*)); - -Testing is based on checking the value of Observable. -MockAppComponent is a component of testing the service layer. -Implements Interactor behavior by substituting test data. \ No newline at end of file diff --git a/docs/en/common/testing.md b/docs/en/common/testing.md deleted file mode 100644 index 517461d41..000000000 --- a/docs/en/common/testing.md +++ /dev/null @@ -1,268 +0,0 @@ -[Main](../main.md) - -# Testing - -## Widget testing - -Files with tests are usually located in the `test` subdirectory of the project. -By default, tests are run from all files, with the mask `* _test.dart` from the` test` subdirectory. - -The test is described using the `testWidgets` function. -To interact with the widget, the user is provided with WidgetTester. -```dart - testWidgets('Test name', (WidgetTester tester) async { - // Test's code - }); -``` - -Tests can be grouped using `group`: -```dart - group('Group of test name', () { - testWidgets('Test name', (WidgetTester tester) async { - // Test's code - }); - - testWidgets('Test name', (WidgetTester tester) async { - // Test's code - }); - }); -``` - -The `setUp` and `tearDown` functions allow you to execute some code before and after each test. -```dart - setUp(() { - // test initialization code - }); - tearDown(() { - // test finalization code - }); -``` - -### Test widget interaction - -The `WidgetTester` class provides functions for creating a test widget and waiting for its state to change, -as well as perform some actions on widgets. - -* `pumpWidget` — creating a test widget -* `pump` — waiting for the state of the tested widget to change during the specified time (100 ms by default) -* `pumpAndSettle` — calls `pump` in a loop to change states for a given time (100 ms by default) -* `tap` — send widget click -* `longPress` — long press -* `fling` — swipe -* `drag` — drag -* `enterText` — enter text - - -### Widget search - -To perform any action on a nested widget, you need to find it in the widget tree. -To do this, there is a global object `find`, which allows you to find widgets: - -* in a tree by text — `find.text`, `find.widgetWithText` -* by key — `find.byKey` -* by icon — `find.byIcon`, `find.widgetWithIcon` -* by type — `find.byType` -* by position in the tree — `find.descendant` and `find.ancestor` -* using a widget predicate — `find.byWidgetPredicate` - - -### Mocking - -Dependency mocks are created as descendants of the `Mock` class and implement the dependency interface. -```dart -class AuthInteractorMock extends Mock implements AuthInteractor {} -``` - -To determine the functionality of the mock, the `when` function is used, -which allows you to determine the response of the mock to the call of a function. -```dart -when(authInteractor.checkAccess(any)) - .thenAnswer((_) => Future.value(true)); -``` - - -### Verify - -During the test, you can check for widgets on the screen: -```dart -expect(find.text('Phone number'), findsOneWidget); -expect(find.text('Code from SMS'), findsNothing); -``` - -After completing the test, you can check how the layout was used by the widget: -```dart -verify(appComponent.authInteractor).called(1); -verify(authInteractor.checkAccess(any)).called(1); -verifyNever(appComponent.profileInteractor); -``` - - -### Debugging - -Tests are performed in the console without any graphics. -You can run tests in debug mode and set breakpoints in the widget code. - -In order to get information about what is happening in the widget tree, you can use -function `debugDumpApp()`, which displays the console text representation of the hierarchy of the entire widget tree. - -To get an idea of how the widget uses moсkы, the `logInvocations([])` function is used. -The function accepts a list of mocks, and issues to the console a sequence of -method calls on these mocks that the tested widget made. - -### Preparation - -All interactors and other dependencies should be transferred to the tested widget in the form of mock: -```dart -class AppComponentMock extends Mock implements AppComponent {} -class AuthInteractorMock extends Mock implements AuthInteractor {} -``` - -At the root of the widget tree should be `Injector` and `MaterialApp`. -```dart - await tester.pumpWidget( - Injector( - component: appComponentMock, - builder: (context) { - return MaterialApp( - home: PhoneInputScreen(), - ); - }, - ), - ); - await tester.pumpAndSettle(); -``` -In the sample code, `PhoneInputScreen` is the test widget. -It is also seen that `Injector` receives the `AppComponent` mock as a parameter and, -as usual, extracts the necessary dependencies from it, which must first be created -and put into the `AppComponent` mock using `when`. - -After creating a test widget and after any actions with it, -you need to call `tester.pumpAndSettle()` to change states. - - -### Testing - -To test the widget, we can simulate the behavior of the service layer and track the response of the tested widget. - -Mocks can return errors or wrong data: -```dart -when(authInteractor.checkAccess(any)).thenAnswer((_) => Future.error(UnknownHttpStatusCode(null))); -``` - -In the test, you can and should click where it is not necessary, and enter not what is required, -and verify that this does not lead to fatal consequences -```dart -await tester.enterText(find.byKey(Key('phoneField')), 'bla-bla-bla'); -``` - -After any actions with widgets, you need to call `tester.pumpAndSettle()` to change states. - - -## Integration testing - -This testing method may well replace manual testing. -The testing process can be clearly observed in the emulator or on the device. - -Among the disadvantages of this approach, it can be noted that there is no way -to interact with the system dialogs of the platform. -But, for example, permission requests can be suppressed as described in [this issue](https://github.com/flutter/flutter/issues/12561). - -### General information - -Unlike the test widget, the integration test operation process can be observed in the simulator or on the device screen. - -Files with integration tests are located in the `test_driver` subdirectory of the project. - -The application starts after the launch of a special plugin that allows you to manage our application. - -It looks like this: -```dart -import 'package:flutter_driver/driver_extension.dart'; -import 'package:park_flutter/main.dart' as app; -void main() { - enableFlutterDriverExtension(); - app.main(); -} -``` - -The tests are run from the command line. -If the launch of the application is described in the file `app.dart`, -and the test script is called` app_test.dart`, then the following command is enough: -```text -$ flutter drive --target=test_driver/app.dart -``` - -If the test script has a different name, then you need to specify it explicitly: -```text -flutter drive --target=test_driver/app.dart --driver=test_driver/home_test.dart -``` - -A test is created by the `test` function, and grouped by the `group` function. - -```dart -group('park-flutter app', () { - // driver through which we connect to the device - FlutterDriver driver; - - // create a connection to the driver - setUpAll(() async { - driver = await FlutterDriver.connect(); - }); - - // close connection to the driver - tearDownAll(() async { - if (driver != null) { - driver.close(); - } - }); - - test('Test name', () async { - // Test code - }); - - test('Another test', () async { - // Test code - }); -} -``` - - -### Interaction with the tested application - -The `FlutterDriver` tool allows you to interact with the application under test through the following methods: - -* tap — send click to widget -* waitFor — wait for the widget to appear on the screen -* waitForAbsent — wait for the widget to absent -* scroll, scrollIntoView, scrollUntilVisible — scroll the screen to a predetermined offset or to a specific widget -* enterText, getText — enter text or take widget text -* screenshot — get a screenshot -* requestData — more complex interaction through function call inside the application under test -* etc - -In the application, you can specify a request handler, which can be accessed through a call to `driver.requestData('login')` -```dart -void main() { - Future dataHandler(String msg) async { - if (msg == "login") { - // some kind of call processing in the application with returning the result - return 'some result'; - } - } - - enableFlutterDriverExtension(handler: dataHandler); - app.main(); -} -``` - - -### Widget search - -Search widgets during integration testing is slightly different from similar functionality when testing widgets: - -* in a tree by text — `find.text`, `find.widgetWithText` -* by key — `find.byValueKey` -* by type — `find.byType` -* by tooltip — `find.byTooltip` -* by semantics label — `find.bySemanticsLabel` -* using a widget predicate — `find.descendant` and `find.ancestor` \ No newline at end of file diff --git a/docs/en/faq/builds.md b/docs/en/faq/builds.md deleted file mode 100644 index 850cbadce..000000000 --- a/docs/en/faq/builds.md +++ /dev/null @@ -1,51 +0,0 @@ -[Main](../main.md) - -# Build FAQ - -Resolve problems with build types. - -If you came here for answers to questions, but have not yet read the [Flavors Organization Guide for Flutter](../best_practice/flavors/flavors_for_devs.md), be sure to read it first. - -## Local build of iOS via Fastlane crashes - - - **No profile for team 'XXXXXXXXX' matching. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.** -

- The problem was solved by providing extended rights to the directory: -
- `sudo chmod 755 /Users/{username}/Library/Logs/gym/` -

- - **Permission denied @ rb_sysopen - /Users/{username}/{project-dir}/ios/{cer-name}.cer** -

- The problem was solved by providing extended rights to the directory: -
- `sudo chmod 755 /Users/{username}/{project-dir}/ios/*` - -## After removing a package from pubspec.yaml, the build for iOS crashes - - - **ld: framework not found {packageName}.** -

- The problem is caused because for some reason linker flags are not cleared after - removing the package from the project. This must be done manually in Xcode. -
-1. In the `Project navigator` click on the `Runner`; -2. Go to the `Build Settings` tab; -3. In the search, enter the name of the problem package: the search result should -be in the section `Other Linker Flags`. Expand the list of flags and manually remove the excess from there. -4. Next, push the changes to the git. The build should be repaired. - -## I can’t build a profile build for iOS - - - **The required build configuration is missing in Xcode.** -

- Carefully read the error that occurs in the console during building. - It will indicate the name of the Build Configuration that could not be found. - You will need to create such a Build Configuration in your project through Xcode. -

- ![build_settings](../../img/faq/profile_build_config.png) -

- - **The profile build crashes when you try to build it under iOS, although the dev build builds successfully.** -

- If logs appear in the body of the error, most often about the fact that some classes could not be resolved, one of the probable reasons is the lack of value in the Objective-C Bridging Header settings for the Build Configuration you are using. To fix this - just use the same value that is specified in other configurations. -

- ![build_settings](../../img/faq/obj_c_build_header.png) -

\ No newline at end of file diff --git a/docs/en/faq/errors.md b/docs/en/faq/errors.md deleted file mode 100644 index 78f7e39df..000000000 --- a/docs/en/faq/errors.md +++ /dev/null @@ -1,17 +0,0 @@ -[Main](../main.md) - -# Errors FAQ - -Solve problems with errors and vorings. - -## Errors - -- **Many modules are underlined in red, many dependencies are unresolved.** -

- You need to re-synchronize the modules. To do this, - execute the `flutter packages get` command on each - of the problem modules. For faster synchronization - of all modules, you can use the script. From the root - directory of the project, run the command `./Packages_get.sh`. - This resynchronizes all standard modules in turn. -

\ No newline at end of file diff --git a/docs/en/faq/faq.md b/docs/en/faq/faq.md deleted file mode 100644 index c192ab5ae..000000000 --- a/docs/en/faq/faq.md +++ /dev/null @@ -1,17 +0,0 @@ -[Main](../main.md) - -# FAQ - -You have problems? Then to you here. In this section, we collect answers to -the most popular questions and gain collective experience. - -The FAQ will work only if each of the team members will quickly supplement -it with their personal experience. Did you solve the problem? -Have you come up with a better practice? Be sure to record this in the FAQ. - -## Сontents -- [IDE](ide.md) - questions on development environments (Android Studio, VS -Code) -- [Errors](errors.md) - questions about bugs and warnings -- [Build](builds.md) - building questions (errors and crashes, build types and configurations) -- [UI](ui.md) - questions on layout and problems with UI diff --git a/docs/en/faq/ide.md b/docs/en/faq/ide.md deleted file mode 100644 index e9d90f1c7..000000000 --- a/docs/en/faq/ide.md +++ /dev/null @@ -1,13 +0,0 @@ -[Main](../main.md) - -# IDE FAQ - -Solve problems with development environments. - -## Android Studio - -- **The Run button is inactive, although the project successfully builds from the console.** -

- Most likely you have not registered the path to the Flutter SDK in the settings \ - Flutter Plugin. `(File | Settings | Languages & Frameworks | Flutter)` -

\ No newline at end of file diff --git a/docs/en/faq/ui.md b/docs/en/faq/ui.md deleted file mode 100644 index 5b0f0f7f4..000000000 --- a/docs/en/faq/ui.md +++ /dev/null @@ -1,24 +0,0 @@ -[Main](../main.md) - -# UI FAQ - -Solve problems with layout and UI. - -## Text fields - -- **The text box context menu (copy / cut / paste) is transparent.** - ![build_settings](../../img/faq/context_menu_transparent.jpg) -

- The only way to customize the color of the context menu - is through the `canvasColor` field in the `ThemeData` application. - If the context menu has any unexpected color, - this is the result of overriding `canvasColor`. -

- It is highly discouraged to override `canvasColor` in the main theme, - as this may have other unexpected side effects. - Please note that the color of the tinted transparent area above - the Bottom Sheet is also defined through the `canvasColor`, - but there is an alternative option to - set it to` showModalBottomSheet (backgroundColor: Colors.transparent) `. -

- diff --git a/docs/en/main.md b/docs/en/main.md deleted file mode 100644 index a1944aef0..000000000 --- a/docs/en/main.md +++ /dev/null @@ -1,40 +0,0 @@ -# Application Development Standards at Surf - -[Rules for text layout and documentation](rules.md) - -## Common wiki structure - -1. **Building Application Overview** - 1. Code requirements - 1. [Java Code Style][java_codestyle] - 1. [Koltin Code Style][kotlin_codestyle] - 1. [Dart Code Style](common/code_style.md) - 1. [Application architecture](common/arch.md) - 1. [Dependency injection](common/di.md) - 1. [Logging](common/logging.md) - 1. [Asynchronous interactions](common/async.md) - 1. [Testing](common/testing.md) - -1. Layer [Model](model/model.md) - 1. [Interactor](model/interactor.md) - 2. [Work with SharedPrefs](model/shared_preferences.md) - -2. Layer UI - 1. [UI-layer structure](ui/structure.md) - 1. [WidgetModel](ui/widget_model.md) - 2. [Widget](ui/widget.md) - 2. [Navigation](common/navigation.md) - 3. [Screen creation](ui/create_screen.md) - 4. [Dialogs](ui/dialog.md) - 5. [Messages](common/message.md) - -3. Best practics - 1. [CI](https://github.com/surfstudio/jenkins-pipeline-lib) - 2. [Flutter Flavors](best_practice/flavors/flavors_for_devs.md) - 3. [Reduce application size](best_practice/reduce_app_size.md) - -4. [FAQ](faq/faq.md) - -[java_codestyle]:https://github.com/surfstudio/SurfAndroidStandard/blob/snapshot-0.4.0/docs/common/codestyle/java_codestyle.md - -[kotlin_codestyle]:https://github.com/surfstudio/SurfAndroidStandard/blob/snapshot-0.4.0/docs/common/codestyle/kotlin_codestyle.md \ No newline at end of file diff --git a/docs/en/model/interactor.md b/docs/en/model/interactor.md deleted file mode 100644 index df382f451..000000000 --- a/docs/en/model/interactor.md +++ /dev/null @@ -1,125 +0,0 @@ -[Main](../main.md) - -# Interactor - -An interactor is an entity that implements the logic of a certain business process. The interactor is platform independent, it only implements the use case logic, without affecting the ui logic. -The interactor is not attached to any screen. The same interactor can be used in multiple screens. - -Typical use case: - -The application has an authorization screen and an order screen. -It is necessary to check whether the user is currently logged in. -If yes, then when you open the application, transfer to the orders screen and show content that is available only to an authorized user. -If not, then stay on the authorization screen, but give the opportunity to view orders that are available to an unauthorized user. - -To solve this problem, you should create an interactor that implements the logic of user authorization verification - AuthInteractor. In this interactor, a local token is obtained through the TokenRepository. -Next, the interactor makes a request to the server through AuthRepository with a check on the validity of the current token and returns the result. -Thus, the interactor combines the work of several repositories and performs the use case that is needed in a particular place. - -To check whether the user is currently logged in, AuthInteractor can be used both on the authorization screen and on the order display screen. - -Interactors interact with the presentation layer only through the WidgetModel entity. - -The public methods of the Interactive API are primarily based on Rx. - -## Sample entities belonging to the Interactor layer - -Consider the most common entities that belong to this layer. - -### 1. Repository - -Speaking about repositories, one should remember about the “Repository” design pattern. Its essence is to create a layer of abstraction over any specific data sources, for example, a database or a web service. The task of the repository is to become an intermediary between those who request data and those who give it. -It is important to understand that users of the repository should not know how it is organized and where it gets this data. This can be a network request, a request to the database, or all together, the so-called hybrid request, which involves concatenating requests to the server and cache according to some rule you set. - -### 2. Storage - -Storage is a wrapper over a data source with single responsibility. For example, you need to save user data to a local device in two different formats: xml and json. The correct solution would be to implement a low-level api to work with the FileSystem file system and two repositories JsonStorage and XmlStorage, which will use the FileSystem to access the file system, and the data storage logic will be implemented directly in these classes. - -### 3. Mapper - -A class that transform data from one type to another. - -### 4. Initialization Interactor - -Initialization of the application most often occurs on the splash screen. -Initialization is the execution of a certain set of rules on which the further -behavior of the application depends. For example, migrating an application to a new -version or getting and updating a token, getting a location, etc. - -It is customary to select this logic in a separate interactor. - -The interface of this interactor will be described by just one method - `initialize()`. - -### 5. User session change interactor - -This interactor is responsible for the actions that must be performed when changing the session or user. -Such actions may include flushing the cache, requesting a logout, caching a token, etc. - -## Events via Interactor - -Another case for using interactors: building an event-based model of communication between parts of the application. -For example, some action on screen A should cause data to be updated on screen B. -Moreover, this action is not the result of screen A. -Then you can forward the event through the common interactor for these screens. -This case shows that it is the priority to use the interactor to update the data, and not the result of the screen. -A route with parameters should be used where the return of the result is obvious, for example, a certain form that returns the completed data to the previous screen. -Forward of this event can be realized through the creation of Subject inside the interactor. - -Пример: -```dart -/// User Session Interactor -class SessionChangedInteractor { - final AuthInfoStorage _ts; - - final PublishSubject sessionSubject = PublishSubject(); - - SessionChangedInteractor(this._ts); - - void onSessionChanged() { - sessionSubject.add(SessionState.LOGGED_IN); - } - - void forceLogout() { - sessionSubject.add(SessionState.LOGGED_OUT); - silentLogout(); - } - - void silentLogout() { - _ts.clearData(); - } -} - -enum SessionState { LOGGED_IN, LOGGED_OUT } -``` -Next, you need to connect the SessionChangedInteractor to WidgetModel and subscribe to the changes to sessionSubject: -```dart - -class FirstWidgetModel { - final SessionChangedInteractor _changeInteractor; - - Action sessionChangedAction = Action(); - - FirstWidgetModel(WidgetModelDependencies baseDependencies, - this._changeInteractor,) : super(baseDependencies); - - @override - void onLoad() { - bind(sessionChangedAction, (_) => _changeInteractor.onSessionChanged()); - super.onLoad(); - } -} - -class SecondWidgetModel { - final SessionChangedInteractor _changeInteractor; - - SecondWidgetModel(WidgetModelDependencies baseDependencies, - this._changeInteractor,) : super(baseDependencies); - - @override - void onLoad() { - subscribeHandleError(_changeInteractor.sessionSubject, (sessionState){ - print(sessionState.toString());}); - super.onLoad(); - } -} -``` \ No newline at end of file diff --git a/docs/en/model/model.md b/docs/en/model/model.md deleted file mode 100644 index 0e9aeb9ed..000000000 --- a/docs/en/model/model.md +++ /dev/null @@ -1,15 +0,0 @@ -[Main](../main.md) - -# Model - -Model - a layer between [WidgetModel](../ui/widget_model.md) and business logic, which abstracts -the receiver of data (WidgetModel) from their provider (repository, service, storage, etc.). -The Model allows you to describe the interaction contract between the presentation layer -and the service layer and develop them independently from each other. Consists of two main parts: - -**Change** — a signal sent to the model that you need to perform some action: for example, upload or send data. - -**Performer** — class responsible for handling a specific **Change**. -It is the link between WidgetModel, which requests a specific data set, and the source of this data. - -The model itself simply passes the incoming **Change** to **Performer**, which can handle it. \ No newline at end of file diff --git a/docs/en/model/shared_preferences.md b/docs/en/model/shared_preferences.md deleted file mode 100644 index edf439540..000000000 --- a/docs/en/model/shared_preferences.md +++ /dev/null @@ -1,51 +0,0 @@ -[Main](../main.md) - -# SharedPreferences - -SharedPreferences - persistent storage on the Android and IOS platform, -used by applications to store their settings, keys, tokens, etc. -Data is stored in key-value format. - -To work with SP, the plugin [shared_preferences][sp_link] and the studio helper PreferencesHelper are used. - -# Usage example - -```dart -class AuthInfoStorage { - static const KEY_TOKEN = "KEY_TOKEN"; - static const KEY_PIN = "KEY_PIN"; - - final PreferencesHelper _preferencesHelper; - String _token; - - AuthInfoStorage(this._preferencesHelper); - - Future getAccessToken() async { - _token = await _preferencesHelper - .get(KEY_TOKEN, EMPTY_STRING) - .then((s) => s as String); - return _token; - } - - Future getPin() async { - String pin = await _preferencesHelper - .get(KEY_PIN, EMPTY_STRING) - .then((s) => s as String); - return pin; - } - - Future saveToken(String token) async { - return await _preferencesHelper.set(KEY_TOKEN, token); - } - - Future savePin(String pin) async { - return await _preferencesHelper.set(KEY_PIN, pin); - } - - void clearData() { - _preferencesHelper.set(KEY_TOKEN, EMPTY_STRING); - _preferencesHelper.set(KEY_PIN, EMPTY_STRING); - } -} -``` -[sp_link]:https://pub.dev/packages/shared_preferences \ No newline at end of file diff --git a/docs/en/repo_guides/gitflow.md b/docs/en/repo_guides/gitflow.md deleted file mode 100644 index 2428a71c7..000000000 --- a/docs/en/repo_guides/gitflow.md +++ /dev/null @@ -1,45 +0,0 @@ -[Main](../main.md) - -# Gitflow in repository - -## Commits - -All commit masseges must be written in English. The message of the commit should reflect the summary of the changes. - -The commit should contain: - -- Comprehensive information on changes in **English** - -- Link to task in Jira or GitLab at the beginning of the commit - -- Enumeration of deprecated code - -Example: **"ANNDEP-23 add new LoadState. Deprecated: LoadStateUtil."** - -## Branches - -- **stable** — main branch of stable packages. Versioning occurs through TAGs. - -- **dev** — development branch. All tasks or changes initially merge into this branch. -This branch merges into **stable** without closing. - -- **project-*name*** (for example, project-ACME) - project branches. They contain changes that appear during a specific project. - -- **task/feature** - other branches for specific tasks. Checkout from **dev** and merged into it. -The branch name **must** contains the identifier of the task or the label **no-task**. - -## Stable branch changes - -A stable branch is changed through the creation of a pull request. After the merge, the version is upgraded, -a tag is placed for this (see [Semantic Versioning](https://semver.org)) - -## Versioning project branches - -Design branches need to be tagged with changes. -The tag is set automatically when merging the pull request into the project branch. - -Tag format: -``` -project-*name*-i, where i is a number that is constantly increasing by one. -``` -After changes in the project branch in the pubspec of the project itself, it is necessary to update the tag for all connected modules. diff --git a/docs/en/repo_guides/sync.md b/docs/en/repo_guides/sync.md deleted file mode 100644 index cbbe0ccc0..000000000 --- a/docs/en/repo_guides/sync.md +++ /dev/null @@ -1,9 +0,0 @@ -[Main](../main.md) - -# Module synchronization - -For automatic synchronization of all project modules, a special script is provided. -It executes the command `flutter packages get` on each of the project modules. - -To run the script from the root directory of the project, run the command -`./packages_get.sh`. This resynchronizes all standard modules in turn. \ No newline at end of file diff --git a/docs/en/rules.md b/docs/en/rules.md deleted file mode 100644 index f2c963aeb..000000000 --- a/docs/en/rules.md +++ /dev/null @@ -1,17 +0,0 @@ -[Main](main.md) - -# Rules for text layout and documentation - -Documents are created in Markdown format. - -## Structure - -Categories of documents: - -- Documents in main tree — general information on techniques and practices. -Placed in root directory - docs, include links to modules. - -- Documents of specific module — module's description and usage examples. -Placed in module's directory, can linked to articles in main tree. - -Main page with links - [main](main.md). \ No newline at end of file diff --git a/docs/en/tech_doc.md b/docs/en/tech_doc.md deleted file mode 100644 index c28f710f0..000000000 --- a/docs/en/tech_doc.md +++ /dev/null @@ -1,26 +0,0 @@ -# Technical description of Flutter project template - - - -## Technology stack - -* rxDart -* http -* shared_prefs - - -# Creation of screen - -Package of screnn include: -- *name*_screen.dart -- *name*_wm.dart -- *name*_route.dart - -Classes and Widgets for screens are additionally wrapped in a one of subclasses -PageRoute<>. -This is necessary to set the animation. - -Common sctructure of file with screen: - - Widget(Stateless/Stateful) - - WidgetState - only if widget is Stateful - diff --git a/docs/en/ui/create_screen.md b/docs/en/ui/create_screen.md deleted file mode 100644 index f1b03b2a3..000000000 --- a/docs/en/ui/create_screen.md +++ /dev/null @@ -1,15 +0,0 @@ -[Main](../main.md) - -# Checklist for creating a screen/widget - -1. Create `WidgetModel`and describe its dependencies in the constructor parameters. - -1. Create a `Component`, in which we find the necessary dependencies. - -1. We write a `function-builder` that returns a WidgetModel. Inside the builder using Injector we find Component and pass all the dependencies to the WidgetModel constructor. - -1. We create `MwwmWidget`, in super we pass the Component builder, the WidgetModel builder and the WidgetState builder. - -1. Create `WidgetState`. - -Now in WidgetState you can describe the user interface, and in WidgetModel - the logic and set of StreamedState for storing data and Action for processing user input events. \ No newline at end of file diff --git a/docs/en/ui/dialog.md b/docs/en/ui/dialog.md deleted file mode 100644 index 31a700054..000000000 --- a/docs/en/ui/dialog.md +++ /dev/null @@ -1,99 +0,0 @@ -[Main](../main.md) - -# Dialogs - -There are two types of [controllers](../../../template/lib/ui/base/default_dialog_controller.dart) for displaying dialogs: - -* `DefaultDialogController` for pop-up dialogs and bottom sheet -* `DatePickerDialogController` to select a date - -Using showAlertDialog(), DefaultDialogController can display a pop-up dialog whose appearance automatically adjusts to the platform. If you need to redefine the user interface of the dialog, then you need to use DialogOwner. - -## DialogOwner - -Work with dialogs is built around the mixin [DialogOwner](../../../template/lib/ui/base/owners/dialog_owner.dart). -To describe the necessary dialogs, you need to create a class in which the getter *registeredDialogs* of this mixin is redefined. The getter returns a Map, where the values are the builders that return the dialog widgets. -In WidgetModel, the necessary dialog is located by the key of this Map. - -Usage: - -1. For the desired screen, you need to create your DialogOwner: - -```dart -// Keys for registeredDialogs, we will find the -// necessary dialogs in WidgetModel by them. -enum OnboardingDialog { - requestPermission, - openSystemSettings, -} - -// A class containing the data for the dialog. -// An object of this class is passed as an argument when calling a -// dialog from WidgetModel. -class OnboardingDialogData implements DialogData { - final Function(BuildContext) onButtonPressed; - - OnboardingDialogData({ - this.onButtonPressed, - }); -} - -// Dialog map -class OnboardingDialogOwner with DialogOwner { - @override - Map get registeredDialogs => { - OnboardingDialog.requestPermissionAgain: - DialogBuilder(_buildRequestPermissionDialog), - OnboardingDialog.openSystemSettings: - DialogBuilder(_buildOpenSettingsDialog), - }; -} - -Widget _buildRequestPermissionDialog( - BuildContext context, { - OnboardingDialogData data, -}) { - return FooBottomSheet( - // … - ); -} - -Widget _buildOpenSettingsDialog( - BuildContext context, { - OnboardingDialogData data, -}) { - return BarBottomSheet( - // … - ); -} - -``` -2. In the Component of the screen, declare the dialog controller and transfer the created DialogOwner to its constructor: - -```dart -class OnboardingScreenComponent implements Component { - final scaffoldKey = GlobalKey(); - - DefaultDialogController dialogController; - - OnboardingScreenComponent(BuildContext context) { - dialogController = DefaultDialogController( - scaffoldKey, - dialogOwner: OnboardingDialogOwner(), - ); - } -} -``` -3. In WidgetModel, using the dialog controller from the component, call the desired dialog and pass the necessary data to it: -```dart - _dialogController.showModalSheet( - OnboardingDialog.openSystemSettings, - isScrollControlled: true, - data: OnboardingDialogData( - onButtonPressed: (context) { - w.Navigator.pop(context); - _permissionInteractor.openSettings(); - }, - ), - ); -``` \ No newline at end of file diff --git a/docs/en/ui/flexible_bottom_sheet.md b/docs/en/ui/flexible_bottom_sheet.md deleted file mode 100644 index 8a13584d9..000000000 --- a/docs/en/ui/flexible_bottom_sheet.md +++ /dev/null @@ -1,32 +0,0 @@ -# FlexibleBottomSheet - -[Main](../main.md) - -This BottomSheet widget has next behaviour: - -1. It has a size limits on top and bottom, that can be set as absolute value or part of parent -container. -2. If it has list child, first it resize up and when top limit has been reached it start scrolling -list content. -3. Use building function for changing view. -4. Can be imperatively called by showFlexibleBottomSheet(), or use for show it special controller. - -During development, various options for implementation approaches were tried. - -- To control the scroll controller through the GestureDetector. As a result, we got many problems -with switching behavior to scroll and back. -Also scrolling gesture was captured by GestureDetector instead transmit to Scrollable. -- Use Scrollable with set them setCanDrag off or setIgnorePointer. Not worked - -errors of replaceSemanticsActions when building layout. -- Use ViewPort in widget and build them, this option work partially correct, but we lost any physic -and troubles with scroll view in content. -- IgnorePointer with a GestureDetector, troubles like a first option. -- Gesture event generation also not possible. Renders bound with BindingBase, that get events from -engine, so we can't interact with this level. - -As a result, we received implementation of DraggableScrollableSheet. -https://api.flutter.dev/flutter/widgets/DraggableScrollableSheet-class.html - -During the search for a solution, the principle of operation ScrollableView was studied in detail and we -have built a schema. -https://drive.google.com/file/d/1i2s49pMOJNh-ZAhkNwMYgRoONX1jjx_y/view?usp=sharing \ No newline at end of file diff --git a/docs/en/ui/structure.md b/docs/en/ui/structure.md deleted file mode 100644 index 43800174f..000000000 --- a/docs/en/ui/structure.md +++ /dev/null @@ -1,11 +0,0 @@ -[Main](../main.md) - -# UI Structure - -In the presentation layer in studio projects, two main entities are used: - -1. [Widget](widget.md) — user interface description - -1. [WidgetModel](widget_model.md) — logic implementation - -Each screen or widget that independently receives data from a network or local storage necessarily contains both components. If the screen or widget is quite simple, and all the necessary data can be obtained through the constructor, then WidgetModel is optional. \ No newline at end of file diff --git a/docs/en/ui/widget.md b/docs/en/ui/widget.md deleted file mode 100644 index cbc4b662f..000000000 --- a/docs/en/ui/widget.md +++ /dev/null @@ -1,41 +0,0 @@ - -`NOT_ACTUAL` - -[Main](../main.md) - -[UI Structure](structure.md) - -# Widget - -To interact with WidgetModel, use [MwwmWidget](../../../packages/mwwm/lib/src/mwwm_widget.dart) — inherited from StatefulWidget, able to manage the life cycle of WidgetModel. To initialize it, the following components are required: - -1. *widgetStateBuilder* — returns a WidgetState for the constructed widget. Analog to createState() in StatefulWidget. - -1. *dependenciesBuilder* — returns the implementation of the interface [Component](../../../packages/injector/lib/src/component.dart). It contains only dependencies for WidgetModel, which it either gets through the constructor or finds using[Injector](../../../packages/injector/lib/src/injector.dart) from the context. - -1. *widgetModelBuilder* — returns WidgetModel. In order to be able to replace WidgetModel during testing, you can declare this builder an optional parameter in the widget constructor. - -Example: -```dart -SplashScreenWidgetModel createSplashScreenWidgetModel(BuildContext context) { - var component = Injector.of(context).component; - - return SplashScreenWidgetModel( - component.wmDependencies, - component.navigator, - component.debugScreenInteractor, - ); -} - -class SplashScreen extends MwwmWidget { - SplashScreen([ - WidgetModelBuilder widgetModelBuilder = createSplashScreenWidgetModel, - ]) : super( - dependenciesBuilder: (context) => SplashScreenComponent(context), - widgetStateBuilder: () => _SplashScreenState(), - widgetModelBuilder: widgetModelBuilder, - ); -} - -class _SplashScreenState extends WidgetState {…} -``` \ No newline at end of file diff --git a/docs/en/ui/widget_model.md b/docs/en/ui/widget_model.md deleted file mode 100644 index 6bd066cd2..000000000 --- a/docs/en/ui/widget_model.md +++ /dev/null @@ -1,26 +0,0 @@ -[Main](../main.md) - -[UI Structure](structure.md) - -# WidgetModel - -This entity is a ViewModel of MVVM. -This entity describes the logic of a particular screen. -You can also draw an analogy with BLoC, but only in terms of the mechanism of interaction. - -Working with View (Widget) is done through the stream. -WM knows nothing about the specific widget that uses it. - -Core WidgetModel components — `Events`: - - Action — Stream representation of an action, for example, clicking on a button or changing focus. - - StreamedState — streaming representation of a property, for example, a product counter or the enable state of a button. - - EntityStreamedState - inherits StreamedState, additionally has a load state and errors. - - additional logic that links Action and State. - -WM is an intermediate link between Model (in any its variant) and Widget. - -Dependencies from Model are also delivered to WM via the constructor. -In our projects, [Injector](../../../packages/injector/lib/src/injector.dart) is used to provide DI. -Dependencies for WidgetModel are configured in the screen component. -The object [WidgetModelDependencies](../../../packages/mwwm/lib/src/dependencies/wm_dependencies.dart) is used for this. It contains an ErrorHandler - an object responsible for handling errors for reactive streams. -Without WidgetModelDependencies configuration, error handling will not work in WidgetModel. \ No newline at end of file diff --git a/docs/img/best_practice/bs_step1.png b/docs/img/best_practice/bs_step1.png deleted file mode 100644 index 9a8a2e084..000000000 Binary files a/docs/img/best_practice/bs_step1.png and /dev/null differ diff --git a/docs/img/best_practice/bs_step2.png b/docs/img/best_practice/bs_step2.png deleted file mode 100644 index 93b93912e..000000000 Binary files a/docs/img/best_practice/bs_step2.png and /dev/null differ diff --git a/docs/img/best_practice/bs_step3.png b/docs/img/best_practice/bs_step3.png deleted file mode 100644 index 3140f61cb..000000000 Binary files a/docs/img/best_practice/bs_step3.png and /dev/null differ diff --git a/docs/img/best_practice/build_phase.png b/docs/img/best_practice/build_phase.png deleted file mode 100644 index 3c9321b7b..000000000 Binary files a/docs/img/best_practice/build_phase.png and /dev/null differ diff --git a/docs/img/best_practice/configs.png b/docs/img/best_practice/configs.png deleted file mode 100644 index 734b3f6b4..000000000 Binary files a/docs/img/best_practice/configs.png and /dev/null differ diff --git a/docs/img/best_practice/files_and_dirs.png b/docs/img/best_practice/files_and_dirs.png deleted file mode 100644 index 0b4fd6db5..000000000 Binary files a/docs/img/best_practice/files_and_dirs.png and /dev/null differ diff --git a/docs/img/best_practice/schemes.png b/docs/img/best_practice/schemes.png deleted file mode 100644 index 5a942d666..000000000 Binary files a/docs/img/best_practice/schemes.png and /dev/null differ diff --git a/docs/img/faq/context_menu_transparent.jpg b/docs/img/faq/context_menu_transparent.jpg deleted file mode 100644 index 4c6d10f0a..000000000 Binary files a/docs/img/faq/context_menu_transparent.jpg and /dev/null differ diff --git a/docs/img/faq/obj_c_build_header.png b/docs/img/faq/obj_c_build_header.png deleted file mode 100644 index 144c2ad3d..000000000 Binary files a/docs/img/faq/obj_c_build_header.png and /dev/null differ diff --git a/docs/img/faq/profile_build_config.png b/docs/img/faq/profile_build_config.png deleted file mode 100644 index 557c36cc8..000000000 Binary files a/docs/img/faq/profile_build_config.png and /dev/null differ diff --git a/docs/img/logo-surf-gear.png b/docs/img/logo-surf-gear.png deleted file mode 100644 index 0d3c33504..000000000 Binary files a/docs/img/logo-surf-gear.png and /dev/null differ diff --git a/docs/img/mwwm.png b/docs/img/mwwm.png deleted file mode 100644 index d5e64fd1f..000000000 Binary files a/docs/img/mwwm.png and /dev/null differ diff --git a/docs/ru/best_practice/flavors/flavors_for_devs.md b/docs/ru/best_practice/flavors/flavors_for_devs.md deleted file mode 100644 index bb3fa39d0..000000000 --- a/docs/ru/best_practice/flavors/flavors_for_devs.md +++ /dev/null @@ -1,197 +0,0 @@ -[Главная](../main.md) - -# Организация Flavors в Flutter - -Все шаги ниже уже настроены в [template](../../../../template). - -Если Вам необходимо изменить идентификатор под ios - меняйте в файле common.xcconfig. - -Информация ниже является сопровождающей. - -### Android - - Здесь все просто. Ничем не отличается от стандартных способов в андроид. - - Итак, все, что нам потребуется в минимальном варианте: - - ```groovy - flavorDimensions "release-type" - - productFlavors { - dev { - dimension "release-type" - applicationIdSuffix ".dev" - versionNameSuffix "-dev" - } - - prod { - dimension "release-type" - } - } -``` - -И все, теперь мы можем с легкостью запустить команду : -``` -flutter run --flavor dev -``` -на нашем андроид девайсе. - -### iOS - -1. Создаем две конфигурации -1. В разработческой указываем суффикс -1. Профит! - - -### Файлы конфигураций - -В наших проектах имеется две конфигурации: dev, prod. -Содержимое у них примерно следующее: - -```с -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-dev.xcconfig" -#include "Generated.xcconfig" -#include "common.xcconfig" - -bundle_suffix=.dev -IDENTIFIER=$(identifier)$(bundle_suffix) -``` - -Итак, создаем две конфигурации и располоагаем в следующих путях: -``` -ios/Flutter/dev.xcconfig -ios/Flutter/prod.xcconfig -``` - -Создание можно провернуть и через XCode(даже лучше, чтобы они добавились именно как конфигурационные файлы). -Делается это с помощью **щелчка правкой кнопки по Runner -> New File -> Configuration Settings File -> двльше выбираем место сохранения**. - -Создаем еще один конфигурационный файл, в котором мы будем устанавливать по сути базовую часть нашего PRODUCT_BUNDLE_IDENTIFIER. - -Содержимое описано одной строкой: -``` -identifier=your.bundle.identifier -``` - -Подключаем этот файл через include в остальные конфиги и устанавливаем новую User Defined переменную IDENTIFIER: -``` -#include "common.xcconfig" - -IDENTIFIER=$(identifier)$(bundle_suffix) -``` - -### Build Configurations. Умножай на два - -Теперь разберемся с конфигурациями сборки. Открываем Runner.xcworkspace в Xcode и выбираем представление Project. - -Там находим кнопку "+" в разделе Configurations и создаем 4 конфигурации: две для Release и две для Debug - где постфиксом пишем название нашего конфига(и будущей схемы приложения). - -Выглядить это будет примерно так: - -![configs](../../../img/best_practice/configs.png) - -К сожалению дублировать конфигурации пока необходимо, так как скрипт ответственный за сборку ios очень чувствителен к неймингу. - - - -### Добавление Scheme - -Кроме создания файлов конфигурации необходимо также правильно настроить схемы приложения: их также две. - -![schemes](../../../img/best_practice/schemes.png) - -Их создание крайне просто. Единственный момент - выберите правильный таргет - Runner. - -Теперь выберите пункт Edit Scheme и проставьте необходимые конфигурации на каждом из этапов для схем. - -### Обновление переменных - -Теперь придется немного поработать мышкой внутри Xcode. Переходим в наш таргет на вкладку Build Settings: -![build_settings](../../../img/best_practice/bs_step1.png) - -Далее в поиске ищем Product Bundle Identifier(раздел Packaging): -![build_settings](../../../img/best_practice/bs_step2.png) - -И меняем значение для всех конфигов на: -``` -$(IDENTIFIER) -``` - -![build_settings](../../../img/best_practice/bs_step3.png) - -Теперь переходим в Info.plist и убираем из строки с идентификатором bundle suffix, оставляя только : -``` -$(PRODUCT_BUNFLE_IDENTIFIER) -``` - -### Разные файлы для разных bundle id - -Но мы решили подключить аналитику. Если мы используем файербейз, то нам понадобится два проекта и четыре приложения соответсвенно(2 платформы под две версии). - -И что самое главное - нам необходимо иметь два файла google-services.json(Google-Services.Info.plist). На стороне андроид все будет просто: мы создаем папку с названием нашего флейвора и закидываем туда наш файл. - -#### Создание и размешения файлов - -Первым делом нам необходимо создать в проекте папку где будут эти файлы хранится. Мы используем следующую структуру: - -![dirs](../../../img/best_practice/files_and_dirs.png) - -**Важно**: не создаем их через икскод. Они не должны быть привязаны к проекту. Если все же икскод - это ваша любимая IDE, при создании снимите галочки с пункта Add to target. - -Далее располагаем наши файлы в соответствующих папках. - -#### Добавление файлов в приложение во время сборки - -Так как файлы не привязаны к проекту, в целевой архив они не попадут. А чтобы они все таки тк=уда попали, надо в ручную их туда засунуть. - -Доабавим дополнительный этап сборки в виде Run Script (setup firebase как пример названия): - ![build_phase](../../../img/best_practice/build_phase.png) - - Обратите внимание на расположение - оно играет решающюю роль! - - Теперь доавим сам скрипт, как один из вариантов можно использовать подобный: - - ``` - # Name of the resource we're selectively copying -GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist - -# Get references to dev and prod versions of the GoogleService-Info.plist -# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually) -GOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/dev/${GOOGLESERVICE_INFO_PLIST} -GOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/prod/${GOOGLESERVICE_INFO_PLIST} - -# Make sure the dev version of GoogleService-Info.plist exists -echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_DEV}" -if [ ! -f $GOOGLESERVICE_INFO_DEV ] -then -echo "No Development GoogleService-Info.plist found. Please ensure it's in the proper directory." -exit 1 # 1 -fi - -# Make sure the prod version of GoogleService-Info.plist exists -echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_PROD}" -if [ ! -f $GOOGLESERVICE_INFO_PROD ] -then -echo "No Production GoogleService-Info.plist found. Please ensure it's in the proper directory." -exit 1 # 1 -fi - -# Get a reference to the destination location for the GoogleService-Info.plist -PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app -echo "Will copy ${GOOGLESERVICE_INFO_PLIST} to final destination: ${PLIST_DESTINATION}" - -# Copy over the prod GoogleService-Info.plist for Release builds -if [[ "${CONFIGURATION}" == *-prod ]] -then -echo "Using ${GOOGLESERVICE_INFO_PROD}" -cp "${GOOGLESERVICE_INFO_PROD}" "${PLIST_DESTINATION}" -else -echo "Using ${GOOGLESERVICE_INFO_DEV}" -cp "${GOOGLESERVICE_INFO_DEV}" "${PLIST_DESTINATION}" -fi -``` - - - - - diff --git a/docs/ru/best_practice/flavors/flavors_long.md b/docs/ru/best_practice/flavors/flavors_long.md deleted file mode 100644 index 4f9dd16ca..000000000 --- a/docs/ru/best_practice/flavors/flavors_long.md +++ /dev/null @@ -1,273 +0,0 @@ -# Организация Flavors в Flutter - -## Для чего нужны флейворы - -Представьте ситуацию: есть приложение с аналитикой. Есть команда разработки, тестировщики, и конечные пользователи. И те и те пользуются одной версией приложения. - -Допустим мы хотим проанализировать насколько пользователям интересна фича А. Что в этом случае мы делаем? Идем в аналитику и смотрим сколько было использований данной фичи(например переходов на экран). Но что же мы видим: запредельное число переходов, которое ну никак невозможно с текущей аудиторией, причем все эти переходы были в какой-то определенный отрезок времени. Мы идем дальше и понимаем, что в это время проводились тесты данной фичи. А чуть ранее ее разработка. При этом аналитика также отсылалась. -Итог: аналитика получается грязной и некачественной. - -Здесь можно заменить слово аналитика на любое другое: пуш-нотификации, креш-репортинг и etc. - -И в этой ситуации нас спасает разделение приложения на две версии отличающиеся минимально, например Bundle ID(package-name). Разработчики и тестеры используют только специальную dev версию, а пользователи продовую. - -Это как раз и есть одна из задач флейворов. Здесь будет использоваться именно flavor так как имеено это название используется Flutter'ом. Вообще люди, знакомые с Android-разработкой думаю сразу узнали этот механизм. - -## Flavouring Flutter ? - -Хорошо, мы разобрались с задачей. Но как это реализовать? Все ли так просто как много где пишут? - -Давайте сразу определимся - организация флейворов - это чисто нативная задача. Сама информация о них не будет доступна из dart кода. Поэтому и за способами организации мы пойдем в нативную мобильную разработку. - -### Android - - Здесь все просто. Ничем не отличается от стандартных способов в андроид. - Конечно может возникнуть вопрос - а почему бы не использовать buildType, но об этом позже. - - Итак, все, что нам потребуется в минимальном варианте: - - -``` groovy - flavorDimensions "release-type" - - productFlavors { - dev { - dimension "release-type" - applicationIdSuffix ".dev" - versionNameSuffix "-dev" - } - - prod { - dimension "release-type" - } - } - -``` - -И все, теперь мы можем с легкостью запустить команду : - -``` -flutter run --flavor dev - -``` - -на нашем андроид девайсе. - -У некоторых вдумчивых разработчиков может возникнуть вопрос: а почему не buildType? Отвечаю: команда флаттера захардкодила билд тайпы под свои нужды. Собственно, вся магия дебаг сборки в этом и заключается. - -### Немного о типах сборок и различных конфигурациях - -Итак, мы вспомнили про билд тайпы. Тут надо немного поговорить о них и об их аналогах в IOs. - -Можно провести следующее сответствие: - -| Android | IOS | -|----------|-----| -| build types | build configurations | -| flavors | targets| - -И типы сборок и конфигурации - это скорее нечто влияющее на саму сборку, в идеале не влияющее на кодовую базу или различия в приложениях. (хотя тут вопрос спорный конечно) А вот флейворы и таргеты - это целиком и полностью вполне удобный инструмент для создания двух приложений из одного и настройки отличий версии для разработчиков от версии пользователей. - -И все бы было хорошо, и настрваивалось именно так, если бы не одно но... - -### Runner - захардкоженный таргет - -Как оказалось использовать таргеты для реализации флейворов на стороне айос не представляется возможным. Дело в том, что команда разработчиков Flutter по некоторым причинам подвязалась на это имя. И на этом можно было бы закончить всю работу, казалось бы. -Но нет. Ведь можно использовать конфигурации сборки. - -### IOs - -Задача: реализовать две конфигурации(dev , prod, отличающиеся наличием суффикса у версии для разработчиков. - -Решение: -1. Создаем две конфигурации -1. В разработческой указываем суффикс -1. Профит! - -А теперь разберем все это подробнее. - -### Файлы конфигураций - -В наших проектах имеется две конфигурации: dev, prod. -Содержимое у них примерно следующее: - -``` - - #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-dev.xcconfig" - #include "Generated.xcconfig" - #include "common.xcconfig" - - bundle_suffix=.dev - IDENTIFIER=$(identifier)$(bundle_suffix) -``` - -Как мы видим, в них задается bundle_suffix. - -*К слову, кроме этого сам Flutter имеет также конфигурации Release и Debug. И в них надо также добавить bundle_suffix. (Мы же не хотим, чтобы по умолчанию наша версия была версией для пользователей при запуске из своей любимой IDE).* - -Также можно видеть некоторый параметр IDENTIFIER - с ним мы ознакомимся ниже. - -Итак, создаем две конфигурации и располоагаем в следующих путях: -``` -ios/Flutter/dev.xcconfig -ios/Flutter/prod.xcconfig -``` - -Создание можно провернуть и через XCode(даже лучше, чтобы они добавились именно как конфигурационные файлы). -Делается это с помощью **щелчка правкой кнопки по Runner -> New File -> Configuration Settings File -> двльше выбираем место сохранения**. - -### Build Configurations. Умножай на два - -Теперь разберемся с конфигурациями сборки. Открываем Runner.xcworkspace в Xcode и выбираем представление Project. - -Там находим кнопку "+" в разделе Configurations и создаем 4 конфигурации: две для Release и две для Debug - где постфиксом пишем название нашего конфига(и будущей схемы приложения). - -Выглядить это будет примерно так: - -![configs](../../../img/best_practice/configs.png) - -К сожалению дублировать конфигураии пока необходимо, так как скрипт ответственный за сборку ios очень чувствителен к неймингу. - -### Добавление Scheme - -Кроме создания файлов конфигурации необходимо также правильно настроить схемы приложения: их также две. - -![schemes](../../../img/best_practice/schemes.png) - -Из создание крайне просто. Единсвтенный момент - выберите правильный таргет - Runner. - -Теперь выберите пункт Edit Scheme и проставьте необходимые конфигурации на каждом из этапов для схем. - - -### Обновление Info.plist - -И последний штрих(спойлер: далеко не последний) - устанавливаем параметр Bundle Identifier в Info.plist как -``` -$(PRODUCT_BUNDLE_IDENTIFIER)$(bundle_suffix) -``` - -## И вроде бы все... -И вроде бы все сделали, проект запускается, на андроид все вообще круто, но если вы вдруг решили использовать fastlane gym для подписи айос, то у вас это не получится. И вообще айос подпись приложения почему-то не работает... Давайте разберемся. - -### No Provisioning Profile - -Первая проблема при выгрузке - не найден профайл. Причем в ошибке почему-то выведен не тот идентификатор, что мы указали в конфиге. - -Как оказалось это установка идентификатора через Info.plist не срабатывает gym смотрит именно на PRODUCT_BUNDLE_IDENTIFIER, а он у нас одинаковый для всех конфигураций. - -Помните загадочный файл common.xcconfig и параметр IDENTIFIER ? Вот как раз они и решают эту проблему. - -Создаем еще один конфигурационный файл, в котором мы будем устанавливать по сути базовую часть нашего PRODUCT_BUNDLE_IDENTIFIER. - -Содержимое описано одной строкой: -``` -identifier=your.bundle.identifier -``` - -Подключаем этот файл через include в остальные конфиги и устанавливаем новую User Defined переменную IDENTIFIER: -``` -#include "common.xcconfig" - -IDENTIFIER=$(identifier)$(bundle_suffix) -``` - -Теперь придется немного поработать мышкой внутри Xcode. Переходим в наш таргет на вкладку Build Settings: -![build_settings](../../../img/best_practice/bs_step1.png) - -Далее в поиске ищем Product Bundle Identifier(раздел Packaging): -![build_settings](../../../img/best_practice/bs_step2.png) - -И меняем значение для всех конфигов на: -``` -$(IDENTIFIER) -``` - -![build_settings](../../../img/best_practice/bs_step3.png) - -Теперь переходим в Info.plist и убираем из строки с идентификатором bundle suffix, оставляя толькол : -``` -$(PRODUCT_BUNFLE_IDENTIFIER) -``` - -Пробуем собрать и подписать. Все работает как необходимо. - -### Разные файлы для разных bundle id - -Но мы решили подключить аналитику. Если мы используем файербейз, то нам понадобится два проекта и четыре приложения соответсвенно(2 платформы под две версии). - -И что самое главное - нам необходимо иметь два файла google-services.json(Google-Services.Info.plist). На стороне андроид все будет просто: мы создаем папку с названием нашего флейвора и закидываем туда наш файл. - -А вот с айос нас ждет крутое приклучение с шелл-скриптами и фазами сборки. - -#### Создание и размешения файлов - -Первым делом нам необходимо создать в проекте папку где будут эти файлы хранится. Мы используем следующую структуру: - -![dirs](../../../img/best_practice/files_and_dirs.png) - -**Важно**: не создаем их через икскод. Они не должны быть привязаны к проекту. Если все же икскод - это ваша любимая IDE, при создании снимите галочки с пугкта Add to target. - -Далее располагаем наши файлы в соответствующих папках. - -#### Добавление файлов в приложение во время сборки - -Так как файлы не привязаны к проекту, в целевой архив они не попадут. А чтобы они все таки тк=уда попали, надо в ручную их туда засунуть. - -Доабавим дополнительный этап сборки в виде Run Script (setup firebase как пример названия): - ![build_phase](../../../img/best_practice/build_phase.png) - -Обратите внимание на расположение - оно играет решающюю роль! - -Теперь доавим сам скрипт, как один из вариантов можно использовать подобный: - -``` - # Name of the resource we're selectively copying -GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist - -# Get references to dev and prod versions of the GoogleService-Info.plist -# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually) -GOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/dev/${GOOGLESERVICE_INFO_PLIST} -GOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/prod/${GOOGLESERVICE_INFO_PLIST} - -# Make sure the dev version of GoogleService-Info.plist exists -echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_DEV}" -if [ ! -f $GOOGLESERVICE_INFO_DEV ] -then -echo "No Development GoogleService-Info.plist found. Please ensure it's in the proper directory." -exit 1 # 1 -fi - -# Make sure the prod version of GoogleService-Info.plist exists -echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_PROD}" -if [ ! -f $GOOGLESERVICE_INFO_PROD ] -then -echo "No Production GoogleService-Info.plist found. Please ensure it's in the proper directory." -exit 1 # 1 -fi - -# Get a reference to the destination location for the GoogleService-Info.plist -PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app -echo "Will copy ${GOOGLESERVICE_INFO_PLIST} to final destination: ${PLIST_DESTINATION}" - -# Copy over the prod GoogleService-Info.plist for Release builds -if [[ "${CONFIGURATION}" == *-prod ]] -then -echo "Using ${GOOGLESERVICE_INFO_PROD}" -cp "${GOOGLESERVICE_INFO_PROD}" "${PLIST_DESTINATION}" -else -echo "Using ${GOOGLESERVICE_INFO_DEV}" -cp "${GOOGLESERVICE_INFO_DEV}" "${PLIST_DESTINATION}" -fi -``` - - -## Мысли после - -С помощью этих овольно хитрых манипуляций был настроен флейворинг. При этом, я очень надеюсь, что решение временное и в скором времени завезут систему сборки под Flutter(над чем ведутся активные работы). - -Но пока мы имеем то, что имеем. И делаем жизнь проще своими руками. - - - - - diff --git a/docs/ru/best_practice/reduce_app_size.md b/docs/ru/best_practice/reduce_app_size.md deleted file mode 100644 index fda2bc376..000000000 --- a/docs/ru/best_practice/reduce_app_size.md +++ /dev/null @@ -1,101 +0,0 @@ -[Главная](../main.md) - -# Уменьшение размера сборки приложения - -## Android - -Файлы занимающие значительный обьем в сборке: -- `libflutter.so` - run-time библиотека фреймворка. Комманда flutter обещает оптимизировать размер этого файла в будущих версиях, либо вынести его в отдельно устанавливаемый run-time пакет; -- `libapp.so` - скомпилированное приложение; -- `classes.dex` - собранные в кучу нативные части всех используемых библиотек. Большинство библиотек уже проходило через обфускатор; -- каталог `res` - тут собраные системные ресурсы, такие как иконки Material и Cupertino, так же коллекция assets из каталога проекта; -- все остальное в сумме менее 1% по объему; - -Пара файлов `libflutter.so` и `libapp.so` помещаются в сборку для каждой поддерживаемой платформы, то есть если собрать однусборку для x86, x86_64, armeabiv7a, arm64_v8a, то сборка занимает значительные объем. -Как вариант, можно запускать сборку с параметром `--split-per-abi`: -``` -flutter build apk --split-per-abi -``` -В таком случае мы получаем несколько сборок для разных платформ, каждая из которых будет менее 10 мб для release. - -### App Bundles - -Aab-файл это формат загрузки, который включает в себя весь скомпилированный код и ресурсы приложения в одном артефакте сборки. - -Если использовать сборку App Bundles командой: -``` -flutter build appbundle -``` -То в результате получается `*.aab` файл, который по объему соответствует "толстому" apk-файлу. - -Если требуется дистрибуция приложения через Google Play, тогда выгоднее использовать aab-файл. -Потому что, в этому случае, после загрузки подписанного пакета приложения в Google Play есть все, что нужно, -для создания и подписи apk-файлов приложения и предоставления их пользователям посредством динамической доставки. -Тоесть пользователь скачает с Google Play файл apk, который будет содержать бинарные файлы только одной, требуемой платформы. - -Если дистрибуция приложения осуществляется с помощью других сервисов, или просто передачей файлов, то передавать aab-файл нет смысла, -потому что его нельзя установить на устройство. -Нужно с помощью утилит приготовить из него либо "толстый" apk файл под все платформы, либо отдельные apk файлы для разных платформ. -В таком случае проще воспользоваться сборкой apk с параметром `--split-per-abi`. - -Этапы борьбы команды flutter за размер релизной сборки приложения можно наблюдать в [этом тикете](https://github.com/flutter/flutter/issues/16833) -Команда flutter переодически уменьшает размер `libflutter.so` за счет оптимизации используемых бибилиотек и за счет использования последних версий -компилятора, который генерит более компактный код. - - -## iOS - -Сборка приложения для iOS имеет размер больше, чем сборка этого же приложения для Android. -Главным образом потому, что Apple шифрует двоичные файлы в пределах IPA, делая сжатие менее эффективным. - -Общая рекомендация - предпочесть загрузку объемных данных из assets вместо объявления статических констант в коде. - -Apple позаботилось о частичной загрузке обновлений приложения из App Store. -Цитата из базы знаний: -``` -Для устройств под управлением iOS 7.1 и более поздних версий пакет обновления может содержать только различия -между старой и новой версиями измененного файла, а не полного файла. Это может значительно уменьшить размер пакета -обновления в случае, если изменяется только небольшая часть большого файла, но увеличит время установки обновления -на устройстве. -``` - - -## Ресурсы - -Какой формат данных предпочесть для хранения графических файлов? - -- `PNG` - формат представления растровых изображений, имеет собственное, достаточное эффективное сжатие -- `JPG` - формат представления растровых изображений, имеет собственное, достаточное эффективное сжатие. - Предпочтительнее использовать `PNG` формат, поскольку у `JPG` формата сжатие с потерями и на изображении могут быть заметны артефакты. -- `SVG` - формат представления векторных изображений, в основе имеет текстовый формат, сжимается внутри артефакта сборки -- `TTF` - формат файла шрифтов, который можно создать из набора svg-файлов, бинарный формат, сжимается внутри артефакта сборки. - Для получения файла шрифтов из набора svg файлов можно использовать [утилиту](https://github.com/ilikerobots/polyicon) -- `FLR` - формат Flare анимаций, текстовый формат, сжимается внутри артефакта сборки - -Ни один из перечисленных форматов не дает значительного преемущества в объеме информации, сохраняемой внутри артефакта сборки. - -Общая рекомендация - предпочесть загрузку объемных данных из assets вместо объявления статических констант в коде. - - -## Обфускация Dart кода - -На примере реального приложения (ROS) объем "жирного" apk: - -- без обфускации - 16 131 443 B -- с обфускацией - 16 031 895 B - -Однако режим обфускации дает еще некоторые побочные эффекты. -Например печать строкового представления типа объектов, трассировки стека и прочее, -будут вести себя немного иначе, чем ожидается от программы Dart, работающей в обычном режиме - потому что идентификаторы будут искажены. - -Все идентификаторы, которые возвращают методы, такие как -Object.runtimeType, -Type.toString, -Enum.toString, -Stacktrace.toString, -Symbol.toString, -будут возвращать искаженные результаты. Любой код или тесты, которые полагаются на результат этих функций - перестанут работать. - -Однако, например для расшифровки трассировки стека, можно добавить параметр -`--save-obfuscation-map=` который заставляет VM хранить отображение между оригинальными именами и искаженными в заданных `filename`. -Отображение кодируется как массив JSON `[original_name_0, obfuscated_name_0, original_name_1, obfuscated_name_1, ...]`. diff --git a/docs/ru/common/arch.md b/docs/ru/common/arch.md deleted file mode 100644 index d8c224da0..000000000 --- a/docs/ru/common/arch.md +++ /dev/null @@ -1,36 +0,0 @@ -[Главная](../main.md) - -# Архитектура - -Архитектура проектов основана на адаптированном Clean Architecture. -UI-cлой основан на вариации MVVM + немного MVI. - -Выделены следующие слои: - -**Widget** - слой отображения, содержит только декларативную логику. Взаимодействует с WidgetModel посредством *Action* и *StreamedState* (по факту аналог binding в mvvm). - -**WidgetModel** - связывает слой виджетов с бизнесс логикой посредством модели. Может содержать логику необходимую для слоя отображения. - -**Model** - слой связи WidgetModel с чистой бизнесс-логикой. Является набором контрактов (performer), которые модель может выполнить. Каждый контракт это изолированная атомартая часть бизнесс-логики. WidgetModel инициирует действие с помощью сообщения об изменении (change). Модель ищет соответствующий данному изменению контракт и выполняет его. - -**BusinessLogic** - слой бизнесс логики, содержит чистую логику на dart, совсем не зависит от Flutter. - -![](../../img/mwwm.png) - -Cлой бизнесс логики обычно содержит сущности следующих типов, каждая из которых имеет свою зону ответственности. - -**Интерактор** - -Интерактор - сущность, которая реализует логику некоторого бизнес процесса. Интерактор не зависит от платформы, в нем реализуется только логика use case. - -**Репозиторий** - -Говоря о репозиториях, следует вспомнить паттерн, который собственно так и называется “Репозиторий”. Суть его в том, чтобы создать некий слой абстракции над какими-либо конкретными источниками данных, будь то например база данных или веб-сервис. Задача репозитория стать промежуточным звеном между тем кто запрашивает данные и тем кто их отдает. Важно понимать, что все что находится выше репозитория не должно знать о том, как он устроен и откуда он берет эти данные. Это может быть сетевой запрос, запрос в базу данных или же все вместе, так называемый гибридный запрос, который подразумевает проведение конкатенации запросов на сервер и кеш по некому установленному вами правилу. - -**Storage** - -Обертка над источником данных. Следуя принципам SOLID, каждый класс должен иметь единственную ответственность. Нельзя смешивать логику нескольких классов в один. Сущность Storage предназначена для абстрагирования работы с хранилищем данных. Например есть кейс, когда необходимо сохранять данные пользователя на локальное устройство. Это необходимо делать в различных форматах. Например xml и json. Правильным решением в этом случае будет реализовать отдельно низкоуровневое api для работы с файловой системой устройства - FileSystem. Поверх него реализовать две "обертки" JsonStorage и XmlStorage, которые будут использовать FileSystem для доступа к файловой системе, а логика сохранения данных будет реализоавана непосредственно в этих классах. - -**Mapper** - -Объект, который переводит один тип данных в другой. \ No newline at end of file diff --git a/docs/ru/common/async.md b/docs/ru/common/async.md deleted file mode 100644 index 32e77f769..000000000 --- a/docs/ru/common/async.md +++ /dev/null @@ -1,91 +0,0 @@ -[Главная](../main.md) - -# Асинхронные взаимодействия - -Напрямую UI не взаимодействует с получением данных. -Все асинхронные действия выполняются в WidgetModel. -Для выполнения асинхронных операций в проектах используется преимущественно библиотека [rxDart][rx_dart_link] -Как ее использовать подробно описано в [этой статье][rx_dart_habr]. - - -## subscribeHandleError - -В WidgetModel подписка на изменение данных в Observable происходит c использованием метода subscribeHandleError -из класса [WidgetModel](../../../packages/mwwm/lib/src/widget_model.dart). Такой подход позволяет стандартизировать -обработку получаемых данных и добиться модульности обработки ошибок; - -Пример: - -```dart - subscribeHandleError( - _authInteractor.signIn(smsCodeState.value, _phoneNumber), - (_) => _navigateToMain(), - onError: (_) smsInputState.error(), - ); -``` - -## subscribe -подписка без централизованной обработки ощибок. - -Пример: - -```dart - //selectNotificationSubject это обьект класса BehaviorSubject - один из видов потоков из rxDart - //onSelect метод типа данных Future. Выполняется когда в selectNotificationSubject просиходит како-либо изменение - subscribe( - _notificationController.selectNotificationSubject, - _notificationHandler.onSelect, - ); -``` - -## Future -Стандартный механизм обработки асинхронных операций в Dart. Подробно ознакомиться -можно в [официальной документации][future_link]. - -Пример: - -```dart -FlatButton( - child: Text('Run Future'), - onPressed: () { - runMyFuture(); - }, -) - -void runMyFuture() { - myTypedFuture().then((value) { - print(value); - }, onError: (error) { - print(error); - }); -} - -Future myTypedFuture() async { - await Future.delayed(Duration(seconds: 1)); - return Future.error('Error from return'); -} -``` - -## ErrorHandler -Для обработки ошибок, получаемых из потока, в студийной практике -используются расширения класса [ErrorHandler](../../../packages/mwwm/lib/src/error/error_handler.dart). -ErrorHandler поставляется на WidgetModel через класс WidgetModelDependencies - это обертка над обязательными состоавляющим WidgetModel. -Если не сконфигурировать ErrorHandler в компоненте экрана, при использовании метода subscribeHandleError -ошибки отлавливаться не будут. - -## bind -Для отслеживания одиночных действий(нажатие на кнопку, изменение текста, скролл списка) в студии -используются [Action](../../../packages/relation/lib/src/relation/action/action.dart). Представляет обертку над потоком, которая регистрирует -одиночные действия и возвращает первое событие из потока. Для удобства подписки таких событий был создан метод bind. - -Пример: - -```dart -void _bindActions() { - bind(showCardAction, (_) => _navigateToShowCardScreen()); - } -``` - -[rx_dart_link]:https://pub.dev/packages/rxdart -[rx_dart_habr]:https://habr.com/ru/post/451292/ -[future_link]:https://api.flutter.dev/flutter/dart-async/Future-class.html \ No newline at end of file diff --git a/docs/ru/common/build.md b/docs/ru/common/build.md deleted file mode 100644 index 38fc2e289..000000000 --- a/docs/ru/common/build.md +++ /dev/null @@ -1,63 +0,0 @@ -[Главная](../main.md) - -# Сборка/выгрузка проекта - -## Указание версии SDK - -В большинстве случаев все проекты используют одну и ту же версию SDK в stable. -Данную версию необходимо установить в файле [./script/version.sh](../../../template/script/version) - -``` -current_version=*версия сдк* -``` - -## Сборка - -Для сборки артефактов предусмотрены скрипты из директории /script -Их выполнение происходит на Jenkins при Pr и Tag джобах. -Также возможно ручное выполнение скриптов из консоли. - -- ./script/android/build.sh - сборка qa/release (x64) -- ./script/ios/build.sh - ios сборка -- ./script/version.sh - переключение версии Flutter SDK для проекта - -**ВАЖНО**: Все команды выполняются из корня **проекта** (там где находится pubspec.yaml приложения) - -**ВАЖНО**: Перед IOs сборкой необходимо - -* Скачать сертификаты с Apple Account и Provisioning Profile и положить их в папку `./ios/certs` -* Заполнить todo в скрипте `./ios/scripts/init_certs.sh` - -* Выполнить следующие команды: - -``` -make -C ios/ init -``` - -В случае непонятных ошибок (актуально для iOS сборок): - -1. Закройте Xcode -1. Отключите девайсы -1. Очистите проект: -``` -./clean_ios.sh -``` - -1. Проделайте заново все шаги по сборке проекта - - -## Выгрузка артефактов - -Для распространения артефактов мы используем **Beta by Fabric**. -Чтобы выгрузить сборки в данный сервис используется fastlane. - -Основне команды: - -``` -cd android/; fastlane android beta //android сборка - -make -C ios beta //ios сборка -``` - -**ВАЖНО**: При локальной выгрузке перед ней следует выполнить сборку проекта одним из описанных -выше билдскриптов. diff --git a/docs/ru/common/cd.md b/docs/ru/common/cd.md deleted file mode 100644 index bf3c4e79e..000000000 --- a/docs/ru/common/cd.md +++ /dev/null @@ -1,27 +0,0 @@ -[Главная](../main.md) - -# Continious Delivery - -Для доставки артефактов тестировщикам используется fastlane (отвечает за выгрузку) -и Beta by Fabric (сервис для распространения сборок). - -О этапах сборки и выгрузки написано [здесь](build.md). - -Данный документ описывает настройку Fabric. - -Основная конфигурация для выгрузки в Beta настроена в шаблонном проекта. -В конкретном проекте необходимо проделать следующие шаги: - -1. Создать [организацию в Fabric](https://www.fabric.io/settings/organizations) -1. Android: - 1. ./android/app/fabric.properties - добавить актуальные API_KEY/API_SECRET - 1. ./android/fastlane/Fastfile - добавить актуальные API_KEY/API_SECRET - 1. ./android/fastlane/Appfile - добавить актуальный package-name -1. iOS: - 1. ./ios/Runner/Info.plist - добавить актуальные API_KEY/API_SECRET в необходимые ключи - 1. ./ios/fastlane/Appfile - добавить учетные данные - 1. ./ios/fastlane/Fastfile - добавить актуальные API_KEY/API_SECRET и app_identifier -1. Стимулировать фатальную ошибку на одном из начальных экранов приложения. -1. Запустить приложение на девайсах обеих платформ. - -После этих шагов в Fabric должны появится два проекта соответствующие приложениям. \ No newline at end of file diff --git a/docs/ru/common/check_connect.md b/docs/ru/common/check_connect.md deleted file mode 100644 index 0f89f6338..000000000 --- a/docs/ru/common/check_connect.md +++ /dev/null @@ -1,48 +0,0 @@ -# Проверка соединения - -[Главная](../main.md) - -# Connectivity - -Проверка сетевого подключения очень важна практически для любого приложения. -Встречаются кейсы, когда необходимо проверить подключение приложения к Интернету или к сети wi-fi. -Если у пользователя есть подключение к Интернету,приложение продолжает работу, -например, получать данные через Интернет и т.д, и если у пользователя нет подключения к Интернету, -приложение показывает окно с предупреждением, что нужно включить wi-fi или мобильный данные. - -Для проверки подключения к интернету в студийной практике используется плагин [Connectivity](https://pub.dev/packages/connectivity) -Этот плагин позволяет приложениям Flutter обнаруживать подключение к сети и настраивать -себя соответственно. Он может отличить сотовое соединение от wi-fi. -Этот плагин работает для iOS и Android. - -Более подробно об этом можно почитать в [статье](https://medium.com/flutter-community/build-a-network-sensitive-ui-in-flutter-using-provider-and-connectivity-ddad140c9ff8) на Medium. - -# Использование - -```dart -import 'package:connectivity/connectivity.dart'; - -var connectivityResult = await (Connectivity().checkConnectivity()); -if (connectivityResult == ConnectivityResult.mobile) { - print("Connected to Mobile Network"); -} else if (connectivityResult == ConnectivityResult.wifi) { - print("Connected to WiFi"); -} else { - print("Unable to connect. Please Check Internet Connection"); -} -``` - -Так-же можно слушать изменения состояния сети, подписавшись на поток, предоставляемый подключаемым модулем. -Таким образом, можно узнать когда состояние сети изменилось. - -```dart -initState() { - subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) { - print("Connection Status has Changed"); - }); -} - -dispose() { - subscription.cancel(); -} -``` \ No newline at end of file diff --git a/docs/ru/common/code_style.md b/docs/ru/common/code_style.md deleted file mode 100644 index f7ad08eb7..000000000 --- a/docs/ru/common/code_style.md +++ /dev/null @@ -1,175 +0,0 @@ - -[<- Главная](../main.md) - - -# Стиль кода - -## Основные положения - -Этот документ описывает соглашения по стилю кода. Мы придерживаемся рекомендаций, -описанных в [Effective Dart](https://www.dartlang.org/guides/language/effective-dart), -и перед началом разработки очень рекомендуем ознакомиться с ними. - -Перед каждым пулл реквестом необходимо отформатировать код с помощью dartfmt -(Ctrl+Alt+L для Android Studio, Ctrl+Alt+F для VS Code, должен быть установлен плагин для Flutter). - -## Документация, комментарии - -см. [Docs](https://www.dartlang.org/guides/language/effective-dart/documentation) - -## Именование - -### Именование файлов - -Файлы именуются в **snake_case**. - -Файлы основных компонентов экрана должны заканчиваться следующими суффиксами: - -- *screen* — файл с виджетом экрана - -- *wm* — файл с WidgetModel экрана - -- *route* - файл c Route экрана - -### Именование ресурсов - - Ресурсы (строки, названия файлов ассетов) объявляются с помощью модификатора const, - чтобы в конструкторах виджетов их можно было использовать в качестве значения по умолчанию. - -### Именование переменных и методов - - Константы именуются в lowerCamelCase (как написано в [Effective Dart](https://dart.dev/guides/language/effective-dart/style#prefer-using-lowercamelcase-for-constant-names)): - -```dart - const String keyAlias = "KEY_ALIAS" -``` - - Булевы переменные должны начинаться со вспомогательных глаголов is, was, has, should, need, can... - - Для полей виджетов и виджет моделей существуют следующие суффиксы: - -- *State* — объект класса StreamedState -- *Action* — объект класса Action -- *Controller* — различные контроллеры (AnimationController, TextEditingController, etc.) - - Имена методов и функций должны содержать глагол, который отражает исполняемую логику. Следует избегать союзов **And/Or** в названиях методов, - наличие таковых — явный признак для рефакторинга кода. - - Для именования методов рекомендуется использовать следующие префиксы: - -- *build* — для методов, возвращающих часть дерева виджетов (используются для упрощения вёрстки) - -- *reload* — методы загрузки/перезагрузки данных - -### Именование классов - -Следует использовать следующие постфиксы для сущностей: - -- *Widget/Screen* — отдельный виджет или вёрстка целого экрана - -- *WidgetModel* — модель виджета - -- *Component* — компонент для конфигурации зависимостей - -- *Interactor* — интеракторы для бизнес-логики - -- *Repository* — репозитории - -## Организация кода - -### Файловая структура - -Dart позволяет хранить в одном файле несколько классов, однако это ухудшает читаемость кода и делает - файлы огромными, поэтому не рекомендуется объединять несколько классов в один файл. - -**Исключение :** приватные классы можно определять в UI классах. Можно выносить приватные классы в одном и том же файле, если только здесь и -будет использоваться этот виджет - -Типичная структура файлов файлов и папок описана [здесь](./structure.md). - -Дополнительно: - -- Директория экрана должна содержать папку с настройками di-компонента - -### Структура класса - -Внутри класса следует использовать следующий порядок метод и полей: - -1. Публичные static const поля - -1. Приватные static const поля - -1. Публичные static поля - -1. Приватные static поля - -1. Публичные final поля - -1. Приватные final поля - -1. Публичные поля (get/set) - -1. Приватные поля (get/set) - -1. Конструктор класса - -1. Именованные конструкторы класса - -1. Фабричные конструкторы класса - -1. @override методы - -1. Публичные static методы - -1. Публичные методы - -1. @protected методы - -1. Приватные static методы - -1. Приватные методы - -## Форматирование - -**ВАЖНО**: Для лучшей читаемости рекомендуется вставлять запятую после последнего аргумента в вызовах методов и конструкторов, а так же в описании их параметров, если они не помещаются в одну строчку (trailing comma). - -Плохо: - -```dart - func( - "foobar", - "barfoo", - "asdf1234", - "orange", - "apple", - "banana", - "foobar", - "barfoo", - "asdf1234", - "orange", - "apple", - "banana"); -``` - -Хорошо: - -```dart - func( - "foobar", - "barfoo", - "asdf1234", - "orange", - "apple", - "banana", - "foobar", - "barfoo", - "asdf1234", - "orange", - "apple", - "banana", //Это и есть trailing comma - ); -``` - -## Рекомендации - -При разработке следует пользоваться правилами и подходами описанными [здесь](https://www.dartlang.org/guides/language/effective-dart/design) diff --git a/docs/ru/common/dependencies.md b/docs/ru/common/dependencies.md deleted file mode 100644 index cb4184753..000000000 --- a/docs/ru/common/dependencies.md +++ /dev/null @@ -1,12 +0,0 @@ -[Главная](../main.md) - -# Подключение зависимостей (до момента выхода на pub.dev) - -В случае, когда необходимо подключить зависимость, которая еще не опубликована, ее нужно подключать -локально. Если подключать по прямой ссылке git можно получить проблему разрешения зависимостей. -Пример подключения: - -``` - logger: - path: ../logger -``` \ No newline at end of file diff --git a/docs/ru/common/di.md b/docs/ru/common/di.md deleted file mode 100644 index 8bfb46773..000000000 --- a/docs/ru/common/di.md +++ /dev/null @@ -1,8 +0,0 @@ -[Главная](../main.md) - -# DI - -Основан на InheritedWidget. - - - `Injector` — класс, позволяющий получить любой находящийся выше по дереву виджетов `Component` - - `Component` — класс, предоставляющий WidgetModel необходимые зависимости diff --git a/docs/ru/common/init_project.md b/docs/ru/common/init_project.md deleted file mode 100644 index d5925c44f..000000000 --- a/docs/ru/common/init_project.md +++ /dev/null @@ -1,49 +0,0 @@ -[Главная](../main.md) - -# Инициализация проекта из Template - -Для быстрой инициализации нового Flutter-проекта существует специальный -Template. -Вам предстоит произвести несколько простых действий: - -1. Создайте папку для репозитория с названием проекта. Название папки = -название репозитория на Bitbucket; -1. Скопируйте содержимое папки ***/template*** из **flutter-standard** -в созданную на предыдущем шаге директорию; -1. В файле ***pubspec.yaml*** задайте `name` вашему приложению (не -может содержать дефисов). **Важно:** это не package-name вашего приложения. -Настоящий package-name задаётся для сборки на каждую платформу отдельно -и может различаться; -1. Замените строку `flutter_template` по всему проекту *(Ctrl+Shift+R)* - на `name` приложения, указанный на предыдущем шаге. - -### Общее: - -Проект не соберётся без созданных **Firebase** и **Fabric** -проектов. -В случае, если эти проекты должны быть заведены на стороне заказчика, -но их пока нет, правильным решением будет создать временный проект в -аккаунте surfstudio36@gmail.com ([узнать пароль можно тут](https://docs.google.com/document/d/13BpXmgwBrbrliGxn80Mr70E2D3NIEdRcybpWLuHzzco/edit)). - -1. Нужно создать проект в котором будут содержаться 4 приложения -(**Android** - *prod* и *dev*, **iOS** - *prod* и *dev*); -1. **Android:** Выгрузить `google-services.json` (единый для всех типов -сборок) и положить его в `android/app`; -1. **iOS:** Выгрузить два `GoogleService-Info.plist` (для каждого типа -сборки) и положить его в `ios/Runner/Firebase/dev` и `ios/Runner/Firebase/prod`; - -Более подробно о настройке CD [можно прочитать здесь](./cd.md). - -### Android: -1. В **AndroidManifest.xml** замените `package` на package-name для -Android-сборки приложения. **Важно:** в проекте три файла манифеста -(`app/src/debug`, `app/src/main`, `app/src/profile`), актуализировать -package-name нужно в каждом; -1. Измените путь к `MainActivity` на совпадающий с package-name -приложения; -1. Выполните консольную команду `flutter packages get`. - -
Flavors настроены заранее, никаких дополнительных действий не требуется. - -### iOS: -1. Откройте файл `ios/Flutter/common.xcconfig`; -1. Замените там `identifier` на package-name вашего приложения. \ No newline at end of file diff --git a/docs/ru/common/logging.md b/docs/ru/common/logging.md deleted file mode 100644 index aab0d1338..000000000 --- a/docs/ru/common/logging.md +++ /dev/null @@ -1,20 +0,0 @@ -[Главная](../main.md) - -# Логирование - -[Описание модуля логирования](../../logger/README.md) - -В обязательном порядке следует логировать: - -* Url запросов и статус ответов сервера. - -* Нефатальные исключения: состояние приложения, когда что-то пошло не так, -но при этом приложение продолжает работать. Например, неправильный парсинг ответа сервера. - -* Основные события State. - -**Важно** : - -- Логи, которые не несут важной информации, следует удалить. - -- Нельзя оставлять пустыми обработчики ошибок Rx-потока. \ No newline at end of file diff --git a/docs/ru/common/message.md b/docs/ru/common/message.md deleted file mode 100644 index c476fc7e6..000000000 --- a/docs/ru/common/message.md +++ /dev/null @@ -1,18 +0,0 @@ -[Главная](../main.md) - -# Сообщения - -Принцип работы с сообщениями одинаков с [диалогами](dialog.md). - -Для работы с сообщениями, необходимо подключить к WidgetModel реализацию -абстрактного класса MessageController. Например MaterialMessageController. -Для показа сообщения необходимо вызвать метод `_msgController.show(type, msg: “message“)`. -По умолчанию кастомизировать внешний вид сообщения не обязательно, оно принимает вид стандартного снэка. - -Для кастомизации внешнего вида сообщения используется mixin CustomSnackBarOwner. -Данная сущность реализуется на необходимом экране и подключается к MessageController, -который используется для отображения диалогов в WidgetModel. Таким образом кастомизация внешнего вида -сообщения происходит на ui слое, а обработка логики в WidgetModel, тем самым сохраняя принцип -разделения ответственности. - -Реализация логики вызова сообщения происходит только в сущности WidgetModel. \ No newline at end of file diff --git a/docs/ru/common/navigation.md b/docs/ru/common/navigation.md deleted file mode 100644 index 79febd69a..000000000 --- a/docs/ru/common/navigation.md +++ /dev/null @@ -1,67 +0,0 @@ -[Главная](../main.md) - -# Навигация - -Навигация осуществляется при помощи стандартного механизма фреймворка — [Navigator](https://flutter.dev/docs/cookbook/navigation) - -В студийной практике навигатор используется только в сущности [WidgetModel](../ui/widget_model.md). - -## Пример использования - -```dart -class InputNumberRoute extends CupertinoPageRoute { - InputNumberRoute() : super(builder: (ctx) => InputNumberScreen()); -} - -class SomeWidgetModel{ - void _goToNextScreen() { - _navigator.push(InputNumberRoute()); - } -} -``` - -## Пример использования с передачей параметров - -```dart - -class Screen2Route extends CupertinoPageRoute { - Screen2Route(String param) : super(builder: (ctx) => Screen2(param)); -} - -class Screen1 extends StatelessWidget { - - void goToScreen2(){ - _navigator.push(Screen2Route("Hello from first screen!")); - } -} - - -class Screen2 extends StatelessWidget { - final String someParam; - - // In the constructor, require a Todo. - DetailScreen({Key key, @required this.someParam}) : super(key: key); - - @override - Widget build(BuildContext context) { - // Use the Todo to create the UI. - return Scaffold( - appBar: AppBar( - title: Text("screen2"), - ), - body: Padding( - child: Text(someParam), - ), - ); - } -} -``` - -# Route - -Route определяют анимацию перехода. -Наиболее часто используемые MaterialPageRoute и CupertinoPageRoute. -Более подробно с созданием роутов можно ознакомиться в [этой статье][route_link] - - -[route_link]:https://medium.com/@agungsurya/create-custom-router-transition-in-flutter-using-pageroutebuilder-73a1a9c4a171 \ No newline at end of file diff --git a/docs/ru/common/structure.md b/docs/ru/common/structure.md deleted file mode 100644 index 1ec5242d0..000000000 --- a/docs/ru/common/structure.md +++ /dev/null @@ -1,27 +0,0 @@ -[Главная](../main.md) - -# Структура проекта | Project Structure - -- / - папка проекта -- /res - - /assets - директория расположения графических ресурсов -- /docs - документация проекта(тех.док, тех.долг) -- /android - папка, содержащая нативный код для Android -- /ios - аналогично для iOS -- /lib - код на Dart, Flutter-приложение - - /domain - Domain -слой - - /interactor - Interactor-слой - - /common - общееиспользуемые классы - - /*some_interactor*/repository - репозиторий для интерактора - - /ui - UI-слой - - /app - пакет с главным виджетом приложения - - /base - базовые классы для ui - - /common - общеиспользуемые классы UI - - /res - пакет для ресурсов(colors.dart, text_styles.dart, etc.) - - /strings - строковые ресурсы - - /common_strings.dart - строки, общие для всех проектов - - /strings.dart - строки, специфичные для проекта - - /screen - пакеты конкретных экранов/виджетов(сам виджет + WM) - - /*some_screen*/di - DI для экрана - - /util - утилиты -- /test - тесты diff --git a/docs/ru/common/tabnavigator.md b/docs/ru/common/tabnavigator.md deleted file mode 100644 index 42fc030dc..000000000 --- a/docs/ru/common/tabnavigator.md +++ /dev/null @@ -1,27 +0,0 @@ -# TabNavigator - -[Главная](../main.md) -[Навигация](navigation.md) - -Помимо обычных переходов между вкладками, иногда требуется реализовать вложенную навигацию. -Требуется чтобы каждая вкладка имела свой собственный стек навигации. Это необходимо для того, -чтобы пользователь не терял историю навигации при переключении вкладок. - -Для решения этой задачи был разработан TabNavigator. - -# Принцип работы - -При инициализации TabNavigator'a, необходимо добавить Map экранов, на которых -необходимо реализовать вложенную навигацию. Выбранные экраны оборачиваются в список навигаторов, -которые последовательно следуют друг за другом. Таким образом происходит реализация вложенной навигации. - -При добавлении виджета в TabNavigator, в него передается "родительский" buildContext. Таким образом, -когда необходимо перейти на новый экран из вложенного виджета, необходимо вызвать метод -```dart TabNavigatorState of(BuildContext context)```. Он возвращает состояние навигатора, -которе используется в корневом контексте. Благодаря этому механизму из вложенного экрана можно -перейти на новый экран, который находится за пределами текущей цепочки вложенности. - -TabNavigator можно объединить с любым графическим компонентом. Например BottomNavigation. - -За определения индекса открываемой вкладки отвечает Stream\ selectedTabStream. -Для отслеживания информации об открытой вкладке необходимо использовать ObserversBuilder. \ No newline at end of file diff --git a/docs/ru/common/test_api.md b/docs/ru/common/test_api.md deleted file mode 100644 index 5034ecccb..000000000 --- a/docs/ru/common/test_api.md +++ /dev/null @@ -1,11 +0,0 @@ -# Тестирование api - -Для проверки работоспособности запроса необходимо использовать тестирование api. - -Для этого необходимо: -- добавить interactor (включая все его зависимости) с тестируемым методом в MockAppComponent -- через expect(request, emits(*то, что ожидаем от запроса*)); - -Тестирование основано на проверке значения Observable. -MockAppComponent представляет из себя копонент тестирвоания сервисного слоя. -Вопроизводит поведение Interactor путем подстановки тестовых данных. \ No newline at end of file diff --git a/docs/ru/common/testing.md b/docs/ru/common/testing.md deleted file mode 100644 index 5da68eebf..000000000 --- a/docs/ru/common/testing.md +++ /dev/null @@ -1,267 +0,0 @@ -[Главная](../main.md) - -# Тестирование - -## Тестирование виджетов - -Файлы с тестами принято располагать в подкаталоге `test` проекта. -По умолчанию исполняются тесты из всех файлов, с маской `*_test.dart` из подкаталога `test`. - -Тест описывается с помощью функции `testWidgets`. Для взаимодействия с виджетом -пользователю предоставляется WidgetTester. -```dart - testWidgets('Название теста', (WidgetTester tester) async { - // Код теста - }); -``` - -Тесты можно объединять в группы с помощью `group`: -```dart - group('Название группы тестов', () { - testWidgets('Название теста', (WidgetTester tester) async { - // Код теста - }); - - testWidgets('Название теста', (WidgetTester tester) async { - // Код теста - }); - }); -``` - -Функции `setUp` и `tearDown` позволяют выполнить какой-либо код до и после каждого теста. -```dart - setUp(() { - // код инициализации теста - }); - tearDown(() { - // код финализации теста - }); -``` - -### Взаимодействие с тестируемым виджетом - -Класс `WidgetTester` предоставляет функции для создания тестируемого виджета и ожидания смены его состояний, -а также выполнять некоторые действия над виджетами. - -* `pumpWidget` — создание тестируемого виджета -* `pump` — ожидание смены состояния тестируемого виджета в течение заданного времени (100 мс по умолчанию) -* `pumpAndSettle` — вызывает `pump` в цикле для смены состояний в течение заданного времени (100 мс по умолчанию) -* `tap` — отправить виджету нажатие -* `longPress` — длинное нажатие -* `fling` — смахивание/свайп -* `drag` — перенос -* `enterText` — ввод текста - - -### Поиск виджетов - -Чтобы выполнить какие-либо действия над вложенным виджетом, его нужно найти в дереве виджетов. -Для этого есть глобальный объект `find`, который позволяет найти виджеты: - -* в дереве по тексту — `find.text`, `find.widgetWithText` -* по ключу — `find.byKey` -* по иконке — `find.byIcon`, `find.widgetWithIcon` -* по типу — `find.byType` -* по положению в дереве — `find.descendant` и `find.ancestor` -* с помощью функции, которая анализирует виджеты по списку — `find.byWidgetPredicate` - - -### Макеты - -Моки зависимостей создаются как наследники класса `Mock` и реализуют интерфейс зависимости. -```dart -class AuthInteractorMock extends Mock implements AuthInteractor {} -``` - -Для определения функциональности мока используется функция `when`, -которая позволяет определить ответ мока на вызов той или иной функции. -```dart -when(authInteractor.checkAccess(any)) - .thenAnswer((_) => Future.value(true)); -``` - - -### Проверки - -В процессе выполнения теста можно проверить наличие виджетов на экране: -```dart -expect(find.text('Номер телефона'), findsOneWidget); -expect(find.text('Код из СМС'), findsNothing); -``` - -После выполнения теста можно проверить как макет был использован виджетом: -```dart -verify(appComponent.authInteractor).called(1); -verify(authInteractor.checkAccess(any)).called(1); -verifyNever(appComponent.profileInteractor); -``` - - -### Отладка - -Тесты выполняются в консоли без какой либо графики. -Можно запускать тесты в debug режиме и ставить точки останова в коде виджета. - -Для того чтобы получить представление о том, что происходит в дереве виджетов, можно использовать -функцию `debugDumpApp()`, которая выводит в консоль текстовое представление иерархии всего дерева виджетов. - -Для получения представления о том, как виджет использует моки, используется функция `logInvocations([])`. -Функция принимает список моков, и выдает в консоль последовательность вызовов -методов у этих моков, которые совершал тестируемый виджет. - -### Подготовка - -Все интеракторы и прочие зависимости должны передаваться в тестируемый виджет в виде мока: -```dart -class AppComponentMock extends Mock implements AppComponent {} -class AuthInteractorMock extends Mock implements AuthInteractor {} -``` - -В корне дерева виджетов должен быть `Injector` и `MaterialApp`. -```dart - await tester.pumpWidget( - Injector( - component: appComponentMock, - builder: (context) { - return MaterialApp( - home: PhoneInputScreen(), - ); - }, - ), - ); - await tester.pumpAndSettle(); -``` -В примере кода `PhoneInputScreen` — это тестируемый виджет. -Также видно, что `Injector` в качестве параметра получает мок `AppComponent` -и как обычно извлекает из него необходимые зависимости, которые нужно предварительно создать -и поместить в мок `AppComponent` с помощью `when`. - -После создания тестового виджета и после любых действий с ним нужно вызывать `tester.pumpAndSettle()` -для смены состояний. - - -### Тестирование - -Для проверки виджета мы можем моделировать поведение сервисного слоя и отслеживать реакцию тестируемого виджета. - -Моки могут возвращать ошибки или ошибочные данные: -```dart -when(authInteractor.checkAccess(any)).thenAnswer((_) => Future.error(UnknownHttpStatusCode(null))); -``` - -В тесте можно и нужно нажимать куда не надо, и вводить не то что требуется, -и проверять, что это не приводит к фатальным последствиям -```dart -await tester.enterText(find.byKey(Key('phoneField')), 'bla-bla-bla'); -``` - -После любых действий с виджетами нужно вызывать `tester.pumpAndSettle()` для смены состояний. - - -## Интеграционное тестирование - -Этот метод тестирования может хорошо заменить ручное тестирование. -Процесс тестирования можно наглядно наблюдать в эмуляторе или на устройстве. - -Из недостатков этого подхода можно отметить то, что нет возможности взаимодействовать с системными диалогами платформы. -Но, например, запросы привилегий можно подавлять так, как описано в [этом тикете](https://github.com/flutter/flutter/issues/12561). - -### Общие сведения - -В отличие от виджет тестов, процесс работы интеграционного теста можно наблюдать в симуляторе или на экране устройства. - -Файлы с интеграционными тестами располагаются в подкаталоге `test_driver` проекта. - -Приложение запускается после старта специального плагина, который позволяет управлять нашим приложением. - -Выглядит это следующим образом: -```dart -import 'package:flutter_driver/driver_extension.dart'; -import 'package:park_flutter/main.dart' as app; -void main() { - enableFlutterDriverExtension(); - app.main(); -} -``` - -Запуск тестов осуществляется из командной строки. -Если запуск приложения описан в файле `app.dart`, а тестовый сценарий называется `app_test.dart`, -то достаточно следующей комманды: -```text -$ flutter drive --target=test_driver/app.dart -``` - -Если тестовый сценарий имеет другое имя, тогда его нужно указать явно: -```text -flutter drive --target=test_driver/app.dart --driver=test_driver/home_test.dart -``` - -Тест создается функцией `test`, и группируются функцией `group`. - -```dart -group('park-flutter app', () { - // драйвер, через который мы подключаемся к устройству - FlutterDriver driver; - - // создаем подключение к драйверу - setUpAll(() async { - driver = await FlutterDriver.connect(); - }); - - // закрываем подключение к драйверу - tearDownAll(() async { - if (driver != null) { - driver.close(); - } - }); - - test('Имя теста', () async { - // код теста - }); - - test('Другой тест', () async { - // код теста - }); -} -``` - - -### Взаимодействие с тестируемым приложением - -Инструмент `FlutterDriver` позволяет взаимодействовать с тестируемым приложением через следующие методы: - -* tap — отправить нажатие виджету -* waitFor — ждать появление виджета на экране -* waitForAbsent — ждать исчезновения виджета -* scroll, scrollIntoView, scrollUntilVisible — прокрутить экран на заданное смещение или к требуемому виджету -* enterText, getText — ввести текст или взять текст виджета -* screenshot — получить скриншот экрана -* requestData — более сложное взаимодействие через вызов функции внутри тестируемого приложения -* и много другое - -В приложении можно задать обработчик запросов, к которому можно обращаться через вызов `driver.requestData('login')` -```dart -void main() { - Future dataHandler(String msg) async { - if (msg == "login") { - // какая то обработка вызова в приложении с возвратом результата - return 'some result'; - } - } - - enableFlutterDriverExtension(handler: dataHandler); - app.main(); -} -``` - - -### Поиск виджетов - -Поиск виджетов при интеграционном тестировании незначительно отличается от аналогичной функциональности при тестировании виджетов: - -* в дереве по тексту — `find.text`, `find.widgetWithText` -* по ключу — `find.byValueKey` -* по типу — `find.byType` -* по подсказке — `find.byTooltip` -* по семантической метке — `find.bySemanticsLabel` -* по положению в дереве — `find.descendant` и `find.ancestor` \ No newline at end of file diff --git a/docs/ru/faq/builds.md b/docs/ru/faq/builds.md deleted file mode 100644 index 5561448cd..000000000 --- a/docs/ru/faq/builds.md +++ /dev/null @@ -1,58 +0,0 @@ -[Главная](../main.md) - -# FAQ по сборке - -Решаем проблемы с типами сборки. - -Если вы пришли сюда за ответами на вопросы, но ещё не читали [рукводство по орагнизации Flavors во Flutter](../best_practice/flavors/flavors_long.md) - сначала обязательно прочитайте его. - -## Падает локальная сборка iOS через Fastlane - - - **No profile for team 'XXXXXXXXX' matching. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.** -

- Проблема решилась предоставлением расширенных прав на директорию: -
- `sudo chmod 755 /Users/{username}/Library/Logs/gym/` -

- - **Permission denied @ rb_sysopen - /Users/{username}/{project-dir}/ios/{cer-name}.cer** -

- Проблема решилась предоставлением расширенных прав на директорию: -
- `sudo chmod 755 /Users/{username}/{project-dir}/ios/*` - -## После удаления пакета из pubspec.yaml падает сборка под iOS - - - **ld: framework not found {packageName}.** -

- Проблема вызвана тем, что по какой-то причине после удаления пакета -из проекта не очищаются linker flags. Это необходимо сделать вручную в -Xcode. -
-1. В `Project navigator` кликните на `Runner`; -2. Перейдите на вкладку `Build Settings`; -3. В поиск введите название проблемного пакета: результат поиска должен -находиться в разделе `Other Linker Flags`. Раскройте список флагов и -вручную удалите оттуда лишний. -4. Далее, пушим изменения в гит. Сборка должна починиться. - -## Не получается собрать profile-сборку под iOS - - - **Отсутствует нужная Build Configuration в XCode.** -

- Внимательно читайте ошибку, которая возникает в консоли при сборке. - В ней будет указано имя Build Configuration, которое не удалось найти. - Нужно будет создать такую Build Configuration в вашем проекте через - XCode. -

- ![build_settings](../../img/faq/profile_build_config.png) -

- - **Profile-сборка падает при попытке собрать её под iOS, хотя dev-сборка собирается успешно.** -

- Если в теле ошибки появляются логи, чаще всего про то, что какие-то - классы не удалось зарезолвить, одна из вероятных причин - - отсутствие значения в настройки Objective-C Bridging Header для - использумой вами Build Configuration. Чтобы пофиксить это - просто - используйте тоже значение, которое указано у других конфигураций. -

- ![build_settings](../../img/faq/obj_c_build_header.png) -

\ No newline at end of file diff --git a/docs/ru/faq/errors.md b/docs/ru/faq/errors.md deleted file mode 100644 index 5d079ef08..000000000 --- a/docs/ru/faq/errors.md +++ /dev/null @@ -1,17 +0,0 @@ -[Главная](../main.md) - -# FAQ по ошибкам - -Решаем проблемы с ошибками и ворнингами. - -## Ошибки - -- **Многие модули подчёркнуты красным, многие зависимости незарезолвлены.** -

- Вам необходимо пересинхронизировать модули. Для этого требуется - исполнить команду `flutter packages get` на каждом из проблемных - модулей. Для ускоренной синхронизации всех модулей вы можете - использовать скрипт. Из корневой директории проекта выполните - команду `./packages_get.sh`. Это пересинхронизирует все модули - стандарта по очереди. -

\ No newline at end of file diff --git a/docs/ru/faq/faq.md b/docs/ru/faq/faq.md deleted file mode 100644 index 1d512e2cb..000000000 --- a/docs/ru/faq/faq.md +++ /dev/null @@ -1,17 +0,0 @@ -[Главная](../main.md) - -# FAQ - -У вас проблемы? Тогда вам сюда. В этом разделе мы собираем ответы на -самые популярные вопросы и накапливаем коллективный опыт. - -FAQ будет работать только в том случае, если каждый из членов команды -будет оперативно дополнять его своим личным опытом. Решили проблему? -Придумали лучшую практику? Обязательно сделайте запись об этом в FAQ. - -## Оглавление -- [IDE](ide.md) - вопросы по средам разработки (Android Studio, VS -Code) -- [Ошибки](errors.md) - вопросы по ошибкам и ворнингам -- [Сборка](builds.md) - вопросы по сборке (ошибки и падения, типы сборок и конфигурации) -- [UI](ui.md) - вопросы по вёрстке и проблемам с UI diff --git a/docs/ru/faq/ide.md b/docs/ru/faq/ide.md deleted file mode 100644 index daffd3bdc..000000000 --- a/docs/ru/faq/ide.md +++ /dev/null @@ -1,13 +0,0 @@ -[Главная](../main.md) - -# FAQ по IDE - -Решаем проблемы со средами разработки. - -## Android Studio - -- **Кнопка "Run" неактивна, хотя проект успешно собирается из консоли.** -

- Скорее всего у вас не прописан путь к Flutter SDK в настройках \ - Flutter Plugin. `(File | Settings | Languages & Frameworks | Flutter)` -

\ No newline at end of file diff --git a/docs/ru/faq/ui.md b/docs/ru/faq/ui.md deleted file mode 100644 index c5cb5267d..000000000 --- a/docs/ru/faq/ui.md +++ /dev/null @@ -1,22 +0,0 @@ -[Главная](../main.md) - -# FAQ по UI - -Решаем проблемы с вёрсткой и UI. - -## Текстовые поля - -- **Контекстное меню текстового поля (copy/cut/paste) прозрачное.** - ![build_settings](../../img/faq/context_menu_transparent.jpg) -

- Единственный способ кастомизации цвета контекстного меню - поле - `canvasColor` в `ThemeData` приложения. Если контекстное меню имеет - какой-либо неожиданный цвет - это результат переопределения `canvasColor`. -

- Крайне не рекомендуется переопределять `canvasColor` в главной теме, - так как это может иметь и другие неожиданные сайд-эффекты. - Обратите внимание, что цвет тонированной прозрачной области над - Bottom Sheet также определяется через `canvasColor`, но имеется и альтернативная - возможность его настройки `showModalBottomSheet(backgroundColor: Colors.transparent)`. -

- diff --git a/docs/ru/main.md b/docs/ru/main.md deleted file mode 100644 index 52e83a794..000000000 --- a/docs/ru/main.md +++ /dev/null @@ -1,40 +0,0 @@ -# Стандарты разработки приложений в Surf - -[Правила ведения и оформления](rules.md) - -## Общая структура вики - -1. **Общие сведения о построении приложения** - 1. Требования к коду - 1. [Java Code Style][java_codestyle] - 1. [Koltin Code Style][kotlin_codestyle] - 1. [Dart Code Style](common/code_style.md) - 1. [Архитектура приложения](common/arch.md) - 1. [Инъекция зависимостей](common/di.md) - 1. [Логирование](common/logging.md) - 1. [Асинхронные взаимодействия](common/async.md) - 1. [Тестирование](common/testing.md) - -1. Слой [Model](model/model.md) - 1. [Interactor](model/interactor.md) - 2. [Работа с SharedPrefs](model/shared_preferences.md) - -2. Cлой UI - 1. [Структура UI-слоя](ui/structure.md) - 1. [WidgetModel](ui/widget_model.md) - 2. [Widget](ui/widget.md) - 2. [Навигация](common/navigation.md) - 3. [Создание экрана](ui/create_screen.md) - 4. [Диалоги](ui/dialog.md) - 5. [Сообщения](common/message.md) - -3. Лучшие практики - 1. [CI](https://github.com/surfstudio/jenkins-pipeline-lib) - 2. [Flutter Flavors](best_practice/flavors/flavors_for_devs.md) - 3. [Уменьшение размеров сборки](best_practice/reduce_app_size.md) - -4. [FAQ](faq/faq.md) - -[java_codestyle]:https://github.com/surfstudio/SurfAndroidStandard/blob/snapshot-0.4.0/docs/common/codestyle/java_codestyle.md - -[kotlin_codestyle]:https://github.com/surfstudio/SurfAndroidStandard/blob/snapshot-0.4.0/docs/common/codestyle/kotlin_codestyle.md \ No newline at end of file diff --git a/docs/ru/model/interactor.md b/docs/ru/model/interactor.md deleted file mode 100644 index cb9871db6..000000000 --- a/docs/ru/model/interactor.md +++ /dev/null @@ -1,138 +0,0 @@ -[Главная](../main.md) - -# Интерактор - -Интерактор — сущность, реализующая -логику некоторого бизнес процесса. Интерактор не зависит от платформы, в нем реализуется только логика use case, не затрагивая ui логику. -Интерактор не привязывается к какому-либо экрану. Один и тот же интерактор можно использовать в -нескольких экранах. - -Типичный пример использования: - -В приложении есть экран авторизации и экран заказов. -Необходимо проверять, залогинен ли пользователь на текущий момент. -Если да, то при открытии приложения переводить на экран заказов и показывать контент, который доступен только авторизованному пользователю. -Если нет, то оставаться на экране авторизации, но дать возможность просматривать заказы, которые доступны неавторизованному пользователю. - -Для решения этой задачи следует создать интерактор, который реализует логику проверки -авторизации пользователя — AuthInteractor. В этом интеракторе происходит получение локального токена через TokenRepository. -Далее интерактор совершает запрос на сервер через AuthRepository с проверкой на валидность текущего токена и возвращает результат. -Таким образом интерактор обьединяет в себе работу нескольких репозиториев и выполняет тот use case, который нужен в каком-то конкретном месте. - -Чтобы проверить, находится ли пользователь в системе на текущий момент, -AuthInteractor можно использовать как на экране авторизации, так и на экране отображения заказов. - -Интеракторы взаимодействуют с презентационным слоем только через сущность WidgetModel. - -Публичные методы API интерактора строится преимущественно на Rx. - -## Типовые сущности, принадлежащие слою Interactor - -Рассмотрим наиболее распространенные сущности, принадлежащие к этому слою. - -### 1. Репозиторий - -Говоря о репозиториях, следует вспомнить одноимённый шаблон проектирования “Репозиторий”. Суть его в том, чтобы создать некий слой -абстракции над какими-либо конкретными источниками данных, например, база данных или веб-сервис. Задача репозитория стать -промежуточным звеном между тем кто запрашивает данные и тем кто их отдает. -Важно понимать, что пользователи репозитория не должны знать о том, -как он устроен и откуда он берет эти данные. Это может быть сетевой запрос, -запрос в базу данных или же все вместе, так называемый гибридный запрос, -который подразумевает проведение конкатенации запросов на сервер и кэш по -некому установленному вами правилу. - -### 2. Storage - -Хранилище — это обертка над источником данных c единственной ответственностью. Например, необходимо сохранять данные пользователя на локальное устройство в двух разных форматах: xml и json. Правильным решением будет -реализовать низкоуровневое api для работы с файловой системой FileSystem и два хранилища JsonStorage и XmlStorage, которые будут использовать FileSystem для доступа к файловой системе, а логика сохранения -данных будет реализована непосредственно в этих классах. - -### 3. Mapper - -Класс, который преобразует данные из одного типа в другой. - -### 4. Интерактор инициализации - -Инициализация приложения чаще всего происходит на экране сплеша. -Под инициализацией понимается выполнение определенного набора правил, от -которых зависит дальнейшее поведение приложения. Например, миграции приложения -на новую версию или же получение и обновление токена, получение локации и тд. - -Принято выделять данную логику в отдельный интерактор. - -Интерфейс данного интерактора будет описан всего лишь одним методом - `initialize()`. - -### 5. Интерактор смены сессии пользователя - -Этот интерактор отвечает за действия, которые необходимо выполнить при -смене сессии или пользователя. Среди таких действий могут быть очистка -кэша, запрос на logout, кэширование токена и тд. - -## Рассылка событий через Interactor - -Еще один кейс использования интеракторов: построение событийной модели общения между частями приложения. -Например, некоторое действие на экране А должно вызывать обновление данных на экране Б. -Причем данное действие не является результатом экрана А. Тогда можно пробросить событие через общий интерактор у данных экранов. -Данный кейс показывает, что приоритетнее использовать именно интерактор для обновления данных, а не результат выполнения экрана. -Маршрут с параметрами следует использовать там, где очевиден возврат результата, например, некая форма, которая возвращает заполненные данные на предыдущий экран. -Реализовать проброс этого события можно через создания Subject'а внутри интерактора. - -Пример: -```dart -/// Интерактор сессии пользователя -class SessionChangedInteractor { - final AuthInfoStorage _ts; - - final PublishSubject sessionSubject = PublishSubject(); - - SessionChangedInteractor(this._ts); - - void onSessionChanged() { - sessionSubject.add(SessionState.LOGGED_IN); - } - - void forceLogout() { - sessionSubject.add(SessionState.LOGGED_OUT); - silentLogout(); - } - - void silentLogout() { - _ts.clearData(); - } -} - -enum SessionState { LOGGED_IN, LOGGED_OUT } -``` -Далее необходимо подключить SessionChangedInteractor в WidgetModel и подписаться на изменения -в sessionSubject: -```dart - -class FirstWidgetModel { - final SessionChangedInteractor _changeInteractor; - - Action sessionChangedAction = Action(); - - FirstWidgetModel(WidgetModelDependencies baseDependencies, - this._changeInteractor,) : super(baseDependencies); - - @override - void onLoad() { - bind(sessionChangedAction, (_) => _changeInteractor.onSessionChanged()); - super.onLoad(); - } -} - -class SecondWidgetModel { - final SessionChangedInteractor _changeInteractor; - - SecondWidgetModel(WidgetModelDependencies baseDependencies, - this._changeInteractor,) : super(baseDependencies); - - @override - void onLoad() { - subscribeHandleError(_changeInteractor.sessionSubject, (sessionState){ - print(sessionState.toString());}); - super.onLoad(); - } -} -``` \ No newline at end of file diff --git a/docs/ru/model/model.md b/docs/ru/model/model.md deleted file mode 100644 index b4f9e20e6..000000000 --- a/docs/ru/model/model.md +++ /dev/null @@ -1,16 +0,0 @@ -[Главная](../main.md) - -# Модель - -Модель — слой между [WidgetModel](../ui/widget_model.md) и бизнес-логикой, который абстрагирует -получателя данных (WidgetModel) от их поставщика (репозиторий, сервис, хранилище и т.п.). Модель -позволяет описать контракт взаимодействия между слоем презентации и сервисным слоем -и разрабатывать их независимо друг от друга. Состоит из двух основных частей: - -**Change** — посылаемый модели сигнал о том, что нужно выполнить какое-либо -действие: например, загрузить или отправить данные. - -**Performer** — класс, ответственный за обработку конкретного **Change**. Является -связующим звеном между WidgetModel, который запрашивает определённый набор данных, и источником этих данных. - -Сама модель просто передаёт входящий **Change** в **Performer**, который может его обработать. \ No newline at end of file diff --git a/docs/ru/model/shared_preferences.md b/docs/ru/model/shared_preferences.md deleted file mode 100644 index beebc1179..000000000 --- a/docs/ru/model/shared_preferences.md +++ /dev/null @@ -1,52 +0,0 @@ -[Главная](../main.md) - -# SharedPreferences - -SharedPreferences — постоянное хранилище на платформе Android и IOS, -используемое приложениями для хранения своих настроек, ключей, токенов и тд. -Данные хранятся в формате key-value. - -Для работы с SP используются плагин [shared_preferences][sp_link] и - студийный хелпер PreferencesHelper. - -# Пример использования - -```dart -class AuthInfoStorage { - static const KEY_TOKEN = "KEY_TOKEN"; - static const KEY_PIN = "KEY_PIN"; - - final PreferencesHelper _preferencesHelper; - String _token; - - AuthInfoStorage(this._preferencesHelper); - - Future getAccessToken() async { - _token = await _preferencesHelper - .get(KEY_TOKEN, EMPTY_STRING) - .then((s) => s as String); - return _token; - } - - Future getPin() async { - String pin = await _preferencesHelper - .get(KEY_PIN, EMPTY_STRING) - .then((s) => s as String); - return pin; - } - - Future saveToken(String token) async { - return await _preferencesHelper.set(KEY_TOKEN, token); - } - - Future savePin(String pin) async { - return await _preferencesHelper.set(KEY_PIN, pin); - } - - void clearData() { - _preferencesHelper.set(KEY_TOKEN, EMPTY_STRING); - _preferencesHelper.set(KEY_PIN, EMPTY_STRING); - } -} -``` -[sp_link]:https://pub.dev/packages/shared_preferences \ No newline at end of file diff --git a/docs/ru/repo_guides/gitflow.md b/docs/ru/repo_guides/gitflow.md deleted file mode 100644 index 734b04590..000000000 --- a/docs/ru/repo_guides/gitflow.md +++ /dev/null @@ -1,44 +0,0 @@ -[Главная](../main.md) - -# Gitflow в репозитории - -## Commits - -Все описания коммитов должны быть написаны на английском языке. Описание коммита должно отражать краткую суть изменений. - -Коммит должен содержать: - -- Исчерпывающую информацию об изменениях на **английском** - -- Ссылку на таск в Jira или Bitbucket в начале коммита - -- Перечисление deprecated-кода - -Пример: **"ANNDEP-23 add new LoadState. Deprecated: LoadStateUtil."** - -## Ветки - -- **stable** — основная ветка стабильных пакетов. Версионирование происходит посредством тегирования. - -- **dev** — ветка разработки. Все задачи или изменения первоначально сливаются именно в эту ветку. -Данная ветка сливается в **stable** без закрытия. - -- **project-*name*** (например, project-ACME) — ветки проектов. Содержат изменения, которые появляются в ходе конкретного проекта. - -- **task/feature** - остальные ветки под конкретные задачи. Ответвляются от **dev** и сливаются в нее же. -Имя ветки **обязательно** содержит в себе идентификатор задачи или метку **no-task**. - -## Изменения stable ветки - -Изменение stable ветки происходит через создание пулл реквеста. После слияния повышается версия, -для этого ставится тег (cм. [Semantic Versioning](https://semver.org)) - -## Версионирование проектных веток - -Проектные ветки необходимо тегировать при изменениях. Тег ставится автоматически при слиянии -пулл реквеста в проектную ветку. -Формат тега: -``` -project-*name*-i, где i - постоянно увеличивающееся на единицу число. -``` -После изменений в проектной ветке в pubspec самого проекта необходимо у всех подключённых модулей обновить тег. diff --git a/docs/ru/repo_guides/sync.md b/docs/ru/repo_guides/sync.md deleted file mode 100644 index 91ba4a98d..000000000 --- a/docs/ru/repo_guides/sync.md +++ /dev/null @@ -1,11 +0,0 @@ -[Главная](../main.md) - -# Синхронизация модулей - -Для автоматической синхронизации всех модулей проекта предусмотрен -специальный скрипт. Он исполняет команду `flutter packages get` на -каждом из модулей проекта. - -Для запуска скрипта из корневой директории проекта выполните команду -`./packages_get.sh`. Это пересинхронизирует все модули стандарта по -очереди. \ No newline at end of file diff --git a/docs/ru/rules.md b/docs/ru/rules.md deleted file mode 100644 index ea4beeeca..000000000 --- a/docs/ru/rules.md +++ /dev/null @@ -1,17 +0,0 @@ -[Главная](main.md) - -# Правила оформления и ведения документации - -Документы создаются в формате Markdown. - -## Структура - -Существуют две категории документов: - -- Документы общего дерева — общая информация о подходах и практиках. -Лежат в корневой директории docs, содержат ссылки на модули. - -- Документы конкретных модулей — описание модуля и примеры использования. -Лежат в директории docs у каждого модуля, могут ссылаться на статьи из основного дерева. - -Общая разводная содержится в [main](main.md). \ No newline at end of file diff --git a/docs/ru/tech_doc.md b/docs/ru/tech_doc.md deleted file mode 100644 index d88760932..000000000 --- a/docs/ru/tech_doc.md +++ /dev/null @@ -1,26 +0,0 @@ -# Техническое описнание шаблона для проектов на Flutter - - - -## Используемый стек - -* rxDart -* http -* shared_prefs - - -# Создание экрана - -Пакет конкретного экрана соддержит: -- *name*_screen.dart -- *name*_wm.dart -- *name*_route.dart - -Классы и виджеты для экранов дополнительно оборачиваются в один из подклассов -PageRoute<>. -Это необходимо для задания анимации. - -Таким образом структура файла с экраном: - - Widget(Stateless/Stateful) - - WidgetState в случае если стейтфул - diff --git a/docs/ru/ui/create_screen.md b/docs/ru/ui/create_screen.md deleted file mode 100644 index 0c9aae428..000000000 --- a/docs/ru/ui/create_screen.md +++ /dev/null @@ -1,15 +0,0 @@ -[Главная](../main.md) - -# Чек-лист создания экрана/виджета - -1. Создаём `WidgetModel`, описываем в параметрах конструктора её зависимости. - -1. Создаём `Component`, в котором находим необходимые зависимости. - -1. Пишем `функцию-билдер`, которая возвращает WidgetModel. Внутри билдера с помощью Injector находим Component и передаём все зависимости в конструктор WidgetModel. - -1. Создаём `MwwmWidget`, в super передаём билдер Component, билдер WidgetModel и билдер WidgetState. - -1. Создаём `WidgetState`. - -Теперь в WidgetState можно описывать пользовательский интерфейс, а в WidgetModel — логику и набор StreamedState для хранения данных и Action для обработки событий пользовательского ввода. \ No newline at end of file diff --git a/docs/ru/ui/dialog.md b/docs/ru/ui/dialog.md deleted file mode 100644 index 642aec166..000000000 --- a/docs/ru/ui/dialog.md +++ /dev/null @@ -1,97 +0,0 @@ -[Главная](../main.md) - -# Диалоги - -Для отображения диалогов существует два вида [контроллеров](../../../template/lib/ui/base/default_dialog_controller.dart): - -* `DefaultDialogController` для всплывающих диалогов и шторок (bottom sheet) -* `DatePickerDialogController` для выбора даты - -С помощью showAlertDialog() у DefaultDialogController можно отобразить всплывающий диалог, внешний вид которого автоматически подстроится под платформу. Если же необходимо переопределить пользовательский интерфейс диалога, то для этого нужно воспользоваться DialogOwner. - -## DialogOwner - -Работа с диалогами строится вокруг миксина [DialogOwner](../../../template/lib/ui/base/owners/dialog_owner.dart). Чтобы описать необходимые диалоги, нужно создать класс, в котором переопределяется геттер *registeredDialogs* этого миксина. Геттер возвращает Map, где значения — билдеры, которые возвращают виджеты диалогов. В WidgetModel нужный диалог находится по ключу этой Map. - -Применение: - -1. Для нужного экрана необходимо создать свой DialogOwner: - -```dart -// Ключи для registeredDialogs, по ним будем находить -// нужные диалоги в WidgetModel. -enum OnboardingDialog { - requestPermission, - openSystemSettings, -} - -// Класс, содержащий данные для диалога. -// Объект этого класса передаётся в качестве аргумента при вызове -// диалога из WidgetModel. -class OnboardingDialogData implements DialogData { - final Function(BuildContext) onButtonPressed; - - OnboardingDialogData({ - this.onButtonPressed, - }); -} - -// Набор диалогов -class OnboardingDialogOwner with DialogOwner { - @override - Map get registeredDialogs => { - OnboardingDialog.requestPermissionAgain: - DialogBuilder(_buildRequestPermissionDialog), - OnboardingDialog.openSystemSettings: - DialogBuilder(_buildOpenSettingsDialog), - }; -} - -Widget _buildRequestPermissionDialog( - BuildContext context, { - OnboardingDialogData data, -}) { - return FooBottomSheet( - // … - ); -} - -Widget _buildOpenSettingsDialog( - BuildContext context, { - OnboardingDialogData data, -}) { - return BarBottomSheet( - // … - ); -} - -``` -2. В Component экрана объявить контроллер диалогов и в его конструктор передать созданный DialogOwner: - -```dart -class OnboardingScreenComponent implements Component { - final scaffoldKey = GlobalKey(); - - DefaultDialogController dialogController; - - OnboardingScreenComponent(BuildContext context) { - dialogController = DefaultDialogController( - scaffoldKey, - dialogOwner: OnboardingDialogOwner(), - ); - } -} -``` -3. В WidgetModel, используя контроллер диалогов из компонента, вызвать нужный диалог и передать ему необходимые данные: -```dart - _dialogController.showModalSheet( - OnboardingDialog.openSystemSettings, - isScrollControlled: true, - data: OnboardingDialogData( - onButtonPressed: (context) { - w.Navigator.pop(context); - _permissionInteractor.openSettings(); - }, - ), - ); -``` \ No newline at end of file diff --git a/docs/ru/ui/flexible_bottom_sheet.md b/docs/ru/ui/flexible_bottom_sheet.md deleted file mode 100644 index 8a13584d9..000000000 --- a/docs/ru/ui/flexible_bottom_sheet.md +++ /dev/null @@ -1,32 +0,0 @@ -# FlexibleBottomSheet - -[Main](../main.md) - -This BottomSheet widget has next behaviour: - -1. It has a size limits on top and bottom, that can be set as absolute value or part of parent -container. -2. If it has list child, first it resize up and when top limit has been reached it start scrolling -list content. -3. Use building function for changing view. -4. Can be imperatively called by showFlexibleBottomSheet(), or use for show it special controller. - -During development, various options for implementation approaches were tried. - -- To control the scroll controller through the GestureDetector. As a result, we got many problems -with switching behavior to scroll and back. -Also scrolling gesture was captured by GestureDetector instead transmit to Scrollable. -- Use Scrollable with set them setCanDrag off or setIgnorePointer. Not worked - -errors of replaceSemanticsActions when building layout. -- Use ViewPort in widget and build them, this option work partially correct, but we lost any physic -and troubles with scroll view in content. -- IgnorePointer with a GestureDetector, troubles like a first option. -- Gesture event generation also not possible. Renders bound with BindingBase, that get events from -engine, so we can't interact with this level. - -As a result, we received implementation of DraggableScrollableSheet. -https://api.flutter.dev/flutter/widgets/DraggableScrollableSheet-class.html - -During the search for a solution, the principle of operation ScrollableView was studied in detail and we -have built a schema. -https://drive.google.com/file/d/1i2s49pMOJNh-ZAhkNwMYgRoONX1jjx_y/view?usp=sharing \ No newline at end of file diff --git a/docs/ru/ui/structure.md b/docs/ru/ui/structure.md deleted file mode 100644 index f3a9f5fc0..000000000 --- a/docs/ru/ui/structure.md +++ /dev/null @@ -1,11 +0,0 @@ -[Главная](../main.md) - -# Структура UI - -В презентационном слое в студийных проектах используются две основные сущности: - -1. [Widget](widget.md) — описание пользовательского интерфейса - -1. [WidgetModel](widget_model.md) — реализация логики - -Каждый экран или виджет, который самостоятельно получает данные из сети или локального хранилища, обязательно содержит оба компонента. Если же экран или виджет достаточно простой, и все необходимые даннные можно получить через конструктор, то WidgetModel необязателен. \ No newline at end of file diff --git a/docs/ru/ui/widget.md b/docs/ru/ui/widget.md deleted file mode 100644 index 3e0ff0300..000000000 --- a/docs/ru/ui/widget.md +++ /dev/null @@ -1,38 +0,0 @@ -[Главная](../main.md) - -[Структура UI](structure.md) - -# Widget - -Для взаимодействия с WidgetModel используется [MwwmWidget](../../packages/mwwm/lib/src/mwwm_widget.dart) — наследник StatefulWidget, умеющий управлять жизненным циклом WidgetModel. Для его инициализации необходимы следующие компоненты: - -1. *widgetStateBuilder* — возвращает WidgetState для конструируемого виджета. Аналог createState() в StatefulWidget. - -1. *dependenciesBuilder* — возвращает реализацию интерфейса [Component](../../../packages/surf_injector/lib/src/component.dart). Содержит только зависимости для WidgetModel, которые либо получает через конструктор, либо находит с помощью [Injector](../../../packages/surf_injector/lib/src/injector.dart) из контекста. - -1. *widgetModelBuilder* — возвращает WidgetModel. Для возможности подмены WidgetModel во время тестирования можно объявить этот билдер необязательным параметром в конструкторе виджета. - -Пример: -```dart -SplashScreenWidgetModel createSplashScreenWidgetModel(BuildContext context) { - var component = Injector.of(context).component; - - return SplashScreenWidgetModel( - component.wmDependencies, - component.navigator, - component.debugScreenInteractor, - ); -} - -class SplashScreen extends MwwmWidget { - SplashScreen([ - WidgetModelBuilder widgetModelBuilder = createSplashScreenWidgetModel, - ]) : super( - dependenciesBuilder: (context) => SplashScreenComponent(context), - widgetStateBuilder: () => _SplashScreenState(), - widgetModelBuilder: widgetModelBuilder, - ); -} - -class _SplashScreenState extends WidgetState {…} -``` \ No newline at end of file diff --git a/docs/ru/ui/widget_model.md b/docs/ru/ui/widget_model.md deleted file mode 100644 index 1c91f2add..000000000 --- a/docs/ru/ui/widget_model.md +++ /dev/null @@ -1,26 +0,0 @@ -[Главная](../main.md) - -[Структура UI](structure.md) - -# WidgetModel - -Данная сущность представляет собой ViewModel из MVVM. -В этой сущности описывается логика работы конкретного экрана. -Также можно провести аналогию с BLoC, но только в плане механизма взаимодействия. - -Работа с View (Widget) производится через поток. WM ничего не знает про -конкретный виджет, который ее использует. - -Основные компоненты WidgetModel — `Event'ы`: - - Action — потоковое представление действия, например, клик на кнопку или изменение фокуса. - - StreamedState — потоковое представление того или иного свойства, например, счетчик товаров или состояние enable у кнопки. - - EntityStreamedState - наследник StreamedState, который дополнительно имеет состояния загрузки и ошибки. - - дополнительная логика, которая связывает Action и State. - -WM является промежуточным звеном между Model (в любом ее варианте) и Widget. - -Зависимости из Model поставляются в WM также через конструктор. -В наших проектах для обеспечения DI используется [Injector](../../../packages/surf_injector/lib/src/surf_injector.dart). -Зависимости для WidgetModel конфигурируются в компоненте экрана. -Для этого используется объект [WidgetModelDependencies](../../../packages/mwwm/lib/src/dependencies/wm_dependencies.dart). Он содержит ErrorHandler — объект, отвечающий за обработку ошибок для реактивных потоков. -Без конфигурации WidgetModelDependencies обработка ошибок не будут работать в WidgetModel. diff --git a/examples/animations/.gitignore b/examples/animations/.gitignore deleted file mode 100644 index 0fa6b675c..000000000 --- a/examples/animations/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release diff --git a/examples/animations/.metadata b/examples/animations/.metadata deleted file mode 100644 index 601802740..000000000 --- a/examples/animations/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 4d7946a68d26794349189cf21b3f68cc6fe61dcb - channel: unknown - -project_type: app diff --git a/examples/animations/analysis_options.yaml b/examples/animations/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/examples/animations/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/examples/animations/android/.gitignore b/examples/animations/android/.gitignore deleted file mode 100644 index 0a741cb43..000000000 --- a/examples/animations/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/examples/animations/android/app/build.gradle b/examples/animations/android/app/build.gradle deleted file mode 100644 index a314fd527..000000000 --- a/examples/animations/android/app/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 30 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.animations" - minSdkVersion 16 - targetSdkVersion 30 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/examples/animations/android/app/src/debug/AndroidManifest.xml b/examples/animations/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 2add785c7..000000000 --- a/examples/animations/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/animations/android/app/src/main/AndroidManifest.xml b/examples/animations/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 7597a639d..000000000 --- a/examples/animations/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/examples/animations/android/app/src/main/kotlin/com/example/animations/MainActivity.kt b/examples/animations/android/app/src/main/kotlin/com/example/animations/MainActivity.kt deleted file mode 100644 index 1a229a798..000000000 --- a/examples/animations/android/app/src/main/kotlin/com/example/animations/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.animations - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/examples/animations/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/animations/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3f..000000000 --- a/examples/animations/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/animations/android/app/src/main/res/drawable/launch_background.xml b/examples/animations/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/examples/animations/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/animations/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/animations/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/examples/animations/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/animations/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/animations/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/examples/animations/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/animations/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/animations/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/examples/animations/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/animations/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/animations/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/examples/animations/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/animations/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/animations/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/examples/animations/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/animations/android/app/src/main/res/values-night/styles.xml b/examples/animations/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 449a9f930..000000000 --- a/examples/animations/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/animations/android/app/src/main/res/values/styles.xml b/examples/animations/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d74aa35c2..000000000 --- a/examples/animations/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/animations/android/app/src/profile/AndroidManifest.xml b/examples/animations/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 2add785c7..000000000 --- a/examples/animations/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/animations/android/build.gradle b/examples/animations/android/build.gradle deleted file mode 100644 index c505a8635..000000000 --- a/examples/animations/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/examples/animations/android/gradle.properties b/examples/animations/android/gradle.properties deleted file mode 100644 index 94adc3a3f..000000000 --- a/examples/animations/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/examples/animations/android/gradle/wrapper/gradle-wrapper.properties b/examples/animations/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bc6a58afd..000000000 --- a/examples/animations/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/examples/animations/android/settings.gradle b/examples/animations/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/examples/animations/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/examples/animations/ios/.gitignore b/examples/animations/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/examples/animations/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/animations/ios/Flutter/AppFrameworkInfo.plist b/examples/animations/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 9367d483e..000000000 --- a/examples/animations/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/examples/animations/ios/Flutter/Debug.xcconfig b/examples/animations/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/examples/animations/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/animations/ios/Flutter/Release.xcconfig b/examples/animations/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/examples/animations/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/animations/ios/Runner.xcodeproj/project.pbxproj b/examples/animations/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index f4c111315..000000000 --- a/examples/animations/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,471 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.animations; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.animations; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.animations; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/animations/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/animations/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/examples/animations/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/animations/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/animations/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/animations/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/animations/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/animations/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/animations/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/animations/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/animations/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/examples/animations/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/animations/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/animations/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/examples/animations/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/animations/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/animations/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/animations/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/animations/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/animations/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/animations/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/animations/ios/Runner/AppDelegate.swift b/examples/animations/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/examples/animations/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/examples/animations/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/examples/animations/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/animations/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/examples/animations/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/animations/ios/Runner/Base.lproj/Main.storyboard b/examples/animations/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/examples/animations/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/animations/ios/Runner/Info.plist b/examples/animations/ios/Runner/Info.plist deleted file mode 100644 index ddcf64599..000000000 --- a/examples/animations/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - animations - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/examples/animations/ios/Runner/Runner-Bridging-Header.h b/examples/animations/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/examples/animations/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/animations/lib/main.dart b/examples/animations/lib/main.dart deleted file mode 100644 index 7e5957109..000000000 --- a/examples/animations/lib/main.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:animations/ui/screen/home/home_screen.dart'; -import 'package:flutter/material.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Ticker provider example', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: const HomeScreen(), - ); - } -} diff --git a/examples/animations/lib/ui/screen/home/home_screen.dart b/examples/animations/lib/ui/screen/home/home_screen.dart deleted file mode 100644 index 0040cde26..000000000 --- a/examples/animations/lib/ui/screen/home/home_screen.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:animations/ui/screen/home/home_screen_wm.dart'; -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; - -class HomeScreen extends CoreMwwmWidget { - const HomeScreen({ - Key? key, - }) : super( - key: key, - widgetModelBuilder: createHomeScreenWm, - ); - - @override - State createState() => _HomeScreenState(); -} - -class _HomeScreenState extends WidgetState { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Ticker provider example'), - ), - body: Center( - child: AnimatedBuilder( - animation: wm.animationController, - builder: (context, child) => Transform.rotate( - angle: wm.animation.value, - child: const FlutterLogo(size: 300), - ), - ), - ), - floatingActionButton: StreamBuilder( - stream: wm.status, - builder: (context, snapshot) { - return FloatingActionButton( - onPressed: () { - wm.shouldPlayAnimation ? wm.startAnimation() : wm.stopAnimation(); - }, - child: Icon( - wm.shouldPlayAnimation ? Icons.play_arrow : Icons.stop, - ), - ); - }, - ), - ); - } -} diff --git a/examples/animations/lib/ui/screen/home/home_screen_wm.dart b/examples/animations/lib/ui/screen/home/home_screen_wm.dart deleted file mode 100644 index af0eef371..000000000 --- a/examples/animations/lib/ui/screen/home/home_screen_wm.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'dart:async'; -import 'dart:math' as math; - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; - -class HomeScreenWidgetModel extends WidgetModel - with TickerProviderWidgetModelMixin { - HomeScreenWidgetModel( - WidgetModelDependencies baseDependencies, - ) : super(baseDependencies); - - late AnimationController animationController; - late Animation animation; - - final _statusController = StreamController(); - - Stream get status => _statusController.stream; - - void startAnimation() => animationController.repeat(); - - void stopAnimation() => animationController.reset(); - - bool get shouldPlayAnimation => - animationController.status == AnimationStatus.completed || - animationController.status == AnimationStatus.dismissed; - - @override - void onLoad() { - animationController = AnimationController( - vsync: this, - duration: const Duration(seconds: 5), - ); - - animation = Tween(begin: 0.0, end: 2 * math.pi).animate( - animationController, - ); - - animationController.addStatusListener(_statusController.add); - super.onLoad(); - } - - @override - void dispose() { - _statusController.close(); - animationController.dispose(); - super.dispose(); - } -} - -HomeScreenWidgetModel createHomeScreenWm(BuildContext context) => - HomeScreenWidgetModel( - const WidgetModelDependencies(), - ); diff --git a/examples/animations/pubspec.yaml b/examples/animations/pubspec.yaml deleted file mode 100644 index 0fb5a6ea1..000000000 --- a/examples/animations/pubspec.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: animations -description: A new Flutter project. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - mwwm: - path: ../../packages/mwwm/ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/examples/animations/web/favicon.png b/examples/animations/web/favicon.png deleted file mode 100644 index 8aaa46ac1..000000000 Binary files a/examples/animations/web/favicon.png and /dev/null differ diff --git a/examples/animations/web/icons/Icon-192.png b/examples/animations/web/icons/Icon-192.png deleted file mode 100644 index b749bfef0..000000000 Binary files a/examples/animations/web/icons/Icon-192.png and /dev/null differ diff --git a/examples/animations/web/icons/Icon-512.png b/examples/animations/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48df..000000000 Binary files a/examples/animations/web/icons/Icon-512.png and /dev/null differ diff --git a/examples/animations/web/index.html b/examples/animations/web/index.html deleted file mode 100644 index c1de79a1f..000000000 --- a/examples/animations/web/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - animations - - - - - - - - diff --git a/examples/animations/web/manifest.json b/examples/animations/web/manifest.json deleted file mode 100644 index 4120a00a1..000000000 --- a/examples/animations/web/manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "animations", - "short_name": "animations", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} diff --git a/examples/cat_facts/.gitignore b/examples/cat_facts/.gitignore deleted file mode 100644 index 0fa6b675c..000000000 --- a/examples/cat_facts/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release diff --git a/examples/cat_facts/.metadata b/examples/cat_facts/.metadata deleted file mode 100644 index 601802740..000000000 --- a/examples/cat_facts/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 4d7946a68d26794349189cf21b3f68cc6fe61dcb - channel: unknown - -project_type: app diff --git a/examples/cat_facts/README.md b/examples/cat_facts/README.md deleted file mode 100644 index 88d253e39..000000000 --- a/examples/cat_facts/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Cat facts - -## Goldens - -To regenerate goldens to capture your new reference images use command: - -```bash -flutter test --update-goldens -``` - -## Localization - -First of you need to global activate intl_generator, use command: - -```bash -flutter pub global activate intl_generator -``` - -To generate arb files use command: - -```bash -flutter pub global run intl_generator:extract_to_arb --output-dir=lib/l10n lib/localizations.dart -``` - -To generate dart files from arb use command: - -```bash -flutter pub global run intl_generator:generate_from_arb lib/localizations.dart lib/l10n/*.arb --output-dir=lib/l10n -``` diff --git a/examples/cat_facts/analysis_options.yaml b/examples/cat_facts/analysis_options.yaml deleted file mode 100644 index 1f5a51e84..000000000 --- a/examples/cat_facts/analysis_options.yaml +++ /dev/null @@ -1,5 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml - -analyzer: - exclude: - - "lib/l10n/**" diff --git a/examples/cat_facts/android/.gitignore b/examples/cat_facts/android/.gitignore deleted file mode 100644 index 0a741cb43..000000000 --- a/examples/cat_facts/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/examples/cat_facts/android/app/build.gradle b/examples/cat_facts/android/app/build.gradle deleted file mode 100644 index c5008ac84..000000000 --- a/examples/cat_facts/android/app/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 30 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.cat_facts" - minSdkVersion 16 - targetSdkVersion 30 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/examples/cat_facts/android/app/src/debug/AndroidManifest.xml b/examples/cat_facts/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index bf6f150fe..000000000 --- a/examples/cat_facts/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/cat_facts/android/app/src/main/AndroidManifest.xml b/examples/cat_facts/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 543dee083..000000000 --- a/examples/cat_facts/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/examples/cat_facts/android/app/src/main/kotlin/com/example/cat_facts/MainActivity.kt b/examples/cat_facts/android/app/src/main/kotlin/com/example/cat_facts/MainActivity.kt deleted file mode 100644 index 6e0f072cb..000000000 --- a/examples/cat_facts/android/app/src/main/kotlin/com/example/cat_facts/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.cat_facts - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/examples/cat_facts/android/app/src/main/res/drawable-ru-v21/launch_background.xml b/examples/cat_facts/android/app/src/main/res/drawable-ru-v21/launch_background.xml deleted file mode 100644 index 0271380cc..000000000 --- a/examples/cat_facts/android/app/src/main/res/drawable-ru-v21/launch_background.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/examples/cat_facts/android/app/src/main/res/drawable-ru/launch_background.xml b/examples/cat_facts/android/app/src/main/res/drawable-ru/launch_background.xml deleted file mode 100644 index 0271380cc..000000000 --- a/examples/cat_facts/android/app/src/main/res/drawable-ru/launch_background.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/examples/cat_facts/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/cat_facts/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index 735f32a2e..000000000 --- a/examples/cat_facts/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/examples/cat_facts/android/app/src/main/res/drawable/launch_background.xml b/examples/cat_facts/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 735f32a2e..000000000 --- a/examples/cat_facts/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 6dbd3d85c..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ja-hdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-ja-hdpi/ic_launcher.png deleted file mode 100644 index a244c9cbd..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ja-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ja-mdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-ja-mdpi/ic_launcher.png deleted file mode 100644 index 7d8430443..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ja-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ja-xhdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-ja-xhdpi/ic_launcher.png deleted file mode 100644 index f1924db8e..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ja-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ja-xxhdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-ja-xxhdpi/ic_launcher.png deleted file mode 100644 index f544c635f..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ja-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ja-xxxhdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-ja-xxxhdpi/ic_launcher.png deleted file mode 100644 index be1ed332b..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ja-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ja-xxxhdpi/launch_image.png b/examples/cat_facts/android/app/src/main/res/mipmap-ja-xxxhdpi/launch_image.png deleted file mode 100644 index eefa88dfc..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ja-xxxhdpi/launch_image.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index b58b961ea..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ru-hdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-ru-hdpi/ic_launcher.png deleted file mode 100644 index cf52fe5b0..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ru-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ru-mdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-ru-mdpi/ic_launcher.png deleted file mode 100644 index 2b9f9e02e..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ru-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ru-xhdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-ru-xhdpi/ic_launcher.png deleted file mode 100644 index 964da194f..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ru-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ru-xxhdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-ru-xxhdpi/ic_launcher.png deleted file mode 100644 index b91c760c8..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ru-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-ru-xxxhdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-ru-xxxhdpi/ic_launcher.png deleted file mode 100644 index e82cadf19..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-ru-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 63f13da03..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 69bcd8c9d..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/cat_facts/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 9f2f906d2..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/mipmap-xxxhdpi/launch_image.png b/examples/cat_facts/android/app/src/main/res/mipmap-xxxhdpi/launch_image.png deleted file mode 100644 index bef994127..000000000 Binary files a/examples/cat_facts/android/app/src/main/res/mipmap-xxxhdpi/launch_image.png and /dev/null differ diff --git a/examples/cat_facts/android/app/src/main/res/values-ja/strings.xml b/examples/cat_facts/android/app/src/main/res/values-ja/strings.xml deleted file mode 100644 index c87dc6302..000000000 --- a/examples/cat_facts/android/app/src/main/res/values-ja/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - 猫の事実 - \ No newline at end of file diff --git a/examples/cat_facts/android/app/src/main/res/values-night/styles.xml b/examples/cat_facts/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 449a9f930..000000000 --- a/examples/cat_facts/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/cat_facts/android/app/src/main/res/values-ru/strings.xml b/examples/cat_facts/android/app/src/main/res/values-ru/strings.xml deleted file mode 100644 index db2e388bf..000000000 --- a/examples/cat_facts/android/app/src/main/res/values-ru/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - О котах - \ No newline at end of file diff --git a/examples/cat_facts/android/app/src/main/res/values/strings.xml b/examples/cat_facts/android/app/src/main/res/values/strings.xml deleted file mode 100644 index f1cd3ba93..000000000 --- a/examples/cat_facts/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Cat Facts - \ No newline at end of file diff --git a/examples/cat_facts/android/app/src/main/res/values/styles.xml b/examples/cat_facts/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d74aa35c2..000000000 --- a/examples/cat_facts/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/cat_facts/android/app/src/profile/AndroidManifest.xml b/examples/cat_facts/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index bf6f150fe..000000000 --- a/examples/cat_facts/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/cat_facts/android/build.gradle b/examples/cat_facts/android/build.gradle deleted file mode 100644 index c505a8635..000000000 --- a/examples/cat_facts/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/examples/cat_facts/android/gradle.properties b/examples/cat_facts/android/gradle.properties deleted file mode 100644 index 94adc3a3f..000000000 --- a/examples/cat_facts/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/examples/cat_facts/android/gradle/wrapper/gradle-wrapper.properties b/examples/cat_facts/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bc6a58afd..000000000 --- a/examples/cat_facts/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/examples/cat_facts/android/settings.gradle b/examples/cat_facts/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/examples/cat_facts/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/examples/cat_facts/arb/intl_messages.arb b/examples/cat_facts/arb/intl_messages.arb deleted file mode 100644 index 28304e431..000000000 --- a/examples/cat_facts/arb/intl_messages.arb +++ /dev/null @@ -1,11 +0,0 @@ -{ - "@@last_modified": "2021-07-19T12:23:18.569664", - "FactListTileI18n_title": "{number,plural, other{Fact {number}}}", - "@FactListTileI18n_title": { - "description": "Fact list title", - "type": "text", - "placeholders": { - "number": {} - } - } -} \ No newline at end of file diff --git a/examples/cat_facts/integration_test/switch_theme_test.dart b/examples/cat_facts/integration_test/switch_theme_test.dart deleted file mode 100644 index 617b0ab92..000000000 --- a/examples/cat_facts/integration_test/switch_theme_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:cat_facts/main.dart' as app; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - testWidgets('Cat facts app switch theme end-to-end test', (tester) async { - app.main(); - - await tester.pumpAndSettle(); - - final switchButtonFinder = find.byKey(const Key('theme_switcher')); - - expect(find.text('Switch Off'), findsOneWidget); - - // Emulate a tap on the floating action button. - await tester.tap(switchButtonFinder); - - await tester.pumpAndSettle(); - - expect(find.text('Switch On'), findsOneWidget); - - // Emulate a tap on the floating action button. - await tester.tap(switchButtonFinder); - - await tester.pumpAndSettle(); - - expect(find.text('Switch Off'), findsOneWidget); - }); -} diff --git a/examples/cat_facts/ios/.gitignore b/examples/cat_facts/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/examples/cat_facts/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/cat_facts/ios/Flutter/AppFrameworkInfo.plist b/examples/cat_facts/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 9367d483e..000000000 --- a/examples/cat_facts/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/examples/cat_facts/ios/Flutter/Debug.xcconfig b/examples/cat_facts/ios/Flutter/Debug.xcconfig deleted file mode 100644 index ec97fc6f3..000000000 --- a/examples/cat_facts/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/examples/cat_facts/ios/Flutter/Release.xcconfig b/examples/cat_facts/ios/Flutter/Release.xcconfig deleted file mode 100644 index c4855bfe2..000000000 --- a/examples/cat_facts/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/examples/cat_facts/ios/Podfile b/examples/cat_facts/ios/Podfile deleted file mode 100644 index 1e8c3c90a..000000000 --- a/examples/cat_facts/ios/Podfile +++ /dev/null @@ -1,41 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/examples/cat_facts/ios/Runner.xcodeproj/project.pbxproj b/examples/cat_facts/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 5bcd072da..000000000 --- a/examples/cat_facts/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,589 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - ADFF101C523A97A275B9FC75 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3678136E70B459D0417D21F5 /* Pods_Runner.framework */; }; - C72D3397269DE67E008CC7B1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C72D3395269DE67E008CC7B1 /* Localizable.strings */; }; - C72D339F269EDEEF008CC7B1 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C72D339D269EDEEF008CC7B1 /* InfoPlist.strings */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 19B9FC30D33BF3D5897F88EB /* 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 = ""; }; - 3678136E70B459D0417D21F5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9C90864AF4D5582569DFA42E /* 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 = ""; }; - C72D338B269DE1C1008CC7B1 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Main.strings; sourceTree = ""; }; - C72D338D269DE1F7008CC7B1 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; - C72D3396269DE67E008CC7B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; - C72D3398269DE69D008CC7B1 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; - C72D3399269DE6A4008CC7B1 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; - C72D339E269EDEEF008CC7B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/InfoPlist.strings; sourceTree = ""; }; - C72D33A0269EE122008CC7B1 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = ""; }; - C72D33A1269F2648008CC7B1 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/InfoPlist.strings; sourceTree = ""; }; - E58351F1DB89B39D24BD14D6 /* 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ADFF101C523A97A275B9FC75 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2F5E331576A7F4BD1CDA8D6E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 3678136E70B459D0417D21F5 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - F5E7E90839BA5F65781989C6 /* Pods */, - 2F5E331576A7F4BD1CDA8D6E /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - C72D3395269DE67E008CC7B1 /* Localizable.strings */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - C72D339D269EDEEF008CC7B1 /* InfoPlist.strings */, - ); - path = Runner; - sourceTree = ""; - }; - F5E7E90839BA5F65781989C6 /* Pods */ = { - isa = PBXGroup; - children = ( - E58351F1DB89B39D24BD14D6 /* Pods-Runner.debug.xcconfig */, - 9C90864AF4D5582569DFA42E /* Pods-Runner.release.xcconfig */, - 19B9FC30D33BF3D5897F88EB /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 8432830A76D6919F6EB2C413 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - B250159F3D9581CAB149D482 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ru, - ja, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C72D3397269DE67E008CC7B1 /* Localizable.strings in Resources */, - C72D339F269EDEEF008CC7B1 /* InfoPlist.strings in Resources */, - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 8432830A76D6919F6EB2C413 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "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"; - showEnvVarsInLog = 0; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - B250159F3D9581CAB149D482 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - C72D338B269DE1C1008CC7B1 /* ru */, - C72D338D269DE1F7008CC7B1 /* ja */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; - C72D3395269DE67E008CC7B1 /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - C72D3396269DE67E008CC7B1 /* Base */, - C72D3398269DE69D008CC7B1 /* ja */, - C72D3399269DE6A4008CC7B1 /* ru */, - ); - name = Localizable.strings; - sourceTree = ""; - }; - C72D339D269EDEEF008CC7B1 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - C72D339E269EDEEF008CC7B1 /* Base */, - C72D33A0269EE122008CC7B1 /* ru */, - C72D33A1269F2648008CC7B1 /* ja */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.catFacts; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.catFacts; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.catFacts; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/cat_facts/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/cat_facts/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/examples/cat_facts/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/cat_facts/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/cat_facts/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/cat_facts/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/cat_facts/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/cat_facts/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/cat_facts/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/cat_facts/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/cat_facts/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/examples/cat_facts/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/cat_facts/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/cat_facts/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14c..000000000 --- a/examples/cat_facts/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/cat_facts/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/cat_facts/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/cat_facts/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/cat_facts/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/cat_facts/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/cat_facts/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/cat_facts/ios/Runner/AppDelegate.swift b/examples/cat_facts/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/examples/cat_facts/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png deleted file mode 100644 index 3fcb0e5c6..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png deleted file mode 100644 index 8aa6bc560..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png deleted file mode 100644 index a1e78357f..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png deleted file mode 100644 index b28b1823f..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png deleted file mode 100644 index 33c85a3b2..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png deleted file mode 100644 index b9d88c4ee..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png deleted file mode 100644 index ddb9d2fc3..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png deleted file mode 100644 index 50b2f22c2..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png deleted file mode 100644 index 5449ede49..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png deleted file mode 100644 index 0d049ec06..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png deleted file mode 100644 index 0c1cc87be..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png deleted file mode 100644 index 3417363dc..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png deleted file mode 100644 index b3893dd2c..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png deleted file mode 100644 index 01be34f70..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png deleted file mode 100644 index 6480d302d..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png deleted file mode 100644 index 8e7da1f67..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png deleted file mode 100644 index 1bab51c8a..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png deleted file mode 100644 index f70d7c311..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png deleted file mode 100644 index 4aeb291c8..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 65b74d7ef..000000000 --- a/examples/cat_facts/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1 +0,0 @@ -{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]} \ No newline at end of file diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/Contents.json b/examples/cat_facts/ios/Runner/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a..000000000 --- a/examples/cat_facts/ios/Runner/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 8a115d61a..000000000 --- a/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "images" : [ - { - "filename" : "launch_image@1.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "launch_image@2.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "launch_image@3.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "localizable" : true - } -} diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/launch_image@1.png b/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/launch_image@1.png deleted file mode 100644 index bef994127..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/launch_image@1.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/launch_image@2.png b/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/launch_image@2.png deleted file mode 100644 index bef994127..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/launch_image@2.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/launch_image@3.png b/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/launch_image@3.png deleted file mode 100644 index bef994127..000000000 Binary files a/examples/cat_facts/ios/Runner/Assets.xcassets/LaunchImage.imageset/launch_image@3.png and /dev/null differ diff --git a/examples/cat_facts/ios/Runner/Base.lproj/InfoPlist.strings b/examples/cat_facts/ios/Runner/Base.lproj/InfoPlist.strings deleted file mode 100644 index 51ba75eae..000000000 --- a/examples/cat_facts/ios/Runner/Base.lproj/InfoPlist.strings +++ /dev/null @@ -1,7 +0,0 @@ -/* - InfoPlist.strings - Runner - - Created by Михаил Зотьев on 14.07.2021. - -*/ diff --git a/examples/cat_facts/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/cat_facts/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 03711b5ca..000000000 --- a/examples/cat_facts/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/cat_facts/ios/Runner/Base.lproj/Localizable.strings b/examples/cat_facts/ios/Runner/Base.lproj/Localizable.strings deleted file mode 100644 index 4a87e3218..000000000 --- a/examples/cat_facts/ios/Runner/Base.lproj/Localizable.strings +++ /dev/null @@ -1,7 +0,0 @@ -/* - Localizable.strings - Runner - - Created by Михаил Зотьев on 13.07.2021. - -*/ diff --git a/examples/cat_facts/ios/Runner/Base.lproj/Main.storyboard b/examples/cat_facts/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index 23df60b84..000000000 --- a/examples/cat_facts/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/cat_facts/ios/Runner/Info.plist b/examples/cat_facts/ios/Runner/Info.plist deleted file mode 100644 index f2cfd5a94..000000000 --- a/examples/cat_facts/ios/Runner/Info.plist +++ /dev/null @@ -1,55 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Cat Facts - CFBundleDisplayName - Cat Facts - NSHumanReadableCopyright - 2019-present, SurfStudio LLC. All rights reserved. - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - CFBundleLocalizations - - en - ru - ja - - - diff --git a/examples/cat_facts/ios/Runner/Runner-Bridging-Header.h b/examples/cat_facts/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/examples/cat_facts/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/cat_facts/ios/Runner/ja.lproj/InfoPlist.strings b/examples/cat_facts/ios/Runner/ja.lproj/InfoPlist.strings deleted file mode 100644 index e253e5c9a..000000000 --- a/examples/cat_facts/ios/Runner/ja.lproj/InfoPlist.strings +++ /dev/null @@ -1,10 +0,0 @@ -/* - InfoPlist.strings - Runner - - Created by Михаил Зотьев on 14.07.2021. - -*/ - -"CFBundleName" = "猫の事実"; -"CFBundleDisplayName" = "猫の事実"; diff --git a/examples/cat_facts/ios/Runner/ja.lproj/Localizable.strings b/examples/cat_facts/ios/Runner/ja.lproj/Localizable.strings deleted file mode 100644 index 4a87e3218..000000000 --- a/examples/cat_facts/ios/Runner/ja.lproj/Localizable.strings +++ /dev/null @@ -1,7 +0,0 @@ -/* - Localizable.strings - Runner - - Created by Михаил Зотьев on 13.07.2021. - -*/ diff --git a/examples/cat_facts/ios/Runner/ja.lproj/Main.strings b/examples/cat_facts/ios/Runner/ja.lproj/Main.strings deleted file mode 100644 index 8b1378917..000000000 --- a/examples/cat_facts/ios/Runner/ja.lproj/Main.strings +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/cat_facts/ios/Runner/ru.lproj/InfoPlist.strings b/examples/cat_facts/ios/Runner/ru.lproj/InfoPlist.strings deleted file mode 100644 index d4b1ffe19..000000000 --- a/examples/cat_facts/ios/Runner/ru.lproj/InfoPlist.strings +++ /dev/null @@ -1,10 +0,0 @@ -/* - InfoPlist.strings - Runner - - Created by Михаил Зотьев on 14.07.2021. - -*/ -"CFBundleName" = "О котах"; -"CFBundleDisplayName" = "О котах"; -"NSHumanReadableCopyright" = "c 2019, SurfStudio LLC. Все права защищены."; diff --git a/examples/cat_facts/ios/Runner/ru.lproj/Localizable.strings b/examples/cat_facts/ios/Runner/ru.lproj/Localizable.strings deleted file mode 100644 index 4a87e3218..000000000 --- a/examples/cat_facts/ios/Runner/ru.lproj/Localizable.strings +++ /dev/null @@ -1,7 +0,0 @@ -/* - Localizable.strings - Runner - - Created by Михаил Зотьев on 13.07.2021. - -*/ diff --git a/examples/cat_facts/ios/Runner/ru.lproj/Main.strings b/examples/cat_facts/ios/Runner/ru.lproj/Main.strings deleted file mode 100644 index 8b1378917..000000000 --- a/examples/cat_facts/ios/Runner/ru.lproj/Main.strings +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/cat_facts/lib/config/url_config.dart b/examples/cat_facts/lib/config/url_config.dart deleted file mode 100644 index ff0abc298..000000000 --- a/examples/cat_facts/lib/config/url_config.dart +++ /dev/null @@ -1,6 +0,0 @@ -/// Конфигурация урл-ов проекта. -class UrlConfig { - static const String _baseUrl = 'https://catfact.ninja'; - - static String get baseUrl => _baseUrl; -} diff --git a/examples/cat_facts/lib/data/facts/fact.dart b/examples/cat_facts/lib/data/facts/fact.dart deleted file mode 100644 index 7d6be5601..000000000 --- a/examples/cat_facts/lib/data/facts/fact.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Содержит информацию фактов о котиках -class Fact { - /// Содержание строки - final String? content; - - /// Далинна строки - final int? length; - - const Fact({ - this.content, - this.length, - }); - - factory Fact.fromJson(Map json) => Fact( - content: json['fact'] as String?, - length: json['length'] as int?, - ); -} diff --git a/examples/cat_facts/lib/data/theme/app_theme.dart b/examples/cat_facts/lib/data/theme/app_theme.dart deleted file mode 100644 index a64b44f25..000000000 --- a/examples/cat_facts/lib/data/theme/app_theme.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Тип темы -enum AppTheme { - light, - dark, -} diff --git a/examples/cat_facts/lib/interactor/facts/facts_interactor.dart b/examples/cat_facts/lib/interactor/facts/facts_interactor.dart deleted file mode 100644 index d1efb4bc0..000000000 --- a/examples/cat_facts/lib/interactor/facts/facts_interactor.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:cat_facts/data/facts/fact.dart'; -import 'package:cat_facts/repository/facts/facts_repository.dart'; - -/// Интерактор взаимодействия с фактами -class FactsInteractor { - final FactsRepository _factsRepository; - final _facts = []; - - FactsInteractor(this._factsRepository); - - /// Получить список фактов - Future> getFacts({int count = 1000}) async { - final facts = await _factsRepository.getFacts(count); - _facts - ..clear() - ..addAll(facts); - return _facts; - } - - /// Получить один факт - Future> appendFact() async { - final fact = await _factsRepository.getFact(); - _facts.add(fact); - return _facts; - } -} diff --git a/examples/cat_facts/lib/interactor/theme/theme_interactor.dart b/examples/cat_facts/lib/interactor/theme/theme_interactor.dart deleted file mode 100644 index 5fdff616c..000000000 --- a/examples/cat_facts/lib/interactor/theme/theme_interactor.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:cat_facts/data/theme/app_theme.dart'; -import 'package:relation/relation.dart'; - -/// Интерактор для работы с темой приложения. -class ThemeInteractor { - final appTheme = StreamedState(AppTheme.light); - - void changeTheme() { - final current = appTheme.value; - appTheme.accept( - (current == AppTheme.dark) ? AppTheme.light : AppTheme.dark, - ); - } -} diff --git a/examples/cat_facts/lib/l10n/intl_messages.arb b/examples/cat_facts/lib/l10n/intl_messages.arb deleted file mode 100644 index 1abacd538..000000000 --- a/examples/cat_facts/lib/l10n/intl_messages.arb +++ /dev/null @@ -1,66 +0,0 @@ -{ - "@@last_modified": "2021-07-20T13:09:23.422686", - "FactListTileI18n_title": "Fact #{number}", - "@FactListTileI18n_title": { - "description": "Fact list title", - "type": "text", - "placeholders_order": [ - "number" - ], - "placeholders": { - "number": {} - } - }, - "ThemeButtonI18n_switchOff": "Switch Off", - "@ThemeButtonI18n_switchOff": { - "description": "Switch to dark theme title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "ThemeButtonI18n_switchOn": "Switch On", - "@ThemeButtonI18n_switchOn": { - "description": "Switch to light theme title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_title": "Cats facts", - "@FactsScreenI18n_title": { - "description": "Application title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_fetchFact": "More", - "@FactsScreenI18n_fetchFact": { - "description": "Fetch new fact", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_fetchedFacts": "{number,plural, =1{Loaded one fact}other{Loaded {numberText} facts}}", - "@FactsScreenI18n_fetchedFacts": { - "description": "Fetched facts label", - "type": "text", - "placeholders_order": [ - "number", - "numberText" - ], - "placeholders": { - "number": {}, - "numberText": {} - } - }, - "FactsScreenI18n_totalLoaded": "Total loaded symbols {count}", - "@FactsScreenI18n_totalLoaded": { - "description": "Fetched symbols label", - "type": "text", - "placeholders_order": [ - "count" - ], - "placeholders": { - "count": {} - } - } -} \ No newline at end of file diff --git a/examples/cat_facts/lib/l10n/intl_messages_en.arb b/examples/cat_facts/lib/l10n/intl_messages_en.arb deleted file mode 100644 index 7ef466bec..000000000 --- a/examples/cat_facts/lib/l10n/intl_messages_en.arb +++ /dev/null @@ -1,67 +0,0 @@ -{ - "@@locale": "en", - "@@last_modified": "2021-07-20T11:51:47.755899", - "FactListTileI18n_title": "Fact #{number}", - "@FactListTileI18n_title": { - "description": "Fact list title", - "type": "text", - "placeholders_order": [ - "number" - ], - "placeholders": { - "number": {} - } - }, - "ThemeButtonI18n_switchOff": "Switch Off", - "@ThemeButtonI18n_switchOff": { - "description": "Switch to dark theme title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "ThemeButtonI18n_switchOn": "Switch On", - "@ThemeButtonI18n_switchOn": { - "description": "Switch to light theme title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_title": "Cats facts", - "@FactsScreenI18n_title": { - "description": "Application title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_fetchFact": "More", - "@FactsScreenI18n_fetchFact": { - "description": "Fetch new fact", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_fetchedFacts": "{number,plural, =1{Loaded one fact}other{Loaded {numberText} facts}}", - "@FactsScreenI18n_fetchedFacts": { - "description": "Fetched facts label", - "type": "text", - "placeholders_order": [ - "number", - "numberText" - ], - "placeholders": { - "number": {}, - "numberText": {} - } - }, - "FactsScreenI18n_totalLoaded": "Total loaded symbols {count}", - "@FactsScreenI18n_totalLoaded": { - "description": "Fetched symbols label", - "type": "text", - "placeholders_order": [ - "count" - ], - "placeholders": { - "count": {} - } - } -} \ No newline at end of file diff --git a/examples/cat_facts/lib/l10n/intl_messages_ja.arb b/examples/cat_facts/lib/l10n/intl_messages_ja.arb deleted file mode 100644 index 43ec27d71..000000000 --- a/examples/cat_facts/lib/l10n/intl_messages_ja.arb +++ /dev/null @@ -1,67 +0,0 @@ -{ - "@@locale": "ja", - "@@last_modified": "2021-07-20T11:51:47.755899", - "FactListTileI18n_title": "{number}番の事実", - "@FactListTileI18n_title": { - "description": "Fact list title", - "type": "text", - "placeholders_order": [ - "number" - ], - "placeholders": { - "number": {} - } - }, - "ThemeButtonI18n_switchOff": "スイッチをつける", - "@ThemeButtonI18n_switchOff": { - "description": "Switch to dark theme title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "ThemeButtonI18n_switchOn": "スイッチを切る", - "@ThemeButtonI18n_switchOn": { - "description": "Switch to light theme title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_title": "猫の事実", - "@FactsScreenI18n_title": { - "description": "Application title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_fetchFact": "その他", - "@FactsScreenI18n_fetchFact": { - "description": "Fetch new fact", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_fetchedFacts": "{number,plural, other{事実が{numberText}ロードされました}}", - "@FactsScreenI18n_fetchedFacts": { - "description": "Fetched facts label", - "type": "text", - "placeholders_order": [ - "number", - "numberText" - ], - "placeholders": { - "number": {}, - "numberText": {} - } - }, - "FactsScreenI18n_totalLoaded": "文字数は{count}", - "@FactsScreenI18n_totalLoaded": { - "description": "Fetched symbols label", - "type": "text", - "placeholders_order": [ - "count" - ], - "placeholders": { - "count": {} - } - } -} \ No newline at end of file diff --git a/examples/cat_facts/lib/l10n/intl_messages_ru.arb b/examples/cat_facts/lib/l10n/intl_messages_ru.arb deleted file mode 100644 index 87af4d2af..000000000 --- a/examples/cat_facts/lib/l10n/intl_messages_ru.arb +++ /dev/null @@ -1,67 +0,0 @@ -{ - "@@locale": "ru", - "@@last_modified": "2021-07-20T11:51:47.755899", - "FactListTileI18n_title": "Факт №{number}", - "@FactListTileI18n_title": { - "description": "Fact list title", - "type": "text", - "placeholders_order": [ - "number" - ], - "placeholders": { - "number": {} - } - }, - "ThemeButtonI18n_switchOff": "Тёмная тема", - "@ThemeButtonI18n_switchOff": { - "description": "Switch to dark theme title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "ThemeButtonI18n_switchOn": "Светлая тема", - "@ThemeButtonI18n_switchOn": { - "description": "Switch to light theme title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_title": "О котах", - "@FactsScreenI18n_title": { - "description": "Application title", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_fetchFact": "Ещё", - "@FactsScreenI18n_fetchFact": { - "description": "Fetch new fact", - "type": "text", - "placeholders_order": [], - "placeholders": {} - }, - "FactsScreenI18n_fetchedFacts": "{number,plural, =1{Загружен один факт}=2{Загружен два факта}few{Загружено {numberText} факта}other{Загружено {numberText} фактов}}", - "@FactsScreenI18n_fetchedFacts": { - "description": "Fetched facts label", - "type": "text", - "placeholders_order": [ - "number", - "numberText" - ], - "placeholders": { - "number": {}, - "numberText": {} - } - }, - "FactsScreenI18n_totalLoaded": "Всего загруженно символов: {count}", - "@FactsScreenI18n_totalLoaded": { - "description": "Fetched symbols label", - "type": "text", - "placeholders_order": [ - "count" - ], - "placeholders": { - "count": {} - } - } -} \ No newline at end of file diff --git a/examples/cat_facts/lib/l10n/messages_all.dart b/examples/cat_facts/lib/l10n/messages_all.dart deleted file mode 100644 index 799f46eab..000000000 --- a/examples/cat_facts/lib/l10n/messages_all.dart +++ /dev/null @@ -1,76 +0,0 @@ -// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart -// This is a library that looks up messages for specific locales by -// delegating to the appropriate library. - -// Ignore issues from commonly used lints in this file. -// ignore_for_file:implementation_imports, file_names -// ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering -// ignore_for_file:argument_type_not_assignable, invalid_assignment -// ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases -// ignore_for_file:comment_references -// ignore_for_file:avoid_catches_without_on_clauses - -import 'dart:async'; - -import 'package:intl/intl.dart'; -import 'package:intl/message_lookup_by_library.dart'; -import 'package:intl/src/intl_helpers.dart'; - -import 'messages_messages.dart' deferred as messages_messages; -import 'messages_en.dart' deferred as messages_en; -import 'messages_ja.dart' deferred as messages_ja; -import 'messages_ru.dart' deferred as messages_ru; - -typedef Future LibraryLoader(); -Map _deferredLibraries = { - 'messages': messages_messages.loadLibrary, - 'en': messages_en.loadLibrary, - 'ja': messages_ja.loadLibrary, - 'ru': messages_ru.loadLibrary, -}; - -MessageLookupByLibrary? _findExact(String localeName) { - switch (localeName) { - case 'messages': - return messages_messages.messages; - case 'en': - return messages_en.messages; - case 'ja': - return messages_ja.messages; - case 'ru': - return messages_ru.messages; - default: - return null; - } -} - -/// User programs should call this before using [localeName] for messages. -Future initializeMessages(String localeName) async { - final availableLocale = Intl.verifiedLocale( - localeName, - (locale) => _deferredLibraries[locale] != null, - onFailure: (_) => null); - if (availableLocale == null) { - return Future.value(false); - } - final lib = _deferredLibraries[availableLocale]; - await (lib == null ? Future.value(false) : lib()); - initializeInternalMessageLookup(() => CompositeMessageLookup()); - messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor); - return Future.value(true); -} - -bool _messagesExistFor(String locale) { - try { - return _findExact(locale) != null; - } catch (e) { - return false; - } -} - -MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) { - final actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, - onFailure: (_) => null); - if (actualLocale == null) return null; - return _findExact(actualLocale); -} diff --git a/examples/cat_facts/lib/l10n/messages_en.dart b/examples/cat_facts/lib/l10n/messages_en.dart deleted file mode 100644 index 50157e1d8..000000000 --- a/examples/cat_facts/lib/l10n/messages_en.dart +++ /dev/null @@ -1,38 +0,0 @@ -// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart -// This is a library that provides messages for a en locale. All the -// messages from the main program should be duplicated here with the same -// function name. - -// Ignore issues from commonly used lints in this file. -// ignore_for_file:unnecessary_brace_in_string_interps -// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering -// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names, always_declare_return_types - -import 'package:intl/intl.dart'; -import 'package:intl/message_lookup_by_library.dart'; - -final messages = MessageLookup(); - -typedef String MessageIfAbsent(String? messageStr, List? args); - -class MessageLookup extends MessageLookupByLibrary { - String get localeName => 'en'; - - static m0(number) => "Fact #${number}"; - - static m1(number, numberText) => "${Intl.plural(number, one: 'Loaded one fact', other: 'Loaded ${numberText} facts')}"; - - static m2(count) => "Total loaded symbols ${count}"; - - final messages = _notInlinedMessages(_notInlinedMessages); - static Map _notInlinedMessages(_) => { - "FactListTileI18n_title" : m0, - "FactsScreenI18n_fetchFact" : MessageLookupByLibrary.simpleMessage("More"), - "FactsScreenI18n_fetchedFacts" : m1, - "FactsScreenI18n_title" : MessageLookupByLibrary.simpleMessage("Cats facts"), - "FactsScreenI18n_totalLoaded" : m2, - "ThemeButtonI18n_switchOff" : MessageLookupByLibrary.simpleMessage("Switch Off"), - "ThemeButtonI18n_switchOn" : MessageLookupByLibrary.simpleMessage("Switch On") - }; -} diff --git a/examples/cat_facts/lib/l10n/messages_ja.dart b/examples/cat_facts/lib/l10n/messages_ja.dart deleted file mode 100644 index 329c781a4..000000000 --- a/examples/cat_facts/lib/l10n/messages_ja.dart +++ /dev/null @@ -1,38 +0,0 @@ -// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart -// This is a library that provides messages for a ja locale. All the -// messages from the main program should be duplicated here with the same -// function name. - -// Ignore issues from commonly used lints in this file. -// ignore_for_file:unnecessary_brace_in_string_interps -// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering -// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names, always_declare_return_types - -import 'package:intl/intl.dart'; -import 'package:intl/message_lookup_by_library.dart'; - -final messages = MessageLookup(); - -typedef String MessageIfAbsent(String? messageStr, List? args); - -class MessageLookup extends MessageLookupByLibrary { - String get localeName => 'ja'; - - static m0(number) => "${number}番の事実"; - - static m1(number, numberText) => "${Intl.plural(number, other: '事実が${numberText}ロードされました')}"; - - static m2(count) => "文字数は${count}"; - - final messages = _notInlinedMessages(_notInlinedMessages); - static Map _notInlinedMessages(_) => { - "FactListTileI18n_title" : m0, - "FactsScreenI18n_fetchFact" : MessageLookupByLibrary.simpleMessage("その他"), - "FactsScreenI18n_fetchedFacts" : m1, - "FactsScreenI18n_title" : MessageLookupByLibrary.simpleMessage("猫の事実"), - "FactsScreenI18n_totalLoaded" : m2, - "ThemeButtonI18n_switchOff" : MessageLookupByLibrary.simpleMessage("スイッチをつける"), - "ThemeButtonI18n_switchOn" : MessageLookupByLibrary.simpleMessage("スイッチを切る") - }; -} diff --git a/examples/cat_facts/lib/l10n/messages_messages.dart b/examples/cat_facts/lib/l10n/messages_messages.dart deleted file mode 100644 index 9e9b66e48..000000000 --- a/examples/cat_facts/lib/l10n/messages_messages.dart +++ /dev/null @@ -1,38 +0,0 @@ -// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart -// This is a library that provides messages for a messages locale. All the -// messages from the main program should be duplicated here with the same -// function name. - -// Ignore issues from commonly used lints in this file. -// ignore_for_file:unnecessary_brace_in_string_interps -// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering -// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names, always_declare_return_types - -import 'package:intl/intl.dart'; -import 'package:intl/message_lookup_by_library.dart'; - -final messages = MessageLookup(); - -typedef String MessageIfAbsent(String? messageStr, List? args); - -class MessageLookup extends MessageLookupByLibrary { - String get localeName => 'messages'; - - static m0(number) => "Fact #${number}"; - - static m1(number, numberText) => "${Intl.plural(number, one: 'Loaded one fact', other: 'Loaded ${numberText} facts')}"; - - static m2(count) => "Total loaded symbols ${count}"; - - final messages = _notInlinedMessages(_notInlinedMessages); - static Map _notInlinedMessages(_) => { - "FactListTileI18n_title" : m0, - "FactsScreenI18n_fetchFact" : MessageLookupByLibrary.simpleMessage("More"), - "FactsScreenI18n_fetchedFacts" : m1, - "FactsScreenI18n_title" : MessageLookupByLibrary.simpleMessage("Cats facts"), - "FactsScreenI18n_totalLoaded" : m2, - "ThemeButtonI18n_switchOff" : MessageLookupByLibrary.simpleMessage("Switch Off"), - "ThemeButtonI18n_switchOn" : MessageLookupByLibrary.simpleMessage("Switch On") - }; -} diff --git a/examples/cat_facts/lib/l10n/messages_ru.dart b/examples/cat_facts/lib/l10n/messages_ru.dart deleted file mode 100644 index 3e4571089..000000000 --- a/examples/cat_facts/lib/l10n/messages_ru.dart +++ /dev/null @@ -1,38 +0,0 @@ -// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart -// This is a library that provides messages for a ru locale. All the -// messages from the main program should be duplicated here with the same -// function name. - -// Ignore issues from commonly used lints in this file. -// ignore_for_file:unnecessary_brace_in_string_interps -// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering -// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names, always_declare_return_types - -import 'package:intl/intl.dart'; -import 'package:intl/message_lookup_by_library.dart'; - -final messages = MessageLookup(); - -typedef String MessageIfAbsent(String? messageStr, List? args); - -class MessageLookup extends MessageLookupByLibrary { - String get localeName => 'ru'; - - static m0(number) => "Факт №${number}"; - - static m1(number, numberText) => "${Intl.plural(number, one: 'Загружен один факт', two: 'Загружен два факта', few: 'Загружено ${numberText} факта', other: 'Загружено ${numberText} фактов')}"; - - static m2(count) => "Всего загруженно символов: ${count}"; - - final messages = _notInlinedMessages(_notInlinedMessages); - static Map _notInlinedMessages(_) => { - "FactListTileI18n_title" : m0, - "FactsScreenI18n_fetchFact" : MessageLookupByLibrary.simpleMessage("Ещё"), - "FactsScreenI18n_fetchedFacts" : m1, - "FactsScreenI18n_title" : MessageLookupByLibrary.simpleMessage("О котах"), - "FactsScreenI18n_totalLoaded" : m2, - "ThemeButtonI18n_switchOff" : MessageLookupByLibrary.simpleMessage("Тёмная тема"), - "ThemeButtonI18n_switchOn" : MessageLookupByLibrary.simpleMessage("Светлая тема") - }; -} diff --git a/examples/cat_facts/lib/localizations.dart b/examples/cat_facts/lib/localizations.dart deleted file mode 100644 index 2916d79de..000000000 --- a/examples/cat_facts/lib/localizations.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:intl/intl.dart'; - -class FactListTileI18n { - static String title(String number) { - return Intl.message( - 'Fact #$number', - desc: 'Fact list title', - name: 'FactListTileI18n_title', - args: [number], - ); - } -} - -class ThemeButtonI18n { - static String get switchOff => Intl.message( - 'Switch Off', - desc: 'Switch to dark theme title', - name: 'ThemeButtonI18n_switchOff', - ); - - static String get switchOn => Intl.message( - 'Switch On', - desc: 'Switch to light theme title', - name: 'ThemeButtonI18n_switchOn', - ); -} - -class FactsScreenI18n { - static String get title => Intl.message( - 'Cats facts', - desc: 'Application title', - name: 'FactsScreenI18n_title', - ); - - static String get fetchFact => Intl.message( - 'More', - desc: 'Fetch new fact', - name: 'FactsScreenI18n_fetchFact', - ); - - static String fetchedFacts(int number, String numberText) { - return Intl.plural( - number, - one: 'Loaded one fact', -// two: 'Loaded $numberText facts', -// few: 'Loaded $numberText facts', -// many: 'Loaded $numberText facts', - other: 'Loaded $numberText facts', - desc: 'Fetched facts label', - name: 'FactsScreenI18n_fetchedFacts', - args: [number, numberText], - ); - } - - static String totalLoaded(String count) { - return Intl.message( - 'Total loaded symbols $count', - desc: 'Fetched symbols label', - name: 'FactsScreenI18n_totalLoaded', - args: [count], - ); - } -} diff --git a/examples/cat_facts/lib/main.dart b/examples/cat_facts/lib/main.dart deleted file mode 100644 index ec828c219..000000000 --- a/examples/cat_facts/lib/main.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:cat_facts/ui/app/app.dart'; -import 'package:cat_facts/ui/app/app_dependencies.dart'; -import 'package:flutter/widgets.dart'; - -void main() { - runApp( - const AppDependencies( - app: App(), - ), - ); -} diff --git a/examples/cat_facts/lib/repository/api_client.dart b/examples/cat_facts/lib/repository/api_client.dart deleted file mode 100644 index 0b00788c4..000000000 --- a/examples/cat_facts/lib/repository/api_client.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:http/http.dart'; - -/// Класс для взаимодействия с API слоем. -class ApiClient { - final Client httpClient; - - final String _baseUrl; - - ApiClient(this._baseUrl, this.httpClient); - - Future get(String endpoint, {Map? params}) { - final queryString = Uri(queryParameters: params).query; - return httpClient.get(Uri.parse('$_baseUrl$endpoint?$queryString')); - } -} diff --git a/examples/cat_facts/lib/repository/facts/facts_repository.dart b/examples/cat_facts/lib/repository/facts/facts_repository.dart deleted file mode 100644 index 51ce1569b..000000000 --- a/examples/cat_facts/lib/repository/facts/facts_repository.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:convert'; - -import 'package:cat_facts/data/facts/fact.dart'; -import 'package:cat_facts/repository/api_client.dart'; - -/// Репозиторий для работы с фактами -class FactsRepository { - final ApiClient client; - - const FactsRepository(this.client); - - /// Получить список фактов - Future> getFacts(int count) async { - final response = await client.get('/facts', params: {'limit': '$count'}); - - if (response.statusCode == 200 && response.body.isNotEmpty) { - final map = json.decode(response.body) as Map; - final data = (map['data'] as List).cast>(); - return data.map((e) => Fact.fromJson(e)).toList(); - } else { - return const []; - } - } - - //Получить один факт - Future getFact() async { - final response = await client.get('/fact'); - if (response.statusCode == 200 && response.body.isNotEmpty) { - final data = jsonDecode(response.body) as Map; - return Fact.fromJson(data); - } else { - throw Exception('Bad request with code: ${response.statusCode}'); - } - } -} diff --git a/examples/cat_facts/lib/ui/app/app.dart b/examples/cat_facts/lib/ui/app/app.dart deleted file mode 100644 index 6a0e5da71..000000000 --- a/examples/cat_facts/lib/ui/app/app.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:cat_facts/data/theme/app_theme.dart'; -import 'package:cat_facts/ui/app/app_localizations.dart'; -import 'package:cat_facts/ui/app/app_localizations_delegate.dart'; -import 'package:cat_facts/ui/app/app_wm.dart'; -import 'package:cat_facts/ui/screen/facts/facts_screen.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; - -class App extends CoreMwwmWidget { - const App({ - Key? key, - }) : super( - key: key, - widgetModelBuilder: createAppWidgetModel, - ); - - @override - WidgetState, AppWidgetModel> - createWidgetState() { - return _AppState(); - } -} - -class _AppState extends WidgetState { - @override - Widget build(BuildContext context) { - return StreamedStateBuilder( - streamedState: wm.theme, - builder: (context, theme) => MaterialApp( - title: 'Cat Facts', - theme: ThemeData( - primaryColor: Colors.blue, - fontFamily: 'Roboto', - ), - darkTheme: ThemeData.dark(), - themeMode: theme == AppTheme.dark ? ThemeMode.dark : ThemeMode.light, - localizationsDelegates: const [ - AppLocalizationsDelegate(), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - supportedLocales: AppLocalizations.supportedLocales, - home: FactsScreen(), - ), - ); - } -} diff --git a/examples/cat_facts/lib/ui/app/app_dependencies.dart b/examples/cat_facts/lib/ui/app/app_dependencies.dart deleted file mode 100644 index e9ef6e424..000000000 --- a/examples/cat_facts/lib/ui/app/app_dependencies.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:cat_facts/config/url_config.dart'; -import 'package:cat_facts/interactor/facts/facts_interactor.dart'; -import 'package:cat_facts/interactor/theme/theme_interactor.dart'; -import 'package:cat_facts/repository/api_client.dart'; -import 'package:cat_facts/repository/facts/facts_repository.dart'; -import 'package:cat_facts/ui/app/app.dart'; -import 'package:flutter/material.dart'; -import 'package:http/http.dart'; -import 'package:provider/provider.dart'; - -class AppDependencies extends StatelessWidget { - final App app; - - const AppDependencies({required this.app, Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - final http = Client(); - final apiClient = ApiClient(UrlConfig.baseUrl, http); - final factRepository = FactsRepository(apiClient); - final themeInteractor = ThemeInteractor(); - final factsInteractor = FactsInteractor(factRepository); - - return MultiProvider( - providers: [ - Provider(create: (_) => themeInteractor), - Provider(create: (_) => factsInteractor), - ], - child: app, - ); - } -} diff --git a/examples/cat_facts/lib/ui/app/app_localizations.dart b/examples/cat_facts/lib/ui/app/app_localizations.dart deleted file mode 100644 index fd35a69af..000000000 --- a/examples/cat_facts/lib/ui/app/app_localizations.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:cat_facts/l10n/messages_all.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; - - -class AppLocalizations { - static const Iterable supportedLocales = [ - Locale('en'), - Locale('ru'), - Locale('ja'), - ]; - - static Future load(Locale locale) async { - final localeName = locale.countryCode == null || locale.countryCode!.isEmpty - ? locale.languageCode - : locale.toString(); - - final canonicalLocaleName = Intl.canonicalizedLocale(localeName); - - Intl.defaultLocale = canonicalLocaleName; - - await initializeMessages(canonicalLocaleName); - - return AppLocalizations(); - } -} diff --git a/examples/cat_facts/lib/ui/app/app_localizations_delegate.dart b/examples/cat_facts/lib/ui/app/app_localizations_delegate.dart deleted file mode 100644 index 8ae9abc77..000000000 --- a/examples/cat_facts/lib/ui/app/app_localizations_delegate.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'dart:async'; - -import 'package:cat_facts/ui/app/app_localizations.dart'; -import 'package:flutter/widgets.dart'; - -class AppLocalizationsDelegate extends LocalizationsDelegate { - const AppLocalizationsDelegate(); - - @override - bool isSupported(Locale locale) { - return AppLocalizations.supportedLocales - .any((supported) => supported.languageCode == locale.languageCode); - } - - @override - Future load(Locale locale) => AppLocalizations.load(locale); - - @override - bool shouldReload(LocalizationsDelegate old) => false; -} diff --git a/examples/cat_facts/lib/ui/app/app_wm.dart b/examples/cat_facts/lib/ui/app/app_wm.dart deleted file mode 100644 index a4bfc67db..000000000 --- a/examples/cat_facts/lib/ui/app/app_wm.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:cat_facts/data/theme/app_theme.dart'; -import 'package:cat_facts/interactor/theme/theme_interactor.dart'; -import 'package:flutter/widgets.dart' hide Action; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart'; - -class AppWidgetModel extends WidgetModel { - final ThemeInteractor _themeInteractor; - - StreamedState get theme => _themeInteractor.appTheme; - - AppWidgetModel( - WidgetModelDependencies baseDependencies, - this._themeInteractor, - ) : super(baseDependencies); -} - -AppWidgetModel createAppWidgetModel(BuildContext context) { - return AppWidgetModel( - const WidgetModelDependencies(), - context.read(), - ); -} diff --git a/examples/cat_facts/lib/ui/screen/facts/components/fact_list_tile.dart b/examples/cat_facts/lib/ui/screen/facts/components/fact_list_tile.dart deleted file mode 100644 index ac8b50a80..000000000 --- a/examples/cat_facts/lib/ui/screen/facts/components/fact_list_tile.dart +++ /dev/null @@ -1,59 +0,0 @@ -import 'package:cat_facts/data/facts/fact.dart'; -import 'package:cat_facts/data/theme/app_theme.dart'; -import 'package:cat_facts/localizations.dart'; -import 'package:cat_facts/ui/screen/facts/facts_screen_wm.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; - -///Отображение одного факта в списке -class FactListTile extends StatelessWidget { - final FactsScreenWidgetModel wm; - final Fact el; - final int number; - - const FactListTile({ - required this.wm, - required this.el, - required this.number, - Key? key, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - final title = FactListTileI18n.title(NumberFormat().format(number)); - - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), - child: Column( - children: [ - Row( - children: [ - Text( - title, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - ), - ), - const SizedBox(width: 4), - StreamBuilder( - stream: wm.currentTheme(), - builder: (_, snapshot) { - return Expanded( - child: Divider( - color: (snapshot.data == AppTheme.light) - ? Colors.black - : Colors.white, - ), - ); - }, - ), - ], - ), - const SizedBox(height: 10), - Text(el.content ?? ''), - ], - ), - ); - } -} diff --git a/examples/cat_facts/lib/ui/screen/facts/components/theme_button.dart b/examples/cat_facts/lib/ui/screen/facts/components/theme_button.dart deleted file mode 100644 index 6f4fca999..000000000 --- a/examples/cat_facts/lib/ui/screen/facts/components/theme_button.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:math'; - -import 'package:cat_facts/data/theme/app_theme.dart'; -import 'package:cat_facts/localizations.dart'; -import 'package:flutter/material.dart'; - -class ThemeButton extends StatelessWidget { - final AppTheme? theme; - - const ThemeButton({ - Key? key, - this.theme, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - return Row(children: [ - Text( - theme == AppTheme.light - ? ThemeButtonI18n.switchOff - : ThemeButtonI18n.switchOn, - style: const TextStyle(color: Colors.white), - ), - const SizedBox(width: 10), - if (theme == AppTheme.light) - Transform.rotate( - angle: pi / 6, - child: const Icon(Icons.brightness_3, color: Colors.white), - ) - else - const Icon(Icons.brightness_7, color: Colors.white), - ]); - } -} diff --git a/examples/cat_facts/lib/ui/screen/facts/facts_screen.dart b/examples/cat_facts/lib/ui/screen/facts/facts_screen.dart deleted file mode 100644 index 6d131624e..000000000 --- a/examples/cat_facts/lib/ui/screen/facts/facts_screen.dart +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:cat_facts/data/facts/fact.dart'; -import 'package:cat_facts/data/theme/app_theme.dart'; -import 'package:cat_facts/localizations.dart'; -import 'package:cat_facts/ui/screen/facts/components/fact_list_tile.dart'; -import 'package:cat_facts/ui/screen/facts/components/theme_button.dart'; -import 'package:cat_facts/ui/screen/facts/facts_screen_wm.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; - -GlobalKey _scaffoldKey = GlobalKey(); - -@immutable -class FactsScreen extends CoreMwwmWidget { - FactsScreen({ - Key? key, - }) : super( - key: key, - widgetModelBuilder: (context) => createFactsScreenWidgetModel( - context, - _scaffoldKey, - ), - ); - - @override - WidgetState, FactsScreenWidgetModel> - createWidgetState() { - return _FactsScreenState(); - } -} - -class _FactsScreenState - extends WidgetState { - @override - Widget build(BuildContext context) { - return Scaffold( - key: _scaffoldKey, - floatingActionButton: FloatingActionButton( - child: Text(FactsScreenI18n.fetchFact), - onPressed: () { - wm.loadMoreFacts(); - }, - ), - appBar: AppBar( - title: Text(FactsScreenI18n.title), - actions: [ - TextButton( - key: const Key('theme_switcher'), - onPressed: () { - wm.switchTheme(); - }, - child: StreamBuilder( - stream: wm.currentTheme(), - builder: (context, snapshot) { - return ThemeButton(theme: snapshot.data); - }, - ), - ), - ], - ), - body: StreamedStateBuilder>( - streamedState: wm.facts, - builder: (context, facts) { - if (facts != null && facts.isNotEmpty) { - return Column( - children: [ - Expanded( - child: ListView.builder( - itemCount: facts.length, - itemBuilder: (c, i) { - final el = facts.elementAt(i); - return FactListTile(wm: wm, el: el, number: i + 1); - }, - ), - ), - ListTile( - title: Text( - FactsScreenI18n.fetchedFacts( - facts.length, - NumberFormat().format(facts.length), - ), - style: const TextStyle(fontWeight: FontWeight.bold), - ), - subtitle: Text(FactsScreenI18n.totalLoaded( - NumberFormat().format(wm.totalLength.value), - )), - ), - const SizedBox(height: 20), - ], - ); - } else { - return const Center(child: CircularProgressIndicator()); - } - }, - ), - ); - } -} diff --git a/examples/cat_facts/lib/ui/screen/facts/facts_screen_wm.dart b/examples/cat_facts/lib/ui/screen/facts/facts_screen_wm.dart deleted file mode 100644 index ce741e782..000000000 --- a/examples/cat_facts/lib/ui/screen/facts/facts_screen_wm.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:cat_facts/data/facts/fact.dart'; -import 'package:cat_facts/data/theme/app_theme.dart'; -import 'package:cat_facts/interactor/facts/facts_interactor.dart'; -import 'package:cat_facts/interactor/theme/theme_interactor.dart'; -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart'; - -class FactsScreenWidgetModel extends WidgetModel { - final facts = StreamedState>([]); - final totalLength = StreamedState(0); - - final ThemeInteractor _themeInteractor; - final FactsInteractor _factsInteractor; - - final GlobalKey _scaffoldKey; - - FactsScreenWidgetModel( - WidgetModelDependencies baseDependencies, - this._themeInteractor, - this._factsInteractor, - this._scaffoldKey, - ) : super(baseDependencies); - - @override - void onLoad() { - super.onLoad(); - _fetchListFacts(); - } - - Stream currentTheme() => _themeInteractor.appTheme.stream; - - void switchTheme() => _themeInteractor.changeTheme(); - - void loadMoreFacts() => _fetchFact(); - - Future _fetchListFacts() async { - final response = await _factsInteractor.getFacts(count: 1); - await totalLength.accept(_countTotalLength(response)); - await facts.accept(response); - } - - Future _fetchFact() async { - try { - final response = await _factsInteractor.appendFact(); - await totalLength.accept(_countTotalLength(response)); - await facts.accept(response); - } on Exception catch (_) { - _scaffoldKey.currentState!.showSnackBar(const SnackBar( - content: Text('An error occurred while trying to get a fact'), - )); - } - } - - int _countTotalLength(Iterable response) { - var _totalLength = 0; - for (final fact in response) { - _totalLength = _totalLength + (fact.length ?? 0); - } - return _totalLength; - } -} - -FactsScreenWidgetModel createFactsScreenWidgetModel( - BuildContext context, - GlobalKey _scaffoldKey, -) { - return FactsScreenWidgetModel( - const WidgetModelDependencies(), - context.read(), - context.read(), - _scaffoldKey, - ); -} diff --git a/examples/cat_facts/pubspec.yaml b/examples/cat_facts/pubspec.yaml deleted file mode 100644 index 84851334e..000000000 --- a/examples/cat_facts/pubspec.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: cat_facts -description: A new Flutter project. -version: 1.0.0+1 -publish_to: "none" - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - flutter_localizations: - sdk: flutter - http: ^0.13.1 - intl: ^0.17.0 - mwwm: ^2.0.0 - provider: ^5.0.0 - relation: ^2.0.0 - -dev_dependencies: - flutter_test: - sdk: flutter - - golden_toolkit: ^0.9.0 - - integration_test: - sdk: flutter - - mocktail: ^0.1.2 - - surf_lint_rules: ^1.1.1-dev.0 - -flutter: - uses-material-design: true diff --git a/examples/cat_facts/test/golden/app/app_test.dart b/examples/cat_facts/test/golden/app/app_test.dart deleted file mode 100644 index bdcb55963..000000000 --- a/examples/cat_facts/test/golden/app/app_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'dart:ui'; - -import 'package:cat_facts/data/facts/fact.dart'; -import 'package:cat_facts/data/theme/app_theme.dart'; -import 'package:cat_facts/ui/app/app.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:golden_toolkit/golden_toolkit.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:relation/relation.dart'; - -import '../core/golden_app_wrapper.dart'; - -/// Голден тесты [App] -void main() { - const _factList = [ - Fact(content: 'Some fact text'), - Fact(content: 'One more fact text'), - Fact(content: 'One more fact text. Long long loooooooooong fact.'), - ]; - - late StreamedState themeStream; - late MockThemeInteractor themeInteractor; - late MockFactsInteractor factsInteractor; - - setUp(() async { - themeStream = StreamedState(AppTheme.light); - themeInteractor = MockThemeInteractor(); - factsInteractor = MockFactsInteractor(); - - when(() => factsInteractor.getFacts(count: any(named: 'count'))) - .thenAnswer((_) => Future.value(_factList)); - when(() => themeInteractor.appTheme).thenReturn(themeStream); - - await loadAppFonts(); - }); - - testGoldens( - 'App golden test', - (tester) async { - await tester.pumpWidget( - GoldenAppWrapper( - factsInteractor: factsInteractor, - themeInteractor: themeInteractor, - app: const App(), - ), - ); - - await tester.waitForAssets(); - await tester.pump(); - - await multiScreenGolden( - tester, - 'toolkit_app_test', - devices: [ - Device.phone, - Device.tabletPortrait, - Device.iphone11, - const Device(size: Size(400, 900), name: 'custom 1'), - ], - ); - }, - ); -} diff --git a/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.custom 1.png b/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.custom 1.png deleted file mode 100644 index 7b2164275..000000000 Binary files a/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.custom 1.png and /dev/null differ diff --git a/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.iphone11.png b/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.iphone11.png deleted file mode 100644 index b76a42698..000000000 Binary files a/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.iphone11.png and /dev/null differ diff --git a/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.phone.png b/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.phone.png deleted file mode 100644 index 270817d61..000000000 Binary files a/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.phone.png and /dev/null differ diff --git a/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.tablet_portrait.png b/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.tablet_portrait.png deleted file mode 100644 index 49ae93bfa..000000000 Binary files a/examples/cat_facts/test/golden/app/goldens/toolkit_app_test.tablet_portrait.png and /dev/null differ diff --git a/examples/cat_facts/test/golden/core/golden_app_wrapper.dart b/examples/cat_facts/test/golden/core/golden_app_wrapper.dart deleted file mode 100644 index 32f4dd841..000000000 --- a/examples/cat_facts/test/golden/core/golden_app_wrapper.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:cat_facts/interactor/facts/facts_interactor.dart'; -import 'package:cat_facts/interactor/theme/theme_interactor.dart'; -import 'package:cat_facts/ui/app/app.dart'; -import 'package:cat_facts/ui/app/app_dependencies.dart'; -import 'package:flutter/material.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:provider/provider.dart'; - -/// Обертка для мокирования зависимостей -class GoldenAppWrapper extends AppDependencies { - final MockThemeInteractor? themeInteractor; - final MockFactsInteractor? factsInteractor; - - const GoldenAppWrapper({ - required App app, - Key? key, - this.themeInteractor, - this.factsInteractor, - }) : super( - key: key, - app: app, - ); - - @override - Widget build(BuildContext context) { - return MultiProvider( - providers: [ - Provider( - create: (_) => themeInteractor ?? ThemeInteractor(), - ), - Provider( - create: (_) => factsInteractor ?? MockFactsInteractor(), - ), - ], - child: app, - ); - } -} - -class MockThemeInteractor extends Mock implements ThemeInteractor {} - -class MockFactsInteractor extends Mock implements FactsInteractor {} diff --git a/examples/cat_facts/test/unit/repository/facts_repository_test.dart b/examples/cat_facts/test/unit/repository/facts_repository_test.dart deleted file mode 100644 index 04d0ce35b..000000000 --- a/examples/cat_facts/test/unit/repository/facts_repository_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:cat_facts/repository/api_client.dart'; -import 'package:cat_facts/repository/facts/facts_repository.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:http/http.dart'; -import 'package:mocktail/mocktail.dart'; - -class ApiClientMock extends Mock implements ApiClient {} - -/// Тесты для [FactsRepository] -void main() { - late ApiClientMock appClient; - late FactsRepository factsRepository; - - setUp(() { - appClient = ApiClientMock(); - - factsRepository = FactsRepository(appClient); - }); - - test('getFacts should make correct request to api', () { - when(() => appClient.get(any(), params: any(named: 'params'))) - .thenAnswer((invocation) => Future.value(Response('', 200))); - - factsRepository.getFacts(10); - - verify(() => appClient.get('/facts', params: {'limit': '10'})).called(1); - }); -} diff --git a/examples/cat_facts/test/widget/theme_button_test.dart b/examples/cat_facts/test/widget/theme_button_test.dart deleted file mode 100644 index 27afeb114..000000000 --- a/examples/cat_facts/test/widget/theme_button_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:cat_facts/data/theme/app_theme.dart'; -import 'package:cat_facts/ui/screen/facts/components/theme_button.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:golden_toolkit/src/testing_tools.dart'; - -void main() { - group('ThemeButton builds', () { - testWidgets('for light theme', (tester) async { - await tester.pumpWidgetBuilder( - const ThemeButton(theme: AppTheme.light), - ); - - expect(find.text('Switch Off'), findsOneWidget); - expect(find.text('Switch On'), findsNothing); - - final typeFinder = find.byWidgetPredicate( - (widget) { - if (widget is! Icon) { - return false; - } - - return widget.icon == Icons.brightness_3; - }, - ); - - expect(typeFinder, findsOneWidget); - }); - - testWidgets('for dark theme', (tester) async { - await tester.pumpWidgetBuilder( - const ThemeButton(theme: AppTheme.dark), - ); - - expect(find.text('Switch Off'), findsNothing); - expect(find.text('Switch On'), findsOneWidget); - - final typeFinder = find.byWidgetPredicate((widget) { - if (widget is! Icon) { - return false; - } - - return widget.icon == Icons.brightness_7; - }); - - expect(typeFinder, findsOneWidget); - }); - }); -} diff --git a/examples/cat_facts/web/favicon.png b/examples/cat_facts/web/favicon.png deleted file mode 100644 index 8aaa46ac1..000000000 Binary files a/examples/cat_facts/web/favicon.png and /dev/null differ diff --git a/examples/cat_facts/web/icons/Icon-192.png b/examples/cat_facts/web/icons/Icon-192.png deleted file mode 100644 index b749bfef0..000000000 Binary files a/examples/cat_facts/web/icons/Icon-192.png and /dev/null differ diff --git a/examples/cat_facts/web/icons/Icon-512.png b/examples/cat_facts/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48df..000000000 Binary files a/examples/cat_facts/web/icons/Icon-512.png and /dev/null differ diff --git a/examples/cat_facts/web/index.html b/examples/cat_facts/web/index.html deleted file mode 100644 index 5d19126c4..000000000 --- a/examples/cat_facts/web/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - cat_facts - - - - - - - - diff --git a/examples/cat_facts/web/manifest.json b/examples/cat_facts/web/manifest.json deleted file mode 100644 index 70e5b94ba..000000000 --- a/examples/cat_facts/web/manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "cat_facts", - "short_name": "cat_facts", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} diff --git a/examples/github/.gitignore b/examples/github/.gitignore deleted file mode 100644 index 21da50c4e..000000000 --- a/examples/github/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# iOS/XCode related -**/ios/Flutter/flutter_export_environment.sh -**/ios/Podfile - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Exceptions to above rules. -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages -!/lib/model/common/network/auth_const.dart diff --git a/examples/github/.metadata b/examples/github/.metadata deleted file mode 100644 index cfa918361..000000000 --- a/examples/github/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 456d80b9ddd74b4b5ca3b77bbfb70ab0e05d3fa8 - channel: dev - -project_type: app diff --git a/examples/github/README.md b/examples/github/README.md deleted file mode 100644 index eef3d309c..000000000 --- a/examples/github/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# mwwm_github_client - -An example of mwwm architecture. - -Github client with search and add to favorites - -### How to run? - -[Create oauth app in your github account](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/) -with: -Authorization callback URL - **my.app://oauth2redirect** - -Then replace **your-client-id** and **your-client-secret** in -``` -const clientId = 'your-client-id'; -const clientSecret = 'your-client-secret'; -``` diff --git a/examples/github/analysis_options.yaml b/examples/github/analysis_options.yaml deleted file mode 100644 index 441abb592..000000000 --- a/examples/github/analysis_options.yaml +++ /dev/null @@ -1,117 +0,0 @@ -include: package:pedantic/analysis_options.yaml - -analyzer: - exclude: - - "**/*.g.dart" - - "build/**" - strong-mode: - implicit-casts: false - implicit-dynamic: true - -linter: - rules: - omit_local_variable_types: false - camel_case_types: true - avoid_print: true - avoid_relative_lib_imports: true - avoid_returning_null_for_future: true - avoid_slow_async_io: true - avoid_types_as_parameter_names: true - cancel_subscriptions: true - close_sinks: true - control_flow_in_finally: true - empty_statements: true - hash_and_equals: true - no_duplicate_case_values: true - prefer_void_to_null: true - throw_in_finally: true - unnecessary_statements: true - unrelated_type_equality_checks: true - always_declare_return_types: true - always_put_required_named_parameters_first: true - always_require_non_null_named_parameters: true - annotate_overrides: true - avoid_annotating_with_dynamic: true - avoid_as: false - avoid_bool_literals_in_conditional_expressions: true - avoid_catches_without_on_clauses: true - avoid_catching_errors: true - avoid_equals_and_hash_code_on_mutable_classes: true - avoid_field_initializers_in_const_classes: true - avoid_function_literals_in_foreach_calls: true - avoid_init_to_null: true - avoid_positional_boolean_parameters: true - avoid_private_typedef_functions: true - avoid_renaming_method_parameters: true - avoid_return_types_on_setters: true - avoid_returning_null: true - avoid_returning_null_for_void: true - avoid_returning_this: true - avoid_setters_without_getters: true - avoid_shadowing_type_parameters: true - avoid_types_on_closure_parameters: true - avoid_unnecessary_containers: true - avoid_unused_constructor_parameters: true - avoid_void_async: true - await_only_futures: true - camel_case_extensions: true - constant_identifier_names: true - curly_braces_in_flow_control_structures: true - directives_ordering: true - empty_catches: true - empty_constructor_bodies: true - file_names: true - implementation_imports: true - library_names: true - library_prefixes: true - lines_longer_than_80_chars: true - non_constant_identifier_names: true - null_closures: true - only_throw_errors: true - overridden_fields: true - parameter_assignments: true - prefer_collection_literals: true - prefer_conditional_assignment: true - prefer_contains: true - prefer_equal_for_default_values: true - prefer_final_fields: true - prefer_final_locals: true - prefer_for_elements_to_map_fromIterable: true - prefer_function_declarations_over_variables: true - prefer_generic_function_type_aliases: true - prefer_if_null_operators: true - prefer_initializing_formals: true - prefer_inlined_adds: true - prefer_interpolation_to_compose_strings: true - prefer_is_empty: true - prefer_is_not_empty: true - prefer_is_not_operator: true - prefer_iterable_whereType: true - prefer_mixin: true - prefer_null_aware_operators: true - prefer_single_quotes: true - provide_deprecation_message: true - recursive_getters: true - sort_constructors_first: true - sort_unnamed_constructors_first: true - type_init_formals: true - unawaited_futures: false - unnecessary_await_in_return: true - unnecessary_brace_in_string_interps: true - unnecessary_const: true - unnecessary_getters_setters: true - unnecessary_lambdas: true - unnecessary_new: true - unnecessary_null_aware_assignments: true - unnecessary_null_in_if_null_operators: true - unnecessary_overrides: true - unnecessary_parenthesis: true - unnecessary_this: true - use_full_hex_values_for_flutter_colors: true - use_function_type_syntax_for_parameters: true - use_rethrow_when_possible: true - use_setters_to_change_properties: true - use_string_buffers: true - prefer_const_constructors: true - prefer_const_declarations: true - prefer_const_literals_to_create_immutables: true diff --git a/examples/github/android/.gitignore b/examples/github/android/.gitignore deleted file mode 100644 index bc2100d8f..000000000 --- a/examples/github/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/examples/github/android/app/build.gradle b/examples/github/android/app/build.gradle deleted file mode 100644 index ba0206232..000000000 --- a/examples/github/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.mwwm_github_client" - minSdkVersion 21 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/examples/github/android/app/src/debug/AndroidManifest.xml b/examples/github/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index ba9d66791..000000000 --- a/examples/github/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/github/android/app/src/main/AndroidManifest.xml b/examples/github/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 95e75566f..000000000 --- a/examples/github/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/github/android/app/src/main/kotlin/com/example/mwwm_github_client/MainActivity.kt b/examples/github/android/app/src/main/kotlin/com/example/mwwm_github_client/MainActivity.kt deleted file mode 100644 index 030bb7b0b..000000000 --- a/examples/github/android/app/src/main/kotlin/com/example/mwwm_github_client/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.mwwm_github_client - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/examples/github/android/app/src/main/res/drawable/launch_background.xml b/examples/github/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/examples/github/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/github/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/github/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/examples/github/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/github/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/github/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/examples/github/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/github/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/github/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/examples/github/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/github/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/github/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/examples/github/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/github/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/github/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/examples/github/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/github/android/app/src/main/res/values/styles.xml b/examples/github/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33fd..000000000 --- a/examples/github/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/github/android/app/src/profile/AndroidManifest.xml b/examples/github/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index ba9d66791..000000000 --- a/examples/github/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/github/android/build.gradle b/examples/github/android/build.gradle deleted file mode 100644 index 3100ad2d5..000000000 --- a/examples/github/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/examples/github/android/gradle.properties b/examples/github/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/examples/github/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/examples/github/android/gradle/wrapper/gradle-wrapper.properties b/examples/github/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/examples/github/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/examples/github/android/settings.gradle b/examples/github/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/examples/github/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/examples/github/ios/.gitignore b/examples/github/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/examples/github/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/github/ios/Flutter/AppFrameworkInfo.plist b/examples/github/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/examples/github/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/examples/github/ios/Flutter/Debug.xcconfig b/examples/github/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba114..000000000 --- a/examples/github/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/examples/github/ios/Flutter/Release.xcconfig b/examples/github/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e9340e..000000000 --- a/examples/github/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/examples/github/ios/Runner.xcodeproj/project.pbxproj b/examples/github/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index df0f9e470..000000000 --- a/examples/github/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,580 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - C4037D91001D74330777A7B3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BDFB26A007137DA8C012826F /* Pods_Runner.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 0CF1A8754E0FCBCA33203586 /* 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 = ""; }; - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 1B56ECECD9D3635C8683AE86 /* 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 = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BDFB26A007137DA8C012826F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D8AF64A030699E0D171B665A /* 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C4037D91001D74330777A7B3 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 06C581143C2EB69E646FD673 /* Pods */ = { - isa = PBXGroup; - children = ( - 1B56ECECD9D3635C8683AE86 /* Pods-Runner.debug.xcconfig */, - D8AF64A030699E0D171B665A /* Pods-Runner.release.xcconfig */, - 0CF1A8754E0FCBCA33203586 /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - 5891F72C46C7CA4CEDA53512 /* Frameworks */ = { - isa = PBXGroup; - children = ( - BDFB26A007137DA8C012826F /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - 06C581143C2EB69E646FD673 /* Pods */, - 5891F72C46C7CA4CEDA53512 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 52D4AE3548D2C3FE1FE173FD /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 11252342782942614C403049 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 11252342782942614C403049 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 52D4AE3548D2C3FE1FE173FD /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "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"; - showEnvVarsInLog = 0; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.mwwmGithubClient; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.mwwmGithubClient; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.mwwmGithubClient; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/github/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/github/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/examples/github/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/github/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/github/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/github/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/github/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/github/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/github/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/github/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/github/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/examples/github/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/github/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/github/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14c..000000000 --- a/examples/github/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/github/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/github/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/github/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/github/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/github/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/github/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/github/ios/Runner/AppDelegate.swift b/examples/github/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/examples/github/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index bd77dd655..000000000 --- a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index a91bfcd30..000000000 --- a/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "LaunchImage.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/examples/github/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/examples/github/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/github/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/examples/github/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/github/ios/Runner/Base.lproj/Main.storyboard b/examples/github/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/examples/github/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/github/ios/Runner/Info.plist b/examples/github/ios/Runner/Info.plist deleted file mode 100644 index f957ee82c..000000000 --- a/examples/github/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - mwwm_github_client - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/examples/github/ios/Runner/Runner-Bridging-Header.h b/examples/github/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/examples/github/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/github/lib/data/owner.dart b/examples/github/lib/data/owner.dart deleted file mode 100644 index fa26c5012..000000000 --- a/examples/github/lib/data/owner.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -class Owner { - Owner({ - this.login, - this.id, - this.nodeId, - this.avatarUrl, - this.gravatarId, - this.url, - this.receivedEventsUrl, - this.type, - }); - - String login; - int id; - String nodeId; - String avatarUrl; - String gravatarId; - String url; - String receivedEventsUrl; - String type; - - @override - String toString() => { - 'login': login, - 'id': id, - 'nodeId': nodeId, - 'avatarUrl': avatarUrl, - 'gravatarId': gravatarId, - 'url': url, - 'receivedEventsUrl': receivedEventsUrl, - 'type': type, - }.toString(); -} diff --git a/examples/github/lib/data/repository.dart b/examples/github/lib/data/repository.dart deleted file mode 100644 index bfba1af62..000000000 --- a/examples/github/lib/data/repository.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/foundation.dart'; -import 'package:mwwm_github_client/data/owner.dart'; - -class Repository { - Repository({ - @required this.owner, - this.id, - this.nodeId, - this.name, - this.fullName, - this.private, - this.htmlUrl, - this.description, - this.fork, - this.url, - this.createdAt, - this.updatedAt, - this.pushedAt, - this.homepage, - this.size, - this.stargazersCount, - this.watchersCount, - this.language, - this.forksCount, - this.openIssuesCount, - this.masterBranch, - this.defaultBranch, - this.score, - bool isFavorite, - }) : isFavorite = isFavorite ?? false; - - int id; - String nodeId; - String name; - String fullName; - Owner owner; - bool private; - String htmlUrl; - String description; - bool fork; - String url; - String createdAt; - String updatedAt; - String pushedAt; - String homepage; - int size; - int stargazersCount; - int watchersCount; - String language; - int forksCount; - int openIssuesCount; - String masterBranch; - String defaultBranch; - double score; - bool isFavorite; - - @override - String toString() => { - 'id': id, - 'nodeId': nodeId, - 'name': name, - 'fullName': fullName, - 'private': private, - 'htmlUrl': htmlUrl, - 'description': description, - 'fork': fork, - 'url': url, - 'createdAt': createdAt, - 'updatedAt': updatedAt, - 'pushedAt': pushedAt, - 'homepage': homepage, - 'size': size, - 'stargazersCount': stargazersCount, - 'watchersCount': watchersCount, - 'language': language, - 'forksCount': forksCount, - 'openIssuesCount': openIssuesCount, - 'masterBranch': masterBranch, - 'defaultBranch': defaultBranch, - 'score': score, - 'isFavorite': isFavorite, - }.toString(); -} diff --git a/examples/github/lib/data/repository_list.dart b/examples/github/lib/data/repository_list.dart deleted file mode 100644 index 5347597fe..000000000 --- a/examples/github/lib/data/repository_list.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm_github_client/data/repository.dart'; - -class RepositoryList { - RepositoryList({ - this.totalCount, - this.incompleteResults, - this.items, - }); - - int totalCount; - bool incompleteResults; - List items; - - @override - String toString() => { - 'totalCount': totalCount, - 'incompleteResults': incompleteResults, - 'items': items, - }.toString(); -} diff --git a/examples/github/lib/main.dart b/examples/github/lib/main.dart deleted file mode 100644 index 91eebc07f..000000000 --- a/examples/github/lib/main.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/model/auth/repository/auth_repository.dart'; -import 'package:mwwm_github_client/model/common/network/auth_network_client.dart'; -import 'package:mwwm_github_client/model/favorites/database/database.dart'; -import 'package:mwwm_github_client/model/favorites/repository/favorites_repository.dart'; -import 'package:mwwm_github_client/model/github/repository/github_repository.dart'; -import 'package:mwwm_github_client/ui/app.dart'; -import 'package:provider/provider.dart'; - -void main() { - runApp( - Provider( - create: (_) => Database(), - child: MultiProvider( - providers: [ - Provider( - create: (context) => AuthNetworkClient(), - ), - Provider( - create: (context) => AuthRepository( - context.read(), - ), - ), - Provider( - create: (context) => WidgetModelDependencies( - errorHandler: DefaultErrorHandler(), - ), - ), - Provider( - create: (context) => GithubRepository( - context.read(), - ), - ), - Provider( - create: (context) => FavoritesRepository(Database()), - ), - ], - child: App(), - ), - ), - ); -} - -/// Log errors -class DefaultErrorHandler implements ErrorHandler { - @override - void handleError(Object e) { - debugPrint(e.toString()); - } -} diff --git a/examples/github/lib/model/auth/changes.dart b/examples/github/lib/model/auth/changes.dart deleted file mode 100644 index fffbb9412..000000000 --- a/examples/github/lib/model/auth/changes.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; - -/// Authorize in github -class AuthorizeInGithub extends FutureChange {} - -/// Disconnect from github -class DisconnectGithub extends FutureChange {} - -/// Get access token -class GetAccessToken extends FutureChange {} - -/// Check is user auth -class IsUserAuthorize extends FutureChange {} diff --git a/examples/github/lib/model/auth/performers.dart b/examples/github/lib/model/auth/performers.dart deleted file mode 100644 index 7c3450491..000000000 --- a/examples/github/lib/model/auth/performers.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/model/auth/changes.dart'; -import 'package:mwwm_github_client/model/auth/repository/auth_repository.dart'; - -/// Authorize github performer -class AuthorizeInGithubPerformer - extends FuturePerformer { - AuthorizeInGithubPerformer(this._authRepository); - - final AuthRepository _authRepository; - - @override - Future perform(AuthorizeInGithub change) => _authRepository.auth(); -} - -class DisconnectGithubPerformer - extends FuturePerformer { - DisconnectGithubPerformer(this._authRepository); - - final AuthRepository _authRepository; - - @override - Future perform(DisconnectGithub change) => _authRepository.disconnect(); -} - -class GetAccessTokenPerformer extends FuturePerformer { - GetAccessTokenPerformer(this._authRepository); - - final AuthRepository _authRepository; - - @override - Future perform(GetAccessToken change) => _authRepository.getToken(); -} - -class IsUserAuthorizePerformer extends FuturePerformer { - IsUserAuthorizePerformer(this._authRepository); - - final AuthRepository _authRepository; - - @override - Future perform(IsUserAuthorize change) => _authRepository.isUserAuth(); -} diff --git a/examples/github/lib/model/auth/repository/auth_repository.dart b/examples/github/lib/model/auth/repository/auth_repository.dart deleted file mode 100644 index 41d99aa9f..000000000 --- a/examples/github/lib/model/auth/repository/auth_repository.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm_github_client/model/common/network/auth_network_client.dart'; - -/// Github auth repository -class AuthRepository { - AuthRepository(this._networkClient); - - final AuthNetworkClient _networkClient; - - Future auth() => _networkClient.auth(); - - Future disconnect() => _networkClient.disconnect(); - - Future getToken() => _networkClient.getToken(); - - Future isUserAuth() async => _networkClient.isUserAuth(); -} diff --git a/examples/github/lib/model/common/error/network_error_handler.dart b/examples/github/lib/model/common/error/network_error_handler.dart deleted file mode 100644 index 1f95d683f..000000000 --- a/examples/github/lib/model/common/error/network_error_handler.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/utils/exceptions.dart'; - -/// Handler for network errors -abstract class NetworkErrorHandler implements ErrorHandler { - @override - void handleError(Object e) { - Exception exception; - if (e is Exception) { - exception = e; - } else if (e is Error) { - exception = Exception(e.stackTrace); - } else { - exception = Exception(e.toString()); - } - - if (exception is NoInternetException) { - handleNoInternetException(exception); - } else { - handleOtherException(exception); - } - } - - void handleNoInternetException(NoInternetException exception); - - void handleOtherException(Exception exception); -} diff --git a/examples/github/lib/model/common/error/standard_error_handler.dart b/examples/github/lib/model/common/error/standard_error_handler.dart deleted file mode 100644 index c88f656f2..000000000 --- a/examples/github/lib/model/common/error/standard_error_handler.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm_github_client/utils/exceptions.dart'; -import 'package:mwwm_github_client/model/common/error/network_error_handler.dart'; - -class StandardErrorHandler extends NetworkErrorHandler { - StandardErrorHandler( - this._scaffoldKey, - ); - - final GlobalKey _scaffoldKey; - - @override - void handleOtherException(Exception exception) { - _showMessage(exception.toString()); - } - - @override - void handleNoInternetException(NoInternetException exception) => - _showMessage('Интернет не доступен \nПроверьте соединение'); - - void _showMessage(String message) { - _scaffoldKey?.currentState?.showSnackBar( - SnackBar(content: Text(message)), - ); - } -} diff --git a/examples/github/lib/model/common/network/auth_const.dart b/examples/github/lib/model/common/network/auth_const.dart deleted file mode 100644 index c04bb5efb..000000000 --- a/examples/github/lib/model/common/network/auth_const.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Client id from github -const clientId = 'your-client-id'; - -/// Client secret from github -const clientSecret = 'your-client-secret'; diff --git a/examples/github/lib/model/common/network/auth_network_client.dart b/examples/github/lib/model/common/network/auth_network_client.dart deleted file mode 100644 index f3003699d..000000000 --- a/examples/github/lib/model/common/network/auth_network_client.dart +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:dio/dio.dart' as d; -import 'package:flutter/services.dart'; -import 'package:mwwm_github_client/model/common/network/auth_const.dart'; -import 'package:mwwm_github_client/model/common/network/network_client.dart'; -import 'package:mwwm_github_client/utils/exceptions.dart'; -import 'package:mwwm_github_client/utils/future_extensions.dart'; -import 'package:oauth2_client/github_oauth2_client.dart'; -import 'package:oauth2_client/oauth2_client.dart'; -import 'package:oauth2_client/oauth2_exception.dart'; -import 'package:oauth2_client/oauth2_helper.dart'; -import 'package:http/http.dart' show Response; - -/// Http client based on Dio -class AuthNetworkClient implements NetworkClient { - AuthNetworkClient() { - _authClient = GitHubOAuth2Client( - redirectUri: 'my.app://oauth2redirect', - - // This is not a Bundle identifier. - // this is a custom scheme for redirecting - // from the browser to this application - customUriScheme: 'my.app', - ); - - _oauth2Helper = OAuth2Helper( - _authClient, - clientId: clientId, - clientSecret: clientSecret, - scopes: ['repo'], - ); - } - - OAuth2Client _authClient; - - OAuth2Helper _oauth2Helper; - - /// Authorize on github - Future auth() { - return _oauth2Helper - .fetchToken() - .then((response) => response?.tokenType != null ?? false) - .catchType((e) => throw _mapException(e)); - } - - Future disconnect() { - return _oauth2Helper - .disconnect() - .catchType((e) => throw _mapException(e)); - } - - /// Get access token - Future getToken() { - return _oauth2Helper - .getToken() - .then((response) => response.tokenType) - .catchType((e) => throw _mapException(e)); - } - - ///Check is user auth - Future isUserAuth() { - return _oauth2Helper - .getTokenFromStorage() - .then((response) => response != null) - .catchType((e) => throw _mapException(e)); - } - - @override - Future get(String url) { - return _oauth2Helper - .get(url) - .catchType((e) => throw _mapException(e)); - } - - /// Map third party exception to local - Exception _mapException(Exception e) { - if (e is PlatformException) { - if (e.code == 'CANCELED' && e.message == 'User canceled login') { - return CanceledAuthorizationException(); - } - } - - if (e is d.DioError) { - if (e.type == d.DioErrorType.DEFAULT) { - return NoInternetException(message: e.error.toString()); - } - } - - if (e is OAuth2Exception) { - if (e.error == 'incorrect_client_credentials') { - return IncorrectClientCredentionalsException(); - } - } - - return e; - } -} diff --git a/examples/github/lib/model/common/network/network_client.dart b/examples/github/lib/model/common/network/network_client.dart deleted file mode 100644 index 902cbaf47..000000000 --- a/examples/github/lib/model/common/network/network_client.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:http/http.dart' show Response; - -/// Custom http client interface -abstract class NetworkClient { - /// Make http GET request - Future get(String url); -} diff --git a/examples/github/lib/model/favorites/changes.dart b/examples/github/lib/model/favorites/changes.dart deleted file mode 100644 index bff8c19df..000000000 --- a/examples/github/lib/model/favorites/changes.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/repository.dart'; - -/// Switch repository's favorite value -class ToggleRepositoryFavoriteValue extends FutureChange { - ToggleRepositoryFavoriteValue( - this.repo, { - this.isFavorite, - }); - - final Repository repo; - final bool isFavorite; -} - -/// Receive favorite repositories -class GetFavoriteRepositories extends FutureChange> {} - -/// Check repository is favorites -class DefineFavoritesFromRepository extends FutureChange> { - DefineFavoritesFromRepository(this.repositories); - - final List repositories; -} diff --git a/examples/github/lib/model/favorites/database/database.dart b/examples/github/lib/model/favorites/database/database.dart deleted file mode 100644 index 8afbee54e..000000000 --- a/examples/github/lib/model/favorites/database/database.dart +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:io'; - -import 'package:moor/ffi.dart'; -import 'package:moor/moor.dart'; -import 'package:moor_flutter/moor_flutter.dart'; -import 'package:mwwm_github_client/data/owner.dart'; -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/favorites/database/table/tables.dart'; -import 'package:path/path.dart' as p; -import 'package:path_provider/path_provider.dart'; - -part 'database.g.dart'; - -LazyDatabase _openConnection() { - // the LazyDatabase util lets us find the right location for the file async. - return LazyDatabase(() async { - // put the database file, called db.sqlite here, into the documents folder - // for your app. - final dbFolder = await getApplicationDocumentsDirectory(); - final file = File(p.join(dbFolder.path, 'db.sqlite')); - return VmDatabase(file); - }); -} - -@UseMoor( - tables: [FavoritesRepoTable, OwnerTable], - daos: [RepoDao], -) -class Database extends _$Database { - Database() : super(_openConnection()); - - @override - int get schemaVersion => 1; -} - -@UseDao( - tables: [ - FavoritesRepoTable, - OwnerTable, - ], -) -class RepoDao extends DatabaseAccessor with _$RepoDaoMixin { - RepoDao(Database attachedDatabase) : super(attachedDatabase); - - Future> get getAllRepos => select(favoritesRepoTable) - .join([ - leftOuterJoin( - ownerTable, - ownerTable.id.equalsExp(favoritesRepoTable.ownerId), - ), - ]) - .get() - .then( - (value) => value.map((e) { - final FavoritesRepoTableData repoData = e.readTable( - favoritesRepoTable, - ); - final OwnerTableData ownerData = e.readTable(ownerTable); - - return _getRepository(repoData, ownerData); - }).toList(), - ); - - Future> getRepoByName(String name) async { - final query = select(favoritesRepoTable)..where((t) => t.name.equals(name)); - - return query - .join([ - leftOuterJoin( - ownerTable, - ownerTable.id.equalsExp(favoritesRepoTable.ownerId), - ), - ]) - .get() - .then((value) => value.map((e) { - final FavoritesRepoTableData repoData = e.readTable( - favoritesRepoTable, - ); - final OwnerTableData ownerData = e.readTable(ownerTable); - - return _getRepository(repoData, ownerData); - }).toList()); - } - - Future insertRepo( - FavoritesRepoTableData repoData, - OwnerTableData ownerData, - ) async { - await into(favoritesRepoTable).insert(repoData); - await into(ownerTable).insert(ownerData); - } - - Future updateRepo( - FavoritesRepoTableData repoData, - OwnerTableData ownerData, - ) async { - await update(favoritesRepoTable).replace(repoData); - await update(ownerTable).replace(ownerData); - } - - Future deleteRepo( - FavoritesRepoTableData data, - OwnerTableData ownerData, - ) async { - await delete(favoritesRepoTable).delete(data); - await delete(ownerTable).delete(ownerData); - } -} - -Repository _getRepository( - FavoritesRepoTableData repoData, - OwnerTableData ownerData, -) { - final owner = Owner( - id: ownerData.id, - login: ownerData.login, - nodeId: ownerData.nodeId, - avatarUrl: ownerData.avatarUrl, - gravatarId: ownerData.gravatarId, - url: ownerData.url, - receivedEventsUrl: ownerData.receivedEventsUrl, - type: ownerData.type, - ); - - return Repository( - id: repoData.id, - owner: owner, - nodeId: repoData.nodeId, - name: repoData.name, - fullName: repoData.fullName, - private: repoData.private, - htmlUrl: repoData.htmlUrl, - description: repoData.description, - fork: repoData.fork, - url: repoData.url, - createdAt: repoData.createdAt, - updatedAt: repoData.updatedAt, - pushedAt: repoData.pushedAt, - homepage: repoData.homepage, - size: repoData.size, - stargazersCount: repoData.stargazersCount, - watchersCount: repoData.watchersCount, - language: repoData.language, - forksCount: repoData.forksCount, - openIssuesCount: repoData.openIssuesCount, - masterBranch: repoData.masterBranch, - defaultBranch: repoData.defaultBranch, - score: repoData.score, - isFavorite: true, - ); -} diff --git a/examples/github/lib/model/favorites/database/database.g.dart b/examples/github/lib/model/favorites/database/database.g.dart deleted file mode 100644 index 1870ef33a..000000000 --- a/examples/github/lib/model/favorites/database/database.g.dart +++ /dev/null @@ -1,1649 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'database.dart'; - -// ************************************************************************** -// MoorGenerator -// ************************************************************************** - -// ignore_for_file: unnecessary_brace_in_string_interps, unnecessary_this -class FavoritesRepoTableData extends DataClass - implements Insertable { - final int id; - final String nodeId; - final String name; - final String fullName; - final int ownerId; - final bool private; - final String htmlUrl; - final String description; - final bool fork; - final String url; - final String createdAt; - final String updatedAt; - final String pushedAt; - final String homepage; - final int size; - final int stargazersCount; - final int watchersCount; - final String language; - final int forksCount; - final int openIssuesCount; - final String masterBranch; - final String defaultBranch; - final double score; - FavoritesRepoTableData( - {@required this.id, - this.nodeId, - this.name, - this.fullName, - this.ownerId, - this.private, - this.htmlUrl, - this.description, - this.fork, - this.url, - this.createdAt, - this.updatedAt, - this.pushedAt, - this.homepage, - this.size, - this.stargazersCount, - this.watchersCount, - this.language, - this.forksCount, - this.openIssuesCount, - this.masterBranch, - this.defaultBranch, - this.score}); - factory FavoritesRepoTableData.fromData( - Map data, GeneratedDatabase db, - {String prefix}) { - final effectivePrefix = prefix ?? ''; - final intType = db.typeSystem.forDartType(); - final stringType = db.typeSystem.forDartType(); - final boolType = db.typeSystem.forDartType(); - final doubleType = db.typeSystem.forDartType(); - return FavoritesRepoTableData( - id: intType.mapFromDatabaseResponse(data['${effectivePrefix}id']), - nodeId: - stringType.mapFromDatabaseResponse(data['${effectivePrefix}nodeId']), - name: stringType.mapFromDatabaseResponse(data['${effectivePrefix}name']), - fullName: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}fullName']), - ownerId: - intType.mapFromDatabaseResponse(data['${effectivePrefix}ownerId']), - private: - boolType.mapFromDatabaseResponse(data['${effectivePrefix}private']), - htmlUrl: - stringType.mapFromDatabaseResponse(data['${effectivePrefix}htmlUrl']), - description: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}description']), - fork: boolType.mapFromDatabaseResponse(data['${effectivePrefix}fork']), - url: stringType.mapFromDatabaseResponse(data['${effectivePrefix}url']), - createdAt: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}createdAt']), - updatedAt: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}updatedAt']), - pushedAt: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}pushedAt']), - homepage: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}homepage']), - size: intType.mapFromDatabaseResponse(data['${effectivePrefix}size']), - stargazersCount: intType - .mapFromDatabaseResponse(data['${effectivePrefix}stargazersCount']), - watchersCount: intType - .mapFromDatabaseResponse(data['${effectivePrefix}watchersCount']), - language: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}language']), - forksCount: - intType.mapFromDatabaseResponse(data['${effectivePrefix}forksCount']), - openIssuesCount: intType - .mapFromDatabaseResponse(data['${effectivePrefix}openIssuesCount']), - masterBranch: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}masterBranch']), - defaultBranch: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}defaultBranch']), - score: - doubleType.mapFromDatabaseResponse(data['${effectivePrefix}score']), - ); - } - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (!nullToAbsent || id != null) { - map['id'] = Variable(id); - } - if (!nullToAbsent || nodeId != null) { - map['nodeId'] = Variable(nodeId); - } - if (!nullToAbsent || name != null) { - map['name'] = Variable(name); - } - if (!nullToAbsent || fullName != null) { - map['fullName'] = Variable(fullName); - } - if (!nullToAbsent || ownerId != null) { - map['ownerId'] = Variable(ownerId); - } - if (!nullToAbsent || private != null) { - map['private'] = Variable(private); - } - if (!nullToAbsent || htmlUrl != null) { - map['htmlUrl'] = Variable(htmlUrl); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || fork != null) { - map['fork'] = Variable(fork); - } - if (!nullToAbsent || url != null) { - map['url'] = Variable(url); - } - if (!nullToAbsent || createdAt != null) { - map['createdAt'] = Variable(createdAt); - } - if (!nullToAbsent || updatedAt != null) { - map['updatedAt'] = Variable(updatedAt); - } - if (!nullToAbsent || pushedAt != null) { - map['pushedAt'] = Variable(pushedAt); - } - if (!nullToAbsent || homepage != null) { - map['homepage'] = Variable(homepage); - } - if (!nullToAbsent || size != null) { - map['size'] = Variable(size); - } - if (!nullToAbsent || stargazersCount != null) { - map['stargazersCount'] = Variable(stargazersCount); - } - if (!nullToAbsent || watchersCount != null) { - map['watchersCount'] = Variable(watchersCount); - } - if (!nullToAbsent || language != null) { - map['language'] = Variable(language); - } - if (!nullToAbsent || forksCount != null) { - map['forksCount'] = Variable(forksCount); - } - if (!nullToAbsent || openIssuesCount != null) { - map['openIssuesCount'] = Variable(openIssuesCount); - } - if (!nullToAbsent || masterBranch != null) { - map['masterBranch'] = Variable(masterBranch); - } - if (!nullToAbsent || defaultBranch != null) { - map['defaultBranch'] = Variable(defaultBranch); - } - if (!nullToAbsent || score != null) { - map['score'] = Variable(score); - } - return map; - } - - FavoritesRepoTableCompanion toCompanion(bool nullToAbsent) { - return FavoritesRepoTableCompanion( - id: id == null && nullToAbsent ? const Value.absent() : Value(id), - nodeId: - nodeId == null && nullToAbsent ? const Value.absent() : Value(nodeId), - name: name == null && nullToAbsent ? const Value.absent() : Value(name), - fullName: fullName == null && nullToAbsent - ? const Value.absent() - : Value(fullName), - ownerId: ownerId == null && nullToAbsent - ? const Value.absent() - : Value(ownerId), - private: private == null && nullToAbsent - ? const Value.absent() - : Value(private), - htmlUrl: htmlUrl == null && nullToAbsent - ? const Value.absent() - : Value(htmlUrl), - description: description == null && nullToAbsent - ? const Value.absent() - : Value(description), - fork: fork == null && nullToAbsent ? const Value.absent() : Value(fork), - url: url == null && nullToAbsent ? const Value.absent() : Value(url), - createdAt: createdAt == null && nullToAbsent - ? const Value.absent() - : Value(createdAt), - updatedAt: updatedAt == null && nullToAbsent - ? const Value.absent() - : Value(updatedAt), - pushedAt: pushedAt == null && nullToAbsent - ? const Value.absent() - : Value(pushedAt), - homepage: homepage == null && nullToAbsent - ? const Value.absent() - : Value(homepage), - size: size == null && nullToAbsent ? const Value.absent() : Value(size), - stargazersCount: stargazersCount == null && nullToAbsent - ? const Value.absent() - : Value(stargazersCount), - watchersCount: watchersCount == null && nullToAbsent - ? const Value.absent() - : Value(watchersCount), - language: language == null && nullToAbsent - ? const Value.absent() - : Value(language), - forksCount: forksCount == null && nullToAbsent - ? const Value.absent() - : Value(forksCount), - openIssuesCount: openIssuesCount == null && nullToAbsent - ? const Value.absent() - : Value(openIssuesCount), - masterBranch: masterBranch == null && nullToAbsent - ? const Value.absent() - : Value(masterBranch), - defaultBranch: defaultBranch == null && nullToAbsent - ? const Value.absent() - : Value(defaultBranch), - score: - score == null && nullToAbsent ? const Value.absent() : Value(score), - ); - } - - factory FavoritesRepoTableData.fromJson(Map json, - {ValueSerializer serializer}) { - serializer ??= moorRuntimeOptions.defaultSerializer; - return FavoritesRepoTableData( - id: serializer.fromJson(json['id']), - nodeId: serializer.fromJson(json['nodeId']), - name: serializer.fromJson(json['name']), - fullName: serializer.fromJson(json['fullName']), - ownerId: serializer.fromJson(json['ownerId']), - private: serializer.fromJson(json['private']), - htmlUrl: serializer.fromJson(json['htmlUrl']), - description: serializer.fromJson(json['description']), - fork: serializer.fromJson(json['fork']), - url: serializer.fromJson(json['url']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - pushedAt: serializer.fromJson(json['pushedAt']), - homepage: serializer.fromJson(json['homepage']), - size: serializer.fromJson(json['size']), - stargazersCount: serializer.fromJson(json['stargazersCount']), - watchersCount: serializer.fromJson(json['watchersCount']), - language: serializer.fromJson(json['language']), - forksCount: serializer.fromJson(json['forksCount']), - openIssuesCount: serializer.fromJson(json['openIssuesCount']), - masterBranch: serializer.fromJson(json['masterBranch']), - defaultBranch: serializer.fromJson(json['defaultBranch']), - score: serializer.fromJson(json['score']), - ); - } - @override - Map toJson({ValueSerializer serializer}) { - serializer ??= moorRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'nodeId': serializer.toJson(nodeId), - 'name': serializer.toJson(name), - 'fullName': serializer.toJson(fullName), - 'ownerId': serializer.toJson(ownerId), - 'private': serializer.toJson(private), - 'htmlUrl': serializer.toJson(htmlUrl), - 'description': serializer.toJson(description), - 'fork': serializer.toJson(fork), - 'url': serializer.toJson(url), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'pushedAt': serializer.toJson(pushedAt), - 'homepage': serializer.toJson(homepage), - 'size': serializer.toJson(size), - 'stargazersCount': serializer.toJson(stargazersCount), - 'watchersCount': serializer.toJson(watchersCount), - 'language': serializer.toJson(language), - 'forksCount': serializer.toJson(forksCount), - 'openIssuesCount': serializer.toJson(openIssuesCount), - 'masterBranch': serializer.toJson(masterBranch), - 'defaultBranch': serializer.toJson(defaultBranch), - 'score': serializer.toJson(score), - }; - } - - FavoritesRepoTableData copyWith( - {int id, - String nodeId, - String name, - String fullName, - int ownerId, - bool private, - String htmlUrl, - String description, - bool fork, - String url, - String createdAt, - String updatedAt, - String pushedAt, - String homepage, - int size, - int stargazersCount, - int watchersCount, - String language, - int forksCount, - int openIssuesCount, - String masterBranch, - String defaultBranch, - double score}) => - FavoritesRepoTableData( - id: id ?? this.id, - nodeId: nodeId ?? this.nodeId, - name: name ?? this.name, - fullName: fullName ?? this.fullName, - ownerId: ownerId ?? this.ownerId, - private: private ?? this.private, - htmlUrl: htmlUrl ?? this.htmlUrl, - description: description ?? this.description, - fork: fork ?? this.fork, - url: url ?? this.url, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - pushedAt: pushedAt ?? this.pushedAt, - homepage: homepage ?? this.homepage, - size: size ?? this.size, - stargazersCount: stargazersCount ?? this.stargazersCount, - watchersCount: watchersCount ?? this.watchersCount, - language: language ?? this.language, - forksCount: forksCount ?? this.forksCount, - openIssuesCount: openIssuesCount ?? this.openIssuesCount, - masterBranch: masterBranch ?? this.masterBranch, - defaultBranch: defaultBranch ?? this.defaultBranch, - score: score ?? this.score, - ); - @override - String toString() { - return (StringBuffer('FavoritesRepoTableData(') - ..write('id: $id, ') - ..write('nodeId: $nodeId, ') - ..write('name: $name, ') - ..write('fullName: $fullName, ') - ..write('ownerId: $ownerId, ') - ..write('private: $private, ') - ..write('htmlUrl: $htmlUrl, ') - ..write('description: $description, ') - ..write('fork: $fork, ') - ..write('url: $url, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('pushedAt: $pushedAt, ') - ..write('homepage: $homepage, ') - ..write('size: $size, ') - ..write('stargazersCount: $stargazersCount, ') - ..write('watchersCount: $watchersCount, ') - ..write('language: $language, ') - ..write('forksCount: $forksCount, ') - ..write('openIssuesCount: $openIssuesCount, ') - ..write('masterBranch: $masterBranch, ') - ..write('defaultBranch: $defaultBranch, ') - ..write('score: $score') - ..write(')')) - .toString(); - } - - @override - int get hashCode => $mrjf($mrjc( - id.hashCode, - $mrjc( - nodeId.hashCode, - $mrjc( - name.hashCode, - $mrjc( - fullName.hashCode, - $mrjc( - ownerId.hashCode, - $mrjc( - private.hashCode, - $mrjc( - htmlUrl.hashCode, - $mrjc( - description.hashCode, - $mrjc( - fork.hashCode, - $mrjc( - url.hashCode, - $mrjc( - createdAt.hashCode, - $mrjc( - updatedAt.hashCode, - $mrjc( - pushedAt.hashCode, - $mrjc( - homepage.hashCode, - $mrjc( - size.hashCode, - $mrjc( - stargazersCount - .hashCode, - $mrjc( - watchersCount - .hashCode, - $mrjc( - language - .hashCode, - $mrjc( - forksCount.hashCode, - $mrjc(openIssuesCount.hashCode, $mrjc(masterBranch.hashCode, $mrjc(defaultBranch.hashCode, score.hashCode))))))))))))))))))))))); - @override - bool operator ==(dynamic other) => - identical(this, other) || - (other is FavoritesRepoTableData && - other.id == this.id && - other.nodeId == this.nodeId && - other.name == this.name && - other.fullName == this.fullName && - other.ownerId == this.ownerId && - other.private == this.private && - other.htmlUrl == this.htmlUrl && - other.description == this.description && - other.fork == this.fork && - other.url == this.url && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.pushedAt == this.pushedAt && - other.homepage == this.homepage && - other.size == this.size && - other.stargazersCount == this.stargazersCount && - other.watchersCount == this.watchersCount && - other.language == this.language && - other.forksCount == this.forksCount && - other.openIssuesCount == this.openIssuesCount && - other.masterBranch == this.masterBranch && - other.defaultBranch == this.defaultBranch && - other.score == this.score); -} - -class FavoritesRepoTableCompanion - extends UpdateCompanion { - final Value id; - final Value nodeId; - final Value name; - final Value fullName; - final Value ownerId; - final Value private; - final Value htmlUrl; - final Value description; - final Value fork; - final Value url; - final Value createdAt; - final Value updatedAt; - final Value pushedAt; - final Value homepage; - final Value size; - final Value stargazersCount; - final Value watchersCount; - final Value language; - final Value forksCount; - final Value openIssuesCount; - final Value masterBranch; - final Value defaultBranch; - final Value score; - const FavoritesRepoTableCompanion({ - this.id = const Value.absent(), - this.nodeId = const Value.absent(), - this.name = const Value.absent(), - this.fullName = const Value.absent(), - this.ownerId = const Value.absent(), - this.private = const Value.absent(), - this.htmlUrl = const Value.absent(), - this.description = const Value.absent(), - this.fork = const Value.absent(), - this.url = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.pushedAt = const Value.absent(), - this.homepage = const Value.absent(), - this.size = const Value.absent(), - this.stargazersCount = const Value.absent(), - this.watchersCount = const Value.absent(), - this.language = const Value.absent(), - this.forksCount = const Value.absent(), - this.openIssuesCount = const Value.absent(), - this.masterBranch = const Value.absent(), - this.defaultBranch = const Value.absent(), - this.score = const Value.absent(), - }); - FavoritesRepoTableCompanion.insert({ - this.id = const Value.absent(), - this.nodeId = const Value.absent(), - this.name = const Value.absent(), - this.fullName = const Value.absent(), - this.ownerId = const Value.absent(), - this.private = const Value.absent(), - this.htmlUrl = const Value.absent(), - this.description = const Value.absent(), - this.fork = const Value.absent(), - this.url = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.pushedAt = const Value.absent(), - this.homepage = const Value.absent(), - this.size = const Value.absent(), - this.stargazersCount = const Value.absent(), - this.watchersCount = const Value.absent(), - this.language = const Value.absent(), - this.forksCount = const Value.absent(), - this.openIssuesCount = const Value.absent(), - this.masterBranch = const Value.absent(), - this.defaultBranch = const Value.absent(), - this.score = const Value.absent(), - }); - static Insertable custom({ - Expression id, - Expression nodeId, - Expression name, - Expression fullName, - Expression ownerId, - Expression private, - Expression htmlUrl, - Expression description, - Expression fork, - Expression url, - Expression createdAt, - Expression updatedAt, - Expression pushedAt, - Expression homepage, - Expression size, - Expression stargazersCount, - Expression watchersCount, - Expression language, - Expression forksCount, - Expression openIssuesCount, - Expression masterBranch, - Expression defaultBranch, - Expression score, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (nodeId != null) 'nodeId': nodeId, - if (name != null) 'name': name, - if (fullName != null) 'fullName': fullName, - if (ownerId != null) 'ownerId': ownerId, - if (private != null) 'private': private, - if (htmlUrl != null) 'htmlUrl': htmlUrl, - if (description != null) 'description': description, - if (fork != null) 'fork': fork, - if (url != null) 'url': url, - if (createdAt != null) 'createdAt': createdAt, - if (updatedAt != null) 'updatedAt': updatedAt, - if (pushedAt != null) 'pushedAt': pushedAt, - if (homepage != null) 'homepage': homepage, - if (size != null) 'size': size, - if (stargazersCount != null) 'stargazersCount': stargazersCount, - if (watchersCount != null) 'watchersCount': watchersCount, - if (language != null) 'language': language, - if (forksCount != null) 'forksCount': forksCount, - if (openIssuesCount != null) 'openIssuesCount': openIssuesCount, - if (masterBranch != null) 'masterBranch': masterBranch, - if (defaultBranch != null) 'defaultBranch': defaultBranch, - if (score != null) 'score': score, - }); - } - - FavoritesRepoTableCompanion copyWith( - {Value id, - Value nodeId, - Value name, - Value fullName, - Value ownerId, - Value private, - Value htmlUrl, - Value description, - Value fork, - Value url, - Value createdAt, - Value updatedAt, - Value pushedAt, - Value homepage, - Value size, - Value stargazersCount, - Value watchersCount, - Value language, - Value forksCount, - Value openIssuesCount, - Value masterBranch, - Value defaultBranch, - Value score}) { - return FavoritesRepoTableCompanion( - id: id ?? this.id, - nodeId: nodeId ?? this.nodeId, - name: name ?? this.name, - fullName: fullName ?? this.fullName, - ownerId: ownerId ?? this.ownerId, - private: private ?? this.private, - htmlUrl: htmlUrl ?? this.htmlUrl, - description: description ?? this.description, - fork: fork ?? this.fork, - url: url ?? this.url, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - pushedAt: pushedAt ?? this.pushedAt, - homepage: homepage ?? this.homepage, - size: size ?? this.size, - stargazersCount: stargazersCount ?? this.stargazersCount, - watchersCount: watchersCount ?? this.watchersCount, - language: language ?? this.language, - forksCount: forksCount ?? this.forksCount, - openIssuesCount: openIssuesCount ?? this.openIssuesCount, - masterBranch: masterBranch ?? this.masterBranch, - defaultBranch: defaultBranch ?? this.defaultBranch, - score: score ?? this.score, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (nodeId.present) { - map['nodeId'] = Variable(nodeId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (fullName.present) { - map['fullName'] = Variable(fullName.value); - } - if (ownerId.present) { - map['ownerId'] = Variable(ownerId.value); - } - if (private.present) { - map['private'] = Variable(private.value); - } - if (htmlUrl.present) { - map['htmlUrl'] = Variable(htmlUrl.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (fork.present) { - map['fork'] = Variable(fork.value); - } - if (url.present) { - map['url'] = Variable(url.value); - } - if (createdAt.present) { - map['createdAt'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updatedAt'] = Variable(updatedAt.value); - } - if (pushedAt.present) { - map['pushedAt'] = Variable(pushedAt.value); - } - if (homepage.present) { - map['homepage'] = Variable(homepage.value); - } - if (size.present) { - map['size'] = Variable(size.value); - } - if (stargazersCount.present) { - map['stargazersCount'] = Variable(stargazersCount.value); - } - if (watchersCount.present) { - map['watchersCount'] = Variable(watchersCount.value); - } - if (language.present) { - map['language'] = Variable(language.value); - } - if (forksCount.present) { - map['forksCount'] = Variable(forksCount.value); - } - if (openIssuesCount.present) { - map['openIssuesCount'] = Variable(openIssuesCount.value); - } - if (masterBranch.present) { - map['masterBranch'] = Variable(masterBranch.value); - } - if (defaultBranch.present) { - map['defaultBranch'] = Variable(defaultBranch.value); - } - if (score.present) { - map['score'] = Variable(score.value); - } - return map; - } -} - -class $FavoritesRepoTableTable extends FavoritesRepoTable - with TableInfo<$FavoritesRepoTableTable, FavoritesRepoTableData> { - final GeneratedDatabase _db; - final String _alias; - $FavoritesRepoTableTable(this._db, [this._alias]); - final VerificationMeta _idMeta = const VerificationMeta('id'); - GeneratedIntColumn _id; - @override - GeneratedIntColumn get id => _id ??= _constructId(); - GeneratedIntColumn _constructId() { - return GeneratedIntColumn('id', $tableName, false, - $customConstraints: 'UNIQUE'); - } - - final VerificationMeta _nodeIdMeta = const VerificationMeta('nodeId'); - GeneratedTextColumn _nodeId; - @override - GeneratedTextColumn get nodeId => _nodeId ??= _constructNodeId(); - GeneratedTextColumn _constructNodeId() { - return GeneratedTextColumn( - 'nodeId', - $tableName, - true, - ); - } - - final VerificationMeta _nameMeta = const VerificationMeta('name'); - GeneratedTextColumn _name; - @override - GeneratedTextColumn get name => _name ??= _constructName(); - GeneratedTextColumn _constructName() { - return GeneratedTextColumn( - 'name', - $tableName, - true, - ); - } - - final VerificationMeta _fullNameMeta = const VerificationMeta('fullName'); - GeneratedTextColumn _fullName; - @override - GeneratedTextColumn get fullName => _fullName ??= _constructFullName(); - GeneratedTextColumn _constructFullName() { - return GeneratedTextColumn( - 'fullName', - $tableName, - true, - ); - } - - final VerificationMeta _ownerIdMeta = const VerificationMeta('ownerId'); - GeneratedIntColumn _ownerId; - @override - GeneratedIntColumn get ownerId => _ownerId ??= _constructOwnerId(); - GeneratedIntColumn _constructOwnerId() { - return GeneratedIntColumn('ownerId', $tableName, true, - $customConstraints: 'NULLABLE REFERENCES ownertable(id)'); - } - - final VerificationMeta _privateMeta = const VerificationMeta('private'); - GeneratedBoolColumn _private; - @override - GeneratedBoolColumn get private => _private ??= _constructPrivate(); - GeneratedBoolColumn _constructPrivate() { - return GeneratedBoolColumn( - 'private', - $tableName, - true, - ); - } - - final VerificationMeta _htmlUrlMeta = const VerificationMeta('htmlUrl'); - GeneratedTextColumn _htmlUrl; - @override - GeneratedTextColumn get htmlUrl => _htmlUrl ??= _constructHtmlUrl(); - GeneratedTextColumn _constructHtmlUrl() { - return GeneratedTextColumn( - 'htmlUrl', - $tableName, - true, - ); - } - - final VerificationMeta _descriptionMeta = - const VerificationMeta('description'); - GeneratedTextColumn _description; - @override - GeneratedTextColumn get description => - _description ??= _constructDescription(); - GeneratedTextColumn _constructDescription() { - return GeneratedTextColumn( - 'description', - $tableName, - true, - ); - } - - final VerificationMeta _forkMeta = const VerificationMeta('fork'); - GeneratedBoolColumn _fork; - @override - GeneratedBoolColumn get fork => _fork ??= _constructFork(); - GeneratedBoolColumn _constructFork() { - return GeneratedBoolColumn( - 'fork', - $tableName, - true, - ); - } - - final VerificationMeta _urlMeta = const VerificationMeta('url'); - GeneratedTextColumn _url; - @override - GeneratedTextColumn get url => _url ??= _constructUrl(); - GeneratedTextColumn _constructUrl() { - return GeneratedTextColumn( - 'url', - $tableName, - true, - ); - } - - final VerificationMeta _createdAtMeta = const VerificationMeta('createdAt'); - GeneratedTextColumn _createdAt; - @override - GeneratedTextColumn get createdAt => _createdAt ??= _constructCreatedAt(); - GeneratedTextColumn _constructCreatedAt() { - return GeneratedTextColumn( - 'createdAt', - $tableName, - true, - ); - } - - final VerificationMeta _updatedAtMeta = const VerificationMeta('updatedAt'); - GeneratedTextColumn _updatedAt; - @override - GeneratedTextColumn get updatedAt => _updatedAt ??= _constructUpdatedAt(); - GeneratedTextColumn _constructUpdatedAt() { - return GeneratedTextColumn( - 'updatedAt', - $tableName, - true, - ); - } - - final VerificationMeta _pushedAtMeta = const VerificationMeta('pushedAt'); - GeneratedTextColumn _pushedAt; - @override - GeneratedTextColumn get pushedAt => _pushedAt ??= _constructPushedAt(); - GeneratedTextColumn _constructPushedAt() { - return GeneratedTextColumn( - 'pushedAt', - $tableName, - true, - ); - } - - final VerificationMeta _homepageMeta = const VerificationMeta('homepage'); - GeneratedTextColumn _homepage; - @override - GeneratedTextColumn get homepage => _homepage ??= _constructHomepage(); - GeneratedTextColumn _constructHomepage() { - return GeneratedTextColumn( - 'homepage', - $tableName, - true, - ); - } - - final VerificationMeta _sizeMeta = const VerificationMeta('size'); - GeneratedIntColumn _size; - @override - GeneratedIntColumn get size => _size ??= _constructSize(); - GeneratedIntColumn _constructSize() { - return GeneratedIntColumn( - 'size', - $tableName, - true, - ); - } - - final VerificationMeta _stargazersCountMeta = - const VerificationMeta('stargazersCount'); - GeneratedIntColumn _stargazersCount; - @override - GeneratedIntColumn get stargazersCount => - _stargazersCount ??= _constructStargazersCount(); - GeneratedIntColumn _constructStargazersCount() { - return GeneratedIntColumn( - 'stargazersCount', - $tableName, - true, - ); - } - - final VerificationMeta _watchersCountMeta = - const VerificationMeta('watchersCount'); - GeneratedIntColumn _watchersCount; - @override - GeneratedIntColumn get watchersCount => - _watchersCount ??= _constructWatchersCount(); - GeneratedIntColumn _constructWatchersCount() { - return GeneratedIntColumn( - 'watchersCount', - $tableName, - true, - ); - } - - final VerificationMeta _languageMeta = const VerificationMeta('language'); - GeneratedTextColumn _language; - @override - GeneratedTextColumn get language => _language ??= _constructLanguage(); - GeneratedTextColumn _constructLanguage() { - return GeneratedTextColumn( - 'language', - $tableName, - true, - ); - } - - final VerificationMeta _forksCountMeta = const VerificationMeta('forksCount'); - GeneratedIntColumn _forksCount; - @override - GeneratedIntColumn get forksCount => _forksCount ??= _constructForksCount(); - GeneratedIntColumn _constructForksCount() { - return GeneratedIntColumn( - 'forksCount', - $tableName, - true, - ); - } - - final VerificationMeta _openIssuesCountMeta = - const VerificationMeta('openIssuesCount'); - GeneratedIntColumn _openIssuesCount; - @override - GeneratedIntColumn get openIssuesCount => - _openIssuesCount ??= _constructOpenIssuesCount(); - GeneratedIntColumn _constructOpenIssuesCount() { - return GeneratedIntColumn( - 'openIssuesCount', - $tableName, - true, - ); - } - - final VerificationMeta _masterBranchMeta = - const VerificationMeta('masterBranch'); - GeneratedTextColumn _masterBranch; - @override - GeneratedTextColumn get masterBranch => - _masterBranch ??= _constructMasterBranch(); - GeneratedTextColumn _constructMasterBranch() { - return GeneratedTextColumn( - 'masterBranch', - $tableName, - true, - ); - } - - final VerificationMeta _defaultBranchMeta = - const VerificationMeta('defaultBranch'); - GeneratedTextColumn _defaultBranch; - @override - GeneratedTextColumn get defaultBranch => - _defaultBranch ??= _constructDefaultBranch(); - GeneratedTextColumn _constructDefaultBranch() { - return GeneratedTextColumn( - 'defaultBranch', - $tableName, - true, - ); - } - - final VerificationMeta _scoreMeta = const VerificationMeta('score'); - GeneratedRealColumn _score; - @override - GeneratedRealColumn get score => _score ??= _constructScore(); - GeneratedRealColumn _constructScore() { - return GeneratedRealColumn( - 'score', - $tableName, - true, - ); - } - - @override - List get $columns => [ - id, - nodeId, - name, - fullName, - ownerId, - private, - htmlUrl, - description, - fork, - url, - createdAt, - updatedAt, - pushedAt, - homepage, - size, - stargazersCount, - watchersCount, - language, - forksCount, - openIssuesCount, - masterBranch, - defaultBranch, - score - ]; - @override - $FavoritesRepoTableTable get asDslTable => this; - @override - String get $tableName => _alias ?? 'favorites_repo_table'; - @override - final String actualTableName = 'favorites_repo_table'; - @override - VerificationContext validateIntegrity( - Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id'], _idMeta)); - } - if (data.containsKey('nodeId')) { - context.handle(_nodeIdMeta, - nodeId.isAcceptableOrUnknown(data['nodeId'], _nodeIdMeta)); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, name.isAcceptableOrUnknown(data['name'], _nameMeta)); - } - if (data.containsKey('fullName')) { - context.handle(_fullNameMeta, - fullName.isAcceptableOrUnknown(data['fullName'], _fullNameMeta)); - } - if (data.containsKey('ownerId')) { - context.handle(_ownerIdMeta, - ownerId.isAcceptableOrUnknown(data['ownerId'], _ownerIdMeta)); - } - if (data.containsKey('private')) { - context.handle(_privateMeta, - private.isAcceptableOrUnknown(data['private'], _privateMeta)); - } - if (data.containsKey('htmlUrl')) { - context.handle(_htmlUrlMeta, - htmlUrl.isAcceptableOrUnknown(data['htmlUrl'], _htmlUrlMeta)); - } - if (data.containsKey('description')) { - context.handle( - _descriptionMeta, - description.isAcceptableOrUnknown( - data['description'], _descriptionMeta)); - } - if (data.containsKey('fork')) { - context.handle( - _forkMeta, fork.isAcceptableOrUnknown(data['fork'], _forkMeta)); - } - if (data.containsKey('url')) { - context.handle( - _urlMeta, url.isAcceptableOrUnknown(data['url'], _urlMeta)); - } - if (data.containsKey('createdAt')) { - context.handle(_createdAtMeta, - createdAt.isAcceptableOrUnknown(data['createdAt'], _createdAtMeta)); - } - if (data.containsKey('updatedAt')) { - context.handle(_updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updatedAt'], _updatedAtMeta)); - } - if (data.containsKey('pushedAt')) { - context.handle(_pushedAtMeta, - pushedAt.isAcceptableOrUnknown(data['pushedAt'], _pushedAtMeta)); - } - if (data.containsKey('homepage')) { - context.handle(_homepageMeta, - homepage.isAcceptableOrUnknown(data['homepage'], _homepageMeta)); - } - if (data.containsKey('size')) { - context.handle( - _sizeMeta, size.isAcceptableOrUnknown(data['size'], _sizeMeta)); - } - if (data.containsKey('stargazersCount')) { - context.handle( - _stargazersCountMeta, - stargazersCount.isAcceptableOrUnknown( - data['stargazersCount'], _stargazersCountMeta)); - } - if (data.containsKey('watchersCount')) { - context.handle( - _watchersCountMeta, - watchersCount.isAcceptableOrUnknown( - data['watchersCount'], _watchersCountMeta)); - } - if (data.containsKey('language')) { - context.handle(_languageMeta, - language.isAcceptableOrUnknown(data['language'], _languageMeta)); - } - if (data.containsKey('forksCount')) { - context.handle( - _forksCountMeta, - forksCount.isAcceptableOrUnknown( - data['forksCount'], _forksCountMeta)); - } - if (data.containsKey('openIssuesCount')) { - context.handle( - _openIssuesCountMeta, - openIssuesCount.isAcceptableOrUnknown( - data['openIssuesCount'], _openIssuesCountMeta)); - } - if (data.containsKey('masterBranch')) { - context.handle( - _masterBranchMeta, - masterBranch.isAcceptableOrUnknown( - data['masterBranch'], _masterBranchMeta)); - } - if (data.containsKey('defaultBranch')) { - context.handle( - _defaultBranchMeta, - defaultBranch.isAcceptableOrUnknown( - data['defaultBranch'], _defaultBranchMeta)); - } - if (data.containsKey('score')) { - context.handle( - _scoreMeta, score.isAcceptableOrUnknown(data['score'], _scoreMeta)); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - FavoritesRepoTableData map(Map data, {String tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; - return FavoritesRepoTableData.fromData(data, _db, prefix: effectivePrefix); - } - - @override - $FavoritesRepoTableTable createAlias(String alias) { - return $FavoritesRepoTableTable(_db, alias); - } -} - -class OwnerTableData extends DataClass implements Insertable { - final int id; - final String login; - final String nodeId; - final String avatarUrl; - final String gravatarId; - final String url; - final String receivedEventsUrl; - final String type; - OwnerTableData( - {@required this.id, - this.login, - this.nodeId, - this.avatarUrl, - this.gravatarId, - this.url, - this.receivedEventsUrl, - this.type}); - factory OwnerTableData.fromData( - Map data, GeneratedDatabase db, - {String prefix}) { - final effectivePrefix = prefix ?? ''; - final intType = db.typeSystem.forDartType(); - final stringType = db.typeSystem.forDartType(); - return OwnerTableData( - id: intType.mapFromDatabaseResponse(data['${effectivePrefix}id']), - login: - stringType.mapFromDatabaseResponse(data['${effectivePrefix}login']), - nodeId: - stringType.mapFromDatabaseResponse(data['${effectivePrefix}nodeId']), - avatarUrl: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}avatarUrl']), - gravatarId: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}gravatarId']), - url: stringType.mapFromDatabaseResponse(data['${effectivePrefix}url']), - receivedEventsUrl: stringType - .mapFromDatabaseResponse(data['${effectivePrefix}receivedEventsUrl']), - type: stringType.mapFromDatabaseResponse(data['${effectivePrefix}type']), - ); - } - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (!nullToAbsent || id != null) { - map['id'] = Variable(id); - } - if (!nullToAbsent || login != null) { - map['login'] = Variable(login); - } - if (!nullToAbsent || nodeId != null) { - map['nodeId'] = Variable(nodeId); - } - if (!nullToAbsent || avatarUrl != null) { - map['avatarUrl'] = Variable(avatarUrl); - } - if (!nullToAbsent || gravatarId != null) { - map['gravatarId'] = Variable(gravatarId); - } - if (!nullToAbsent || url != null) { - map['url'] = Variable(url); - } - if (!nullToAbsent || receivedEventsUrl != null) { - map['receivedEventsUrl'] = Variable(receivedEventsUrl); - } - if (!nullToAbsent || type != null) { - map['type'] = Variable(type); - } - return map; - } - - OwnerTableCompanion toCompanion(bool nullToAbsent) { - return OwnerTableCompanion( - id: id == null && nullToAbsent ? const Value.absent() : Value(id), - login: - login == null && nullToAbsent ? const Value.absent() : Value(login), - nodeId: - nodeId == null && nullToAbsent ? const Value.absent() : Value(nodeId), - avatarUrl: avatarUrl == null && nullToAbsent - ? const Value.absent() - : Value(avatarUrl), - gravatarId: gravatarId == null && nullToAbsent - ? const Value.absent() - : Value(gravatarId), - url: url == null && nullToAbsent ? const Value.absent() : Value(url), - receivedEventsUrl: receivedEventsUrl == null && nullToAbsent - ? const Value.absent() - : Value(receivedEventsUrl), - type: type == null && nullToAbsent ? const Value.absent() : Value(type), - ); - } - - factory OwnerTableData.fromJson(Map json, - {ValueSerializer serializer}) { - serializer ??= moorRuntimeOptions.defaultSerializer; - return OwnerTableData( - id: serializer.fromJson(json['id']), - login: serializer.fromJson(json['login']), - nodeId: serializer.fromJson(json['nodeId']), - avatarUrl: serializer.fromJson(json['avatarUrl']), - gravatarId: serializer.fromJson(json['gravatarId']), - url: serializer.fromJson(json['url']), - receivedEventsUrl: serializer.fromJson(json['receivedEventsUrl']), - type: serializer.fromJson(json['type']), - ); - } - @override - Map toJson({ValueSerializer serializer}) { - serializer ??= moorRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'login': serializer.toJson(login), - 'nodeId': serializer.toJson(nodeId), - 'avatarUrl': serializer.toJson(avatarUrl), - 'gravatarId': serializer.toJson(gravatarId), - 'url': serializer.toJson(url), - 'receivedEventsUrl': serializer.toJson(receivedEventsUrl), - 'type': serializer.toJson(type), - }; - } - - OwnerTableData copyWith( - {int id, - String login, - String nodeId, - String avatarUrl, - String gravatarId, - String url, - String receivedEventsUrl, - String type}) => - OwnerTableData( - id: id ?? this.id, - login: login ?? this.login, - nodeId: nodeId ?? this.nodeId, - avatarUrl: avatarUrl ?? this.avatarUrl, - gravatarId: gravatarId ?? this.gravatarId, - url: url ?? this.url, - receivedEventsUrl: receivedEventsUrl ?? this.receivedEventsUrl, - type: type ?? this.type, - ); - @override - String toString() { - return (StringBuffer('OwnerTableData(') - ..write('id: $id, ') - ..write('login: $login, ') - ..write('nodeId: $nodeId, ') - ..write('avatarUrl: $avatarUrl, ') - ..write('gravatarId: $gravatarId, ') - ..write('url: $url, ') - ..write('receivedEventsUrl: $receivedEventsUrl, ') - ..write('type: $type') - ..write(')')) - .toString(); - } - - @override - int get hashCode => $mrjf($mrjc( - id.hashCode, - $mrjc( - login.hashCode, - $mrjc( - nodeId.hashCode, - $mrjc( - avatarUrl.hashCode, - $mrjc( - gravatarId.hashCode, - $mrjc( - url.hashCode, - $mrjc( - receivedEventsUrl.hashCode, type.hashCode)))))))); - @override - bool operator ==(dynamic other) => - identical(this, other) || - (other is OwnerTableData && - other.id == this.id && - other.login == this.login && - other.nodeId == this.nodeId && - other.avatarUrl == this.avatarUrl && - other.gravatarId == this.gravatarId && - other.url == this.url && - other.receivedEventsUrl == this.receivedEventsUrl && - other.type == this.type); -} - -class OwnerTableCompanion extends UpdateCompanion { - final Value id; - final Value login; - final Value nodeId; - final Value avatarUrl; - final Value gravatarId; - final Value url; - final Value receivedEventsUrl; - final Value type; - const OwnerTableCompanion({ - this.id = const Value.absent(), - this.login = const Value.absent(), - this.nodeId = const Value.absent(), - this.avatarUrl = const Value.absent(), - this.gravatarId = const Value.absent(), - this.url = const Value.absent(), - this.receivedEventsUrl = const Value.absent(), - this.type = const Value.absent(), - }); - OwnerTableCompanion.insert({ - this.id = const Value.absent(), - this.login = const Value.absent(), - this.nodeId = const Value.absent(), - this.avatarUrl = const Value.absent(), - this.gravatarId = const Value.absent(), - this.url = const Value.absent(), - this.receivedEventsUrl = const Value.absent(), - this.type = const Value.absent(), - }); - static Insertable custom({ - Expression id, - Expression login, - Expression nodeId, - Expression avatarUrl, - Expression gravatarId, - Expression url, - Expression receivedEventsUrl, - Expression type, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (login != null) 'login': login, - if (nodeId != null) 'nodeId': nodeId, - if (avatarUrl != null) 'avatarUrl': avatarUrl, - if (gravatarId != null) 'gravatarId': gravatarId, - if (url != null) 'url': url, - if (receivedEventsUrl != null) 'receivedEventsUrl': receivedEventsUrl, - if (type != null) 'type': type, - }); - } - - OwnerTableCompanion copyWith( - {Value id, - Value login, - Value nodeId, - Value avatarUrl, - Value gravatarId, - Value url, - Value receivedEventsUrl, - Value type}) { - return OwnerTableCompanion( - id: id ?? this.id, - login: login ?? this.login, - nodeId: nodeId ?? this.nodeId, - avatarUrl: avatarUrl ?? this.avatarUrl, - gravatarId: gravatarId ?? this.gravatarId, - url: url ?? this.url, - receivedEventsUrl: receivedEventsUrl ?? this.receivedEventsUrl, - type: type ?? this.type, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (login.present) { - map['login'] = Variable(login.value); - } - if (nodeId.present) { - map['nodeId'] = Variable(nodeId.value); - } - if (avatarUrl.present) { - map['avatarUrl'] = Variable(avatarUrl.value); - } - if (gravatarId.present) { - map['gravatarId'] = Variable(gravatarId.value); - } - if (url.present) { - map['url'] = Variable(url.value); - } - if (receivedEventsUrl.present) { - map['receivedEventsUrl'] = Variable(receivedEventsUrl.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - return map; - } -} - -class $OwnerTableTable extends OwnerTable - with TableInfo<$OwnerTableTable, OwnerTableData> { - final GeneratedDatabase _db; - final String _alias; - $OwnerTableTable(this._db, [this._alias]); - final VerificationMeta _idMeta = const VerificationMeta('id'); - GeneratedIntColumn _id; - @override - GeneratedIntColumn get id => _id ??= _constructId(); - GeneratedIntColumn _constructId() { - return GeneratedIntColumn('id', $tableName, false, - $customConstraints: 'UNIQUE'); - } - - final VerificationMeta _loginMeta = const VerificationMeta('login'); - GeneratedTextColumn _login; - @override - GeneratedTextColumn get login => _login ??= _constructLogin(); - GeneratedTextColumn _constructLogin() { - return GeneratedTextColumn( - 'login', - $tableName, - true, - ); - } - - final VerificationMeta _nodeIdMeta = const VerificationMeta('nodeId'); - GeneratedTextColumn _nodeId; - @override - GeneratedTextColumn get nodeId => _nodeId ??= _constructNodeId(); - GeneratedTextColumn _constructNodeId() { - return GeneratedTextColumn( - 'nodeId', - $tableName, - true, - ); - } - - final VerificationMeta _avatarUrlMeta = const VerificationMeta('avatarUrl'); - GeneratedTextColumn _avatarUrl; - @override - GeneratedTextColumn get avatarUrl => _avatarUrl ??= _constructAvatarUrl(); - GeneratedTextColumn _constructAvatarUrl() { - return GeneratedTextColumn( - 'avatarUrl', - $tableName, - true, - ); - } - - final VerificationMeta _gravatarIdMeta = const VerificationMeta('gravatarId'); - GeneratedTextColumn _gravatarId; - @override - GeneratedTextColumn get gravatarId => _gravatarId ??= _constructGravatarId(); - GeneratedTextColumn _constructGravatarId() { - return GeneratedTextColumn( - 'gravatarId', - $tableName, - true, - ); - } - - final VerificationMeta _urlMeta = const VerificationMeta('url'); - GeneratedTextColumn _url; - @override - GeneratedTextColumn get url => _url ??= _constructUrl(); - GeneratedTextColumn _constructUrl() { - return GeneratedTextColumn( - 'url', - $tableName, - true, - ); - } - - final VerificationMeta _receivedEventsUrlMeta = - const VerificationMeta('receivedEventsUrl'); - GeneratedTextColumn _receivedEventsUrl; - @override - GeneratedTextColumn get receivedEventsUrl => - _receivedEventsUrl ??= _constructReceivedEventsUrl(); - GeneratedTextColumn _constructReceivedEventsUrl() { - return GeneratedTextColumn( - 'receivedEventsUrl', - $tableName, - true, - ); - } - - final VerificationMeta _typeMeta = const VerificationMeta('type'); - GeneratedTextColumn _type; - @override - GeneratedTextColumn get type => _type ??= _constructType(); - GeneratedTextColumn _constructType() { - return GeneratedTextColumn( - 'type', - $tableName, - true, - ); - } - - @override - List get $columns => - [id, login, nodeId, avatarUrl, gravatarId, url, receivedEventsUrl, type]; - @override - $OwnerTableTable get asDslTable => this; - @override - String get $tableName => _alias ?? 'owner_table'; - @override - final String actualTableName = 'owner_table'; - @override - VerificationContext validateIntegrity(Insertable instance, - {bool isInserting = false}) { - final context = VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id'], _idMeta)); - } - if (data.containsKey('login')) { - context.handle( - _loginMeta, login.isAcceptableOrUnknown(data['login'], _loginMeta)); - } - if (data.containsKey('nodeId')) { - context.handle(_nodeIdMeta, - nodeId.isAcceptableOrUnknown(data['nodeId'], _nodeIdMeta)); - } - if (data.containsKey('avatarUrl')) { - context.handle(_avatarUrlMeta, - avatarUrl.isAcceptableOrUnknown(data['avatarUrl'], _avatarUrlMeta)); - } - if (data.containsKey('gravatarId')) { - context.handle( - _gravatarIdMeta, - gravatarId.isAcceptableOrUnknown( - data['gravatarId'], _gravatarIdMeta)); - } - if (data.containsKey('url')) { - context.handle( - _urlMeta, url.isAcceptableOrUnknown(data['url'], _urlMeta)); - } - if (data.containsKey('receivedEventsUrl')) { - context.handle( - _receivedEventsUrlMeta, - receivedEventsUrl.isAcceptableOrUnknown( - data['receivedEventsUrl'], _receivedEventsUrlMeta)); - } - if (data.containsKey('type')) { - context.handle( - _typeMeta, type.isAcceptableOrUnknown(data['type'], _typeMeta)); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - OwnerTableData map(Map data, {String tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; - return OwnerTableData.fromData(data, _db, prefix: effectivePrefix); - } - - @override - $OwnerTableTable createAlias(String alias) { - return $OwnerTableTable(_db, alias); - } -} - -abstract class _$Database extends GeneratedDatabase { - _$Database(QueryExecutor e) : super(SqlTypeSystem.defaultInstance, e); - $FavoritesRepoTableTable _favoritesRepoTable; - $FavoritesRepoTableTable get favoritesRepoTable => - _favoritesRepoTable ??= $FavoritesRepoTableTable(this); - $OwnerTableTable _ownerTable; - $OwnerTableTable get ownerTable => _ownerTable ??= $OwnerTableTable(this); - RepoDao _repoDao; - RepoDao get repoDao => _repoDao ??= RepoDao(this as Database); - @override - Iterable get allTables => allSchemaEntities.whereType(); - @override - List get allSchemaEntities => - [favoritesRepoTable, ownerTable]; -} - -// ************************************************************************** -// DaoGenerator -// ************************************************************************** - -mixin _$RepoDaoMixin on DatabaseAccessor { - $FavoritesRepoTableTable get favoritesRepoTable => - attachedDatabase.favoritesRepoTable; - $OwnerTableTable get ownerTable => attachedDatabase.ownerTable; -} diff --git a/examples/github/lib/model/favorites/database/table/tables.dart b/examples/github/lib/model/favorites/database/table/tables.dart deleted file mode 100644 index d95266539..000000000 --- a/examples/github/lib/model/favorites/database/table/tables.dart +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:moor_flutter/moor_flutter.dart'; - -class FavoritesRepoTable extends Table { - IntColumn get id => integer().named('id').customConstraint('UNIQUE')(); - - @override - Set get primaryKey => {id}; - - TextColumn get nodeId => text().nullable().named('nodeId')(); - - TextColumn get name => text().nullable().named('name')(); - - TextColumn get fullName => text().nullable().named('fullName')(); - - IntColumn get ownerId => integer() - .named('ownerId') - .nullable() - .customConstraint('NULLABLE REFERENCES ownertable(id)')(); - - BoolColumn get private => boolean().nullable().named('private')(); - - TextColumn get htmlUrl => text().nullable().named('htmlUrl')(); - - TextColumn get description => text().nullable().named('description')(); - - BoolColumn get fork => boolean().nullable().named('fork')(); - - TextColumn get url => text().nullable().named('url')(); - - TextColumn get createdAt => text().nullable().named('createdAt')(); - - TextColumn get updatedAt => text().nullable().named('updatedAt')(); - - TextColumn get pushedAt => text().nullable().named('pushedAt')(); - - TextColumn get homepage => text().nullable().named('homepage')(); - - IntColumn get size => integer().nullable().named('size')(); - - IntColumn get stargazersCount => - integer().nullable().named('stargazersCount')(); - - IntColumn get watchersCount => integer().nullable().named('watchersCount')(); - - TextColumn get language => text().nullable().named('language')(); - - IntColumn get forksCount => integer().nullable().named('forksCount')(); - - IntColumn get openIssuesCount => - integer().nullable().named('openIssuesCount')(); - - TextColumn get masterBranch => text().nullable().named('masterBranch')(); - - TextColumn get defaultBranch => text().nullable().named('defaultBranch')(); - - RealColumn get score => real().nullable().named('score')(); -} - -class OwnerTable extends Table { - IntColumn get id => integer().named('id').customConstraint('UNIQUE')(); - - @override - Set get primaryKey => {id}; - - TextColumn get login => text().nullable().named('login')(); - - TextColumn get nodeId => text().nullable().named('nodeId')(); - - TextColumn get avatarUrl => text().nullable().named('avatarUrl')(); - - TextColumn get gravatarId => text().nullable().named('gravatarId')(); - - TextColumn get url => text().nullable().named('url')(); - - TextColumn get receivedEventsUrl => - text().nullable().named('receivedEventsUrl')(); - - TextColumn get type => text().nullable().named('type')(); -} diff --git a/examples/github/lib/model/favorites/performers.dart b/examples/github/lib/model/favorites/performers.dart deleted file mode 100644 index 048c7f3f5..000000000 --- a/examples/github/lib/model/favorites/performers.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/favorites/changes.dart'; -import 'package:mwwm_github_client/model/favorites/repository/favorites_repository.dart'; -import 'package:mwwm_github_client/ui/widgets/repository/repository_widget_wm.dart'; - -class ToggleRepositoryFavoriteValuePerformer - extends FuturePerformer { - ToggleRepositoryFavoriteValuePerformer(this._favoritesRepository); - - final FavoritesRepository _favoritesRepository; - - @override - Future perform(ToggleRepositoryFavoriteValue change) async { - if (change.isFavorite) { - await _favoritesRepository.add(change.repo); - } else { - await _favoritesRepository.delete(change.repo); - } - - favoritesChangedState.accept(true); - } -} - -class GetFavoriteRepositoriesPerformer - extends Broadcast, GetFavoriteRepositories> { - GetFavoriteRepositoriesPerformer(this._favoritesRepository); - - final FavoritesRepository _favoritesRepository; - - @override - Future> performInternal(GetFavoriteRepositories change) { - return _favoritesRepository.getRepositories(); - } -} - -class DefineFavoritesFromRepositoryPerformer - extends FuturePerformer, DefineFavoritesFromRepository> { - DefineFavoritesFromRepositoryPerformer(this._favoritesRepository); - - final FavoritesRepository _favoritesRepository; - - @override - Future> perform(DefineFavoritesFromRepository change) async { - final List repositories = List.from(change?.repositories ?? []); - final List favorites = - await _favoritesRepository.getRepositories(); - - for (Repository repo in repositories) { - repo.isFavorite = false; - } - - for (Repository fav in favorites) { - final Repository repo = repositories - .firstWhere((repo) => repo.id == fav.id, orElse: () => null); - repo?.isFavorite = true; - } - - return repositories; - } -} diff --git a/examples/github/lib/model/favorites/repository/favorites_repository.dart b/examples/github/lib/model/favorites/repository/favorites_repository.dart deleted file mode 100644 index 0e5f4a380..000000000 --- a/examples/github/lib/model/favorites/repository/favorites_repository.dart +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/favorites/database/database.dart'; -import 'package:mwwm_github_client/model/github/repository/dto/owner_dto.dart'; -import 'package:mwwm_github_client/model/github/repository/dto/repository_dto.dart'; - -class FavoritesRepository { - FavoritesRepository(this._db) : _dao = _db.repoDao; - - final Database _db; - final RepoDao _dao; - - Future add(Repository data) { - final repoData = FavoritesRepoTableData( - id: data.id, - nodeId: data.nodeId, - name: data.name, - fullName: data.fullName, - private: data.private, - htmlUrl: data.htmlUrl, - description: data.description, - fork: data.fork, - url: data.url, - ownerId: data.owner.id, - createdAt: data.createdAt, - updatedAt: data.updatedAt, - pushedAt: data.pushedAt, - homepage: data.homepage, - size: data.size, - stargazersCount: data.stargazersCount, - watchersCount: data.watchersCount, - language: data.language, - forksCount: data.forksCount, - openIssuesCount: data.openIssuesCount, - masterBranch: data.masterBranch, - defaultBranch: data.defaultBranch, - score: data.score, - ); - - final ownerData = OwnerTableData( - id: data.owner.id, - login: data.owner.login, - nodeId: data.owner.nodeId, - avatarUrl: data.owner.avatarUrl, - gravatarId: data.owner.gravatarId, - url: data.owner.url, - receivedEventsUrl: data.owner.receivedEventsUrl, - type: data.owner.type, - ); - - return _dao.insertRepo(repoData, ownerData); - } - - Future update(Repository data) { - final repoTableData = FavoritesRepoTableData.fromData( - RepositoryDto(data).toJson(), - _db, - ); - final ownerData = OwnerTableData.fromData( - OwnerDto(data.owner).toJson(), - _db, - ); - - return _dao.updateRepo(repoTableData, ownerData); - } - - Future delete(Repository data) { - final repoTableData = FavoritesRepoTableData.fromData( - RepositoryDto(data).toJson(), - _db, - ); - final ownerData = OwnerTableData.fromData( - OwnerDto(data.owner).toJson(), - _db, - ); - - return _dao.deleteRepo(repoTableData, ownerData); - } - - Future> getRepositories() async { - return _dao.getAllRepos; - } - - Future> getByName(String name) async { - return _dao.getRepoByName(name); - } -} diff --git a/examples/github/lib/model/github/changes.dart b/examples/github/lib/model/github/changes.dart deleted file mode 100644 index 4e7d5a8eb..000000000 --- a/examples/github/lib/model/github/changes.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/owner.dart'; -import 'package:mwwm_github_client/data/repository.dart'; - -/// Search github repositories by query [query] -class SearchRepositories extends FutureChange> { - SearchRepositories(this.query); - - final String query; -} - -/// Get all repositories. -class GetRepositories extends FutureChange> {} - -/// Get All Users -class GetUsers extends FutureChange> {} diff --git a/examples/github/lib/model/github/performers.dart b/examples/github/lib/model/github/performers.dart deleted file mode 100644 index 187eeca93..000000000 --- a/examples/github/lib/model/github/performers.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/owner.dart'; -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/github/changes.dart'; -import 'package:mwwm_github_client/model/github/repository/github_repository.dart'; - -class SearchRepositoriesPerformer - extends FuturePerformer, SearchRepositories> { - SearchRepositoriesPerformer(this._githubRepository); - - final GithubRepository _githubRepository; - - @override - Future> perform(SearchRepositories change) { - return _githubRepository.findRepositories(change.query); - } -} - -class GetRepositoriesPerformer - extends FuturePerformer, GetRepositories> { - GetRepositoriesPerformer(this._githubRepository); - - final GithubRepository _githubRepository; - - @override - Future> perform(GetRepositories change) { - return _githubRepository.getRepositories(); - } -} - -class GetUsersPerformer extends FuturePerformer, GetUsers> { - GetUsersPerformer(this._githubRepository); - - final GithubRepository _githubRepository; - - @override - Future> perform(GetUsers change) { - return _githubRepository.getUsers(); - } -} diff --git a/examples/github/lib/model/github/repository/dto/owner_dto.dart b/examples/github/lib/model/github/repository/dto/owner_dto.dart deleted file mode 100644 index 83b929afe..000000000 --- a/examples/github/lib/model/github/repository/dto/owner_dto.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm_github_client/data/owner.dart'; -import 'package:mwwm_github_client/utils/json_extensions.dart'; - -class OwnerDto { - OwnerDto(this.owner); - - OwnerDto.fromJson(Map json) - : owner = Owner( - login: json.get('login'), - id: json.get('id'), - nodeId: json.get('node_id'), - avatarUrl: json.get('avatar_url'), - gravatarId: json.get('gravatar_id'), - url: json.get('url'), - receivedEventsUrl: json.get('received_events_url'), - type: json.get('type'), - ); - - final Owner owner; - - Owner get data => owner; - - Map toJson() { - final data = {}; - data['login'] = owner.login; - data['id'] = owner.id; - data['node_id'] = owner.nodeId; - data['avatar_url'] = owner.avatarUrl; - data['gravatar_id'] = owner.gravatarId; - data['url'] = owner.url; - data['received_events_url'] = owner.receivedEventsUrl; - data['type'] = owner.type; - return data; - } - - @override - String toString() => owner.toString(); -} diff --git a/examples/github/lib/model/github/repository/dto/repository_dto.dart b/examples/github/lib/model/github/repository/dto/repository_dto.dart deleted file mode 100644 index b110b514c..000000000 --- a/examples/github/lib/model/github/repository/dto/repository_dto.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/github/repository/dto/owner_dto.dart'; -import 'package:mwwm_github_client/utils/json_extensions.dart'; - -class RepositoryDto { - RepositoryDto(this.repository); - - RepositoryDto.fromJson(Map json) - : repository = Repository( - id: json.get('id'), - nodeId: json.get('node_id'), - name: json.get('name') ?? '', - fullName: json.get('full_name') ?? '', - owner: json['owner'] != null - ? OwnerDto.fromJson(json.get>('owner')).data - : null, - private: json.get('private'), - htmlUrl: json.get('html_url'), - description: json.get('description'), - fork: json.get('fork'), - url: json.get('url'), - createdAt: json.get('created_at'), - updatedAt: json.get('updated_at'), - pushedAt: json.get('pushed_at'), - homepage: json.get('homepage'), - size: json.get('size'), - stargazersCount: json.get('stargazers_count'), - watchersCount: json.get('watchers_count'), - language: json.get('language'), - forksCount: json.get('forks_count'), - openIssuesCount: json.get('open_issues_count'), - masterBranch: json.get('master_branch'), - defaultBranch: json.get('default_branch'), - score: json.get('score'), - isFavorite: false, - ); - - final Repository repository; - - Repository get data => repository; - - Map toJson() { - final data = {}; - data['id'] = repository.id; - data['node_id'] = repository.nodeId; - data['name'] = repository.name; - data['full_name'] = repository.fullName; - if (repository.owner != null) { - data['owner'] = OwnerDto(repository.owner).toJson(); - data['ownerId'] = repository.owner.id; - } - data['private'] = repository.private; - data['html_url'] = repository.htmlUrl; - data['description'] = repository.description; - data['fork'] = repository.fork; - data['url'] = repository.url; - data['created_at'] = repository.createdAt; - data['updated_at'] = repository.updatedAt; - data['pushed_at'] = repository.pushedAt; - data['homepage'] = repository.homepage; - data['size'] = repository.size; - data['stargazers_count'] = repository.stargazersCount; - data['watchers_count'] = repository.watchersCount; - data['language'] = repository.language; - data['forks_count'] = repository.forksCount; - data['open_issues_count'] = repository.openIssuesCount; - data['master_branch'] = repository.masterBranch; - data['default_branch'] = repository.defaultBranch; - data['score'] = repository.score; - data['favorite'] = repository.isFavorite; - - return data; - } - - @override - String toString() => repository.toString(); -} diff --git a/examples/github/lib/model/github/repository/dto/repository_list_dto.dart b/examples/github/lib/model/github/repository/dto/repository_list_dto.dart deleted file mode 100644 index 7c93dd9f1..000000000 --- a/examples/github/lib/model/github/repository/dto/repository_list_dto.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/data/repository_list.dart'; -import 'package:mwwm_github_client/model/github/repository/dto/repository_dto.dart'; -import 'package:mwwm_github_client/utils/json_extensions.dart'; - -class RepositoryListDto { - RepositoryListDto(this.repos); - - RepositoryListDto.fromJson(Map json) - : repos = RepositoryList( - totalCount: json.get('total_count'), - incompleteResults: json.get( - 'incomplete_results', - defaultValue: true, - ), - items: json['items'] != null - ? json.get>('items').map((json) { - return RepositoryDto.fromJson( - json as Map, - ).data; - }).toList() - : [], - ); - - final RepositoryList repos; - - RepositoryList get data => repos; - - Map toJson() { - final data = {}; - data['total_count'] = repos.totalCount; - data['incomplete_results'] = repos.incompleteResults; - if (repos.items != null) { - data['items'] = repos.items - .map( - (repo) => RepositoryDto(repo).toJson(), - ) - .toList(); - } - return data; - } -} diff --git a/examples/github/lib/model/github/repository/github_repository.dart b/examples/github/lib/model/github/repository/github_repository.dart deleted file mode 100644 index af3d48c99..000000000 --- a/examples/github/lib/model/github/repository/github_repository.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:convert'; - -import 'package:mwwm_github_client/data/owner.dart'; -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/data/repository_list.dart'; -import 'package:mwwm_github_client/model/common/network/network_client.dart'; -import 'package:mwwm_github_client/model/github/repository/dto/owner_dto.dart'; -import 'package:mwwm_github_client/model/github/repository/dto/repository_dto.dart'; -import 'package:mwwm_github_client/model/github/repository/dto/repository_list_dto.dart'; -import 'package:http/http.dart' show Response; - -/// Service for work with Github -/// Wrapper on [Github] library -class GithubRepository { - GithubRepository( - this._client, - ); - - final NetworkClient _client; - - /// Search repository by [name] - Future> findRepositories(String name) async { - if (name.isEmpty) return []; - - final Response response = await _client.get( - 'https://api.github.com/search/repositories?q=$name', - ); - final json = jsonDecode(response.body) as Map; - final RepositoryList repositoryList = RepositoryListDto.fromJson(json).data; - - return repositoryList.items; - } - - /// Get github repositories - Future> getRepositories() async { - final Response response = await _client.get( - 'https://api.github.com/repositories', - ); - final json = jsonDecode(response.body) as List; - final List repositories = json - .map( - (json) => RepositoryDto.fromJson(json as Map).data, - ) - .toList(); - - return repositories; - } - - /// Get Github-users - Future> getUsers() async { - final Response response = await _client.get('https://api.github.com/users'); - final json = jsonDecode(response.body) as List; - final List users = json - .map( - (json) => OwnerDto.fromJson(json as Map).data, - ) - .toList(); - - return users; - } -} diff --git a/examples/github/lib/ui/app.dart b/examples/github/lib/ui/app.dart deleted file mode 100644 index d6b18d387..000000000 --- a/examples/github/lib/ui/app.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm_github_client/ui/check_auth_screen/check_auth_route.dart'; - -const _initRouteName = '/'; - -class App extends StatefulWidget { - @override - _AppState createState() => _AppState(); -} - -class _AppState extends State { - @override - Widget build(BuildContext context) { - return MaterialApp( - debugShowCheckedModeBanner: false, - initialRoute: _initRouteName, - onGenerateRoute: (routeSettings) { - switch (routeSettings.name) { - case _initRouteName: - return CheckAuthRoute(); - default: - throw Exception('Unknown route name: ${routeSettings.name}'); - } - }, - ); - } -} \ No newline at end of file diff --git a/examples/github/lib/ui/check_auth_screen/check_auth_route.dart b/examples/github/lib/ui/check_auth_screen/check_auth_route.dart deleted file mode 100644 index f7c6970bf..000000000 --- a/examples/github/lib/ui/check_auth_screen/check_auth_route.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/model/auth/performers.dart'; -import 'package:mwwm_github_client/model/auth/repository/auth_repository.dart'; -import 'package:mwwm_github_client/ui/check_auth_screen/check_auth_screen.dart'; -import 'package:mwwm_github_client/ui/check_auth_screen/check_auth_wm.dart'; -import 'package:provider/provider.dart'; - -/// CheckAuthScreen Route -class CheckAuthRoute extends MaterialPageRoute { - CheckAuthRoute() - : super( - builder: (context) => CheckAuthScreen( - widgetModelBuilder: _widgetModelBuilder, - ), - ); -} - -WidgetModel _widgetModelBuilder(BuildContext context) => CheckAuthWm( - context.read(), - Model([ - IsUserAuthorizePerformer( - context.read(), - ), - ]), - Navigator.of(context), - ); diff --git a/examples/github/lib/ui/check_auth_screen/check_auth_screen.dart b/examples/github/lib/ui/check_auth_screen/check_auth_screen.dart deleted file mode 100644 index de8903ed3..000000000 --- a/examples/github/lib/ui/check_auth_screen/check_auth_screen.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'check_auth_wm.dart'; - -/// Screen verifies authorization -class CheckAuthScreen extends CoreMwwmWidget { - CheckAuthScreen({ - @required WidgetModelBuilder widgetModelBuilder, - }) : assert(widgetModelBuilder != null), - super(widgetModelBuilder: widgetModelBuilder); - - @override - State createState() => _CheckAuthScreenState(); -} - -class _CheckAuthScreenState extends WidgetState { - @override - Widget build(BuildContext context) => const Scaffold( - body: SafeArea( - child: Center( - child: Text( - 'loading', - style: TextStyle( - fontSize: 48, - ), - ), - ), - ), - ); -} diff --git a/examples/github/lib/ui/check_auth_screen/check_auth_wm.dart b/examples/github/lib/ui/check_auth_screen/check_auth_wm.dart deleted file mode 100644 index 43d59270e..000000000 --- a/examples/github/lib/ui/check_auth_screen/check_auth_wm.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/model/auth/changes.dart'; -import 'package:mwwm_github_client/ui/login_screen/login_screen_route.dart'; -import 'package:mwwm_github_client/ui/main_screen/main_screen_route.dart'; - -/// widget model checks authorization -class CheckAuthWm extends WidgetModel { - CheckAuthWm( - WidgetModelDependencies baseDependencies, - Model model, - this.navigator, - ) : super( - baseDependencies, - model: model, - ); - - final NavigatorState navigator; - - @override - void onLoad() { - super.onLoad(); - _auth(); - } - - void _auth() { - doFuture( - _checkAuth(), - (isUserAuth) async { - if (isUserAuth) { - await navigator.push(MainScreenRoute()); - } else { - await navigator.push(LoginScreenRoute()); - } - }, - onError: handleError, - ); - } - - Future _checkAuth() { - return model.perform(IsUserAuthorize()); - } -} diff --git a/examples/github/lib/ui/login_screen/login_screen.dart b/examples/github/lib/ui/login_screen/login_screen.dart deleted file mode 100644 index 1ca514e67..000000000 --- a/examples/github/lib/ui/login_screen/login_screen.dart +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:io'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; - -import 'login_wm.dart'; - -/// Login screen -class LoginScreen extends CoreMwwmWidget { - LoginScreen({ - @required WidgetModelBuilder widgetModelBuilder, - }) : assert(widgetModelBuilder != null), - super(widgetModelBuilder: widgetModelBuilder); - - @override - State createState() => _LoginScreenState(); -} - -class _LoginScreenState extends WidgetState { - final logoText = 'sign in with github'; - final buttonText = 'sign in'; - - @override - Widget build(BuildContext context) => Scaffold( - body: SafeArea( - child: Center( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - logoText, - style: const TextStyle( - fontFamily: 'Helvetica', - fontSize: 32, - fontWeight: FontWeight.w300, - ), - ), - const SizedBox( - height: 16, - ), - if (Platform.isAndroid) - MaterialButton( - onPressed: wm.loginAction, - color: Colors.blue, - child: Text( - buttonText, - style: const TextStyle( - color: Colors.white, - ), - ), - ), - if (Platform.isIOS) - CupertinoButton( - child: Text(buttonText), - onPressed: wm.loginAction, - color: Colors.indigo, - ), - ], - ), - ), - ), - ), - ); -} diff --git a/examples/github/lib/ui/login_screen/login_screen_route.dart b/examples/github/lib/ui/login_screen/login_screen_route.dart deleted file mode 100644 index 2d7f9c3bc..000000000 --- a/examples/github/lib/ui/login_screen/login_screen_route.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/model/auth/performers.dart'; -import 'package:mwwm_github_client/model/auth/repository/auth_repository.dart'; -import 'package:mwwm_github_client/ui/login_screen/login_screen.dart'; -import 'package:mwwm_github_client/ui/login_screen/login_wm.dart'; -import 'package:provider/provider.dart'; - -/// login screen route -class LoginScreenRoute extends MaterialPageRoute { - LoginScreenRoute() - : super( - builder: (context) => LoginScreen( - widgetModelBuilder: _widgetModelBuilder, - ), - ); -} - -WidgetModel _widgetModelBuilder(BuildContext context) => LoginWm( - WidgetModelDependencies( - errorHandler: LoginScreenErrorHandler(), - ), - Model([ - AuthorizeInGithubPerformer( - context.read(), - ), - ]), - Navigator.of(context), - ); - -class LoginScreenErrorHandler extends ErrorHandler { - @override - void handleError(Object e) { - debugPrint('LOGIN SCREEN: $e'); - } -} diff --git a/examples/github/lib/ui/login_screen/login_wm.dart b/examples/github/lib/ui/login_screen/login_wm.dart deleted file mode 100644 index ddf294f82..000000000 --- a/examples/github/lib/ui/login_screen/login_wm.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart' hide Action; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/model/auth/changes.dart'; -import 'package:mwwm_github_client/ui/main_screen/main_screen_route.dart'; -import 'package:relation/relation.dart'; - -/// Login screen's widget model -class LoginWm extends WidgetModel { - LoginWm( - WidgetModelDependencies baseDependencies, - Model model, - this.navigator, - ) : super(baseDependencies, model: model); - - final loginAction = Action(); - final NavigatorState navigator; - - @override - void onBind() { - super.onBind(); - subscribe( - loginAction.stream, - (_) { - doFuture( - _login(), - (isLogin) { - if (isLogin) { - navigator.push(MainScreenRoute()); - } - }, - onError: handleError, - ); - }, - ); - } - - Future _login() { - return model.perform(AuthorizeInGithub()); - } -} diff --git a/examples/github/lib/ui/main_screen/main_screen.dart b/examples/github/lib/ui/main_screen/main_screen.dart deleted file mode 100644 index d211e7cbd..000000000 --- a/examples/github/lib/ui/main_screen/main_screen.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/ui/main_screen/main_wm.dart'; -import 'package:mwwm_github_client/ui/main_screen/pages/favorites/favorites_page.dart'; -import 'package:mwwm_github_client/ui/main_screen/pages/repositories/repositories_page.dart'; -import 'package:mwwm_github_client/ui/main_screen/pages/users/users_page.dart'; -import 'package:relation/relation.dart'; - -/// Main screen -class MainScreen extends CoreMwwmWidget { - MainScreen({ - @required WidgetModelBuilder widgetModelBuilder, - }) : assert(widgetModelBuilder != null), - super(widgetModelBuilder: widgetModelBuilder); - - @override - State createState() => _MainScreenState(); -} - -class _MainScreenState extends WidgetState { - @override - Widget build(BuildContext context) => StreamedStateBuilder( - streamedState: wm.pageIndexState, - builder: (context, pageIndex) => Scaffold( - bottomNavigationBar: _buildBottomNavigationBar(pageIndex), - body: IndexedStack( - index: pageIndex, - children: [ - RepositoriesPage(), - FavoritesPage(), - UsersPage(), - ], - ), - ), - ); - - Widget _buildBottomNavigationBar(int pageIndex) => BottomNavigationBar( - items: const [ - BottomNavigationBarItem( - icon: Icon(Icons.home), - label: 'Repositories', - ), - BottomNavigationBarItem( - icon: Icon(Icons.grade), - label: 'Favorites', - ), - BottomNavigationBarItem( - icon: Icon(Icons.person), - label: 'Users', - ), - ], - currentIndex: pageIndex, - onTap: wm.changePageAction, - ); -} diff --git a/examples/github/lib/ui/main_screen/main_screen_route.dart b/examples/github/lib/ui/main_screen/main_screen_route.dart deleted file mode 100644 index 4899d8ff0..000000000 --- a/examples/github/lib/ui/main_screen/main_screen_route.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/ui/main_screen/main_screen.dart'; -import 'package:mwwm_github_client/ui/main_screen/main_wm.dart'; -import 'package:provider/provider.dart'; - -/// Main screen route -class MainScreenRoute extends MaterialPageRoute { - MainScreenRoute() - : super( - builder: (context) => MainScreen( - widgetModelBuilder: _widgetModelBuilder, - ), - ); -} - -WidgetModel _widgetModelBuilder(BuildContext context) => MainWm( - context.read(), - Model([]), - ); diff --git a/examples/github/lib/ui/main_screen/main_wm.dart b/examples/github/lib/ui/main_screen/main_wm.dart deleted file mode 100644 index 09b16505a..000000000 --- a/examples/github/lib/ui/main_screen/main_wm.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; - -/// Main screen's widget model -class MainWm extends WidgetModel { - MainWm( - WidgetModelDependencies baseDependencies, - Model model, - ) : super(baseDependencies, model: model); - - final pageIndexState = StreamedState(0); - - final changePageAction = Action(); - - @override - void onBind() { - super.onBind(); - - subscribe(changePageAction.stream, onChangePage); - } - - void onChangePage(int pageIndex) { - pageIndexState.accept(pageIndex); - } -} diff --git a/examples/github/lib/ui/main_screen/pages/favorites/favorites_page.dart b/examples/github/lib/ui/main_screen/pages/favorites/favorites_page.dart deleted file mode 100644 index 89066e86f..000000000 --- a/examples/github/lib/ui/main_screen/pages/favorites/favorites_page.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/favorites/performers.dart'; -import 'package:mwwm_github_client/model/favorites/repository/favorites_repository.dart'; -import 'package:mwwm_github_client/ui/main_screen/pages/favorites/favorites_wm.dart'; -import 'package:mwwm_github_client/ui/widgets/repository/repository_widget.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart'; - -class FavoritesPage extends CoreMwwmWidget { - FavoritesPage() - : super( - widgetModelBuilder: (context) => FavoritesWm( - context.read(), - Model([ - GetFavoriteRepositoriesPerformer( - context.read(), - ), - ]), - ), - ); - - @override - State createState() => _FavoritesScreenState(); -} - -class _FavoritesScreenState extends WidgetState { - @override - Widget build(BuildContext context) => Scaffold( - appBar: _buildAppBar(), - body: _buildBody(), - ); - - PreferredSizeWidget _buildAppBar() => AppBar( - title: const Text('Favorites'), - centerTitle: true, - ); - - Widget _buildBody() { - return EntityStateBuilder>( - streamedState: wm.favoritesState, - child: (context, favorites) { - if (favorites.isEmpty) { - return _buildEmptyState(); - } else { - return ListView.builder( - itemCount: favorites.length, - itemBuilder: (context, index) { - final Repository repo = favorites[index]; - return RepositoryWidget( - key: ValueKey(repo.id), - repository: repo, - ); - }, - ); - } - }, - loadingBuilder: _buildLoadingState, - errorBuilder: _buildError, - ); - } - - Widget _buildEmptyState() { - return const Center(child: Text('Empty')); - } - - Widget _buildLoadingState(BuildContext context, _) { - return const Center( - child: CircularProgressIndicator(), - ); - } - - Widget _buildError(BuildContext context, _) { - return const Center(child: Text('Error')); - } -} diff --git a/examples/github/lib/ui/main_screen/pages/favorites/favorites_wm.dart b/examples/github/lib/ui/main_screen/pages/favorites/favorites_wm.dart deleted file mode 100644 index 95be6f25e..000000000 --- a/examples/github/lib/ui/main_screen/pages/favorites/favorites_wm.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/favorites/changes.dart'; -import 'package:mwwm_github_client/ui/widgets/repository/repository_widget_wm.dart'; -import 'package:relation/relation.dart'; - -/// Widget model for search repositories -/// todo: add actions and logic -class FavoritesWm extends WidgetModel { - FavoritesWm( - WidgetModelDependencies baseDependencies, - Model model, - ) : super(baseDependencies, model: model); - - final favoritesState = EntityStreamedState>( - EntityState.loading(), - ); - - @override - void onLoad() { - super.onLoad(); - - _loadFavorites(); - } - - @override - void onBind() { - super.onBind(); - - subscribe( - favoritesChangedState.stream, - (_) => _loadFavorites(), - ); - } - - Future _loadFavorites() async { - favoritesState.loading(); - - try { - final List favorites = await model.perform( - GetFavoriteRepositories(), - ); - favoritesState.content(favorites); - } on Exception catch (e) { - handleError(e); - favoritesState.error(e); - } - } -} diff --git a/examples/github/lib/ui/main_screen/pages/repositories/repositories_dialog_owner.dart b/examples/github/lib/ui/main_screen/pages/repositories/repositories_dialog_owner.dart deleted file mode 100644 index 7fd6cb16f..000000000 --- a/examples/github/lib/ui/main_screen/pages/repositories/repositories_dialog_owner.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/ui/util/dialog_controller.dart'; - -enum RepositoryDialog { - repoSheet, -} - -class RepositoryDialogOwner with DialogOwner { - @override - Map get registeredDialogs => { - RepositoryDialog.repoSheet: - DialogBuilder(_buildSheet), - }; -} - -/// Data for sheet and modalSheet -class TestDataForSheet implements DialogData { - TestDataForSheet({ - this.testData, - }); - - final String testData; -} - -Widget _buildSheet( - BuildContext context, { - TestDataForSheet data, -}) { - return Container( - height: 100, - decoration: const BoxDecoration( - color: Colors.red, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(16), - topRight: Radius.circular(16), - ), - ), - child: Center( - child: Text( - 'Hello ${data.testData}', - style: const TextStyle( - color: Colors.white, - fontSize: 42, - ), - ), - ), - ); -} diff --git a/examples/github/lib/ui/main_screen/pages/repositories/repositories_page.dart b/examples/github/lib/ui/main_screen/pages/repositories/repositories_page.dart deleted file mode 100644 index 82d4c7cfa..000000000 --- a/examples/github/lib/ui/main_screen/pages/repositories/repositories_page.dart +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/auth/performers.dart'; -import 'package:mwwm_github_client/model/auth/repository/auth_repository.dart'; -import 'package:mwwm_github_client/model/common/error/standard_error_handler.dart'; -import 'package:mwwm_github_client/model/favorites/performers.dart'; -import 'package:mwwm_github_client/model/favorites/repository/favorites_repository.dart'; -import 'package:mwwm_github_client/model/github/performers.dart'; -import 'package:mwwm_github_client/model/github/repository/github_repository.dart'; -import 'package:mwwm_github_client/ui/main_screen/pages/repositories/repositories_dialog_owner.dart'; -import 'package:mwwm_github_client/ui/main_screen/pages/repositories/repositories_wm.dart'; -import 'package:mwwm_github_client/ui/util/dialog_controller.dart'; -import 'package:mwwm_github_client/ui/widgets/repository/repository_widget.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart'; - -final _scaffoldKey = GlobalKey(); - -/// Search repository screen -class RepositoriesPage extends CoreMwwmWidget { - RepositoriesPage({ - Key key, - WidgetModelBuilder widgetModelBuilder, - }) : super( - key: key, - widgetModelBuilder: widgetModelBuilder ?? - (context) => RepositoriesWm( - WidgetModelDependencies( - errorHandler: StandardErrorHandler(_scaffoldKey), - ), - Model([ - SearchRepositoriesPerformer( - context.read(), - ), - GetRepositoriesPerformer( - context.read(), - ), - DisconnectGithubPerformer( - context.read(), - ), - GetFavoriteRepositoriesPerformer( - context.read(), - ), - DefineFavoritesFromRepositoryPerformer( - context.read(), - ) - ]), - DefaultDialogController( - _scaffoldKey, - dialogOwner: RepositoryDialogOwner(), - ), - ), - ); - - @override - State createState() { - return _RepositoriesScreenState(); - } -} - -class _RepositoriesScreenState extends WidgetState { - @override - Widget build(BuildContext context) { - return Scaffold( - key: _scaffoldKey, - appBar: _buildAppBar(), - body: _buildBody(), - ); - } - - Widget _buildBody() => EntityStateBuilder>( - streamedState: wm.repositoriesState, - errorBuilder: (ctx, _) => Center( - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - const Text('Произошла ошибка'), - FlatButton( - onPressed: wm.refreshAction, - child: const Text('Обновить'), - ), - ], - ), - ), - loadingBuilder: (ctx, _) => const Center( - child: CircularProgressIndicator(), - ), - child: (ctx, repositories) { - return ListView.builder( - itemCount: repositories.length, - itemBuilder: (ctx, i) { - final Repository repo = repositories[i]; - - return RepositoryWidget( - key: ValueKey('${repo.id}-${repo.isFavorite}'), - repository: repo, - ); - }, - ); - }, - ); - - PreferredSizeWidget _buildAppBar() => AppBar( - centerTitle: true, - title: _buildAppBarTitle(), - leading: IconButton( - icon: StreamedStateBuilder( - streamedState: wm.isSearchActiveState, - builder: (_, isSearching) { - return Icon(isSearching ? Icons.clear : Icons.search); - }, - ), - onPressed: wm.searchButtonTapAction, - ), - actions: [ - IconButton( - icon: const Icon(Icons.exit_to_app), - onPressed: wm.exitAction, - ), - ], - ); - - Widget _buildAppBarTitle() => StreamedStateBuilder( - streamedState: wm.isSearchActiveState, - builder: (ctx, isSearching) { - return isSearching - ? TextField( - controller: wm.textQueryAction.controller, - style: const TextStyle(color: Colors.white), - cursorColor: Colors.white, - decoration: const InputDecoration( - hintText: 'Search...', - hintStyle: TextStyle(color: Colors.white), - ), - ) - : const Text('Search repository'); - }, - ); -} diff --git a/examples/github/lib/ui/main_screen/pages/repositories/repositories_wm.dart b/examples/github/lib/ui/main_screen/pages/repositories/repositories_wm.dart deleted file mode 100644 index 3d23653da..000000000 --- a/examples/github/lib/ui/main_screen/pages/repositories/repositories_wm.dart +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart' hide Action; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/auth/changes.dart'; -import 'package:mwwm_github_client/model/favorites/changes.dart'; -import 'package:mwwm_github_client/model/github/changes.dart'; -import 'package:mwwm_github_client/ui/login_screen/login_screen_route.dart'; -import 'package:mwwm_github_client/ui/widgets/repository/repository_widget_wm.dart'; -import 'package:relation/relation.dart'; - -/// Widget model for search repositories -class RepositoriesWm extends WidgetModel { - RepositoriesWm( - WidgetModelDependencies baseDependencies, - Model model, - this.controller, - ) : super(baseDependencies, model: model); - - final DialogController controller; - - /// Represent repositories from search request - final repositoriesState = EntityStreamedState>( - EntityState.loading(), - ); - - /// Indicate search process - final isSearchActiveState = StreamedState(false); - - /// Tap on search button - final searchButtonTapAction = Action(); - - /// Input search query - final textQueryAction = TextEditingAction(); - - /// Refresh requests - final refreshAction = Action(); - - final exitAction = Action(); - - @override - void onLoad() { - super.onLoad(); - - _searchRepositories(''); - } - - @override - void onBind() { - super.onBind(); - - subscribe( - searchButtonTapAction.stream, - (_) => _setSearchActivationState(), - ); - subscribe( - textQueryAction.stream, - _searchRepositories, - ); - subscribe( - refreshAction.stream, - (_) => _searchRepositories(textQueryAction.value), - ); - - subscribe( - exitAction.stream, - (_) => _exit(), - ); - - subscribe( - favoritesChangedState.stream, - (_) => _checkFavorites(repositoriesState.value.data), - ); - } - - void _setSearchActivationState() { - isSearchActiveState.accept(!isSearchActiveState.value); - } - - Future _searchRepositories(String text) async { - repositoriesState.loading(); - - try { - final FutureChange> request = text?.isNotEmpty ?? false - ? SearchRepositories(text) - : GetRepositories(); - - final List repositories = await model.perform(request); - - _checkFavorites(repositories); - } on Exception catch (e) { - handleError(e); - repositoriesState.error(e); - } - } - - Future _checkFavorites(List repositories) async { - final List checkedRepositories = await model.perform( - DefineFavoritesFromRepository(repositories), - ); - - repositoriesState.content(checkedRepositories); - } - - void _exit() { - controller.showAlertDialog( - title: 'Exit', - message: 'Are you sure you want to exit?', - onAgreeClicked: (context) async { - try { - await model.perform(DisconnectGithub()); - await Navigator.of(context) - .pushAndRemoveUntil(LoginScreenRoute(), (route) => false); - } on Exception catch (e) { - handleError(e); - } - }, - ); - } -} diff --git a/examples/github/lib/ui/main_screen/pages/users/users_page.dart b/examples/github/lib/ui/main_screen/pages/users/users_page.dart deleted file mode 100644 index fcd4de5bc..000000000 --- a/examples/github/lib/ui/main_screen/pages/users/users_page.dart +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/owner.dart'; -import 'package:mwwm_github_client/model/common/error/standard_error_handler.dart'; -import 'package:mwwm_github_client/model/github/performers.dart'; -import 'package:mwwm_github_client/model/github/repository/github_repository.dart'; -import 'package:mwwm_github_client/ui/main_screen/pages/users/users_wm.dart'; -import 'package:mwwm_github_client/ui/widgets/user_widget.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart'; - -final _scaffoldKey = GlobalKey(); - -/// Represent github-users -class UsersPage extends CoreMwwmWidget { - UsersPage({ - Key key, - WidgetModelBuilder widgetModelBuilder, - }) : super( - key: key, - widgetModelBuilder: widgetModelBuilder ?? - (context) => UsersWm( - WidgetModelDependencies( - errorHandler: StandardErrorHandler(_scaffoldKey), - ), - Model([ - GetUsersPerformer( - context.read(), - ) - ]), - ), - ); - - @override - State createState() { - return _UsersPageState(); - } -} - -class _UsersPageState extends WidgetState { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: _buildAppBar(), - body: _buildBody(), - ); - } - - Widget _buildBody() => EntityStateBuilder>( - streamedState: wm.usersState, - errorBuilder: (ctx, _) => Center( - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - const Text('Произошла ошибка'), - FlatButton( - onPressed: wm.refreshAction, - child: const Text('Обновить'), - ), - ], - ), - ), - loadingBuilder: (ctx, _) => const Center( - child: CircularProgressIndicator(), - ), - child: (ctx, users) { - return ListView.builder( - itemCount: users.length, - itemBuilder: (ctx, i) { - return UserWidget(user: users[i]); - }, - ); - }, - ); - - PreferredSizeWidget _buildAppBar() => AppBar( - centerTitle: true, - title: const Text('Users'), - ); -} diff --git a/examples/github/lib/ui/main_screen/pages/users/users_wm.dart b/examples/github/lib/ui/main_screen/pages/users/users_wm.dart deleted file mode 100644 index e647a8744..000000000 --- a/examples/github/lib/ui/main_screen/pages/users/users_wm.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/owner.dart'; -import 'package:mwwm_github_client/model/github/changes.dart'; -import 'package:relation/relation.dart'; - -/// Widget model for search repositories -class UsersWm extends WidgetModel { - UsersWm( - WidgetModelDependencies baseDependencies, - Model model, - ) : super(baseDependencies, model: model); - - /// Represent users - final usersState = EntityStreamedState>()..loading(); - - /// Reload users - final refreshAction = Action(); - - @override - void onLoad() { - super.onLoad(); - - _loadUsers(); - } - - @override - void onBind() { - super.onBind(); - - subscribe(refreshAction.stream, (_) => _loadUsers()); - } - - Future _loadUsers() async { - usersState.loading(); - - try { - final List users = await model.perform(GetUsers()); - usersState.content(users); - } on Exception catch (e) { - handleError(e); - } - } -} diff --git a/examples/github/lib/ui/util/dialog_controller.dart b/examples/github/lib/ui/util/dialog_controller.dart deleted file mode 100644 index a2ff0b13e..000000000 --- a/examples/github/lib/ui/util/dialog_controller.dart +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/ui/util/platform_alert_dialog.dart'; - -/// Mixin adding the ability to register dialogs -mixin DialogOwner { - Map get registeredDialogs; -} - -class DialogBuilder { - DialogBuilder(this.builder); - - final Widget Function(BuildContext context, {T data}) builder; - - Widget call(BuildContext context, {T data}) => builder(context, data: data); -} - -class DefaultDialogController implements DialogController { - DefaultDialogController(this._scaffoldKey, {this.dialogOwner}) - : assert(_scaffoldKey != null), - _context = null; - - DefaultDialogController.from(this._context, {this.dialogOwner}) - : assert(_context != null), - _scaffoldKey = null; - - final GlobalKey _scaffoldKey; - final BuildContext _context; - final DialogOwner dialogOwner; - - BuildContext get context => _context ?? _scaffoldKey.currentContext; - ScaffoldState get nearestScaffoldState => - _scaffoldKey?.currentState ?? Scaffold.of(_context); - - @override - Future showAlertDialog({ - String title, - String message, - Widget widgetMessage, - String agreeText, - String cancelText, - onAgreeClicked, - onDisagreeClicked, - }) { - return showDialog( - context: context, - builder: (ctx) => PlatformAlertDialog( - alertTitle: title, - alertContent: message, - widgetMessage: widgetMessage, - okButtonText: agreeText ?? 'OK', - cancelButtonText: cancelText ?? 'Cancel', - onAgreeClicked: - onAgreeClicked != null ? () => onAgreeClicked(ctx) : null, - onDisagreeClicked: - onDisagreeClicked != null ? () => onDisagreeClicked(ctx) : null, - ), - ); - } - - @override - Future showModalSheet( - type, { - DialogData data, - bool isScrollControlled = false, - }) { - assert(dialogOwner != null); - - return showModalBottomSheet( - context: context, - isScrollControlled: isScrollControlled, - backgroundColor: Colors.transparent, - builder: (ctx) => dialogOwner.registeredDialogs[type](ctx, data: data), - ); - } - - @override - Future showSheet(type, {VoidCallback onDismiss, DialogData data}) { - assert(dialogOwner != null); - - final buildDialog = dialogOwner.registeredDialogs[type]; - - return nearestScaffoldState - .showBottomSheet((ctx) => buildDialog(ctx, data: data)) - .closed - .whenComplete(() => onDismiss?.call()); - } -} diff --git a/examples/github/lib/ui/util/platform_alert_dialog.dart b/examples/github/lib/ui/util/platform_alert_dialog.dart deleted file mode 100644 index 42d40132e..000000000 --- a/examples/github/lib/ui/util/platform_alert_dialog.dart +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:io'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -/// alert dialog that checks the platform itself -class PlatformAlertDialog extends StatelessWidget { - PlatformAlertDialog({ - this.alertTitle, - this.alertContent, - this.widgetMessage, - this.onAgreeClicked, - this.onDisagreeClicked, - this.okButtonText = 'ok', - this.cancelButtonText = 'cancel', - }); - - final String alertTitle; - final String alertContent; - final Widget widgetMessage; - final String okButtonText; - final String cancelButtonText; - final VoidCallback onAgreeClicked; - final VoidCallback onDisagreeClicked; - - @override - Widget build(BuildContext context) { - return Platform.isIOS - ? _buildCupertinoDialog(context) - : _buildMaterialDialog(); - } - - Widget _buildCupertinoDialog(BuildContext context) { - return CupertinoAlertDialog( - title: alertTitle != null - ? Padding( - padding: const EdgeInsets.only(bottom: 11.0), - child: Text( - alertTitle, - ), - ) - : null, - content: widgetMessage ?? Text(alertContent), - actions: [ - if (onDisagreeClicked != null) - FlatButton( - child: Text( - cancelButtonText, - ), - onPressed: onDisagreeClicked, - ), - if (onAgreeClicked != null) - FlatButton( - child: Text( - okButtonText, - ), - onPressed: onAgreeClicked, - ) - ], - ); - } - - Widget _buildMaterialDialog() => AlertDialog( - contentPadding: const EdgeInsets.fromLTRB(24.0, 20.0, 24.0, 0.0), - title: alertTitle != null - ? Text( - alertTitle, - ) - : null, - content: widgetMessage ?? Text(alertContent), - actions: [ - if (onDisagreeClicked != null) - FlatButton( - child: Text( - cancelButtonText, - ), - onPressed: onDisagreeClicked, - ), - if (onAgreeClicked != null) - FlatButton( - child: const Text( - 'ok', - ), - onPressed: onAgreeClicked, - ) - ], - ); -} diff --git a/examples/github/lib/ui/widgets/repository/repository_widget.dart b/examples/github/lib/ui/widgets/repository/repository_widget.dart deleted file mode 100644 index a1d4e0ba0..000000000 --- a/examples/github/lib/ui/widgets/repository/repository_widget.dart +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/favorites/performers.dart'; -import 'package:mwwm_github_client/model/favorites/repository/favorites_repository.dart'; -import 'package:mwwm_github_client/ui/widgets/repository/repository_widget_wm.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart'; - -class RepositoryWidget extends CoreMwwmWidget { - RepositoryWidget({ - @required this.repository, - Key key, - }) : assert(repository != null), - super( - key: key, - widgetModelBuilder: (context) => RepositoryWidgetWm( - context.read(), - Model([ - ToggleRepositoryFavoriteValuePerformer( - context.read(), - ) - ]), - repository, - ), - ); - - final Repository repository; - - @override - State createState() { - return _RepositoryWidgetState(); - } -} - -class _RepositoryWidgetState extends WidgetState { - @override - Widget build(BuildContext context) { - return StreamedStateBuilder( - streamedState: wm.repoState, - builder: (context, repository) { - return Card( - margin: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 8, - ), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Column( - children: [ - const SizedBox(height: 8), - _buildAvatarImage(repository), - const SizedBox(height: 8), - _buildTitle(repository), - const SizedBox(height: 8.0), - _buildDescription(repository), - const SizedBox(height: 8.0), - _buildInformationBlock(repository), - ], - ), - ), - ); - }); - } - - Widget _buildInformationBlock(Repository repository) => Row( - children: [ - if (repository.language != null) - ..._buildLanguageInfo(repository.language), - if (repository.stargazersCount != null) - ..._buildStarsInfo(repository.stargazersCount), - if (repository.watchersCount != null) - ..._buildWatchersInfo(repository.watchersCount), - const Spacer(), - _buildFavoriteButton(repository), - ], - ); - - Widget _buildFavoriteButton(Repository repository) { - return IconButton( - icon: StreamedStateBuilder( - streamedState: wm.isFavoriteState, - builder: (context, isFavorite) { - return Icon( - isFavorite ? Icons.favorite : Icons.favorite_border, - color: Colors.redAccent, - ); - }), - onPressed: () => wm.favoriteTapAction( - !repository.isFavorite, - ), - ); - } - - Widget _buildDescription(Repository repository) { - return Text( - repository.description ?? '', - style: const TextStyle(color: Colors.black54), - ); - } - - Widget _buildTitle(Repository repository) { - return Row( - children: [ - Text( - '${repository.name}/', - style: const TextStyle( - fontSize: 18, - color: Colors.black87, - ), - ), - Text( - repository.owner.login ?? '', - style: const TextStyle( - fontSize: 18.0, - fontWeight: FontWeight.bold, - color: Colors.black87), - ), - ], - ); - } - - Widget _buildAvatarImage(Repository repository) { - return Container( - width: double.infinity, - height: 200, - child: repository.owner.avatarUrl != null - ? Image.network(repository.owner.avatarUrl) - : SizedBox.fromSize(), - ); - } - - List _buildLanguageInfo(String language) => [ - const Icon( - Icons.brightness_1, - size: 16.0, - color: Colors.blueAccent, - ), - const SizedBox(width: 8.0), - Text(language), - const SizedBox(width: 24.0), - ]; - - List _buildStarsInfo(int starCount) => [ - const Icon( - Icons.star, - color: Colors.orangeAccent, - size: 16.0, - ), - const SizedBox(width: 8.0), - Text('$starCount'), - const SizedBox(width: 24.0), - ]; - - List _buildWatchersInfo(int watchersCount) => [ - const Icon( - Icons.remove_red_eye, - size: 16.0, - color: Colors.green, - ), - const SizedBox(width: 8.0), - Text('$watchersCount'), - ]; -} diff --git a/examples/github/lib/ui/widgets/repository/repository_widget_wm.dart b/examples/github/lib/ui/widgets/repository/repository_widget_wm.dart deleted file mode 100644 index 8336f1fc2..000000000 --- a/examples/github/lib/ui/widgets/repository/repository_widget_wm.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm_github_client/data/repository.dart'; -import 'package:mwwm_github_client/model/favorites/changes.dart'; -import 'package:relation/relation.dart'; - -/// Repository widget's wm -class RepositoryWidgetWm extends WidgetModel { - RepositoryWidgetWm( - WidgetModelDependencies baseDependencies, - Model model, - Repository repo, - ) : super(baseDependencies, model: model) { - _init(repo); - } - - /// Tap on favorite button - final favoriteTapAction = Action(); - - /// Is repository favorite indicator - final isFavoriteState = StreamedState(false); - - /// Repository data - final repoState = StreamedState(); - - @override - void onBind() { - super.onBind(); - - subscribe(favoriteTapAction.stream, _handleFavoriteTap); - } - - void _init(Repository repo) { - repoState.accept(repo); - isFavoriteState.accept(repo.isFavorite); - } - - Future _handleFavoriteTap(bool isFavorite) async { - final Repository repo = repoState.value; - repo.isFavorite = isFavorite; - isFavoriteState.accept(isFavorite); - - try { - await model.perform( - ToggleRepositoryFavoriteValue(repo, isFavorite: isFavorite), - ); - - repoState.accept(repo); - } on Exception catch (e) { - handleError(e); - } - } -} - -/// Emit events about favorites storage change -final favoritesChangedState = StreamedState(); diff --git a/examples/github/lib/ui/widgets/user_widget.dart b/examples/github/lib/ui/widgets/user_widget.dart deleted file mode 100644 index 3640fece8..000000000 --- a/examples/github/lib/ui/widgets/user_widget.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:mwwm_github_client/data/owner.dart'; - -class UserWidget extends StatelessWidget { - UserWidget({ - @required this.user, - Key key, - }) : assert(user != null), - super(key: key); - - final Owner user; - - @override - Widget build(BuildContext context) { - return SizedBox( - child: Card( - margin: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 8, - ), - child: Column( - children: [ - Image.network( - user.avatarUrl, - height: 200, - ), - const SizedBox(height: 8), - Text( - user.login, - style: const TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - color: Colors.black87, - ), - ), - ], - ), - ), - ); - } -} diff --git a/examples/github/lib/utils/exceptions.dart b/examples/github/lib/utils/exceptions.dart deleted file mode 100644 index deaa2b65b..000000000 --- a/examples/github/lib/utils/exceptions.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// There isn't internet connection -class NoInternetException implements Exception { - NoInternetException({this.message}); - - final String message; - - @override - String toString() => message ?? 'There is not internet connection'; -} - -/// Authorization process was canceled -class CanceledAuthorizationException implements Exception { - @override - String toString() => 'Authorization process was canceled'; -} - -/// Authorization failed due to invalid data -class IncorrectClientCredentionalsException implements Exception{ - @override - String toString() => 'Incorrect client credentionals'; -} diff --git a/examples/github/lib/utils/future_extensions.dart b/examples/github/lib/utils/future_extensions.dart deleted file mode 100644 index bfa2e6606..000000000 --- a/examples/github/lib/utils/future_extensions.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -extension FutureExtensions on Future { - Future catchType( - Function(E error) onError, { - bool Function(E error) test, - }) { - return catchError( - (e) => onError(e as E), - test: (e) => e is E && (test?.call(e) ?? true), - ); - } -} diff --git a/examples/github/lib/utils/json_extensions.dart b/examples/github/lib/utils/json_extensions.dart deleted file mode 100644 index 52b94e986..000000000 --- a/examples/github/lib/utils/json_extensions.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -extension JsonExtensions on Map { - /// Return [T] value from json by [key] - T get(String key, {T defaultValue}) { - if (key == null) return defaultValue; - - final dynamic value = this[key]; - if (value == null) return defaultValue; - - if (value is T) { - return value; - } else { - throw Exception('Type: $T is not value type: ${value.runtimeType}'); - } - } -} diff --git a/examples/github/pubspec.yaml b/examples/github/pubspec.yaml deleted file mode 100644 index 129d19360..000000000 --- a/examples/github/pubspec.yaml +++ /dev/null @@ -1,36 +0,0 @@ -name: mwwm_github_client -description: A new Flutter project. -publish_to: "none" # Remove this line if you wish to publish to pub.dev -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - mwwm: - path: ../.. - relation: ^0.0.2 - - provider: ^4.3.2+3 - dio: ^3.0.10 - moor_flutter: ^3.1.0 - moor: ^3.4.0 - sqlite3_flutter_libs: ^0.3.0 - - path_provider: ^1.6.24 - - cupertino_icons: ^1.0.0 - oauth2_client: ^1.6.1 - -dev_dependencies: - moor_generator: ^3.4.0 - build_runner: ^1.10.11 - flutter_test: - sdk: flutter - pedantic: ^1.9.0 - -flutter: - uses-material-design: true diff --git a/examples/github/test/widget_test.dart b/examples/github/test/widget_test.dart deleted file mode 100644 index 0bfd8738d..000000000 --- a/examples/github/test/widget_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:mwwm_github_client/ui/app.dart'; - -void main() { - testWidgets('Counter increments smoke test', (widgetTester) async { - // Build our app and trigger a frame. - await widgetTester.pumpWidget(App()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await widgetTester.tap(find.byIcon(Icons.add)); - await widgetTester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} diff --git a/examples/github/web/favicon.png b/examples/github/web/favicon.png deleted file mode 100644 index 8aaa46ac1..000000000 Binary files a/examples/github/web/favicon.png and /dev/null differ diff --git a/examples/github/web/icons/Icon-192.png b/examples/github/web/icons/Icon-192.png deleted file mode 100644 index b749bfef0..000000000 Binary files a/examples/github/web/icons/Icon-192.png and /dev/null differ diff --git a/examples/github/web/icons/Icon-512.png b/examples/github/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48df..000000000 Binary files a/examples/github/web/icons/Icon-512.png and /dev/null differ diff --git a/examples/github/web/index.html b/examples/github/web/index.html deleted file mode 100644 index 69685cf32..000000000 --- a/examples/github/web/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - mwwm_github_client - - - - - - - - diff --git a/examples/github/web/manifest.json b/examples/github/web/manifest.json deleted file mode 100644 index d47847284..000000000 --- a/examples/github/web/manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "mwwm_github_client", - "short_name": "mwwm_github_client", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} \ No newline at end of file diff --git a/examples/my_anime/.gitignore b/examples/my_anime/.gitignore deleted file mode 100644 index 0fa6b675c..000000000 --- a/examples/my_anime/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release diff --git a/examples/my_anime/.metadata b/examples/my_anime/.metadata deleted file mode 100644 index 56bfc2c4d..000000000 --- a/examples/my_anime/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: f4abaa0735eba4dfd8f33f73363911d63931fe03 - channel: stable - -project_type: app diff --git a/examples/my_anime/README.md b/examples/my_anime/README.md deleted file mode 100644 index c3843e006..000000000 --- a/examples/my_anime/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# my_anime - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/my_anime/analysis_options.yaml b/examples/my_anime/analysis_options.yaml deleted file mode 100644 index 9569bfee1..000000000 --- a/examples/my_anime/analysis_options.yaml +++ /dev/null @@ -1,22 +0,0 @@ -analyzer: - plugins: - - dart_code_metrics - -dart_code_metrics: - anti-patterns: - - long-method - - long-parameter-list - metrics: - cyclomatic-complexity: 20 - maximum-nesting-level: 5 - number-of-parameters: 4 - source-lines-of-code: 50 - metrics-exclude: - - test/** - rules: - - newline-before-return - - no-boolean-literal-compare - - no-empty-block - - prefer-trailing-comma - - prefer-conditional-expressions - - no-equal-then-else diff --git a/examples/my_anime/android/.gitignore b/examples/my_anime/android/.gitignore deleted file mode 100644 index 0a741cb43..000000000 --- a/examples/my_anime/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/examples/my_anime/android/app/build.gradle b/examples/my_anime/android/app/build.gradle deleted file mode 100644 index 44aa7a764..000000000 --- a/examples/my_anime/android/app/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 30 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.my_anime" - minSdkVersion 16 - targetSdkVersion 30 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/examples/my_anime/android/app/src/debug/AndroidManifest.xml b/examples/my_anime/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 3325f36b9..000000000 --- a/examples/my_anime/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/my_anime/android/app/src/main/AndroidManifest.xml b/examples/my_anime/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 71ed61425..000000000 --- a/examples/my_anime/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/examples/my_anime/android/app/src/main/kotlin/com/example/my_anime/MainActivity.kt b/examples/my_anime/android/app/src/main/kotlin/com/example/my_anime/MainActivity.kt deleted file mode 100644 index 63e46a0c6..000000000 --- a/examples/my_anime/android/app/src/main/kotlin/com/example/my_anime/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.my_anime - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/examples/my_anime/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/my_anime/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3f..000000000 --- a/examples/my_anime/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/my_anime/android/app/src/main/res/drawable/launch_background.xml b/examples/my_anime/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/examples/my_anime/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/my_anime/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/my_anime/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/examples/my_anime/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/my_anime/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/my_anime/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/examples/my_anime/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/my_anime/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/my_anime/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/examples/my_anime/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/my_anime/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/my_anime/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/examples/my_anime/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/my_anime/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/my_anime/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/examples/my_anime/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/my_anime/android/app/src/main/res/values-night/styles.xml b/examples/my_anime/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 449a9f930..000000000 --- a/examples/my_anime/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/my_anime/android/app/src/main/res/values/styles.xml b/examples/my_anime/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d74aa35c2..000000000 --- a/examples/my_anime/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/my_anime/android/app/src/profile/AndroidManifest.xml b/examples/my_anime/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 3325f36b9..000000000 --- a/examples/my_anime/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/my_anime/android/build.gradle b/examples/my_anime/android/build.gradle deleted file mode 100644 index 9b6ed06eb..000000000 --- a/examples/my_anime/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/examples/my_anime/android/gradle.properties b/examples/my_anime/android/gradle.properties deleted file mode 100644 index 94adc3a3f..000000000 --- a/examples/my_anime/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/examples/my_anime/android/gradle/wrapper/gradle-wrapper.properties b/examples/my_anime/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bc6a58afd..000000000 --- a/examples/my_anime/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/examples/my_anime/android/settings.gradle b/examples/my_anime/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/examples/my_anime/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/examples/my_anime/ios/.gitignore b/examples/my_anime/ios/.gitignore deleted file mode 100644 index 151026b91..000000000 --- a/examples/my_anime/ios/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/my_anime/ios/Flutter/AppFrameworkInfo.plist b/examples/my_anime/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 9367d483e..000000000 --- a/examples/my_anime/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/examples/my_anime/ios/Flutter/Debug.xcconfig b/examples/my_anime/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/examples/my_anime/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/my_anime/ios/Flutter/Release.xcconfig b/examples/my_anime/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/examples/my_anime/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/my_anime/ios/Runner.xcodeproj/project.pbxproj b/examples/my_anime/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 9a113c580..000000000 --- a/examples/my_anime/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,471 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.myAnime; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.myAnime; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.myAnime; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/my_anime/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/my_anime/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/examples/my_anime/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/my_anime/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/my_anime/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/my_anime/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/my_anime/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/my_anime/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/my_anime/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/my_anime/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/my_anime/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/examples/my_anime/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/my_anime/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/my_anime/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/examples/my_anime/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/my_anime/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/my_anime/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/my_anime/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/my_anime/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/my_anime/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/my_anime/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/my_anime/ios/Runner/AppDelegate.swift b/examples/my_anime/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/examples/my_anime/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/examples/my_anime/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/examples/my_anime/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/my_anime/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/examples/my_anime/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/my_anime/ios/Runner/Base.lproj/Main.storyboard b/examples/my_anime/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/examples/my_anime/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/my_anime/ios/Runner/Info.plist b/examples/my_anime/ios/Runner/Info.plist deleted file mode 100644 index 5800e8ef1..000000000 --- a/examples/my_anime/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - my_anime - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/examples/my_anime/ios/Runner/Runner-Bridging-Header.h b/examples/my_anime/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/examples/my_anime/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/my_anime/lib/data/api/jikan_api.dart b/examples/my_anime/lib/data/api/jikan_api.dart deleted file mode 100644 index 9bdbc8742..000000000 --- a/examples/my_anime/lib/data/api/jikan_api.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:my_anime/data/raw_models/raw_anime_top.dart'; - -import 'package:retrofit/retrofit.dart'; -import 'package:dio/dio.dart'; -import '../raw_models/raw_anime.dart'; - -part 'jikan_api.g.dart'; - -@RestApi(baseUrl: "https://api.jikan.moe/v3/") -abstract class RestClient { - factory RestClient(Dio dio, {String baseUrl}) = _RestClient; - - @GET("/anime/{id}") - Future getAnimeDetails(@Path("id") String id); - - @GET("/top/anime/{page}") - Future getAnimeTop(@Path("page") String page); - -} diff --git a/examples/my_anime/lib/data/api/jikan_api.g.dart b/examples/my_anime/lib/data/api/jikan_api.g.dart deleted file mode 100644 index ee83fb73f..000000000 --- a/examples/my_anime/lib/data/api/jikan_api.g.dart +++ /dev/null @@ -1,61 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'jikan_api.dart'; - -// ************************************************************************** -// RetrofitGenerator -// ************************************************************************** - -class _RestClient implements RestClient { - _RestClient(this._dio, {this.baseUrl}) { - baseUrl ??= 'https://api.jikan.moe/v3/'; - } - - final Dio _dio; - - String? baseUrl; - - @override - Future getAnimeDetails(id) async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.fetch>( - _setStreamType( - Options(method: 'GET', headers: {}, extra: _extra) - .compose(_dio.options, '/anime/$id', - queryParameters: queryParameters, data: _data) - .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); - final value = RawAnime.fromJson(_result.data!); - return value; - } - - @override - Future getAnimeTop(page) async { - - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.fetch>( - _setStreamType( - Options(method: 'GET', headers: {}, extra: _extra) - .compose(_dio.options, '/top/anime/$page', - queryParameters: queryParameters, data: _data) - .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); - final value = RawAnimeTop.fromJson(_result.data!); - return value; - } - - RequestOptions _setStreamType(RequestOptions requestOptions) { - if (T != dynamic && - !(requestOptions.responseType == ResponseType.bytes || - requestOptions.responseType == ResponseType.stream)) { - if (T == String) { - requestOptions.responseType = ResponseType.plain; - } else { - requestOptions.responseType = ResponseType.json; - } - } - return requestOptions; - } -} diff --git a/examples/my_anime/lib/data/mappers/anime_mapper.dart b/examples/my_anime/lib/data/mappers/anime_mapper.dart deleted file mode 100644 index f41bdafc6..000000000 --- a/examples/my_anime/lib/data/mappers/anime_mapper.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:my_anime/data/raw_models/raw_anime_list_element.dart'; -import 'package:my_anime/models/aime_entity.dart'; - -class AnimeMapper { - static AnimeEntity rawAnimeListElementToEntity(RawAnimeListElement raw) { - return AnimeEntity( - endDate: raw.end_date ?? '', - startDate: raw.start_date ?? '', - episodes: raw.episodes ?? 0, - imageUrl: raw.image_url ?? '', - id: raw.mal_id ?? -1, - members: raw.members ?? 0, - rank: raw.rank ?? 0, - score: raw.score ?? 0, - title: raw.title ?? '', - type: raw.type ?? '', - ); - } -} diff --git a/examples/my_anime/lib/data/raw_models/raw_anime.dart b/examples/my_anime/lib/data/raw_models/raw_anime.dart deleted file mode 100644 index 2e79e41e8..000000000 --- a/examples/my_anime/lib/data/raw_models/raw_anime.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'raw_anime.g.dart'; - -@JsonSerializable() -class RawAnime { - RawAnime({ - this.aired = const RawAired(), - this.airing = false, - this.background = '', - this.broadcast = '', - this.duration = '', - this.ending_themes = const [], - this.episodes = 0, - this.favorites = 0, - this.genres = const [], - this.image_url = '', - this.mal_id = 0, - this.members = 0, - this.opening_themes = const [], - this.popularity = 0, - this.premiered = '', - this.rank = 0, - this.rating = '', - this.score = 0, - this.scored_by = 0, - this.status = '', - this.synopsis = '', - this.title = '', - this.title_english = '', - this.title_japanese = '', - this.trailer_url = '', - this.type = '', - }); - - RawAired aired; - bool airing; - String background; - String broadcast; - String duration; - List ending_themes; - int episodes; - int favorites; - List genres; - String image_url; - int mal_id; - int members; - List opening_themes; - int popularity; - String premiered; - int rank; - String rating; - double score; - int scored_by; - String status; - String synopsis; - String title; - String title_english; - String title_japanese; - String trailer_url; - String type; - - factory RawAnime.fromJson(Map json) => _$RawAnimeFromJson(json); - Map toJson() => _$RawAnimeToJson(this); -} - -@JsonSerializable() -class RawAired { - const RawAired({ - this.from = '', - this.to = '', - }); - - final String from; - final String to; - - factory RawAired.fromJson(Map json) => _$RawAiredFromJson(json); - Map toJson() => _$RawAiredToJson(this); -} - -@JsonSerializable() -class RawGenre { - const RawGenre({ - this.mal_id = 0, - this.name = '', - this.type = '', - this.url = '', - }); - - final int mal_id; - final String name; - final String type; - final String url; - - factory RawGenre.fromJson(Map json) => _$RawGenreFromJson(json); - Map toJson() => _$RawGenreToJson(this); -} diff --git a/examples/my_anime/lib/data/raw_models/raw_anime.g.dart b/examples/my_anime/lib/data/raw_models/raw_anime.g.dart deleted file mode 100644 index 08ecbf778..000000000 --- a/examples/my_anime/lib/data/raw_models/raw_anime.g.dart +++ /dev/null @@ -1,101 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'raw_anime.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -RawAnime _$RawAnimeFromJson(Map json) { - return RawAnime( - aired: RawAired.fromJson(json['aired'] as Map), - airing: json['airing'] as bool, - background: json['background'] as String, - broadcast: json['broadcast'] as String, - duration: json['duration'] as String, - ending_themes: (json['ending_themes'] as List) - .map((e) => e as String) - .toList(), - episodes: json['episodes'] as int, - favorites: json['favorites'] as int, - genres: (json['genres'] as List) - .map((e) => RawGenre.fromJson(e as Map)) - .toList(), - image_url: json['image_url'] as String, - mal_id: json['mal_id'] as int, - members: json['members'] as int, - opening_themes: (json['opening_themes'] as List) - .map((e) => e as String) - .toList(), - popularity: json['popularity'] as int, - premiered: json['premiered'] as String, - rank: json['rank'] as int, - rating: json['rating'] as String, - score: (json['score'] as num).toDouble(), - scored_by: json['scored_by'] as int, - status: json['status'] as String, - synopsis: json['synopsis'] as String, - title: json['title'] as String, - title_english: json['title_english'] as String, - title_japanese: json['title_japanese'] as String, - trailer_url: json['trailer_url'] as String, - type: json['type'] as String, - ); -} - -Map _$RawAnimeToJson(RawAnime instance) => { - 'aired': instance.aired, - 'airing': instance.airing, - 'background': instance.background, - 'broadcast': instance.broadcast, - 'duration': instance.duration, - 'ending_themes': instance.ending_themes, - 'episodes': instance.episodes, - 'favorites': instance.favorites, - 'genres': instance.genres, - 'image_url': instance.image_url, - 'mal_id': instance.mal_id, - 'members': instance.members, - 'opening_themes': instance.opening_themes, - 'popularity': instance.popularity, - 'premiered': instance.premiered, - 'rank': instance.rank, - 'rating': instance.rating, - 'score': instance.score, - 'scored_by': instance.scored_by, - 'status': instance.status, - 'synopsis': instance.synopsis, - 'title': instance.title, - 'title_english': instance.title_english, - 'title_japanese': instance.title_japanese, - 'trailer_url': instance.trailer_url, - 'type': instance.type, - }; - -RawAired _$RawAiredFromJson(Map json) { - return RawAired( - from: json['from'] as String, - to: json['to'] as String, - ); -} - -Map _$RawAiredToJson(RawAired instance) => { - 'from': instance.from, - 'to': instance.to, - }; - -RawGenre _$RawGenreFromJson(Map json) { - return RawGenre( - mal_id: json['mal_id'] as int, - name: json['name'] as String, - type: json['type'] as String, - url: json['url'] as String, - ); -} - -Map _$RawGenreToJson(RawGenre instance) => { - 'mal_id': instance.mal_id, - 'name': instance.name, - 'type': instance.type, - 'url': instance.url, - }; diff --git a/examples/my_anime/lib/data/raw_models/raw_anime_list_element.dart b/examples/my_anime/lib/data/raw_models/raw_anime_list_element.dart deleted file mode 100644 index a676d4c04..000000000 --- a/examples/my_anime/lib/data/raw_models/raw_anime_list_element.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'raw_anime_list_element.g.dart'; - -@JsonSerializable() -class RawAnimeListElement { - RawAnimeListElement({ - this.end_date = '', - this.episodes = 0, - this.image_url = '', - this.mal_id = -1, - this.members = 0, - this.rank = 0, - this.score = 0, - this.start_date = '', - this.title = '', - this.type = '', - }); - - String? end_date; - int? episodes; - String? image_url; - int? mal_id; - int? members; - int? rank; - double? score; - String? start_date; - String? title; - String? type; - - factory RawAnimeListElement.fromJson(Map json) => _$RawAnimeListElementFromJson(json); - Map toJson() => _$RawAnimeListElementToJson(this); -} diff --git a/examples/my_anime/lib/data/raw_models/raw_anime_list_element.g.dart b/examples/my_anime/lib/data/raw_models/raw_anime_list_element.g.dart deleted file mode 100644 index eab39de25..000000000 --- a/examples/my_anime/lib/data/raw_models/raw_anime_list_element.g.dart +++ /dev/null @@ -1,35 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'raw_anime_list_element.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -RawAnimeListElement _$RawAnimeListElementFromJson(Map json) { - return RawAnimeListElement( - end_date: json['end_date'] as String?, - episodes: json['episodes'] as int?, - image_url: json['image_url'] as String?, - mal_id: json['mal_id'] as int?, - members: json['members'] as int?, - rank: json['rank'] as int?, - score: (json['score'] as num?)?.toDouble(), - start_date: json['start_date'] as String?, - title: json['title'] as String?, - type: json['type'] as String?, - ); -} - -Map _$RawAnimeListElementToJson(RawAnimeListElement instance) => { - 'end_date': instance.end_date, - 'episodes': instance.episodes, - 'image_url': instance.image_url, - 'mal_id': instance.mal_id, - 'members': instance.members, - 'rank': instance.rank, - 'score': instance.score, - 'start_date': instance.start_date, - 'title': instance.title, - 'type': instance.type, - }; diff --git a/examples/my_anime/lib/data/raw_models/raw_anime_top.dart b/examples/my_anime/lib/data/raw_models/raw_anime_top.dart deleted file mode 100644 index 2d8e7ce37..000000000 --- a/examples/my_anime/lib/data/raw_models/raw_anime_top.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; -import 'package:my_anime/data/raw_models/raw_anime_list_element.dart'; - -part 'raw_anime_top.g.dart'; - -@JsonSerializable() -class RawAnimeTop { - RawAnimeTop({this.top = const []}); - - List top; - - factory RawAnimeTop.fromJson(Map json) => _$RawAnimeTopFromJson(json); - Map toJson() => _$RawAnimeTopToJson(this); -} diff --git a/examples/my_anime/lib/data/raw_models/raw_anime_top.g.dart b/examples/my_anime/lib/data/raw_models/raw_anime_top.g.dart deleted file mode 100644 index 63d6b1c00..000000000 --- a/examples/my_anime/lib/data/raw_models/raw_anime_top.g.dart +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'raw_anime_top.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -RawAnimeTop _$RawAnimeTopFromJson(Map json) { - return RawAnimeTop( - top: (json['top'] as List) - .map((e) => RawAnimeListElement.fromJson(e as Map)) - .toList(), - ); -} - -Map _$RawAnimeTopToJson(RawAnimeTop instance) => - { - 'top': instance.top, - }; diff --git a/examples/my_anime/lib/main.dart b/examples/my_anime/lib/main.dart deleted file mode 100644 index 21c34b845..000000000 --- a/examples/my_anime/lib/main.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:my_anime/data/api/jikan_api.dart'; -import 'package:my_anime/repositories/anime_repository.dart'; -import 'package:my_anime/ui/app/app.dart'; -import 'package:my_anime/ui/app/app_component.dart'; -import 'package:surf_injector/surf_injector.dart'; -import 'package:dio/dio.dart'; - -void main() { - final Dio dio = Dio(); - final RestClient client = RestClient(dio); - final AnimeRepository repository = AnimeRepository(client); - runApp( - Injector( - component: AppComponent(repository), - builder: (_) => App(), - ), - ); -} diff --git a/examples/my_anime/lib/models/aime_entity.dart b/examples/my_anime/lib/models/aime_entity.dart deleted file mode 100644 index e51e8ef95..000000000 --- a/examples/my_anime/lib/models/aime_entity.dart +++ /dev/null @@ -1,61 +0,0 @@ -class AnimeEntity { - AnimeEntity({ - this.startDate = '', - this.endDate = '', - this.airing = false, - this.background = '', - this.broadcast = '', - this.duration = '', - this.endingThemes = const [], - this.episodes = 0, - this.favorites = 0, - this.genres = const [], - this.imageUrl = '', - this.id = 0, - this.members = 0, - this.openingThemes = const [], - this.popularity = 0, - this.premiered = '', - this.rank = 0, - this.rating = '', - this.score = 0, - this.scoredBy = 0, - this.status = '', - this.synopsis = '', - this.title = '', - this.titleEnglish = '', - this.titleJapanese = '', - this.trailerUrl = '', - this.type = '', - this.isFavorite = false, - }); - - String startDate; - String endDate; - bool airing; - String background; - String broadcast; - String duration; - List endingThemes; - int episodes; - int favorites; - List genres; - String imageUrl; - int id; - int members; - List openingThemes; - int popularity; - String premiered; - int rank; - String rating; - double score; - int scoredBy; - String status; - String synopsis; - String title; - String titleEnglish; - String titleJapanese; - String trailerUrl; - String type; - bool isFavorite; -} diff --git a/examples/my_anime/lib/repositories/anime_repository.dart b/examples/my_anime/lib/repositories/anime_repository.dart deleted file mode 100644 index df91c70c2..000000000 --- a/examples/my_anime/lib/repositories/anime_repository.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:my_anime/data/api/jikan_api.dart'; -import 'package:my_anime/data/mappers/anime_mapper.dart'; -import 'package:my_anime/data/raw_models/raw_anime_top.dart'; -import 'package:my_anime/models/aime_entity.dart'; - -class AnimeRepository { - AnimeRepository(this._client); - - RestClient _client; - - Future> getTop([int page = 1]) async { - print('requesting animes'); - RawAnimeTop data = await _client.getAnimeTop(page.toString()); - - return data.top.map((rawAnime) => AnimeMapper.rawAnimeListElementToEntity(rawAnime)).toList(); - } -} diff --git a/examples/my_anime/lib/ui/app/app.dart b/examples/my_anime/lib/ui/app/app.dart deleted file mode 100644 index da1c6f4f0..000000000 --- a/examples/my_anime/lib/ui/app/app.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:my_anime/ui/screens/main_screen/main_screen.dart'; - -class App extends StatelessWidget { - const App({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) => MaterialApp( - title: 'My anime', - theme: ThemeData.dark(), - home: MainScreen(), - ); -} diff --git a/examples/my_anime/lib/ui/app/app_component.dart b/examples/my_anime/lib/ui/app/app_component.dart deleted file mode 100644 index 7419b586e..000000000 --- a/examples/my_anime/lib/ui/app/app_component.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'package:my_anime/repositories/anime_repository.dart'; -import 'package:surf_injector/surf_injector.dart'; - -class AppComponent extends Component { - AppComponent(this.animeRepository); - - final AnimeRepository animeRepository; -} diff --git a/examples/my_anime/lib/ui/screens/details_screen/details_screen.dart b/examples/my_anime/lib/ui/screens/details_screen/details_screen.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/my_anime/lib/ui/screens/details_screen/details_screen_wm.dart b/examples/my_anime/lib/ui/screens/details_screen/details_screen_wm.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/my_anime/lib/ui/screens/favorites_screen/favorites_screen.dart b/examples/my_anime/lib/ui/screens/favorites_screen/favorites_screen.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/my_anime/lib/ui/screens/favorites_screen/favorites_screen_wm.dart b/examples/my_anime/lib/ui/screens/favorites_screen/favorites_screen_wm.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/my_anime/lib/ui/screens/main_screen/main_screen.dart b/examples/my_anime/lib/ui/screens/main_screen/main_screen.dart deleted file mode 100644 index 477bfaf07..000000000 --- a/examples/my_anime/lib/ui/screens/main_screen/main_screen.dart +++ /dev/null @@ -1,74 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:my_anime/ui/app/app_component.dart'; -import 'package:my_anime/ui/screens/main_screen/main_screen_wm.dart'; -import 'package:my_anime/ui/screens/top_anime_screen/top_anime_screen.dart'; -import 'package:my_anime/ui/screens/top_anime_screen/top_anime_screen_component.dart'; -import 'package:relation/relation.dart'; -import 'package:surf_injector/surf_injector.dart'; - -class MainScreen extends CoreMwwmWidget { - MainScreen({Key? key}) - : super( - key: key, - widgetModelBuilder: (context) { - return MainScreenWM(); - }, - ); - - @override - WidgetState createWidgetState() => _MainScreenState(); -} - -class _MainScreenState extends WidgetState { - @override - Widget build(BuildContext context) => StreamedStateBuilder( - streamedState: wm.selectedScreenIndexState, - builder: (_, selectedScreenIndex) => Scaffold( - body: _getScreen(selectedScreenIndex), - bottomNavigationBar: MainScreenBottomBar(selectedScreenIndex, wm.navigationTap), - ), - ); - - Widget _getScreen(int index) { - final screens = [ - Injector( - component: TopAnimeScreenComponent( - Injector.of(context).component.animeRepository, - ), - builder: (_) => TopAnimeScreen(), - ), - Center( - child: Text( - 'Favorites screen', - ), - ), - ]; - return screens[index]; - } -} - -class MainScreenBottomBar extends StatelessWidget { - final void Function(int) _callback; - final int _index; - const MainScreenBottomBar(this._index, this._callback, {Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return BottomNavigationBar( - items: const [ - const BottomNavigationBarItem( - icon: const Icon(Icons.view_list_rounded), - label: 'Top', - ), - const BottomNavigationBarItem( - icon: const Icon(Icons.favorite), - label: 'Favorites', - ), - ], - currentIndex: _index, - selectedItemColor: Colors.green[800], - onTap: _callback, - ); - } -} diff --git a/examples/my_anime/lib/ui/screens/main_screen/main_screen_wm.dart b/examples/my_anime/lib/ui/screens/main_screen/main_screen_wm.dart deleted file mode 100644 index 5a779a891..000000000 --- a/examples/my_anime/lib/ui/screens/main_screen/main_screen_wm.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; - -class MainScreenWM extends WidgetModel { - final StreamedState _selectedScreenIndexState = StreamedState(0); - - MainScreenWM() : super(const WidgetModelDependencies()); - StreamedState get selectedScreenIndexState => _selectedScreenIndexState; - - void navigationTap(int index) { - _selectedScreenIndexState.accept(index); - } -} diff --git a/examples/my_anime/lib/ui/screens/top_anime_screen/top_anime_screen.dart b/examples/my_anime/lib/ui/screens/top_anime_screen/top_anime_screen.dart deleted file mode 100644 index 67147300f..000000000 --- a/examples/my_anime/lib/ui/screens/top_anime_screen/top_anime_screen.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:my_anime/models/aime_entity.dart'; -import 'package:my_anime/ui/screens/top_anime_screen/top_anime_screen_wm.dart'; -import 'package:my_anime/ui/widgets/anime_list_element.dart'; -import 'package:relation/relation.dart'; - -class TopAnimeScreen extends CoreMwwmWidget { - TopAnimeScreen({Key? key}) - : super( - key: key, - widgetModelBuilder: createTopAnimeScreenWM, - ); - @override - WidgetState createWidgetState() => _TopAnimeScreenState(); -} - -class _TopAnimeScreenState extends WidgetState { - @override - Widget build(BuildContext context) => EntityStateBuilder>( - streamedState: wm.topAnimeState, - loadingChild: const Center( - child: CircularProgressIndicator(), - ), - builder: (_, animes) => Scaffold( - appBar: AppBar( - title: const Text('Top'), - ), - body: ListView.builder( - itemBuilder: (_, idex) => AnimeListElement(animes[idex]), - itemCount: animes.length, - ), - ), - ); -} diff --git a/examples/my_anime/lib/ui/screens/top_anime_screen/top_anime_screen_component.dart b/examples/my_anime/lib/ui/screens/top_anime_screen/top_anime_screen_component.dart deleted file mode 100644 index de8508e30..000000000 --- a/examples/my_anime/lib/ui/screens/top_anime_screen/top_anime_screen_component.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'package:my_anime/repositories/anime_repository.dart'; -import 'package:surf_injector/surf_injector.dart'; - -class TopAnimeScreenComponent extends Component { - TopAnimeScreenComponent(this.animeRepository); - - final AnimeRepository animeRepository; -} diff --git a/examples/my_anime/lib/ui/screens/top_anime_screen/top_anime_screen_wm.dart b/examples/my_anime/lib/ui/screens/top_anime_screen/top_anime_screen_wm.dart deleted file mode 100644 index 2ed118764..000000000 --- a/examples/my_anime/lib/ui/screens/top_anime_screen/top_anime_screen_wm.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:my_anime/models/aime_entity.dart'; -import 'package:my_anime/repositories/anime_repository.dart'; -import 'package:my_anime/ui/screens/top_anime_screen/top_anime_screen_component.dart'; -import 'package:relation/relation.dart'; -import 'package:surf_injector/surf_injector.dart'; - -TopAnimeScreenWM createTopAnimeScreenWM(BuildContext context) { - TopAnimeScreenComponent component = Injector.of(context).component; - return TopAnimeScreenWM(component.animeRepository); -} - -class TopAnimeScreenWM extends WidgetModel { - final AnimeRepository _repository; - final EntityStreamedState> _topAnimeState = EntityStreamedState(EntityState.loading()); - - TopAnimeScreenWM( - this._repository, - ) : super(const WidgetModelDependencies()) { - _repository.getTop().then((data) => _topAnimeState.accept(EntityState.content(data))).catchError((error) { - print(error); - return error; - }); - } - EntityStreamedState> get topAnimeState => _topAnimeState; -} diff --git a/examples/my_anime/lib/ui/widgets/anime_list_element.dart b/examples/my_anime/lib/ui/widgets/anime_list_element.dart deleted file mode 100644 index 3ab03f3b5..000000000 --- a/examples/my_anime/lib/ui/widgets/anime_list_element.dart +++ /dev/null @@ -1,86 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:my_anime/models/aime_entity.dart'; - -class AnimeListElement extends StatelessWidget { - final AnimeEntity anime; - const AnimeListElement(this.anime, {Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Card( - clipBehavior: Clip.antiAliasWithSaveLayer, - elevation: 10, - child: SizedBox( - height: 200, - child: Row( - children: [ - SizedBox( - child: Image.network( - anime.imageUrl, - fit: BoxFit.cover, - ), - width: 150, - ), - Expanded( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: _Title(anime.title), - ), - _Subtitle('Rank', anime.rank.toString()), - _Subtitle('Score', anime.score.toString()), - _Subtitle('Members', anime.members.toString()), - _Subtitle('Type', anime.type), - _Subtitle('Episodes', anime.episodes.toString()), - _Subtitle('Release Dates', '${anime.startDate} - ${anime.endDate}'), - ], - ), - ), - ), - ], - ), - ), - ); - } -} - -class _Title extends StatelessWidget { - const _Title(this._title, {Key? key}) : super(key: key); - - final String _title; - - @override - Widget build(BuildContext context) { - return Text( - _title, - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: const TextStyle( - fontSize: 20, - ), - ); - } -} - -class _Subtitle extends StatelessWidget { - const _Subtitle(this._subtitle, this._value, {Key? key}) : super(key: key); - - final String _subtitle; - final String _value; - - @override - Widget build(BuildContext context) { - return Text( - '$_subtitle: $_value', - style: const TextStyle( - fontSize: 15, - color: Colors.white60, - ), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ); - } -} diff --git a/examples/my_anime/pubspec.yaml b/examples/my_anime/pubspec.yaml deleted file mode 100644 index 4d09d3115..000000000 --- a/examples/my_anime/pubspec.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: my_anime -description: A new Flutter project. - -publish_to: "none" - -version: 1.0.0+1 - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - retrofit: ^2.0.1 - mwwm: ^2.0.0 - relation: ^3.1.0 - tabnavigator: ^1.0.0 - - # DI - surf_injector: ^1.0.0 - - # хранение данных между сеансами - hive: ^2.0.4 - hive_flutter: ^1.1.0 - -dev_dependencies: - flutter_test: - sdk: flutter - - json_serializable: ^4.1.4 - - # тестирование - mocktail: ^0.1.4 - - # генераторы - hive_generator: ^1.1.0 - retrofit_generator: ^2.0.1 - build_runner: ^2.1.1 - dart_code_metrics: ^4.1.0 - -flutter: - uses-material-design: true diff --git a/examples/my_anime/web/favicon.png b/examples/my_anime/web/favicon.png deleted file mode 100644 index 8aaa46ac1..000000000 Binary files a/examples/my_anime/web/favicon.png and /dev/null differ diff --git a/examples/my_anime/web/icons/Icon-192.png b/examples/my_anime/web/icons/Icon-192.png deleted file mode 100644 index b749bfef0..000000000 Binary files a/examples/my_anime/web/icons/Icon-192.png and /dev/null differ diff --git a/examples/my_anime/web/icons/Icon-512.png b/examples/my_anime/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48df..000000000 Binary files a/examples/my_anime/web/icons/Icon-512.png and /dev/null differ diff --git a/examples/my_anime/web/index.html b/examples/my_anime/web/index.html deleted file mode 100644 index c11815905..000000000 --- a/examples/my_anime/web/index.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - my_anime - - - - - - - diff --git a/examples/my_anime/web/manifest.json b/examples/my_anime/web/manifest.json deleted file mode 100644 index c2b79295b..000000000 --- a/examples/my_anime/web/manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "my_anime", - "short_name": "my_anime", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} diff --git a/examples/my_anime/windows/.gitignore b/examples/my_anime/windows/.gitignore deleted file mode 100644 index d492d0d98..000000000 --- a/examples/my_anime/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -flutter/ephemeral/ - -# Visual Studio user-specific files. -*.suo -*.user -*.userosscache -*.sln.docstates - -# Visual Studio build-related files. -x64/ -x86/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ diff --git a/examples/my_anime/windows/CMakeLists.txt b/examples/my_anime/windows/CMakeLists.txt deleted file mode 100644 index 65c32c5c3..000000000 --- a/examples/my_anime/windows/CMakeLists.txt +++ /dev/null @@ -1,95 +0,0 @@ -cmake_minimum_required(VERSION 3.15) -project(my_anime LANGUAGES CXX) - -set(BINARY_NAME "my_anime") - -cmake_policy(SET CMP0063 NEW) - -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Configure build options. -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTICONFIG) - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" - CACHE STRING "" FORCE) -else() - if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") - endif() -endif() - -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") - -# Use Unicode for all projects. -add_definitions(-DUNICODE -D_UNICODE) - -# Compilation settings that should be applied to most targets. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") - target_compile_options(${TARGET} PRIVATE /EHsc) - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") - target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") -endfunction() - -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") - -# Flutter library and tool build rules. -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build -add_subdirectory("runner") - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# Support files are copied into place next to the executable, so that it can -# run in place. This is done instead of making a separate bundle (as on Linux) -# so that building and running from within Visual Studio will work. -set(BUILD_BUNDLE_DIR "$") -# Make the "install" step default, as it's required to run. -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - CONFIGURATIONS Profile;Release - COMPONENT Runtime) diff --git a/examples/my_anime/windows/flutter/CMakeLists.txt b/examples/my_anime/windows/flutter/CMakeLists.txt deleted file mode 100644 index b02c5485c..000000000 --- a/examples/my_anime/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,103 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") - -# === Flutter Library === -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "flutter_export.h" - "flutter_windows.h" - "flutter_messenger.h" - "flutter_plugin_registrar.h" - "flutter_texture_registrar.h" -) -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") -add_dependencies(flutter flutter_assemble) - -# === Wrapper === -list(APPEND CPP_WRAPPER_SOURCES_CORE - "core_implementations.cc" - "standard_codec.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN - "plugin_registrar.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_APP - "flutter_engine.cc" - "flutter_view_controller.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") - -# Wrapper sources needed for a plugin. -add_library(flutter_wrapper_plugin STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} -) -apply_standard_settings(flutter_wrapper_plugin) -set_target_properties(flutter_wrapper_plugin PROPERTIES - POSITION_INDEPENDENT_CODE ON) -set_target_properties(flutter_wrapper_plugin PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) -target_include_directories(flutter_wrapper_plugin PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_plugin flutter_assemble) - -# Wrapper sources needed for the runner. -add_library(flutter_wrapper_app STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_APP} -) -apply_standard_settings(flutter_wrapper_app) -target_link_libraries(flutter_wrapper_app PUBLIC flutter) -target_include_directories(flutter_wrapper_app PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_app flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} - ${PHONY_OUTPUT} - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} -) diff --git a/examples/my_anime/windows/flutter/generated_plugin_registrant.cc b/examples/my_anime/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 4bfa0f3a3..000000000 --- a/examples/my_anime/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,9 +0,0 @@ -// -// Generated file. Do not edit. -// - -#include "generated_plugin_registrant.h" - - -void RegisterPlugins(flutter::PluginRegistry* registry) { -} diff --git a/examples/my_anime/windows/flutter/generated_plugin_registrant.h b/examples/my_anime/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index 9846246b4..000000000 --- a/examples/my_anime/windows/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// Generated file. Do not edit. -// - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/examples/my_anime/windows/flutter/generated_plugins.cmake b/examples/my_anime/windows/flutter/generated_plugins.cmake deleted file mode 100644 index 4d10c2518..000000000 --- a/examples/my_anime/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) diff --git a/examples/my_anime/windows/runner/CMakeLists.txt b/examples/my_anime/windows/runner/CMakeLists.txt deleted file mode 100644 index 977e38b5d..000000000 --- a/examples/my_anime/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -cmake_minimum_required(VERSION 3.15) -project(runner LANGUAGES CXX) - -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "run_loop.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) -apply_standard_settings(${BINARY_NAME}) -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/examples/my_anime/windows/runner/Runner.rc b/examples/my_anime/windows/runner/Runner.rc deleted file mode 100644 index 6b384f828..000000000 --- a/examples/my_anime/windows/runner/Runner.rc +++ /dev/null @@ -1,121 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#pragma code_page(65001) -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APP_ICON ICON "resources\\app_icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#ifdef FLUTTER_BUILD_NUMBER -#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER -#else -#define VERSION_AS_NUMBER 1,0,0 -#endif - -#ifdef FLUTTER_BUILD_NAME -#define VERSION_AS_STRING #FLUTTER_BUILD_NAME -#else -#define VERSION_AS_STRING "1.0.0" -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_AS_NUMBER - PRODUCTVERSION VERSION_AS_NUMBER - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "A new Flutter project." "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "my_anime" "\0" - VALUE "LegalCopyright", "Copyright (C) 2021 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "my_anime.exe" "\0" - VALUE "ProductName", "my_anime" "\0" - VALUE "ProductVersion", VERSION_AS_STRING "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/examples/my_anime/windows/runner/flutter_window.cpp b/examples/my_anime/windows/runner/flutter_window.cpp deleted file mode 100644 index 41bbc5e03..000000000 --- a/examples/my_anime/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(RunLoop* run_loop, - const flutter::DartProject& project) - : run_loop_(run_loop), project_(project) {} - -FlutterWindow::~FlutterWindow() {} - -bool FlutterWindow::OnCreate() { - if (!Win32Window::OnCreate()) { - return false; - } - - RECT frame = GetClientArea(); - - // The size here must match the window dimensions to avoid unnecessary surface - // creation / destruction in the startup path. - flutter_controller_ = std::make_unique( - frame.right - frame.left, frame.bottom - frame.top, project_); - // Ensure that basic setup of the controller was successful. - if (!flutter_controller_->engine() || !flutter_controller_->view()) { - return false; - } - RegisterPlugins(flutter_controller_->engine()); - run_loop_->RegisterFlutterInstance(flutter_controller_->engine()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - run_loop_->UnregisterFlutterInstance(flutter_controller_->engine()); - flutter_controller_ = nullptr; - } - - Win32Window::OnDestroy(); -} - -LRESULT -FlutterWindow::MessageHandler(HWND hwnd, UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - // Give Flutter, including plugins, an opportunity to handle window messages. - if (flutter_controller_) { - std::optional result = - flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, - lparam); - if (result) { - return *result; - } - } - - switch (message) { - case WM_FONTCHANGE: - flutter_controller_->engine()->ReloadSystemFonts(); - break; - } - - return Win32Window::MessageHandler(hwnd, message, wparam, lparam); -} diff --git a/examples/my_anime/windows/runner/flutter_window.h b/examples/my_anime/windows/runner/flutter_window.h deleted file mode 100644 index b663ddd50..000000000 --- a/examples/my_anime/windows/runner/flutter_window.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "run_loop.h" -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow driven by the |run_loop|, hosting a - // Flutter view running |project|. - explicit FlutterWindow(RunLoop* run_loop, - const flutter::DartProject& project); - virtual ~FlutterWindow(); - - protected: - // Win32Window: - bool OnCreate() override; - void OnDestroy() override; - LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, - LPARAM const lparam) noexcept override; - - private: - // The run loop driving events for this window. - RunLoop* run_loop_; - - // The project to run. - flutter::DartProject project_; - - // The Flutter instance hosted by this window. - std::unique_ptr flutter_controller_; -}; - -#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/examples/my_anime/windows/runner/main.cpp b/examples/my_anime/windows/runner/main.cpp deleted file mode 100644 index f85d50cc0..000000000 --- a/examples/my_anime/windows/runner/main.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include -#include - -#include "flutter_window.h" -#include "run_loop.h" -#include "utils.h" - -int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { - // Attach to console when present (e.g., 'flutter run') or create a - // new console when running with a debugger. - if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { - CreateAndAttachConsole(); - } - - // Initialize COM, so that it is available for use in the library and/or - // plugins. - ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - RunLoop run_loop; - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(&run_loop, project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.CreateAndShow(L"my_anime", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - run_loop.Run(); - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/examples/my_anime/windows/runner/resource.h b/examples/my_anime/windows/runner/resource.h deleted file mode 100644 index 66a65d1e4..000000000 --- a/examples/my_anime/windows/runner/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Runner.rc -// -#define IDI_APP_ICON 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/examples/my_anime/windows/runner/resources/app_icon.ico b/examples/my_anime/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20caf..000000000 Binary files a/examples/my_anime/windows/runner/resources/app_icon.ico and /dev/null differ diff --git a/examples/my_anime/windows/runner/run_loop.cpp b/examples/my_anime/windows/runner/run_loop.cpp deleted file mode 100644 index 2d6636ab6..000000000 --- a/examples/my_anime/windows/runner/run_loop.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "run_loop.h" - -#include - -#include - -RunLoop::RunLoop() {} - -RunLoop::~RunLoop() {} - -void RunLoop::Run() { - bool keep_running = true; - TimePoint next_flutter_event_time = TimePoint::clock::now(); - while (keep_running) { - std::chrono::nanoseconds wait_duration = - std::max(std::chrono::nanoseconds(0), - next_flutter_event_time - TimePoint::clock::now()); - ::MsgWaitForMultipleObjects( - 0, nullptr, FALSE, static_cast(wait_duration.count() / 1000), - QS_ALLINPUT); - bool processed_events = false; - MSG message; - // All pending Windows messages must be processed; MsgWaitForMultipleObjects - // won't return again for items left in the queue after PeekMessage. - while (::PeekMessage(&message, nullptr, 0, 0, PM_REMOVE)) { - processed_events = true; - if (message.message == WM_QUIT) { - keep_running = false; - break; - } - ::TranslateMessage(&message); - ::DispatchMessage(&message); - // Allow Flutter to process messages each time a Windows message is - // processed, to prevent starvation. - next_flutter_event_time = - std::min(next_flutter_event_time, ProcessFlutterMessages()); - } - // If the PeekMessage loop didn't run, process Flutter messages. - if (!processed_events) { - next_flutter_event_time = - std::min(next_flutter_event_time, ProcessFlutterMessages()); - } - } -} - -void RunLoop::RegisterFlutterInstance( - flutter::FlutterEngine* flutter_instance) { - flutter_instances_.insert(flutter_instance); -} - -void RunLoop::UnregisterFlutterInstance( - flutter::FlutterEngine* flutter_instance) { - flutter_instances_.erase(flutter_instance); -} - -RunLoop::TimePoint RunLoop::ProcessFlutterMessages() { - TimePoint next_event_time = TimePoint::max(); - for (auto instance : flutter_instances_) { - std::chrono::nanoseconds wait_duration = instance->ProcessMessages(); - if (wait_duration != std::chrono::nanoseconds::max()) { - next_event_time = - std::min(next_event_time, TimePoint::clock::now() + wait_duration); - } - } - return next_event_time; -} diff --git a/examples/my_anime/windows/runner/run_loop.h b/examples/my_anime/windows/runner/run_loop.h deleted file mode 100644 index 000d36246..000000000 --- a/examples/my_anime/windows/runner/run_loop.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef RUNNER_RUN_LOOP_H_ -#define RUNNER_RUN_LOOP_H_ - -#include - -#include -#include - -// A runloop that will service events for Flutter instances as well -// as native messages. -class RunLoop { - public: - RunLoop(); - ~RunLoop(); - - // Prevent copying - RunLoop(RunLoop const&) = delete; - RunLoop& operator=(RunLoop const&) = delete; - - // Runs the run loop until the application quits. - void Run(); - - // Registers the given Flutter instance for event servicing. - void RegisterFlutterInstance( - flutter::FlutterEngine* flutter_instance); - - // Unregisters the given Flutter instance from event servicing. - void UnregisterFlutterInstance( - flutter::FlutterEngine* flutter_instance); - - private: - using TimePoint = std::chrono::steady_clock::time_point; - - // Processes all currently pending messages for registered Flutter instances. - TimePoint ProcessFlutterMessages(); - - std::set flutter_instances_; -}; - -#endif // RUNNER_RUN_LOOP_H_ diff --git a/examples/my_anime/windows/runner/runner.exe.manifest b/examples/my_anime/windows/runner/runner.exe.manifest deleted file mode 100644 index c977c4a42..000000000 --- a/examples/my_anime/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,20 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - - - - - - - diff --git a/examples/my_anime/windows/runner/utils.cpp b/examples/my_anime/windows/runner/utils.cpp deleted file mode 100644 index d19bdbbcc..000000000 --- a/examples/my_anime/windows/runner/utils.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include - -#include - -void CreateAndAttachConsole() { - if (::AllocConsole()) { - FILE *unused; - if (freopen_s(&unused, "CONOUT$", "w", stdout)) { - _dup2(_fileno(stdout), 1); - } - if (freopen_s(&unused, "CONOUT$", "w", stderr)) { - _dup2(_fileno(stdout), 2); - } - std::ios::sync_with_stdio(); - FlutterDesktopResyncOutputStreams(); - } -} - -std::vector GetCommandLineArguments() { - // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. - int argc; - wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - if (argv == nullptr) { - return std::vector(); - } - - std::vector command_line_arguments; - - // Skip the first argument as it's the binary name. - for (int i = 1; i < argc; i++) { - command_line_arguments.push_back(Utf8FromUtf16(argv[i])); - } - - ::LocalFree(argv); - - return command_line_arguments; -} - -std::string Utf8FromUtf16(const wchar_t* utf16_string) { - if (utf16_string == nullptr) { - return std::string(); - } - int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, nullptr, 0, nullptr, nullptr); - if (target_length == 0) { - return std::string(); - } - std::string utf8_string; - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, utf8_string.data(), - target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/examples/my_anime/windows/runner/utils.h b/examples/my_anime/windows/runner/utils.h deleted file mode 100644 index 3879d5475..000000000 --- a/examples/my_anime/windows/runner/utils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ - -#include -#include - -// Creates a console for the process, and redirects stdout and stderr to -// it for both the runner and the Flutter library. -void CreateAndAttachConsole(); - -// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string -// encoded in UTF-8. Returns an empty std::string on failure. -std::string Utf8FromUtf16(const wchar_t* utf16_string); - -// Gets the command line arguments passed in as a std::vector, -// encoded in UTF-8. Returns an empty std::vector on failure. -std::vector GetCommandLineArguments(); - -#endif // RUNNER_UTILS_H_ diff --git a/examples/my_anime/windows/runner/win32_window.cpp b/examples/my_anime/windows/runner/win32_window.cpp deleted file mode 100644 index c10f08dc7..000000000 --- a/examples/my_anime/windows/runner/win32_window.cpp +++ /dev/null @@ -1,245 +0,0 @@ -#include "win32_window.h" - -#include - -#include "resource.h" - -namespace { - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -// The number of Win32Window objects that currently exist. -static int g_active_window_count = 0; - -using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); - -// Scale helper to convert logical scaler values to physical using passed in -// scale factor -int Scale(int source, double scale_factor) { - return static_cast(source * scale_factor); -} - -// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. -// This API is only needed for PerMonitor V1 awareness mode. -void EnableFullDpiSupportIfAvailable(HWND hwnd) { - HMODULE user32_module = LoadLibraryA("User32.dll"); - if (!user32_module) { - return; - } - auto enable_non_client_dpi_scaling = - reinterpret_cast( - GetProcAddress(user32_module, "EnableNonClientDpiScaling")); - if (enable_non_client_dpi_scaling != nullptr) { - enable_non_client_dpi_scaling(hwnd); - FreeLibrary(user32_module); - } -} - -} // namespace - -// Manages the Win32Window's window class registration. -class WindowClassRegistrar { - public: - ~WindowClassRegistrar() = default; - - // Returns the singleton registar instance. - static WindowClassRegistrar* GetInstance() { - if (!instance_) { - instance_ = new WindowClassRegistrar(); - } - return instance_; - } - - // Returns the name of the window class, registering the class if it hasn't - // previously been registered. - const wchar_t* GetWindowClass(); - - // Unregisters the window class. Should only be called if there are no - // instances of the window. - void UnregisterWindowClass(); - - private: - WindowClassRegistrar() = default; - - static WindowClassRegistrar* instance_; - - bool class_registered_ = false; -}; - -WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; - -const wchar_t* WindowClassRegistrar::GetWindowClass() { - if (!class_registered_) { - WNDCLASS window_class{}; - window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); - window_class.lpszClassName = kWindowClassName; - window_class.style = CS_HREDRAW | CS_VREDRAW; - window_class.cbClsExtra = 0; - window_class.cbWndExtra = 0; - window_class.hInstance = GetModuleHandle(nullptr); - window_class.hIcon = - LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); - window_class.hbrBackground = 0; - window_class.lpszMenuName = nullptr; - window_class.lpfnWndProc = Win32Window::WndProc; - RegisterClass(&window_class); - class_registered_ = true; - } - return kWindowClassName; -} - -void WindowClassRegistrar::UnregisterWindowClass() { - UnregisterClass(kWindowClassName, nullptr); - class_registered_ = false; -} - -Win32Window::Win32Window() { - ++g_active_window_count; -} - -Win32Window::~Win32Window() { - --g_active_window_count; - Destroy(); -} - -bool Win32Window::CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size) { - Destroy(); - - const wchar_t* window_class = - WindowClassRegistrar::GetInstance()->GetWindowClass(); - - const POINT target_point = {static_cast(origin.x), - static_cast(origin.y)}; - HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); - UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); - double scale_factor = dpi / 96.0; - - HWND window = CreateWindow( - window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, - Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), - Scale(size.width, scale_factor), Scale(size.height, scale_factor), - nullptr, nullptr, GetModuleHandle(nullptr), this); - - if (!window) { - return false; - } - - return OnCreate(); -} - -// static -LRESULT CALLBACK Win32Window::WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - if (message == WM_NCCREATE) { - auto window_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, - reinterpret_cast(window_struct->lpCreateParams)); - - auto that = static_cast(window_struct->lpCreateParams); - EnableFullDpiSupportIfAvailable(window); - that->window_handle_ = window; - } else if (Win32Window* that = GetThisFromHandle(window)) { - return that->MessageHandler(window, message, wparam, lparam); - } - - return DefWindowProc(window, message, wparam, lparam); -} - -LRESULT -Win32Window::MessageHandler(HWND hwnd, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - switch (message) { - case WM_DESTROY: - window_handle_ = nullptr; - Destroy(); - if (quit_on_close_) { - PostQuitMessage(0); - } - return 0; - - case WM_DPICHANGED: { - auto newRectSize = reinterpret_cast(lparam); - LONG newWidth = newRectSize->right - newRectSize->left; - LONG newHeight = newRectSize->bottom - newRectSize->top; - - SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, - newHeight, SWP_NOZORDER | SWP_NOACTIVATE); - - return 0; - } - case WM_SIZE: { - RECT rect = GetClientArea(); - if (child_content_ != nullptr) { - // Size and position the child window. - MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, - rect.bottom - rect.top, TRUE); - } - return 0; - } - - case WM_ACTIVATE: - if (child_content_ != nullptr) { - SetFocus(child_content_); - } - return 0; - } - - return DefWindowProc(window_handle_, message, wparam, lparam); -} - -void Win32Window::Destroy() { - OnDestroy(); - - if (window_handle_) { - DestroyWindow(window_handle_); - window_handle_ = nullptr; - } - if (g_active_window_count == 0) { - WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); - } -} - -Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { - return reinterpret_cast( - GetWindowLongPtr(window, GWLP_USERDATA)); -} - -void Win32Window::SetChildContent(HWND content) { - child_content_ = content; - SetParent(content, window_handle_); - RECT frame = GetClientArea(); - - MoveWindow(content, frame.left, frame.top, frame.right - frame.left, - frame.bottom - frame.top, true); - - SetFocus(child_content_); -} - -RECT Win32Window::GetClientArea() { - RECT frame; - GetClientRect(window_handle_, &frame); - return frame; -} - -HWND Win32Window::GetHandle() { - return window_handle_; -} - -void Win32Window::SetQuitOnClose(bool quit_on_close) { - quit_on_close_ = quit_on_close; -} - -bool Win32Window::OnCreate() { - // No-op; provided for subclasses. - return true; -} - -void Win32Window::OnDestroy() { - // No-op; provided for subclasses. -} diff --git a/examples/my_anime/windows/runner/win32_window.h b/examples/my_anime/windows/runner/win32_window.h deleted file mode 100644 index 17ba43112..000000000 --- a/examples/my_anime/windows/runner/win32_window.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef RUNNER_WIN32_WINDOW_H_ -#define RUNNER_WIN32_WINDOW_H_ - -#include - -#include -#include -#include - -// A class abstraction for a high DPI-aware Win32 Window. Intended to be -// inherited from by classes that wish to specialize with custom -// rendering and input handling -class Win32Window { - public: - struct Point { - unsigned int x; - unsigned int y; - Point(unsigned int x, unsigned int y) : x(x), y(y) {} - }; - - struct Size { - unsigned int width; - unsigned int height; - Size(unsigned int width, unsigned int height) - : width(width), height(height) {} - }; - - Win32Window(); - virtual ~Win32Window(); - - // Creates and shows a win32 window with |title| and position and size using - // |origin| and |size|. New windows are created on the default monitor. Window - // sizes are specified to the OS in physical pixels, hence to ensure a - // consistent size to will treat the width height passed in to this function - // as logical pixels and scale to appropriate for the default monitor. Returns - // true if the window was created successfully. - bool CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size); - - // Release OS resources associated with window. - void Destroy(); - - // Inserts |content| into the window tree. - void SetChildContent(HWND content); - - // Returns the backing Window handle to enable clients to set icon and other - // window properties. Returns nullptr if the window has been destroyed. - HWND GetHandle(); - - // If true, closing this window will quit the application. - void SetQuitOnClose(bool quit_on_close); - - // Return a RECT representing the bounds of the current client area. - RECT GetClientArea(); - - protected: - // Processes and route salient window messages for mouse handling, - // size change and DPI. Delegates handling of these to member overloads that - // inheriting classes can handle. - virtual LRESULT MessageHandler(HWND window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Called when CreateAndShow is called, allowing subclass window-related - // setup. Subclasses should return false if setup fails. - virtual bool OnCreate(); - - // Called when Destroy is called. - virtual void OnDestroy(); - - private: - friend class WindowClassRegistrar; - - // OS callback called by message pump. Handles the WM_NCCREATE message which - // is passed when the non-client area is being created and enables automatic - // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by - // MessageHandler. - static LRESULT CALLBACK WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Retrieves a class instance pointer for |window| - static Win32Window* GetThisFromHandle(HWND const window) noexcept; - - bool quit_on_close_ = false; - - // window handle for top level window. - HWND window_handle_ = nullptr; - - // window handle for hosted content. - HWND child_content_ = nullptr; -}; - -#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/examples/simple_messenger/.metadata b/examples/simple_messenger/.metadata deleted file mode 100644 index cd984dd00..000000000 --- a/examples/simple_messenger/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 9b2d32b605630f28625709ebd9d78ab3016b2bf6 - channel: stable - -project_type: app diff --git a/examples/simple_messenger/analysis_options.yaml b/examples/simple_messenger/analysis_options.yaml deleted file mode 100644 index e274cc428..000000000 --- a/examples/simple_messenger/analysis_options.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - package:surf_lint_rules/analysis_options.yaml diff --git a/examples/simple_messenger/android/.gitignore b/examples/simple_messenger/android/.gitignore deleted file mode 100644 index 0a741cb43..000000000 --- a/examples/simple_messenger/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/examples/simple_messenger/android/app/build.gradle b/examples/simple_messenger/android/app/build.gradle deleted file mode 100644 index 7e11c4f7a..000000000 --- a/examples/simple_messenger/android/app/build.gradle +++ /dev/null @@ -1,67 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'com.google.gms.google-services' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 29 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.simple_messenger" - minSdkVersion 21 - targetSdkVersion 29 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation platform('com.google.firebase:firebase-bom:28.1.0') - implementation 'com.google.firebase:firebase-analytics' - implementation "androidx.multidex:multidex:2.0.0" -} diff --git a/examples/simple_messenger/android/app/src/debug/AndroidManifest.xml b/examples/simple_messenger/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 44c281703..000000000 --- a/examples/simple_messenger/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/simple_messenger/android/app/src/main/AndroidManifest.xml b/examples/simple_messenger/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index fb2e39806..000000000 --- a/examples/simple_messenger/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/examples/simple_messenger/android/app/src/main/kotlin/com/example/simple_messenger/MainActivity.kt b/examples/simple_messenger/android/app/src/main/kotlin/com/example/simple_messenger/MainActivity.kt deleted file mode 100644 index 3696ceb21..000000000 --- a/examples/simple_messenger/android/app/src/main/kotlin/com/example/simple_messenger/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.simple_messenger - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/examples/simple_messenger/android/app/src/main/res/drawable/launch_background.xml b/examples/simple_messenger/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/examples/simple_messenger/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/simple_messenger/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/simple_messenger/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/examples/simple_messenger/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/simple_messenger/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/simple_messenger/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/examples/simple_messenger/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/simple_messenger/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/simple_messenger/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/examples/simple_messenger/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/simple_messenger/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/simple_messenger/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/examples/simple_messenger/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/simple_messenger/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/simple_messenger/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/examples/simple_messenger/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/simple_messenger/android/app/src/main/res/values/styles.xml b/examples/simple_messenger/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33fd..000000000 --- a/examples/simple_messenger/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/simple_messenger/android/app/src/profile/AndroidManifest.xml b/examples/simple_messenger/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 44c281703..000000000 --- a/examples/simple_messenger/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/simple_messenger/android/build.gradle b/examples/simple_messenger/android/build.gradle deleted file mode 100644 index 23f0a93e5..000000000 --- a/examples/simple_messenger/android/build.gradle +++ /dev/null @@ -1,32 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.google.gms:google-services:4.3.8' - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/examples/simple_messenger/android/gradle.properties b/examples/simple_messenger/android/gradle.properties deleted file mode 100644 index a6738207f..000000000 --- a/examples/simple_messenger/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true -android.enableR8=true diff --git a/examples/simple_messenger/android/gradle/wrapper/gradle-wrapper.properties b/examples/simple_messenger/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/examples/simple_messenger/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/examples/simple_messenger/android/settings.gradle b/examples/simple_messenger/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/examples/simple_messenger/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/examples/simple_messenger/ios/.gitignore b/examples/simple_messenger/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/examples/simple_messenger/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/simple_messenger/ios/Flutter/AppFrameworkInfo.plist b/examples/simple_messenger/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/examples/simple_messenger/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/examples/simple_messenger/ios/Flutter/Debug.xcconfig b/examples/simple_messenger/ios/Flutter/Debug.xcconfig deleted file mode 100644 index ec97fc6f3..000000000 --- a/examples/simple_messenger/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/examples/simple_messenger/ios/Flutter/Release.xcconfig b/examples/simple_messenger/ios/Flutter/Release.xcconfig deleted file mode 100644 index c4855bfe2..000000000 --- a/examples/simple_messenger/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/examples/simple_messenger/ios/Podfile b/examples/simple_messenger/ios/Podfile deleted file mode 100644 index 1e8c3c90a..000000000 --- a/examples/simple_messenger/ios/Podfile +++ /dev/null @@ -1,41 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/examples/simple_messenger/ios/Runner.xcodeproj/project.pbxproj b/examples/simple_messenger/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index d5999839f..000000000 --- a/examples/simple_messenger/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,495 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.simpleMessenger; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.simpleMessenger; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.simpleMessenger; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/simple_messenger/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/simple_messenger/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/examples/simple_messenger/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/simple_messenger/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/simple_messenger/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/simple_messenger/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/simple_messenger/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/simple_messenger/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/simple_messenger/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/simple_messenger/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/simple_messenger/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/examples/simple_messenger/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/simple_messenger/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/simple_messenger/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/examples/simple_messenger/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/simple_messenger/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/simple_messenger/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/simple_messenger/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/simple_messenger/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/simple_messenger/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/simple_messenger/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/simple_messenger/ios/Runner/AppDelegate.swift b/examples/simple_messenger/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/examples/simple_messenger/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/examples/simple_messenger/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/examples/simple_messenger/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/simple_messenger/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/examples/simple_messenger/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/simple_messenger/ios/Runner/Base.lproj/Main.storyboard b/examples/simple_messenger/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/examples/simple_messenger/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/simple_messenger/ios/Runner/Info.plist b/examples/simple_messenger/ios/Runner/Info.plist deleted file mode 100644 index f042d957f..000000000 --- a/examples/simple_messenger/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - simple_messenger - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/examples/simple_messenger/ios/Runner/Runner-Bridging-Header.h b/examples/simple_messenger/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/examples/simple_messenger/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/simple_messenger/lib/data/message.dart b/examples/simple_messenger/lib/data/message.dart deleted file mode 100644 index 17ee11a59..000000000 --- a/examples/simple_messenger/lib/data/message.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:cloud_firestore/cloud_firestore.dart'; -import 'package:simple_messenger/utils/constants.dart'; - -class Message { - final String sender; - final String content; - final DateTime sendTime; - - const Message({ - required this.sender, - required this.content, - required this.sendTime, - }); - - factory Message.fromMap(Map map) => Message( - sender: map[kSenderField] as String? ?? '', - content: map[kContentField] as String? ?? '', - sendTime: - (map[kTimestampField] as Timestamp? ?? Timestamp(0, 0)).toDate(), - ); - - Map toMap() => { - kSenderField: sender, - kContentField: content, - kTimestampField: Timestamp.fromDate(sendTime), - }; -} diff --git a/examples/simple_messenger/lib/interactor/message/message_interactor.dart b/examples/simple_messenger/lib/interactor/message/message_interactor.dart deleted file mode 100644 index 26a8f6faf..000000000 --- a/examples/simple_messenger/lib/interactor/message/message_interactor.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:simple_messenger/data/message.dart'; -import 'package:simple_messenger/interactor/message/repository/message_repository.dart'; - -class MessageInteractor { - final MessageRepository _repo; - - const MessageInteractor({required MessageRepository repo}) : _repo = repo; - - Stream> getMessages() => _repo.getMessages(); - - Future sendMessage(Message message) => _repo.sendMessage(message); -} diff --git a/examples/simple_messenger/lib/interactor/message/repository/message_repository.dart b/examples/simple_messenger/lib/interactor/message/repository/message_repository.dart deleted file mode 100644 index c306b4775..000000000 --- a/examples/simple_messenger/lib/interactor/message/repository/message_repository.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'dart:async'; - -import 'package:cloud_firestore/cloud_firestore.dart'; -import 'package:simple_messenger/data/message.dart'; -import 'package:simple_messenger/utils/constants.dart'; - -class MessageRepository { - final FirebaseFirestore _source; - - const MessageRepository(this._source); - - Future sendMessage(Message message) => - _source.collection(kMessageCollection).add(message.toMap()); - - Stream> getMessages() => _source - .collection(kMessageCollection) - .orderBy(kTimestampField) - .snapshots() - .asyncMap>((snapshot) { - final objectSnapshot = snapshot.docs - .map((doc) => doc.data().cast()) - .toList(); - - return _snapshotParser(objectSnapshot); - }); - - List _snapshotParser( - List> docs, - ) { - if (docs.isEmpty) { - return []; - } - - return docs.map((doc) => Message.fromMap(doc)).toList(); - } -} diff --git a/examples/simple_messenger/lib/main.dart b/examples/simple_messenger/lib/main.dart deleted file mode 100644 index 738c70ff1..000000000 --- a/examples/simple_messenger/lib/main.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'package:cloud_firestore/cloud_firestore.dart'; -import 'package:firebase_core/firebase_core.dart'; -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; -import 'package:simple_messenger/interactor/message/message_interactor.dart'; -import 'package:simple_messenger/interactor/message/repository/message_repository.dart'; -import 'package:simple_messenger/ui/screens/choose_name/pick_name_screen.dart'; -import 'package:simple_messenger/utils/default_error_handler.dart'; - -Future main() async { - WidgetsFlutterBinding.ensureInitialized(); - await Firebase.initializeApp(); - - runApp(const App()); -} - -class App extends StatelessWidget { - const App({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) => MultiProvider( - providers: [ - Provider( - create: (_) => WidgetModelDependencies( - errorHandler: DefaultErrorHandler(), - ), - ), - Provider( - create: (_) => MessageInteractor( - repo: MessageRepository(FirebaseFirestore.instance), - ), - ), - ], - child: MaterialApp( - home: PickNameScreen(), - ), - ); -} diff --git a/examples/simple_messenger/lib/ui/screens/choose_name/pick_name_screen.dart b/examples/simple_messenger/lib/ui/screens/choose_name/pick_name_screen.dart deleted file mode 100644 index 337dd9aee..000000000 --- a/examples/simple_messenger/lib/ui/screens/choose_name/pick_name_screen.dart +++ /dev/null @@ -1,50 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; -import 'package:simple_messenger/ui/screens/choose_name/pick_name_screen_wm.dart'; -import 'package:simple_messenger/ui/screens/global_chat/global_chat_screen_route.dart'; - -class PickNameScreen extends CoreMwwmWidget { - PickNameScreen({Key? key}) - : super( - key: key, - widgetModelBuilder: (context) { - final wmDependencies = context.read(); - return PickNameScreenWidgetModel(wmDependencies); - }, - ); - - @override - _PickNameScreenState createWidgetState() => _PickNameScreenState(); -} - -class _PickNameScreenState - extends WidgetState { - @override - Widget build(BuildContext context) => Scaffold( - appBar: AppBar( - title: const Text('Chat Example'), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text('Введите ваше имя!'), - SizedBox( - width: 300, - child: TextField( - controller: wm.nameController, - ), - ), - const SizedBox(height: 10), - ElevatedButton( - onPressed: () => Navigator.of(context).push( - GlobalChatScreenRoute(username: wm.nameController.text), - ), - child: const Text('Подтвердить'), - ), - ], - ), - ), - ); -} diff --git a/examples/simple_messenger/lib/ui/screens/choose_name/pick_name_screen_route.dart b/examples/simple_messenger/lib/ui/screens/choose_name/pick_name_screen_route.dart deleted file mode 100644 index cf37dabf6..000000000 --- a/examples/simple_messenger/lib/ui/screens/choose_name/pick_name_screen_route.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:simple_messenger/ui/screens/choose_name/pick_name_screen.dart'; - -class PickNameScreenRoute extends MaterialPageRoute { - PickNameScreenRoute() : super(builder: (context) => PickNameScreen()); -} diff --git a/examples/simple_messenger/lib/ui/screens/choose_name/pick_name_screen_wm.dart b/examples/simple_messenger/lib/ui/screens/choose_name/pick_name_screen_wm.dart deleted file mode 100644 index ed23410f4..000000000 --- a/examples/simple_messenger/lib/ui/screens/choose_name/pick_name_screen_wm.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; - -class PickNameScreenWidgetModel extends WidgetModel { - final TextEditingController nameController = TextEditingController(); - - PickNameScreenWidgetModel( - WidgetModelDependencies baseDependencies, - ) : super(baseDependencies); - - @override - void dispose() { - nameController.dispose(); - super.dispose(); - } -} diff --git a/examples/simple_messenger/lib/ui/screens/global_chat/global_chat_screen.dart b/examples/simple_messenger/lib/ui/screens/global_chat/global_chat_screen.dart deleted file mode 100644 index cd192a011..000000000 --- a/examples/simple_messenger/lib/ui/screens/global_chat/global_chat_screen.dart +++ /dev/null @@ -1,91 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart'; - -import 'package:simple_messenger/data/message.dart'; -import 'package:simple_messenger/interactor/message/message_interactor.dart'; -import 'package:simple_messenger/ui/screens/global_chat/global_chat_screen_wm.dart'; -import 'package:simple_messenger/ui/widgets/message_list_item.dart'; - -class GlobalChatScreen extends CoreMwwmWidget { - GlobalChatScreen({required String username, Key? key}) - : super( - key: key, - widgetModelBuilder: (context) { - final interactor = context.read(); - final wmDependencies = context.read(); - - return GlobalChatScreenWidgetModel( - wmDependencies, - username: username, - messageInteractor: interactor, - ); - }, - ); - - @override - _GlobalChatScreenState createWidgetState() => _GlobalChatScreenState(); -} - -class _GlobalChatScreenState - extends WidgetState { - @override - Widget build(BuildContext context) => Scaffold( - appBar: AppBar( - title: const Text('Chat Example'), - ), - body: Column( - children: [ - Expanded( - child: StreamedStateBuilder>( - streamedState: wm.messageListState, - builder: _messageListBuilder, - ), - ), - Padding( - padding: const EdgeInsets.all(16), - child: SizedBox( - height: 50, - child: Row( - children: [ - Expanded( - child: TextField(controller: wm.messageController), - ), - IconButton( - onPressed: wm.sendMessageAction, - icon: const Icon(Icons.send), - ), - ], - ), - ), - ), - ], - ), - ); - - Widget _messageListBuilder(BuildContext context, List messages) { - if (messages.isNotEmpty) { - final list = ListView.builder( - controller: wm.scrollController, - itemCount: messages.length, - itemBuilder: (_, index) { - final message = messages[index]; - - return MessageListItem( - message: message, - isSender: wm.username == message.sender, - ); - }, - ); - - Future.microtask(wm.scrollToEnd); - - return list; - } else { - return const Center( - child: Text('Пусто'), - ); - } - } -} diff --git a/examples/simple_messenger/lib/ui/screens/global_chat/global_chat_screen_route.dart b/examples/simple_messenger/lib/ui/screens/global_chat/global_chat_screen_route.dart deleted file mode 100644 index dc3418dc0..000000000 --- a/examples/simple_messenger/lib/ui/screens/global_chat/global_chat_screen_route.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:simple_messenger/ui/screens/global_chat/global_chat_screen.dart'; - -class GlobalChatScreenRoute extends MaterialPageRoute { - GlobalChatScreenRoute({required String username}) - : super(builder: (context) => GlobalChatScreen(username: username)); -} diff --git a/examples/simple_messenger/lib/ui/screens/global_chat/global_chat_screen_wm.dart b/examples/simple_messenger/lib/ui/screens/global_chat/global_chat_screen_wm.dart deleted file mode 100644 index 87b55cd49..000000000 --- a/examples/simple_messenger/lib/ui/screens/global_chat/global_chat_screen_wm.dart +++ /dev/null @@ -1,53 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; -import 'package:simple_messenger/data/message.dart'; -import 'package:simple_messenger/interactor/message/message_interactor.dart'; - -class GlobalChatScreenWidgetModel extends WidgetModel { - final String username; - final messageController = TextEditingController(); - final scrollController = ScrollController(); - - final sendMessageAction = VoidAction(); - final messageListState = StreamedState>([]); - final MessageInteractor _messageInteractor; - - GlobalChatScreenWidgetModel( - WidgetModelDependencies baseDependencies, { - required this.username, - required MessageInteractor messageInteractor, - }) : _messageInteractor = messageInteractor, - super(baseDependencies); - - @override - void onBind() { - super.onBind(); - subscribe(sendMessageAction.stream, (_) => _sendMessage()); - subscribe>(_messageInteractor.getMessages(), _viewMessages); - } - - @override - void dispose() { - messageController.dispose(); - super.dispose(); - } - - void scrollToEnd() => - scrollController.jumpTo(scrollController.position.maxScrollExtent); - - void _sendMessage() { - _messageInteractor.sendMessage( - Message( - sender: username, - content: messageController.text, - sendTime: DateTime.now(), - ), - ); - messageController.clear(); - } - - void _viewMessages(List messages) { - messageListState.accept(messages); - } -} diff --git a/examples/simple_messenger/lib/ui/widgets/message_list_item.dart b/examples/simple_messenger/lib/ui/widgets/message_list_item.dart deleted file mode 100644 index 80afcbb56..000000000 --- a/examples/simple_messenger/lib/ui/widgets/message_list_item.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:simple_messenger/data/message.dart'; - -class MessageListItem extends StatelessWidget { - final Message message; - final bool isSender; - - const MessageListItem({ - required this.message, - required this.isSender, - Key? key, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - final time = message.sendTime; - const space = SizedBox(height: 8); - - return Align( - alignment: isSender ? Alignment.centerRight : Alignment.centerLeft, - child: Card( - margin: const EdgeInsets.all(10), - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 10), - child: Column( - crossAxisAlignment: - isSender ? CrossAxisAlignment.end : CrossAxisAlignment.start, - children: [ - Text(message.sender), - space, - Text(message.content), - space, - Text('${time.hour}:${time.minute}'), - ], - ), - ), - ), - ); - } -} diff --git a/examples/simple_messenger/lib/utils/constants.dart b/examples/simple_messenger/lib/utils/constants.dart deleted file mode 100644 index 2e9d6ddcb..000000000 --- a/examples/simple_messenger/lib/utils/constants.dart +++ /dev/null @@ -1,5 +0,0 @@ -const kMessageCollection = 'messages'; - -const kSenderField = 'sender'; -const kContentField = 'content'; -const kTimestampField = 'timestamp'; diff --git a/examples/simple_messenger/lib/utils/default_error_handler.dart b/examples/simple_messenger/lib/utils/default_error_handler.dart deleted file mode 100644 index f7124a62b..000000000 --- a/examples/simple_messenger/lib/utils/default_error_handler.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; - -class DefaultErrorHandler implements ErrorHandler { - @override - void handleError(Object e) { - debugPrint(e.toString()); - } -} diff --git a/examples/simple_messenger/pubspec.yaml b/examples/simple_messenger/pubspec.yaml deleted file mode 100644 index e09ed7346..000000000 --- a/examples/simple_messenger/pubspec.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: simple_messenger -description: A new Flutter project. - -publish_to: "none" - -version: 1.0.0+1 - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - cloud_firestore: ^2.2.2 - cupertino_icons: ^1.0.0 - firebase_core: ^1.3.0 - flutter: - sdk: flutter - mwwm: ^2.0.0 - provider: ^5.0.0 - relation: ^3.1.0-dev.1 - surf_lint_rules: ^1.3.0 - -dev_dependencies: - flutter_test: - sdk: flutter - -flutter: - uses-material-design: true diff --git a/examples/todos/.gitignore b/examples/todos/.gitignore deleted file mode 100644 index 9d532b18a..000000000 --- a/examples/todos/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/examples/todos/.metadata b/examples/todos/.metadata deleted file mode 100644 index cd984dd00..000000000 --- a/examples/todos/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 9b2d32b605630f28625709ebd9d78ab3016b2bf6 - channel: stable - -project_type: app diff --git a/examples/todos/analysis_options.yaml b/examples/todos/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/examples/todos/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/examples/todos/android/.gitignore b/examples/todos/android/.gitignore deleted file mode 100644 index 0a741cb43..000000000 --- a/examples/todos/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/examples/todos/android/app/build.gradle b/examples/todos/android/app/build.gradle deleted file mode 100644 index eb8e0be44..000000000 --- a/examples/todos/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 29 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.todos" - minSdkVersion 16 - targetSdkVersion 29 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/examples/todos/android/app/src/debug/AndroidManifest.xml b/examples/todos/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index c4db8b70a..000000000 --- a/examples/todos/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/todos/android/app/src/main/AndroidManifest.xml b/examples/todos/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 5285ae8b2..000000000 --- a/examples/todos/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/examples/todos/android/app/src/main/kotlin/com/example/todos/MainActivity.kt b/examples/todos/android/app/src/main/kotlin/com/example/todos/MainActivity.kt deleted file mode 100644 index d43861dd4..000000000 --- a/examples/todos/android/app/src/main/kotlin/com/example/todos/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.todos - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/examples/todos/android/app/src/main/res/drawable/launch_background.xml b/examples/todos/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/examples/todos/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/todos/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/todos/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/examples/todos/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/todos/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/todos/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/examples/todos/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/todos/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/todos/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/examples/todos/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/todos/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/todos/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/examples/todos/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/todos/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/todos/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/examples/todos/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/todos/android/app/src/main/res/values/styles.xml b/examples/todos/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33fd..000000000 --- a/examples/todos/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/todos/android/app/src/profile/AndroidManifest.xml b/examples/todos/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index c4db8b70a..000000000 --- a/examples/todos/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/todos/android/build.gradle b/examples/todos/android/build.gradle deleted file mode 100644 index 3100ad2d5..000000000 --- a/examples/todos/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/examples/todos/android/gradle.properties b/examples/todos/android/gradle.properties deleted file mode 100644 index 94adc3a3f..000000000 --- a/examples/todos/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/examples/todos/android/gradle/wrapper/gradle-wrapper.properties b/examples/todos/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/examples/todos/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/examples/todos/android/settings.gradle b/examples/todos/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/examples/todos/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/examples/todos/ios/.gitignore b/examples/todos/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/examples/todos/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/todos/ios/Flutter/AppFrameworkInfo.plist b/examples/todos/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/examples/todos/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/examples/todos/ios/Flutter/Debug.xcconfig b/examples/todos/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/examples/todos/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/todos/ios/Flutter/Release.xcconfig b/examples/todos/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/examples/todos/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/todos/ios/Runner.xcodeproj/project.pbxproj b/examples/todos/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 0d4b2fb4d..000000000 --- a/examples/todos/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,495 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.todos; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.todos; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.todos; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/todos/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/todos/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/examples/todos/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/todos/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/todos/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/todos/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/todos/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/todos/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/todos/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/todos/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/todos/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/examples/todos/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/todos/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/todos/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/examples/todos/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/todos/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/todos/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/todos/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/todos/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/todos/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/todos/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/todos/ios/Runner/AppDelegate.swift b/examples/todos/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/examples/todos/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/examples/todos/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/examples/todos/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/todos/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/examples/todos/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/todos/ios/Runner/Base.lproj/Main.storyboard b/examples/todos/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/examples/todos/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/todos/ios/Runner/Info.plist b/examples/todos/ios/Runner/Info.plist deleted file mode 100644 index 822af362a..000000000 --- a/examples/todos/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - todos - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/examples/todos/ios/Runner/Runner-Bridging-Header.h b/examples/todos/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/examples/todos/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/todos/lib/main.dart b/examples/todos/lib/main.dart deleted file mode 100644 index a2b265081..000000000 --- a/examples/todos/lib/main.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:todos/modules/provider.dart'; -import 'package:todos/ui/app/app.dart'; - -void main() { - runApp( - Provider( - create: (_) => AppProvider(), - child: const App(), - ), - ); -} diff --git a/examples/todos/lib/models/filter_type.dart b/examples/todos/lib/models/filter_type.dart deleted file mode 100644 index 5034f9a9d..000000000 --- a/examples/todos/lib/models/filter_type.dart +++ /dev/null @@ -1,5 +0,0 @@ -enum FilterType { - all, - active, - completed, -} diff --git a/examples/todos/lib/models/todo_entity.dart b/examples/todos/lib/models/todo_entity.dart deleted file mode 100644 index 6c9826517..000000000 --- a/examples/todos/lib/models/todo_entity.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; - -@immutable -class TodoEntity extends Equatable { - const TodoEntity({ - required this.id, - required this.title, - required this.isCompleted, - required this.description, - }); - - final int id; - final String title; - final String description; - final bool isCompleted; - - @override - List get props => [ - id, - title, - description, - isCompleted, - ]; -} diff --git a/examples/todos/lib/modules/provider.dart b/examples/todos/lib/modules/provider.dart deleted file mode 100644 index 34b6a910e..000000000 --- a/examples/todos/lib/modules/provider.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:todos/repositories/todos_repository.dart'; -import 'package:todos/storage/todos_storage.dart'; - -class AppProvider { - final TodosRepository todosRepository = TodosRepository(TodosStorage()); -} diff --git a/examples/todos/lib/repositories/todos_repository.dart b/examples/todos/lib/repositories/todos_repository.dart deleted file mode 100644 index 24a028d6b..000000000 --- a/examples/todos/lib/repositories/todos_repository.dart +++ /dev/null @@ -1,59 +0,0 @@ -import 'package:relation/relation.dart'; -import 'package:todos/models/filter_type.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/storage/todos_storage.dart'; - -class TodosRepository { - TodosRepository(this._todosStorage) - : todosState = StreamedState>(_todosStorage.todos), - currentFilterState = - StreamedState(_todosStorage.currentFilter); - - final StreamedState> todosState; - final StreamedState currentFilterState; - - final TodosStorage _todosStorage; - - void addTodo(String title, String description) { - _todosStorage.addTodo(title, description); - _updateTodosState(); - } - - TodoEntity getTodo(int todoId) => _todosStorage.getTodo(todoId); - - void removeTodo(TodoEntity todoEntity) { - _todosStorage.removeTodo(todoEntity); - _updateTodosState(); - } - - void setFilter(FilterType newFilter) { - _todosStorage.setFilter(newFilter); - currentFilterState.accept(_todosStorage.currentFilter); - _updateTodosState(); - } - - void updateTodo(TodoEntity todoEntity) { - _todosStorage.updateTodo(todoEntity); - _updateTodosState(); - } - - List _filtredTodos() { - switch (_todosStorage.currentFilter) { - case FilterType.active: - return _todosStorage.todos - .where((element) => !element.isCompleted) - .toList(); - case FilterType.completed: - return _todosStorage.todos - .where((element) => element.isCompleted) - .toList(); - case FilterType.all: - default: - return _todosStorage.todos; - } - } - - void _updateTodosState() { - todosState.accept(_filtredTodos()); - } -} diff --git a/examples/todos/lib/storage/todos_storage.dart b/examples/todos/lib/storage/todos_storage.dart deleted file mode 100644 index 33dc43646..000000000 --- a/examples/todos/lib/storage/todos_storage.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:todos/models/filter_type.dart'; -import 'package:todos/models/todo_entity.dart'; - -class TodosStorage { - TodosStorage() - : _todos = [], - _currentFilter = FilterType.all; - - final List _todos; - FilterType _currentFilter; - - List get todos => _todos; - FilterType get currentFilter => _currentFilter; - - void addTodo(String title, String description) { - final todoEntityId = _todos.isEmpty ? 0 : _todos.last.id + 1; - _todos.add(TodoEntity( - id: todoEntityId, - title: title, - description: description, - isCompleted: false, - )); - } - - TodoEntity getTodo(int todoId) => _todos.firstWhere((e) => e.id == todoId); - - void removeTodo(TodoEntity todoEntity) { - _todos.removeWhere((e) => e.id == todoEntity.id); - } - - // ignore: use_setters_to_change_properties - void setFilter(FilterType newFilter) { - _currentFilter = newFilter; - } - - void updateTodo(TodoEntity todoEntity) { - final todoPlace = - _todos.indexOf(_todos.firstWhere((e) => e.id == todoEntity.id)); - _todos[todoPlace] = todoEntity; - } -} diff --git a/examples/todos/lib/ui/app/app.dart b/examples/todos/lib/ui/app/app.dart deleted file mode 100644 index 77c0afe8c..000000000 --- a/examples/todos/lib/ui/app/app.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:todos/ui/screens/todo_list_screen/todo_list_screen.dart'; - -class App extends StatelessWidget { - const App({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) => MaterialApp( - title: 'TODOs', - theme: ThemeData(primaryColor: Colors.blue), - darkTheme: ThemeData.dark(), - home: TodoListScreen(), - ); -} diff --git a/examples/todos/lib/ui/navigation/navigation.dart b/examples/todos/lib/ui/navigation/navigation.dart deleted file mode 100644 index 63ec770fa..000000000 --- a/examples/todos/lib/ui/navigation/navigation.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/ui/screens/add_edit_screen/add_edit_screen.dart'; - -class Navigation { - Navigation(this._context); - - final BuildContext _context; - - void showAddEditScreen({TodoEntity? todoEntity}) { - Navigator.push( - _context, - MaterialPageRoute( - builder: (_context) => AddEditScreen( - todoEntity: todoEntity, - ), - ), - ); - } - - void back() { - Navigator.pop(_context); - } -} diff --git a/examples/todos/lib/ui/screens/add_edit_screen/add_edit_i18n.dart b/examples/todos/lib/ui/screens/add_edit_screen/add_edit_i18n.dart deleted file mode 100644 index 5805e64eb..000000000 --- a/examples/todos/lib/ui/screens/add_edit_screen/add_edit_i18n.dart +++ /dev/null @@ -1,7 +0,0 @@ -class AddEditI18n { - static const editTodo = 'Edit ToDo'; - static const addTodo = 'Add ToDo'; - static const emptyTitleWarning = 'Todo title should not be empty'; - static const todoTitleLabel = 'ToDo title'; - static const todoDescriptionLabel = 'Description'; -} diff --git a/examples/todos/lib/ui/screens/add_edit_screen/add_edit_screen.dart b/examples/todos/lib/ui/screens/add_edit_screen/add_edit_screen.dart deleted file mode 100644 index e9ccf468b..000000000 --- a/examples/todos/lib/ui/screens/add_edit_screen/add_edit_screen.dart +++ /dev/null @@ -1,89 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/modules/provider.dart'; -import 'package:todos/ui/navigation/navigation.dart'; -import 'package:todos/ui/screens/add_edit_screen/add_edit_i18n.dart'; -import 'package:todos/ui/screens/add_edit_screen/add_edit_screen_wm.dart'; - -class AddEditScreen extends CoreMwwmWidget { - AddEditScreen({ - Key? key, - TodoEntity? todoEntity, - }) : super( - key: key, - widgetModelBuilder: (context) => AddEditScreenWM( - Navigation(context), - context.read().todosRepository, - todoEntity, - ), - ); - - @override - State createState() => _AddEditScreenState(); -} - -class _AddEditScreenState extends WidgetState { - static final GlobalKey _formKey = GlobalKey(); - - @override - Widget build(BuildContext context) { - final textTheme = Theme.of(context).textTheme; - final isEditing = wm.isEditing; - final todoEntity = wm.todoEntity; - - return Scaffold( - appBar: AppBar( - title: Text( - isEditing ? AddEditI18n.editTodo : AddEditI18n.addTodo, - ), - ), - body: Form( - key: _formKey, - child: Column( - children: [ - Padding( - padding: const EdgeInsets.all(16.0), - child: TextFormField( - autofocus: !isEditing, - initialValue: isEditing ? todoEntity!.title : '', - style: textTheme.headline5, - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: AddEditI18n.todoTitleLabel, - ), - validator: (val) { - return val!.trim().isEmpty - ? AddEditI18n.emptyTitleWarning - : null; - }, - onSaved: (value) => wm.title = value ?? '', - ), - ), - Padding( - padding: const EdgeInsets.all(16.0), - child: TextFormField( - initialValue: isEditing ? todoEntity!.description : '', - maxLines: 10, - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: AddEditI18n.todoDescriptionLabel, - ), - style: textTheme.bodyText2, - onSaved: (value) => wm.description = value ?? '', - ), - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: () { - _formKey.currentState!.save(); - wm.save(isValid: _formKey.currentState!.validate()); - }, - child: Icon(isEditing ? Icons.check : Icons.add), - ), - ); - } -} diff --git a/examples/todos/lib/ui/screens/add_edit_screen/add_edit_screen_wm.dart b/examples/todos/lib/ui/screens/add_edit_screen/add_edit_screen_wm.dart deleted file mode 100644 index 03bfc6b70..000000000 --- a/examples/todos/lib/ui/screens/add_edit_screen/add_edit_screen_wm.dart +++ /dev/null @@ -1,43 +0,0 @@ -import 'package:mwwm/mwwm.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/repositories/todos_repository.dart'; -import 'package:todos/ui/navigation/navigation.dart'; - -class AddEditScreenWM extends WidgetModel { - AddEditScreenWM( - this._navigation, - this._todosRepository, - this.todoEntity, - ) : super(const WidgetModelDependencies()); - - final TodosRepository _todosRepository; - final Navigation _navigation; - final TodoEntity? todoEntity; - - String title = ''; - String description = ''; - - bool get isEditing => todoEntity != null; - - void save({ - required bool isValid, - }) { - if (isValid) { - isEditing ? _editTodo() : _addTodo(); - _navigation.back(); - } - } - - void _addTodo() { - _todosRepository.addTodo(title, description); - } - - void _editTodo() { - _todosRepository.updateTodo(TodoEntity( - id: todoEntity!.id, - title: title, - description: description, - isCompleted: todoEntity!.isCompleted, - )); - } -} diff --git a/examples/todos/lib/ui/screens/todo_list_screen/todo_list_screen.dart b/examples/todos/lib/ui/screens/todo_list_screen/todo_list_screen.dart deleted file mode 100644 index a895ecc56..000000000 --- a/examples/todos/lib/ui/screens/todo_list_screen/todo_list_screen.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/modules/provider.dart'; -import 'package:todos/ui/navigation/navigation.dart'; -import 'package:todos/ui/screens/todo_list_screen/todo_list_screen_i18n.dart'; -import 'package:todos/ui/screens/todo_list_screen/todo_list_screen_wm.dart'; -import 'package:todos/ui/widgets/filter_button/filter_button.dart'; -import 'package:todos/ui/widgets/todo_list_item/todo_list_item.dart'; - -class TodoListScreen extends CoreMwwmWidget { - TodoListScreen({Key? key}) - : super( - key: key, - widgetModelBuilder: (context) => TodoListScreenWM( - Navigation(context), - context.read().todosRepository, - ), - ); - - @override - State createState() => _TodoListScreenState(); -} - -class _TodoListScreenState extends WidgetState { - @override - Widget build(BuildContext context) => Scaffold( - appBar: AppBar( - title: const Text(TodoListScreenI18n.todoListTitle), - actions: [FilterButton()], - ), - body: StreamedStateBuilder>( - streamedState: wm.todos, - builder: (_, todos) => ListView.builder( - itemCount: todos!.length, - itemBuilder: (context, index) { - final todo = todos[index]; - - return Dismissible( - key: ValueKey(todo), - onDismissed: (_) => wm.removeTodo(todo), - child: TodoListItem(todoId: todo.id), - ); - }, - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: wm.addTodo, - child: const Icon(Icons.add), - ), - ); -} diff --git a/examples/todos/lib/ui/screens/todo_list_screen/todo_list_screen_i18n.dart b/examples/todos/lib/ui/screens/todo_list_screen/todo_list_screen_i18n.dart deleted file mode 100644 index 8ee6e0f1e..000000000 --- a/examples/todos/lib/ui/screens/todo_list_screen/todo_list_screen_i18n.dart +++ /dev/null @@ -1,3 +0,0 @@ -class TodoListScreenI18n { - static const todoListTitle = 'TODO list'; -} diff --git a/examples/todos/lib/ui/screens/todo_list_screen/todo_list_screen_wm.dart b/examples/todos/lib/ui/screens/todo_list_screen/todo_list_screen_wm.dart deleted file mode 100644 index 48c7165d7..000000000 --- a/examples/todos/lib/ui/screens/todo_list_screen/todo_list_screen_wm.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/repositories/todos_repository.dart'; -import 'package:todos/ui/navigation/navigation.dart'; - -class TodoListScreenWM extends WidgetModel { - TodoListScreenWM( - this._navigation, - this._todosRepository, - ) : super(const WidgetModelDependencies()); - - final TodosRepository _todosRepository; - final Navigation _navigation; - - StreamedState> get todos => _todosRepository.todosState; - - void addTodo() { - _navigation.showAddEditScreen(); - } - - void removeTodo(TodoEntity todoEntity) { - _todosRepository.removeTodo(todoEntity); - } -} diff --git a/examples/todos/lib/ui/widgets/filter_button/filter_button.dart b/examples/todos/lib/ui/widgets/filter_button/filter_button.dart deleted file mode 100644 index cfc570e1d..000000000 --- a/examples/todos/lib/ui/widgets/filter_button/filter_button.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart'; -import 'package:todos/models/filter_type.dart'; -import 'package:todos/modules/provider.dart'; -import 'package:todos/ui/widgets/filter_button/filter_button_i18n.dart'; -import 'package:todos/ui/widgets/filter_button/filter_button_wm.dart'; - -class FilterButton extends CoreMwwmWidget { - FilterButton({Key? key}) - : super( - key: key, - widgetModelBuilder: (context) => - FilterButtonWM(context.read().todosRepository), - ); - - @override - State createState() => _FilterButtonState(); -} - -class _FilterButtonState extends WidgetState { - @override - Widget build(BuildContext context) => StreamedStateBuilder( - streamedState: wm.currentFilterState, - builder: (_, selectedFilter) => PopupMenuButton( - icon: const Icon(Icons.filter_list), - onSelected: wm.selectFilter, - itemBuilder: (_) => [ - CheckedPopupMenuItem( - value: FilterType.all, - checked: FilterType.all == selectedFilter, - child: const Text(FilterButtonI18n.showAll), - ), - CheckedPopupMenuItem( - value: FilterType.active, - checked: FilterType.active == selectedFilter, - child: const Text(FilterButtonI18n.showActive), - ), - CheckedPopupMenuItem( - value: FilterType.completed, - checked: FilterType.completed == selectedFilter, - child: const Text(FilterButtonI18n.showCompleted), - ), - ], - ), - ); -} diff --git a/examples/todos/lib/ui/widgets/filter_button/filter_button_i18n.dart b/examples/todos/lib/ui/widgets/filter_button/filter_button_i18n.dart deleted file mode 100644 index 20856517c..000000000 --- a/examples/todos/lib/ui/widgets/filter_button/filter_button_i18n.dart +++ /dev/null @@ -1,5 +0,0 @@ -class FilterButtonI18n { - static const showAll = 'Show all'; - static const showCompleted = 'Show completed'; - static const showActive = 'Show active'; -} diff --git a/examples/todos/lib/ui/widgets/filter_button/filter_button_wm.dart b/examples/todos/lib/ui/widgets/filter_button/filter_button_wm.dart deleted file mode 100644 index 990b5bd30..000000000 --- a/examples/todos/lib/ui/widgets/filter_button/filter_button_wm.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; -import 'package:todos/models/filter_type.dart'; -import 'package:todos/repositories/todos_repository.dart'; - -class FilterButtonWM extends WidgetModel { - FilterButtonWM( - this._todosRepository, - ) : super(const WidgetModelDependencies()); - - final TodosRepository _todosRepository; - - StreamedState get currentFilterState => - _todosRepository.currentFilterState; - - void selectFilter(FilterType filterType) { - _todosRepository.setFilter(filterType); - } -} diff --git a/examples/todos/lib/ui/widgets/todo_list_item/todo_list_item.dart b/examples/todos/lib/ui/widgets/todo_list_item/todo_list_item.dart deleted file mode 100644 index 86c18fc4a..000000000 --- a/examples/todos/lib/ui/widgets/todo_list_item/todo_list_item.dart +++ /dev/null @@ -1,53 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/modules/provider.dart'; -import 'package:todos/ui/navigation/navigation.dart'; -import 'package:todos/ui/widgets/todo_list_item/todo_list_item_wm.dart'; - -class TodoListItem extends CoreMwwmWidget { - TodoListItem({ - required int todoId, - Key? key, - }) : super( - key: key, - widgetModelBuilder: (context) => TodoListItemWM( - Navigation(context), - context.read().todosRepository, - todoId, - ), - ); - - @override - State createState() => _TodoListItemState(); -} - -class _TodoListItemState extends WidgetState { - @override - Widget build(BuildContext context) => StreamedStateBuilder( - streamedState: wm.todoEntity, - builder: (_, todoEntity) => ListTile( - leading: Checkbox( - value: todoEntity!.isCompleted, - onChanged: (_) { - wm.changeStatus(); - }, - ), - title: Text( - todoEntity.title, - style: Theme.of(context).textTheme.headline6, - ), - subtitle: todoEntity.description.isNotEmpty - ? Text( - todoEntity.description, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: Theme.of(context).textTheme.subtitle1, - ) - : null, - onTap: wm.editTodo, - ), - ); -} diff --git a/examples/todos/lib/ui/widgets/todo_list_item/todo_list_item_wm.dart b/examples/todos/lib/ui/widgets/todo_list_item/todo_list_item_wm.dart deleted file mode 100644 index 7763d74ce..000000000 --- a/examples/todos/lib/ui/widgets/todo_list_item/todo_list_item_wm.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/repositories/todos_repository.dart'; -import 'package:todos/ui/navigation/navigation.dart'; - -class TodoListItemWM extends WidgetModel { - TodoListItemWM( - this._navigation, - this._todosRepository, - this.todoId, - ) : super(const WidgetModelDependencies()) { - todoEntity = StreamedState(_todosRepository.getTodo(todoId)); - } - - final TodosRepository _todosRepository; - final Navigation _navigation; - final int todoId; - - StreamedState todoEntity = StreamedState(); - - void changeStatus() { - final value = todoEntity.value; - - _todosRepository.updateTodo(TodoEntity( - id: value!.id, - title: value.title, - description: value.description, - isCompleted: !value.isCompleted, - )); - - todoEntity.accept(_todosRepository.getTodo(todoId)); - } - - void editTodo() { - _navigation.showAddEditScreen(todoEntity: todoEntity.value); - } -} diff --git a/examples/todos/pubspec.yaml b/examples/todos/pubspec.yaml deleted file mode 100644 index 37338e9e1..000000000 --- a/examples/todos/pubspec.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: todos -description: Example MWWM TODOs. -publish_to: "none" -version: 1.0.0+1 - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - equatable: ^2.0.0 - - flutter: - sdk: flutter - - mwwm: ^1.0.0 - provider: ^5.0.0 - relation: ^2.0.0 - -dev_dependencies: - flutter_test: - sdk: flutter - mocktail: ^0.1.1 - surf_lint_rules: ^1.1.0 - -flutter: - uses-material-design: true diff --git a/examples/todos/test/mocks/navigation_mock.dart b/examples/todos/test/mocks/navigation_mock.dart deleted file mode 100644 index bea07821f..000000000 --- a/examples/todos/test/mocks/navigation_mock.dart +++ /dev/null @@ -1,4 +0,0 @@ -import 'package:mocktail/mocktail.dart'; -import 'package:todos/ui/navigation/navigation.dart'; - -class NavigationMock extends Mock implements Navigation {} diff --git a/examples/todos/test/mocks/todos_repository_mock.dart b/examples/todos/test/mocks/todos_repository_mock.dart deleted file mode 100644 index 8f1058342..000000000 --- a/examples/todos/test/mocks/todos_repository_mock.dart +++ /dev/null @@ -1,4 +0,0 @@ -import 'package:mocktail/mocktail.dart'; -import 'package:todos/repositories/todos_repository.dart'; - -class TodosRepositoryMock extends Mock implements TodosRepository {} diff --git a/examples/todos/test/mocks/todos_storage_mock.dart b/examples/todos/test/mocks/todos_storage_mock.dart deleted file mode 100644 index e1bebf737..000000000 --- a/examples/todos/test/mocks/todos_storage_mock.dart +++ /dev/null @@ -1,4 +0,0 @@ -import 'package:mocktail/mocktail.dart'; -import 'package:todos/storage/todos_storage.dart'; - -class TodosStorageMock extends Mock implements TodosStorage {} diff --git a/examples/todos/test/todos_repository_test.dart b/examples/todos/test/todos_repository_test.dart deleted file mode 100644 index 380375aab..000000000 --- a/examples/todos/test/todos_repository_test.dart +++ /dev/null @@ -1,136 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:todos/models/filter_type.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/repositories/todos_repository.dart'; - -import 'mocks/todos_storage_mock.dart'; - -void main() { - group('TodosRepository', () { - const todo = TodoEntity( - id: 0, - title: 'title', - description: 'description', - isCompleted: false, - ); - - const todos = [todo]; - - final todosStorageMock = TodosStorageMock(); - when(() => todosStorageMock.todos).thenReturn([]); - when(() => todosStorageMock.currentFilter).thenReturn(FilterType.all); - late TodosRepository todosRepository; - - setUp(() { - todosRepository = TodosRepository(todosStorageMock); - }); - - group('addTodo', () { - test('call _todosStorage.addTodo', () { - todosRepository.addTodo('title', 'description'); - verify(() => todosStorageMock.addTodo('title', 'description')); - }); - - test('send updated todosState', () { - when(() => todosStorageMock.todos).thenReturn(todos); - - expectLater(todosRepository.todosState.stream, mayEmit(todos)); - - todosRepository.addTodo('title', 'description'); - }); - }); - - group('getTodo', () { - test('return correct param', () { - const todoId = 0; - when(() => todosRepository.getTodo(any())).thenReturn(todo); - - expect(todosRepository.getTodo(todoId), todo); - }); - }); - - group('removeTodo', () { - test('call _todosStorage.removeTodo', () { - todosRepository.removeTodo(todo); - verify(() => todosStorageMock.removeTodo(todo)); - }); - - test('send updated todosState', () { - when(() => todosStorageMock.todos).thenReturn(todos); - - expectLater(todosRepository.todosState.stream, mayEmit(todos)); - - todosRepository.removeTodo(todo); - }); - }); - - group('setFilter', () { - const filter = FilterType.all; - test('call _todosStorage.setFilter', () { - todosRepository.setFilter(filter); - verify(() => todosStorageMock.setFilter(filter)); - }); - - test('send updated todosState', () { - when(() => todosStorageMock.todos).thenReturn(todos); - - expectLater(todosRepository.todosState.stream, mayEmit(todos)); - - todosRepository.setFilter(filter); - }); - - test('send updated currentFilterState', () { - when(() => todosStorageMock.currentFilter).thenReturn(filter); - - expectLater(todosRepository.currentFilterState.stream, emits(filter)); - - todosRepository.setFilter(filter); - }); - }); - - group('updateTodo', () { - test('call _todosStorage.updateTodo', () { - todosRepository.updateTodo(todo); - verify(() => todosStorageMock.updateTodo(todo)); - }); - - test('send updated todosState', () { - when(() => todosStorageMock.todos).thenReturn(todos); - - expectLater(todosRepository.todosState.stream, mayEmit(todos)); - - todosRepository.updateTodo(todo); - }); - - test('send updated todosState when FilterType.completed', () { - when(() => todosStorageMock.todos).thenReturn(todos); - when(() => todosStorageMock.currentFilter) - .thenReturn(FilterType.completed); - - expectLater(todosRepository.todosState.stream, mayEmit([])); - - todosRepository.updateTodo(todo); - }); - - test('send updated todosState when FilterType.acive', () { - when(() => todosStorageMock.todos).thenReturn(todos); - when(() => todosStorageMock.currentFilter) - .thenReturn(FilterType.active); - - expectLater(todosRepository.todosState.stream, mayEmit(todos)); - - todosRepository.updateTodo(todo); - }); - - test('send updated todosState when FilterType.all', () { - when(() => todosStorageMock.todos).thenReturn(todos); - when(() => todosStorageMock.currentFilter).thenReturn(FilterType.all); - - expectLater(todosRepository.todosState.stream, mayEmit(todos)); - - todosRepository.updateTodo(todo); - }); - }); - }); -} diff --git a/examples/todos/test/todos_storage_test.dart b/examples/todos/test/todos_storage_test.dart deleted file mode 100644 index 253e5f94e..000000000 --- a/examples/todos/test/todos_storage_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:todos/models/filter_type.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/storage/todos_storage.dart'; - -void main() { - group('TodosStorage', () { - late TodosStorage todosStorage; - const todo = TodoEntity( - id: 0, - title: 'title', - description: 'description', - isCompleted: false, - ); - - setUp(() { - todosStorage = TodosStorage(); - }); - - group('addTodo', () { - test('add new correct TodoEntity', () { - todosStorage.addTodo('title', 'description'); - expect(todosStorage.todos.first, todo); - }); - }); - - group('getTodo', () { - test('return correct TodoEntity', () { - todosStorage.addTodo('title', 'description'); - expect(todosStorage.getTodo(0), todo); - }); - }); - - group('removeTodo', () { - test('correct remove todoEntity', () { - todosStorage.addTodo('title', 'description'); - expect(todosStorage.todos.first, todo); - todosStorage.removeTodo(todo); - expect(todosStorage.todos.isEmpty, isTrue); - }); - }); - - group('setFilter', () { - test('set new filterType', () { - const filter = FilterType.active; - expect(todosStorage.currentFilter, FilterType.all); - todosStorage.setFilter(filter); - expect(todosStorage.currentFilter, filter); - }); - }); - - group('updateTodo', () { - test('correct update todoEntity', () { - const updatedTodo = TodoEntity( - id: 0, - title: 'new title', - isCompleted: true, - description: '', - ); - - todosStorage.addTodo('title', 'description'); - expect(todosStorage.todos.first, todo); - todosStorage.updateTodo(updatedTodo); - expect(todosStorage.todos.first, updatedTodo); - }); - }); - }); -} diff --git a/examples/todos/test/widget_models/add_edit_screen_wm_test.dart b/examples/todos/test/widget_models/add_edit_screen_wm_test.dart deleted file mode 100644 index 89c319fd8..000000000 --- a/examples/todos/test/widget_models/add_edit_screen_wm_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/ui/screens/add_edit_screen/add_edit_screen_wm.dart'; - -import '../mocks/navigation_mock.dart'; -import '../mocks/todos_repository_mock.dart'; - -void main() { - group('AddEditScreenWM', () { - const todo = TodoEntity( - id: 0, - title: 'title', - description: 'description', - isCompleted: false, - ); - - final todosRepositoryMock = TodosRepositoryMock(); - final navigationMock = NavigationMock(); - - late AddEditScreenWM addEditScreenWM; - - setUp(() { - addEditScreenWM = AddEditScreenWM( - navigationMock, - todosRepositoryMock, - todo, - ); - - registerFallbackValue(todo); - }); - - group('isEditing', () { - test('return true if todoEntity is not null', () { - expect( - AddEditScreenWM(navigationMock, todosRepositoryMock, todo).isEditing, - isTrue, - ); - }); - - test('return false if todoEntity is null', () { - expect( - AddEditScreenWM(navigationMock, todosRepositoryMock, null).isEditing, - isFalse, - ); - }); - }); - - group('save', () { - test('never call _todosRepository if is not valid', () { - addEditScreenWM.save(isValid: false); - verifyNever(() => todosRepositoryMock.addTodo(any(), any())); - verifyNever(() => todosRepositoryMock.updateTodo(any())); - }); - - test('if isEditing then call updateTodo and naviagtion back', () { - addEditScreenWM.save(isValid: true); - verify( - () => todosRepositoryMock.updateTodo(any(that: isA())), - ); - verify(navigationMock.back); - }); - - test('if no isEditing then call addTodo and naviagtion back', () { - AddEditScreenWM(navigationMock, todosRepositoryMock, null) - .save(isValid: true); - - verify(() => todosRepositoryMock.addTodo('', '')); - verify(navigationMock.back); - }); - }); - }); -} diff --git a/examples/todos/test/widget_models/filter_button_wm_test.dart b/examples/todos/test/widget_models/filter_button_wm_test.dart deleted file mode 100644 index de5f6fa06..000000000 --- a/examples/todos/test/widget_models/filter_button_wm_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:todos/models/filter_type.dart'; -import 'package:todos/ui/widgets/filter_button/filter_button_wm.dart'; - -import '../mocks/todos_repository_mock.dart'; - -void main() { - group('FilterButtonWM', () { - final todosRepositoryMock = TodosRepositoryMock(); - - late FilterButtonWM filterButtonWM; - - setUp(() { - filterButtonWM = FilterButtonWM(todosRepositoryMock); - }); - - group('selectFilter', () { - test('call _todosRepository.setFilter', () { - const filter = FilterType.completed; - - filterButtonWM.selectFilter(filter); - verify(() => todosRepositoryMock.setFilter(filter)); - }); - }); - }); -} diff --git a/examples/todos/test/widget_models/todo_list_item_wm_test.dart b/examples/todos/test/widget_models/todo_list_item_wm_test.dart deleted file mode 100644 index ef6b9917c..000000000 --- a/examples/todos/test/widget_models/todo_list_item_wm_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/ui/widgets/todo_list_item/todo_list_item_wm.dart'; - -import '../mocks/navigation_mock.dart'; -import '../mocks/todos_repository_mock.dart'; - -void main() { - group('TodoListItemWM', () { - final todosRepositoryMock = TodosRepositoryMock(); - final navigationMock = NavigationMock(); - const todoId = 0; - - const todo = TodoEntity( - id: todoId, - title: 'title', - description: 'description', - isCompleted: false, - ); - - when(() => todosRepositoryMock.getTodo(todoId)).thenReturn(todo); - late TodoListItemWM todoListItemWM; - - setUp(() { - registerFallbackValue(todo); - todoListItemWM = - TodoListItemWM(navigationMock, todosRepositoryMock, todoId); - }); - - group('changeStatus()', () { - test('call _todosRepository.updateTodo', () { - todoListItemWM.changeStatus(); - - verify( - () => todosRepositoryMock.updateTodo(any(that: isA())), - ); - }); - - test('emit new todo state', () { - expectLater(todoListItemWM.todoEntity.stream, mayEmit([])); - todoListItemWM.changeStatus(); - - verify(() => todosRepositoryMock.getTodo(todoId)); - }); - }); - - group('editTodo', () { - test('call _navigation.showAddEditScreen', () { - todoListItemWM.editTodo(); - verify(() => navigationMock.showAddEditScreen( - todoEntity: any( - named: 'todoEntity', - that: isA(), - ), - )); - }); - }); - }); -} diff --git a/examples/todos/test/widget_models/todo_list_screen_wm_test.dart b/examples/todos/test/widget_models/todo_list_screen_wm_test.dart deleted file mode 100644 index d3563c593..000000000 --- a/examples/todos/test/widget_models/todo_list_screen_wm_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:todos/models/todo_entity.dart'; -import 'package:todos/ui/screens/todo_list_screen/todo_list_screen_wm.dart'; - -import '../mocks/navigation_mock.dart'; -import '../mocks/todos_repository_mock.dart'; - -void main() { - group('TodoListScreenWM', () { - final todosRepositoryMock = TodosRepositoryMock(); - final navigationMock = NavigationMock(); - - late TodoListScreenWM todoListScreenWM; - - setUp(() { - todoListScreenWM = TodoListScreenWM( - navigationMock, - todosRepositoryMock, - ); - }); - - group('addTodo', () { - test('call _navigation.showAddEditScreen()', () { - todoListScreenWM.addTodo(); - verify(navigationMock.showAddEditScreen); - }); - }); - - group('removeTodo', () { - test('call removeTodo from _todosRepository', () { - const todo = TodoEntity( - id: 0, - title: 'title', - description: 'description', - isCompleted: false, - ); - - todoListScreenWM.removeTodo(todo); - verify(() => todosRepositoryMock.removeTodo(todo)); - }); - }); - }); -} diff --git a/examples/weather/.gitignore b/examples/weather/.gitignore deleted file mode 100644 index 0fa6b675c..000000000 --- a/examples/weather/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release diff --git a/examples/weather/.metadata b/examples/weather/.metadata deleted file mode 100644 index 3733535c8..000000000 --- a/examples/weather/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 02c026b03cd31dd3f867e5faeb7e104cce174c5f - channel: stable - -project_type: app diff --git a/examples/weather/README.md b/examples/weather/README.md deleted file mode 100644 index f285a3236..000000000 --- a/examples/weather/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# weather - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/weather/android/.gitignore b/examples/weather/android/.gitignore deleted file mode 100644 index 0a741cb43..000000000 --- a/examples/weather/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/examples/weather/android/app/build.gradle b/examples/weather/android/app/build.gradle deleted file mode 100644 index 1c61f6c19..000000000 --- a/examples/weather/android/app/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 30 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.weather" - minSdkVersion 16 - targetSdkVersion 30 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/examples/weather/android/app/src/debug/AndroidManifest.xml b/examples/weather/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 0f1e9d850..000000000 --- a/examples/weather/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/weather/android/app/src/main/AndroidManifest.xml b/examples/weather/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 1be38d8ad..000000000 --- a/examples/weather/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/examples/weather/android/app/src/main/kotlin/com/example/weather/MainActivity.kt b/examples/weather/android/app/src/main/kotlin/com/example/weather/MainActivity.kt deleted file mode 100644 index bc2981a4b..000000000 --- a/examples/weather/android/app/src/main/kotlin/com/example/weather/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.weather - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/examples/weather/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/weather/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3f..000000000 --- a/examples/weather/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/weather/android/app/src/main/res/drawable/launch_background.xml b/examples/weather/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/examples/weather/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/weather/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/weather/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/examples/weather/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/weather/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/weather/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/examples/weather/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/weather/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/weather/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/examples/weather/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/weather/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/weather/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/examples/weather/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/weather/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/weather/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/examples/weather/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/weather/android/app/src/main/res/values-night/styles.xml b/examples/weather/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 449a9f930..000000000 --- a/examples/weather/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/weather/android/app/src/main/res/values/styles.xml b/examples/weather/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d74aa35c2..000000000 --- a/examples/weather/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/weather/android/app/src/profile/AndroidManifest.xml b/examples/weather/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 0f1e9d850..000000000 --- a/examples/weather/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/weather/android/build.gradle b/examples/weather/android/build.gradle deleted file mode 100644 index 9b6ed06eb..000000000 --- a/examples/weather/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/examples/weather/android/gradle.properties b/examples/weather/android/gradle.properties deleted file mode 100644 index 94adc3a3f..000000000 --- a/examples/weather/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/examples/weather/android/gradle/wrapper/gradle-wrapper.properties b/examples/weather/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bc6a58afd..000000000 --- a/examples/weather/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/examples/weather/android/settings.gradle b/examples/weather/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/examples/weather/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/examples/weather/assets/images/broken_clouds.jpg b/examples/weather/assets/images/broken_clouds.jpg deleted file mode 100644 index 2173b0ece..000000000 Binary files a/examples/weather/assets/images/broken_clouds.jpg and /dev/null differ diff --git a/examples/weather/assets/images/clear.jpg b/examples/weather/assets/images/clear.jpg deleted file mode 100644 index 7ae92d836..000000000 Binary files a/examples/weather/assets/images/clear.jpg and /dev/null differ diff --git a/examples/weather/assets/images/clear_sky.jpg b/examples/weather/assets/images/clear_sky.jpg deleted file mode 100644 index 7ae92d836..000000000 Binary files a/examples/weather/assets/images/clear_sky.jpg and /dev/null differ diff --git a/examples/weather/assets/images/clouds.jpg b/examples/weather/assets/images/clouds.jpg deleted file mode 100644 index abd2207b1..000000000 Binary files a/examples/weather/assets/images/clouds.jpg and /dev/null differ diff --git a/examples/weather/assets/images/clouds1.jpg b/examples/weather/assets/images/clouds1.jpg deleted file mode 100644 index 29c956762..000000000 Binary files a/examples/weather/assets/images/clouds1.jpg and /dev/null differ diff --git a/examples/weather/assets/images/few_clouds.jpg b/examples/weather/assets/images/few_clouds.jpg deleted file mode 100644 index e4ac3378c..000000000 Binary files a/examples/weather/assets/images/few_clouds.jpg and /dev/null differ diff --git a/examples/weather/assets/images/mist.jpg b/examples/weather/assets/images/mist.jpg deleted file mode 100644 index 5f9e1c552..000000000 Binary files a/examples/weather/assets/images/mist.jpg and /dev/null differ diff --git a/examples/weather/assets/images/rain.jpg b/examples/weather/assets/images/rain.jpg deleted file mode 100644 index 2529f9002..000000000 Binary files a/examples/weather/assets/images/rain.jpg and /dev/null differ diff --git a/examples/weather/assets/images/scattered_clouds.jpg b/examples/weather/assets/images/scattered_clouds.jpg deleted file mode 100644 index 6390288f9..000000000 Binary files a/examples/weather/assets/images/scattered_clouds.jpg and /dev/null differ diff --git a/examples/weather/assets/images/shower_rain.jpg b/examples/weather/assets/images/shower_rain.jpg deleted file mode 100644 index f2cb02b19..000000000 Binary files a/examples/weather/assets/images/shower_rain.jpg and /dev/null differ diff --git a/examples/weather/assets/images/snow.jpg b/examples/weather/assets/images/snow.jpg deleted file mode 100644 index cc23a553e..000000000 Binary files a/examples/weather/assets/images/snow.jpg and /dev/null differ diff --git a/examples/weather/assets/images/thunderstorm.jpg b/examples/weather/assets/images/thunderstorm.jpg deleted file mode 100644 index 8c9e876c0..000000000 Binary files a/examples/weather/assets/images/thunderstorm.jpg and /dev/null differ diff --git a/examples/weather/ios/.gitignore b/examples/weather/ios/.gitignore deleted file mode 100644 index 151026b91..000000000 --- a/examples/weather/ios/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/weather/ios/Flutter/AppFrameworkInfo.plist b/examples/weather/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 9367d483e..000000000 --- a/examples/weather/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/examples/weather/ios/Flutter/Debug.xcconfig b/examples/weather/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/examples/weather/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/weather/ios/Flutter/Release.xcconfig b/examples/weather/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/examples/weather/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/weather/ios/Runner.xcodeproj/project.pbxproj b/examples/weather/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index a5e5ef4b8..000000000 --- a/examples/weather/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,471 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.weather; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.weather; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.weather; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/weather/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/weather/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/examples/weather/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/weather/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/weather/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/weather/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/weather/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/weather/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/weather/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/weather/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/weather/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/examples/weather/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/weather/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/weather/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/examples/weather/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/weather/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/weather/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/examples/weather/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/weather/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/weather/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/examples/weather/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/weather/ios/Runner/AppDelegate.swift b/examples/weather/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/examples/weather/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/examples/weather/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/examples/weather/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/weather/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/examples/weather/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/weather/ios/Runner/Base.lproj/Main.storyboard b/examples/weather/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/examples/weather/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/weather/ios/Runner/Info.plist b/examples/weather/ios/Runner/Info.plist deleted file mode 100644 index a49fc866a..000000000 --- a/examples/weather/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - weather - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/examples/weather/ios/Runner/Runner-Bridging-Header.h b/examples/weather/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/examples/weather/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/weather/lib/config/constants.dart b/examples/weather/lib/config/constants.dart deleted file mode 100644 index 8cc7fb63a..000000000 --- a/examples/weather/lib/config/constants.dart +++ /dev/null @@ -1,3 +0,0 @@ -/// Hive - название бокса и ключ -const String hiveBoxName = "weatherNewsExample"; -const String hiveMainKey = "geo"; diff --git a/examples/weather/lib/domain/city_model.dart b/examples/weather/lib/domain/city_model.dart deleted file mode 100644 index 0aba6b86c..000000000 --- a/examples/weather/lib/domain/city_model.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// Передача информации о городе между экранами на уровне приложения - -class CityModel { - final String city; - - CityModel(this.city); -} diff --git a/examples/weather/lib/error_handlers/app_error_handler.dart b/examples/weather/lib/error_handlers/app_error_handler.dart deleted file mode 100644 index cebae725d..000000000 --- a/examples/weather/lib/error_handlers/app_error_handler.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:weather/error_handlers/exceptions.dart'; - -/// Обработчик ошибок на уровне приложения -/// Выдает снекбары разного цвета в зависимости от типа ошибки -/// Черный - если проблемы с локацией (сервис не знает город) -/// Красный - другие ошибки (сетевые, геолокатор, всё остальное) -class AppErrorHandler implements ErrorHandler { - final BuildContext context; - AppErrorHandler({ - required this.context, - }); - - void handleError(Object e) { - if (e is ClientNetworkException) { - showBlackSnackbar("Location is not available. Try anoter location."); - } else if (e is ServerNetworkException) { - showRedSnackbar("Network error. Try again later"); - } else if (e is GeolocationException) { - showRedSnackbar( - "Geolocation is not allowed. Allow geolocation and try again"); - } else { - showRedSnackbar(e.toString()); - } - } - - void showBlackSnackbar(String message) { - final snackBar = SnackBar( - content: Text( - message, - style: TextStyle( - color: Colors.white, - ), - ), - backgroundColor: Colors.black, - ); - ScaffoldMessenger.of(context).showSnackBar(snackBar); - } - - void showRedSnackbar(String message) { - final snackBar = SnackBar( - content: Text( - message, - style: TextStyle( - color: Colors.white, - ), - ), - backgroundColor: Colors.red[900], - ); - ScaffoldMessenger.of(context).showSnackBar(snackBar); - } -} diff --git a/examples/weather/lib/error_handlers/exceptions.dart b/examples/weather/lib/error_handlers/exceptions.dart deleted file mode 100644 index 2df79a5cf..000000000 --- a/examples/weather/lib/error_handlers/exceptions.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// Кастомные ошибки приложения - -class ClientNetworkException implements Exception {} - -class ServerNetworkException implements Exception {} - -class GeolocationException implements Exception {} diff --git a/examples/weather/lib/main.dart b/examples/weather/lib/main.dart deleted file mode 100644 index 98a47bf6a..000000000 --- a/examples/weather/lib/main.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:weather/runner/runner.dart'; - -/// Запуск раннера -void main() { - runApplication(); -} diff --git a/examples/weather/lib/modules/app/app.dart b/examples/weather/lib/modules/app/app.dart deleted file mode 100644 index 636a52e0d..000000000 --- a/examples/weather/lib/modules/app/app.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:weather/modules/weather/ui/screens/app/weather_app.dart'; - -/// создание MaterialApp и запуск модуля "погода" -class App extends StatelessWidget { - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Weather and News', - theme: ThemeData.dark().copyWith( - primaryColor: Colors.white, - ), - home: WeatherApp(), - ); - } -} diff --git a/examples/weather/lib/modules/app/services/app_dependencies.dart b/examples/weather/lib/modules/app/services/app_dependencies.dart deleted file mode 100644 index bfcb9ac94..000000000 --- a/examples/weather/lib/modules/app/services/app_dependencies.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:flutter/material.dart'; -import '../app.dart'; - -class AppDependencies extends StatelessWidget { - final App app; - - const AppDependencies({ - Key? key, - required this.app, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - // TODO: добавить интеракторы и провайдер - // final hiveInteractor = HiveInteractor(); - - // return MultiProvider( - // providers: [ - // Provider(create: (_) => hiveInteractor), - // ], - // child: app, - // ); - return app; - } -} diff --git a/examples/weather/lib/modules/app/services/app_storage_interactor.dart b/examples/weather/lib/modules/app/services/app_storage_interactor.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/weather/lib/modules/app/services/app_storage_repository.dart b/examples/weather/lib/modules/app/services/app_storage_repository.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/weather/lib/modules/news/models/news_model.dart b/examples/weather/lib/modules/news/models/news_model.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/weather/lib/modules/news/screens/news_screen/news_screen.dart b/examples/weather/lib/modules/news/screens/news_screen/news_screen.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/weather/lib/modules/news/screens/news_screen/news_screen_wm.dart b/examples/weather/lib/modules/news/screens/news_screen/news_screen_wm.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/weather/lib/modules/news/services/news_intearctor.dart b/examples/weather/lib/modules/news/services/news_intearctor.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/weather/lib/modules/news/services/news_repository.dart b/examples/weather/lib/modules/news/services/news_repository.dart deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/weather/lib/modules/news/ui/screens/news_screen/news_screen.dart b/examples/weather/lib/modules/news/ui/screens/news_screen/news_screen.dart deleted file mode 100644 index 1c5856920..000000000 --- a/examples/weather/lib/modules/news/ui/screens/news_screen/news_screen.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:weather/modules/news/ui/screens/news_screen/news_screen_wm.dart'; - -/// основной экран новостей -class NewsScreen extends CoreMwwmWidget { - NewsScreen({Key? key}) - : super( - key: key, - widgetModelBuilder: (context) => createNewsScreenWidgetModel(context), - ); - - @override - WidgetState, NewsScreenWidgetModel> - createWidgetState() { - return _NewsScreen(); - } -} - -class _NewsScreen extends WidgetState { - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: Text('yo tho'), - ), - ); - } -} diff --git a/examples/weather/lib/modules/news/ui/screens/news_screen/news_screen_wm.dart b/examples/weather/lib/modules/news/ui/screens/news_screen/news_screen_wm.dart deleted file mode 100644 index 579e18f64..000000000 --- a/examples/weather/lib/modules/news/ui/screens/news_screen/news_screen_wm.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:weather/error_handlers/app_error_handler.dart'; - -class NewsScreenWidgetModel extends WidgetModel { - NewsScreenWidgetModel(WidgetModelDependencies baseDependencies) - : super(baseDependencies); -} - -NewsScreenWidgetModel createNewsScreenWidgetModel(BuildContext context) { - return NewsScreenWidgetModel( - WidgetModelDependencies(errorHandler: AppErrorHandler(context: context)), - ); -} diff --git a/examples/weather/lib/modules/weather/config/url_config.dart b/examples/weather/lib/modules/weather/config/url_config.dart deleted file mode 100644 index df0b1fbfb..000000000 --- a/examples/weather/lib/modules/weather/config/url_config.dart +++ /dev/null @@ -1,6 +0,0 @@ -/// Конфигурация урл-ов модуля. -class UrlConfig { - static const String _baseUrl = 'https://api.openweathermap.org'; - - static String get baseUrl => _baseUrl; -} diff --git a/examples/weather/lib/modules/weather/models/main_info.dart b/examples/weather/lib/modules/weather/models/main_info.dart deleted file mode 100644 index 95b33a9c9..000000000 --- a/examples/weather/lib/modules/weather/models/main_info.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'main_info.g.dart'; - -/// Главные числовые параметры погоды - -@JsonSerializable(fieldRename: FieldRename.snake) -class MainInfo { - final double temp; - final double feelsLike; - final double tempMin; - final double tempMax; - final int pressure; - final int humidity; - - MainInfo({ - required this.temp, - required this.feelsLike, - required this.tempMin, - required this.tempMax, - required this.pressure, - required this.humidity, - }); - - factory MainInfo.fromJson(Map json) => - _$MainInfoFromJson(json); - Map toJson() => _$MainInfoToJson(this); - - @override - String toString() { - return 'MainInfo(temp: $temp, feelsLike: $feelsLike, tempMin: $tempMin, tempMax: $tempMax, pressure: $pressure, humidity: $humidity)'; - } -} diff --git a/examples/weather/lib/modules/weather/models/main_info.g.dart b/examples/weather/lib/modules/weather/models/main_info.g.dart deleted file mode 100644 index 0834fedc2..000000000 --- a/examples/weather/lib/modules/weather/models/main_info.g.dart +++ /dev/null @@ -1,27 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'main_info.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -MainInfo _$MainInfoFromJson(Map json) { - return MainInfo( - temp: (json['temp'] as num).toDouble(), - feelsLike: (json['feels_like'] as num).toDouble(), - tempMin: (json['temp_min'] as num).toDouble(), - tempMax: (json['temp_max'] as num).toDouble(), - pressure: json['pressure'] as int, - humidity: json['humidity'] as int, - ); -} - -Map _$MainInfoToJson(MainInfo instance) => { - 'temp': instance.temp, - 'feels_like': instance.feelsLike, - 'temp_min': instance.tempMin, - 'temp_max': instance.tempMax, - 'pressure': instance.pressure, - 'humidity': instance.humidity, - }; diff --git a/examples/weather/lib/modules/weather/models/weather.dart b/examples/weather/lib/modules/weather/models/weather.dart deleted file mode 100644 index 116a83fd9..000000000 --- a/examples/weather/lib/modules/weather/models/weather.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -import 'package:weather/modules/weather/models/main_info.dart'; -import 'package:weather/modules/weather/models/weather_info.dart'; -import 'package:weather/modules/weather/models/wind_info.dart'; - -part 'weather.g.dart'; - -/// Модель общей информации о погоде - -@JsonSerializable(explicitToJson: true) -class Weather { - final List weather; - final MainInfo main; - final WindInfo wind; - final String name; - - Weather({ - required this.weather, - required this.main, - required this.wind, - required this.name, - }); - - factory Weather.fromJson(Map json) => - _$WeatherFromJson(json); - Map toJson() => _$WeatherToJson(this); - - @override - String toString() { - return 'Weather (weather: $weather, main: $main, wind: $wind, name: $name)'; - } -} diff --git a/examples/weather/lib/modules/weather/models/weather.g.dart b/examples/weather/lib/modules/weather/models/weather.g.dart deleted file mode 100644 index 02db338fe..000000000 --- a/examples/weather/lib/modules/weather/models/weather.g.dart +++ /dev/null @@ -1,25 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'weather.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -Weather _$WeatherFromJson(Map json) { - return Weather( - weather: (json['weather'] as List) - .map((e) => WeatherInfo.fromJson(e as Map)) - .toList(), - main: MainInfo.fromJson(json['main'] as Map), - wind: WindInfo.fromJson(json['wind'] as Map), - name: json['name'] as String, - ); -} - -Map _$WeatherToJson(Weather instance) => { - 'weather': instance.weather.map((e) => e.toJson()).toList(), - 'main': instance.main.toJson(), - 'wind': instance.wind.toJson(), - 'name': instance.name, - }; diff --git a/examples/weather/lib/modules/weather/models/weather_info.dart b/examples/weather/lib/modules/weather/models/weather_info.dart deleted file mode 100644 index ee8c6bdb6..000000000 --- a/examples/weather/lib/modules/weather/models/weather_info.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'weather_info.g.dart'; - -/// Описание погоды. -/// Основное значение main (напр. Clouds) и descripion (напр. Scattered clouds) - -@JsonSerializable() -class WeatherInfo { - final int id; - final String main; - final String description; - final String icon; - - WeatherInfo({ - required this.id, - required this.main, - required this.description, - required this.icon, - }); - - factory WeatherInfo.fromJson(Map json) => - _$WeatherInfoFromJson(json); - Map toJson() => _$WeatherInfoToJson(this); - - @override - String toString() { - return 'WeatherInfo(id: $id, main: $main, description: $description, icon: $icon)'; - } -} diff --git a/examples/weather/lib/modules/weather/models/weather_info.g.dart b/examples/weather/lib/modules/weather/models/weather_info.g.dart deleted file mode 100644 index be8bb5922..000000000 --- a/examples/weather/lib/modules/weather/models/weather_info.g.dart +++ /dev/null @@ -1,24 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'weather_info.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -WeatherInfo _$WeatherInfoFromJson(Map json) { - return WeatherInfo( - id: json['id'] as int, - main: json['main'] as String, - description: json['description'] as String, - icon: json['icon'] as String, - ); -} - -Map _$WeatherInfoToJson(WeatherInfo instance) => - { - 'id': instance.id, - 'main': instance.main, - 'description': instance.description, - 'icon': instance.icon, - }; diff --git a/examples/weather/lib/modules/weather/models/weather_model.g.dart b/examples/weather/lib/modules/weather/models/weather_model.g.dart deleted file mode 100644 index b22e70a2e..000000000 --- a/examples/weather/lib/modules/weather/models/weather_model.g.dart +++ /dev/null @@ -1,26 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'weather_model.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -WeatherModel _$WeatherModelFromJson(Map json) { - return WeatherModel( - weather: (json['weather'] as List) - .map((e) => WeatherInfo.fromJson(e as Map)) - .toList(), - main: MainInfo.fromJson(json['main'] as Map), - wind: WindInfo.fromJson(json['wind'] as Map), - name: json['name'] as String, - ); -} - -Map _$WeatherModelToJson(WeatherModel instance) => - { - 'weather': instance.weather.map((e) => e.toJson()).toList(), - 'main': instance.main.toJson(), - 'wind': instance.wind.toJson(), - 'name': instance.name, - }; diff --git a/examples/weather/lib/modules/weather/models/wind_info.dart b/examples/weather/lib/modules/weather/models/wind_info.dart deleted file mode 100644 index fc8117fb1..000000000 --- a/examples/weather/lib/modules/weather/models/wind_info.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'wind_info.g.dart'; - -/// Информация о ветре - -@JsonSerializable() -class WindInfo { - @JsonKey(defaultValue: 0) - final double speed; - @JsonKey(defaultValue: 0) - final double deg; - @JsonKey(defaultValue: 0) - final double gust; - - WindInfo({ - required this.speed, - required this.deg, - required this.gust, - }); - - factory WindInfo.fromJson(Map json) => - _$WindInfoFromJson(json); - Map toJson() => _$WindInfoToJson(this); - - @override - String toString() => 'WindInfo(speed: $speed, deg: $deg, gust: $gust)'; -} diff --git a/examples/weather/lib/modules/weather/models/wind_info.g.dart b/examples/weather/lib/modules/weather/models/wind_info.g.dart deleted file mode 100644 index c9008da81..000000000 --- a/examples/weather/lib/modules/weather/models/wind_info.g.dart +++ /dev/null @@ -1,21 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'wind_info.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -WindInfo _$WindInfoFromJson(Map json) { - return WindInfo( - speed: (json['speed'] as num?)?.toDouble() ?? 0, - deg: (json['deg'] as num?)?.toDouble() ?? 0, - gust: (json['gust'] as num?)?.toDouble() ?? 0, - ); -} - -Map _$WindInfoToJson(WindInfo instance) => { - 'speed': instance.speed, - 'deg': instance.deg, - 'gust': instance.gust, - }; diff --git a/examples/weather/lib/modules/weather/repository/weather_api_client.dart b/examples/weather/lib/modules/weather/repository/weather_api_client.dart deleted file mode 100644 index af4495183..000000000 --- a/examples/weather/lib/modules/weather/repository/weather_api_client.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:http/http.dart'; - -/// Класс для взаимодействия с API слоем. -class WeatherApiClient { - final Client httpClient; - - final String _baseUrl; - - WeatherApiClient(this._baseUrl, this.httpClient); - - /// получает клиент и параметры, по которым и делает запрос. Возвращает Future - Future get(String endpoint, {Map? params}) { - final queryString = Uri(queryParameters: params).query; - return httpClient.get(Uri.parse('$_baseUrl$endpoint?$queryString')); - } -} diff --git a/examples/weather/lib/modules/weather/repository/weather_repository.dart b/examples/weather/lib/modules/weather/repository/weather_repository.dart deleted file mode 100644 index 96dc2a28e..000000000 --- a/examples/weather/lib/modules/weather/repository/weather_repository.dart +++ /dev/null @@ -1,64 +0,0 @@ -import 'dart:convert'; - -import 'package:weather/error_handlers/exceptions.dart'; -import 'package:weather/modules/weather/models/weather.dart'; -import 'package:weather/modules/weather/repository/weather_api_client.dart'; - -/// Репозиторий для работы с API OpneWeatherMap -class WeatherRepository { - final WeatherApiClient client; - - const WeatherRepository(this.client); - - /// Получить прогноз погоды по заданному городу - Future getWeather(String city) async { - final Map params = { - 'units': 'metric', - 'appid': 'f6c94efdd8a88e35fd00a12d8beab998', - 'q': city, - }; - - final response = await client.get('/data/2.5/weather', params: params); - if (response.statusCode == 200 && response.body.isNotEmpty) { - final data = jsonDecode(response.body) as Map; - - /// парсинг через сгенерированный fromJson - return Weather.fromJson(data); - } else { - print(response.statusCode); - if (response.statusCode == 400) { - throw ClientNetworkException(); - } else if (response.statusCode >= 401 && response.statusCode <= 599) { - throw ServerNetworkException(); - } else { - throw Exception('Bad request with code: ${response.statusCode}'); - } - } - } - - /// Получить прогноз погоды по текущей геолокации - Future getWeatherGeolocation(double lat, double lon) async { - final Map params = { - 'lat': lat.toString(), - 'lon': lon.toString(), - 'units': 'metric', - 'appid': 'f6c94efdd8a88e35fd00a12d8beab998', - }; - - final response = await client.get('/data/2.5/weather', params: params); - if (response.statusCode == 200 && response.body.isNotEmpty) { - final data = jsonDecode(response.body) as Map; - - /// парсинг через сгенерированный fromJson - return Weather.fromJson(data); - } else { - if (response.statusCode == 400) { - throw ClientNetworkException(); - } else if (response.statusCode >= 401 && response.statusCode <= 599) { - throw ServerNetworkException(); - } else { - throw Exception('Bad request with code: ${response.statusCode}'); - } - } - } -} diff --git a/examples/weather/lib/modules/weather/services/find_lication.dart b/examples/weather/lib/modules/weather/services/find_lication.dart deleted file mode 100644 index 4c5363efe..000000000 --- a/examples/weather/lib/modules/weather/services/find_lication.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:location/location.dart'; -import 'package:weather/error_handlers/exceptions.dart'; - -/// Класс сервисов, связанных с геопозицией устройства - -class GeoService { - /// Определяет текущее положение. Кидает ошибки при отсутствии геосервиса и разрещений - /// В Web работает из коробки. На Андроиде и iOS требуются разрешения по пакету location - Future findLoacation() async { - Location location = new Location(); - - bool _serviceEnabled; - PermissionStatus _permissionGranted; - LocationData _locationData; - - _serviceEnabled = await location.serviceEnabled(); - if (!_serviceEnabled) { - _serviceEnabled = await location.requestService(); - if (!_serviceEnabled) { - throw Exception('Geo service is not enabled'); - } - } - - _permissionGranted = await location.hasPermission(); - if (_permissionGranted == PermissionStatus.denied) { - _permissionGranted = await location.requestPermission(); - if (_permissionGranted != PermissionStatus.granted) { - throw Exception('Geo permission is not granted'); - } - } - - /// перехват ошибки платформы - try { - _locationData = await location.getLocation(); - } catch (e) { - throw GeolocationException(); - } - - return _locationData; - } -} diff --git a/examples/weather/lib/modules/weather/services/weather_interactor.dart b/examples/weather/lib/modules/weather/services/weather_interactor.dart deleted file mode 100644 index 9da1dd542..000000000 --- a/examples/weather/lib/modules/weather/services/weather_interactor.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:weather/modules/weather/models/weather.dart'; -import 'package:weather/modules/weather/repository/weather_repository.dart'; - -/// Интерактор взаимодействия с погодой -class WeatherInteractor { - final WeatherRepository _weatherRepository; - - WeatherInteractor(this._weatherRepository); - - /// Получить погоду по выбранному городу - Future getWeather(String city) { - return _weatherRepository.getWeather(city); - } - - /// Получить погоду по текущим координатам - Future getWeatherGeolocation(double lat, double lon) { - return _weatherRepository.getWeatherGeolocation(lat, lon); - } -} diff --git a/examples/weather/lib/modules/weather/ui/decorations/input_text_decoration.dart b/examples/weather/lib/modules/weather/ui/decorations/input_text_decoration.dart deleted file mode 100644 index c933ac0e6..000000000 --- a/examples/weather/lib/modules/weather/ui/decorations/input_text_decoration.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:flutter/material.dart'; - -/// Офолмление поля ввода на экране погоды -InputDecoration inputTextDecoration(String inputText) { - return InputDecoration( - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(25.0), - borderSide: BorderSide( - color: Colors.white, - width: 2.0, - ), - ), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(25.0), - borderSide: BorderSide( - color: Colors.white, - width: 2.0, - ), - ), - hintStyle: TextStyle(color: Colors.white), - labelStyle: TextStyle(color: Colors.white), - labelText: inputText); -} diff --git a/examples/weather/lib/modules/weather/ui/decorations/shadows.dart b/examples/weather/lib/modules/weather/ui/decorations/shadows.dart deleted file mode 100644 index 77dfbe7cd..000000000 --- a/examples/weather/lib/modules/weather/ui/decorations/shadows.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:flutter/material.dart'; - -/// тени для текстов на экране погоды -List defaultShadow() { - return [ - Shadow( - color: Colors.black, - blurRadius: 1, - offset: Offset(1, 1), - ) - ]; -} diff --git a/examples/weather/lib/modules/weather/ui/res/assets.dart b/examples/weather/lib/modules/weather/ui/res/assets.dart deleted file mode 100644 index eb6b55aa1..000000000 --- a/examples/weather/lib/modules/weather/ui/res/assets.dart +++ /dev/null @@ -1,5 +0,0 @@ -/// пути на ассеты - картинки для фонов - -const String _baseResPath = 'assets'; -const String baseImagesPath = '$_baseResPath/images'; -const String genericBackground = '$baseImagesPath/clouds.jpg'; diff --git a/examples/weather/lib/modules/weather/ui/res/text_styles.dart b/examples/weather/lib/modules/weather/ui/res/text_styles.dart deleted file mode 100644 index c709c6fbc..000000000 --- a/examples/weather/lib/modules/weather/ui/res/text_styles.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:google_fonts/google_fonts.dart'; -import 'package:flutter/material.dart'; -import 'package:weather/modules/weather/ui/decorations/shadows.dart'; - -/// Главные текстовые стили для экрана погоды - -final TextStyle hl1Style = GoogleFonts.anton( - fontSize: 104, - color: Colors.white, - letterSpacing: 3, - shadows: defaultShadow(), -); - -final TextStyle hl2Style = GoogleFonts.anton( - fontSize: 44, - color: Colors.white, - shadows: defaultShadow(), -); - -final TextStyle hl5StyleBold = GoogleFonts.roboto( - fontSize: 24, - color: Colors.white, - fontWeight: FontWeight.w900, - shadows: defaultShadow(), -); - -final TextStyle hl5Style = GoogleFonts.roboto( - fontSize: 24, - color: Colors.white, - shadows: defaultShadow(), -); diff --git a/examples/weather/lib/modules/weather/ui/res/ui_constants.dart b/examples/weather/lib/modules/weather/ui/res/ui_constants.dart deleted file mode 100644 index 5101b6122..000000000 --- a/examples/weather/lib/modules/weather/ui/res/ui_constants.dart +++ /dev/null @@ -1,8 +0,0 @@ -/// максимальная ширина поля ввода -const double maxCityInputWidth = 640; - -/// стандартный паддинг -const double standardPadding = 10; - -/// дополнительный отступ для разделителя -const double dividerPadding = 40; diff --git a/examples/weather/lib/modules/weather/ui/screens/app/weather_app.dart b/examples/weather/lib/modules/weather/ui/screens/app/weather_app.dart deleted file mode 100644 index 38cb3114d..000000000 --- a/examples/weather/lib/modules/weather/ui/screens/app/weather_app.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:weather/modules/weather/ui/screens/app/weather_app_dependencies.dart'; -import 'package:weather/modules/weather/ui/screens/weather_screen/weather_screen.dart'; - -/// запуск главного экрана погоды с зависмостями -class WeatherApp extends StatelessWidget { - const WeatherApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return WeatherAppDependencies( - app: WeatherScreen(), - ); - } -} diff --git a/examples/weather/lib/modules/weather/ui/screens/app/weather_app_dependencies.dart b/examples/weather/lib/modules/weather/ui/screens/app/weather_app_dependencies.dart deleted file mode 100644 index 12f29b014..000000000 --- a/examples/weather/lib/modules/weather/ui/screens/app/weather_app_dependencies.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:weather/modules/weather/config/url_config.dart'; -import 'package:weather/modules/weather/repository/weather_api_client.dart'; -import 'package:weather/modules/weather/repository/weather_repository.dart'; -import 'package:weather/modules/weather/services/weather_interactor.dart'; -import 'package:http/http.dart'; -import 'package:weather/modules/weather/ui/screens/weather_screen/weather_screen.dart'; - -/// создание сервисного слоя, который будет получать погоду по API -/// и прокидывание его в зависимости -class WeatherAppDependencies extends StatelessWidget { - final WeatherScreen app; - - const WeatherAppDependencies({required this.app, Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - final http = Client(); - final apiClient = WeatherApiClient(UrlConfig.baseUrl, http); - final weatherRepository = WeatherRepository(apiClient); - final weatherInteractor = WeatherInteractor(weatherRepository); - - return MultiProvider( - providers: [ - Provider(create: (_) => weatherInteractor), - ], - child: app, - ); - } -} diff --git a/examples/weather/lib/modules/weather/ui/screens/weather_screen/weather_screen.dart b/examples/weather/lib/modules/weather/ui/screens/weather_screen/weather_screen.dart deleted file mode 100644 index 30b9137e1..000000000 --- a/examples/weather/lib/modules/weather/ui/screens/weather_screen/weather_screen.dart +++ /dev/null @@ -1,109 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; -import 'package:weather/modules/weather/models/weather.dart'; -import 'package:weather/modules/weather/ui/decorations/input_text_decoration.dart'; -import 'package:weather/modules/weather/ui/res/assets.dart'; -import 'package:weather/modules/weather/ui/res/ui_constants.dart'; -import 'package:weather/modules/weather/ui/screens/weather_screen/weather_screen_wm.dart'; -import 'package:weather/modules/weather/ui/screens/weather_screen/widgets/search_bar.dart'; -import 'package:weather/modules/weather/ui/screens/weather_screen/widgets/wather_view_error.dart'; -import 'package:weather/modules/weather/ui/screens/weather_screen/widgets/weather_view_loading.dart'; -import 'package:weather/modules/weather/ui/screens/weather_screen/widgets/weather_view_ok.dart'; - -/// главный экран погоды -class WeatherScreen extends CoreMwwmWidget { - WeatherScreen({Key? key}) - : super( - key: key, - widgetModelBuilder: (context) => - createWeatherScreenWidgetModel(context), - ); - - @override - WidgetState, - WeatherScreenWidgetModel> createWidgetState() { - return _WeatherScreen(); - } -} - -class _WeatherScreen - extends WidgetState { - Widget build(BuildContext context) { - return Scaffold( - floatingActionButton: FloatingActionButton.extended( - onPressed: () {}, - label: const Text('News'), - icon: const FaIcon(FontAwesomeIcons.newspaper), - backgroundColor: Colors.white, - ), - body: SafeArea( - child: LayoutBuilder( - builder: (context, constraints) { - /// управление полем вовода и разденилитем на больших экранах - double inputPadding = standardPadding * 2; - final width = constraints.maxWidth; - if (width > maxCityInputWidth + standardPadding * 2) { - inputPadding = (width - maxCityInputWidth) / 2; - } - - return StreamedStateBuilder( - streamedState: wm.backgroundsState, - builder: (context, snapshot) { - return Container( - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.cover, - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(0.7), BlendMode.dstATop), - image: AssetImage( - '$baseImagesPath/${snapshot.toLowerCase()}.jpg'), - ), - ), - child: CustomScrollView( - slivers: [ - SliverFillRemaining( - hasScrollBody: false, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.all(10), - ), - SearchBar( - inputPadding: inputPadding, - findCityByGeoAction: wm.findCityByGeo, - textEditionController: - wm.cityInputAction.controller, - fetchInputAction: wm.fetchInput, - ), - - /// стейтбилдер показывает разные экраны в зависимости от состояния ответа - EntityStateBuilder( - streamedState: wm.weathertState, - builder: (_, data) => WeatherViewOk( - weather: data, - inputPadding: inputPadding, - dividerPadding: dividerPadding), - loadingChild: WeatherViewLoading(), - errorBuilder: (_, e) => WeatherViewError( - inputPadding: inputPadding, - dividerPadding: dividerPadding, - ), - ), - ], - ), - ), - ], - ), - ); - }, - ); - }, - ), - ), - ); - } -} diff --git a/examples/weather/lib/modules/weather/ui/screens/weather_screen/weather_screen_wm.dart b/examples/weather/lib/modules/weather/ui/screens/weather_screen/weather_screen_wm.dart deleted file mode 100644 index 5a46ce4db..000000000 --- a/examples/weather/lib/modules/weather/ui/screens/weather_screen/weather_screen_wm.dart +++ /dev/null @@ -1,101 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; -import 'package:weather/error_handlers/app_error_handler.dart'; -import 'package:weather/modules/weather/models/weather.dart'; -import 'package:weather/modules/weather/services/find_lication.dart'; -import 'package:weather/modules/weather/services/weather_interactor.dart'; -import 'package:provider/provider.dart'; -import 'package:relation/relation.dart' as relation show TextEditingAction; - -class WeatherScreenWidgetModel extends WidgetModel { - WeatherScreenWidgetModel( - WidgetModelDependencies baseDependencies, this._weatherInteractor) - : super(baseDependencies); - - /// интерактор - final WeatherInteractor _weatherInteractor; - - /// Данные для экрана - final weathertState = EntityStreamedState() - ..loading(); // перевод в загрузку на старте - - /// Действие - получить данные по введённому городу - final fetchInput = VoidAction(); - - /// Экшен - получение города из поля ввода - /// получение значения - через cityInputAction.controller.value.text - final cityInputAction = relation.TextEditingAction(); - - /// Найти город исходя из текущео гео пользователя - final findCityByGeo = VoidAction(); - - /// стрим бекграундов - final backgroundsState = StreamedState("clouds"); - - final geoService = GeoService(); - - /// Установка нового бекграунда - void _setBackround(String newBackground) { - if (['clear', 'clouds', 'mist', 'rain', 'snow', 'thunderstorm'] - .contains(newBackground.toLowerCase())) { - backgroundsState.accept(newBackground.toLowerCase()); - } else { - backgroundsState.accept('clouds'); - } - } - - @override - void onLoad() { - super.onLoad(); - } - - @override - void onBind() { - /// подписка на стрим событий с кнопки "погода по городу" на запрос погоды по нему - subscribe(fetchInput.stream, _getWeatherInfoA); - subscribe(findCityByGeo.stream, _getWeatherInfoCoords); - _getWeatherInfoCoords(null); - super.onBind(); - } - - /// отправка погоды в weathertState через try - catch - void _getWeatherInfoA(_) async { - weathertState.loading(); - try { - final newWeather = await _weatherInteractor - .getWeather(cityInputAction.controller.value.text); - weathertState.content(newWeather); - _setBackround(newWeather.weather[0].main); - } catch (e, _) { - /// обработать ошибку - handleError(e); - - /// закинуть ошибку в стрим - weathertState.error(Exception(e)); - } - } - - /// отправка погоды в weatherState из текущих координат по try-catch - void _getWeatherInfoCoords(_) async { - weathertState.loading(); - try { - final location = await geoService.findLoacation(); - final newWeather = await _weatherInteractor.getWeatherGeolocation( - location.latitude ?? 0, location.longitude ?? 0); - weathertState.content(newWeather); - _setBackround(newWeather.weather[0].main); - } catch (e, _) { - handleError(e); - weathertState.error(Exception(e)); - } - } -} - -WeatherScreenWidgetModel createWeatherScreenWidgetModel(BuildContext context) { - return WeatherScreenWidgetModel( - /// добавлен обработчик ошибок - WidgetModelDependencies(errorHandler: AppErrorHandler(context: context)), - context.read(), - ); -} diff --git a/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/search_bar.dart b/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/search_bar.dart deleted file mode 100644 index ca31a0b4e..000000000 --- a/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/search_bar.dart +++ /dev/null @@ -1,51 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:relation/relation.dart'; -import 'package:weather/modules/weather/ui/decorations/input_text_decoration.dart'; -import 'package:weather/modules/weather/ui/res/ui_constants.dart'; - -class SearchBar extends StatelessWidget { - const SearchBar({ - Key? key, - required this.inputPadding, - required this.findCityByGeoAction, - required this.textEditionController, - required this.fetchInputAction, - }) : super(key: key); - - final double inputPadding; - final VoidAction findCityByGeoAction; - final ExtendedTextEditingController textEditionController; - final VoidAction fetchInputAction; - - @override - Widget build(BuildContext context) { - return Container( - padding: EdgeInsets.fromLTRB( - inputPadding, standardPadding, inputPadding, standardPadding), - child: Row( - children: [ - GestureDetector( - child: FaIcon(FontAwesomeIcons.mapMarkerAlt, size: 40), - onTap: findCityByGeoAction, - ), - Expanded( - child: Container( - padding: EdgeInsets.fromLTRB(15, 0, 15, 0), - child: TextFormField( - style: TextStyle(fontSize: 20), - cursorColor: Colors.white, - decoration: inputTextDecoration('Enter City Name'), - controller: textEditionController, - ), - ), - ), - GestureDetector( - child: FaIcon(FontAwesomeIcons.searchLocation, size: 40), - onTap: fetchInputAction, - ), - ], - ), - ); - } -} diff --git a/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/wather_view_error.dart b/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/wather_view_error.dart deleted file mode 100644 index b75a2d9d8..000000000 --- a/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/wather_view_error.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:weather/modules/weather/ui/res/text_styles.dart'; - -/// Экран ошибки -class WeatherViewError extends StatelessWidget { - const WeatherViewError({ - Key? key, - required this.inputPadding, - required this.dividerPadding, - }) : super(key: key); - - final double inputPadding; - final double dividerPadding; - - @override - Widget build(BuildContext context) { - return Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'Something went wrong, try again', - style: hl5Style, - ), - Divider( - thickness: 3, - color: Colors.white, - endIndent: inputPadding + dividerPadding, - indent: inputPadding + dividerPadding, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text('Enter City Name and press ', style: hl5Style), - FaIcon(FontAwesomeIcons.searchLocation), - ], - ), - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text('Or press ', style: hl5Style), - FaIcon(FontAwesomeIcons.mapMarkerAlt), - Text(' to get your location', style: hl5Style), - ], - ), - ], - ), - ); - } -} diff --git a/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/weather_view_loading.dart b/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/weather_view_loading.dart deleted file mode 100644 index 79f964c36..000000000 --- a/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/weather_view_loading.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:flutter/material.dart'; - -/// Индикатор загрузки - -class WeatherViewLoading extends StatelessWidget { - const WeatherViewLoading({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Flexible( - child: Center( - child: CircularProgressIndicator( - color: Colors.white, - ), - ), - ); - } -} diff --git a/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/weather_view_ok.dart b/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/weather_view_ok.dart deleted file mode 100644 index ee3b6516b..000000000 --- a/examples/weather/lib/modules/weather/ui/screens/weather_screen/widgets/weather_view_ok.dart +++ /dev/null @@ -1,71 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:weather/modules/weather/models/weather.dart'; -import 'package:weather/modules/weather/ui/res/text_styles.dart'; - -/// Параметры погоды -/// Показываем если запрос на сервер прошёл нормально и вернул данные - -class WeatherViewOk extends StatelessWidget { - const WeatherViewOk( - {Key? key, - required this.weather, - required this.inputPadding, - required this.dividerPadding}) - : super(key: key); - - final Weather weather; - final double inputPadding; - final double dividerPadding; - - @override - Widget build(BuildContext context) { - var now = new DateTime.now(); - var formatter = new DateFormat.yMMMMd('en_US'); - String formattedDate = formatter.format(now); - - return Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text(weather.name, style: hl2Style), - Text(formattedDate, style: hl5Style), - Text('${weather.main.temp.toInt()}°', style: hl1Style), - Text( - '${weather.main.tempMin.toInt()}° / ${weather.main.tempMax.toInt()}°', - style: hl5Style), - Text('${weather.weather[0].main}', style: hl5Style), - Text('${weather.weather[0].description}', style: hl5Style), - Divider( - thickness: 3, - color: Colors.white, - endIndent: inputPadding + dividerPadding, - indent: inputPadding + dividerPadding, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Text('Pressure: ', style: hl5Style), - Text('Humidity: ', style: hl5Style), - Text('Wind: ', style: hl5Style), - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('${weather.main.pressure} mmHg', style: hl5StyleBold), - Text('${weather.main.humidity} g/m3', style: hl5StyleBold), - Text('${weather.wind.speed} m/s', style: hl5StyleBold), - ], - ), - ], - ), - ], - ), - ); - } -} diff --git a/examples/weather/lib/runner/runner.dart b/examples/weather/lib/runner/runner.dart deleted file mode 100644 index 0ee346d97..000000000 --- a/examples/weather/lib/runner/runner.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hive_flutter/hive_flutter.dart'; -import 'package:weather/config/constants.dart'; -import 'package:weather/modules/app/app.dart'; -import 'package:weather/modules/app/services/app_dependencies.dart'; - -Future runApplication() async { - /// инициализация и открытие Hive-бокса - await Hive.initFlutter(); - await Hive.openBox(hiveBoxName); - - /// запуск приложения с зависимостями - runApp( - AppDependencies( - app: App(), - ), - ); -} diff --git a/examples/weather/pubspec.yaml b/examples/weather/pubspec.yaml deleted file mode 100644 index 5682c986f..000000000 --- a/examples/weather/pubspec.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: weather -description: A new Flutter project. - -publish_to: "none" # Remove this line if you wish to publish to pub.dev - -version: 1.0.0+1 - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - cupertino_icons: ^1.0.2 - dio: ^4.0.0 - font_awesome_flutter: ^9.1.0 - google_fonts: ^2.1.0 - hive: ^2.0.4 - hive_flutter: ^1.1.0 - intl: ^0.17.0 - json_serializable: ^4.1.4 - location: ^4.3.0 - mwwm: ^2.0.0 - provider: ^5.0.0 - relation: ^3.1.0 - weather_icons: ^3.0.0 - -dev_dependencies: - flutter_test: - sdk: flutter - build_runner: ^2.0.6 - -flutter: - uses-material-design: true - - assets: - - assets/ - - assets/images/ diff --git a/examples/weather/web/favicon.png b/examples/weather/web/favicon.png deleted file mode 100644 index 8aaa46ac1..000000000 Binary files a/examples/weather/web/favicon.png and /dev/null differ diff --git a/examples/weather/web/icons/Icon-192.png b/examples/weather/web/icons/Icon-192.png deleted file mode 100644 index b749bfef0..000000000 Binary files a/examples/weather/web/icons/Icon-192.png and /dev/null differ diff --git a/examples/weather/web/icons/Icon-512.png b/examples/weather/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48df..000000000 Binary files a/examples/weather/web/icons/Icon-512.png and /dev/null differ diff --git a/examples/weather/web/index.html b/examples/weather/web/index.html deleted file mode 100644 index d0966eb2e..000000000 --- a/examples/weather/web/index.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - weather - - - - - - - diff --git a/examples/weather/web/manifest.json b/examples/weather/web/manifest.json deleted file mode 100644 index f53a5f5ef..000000000 --- a/examples/weather/web/manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "weather", - "short_name": "weather", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} diff --git a/packages/analytics/.gitignore b/packages/analytics/.gitignore deleted file mode 100644 index 9f87252c6..000000000 --- a/packages/analytics/.gitignore +++ /dev/null @@ -1,72 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/analytics/.metadata b/packages/analytics/.metadata deleted file mode 100644 index 9903133df..000000000 --- a/packages/analytics/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: b712a172f9694745f50505c93340883493b505e5 - channel: stable - -project_type: package diff --git a/packages/analytics/CHANGELOG.md b/packages/analytics/CHANGELOG.md deleted file mode 100644 index d3538a032..000000000 --- a/packages/analytics/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Changelog - -## 1.0.1 - 2021-05-30 - -* Stable release - -## 1.0.0-dev.1 - 2021-05-24 - -* Cleanup pubspec.yaml - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0`. - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/analytics/CONTRIBUTING.md b/packages/analytics/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/analytics/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/analytics/LICENSE b/packages/analytics/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/analytics/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/analytics/README.md b/packages/analytics/README.md deleted file mode 100644 index f35b008ec..000000000 --- a/packages/analytics/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Analytics - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/analytics) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=analytics&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/analytics?logo=dart&logoColor=white)](https://pub.dev/packages/analytics) -[![Pub Likes](https://badgen.net/pub/likes/analytics)](https://pub.dev/packages/analytics) -[![Pub popularity](https://badgen.net/pub/popularity/analytics)](https://pub.dev/packages/analytics/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/analytics) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## Description - -Interface for working with analytic services. -The library is supposed to unify work with various analytic services. The main actors are: - -* **AnalyticAction** — any action that is valuable for analytics. Usually it is a "button pressed" or "screen opened" type of event but the main criterion is a possibility to be handled by `AnalyticActionPerformer`. -* **AnalyticActionPerformer** — a performer of specific actions used to incapsulate work with a certain analytics service. Typically implemented by transforming `AnalyticAction` into a required format as well as calling *send()* of a third-party library. -* **AnalyticService** — a unified entry point for several `AnalyticActionPerformer`s. - -## Example - -The easiest interaction with the library is as follows: - -1. Determine the actions that ought to be recorded in the analytics service: - - ```dart - class MyAnalyticAction implements AnalyticAction { - final String key; - final String value; - - MyAnalyticAction(this.key, this.value); - } - - class ButtonPressedAction extends MyAnalyticAction { - ButtonPressedAction() : super("button_pressed", null); - } - - class ScreenOpenedAction extends MyAnalyticAction { - ScreenOpenedAction({String param}) : super("screen_opened", param); - } - ``` - -2. Implement action performer: - - ```dart - class MyAnalyticActionPerformer - implements AnalyticActionPerformer { - final SomeAnalyticService _service; - - MyAnalyticActionPerformer(this._service); - - @override - bool canHandle(AnalyticAction action) => action is MyAnalyticAction; - - @override - void perform(MyAnalyticAction action) { - _service.send(action.key, action.value); - } - } - ``` - -3. Add performer to the service: - - ```dart - final analyticService = DefaultAnalyticService(); - analyticService.addActionPerformer( - MyAnalyticActionPerformer(SomeAnalyticService()), - ); - ``` - -Usage: - -```dart - analyticService.performAction(ButtonPressedAction()); -``` - -## Installation - -Add `analytics` to your `pubspec.yaml` file: - -```yaml -dependencies: - analytics: ^1.0.0 -``` - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/analytics/analysis_options.yaml b/packages/analytics/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/analytics/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/analytics/dart_dependency_validator.yaml b/packages/analytics/dart_dependency_validator.yaml deleted file mode 100644 index c69bdf12d..000000000 --- a/packages/analytics/dart_dependency_validator.yaml +++ /dev/null @@ -1,2 +0,0 @@ -exclude: - - "example/**" diff --git a/packages/analytics/example/.gitignore b/packages/analytics/example/.gitignore deleted file mode 100644 index ad143de6c..000000000 --- a/packages/analytics/example/.gitignore +++ /dev/null @@ -1,76 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ -.flutter-plugins-dependencies - - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* -**/ios/Podfile - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/analytics/example/.metadata b/packages/analytics/example/.metadata deleted file mode 100644 index aeb01ee24..000000000 --- a/packages/analytics/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f - channel: stable - -project_type: app diff --git a/packages/analytics/example/README.md b/packages/analytics/example/README.md deleted file mode 100644 index a13562602..000000000 --- a/packages/analytics/example/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# example - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/packages/analytics/example/analysis_options.yaml b/packages/analytics/example/analysis_options.yaml deleted file mode 100644 index 27e5a83c9..000000000 --- a/packages/analytics/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml \ No newline at end of file diff --git a/packages/analytics/example/android/app/build.gradle b/packages/analytics/example/android/app/build.gradle deleted file mode 100644 index fbc161c87..000000000 --- a/packages/analytics/example/android/app/build.gradle +++ /dev/null @@ -1,69 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' -} - -apply plugin: 'com.google.gms.google-services' \ No newline at end of file diff --git a/packages/analytics/example/android/app/google-services.json b/packages/analytics/example/android/app/google-services.json deleted file mode 100644 index eddc68330..000000000 --- a/packages/analytics/example/android/app/google-services.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "project_info": { - "project_number": "8404403195", - "firebase_url": "https://analytics-demo-29245.firebaseio.com", - "project_id": "analytics-demo-29245", - "storage_bucket": "analytics-demo-29245.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:8404403195:android:bddcf03fe62f213e5b815e", - "android_client_info": { - "package_name": "com.example.example" - } - }, - "oauth_client": [ - { - "client_id": "8404403195-u5uoimeedjrpoiiegu2gel6jadh395ej.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyCNj1ML053gJdQD6RY9UbL5iuEqgsfLYhU" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "8404403195-u5uoimeedjrpoiiegu2gel6jadh395ej.apps.googleusercontent.com", - "client_type": 3 - } - ] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/packages/analytics/example/android/app/src/debug/AndroidManifest.xml b/packages/analytics/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/analytics/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/analytics/example/android/app/src/main/AndroidManifest.xml b/packages/analytics/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 287714028..000000000 --- a/packages/analytics/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/packages/analytics/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/analytics/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e2c0fd32a..000000000 --- a/packages/analytics/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.example - -import android.os.Bundle - -import io.flutter.app.FlutterActivity -import io.flutter.plugins.GeneratedPluginRegistrant - -class MainActivity: FlutterActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - GeneratedPluginRegistrant.registerWith(this) - } -} diff --git a/packages/analytics/example/android/app/src/main/res/drawable/launch_background.xml b/packages/analytics/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/analytics/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/analytics/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/analytics/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/analytics/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/analytics/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/analytics/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/analytics/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/analytics/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/analytics/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/analytics/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/analytics/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/analytics/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/analytics/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/analytics/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/analytics/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/analytics/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/analytics/example/android/app/src/main/res/values/styles.xml b/packages/analytics/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa4417c..000000000 --- a/packages/analytics/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/analytics/example/android/app/src/profile/AndroidManifest.xml b/packages/analytics/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/analytics/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/analytics/example/android/build.gradle b/packages/analytics/example/android/build.gradle deleted file mode 100644 index f18acfe79..000000000 --- a/packages/analytics/example/android/build.gradle +++ /dev/null @@ -1,32 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.google.gms:google-services:4.3.3' - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/analytics/example/android/gradle.properties b/packages/analytics/example/android/gradle.properties deleted file mode 100644 index 2324ab5b7..000000000 --- a/packages/analytics/example/android/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M - -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/analytics/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/analytics/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 63ab3ae08..000000000 --- a/packages/analytics/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/packages/analytics/example/android/settings.gradle b/packages/analytics/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/analytics/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/analytics/example/ios/Flutter/AppFrameworkInfo.plist b/packages/analytics/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/analytics/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/analytics/example/ios/Flutter/Debug.xcconfig b/packages/analytics/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba114..000000000 --- a/packages/analytics/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/analytics/example/ios/Flutter/Flutter.podspec b/packages/analytics/example/ios/Flutter/Flutter.podspec deleted file mode 100644 index 2c4421cfe..000000000 --- a/packages/analytics/example/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# This is a generated file; do not edit or check into version control. -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'High-performance, high-fidelity mobile apps.' - s.homepage = 'https://flutter.io' - s.license = { :type => 'MIT' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - # Framework linking is handled by Flutter tooling, not CocoaPods. - # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. - s.vendored_frameworks = 'path/to/nothing' -end diff --git a/packages/analytics/example/ios/Flutter/Release.xcconfig b/packages/analytics/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e9340e..000000000 --- a/packages/analytics/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/analytics/example/ios/Runner.xcodeproj/project.pbxproj b/packages/analytics/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 676381788..000000000 --- a/packages/analytics/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,586 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 403C3C918FDCEBB338B5B400 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F667B6C10859D88CC10DC528 /* Pods_Runner.framework */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 37F8941DC0039EBDF7FFDD82 /* 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 = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 5E77C1DF60EC2989B462CFB8 /* 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 = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 99AFEE0ACB276B4F4E22D04C /* 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 = ""; }; - F667B6C10859D88CC10DC528 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 403C3C918FDCEBB338B5B400 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 927A89E1FCA921B06EE94852 /* Frameworks */ = { - isa = PBXGroup; - children = ( - F667B6C10859D88CC10DC528 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - F5CFE945DC0F316298301DBA /* Pods */, - 927A89E1FCA921B06EE94852 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; - F5CFE945DC0F316298301DBA /* Pods */ = { - isa = PBXGroup; - children = ( - 5E77C1DF60EC2989B462CFB8 /* Pods-Runner.debug.xcconfig */, - 37F8941DC0039EBDF7FFDD82 /* Pods-Runner.release.xcconfig */, - 99AFEE0ACB276B4F4E22D04C /* Pods-Runner.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - DB8ED3596BEB1E3D2373F408 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ED4DF42DD750B40416E4703A /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0910; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - DB8ED3596BEB1E3D2373F408 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "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"; - showEnvVarsInLog = 0; - }; - ED4DF42DD750B40416E4703A /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework", - "${BUILT_PRODUCTS_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework", - "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework", - "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework", - "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", - "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework", - "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreDiagnostics.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MTL_ENABLE_DEBUG_INFO = NO; - ONLY_ACTIVE_ARCH = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MTL_ENABLE_DEBUG_INFO = NO; - ONLY_ACTIVE_ARCH = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/analytics/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/analytics/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/packages/analytics/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/analytics/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/analytics/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/analytics/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/analytics/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/analytics/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14c..000000000 --- a/packages/analytics/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/packages/analytics/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/analytics/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/analytics/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/analytics/example/ios/Runner/AppDelegate.swift b/packages/analytics/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/analytics/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index bd77dd655..000000000 --- a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index a91bfcd30..000000000 --- a/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "LaunchImage.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/analytics/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/analytics/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/analytics/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/analytics/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/analytics/example/ios/Runner/Base.lproj/Main.storyboard b/packages/analytics/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/analytics/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/analytics/example/ios/Runner/Info.plist b/packages/analytics/example/ios/Runner/Info.plist deleted file mode 100644 index a060db61e..000000000 --- a/packages/analytics/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/analytics/example/ios/Runner/Runner-Bridging-Header.h b/packages/analytics/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 7335fdf90..000000000 --- a/packages/analytics/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" \ No newline at end of file diff --git a/packages/analytics/example/lib/analytics_events.dart b/packages/analytics/example/lib/analytics_events.dart deleted file mode 100644 index fa2952571..000000000 --- a/packages/analytics/example/lib/analytics_events.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:example/firebase/firebase_analytic_event.dart'; - -class FantasticButtonTappedEvent implements FirebaseAnalyticEvent { - const FantasticButtonTappedEvent(); - - @override - String get key => 'fantastic_button_tapped'; - - @override - Map get params => {}; - - @override - String toString() => 'FantasticButtonTappedEvent'; -} - -class SparklingButtonTappedEvent implements FirebaseAnalyticEvent { - const SparklingButtonTappedEvent(this.payload); - - final String payload; - - @override - String get key => 'sparkling_button_tapped'; - - @override - Map get params => { - 'payload': payload, - }; - - @override - String toString() => 'SparklingButtonTappedEvent'; -} - -class DelightfulButtonTappedEvent implements FirebaseAnalyticEvent { - const DelightfulButtonTappedEvent({required this.isDelightful}); - - final bool isDelightful; - - @override - String get key => 'delightful_button_tapped'; - - @override - Map get params => { - 'isDelightful': isDelightful, - }; - - @override - String toString() => 'DelightfulButtonTappedEvent'; -} diff --git a/packages/analytics/example/lib/firebase/const.dart b/packages/analytics/example/lib/firebase/const.dart deleted file mode 100644 index 56b7af6d5..000000000 --- a/packages/analytics/example/lib/firebase/const.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -const maxEventKeyLength = 40; -const maxEventValueLength = 100; - -const maxSetUserPropertyKeyLength = 24; -const maxSetUserPropertyValueLength = 36; diff --git a/packages/analytics/example/lib/firebase/firebase_analytic_event.dart b/packages/analytics/example/lib/firebase/firebase_analytic_event.dart deleted file mode 100644 index 0c95e1c59..000000000 --- a/packages/analytics/example/lib/firebase/firebase_analytic_event.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:analytics/analytics.dart'; -import 'package:example/firebase/has_key.dart'; -import 'package:example/firebase/has_map_params.dart'; - -abstract class FirebaseAnalyticEvent - implements AnalyticAction, HasKey, HasMapParams {} diff --git a/packages/analytics/example/lib/firebase/firebase_analytic_event_sender.dart b/packages/analytics/example/lib/firebase/firebase_analytic_event_sender.dart deleted file mode 100644 index 91c9edffb..000000000 --- a/packages/analytics/example/lib/firebase/firebase_analytic_event_sender.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:analytics/core/analytic_action.dart'; -import 'package:analytics/core/analytic_action_performer.dart'; -import 'package:example/firebase/const.dart'; -import 'package:example/firebase/firebase_analytic_event.dart'; -import 'package:firebase_analytics/firebase_analytics.dart'; - -class FirebaseAnalyticEventSender - implements AnalyticActionPerformer { - const FirebaseAnalyticEventSender(this._firebaseAnalytics); - - final FirebaseAnalytics _firebaseAnalytics; - - @override - bool canHandle(AnalyticAction action) => action is FirebaseAnalyticEvent; - - @override - void perform(FirebaseAnalyticEvent action) { - final params = _cutParamsLength(action.params as Map); - _firebaseAnalytics.logEvent( - name: _cutName(action.key), - parameters: params, - ); - } - - // Shortening of parameters to meet requirements of Firebase Analytics - Map _cutParamsLength(Map params) { - final resultParams = {}; - for (final String key in params.keys) { - final value = params[key]; - resultParams[_cutName(key)] = value is String ? _cutValue(value) : value; - } - - return resultParams; - } - - String _cutName(String name) => name.length <= maxEventKeyLength - ? name - : name.substring(0, maxEventKeyLength); - - String _cutValue(String value) => value.length <= maxEventValueLength - ? value - : value.substring(0, maxEventValueLength); -} diff --git a/packages/analytics/example/lib/firebase/firebase_user_property.dart b/packages/analytics/example/lib/firebase/firebase_user_property.dart deleted file mode 100644 index 8ac56dcaa..000000000 --- a/packages/analytics/example/lib/firebase/firebase_user_property.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:analytics/analytics.dart'; - -class FirebaseUserProperty implements AnalyticAction { - FirebaseUserProperty(this.key, this.value); - - final String key; - final String value; -} diff --git a/packages/analytics/example/lib/firebase/firebase_user_property_updater.dart b/packages/analytics/example/lib/firebase/firebase_user_property_updater.dart deleted file mode 100644 index 78d950b2b..000000000 --- a/packages/analytics/example/lib/firebase/firebase_user_property_updater.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:analytics/core/analytic_action.dart'; -import 'package:analytics/core/analytic_action_performer.dart'; -import 'package:example/firebase/const.dart'; -import 'package:example/firebase/firebase_user_property.dart'; -import 'package:firebase_analytics/firebase_analytics.dart'; - -class FirebaseUserPropertyUpdater - implements AnalyticActionPerformer { - FirebaseUserPropertyUpdater(this._firebaseAnalytics); - - final FirebaseAnalytics _firebaseAnalytics; - - @override - bool canHandle(AnalyticAction action) => action is FirebaseUserProperty; - - @override - void perform(FirebaseUserProperty action) { - _firebaseAnalytics.setUserProperty( - name: _cutName(action.key), - value: _cutValue(action.value), - ); - } - - String _cutName(String name) => name.length <= maxSetUserPropertyKeyLength - ? name - : name.substring(0, maxSetUserPropertyKeyLength); - - String _cutValue(String value) => - value.length <= maxSetUserPropertyValueLength - ? value - : value.substring(0, maxSetUserPropertyValueLength); -} diff --git a/packages/analytics/example/lib/firebase/has_key.dart b/packages/analytics/example/lib/firebase/has_key.dart deleted file mode 100644 index ae7c92fb0..000000000 --- a/packages/analytics/example/lib/firebase/has_key.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -abstract class HasKey { - String get key; -} diff --git a/packages/analytics/example/lib/firebase/has_map_params.dart b/packages/analytics/example/lib/firebase/has_map_params.dart deleted file mode 100644 index b85e9bd2f..000000000 --- a/packages/analytics/example/lib/firebase/has_map_params.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -abstract class HasMapParams { - Map get params; -} diff --git a/packages/analytics/example/lib/main.dart b/packages/analytics/example/lib/main.dart deleted file mode 100644 index 82f33904f..000000000 --- a/packages/analytics/example/lib/main.dart +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:analytics/analytics.dart'; -import 'package:example/analytics_events.dart'; -import 'package:example/firebase/firebase_analytic_event_sender.dart'; -import 'package:firebase_analytics/firebase_analytics.dart'; -import 'package:flutter/material.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({ - required this.title, - Key? key, - }) : super(key: key); - - final String title; - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - late AnalyticService _analyticsService; - final GlobalKey _scaffoldKey = GlobalKey(); - - @override - void initState() { - super.initState(); - - final analytics = FirebaseAnalytics(); - _analyticsService = DefaultAnalyticService() - ..addActionPerformer(FirebaseAnalyticEventSender(analytics)); - } - - void _sendAnalyticAction(AnalyticAction action) { - _analyticsService.performAction(action); - - ScaffoldMessenger.of(_scaffoldKey.currentContext!).hideCurrentSnackBar(); - ScaffoldMessenger.of(_scaffoldKey.currentContext!) - .showSnackBar(SnackBar(content: Text('action send: $action'))); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - key: _scaffoldKey, - appBar: AppBar( - title: Text(widget.title), - ), - body: SizedBox( - width: double.infinity, - child: Column( - children: [ - TextButton( - onPressed: () => _sendAnalyticAction( - const FantasticButtonTappedEvent(), - ), - child: const Text('Fantastic button'), - ), - TextButton( - onPressed: () => _sendAnalyticAction( - const SparklingButtonTappedEvent('some data'), - ), - child: const Text('Sparkling button'), - ), - TextButton( - onPressed: () => _sendAnalyticAction( - const DelightfulButtonTappedEvent(isDelightful: true), - ), - child: const Text('Delightful button'), - ), - ], - ), - ), - ); - } -} diff --git a/packages/analytics/example/pubspec.yaml b/packages/analytics/example/pubspec.yaml deleted file mode 100644 index bb7552058..000000000 --- a/packages/analytics/example/pubspec.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: example -description: Analytics example. -publish_to: none -version: 1.0.0+1 - -dependencies: - analytics: - path: ../ - firebase_analytics: ^8.0.2 - firebase_core: ^1.1.0 - flutter: - sdk: flutter - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: - uses-material-design: true diff --git a/packages/analytics/lib/analytics.dart b/packages/analytics/lib/analytics.dart deleted file mode 100644 index b975345f6..000000000 --- a/packages/analytics/lib/analytics.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:analytics/core/analytic_action.dart'; -export 'package:analytics/core/analytic_action_performer.dart'; -export 'package:analytics/core/analytic_service.dart'; - -export 'package:analytics/impl/default_analytic_service.dart'; diff --git a/packages/analytics/lib/core/analytic_action.dart b/packages/analytics/lib/core/analytic_action.dart deleted file mode 100644 index 0911bdad9..000000000 --- a/packages/analytics/lib/core/analytic_action.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Any action that is valuable for analytics. -/// Usually it is a "button pressed" or "screen opened" -/// type of event but the main criterion is a possibility -/// to be handled by AnalyticActionPerformer. -abstract class AnalyticAction { - const AnalyticAction(); -} diff --git a/packages/analytics/lib/core/analytic_action_performer.dart b/packages/analytics/lib/core/analytic_action_performer.dart deleted file mode 100644 index 335fe2ed3..000000000 --- a/packages/analytics/lib/core/analytic_action_performer.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:analytics/core/analytic_action.dart'; - -/// A performer of specific actions used to incapsulate work with -/// a certain analytics service. Typically implemented by transforming -/// [AnalyticAction] into a required format as well as calling `send()` -/// of a third-party library. -abstract class AnalyticActionPerformer { - const AnalyticActionPerformer(); - - bool canHandle(AnalyticAction action) => action is A; - - void perform(A action); -} diff --git a/packages/analytics/lib/core/analytic_service.dart b/packages/analytics/lib/core/analytic_service.dart deleted file mode 100644 index d5ecf8f18..000000000 --- a/packages/analytics/lib/core/analytic_service.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:analytics/analytics.dart'; - -/// A unified entry point for several [AnalyticActionPerformer]s. -// ignore: one_member_abstracts -abstract class AnalyticService { - const AnalyticService(); - - void performAction(A action); -} diff --git a/packages/analytics/lib/impl/default_analytic_service.dart b/packages/analytics/lib/impl/default_analytic_service.dart deleted file mode 100644 index 034dbf676..000000000 --- a/packages/analytics/lib/impl/default_analytic_service.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:analytics/core/analytic_action.dart'; -import 'package:analytics/core/analytic_action_performer.dart'; -import 'package:analytics/core/analytic_service.dart'; - -import 'package:analytics/utils/logger.dart'; - -/// Logs services and sends actions to the analyst. -class DefaultAnalyticService implements AnalyticService { - final _performers = >{}; - - /// Send analytic [action]. - @override - void performAction(AnalyticAction action) { - _getPerformersByAction(action) - .forEach((performer) => performer.perform(action)); - } - - List> _getPerformersByAction( - AnalyticAction event, - ) { - final properPerformers = - _performers.where((performer) => performer.canHandle(event)).toList(); - if (properPerformers.isEmpty) { - logger.d( - 'No action performer for action:' - ' ${event.runtimeType} in performers $_performers', - ); - } - - return properPerformers; - } - - /// Add [performer] to the service. - bool addActionPerformer( - AnalyticActionPerformer performer, - ) => - _performers.add(performer); -} diff --git a/packages/analytics/lib/utils/logger.dart b/packages/analytics/lib/utils/logger.dart deleted file mode 100644 index f2deba1b8..000000000 --- a/packages/analytics/lib/utils/logger.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:logger/logger.dart'; - -final logger = Logger(); diff --git a/packages/analytics/pubspec.yaml b/packages/analytics/pubspec.yaml deleted file mode 100644 index f8218371a..000000000 --- a/packages/analytics/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: analytics -version: 1.0.1 -description: | - Interface for working with analytic services. The library is supposed to unify work with various analytic services. -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/analytics" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - logger: ^1.0.0 - -dev_dependencies: - surf_lint_rules: ^1.0.0 - test: ^1.17.2 - -environment: - sdk: ">=2.12.0 <3.0.0" diff --git a/packages/analytics/test/analytics_test.dart b/packages/analytics/test/analytics_test.dart deleted file mode 100644 index 6d59bb566..000000000 --- a/packages/analytics/test/analytics_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:analytics/core/analytic_action.dart'; -import 'package:analytics/core/analytic_action_performer.dart'; -import 'package:analytics/impl/default_analytic_service.dart'; -import 'package:test/test.dart'; - -const actionPerformed = 'Action performed'; - -final log = []; - -class TestAction extends AnalyticAction {} - -class TestPerformer extends AnalyticActionPerformer { - @override - void perform(TestAction action) { - // ignore: avoid_print - print(actionPerformed); - } -} - -void main() { - test( - 'DefaultAnalyticService performs action', - overridePrint( - () { - final service = DefaultAnalyticService(); - - final performer = TestPerformer(); - - service.addActionPerformer(performer); - - final action = TestAction(); - - service.performAction(action); - - expect(log, [actionPerformed]); - }, - ), - ); -} - -void Function() overridePrint(void Function() testFn) => () { - final spec = ZoneSpecification( - print: (_, __, ___, msg) { - log.add(msg); - }, - ); - return Zone.current.fork(specification: spec).run(testFn); - }; diff --git a/packages/auto_reload/.metadata b/packages/auto_reload/.metadata deleted file mode 100644 index 45789c722..000000000 --- a/packages/auto_reload/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 20e59316b8b8474554b38493b8ca888794b0234a - channel: stable - -project_type: package diff --git a/packages/auto_reload/CHANGELOG.md b/packages/auto_reload/CHANGELOG.md deleted file mode 100644 index 8e2ee40e6..000000000 --- a/packages/auto_reload/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changelog - -## 1.0.1 - 2021-05-30 - -* Stable release - -## 1.0.0-dev.2 - 2021-05-24 - -* Fix changelog - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0`. - -## 0.0.1-dev.3 - -* Fix lint hints - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/auto_reload/CONTRIBUTING.md b/packages/auto_reload/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/auto_reload/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/auto_reload/LICENSE b/packages/auto_reload/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/auto_reload/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/auto_reload/README.md b/packages/auto_reload/README.md deleted file mode 100644 index 193939a0f..000000000 --- a/packages/auto_reload/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# Auto Reload - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/auto_reload) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=auto_reload&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/auto_reload?logo=dart&logoColor=white)](https://pub.dev/packages/auto_reload) -[![Pub Likes](https://badgen.net/pub/likes/auto_reload)](https://pub.dev/packages/auto_reload) -[![Pub popularity](https://badgen.net/pub/popularity/auto_reload)](https://pub.dev/packages/auto_reload/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/auto_reload) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -A library that helps to perform actions with some periodicity - -## Usage - -### AutoReload - -main classes: - -* [AutoReloader](/lib/src/mixin/auto_reloader.dart) -* [AutoReloadMixin](/lib/src/mixin/auto_reload_mixin.dart) - -usage: - -1. Create abstract class that should be able to reload data should implement [AutoReloader] -2. Apply mixin on a child (that implements [AutoReloader]) -3. override [autoReload] -4. call [startAutoReload] for start and [cancelAutoReload] for dispose - -### AutoRequestManager - -main classes: - -* [AutoFutureManager](/lib/src/manager/base/auto_future_manager.dart) -* [AutoRequestManager](/lib/src/manager/impl/auto_request_manager.dart) - -Main feature of [AutoRequestManager] that requests will only start restarting when a connection is made. -It implemented by a third-party library names [connectivity](https://pub.dev/packages/connectivity). - -usage: - -1. Add your request in [autoReload] -2. Wait callback about successful completion - -## Installation - -Add `auto_reload` to your `pubspec.yaml` file: - -```yaml -dependencies: - auto_reload: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/auto_reload/analysis_options.yaml b/packages/auto_reload/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/auto_reload/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/auto_reload/dart_dependency_validator.yaml b/packages/auto_reload/dart_dependency_validator.yaml deleted file mode 100644 index c03d9162c..000000000 --- a/packages/auto_reload/dart_dependency_validator.yaml +++ /dev/null @@ -1,4 +0,0 @@ -exclude: - - "example/**" -ignore: - - flutter diff --git a/packages/auto_reload/example/.gitignore b/packages/auto_reload/example/.gitignore deleted file mode 100644 index 8a7d8bc02..000000000 --- a/packages/auto_reload/example/.gitignore +++ /dev/null @@ -1,75 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ -.flutter-plugins-dependencies - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* -**/ios/Podfile - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/auto_reload/example/.metadata b/packages/auto_reload/example/.metadata deleted file mode 100644 index e0236519d..000000000 --- a/packages/auto_reload/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 20e59316b8b8474554b38493b8ca888794b0234a - channel: stable - -project_type: app diff --git a/packages/auto_reload/example/analysis_options.yaml b/packages/auto_reload/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/auto_reload/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/auto_reload/example/android/app/build.gradle b/packages/auto_reload/example/android/app/build.gradle deleted file mode 100644 index 47d5e31c7..000000000 --- a/packages/auto_reload/example/android/app/build.gradle +++ /dev/null @@ -1,61 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.counter" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/packages/auto_reload/example/android/app/src/debug/AndroidManifest.xml b/packages/auto_reload/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index a091ca11a..000000000 --- a/packages/auto_reload/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/auto_reload/example/android/app/src/main/AndroidManifest.xml b/packages/auto_reload/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 81a9e68a5..000000000 --- a/packages/auto_reload/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/packages/auto_reload/example/android/app/src/main/java/com/example/counter/MainActivity.java b/packages/auto_reload/example/android/app/src/main/java/com/example/counter/MainActivity.java deleted file mode 100644 index 2aec4dccf..000000000 --- a/packages/auto_reload/example/android/app/src/main/java/com/example/counter/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.counter; - -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } -} diff --git a/packages/auto_reload/example/android/app/src/main/res/drawable/launch_background.xml b/packages/auto_reload/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/auto_reload/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/auto_reload/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/auto_reload/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/auto_reload/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/auto_reload/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/auto_reload/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/auto_reload/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/auto_reload/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/auto_reload/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/auto_reload/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/auto_reload/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/auto_reload/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/auto_reload/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/auto_reload/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/auto_reload/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/auto_reload/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/auto_reload/example/android/app/src/main/res/values/styles.xml b/packages/auto_reload/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa4417c..000000000 --- a/packages/auto_reload/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/auto_reload/example/android/app/src/profile/AndroidManifest.xml b/packages/auto_reload/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index a091ca11a..000000000 --- a/packages/auto_reload/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/auto_reload/example/android/build.gradle b/packages/auto_reload/example/android/build.gradle deleted file mode 100644 index 6de372893..000000000 --- a/packages/auto_reload/example/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/auto_reload/example/android/gradle.properties b/packages/auto_reload/example/android/gradle.properties deleted file mode 100644 index 2bd6f4fda..000000000 --- a/packages/auto_reload/example/android/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M - diff --git a/packages/auto_reload/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/auto_reload/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 63ab3ae08..000000000 --- a/packages/auto_reload/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/packages/auto_reload/example/android/settings.gradle b/packages/auto_reload/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/auto_reload/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/auto_reload/example/ios/Flutter/AppFrameworkInfo.plist b/packages/auto_reload/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/auto_reload/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/auto_reload/example/ios/Flutter/Debug.xcconfig b/packages/auto_reload/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba114..000000000 --- a/packages/auto_reload/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/auto_reload/example/ios/Flutter/Flutter.podspec b/packages/auto_reload/example/ios/Flutter/Flutter.podspec deleted file mode 100644 index 2c4421cfe..000000000 --- a/packages/auto_reload/example/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# This is a generated file; do not edit or check into version control. -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'High-performance, high-fidelity mobile apps.' - s.homepage = 'https://flutter.io' - s.license = { :type => 'MIT' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - # Framework linking is handled by Flutter tooling, not CocoaPods. - # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. - s.vendored_frameworks = 'path/to/nothing' -end diff --git a/packages/auto_reload/example/ios/Flutter/Release.xcconfig b/packages/auto_reload/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e9340e..000000000 --- a/packages/auto_reload/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/auto_reload/example/ios/Runner.xcodeproj/project.pbxproj b/packages/auto_reload/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 57482f99a..000000000 --- a/packages/auto_reload/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,545 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 15D09B1E0EA0143EE7A550EA /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C380836FD00F7F13F092627 /* libPods-Runner.a */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 223FED1ED4A8B851AE10D66A /* 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 = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3C380836FD00F7F13F092627 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3C6C24D337AA988EE3CEDF81 /* 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 = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C8624C751F7FD7BD34638ECA /* 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 15D09B1E0EA0143EE7A550EA /* libPods-Runner.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 6BFE00705614566F4B3F0E73 /* Pods */ = { - isa = PBXGroup; - children = ( - 223FED1ED4A8B851AE10D66A /* Pods-Runner.debug.xcconfig */, - 3C6C24D337AA988EE3CEDF81 /* Pods-Runner.release.xcconfig */, - C8624C751F7FD7BD34638ECA /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - 6BFE00705614566F4B3F0E73 /* Pods */, - E67F204B43FBC28428284DB6 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - E67F204B43FBC28428284DB6 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 3C380836FD00F7F13F092627 /* libPods-Runner.a */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - C7F38785E759AFD3FD2453BA /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - C7F38785E759AFD3FD2453BA /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "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"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = S8QB4VV633; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/auto_reload/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/auto_reload/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/packages/auto_reload/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/auto_reload/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/auto_reload/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/auto_reload/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/auto_reload/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/auto_reload/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14c..000000000 --- a/packages/auto_reload/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/packages/auto_reload/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/auto_reload/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/auto_reload/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/auto_reload/example/ios/Runner/AppDelegate.h b/packages/auto_reload/example/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bbf9..000000000 --- a/packages/auto_reload/example/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/packages/auto_reload/example/ios/Runner/AppDelegate.m b/packages/auto_reload/example/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e90b..000000000 --- a/packages/auto_reload/example/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index bd77dd655..000000000 --- a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 3d43d11e6..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index a91bfcd30..000000000 --- a/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "LaunchImage.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/auto_reload/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/auto_reload/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/auto_reload/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/auto_reload/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/auto_reload/example/ios/Runner/Base.lproj/Main.storyboard b/packages/auto_reload/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/auto_reload/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/auto_reload/example/ios/Runner/Info.plist b/packages/auto_reload/example/ios/Runner/Info.plist deleted file mode 100644 index 235197370..000000000 --- a/packages/auto_reload/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - counter - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/auto_reload/example/ios/Runner/main.m b/packages/auto_reload/example/ios/Runner/main.m deleted file mode 100644 index dff6597e4..000000000 --- a/packages/auto_reload/example/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/packages/auto_reload/example/lib/auto_reload/auto_reload_widget.dart b/packages/auto_reload/example/lib/auto_reload/auto_reload_widget.dart deleted file mode 100644 index 48f2b5f65..000000000 --- a/packages/auto_reload/example/lib/auto_reload/auto_reload_widget.dart +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:auto_reload/auto_reload.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; - -/// Demo widget for [AutoReloadMixin] -class DemoAutoReloadWidget extends StatefulWidget { - const DemoAutoReloadWidget({Key? key}) : super(key: key); - @override - _DemoAutoReloadWidgetState createState() => _DemoAutoReloadWidgetState(); -} - -abstract class _AutoReloadState extends State - implements AutoReloader {} - -class _DemoAutoReloadWidgetState extends _AutoReloadState with AutoReloadMixin { - @override - // ignore: overridden_fields - final Duration autoReloadDuration = const Duration(seconds: 3); - - int _countOfReload = 0; - - @override - void initState() { - super.initState(); - startAutoReload(); - } - - @override - void dispose() { - cancelAutoReload(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - const Spacer(), - const Text( - 'auto reload example:', - style: TextStyle( - fontStyle: FontStyle.normal, - fontWeight: FontWeight.bold, - ), - ), - Text('count of reload $_countOfReload'), - const Spacer(), - ], - ); - } - - @override - void autoReload() { - setState(() { - _countOfReload = _countOfReload + 1; - }); - } -} diff --git a/packages/auto_reload/example/lib/auto_request/auto_request_widget.dart b/packages/auto_reload/example/lib/auto_request/auto_request_widget.dart deleted file mode 100644 index cd30c53d6..000000000 --- a/packages/auto_reload/example/lib/auto_request/auto_request_widget.dart +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:convert'; - -import 'package:auto_reload/auto_reload.dart'; -import 'package:counter/auto_request/domain/post.dart'; -import 'package:flutter/widgets.dart'; -import 'package:http/http.dart' as http; - -class DemoAutoRequestManager extends StatefulWidget { - const DemoAutoRequestManager({Key? key}) : super(key: key); - - @override - _DemoAutoRequestManagerState createState() => _DemoAutoRequestManagerState(); -} - -class _DemoAutoRequestManagerState extends State { - final _autoRequestManager = AutoRequestManager(minReloadDurationSeconds: 3); - - late List _requestStatuses; - - @override - void initState() { - super.initState(); - _requestStatuses = List.generate(5, (idx) { - _autoRequestManager.autoReload( - id: idx.toString(), - toReload: fetchPost, - onComplete: (id) => _complete(int.parse(id)), - ); - return RequestStatus.error; - }); - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - const Spacer(), - const Text( - 'auto request example:', - style: TextStyle( - fontStyle: FontStyle.normal, - fontWeight: FontWeight.bold, - ), - ), - Column( - children: _requestStatuses - .asMap() - .map((idx, status) { - return MapEntry(idx, Text('request number $idx - $status')); - }) - .values - .toList(), - ), - const Spacer(), - ], - ); - } - - Future fetchPost() async { - final response = await http - .get(Uri.parse('https://jsonplaceholder.typicode.com/posts/1')); - - if (response.statusCode == 200) { - // If server returns an OK response, parse the JSON. - return Post.fromJson(jsonDecode(response.body) as Map); - } else { - // If that response was not OK, throw an error. - throw Exception('Failed to load post'); - } - } - - void _complete(int idx) { - setState(() { - _requestStatuses[idx] = RequestStatus.success; - }); - } -} - -enum RequestStatus { - success, - error, -} diff --git a/packages/auto_reload/example/lib/auto_request/domain/post.dart b/packages/auto_reload/example/lib/auto_request/domain/post.dart deleted file mode 100644 index f3a35e096..000000000 --- a/packages/auto_reload/example/lib/auto_request/domain/post.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -class Post { - Post({ - this.userId, - this.id, - this.title, - this.body, - }); - - factory Post.fromJson(Map json) { - return Post( - userId: json['userId'] as int, - id: json['id'] as int, - title: json['title'] as String, - body: json['body'] as String, - ); - } - - final int? userId; - final int? id; - final String? title; - final String? body; -} diff --git a/packages/auto_reload/example/lib/main.dart b/packages/auto_reload/example/lib/main.dart deleted file mode 100644 index e545e0aff..000000000 --- a/packages/auto_reload/example/lib/main.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:counter/auto_reload/auto_reload_widget.dart'; -import 'package:counter/auto_request/auto_request_widget.dart'; -import 'package:flutter/material.dart'; - -void main() => runApp(const MyApp()); - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Auto reload Demo', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: const MyHomePage(title: 'Auto reload Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({ - required this.title, - Key? key, - }) : super(key: key); - - final String title; - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), - body: SizedBox( - width: double.infinity, - child: Column( - children: const [ - Expanded(child: DemoAutoReloadWidget()), - Expanded(child: DemoAutoRequestManager()), - ], - ), - ), - ); - } -} diff --git a/packages/auto_reload/example/pubspec.yaml b/packages/auto_reload/example/pubspec.yaml deleted file mode 100644 index 80c59cc4c..000000000 --- a/packages/auto_reload/example/pubspec.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: counter -description: A new Flutter project. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - auto_reload: - path: ../ - - flutter: - sdk: flutter - - http: ^0.13.0 - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/auto_reload/lib/auto_reload.dart b/packages/auto_reload/lib/auto_reload.dart deleted file mode 100644 index db5b6f16c..000000000 --- a/packages/auto_reload/lib/auto_reload.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:auto_reload/src/auto_reload/auto_reload_mixin.dart'; -export 'package:auto_reload/src/auto_reload/auto_reloader.dart'; -export 'package:auto_reload/src/auto_request/auto_future_manager.dart'; -export 'package:auto_reload/src/auto_request/auto_request_manager.dart'; diff --git a/packages/auto_reload/lib/src/auto_reload/auto_reload_mixin.dart b/packages/auto_reload/lib/src/auto_reload/auto_reload_mixin.dart deleted file mode 100644 index 70e668487..000000000 --- a/packages/auto_reload/lib/src/auto_reload/auto_reload_mixin.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:auto_reload/src/auto_reload/auto_reloader.dart'; - -const _defaultDuration = Duration(minutes: 5); - -/// Mixin that implements the auto-reload -/// -/// usage: -/// * apply this mixin on a class -/// * override [autoReload] -/// * call [startAutoReload] and [cancelAutoReload] -mixin AutoReloadMixin on AutoReloader { - Timer? _autoReloadTimer; - - Duration get autoReloadDuration => _defaultDuration; - - void startAutoReload() { - cancelAutoReload(); - _autoReloadTimer = Timer.periodic( - autoReloadDuration, - (_) => autoReload(), - ); - } - - void cancelAutoReload() { - _autoReloadTimer?.cancel(); - _autoReloadTimer = null; - } -} diff --git a/packages/auto_reload/lib/src/auto_reload/auto_reloader.dart b/packages/auto_reload/lib/src/auto_reload/auto_reloader.dart deleted file mode 100644 index 695f0e28b..000000000 --- a/packages/auto_reload/lib/src/auto_reload/auto_reloader.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:auto_reload/src/auto_reload/auto_reload_mixin.dart'; - -/// Class providing an opportunity to participate -/// in autoload managed by [AutoReloadMixin] -abstract class AutoReloader { - ///reloaded place here - void autoReload() {} -} diff --git a/packages/auto_reload/lib/src/auto_request/auto_future_manager.dart b/packages/auto_reload/lib/src/auto_request/auto_future_manager.dart deleted file mode 100644 index b44f34aed..000000000 --- a/packages/auto_reload/lib/src/auto_request/auto_future_manager.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// return id of success future in queue -typedef AutoFutureCallback = void Function(String id); - -/// Manager for endless replay [Future], until will not be performed -// ignore: one_member_abstracts -abstract class AutoFutureManager { - /// register [Future] to auto reload - /// - /// [id] - number of future in queue - /// [toReload] - himself future on reboot - /// [onComplete] - callback of success future, that returns id in queue - Future autoReload({ - required String id, - required Future Function() toReload, - AutoFutureCallback onComplete, - }); -} diff --git a/packages/auto_reload/lib/src/auto_request/auto_request_manager.dart b/packages/auto_reload/lib/src/auto_request/auto_request_manager.dart deleted file mode 100644 index 7db2b7d65..000000000 --- a/packages/auto_reload/lib/src/auto_request/auto_request_manager.dart +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; -import 'dart:math'; - -import 'package:auto_reload/src/auto_request/auto_future_manager.dart'; -import 'package:connectivity/connectivity.dart'; - -const _defaultMinReloadDurationSeconds = 1; -const _defaultMaxReloadDurationSeconds = 1800; - -/// Manager of automatic sending of request to the server -/// -/// each new attempt will pass through a greater amount of time -/// from [_minReloadDurationSeconds] to [_maxReloadDurationSeconds] -/// exponentially increasing -class AutoRequestManager implements AutoFutureManager { - AutoRequestManager({ - int? minReloadDurationSeconds, - int? maxReloadDurationSeconds, - }) : _minReloadDurationSeconds = - minReloadDurationSeconds ?? _defaultMinReloadDurationSeconds, - _maxReloadDurationSeconds = - maxReloadDurationSeconds ?? _defaultMaxReloadDurationSeconds { - _currentReloadDuration = _minReloadDurationSeconds; - } - - final int _minReloadDurationSeconds; - final int _maxReloadDurationSeconds; - late int _currentReloadDuration; - - final _connectivity = Connectivity(); - StreamSubscription? _connectivitySubscription; - - final _queue = Function()>{}; - final _callbacks = {}; - - Timer? _requestTimer; - - /// register request for auto reload - @override - Future autoReload({ - required String id, - required Future Function() toReload, - AutoFutureCallback? onComplete, - }) async { - _queue.putIfAbsent(id, () { - if (onComplete != null) { - _callbacks[id] = onComplete; - } - return toReload; - }); - - return _tryReload(); - } - - /// dispose, when need kill manager - Future dispose() async { - _queue.clear(); - _callbacks.clear(); - await _connectivitySubscription?.cancel(); - _requestTimer?.cancel(); - } - - Future _tryReload() async { - await _connectivity.checkConnectivity(); - _connectivitySubscription ??= - _connectivity.onConnectivityChanged.listen(_reloadRequest); - } - - void _reloadRequest(ConnectivityResult connection) { - if (!_needToReload(connection) || _requestTimer != null) { - return; - } - - _currentReloadDuration = _minReloadDurationSeconds; - - _reRunTimer(); - } - - void _reRunTimer() { - _closeTimer(); - _requestTimer = Timer.periodic( - Duration(seconds: _currentReloadDuration), - _timerHandler, - ); - - _currentReloadDuration = min( - _currentReloadDuration * 2, - _maxReloadDurationSeconds, - ); - } - - void _closeTimer() { - _requestTimer?.cancel(); - _requestTimer = null; - } - - Future _timerHandler(Timer timer) async { - final keys = _queue.keys.toList(); - for (final key in keys) { - try { - await _handleItemQueue(key); - } on Exception catch (e) { - // do nothing, the timer will restart request - // ignore: avoid_print - print('unsuccessful attempt to execute request with error: $e'); - } - } - - _queue.isEmpty ? _closeTimer() : _reRunTimer(); - } - - Future _handleItemQueue(String key) async { - final _queueValue = _queue.remove(key); - if (_queueValue != null) { - await _queueValue(); - } - - final _callbacksValue = _callbacks.remove(key); - if (_callbacksValue != null) { - _callbacksValue(key); - } - } - - bool _needToReload(ConnectivityResult connection) => - _haveConnection(connection); - - bool _haveConnection(ConnectivityResult connection) { - switch (connection) { - case ConnectivityResult.wifi: - case ConnectivityResult.mobile: - return true; - default: - return false; - } - } -} diff --git a/packages/auto_reload/pubspec.yaml b/packages/auto_reload/pubspec.yaml deleted file mode 100644 index dd43531db..000000000 --- a/packages/auto_reload/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: auto_reload -version: 1.0.1 -description: A library that helps to perform actions with some periodicity -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/auto_reload" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - connectivity: ^3.0.0 - flutter: - sdk: flutter - -dev_dependencies: - fake_async: ^1.2.0 - flutter_test: - sdk: flutter - mockito: ^5.0.0 - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" diff --git a/packages/auto_reload/test/auto_reload_mixin_test.dart b/packages/auto_reload/test/auto_reload_mixin_test.dart deleted file mode 100644 index 538d0f295..000000000 --- a/packages/auto_reload/test/auto_reload_mixin_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:auto_reload/src/auto_reload/auto_reload_mixin.dart'; -import 'package:auto_reload/src/auto_reload/auto_reloader.dart'; -import 'package:fake_async/fake_async.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; - -const testDuration = Duration(minutes: 1); -const testDurationLag = Duration(seconds: 10); - -class AutoReloaderMock extends Mock implements AutoReloader {} - -class TestAutoReloader extends AutoReloaderMock with AutoReloadMixin { - @override - Duration get autoReloadDuration => testDuration; -} - -class TestAutoReloadMixin extends AutoReloader with AutoReloadMixin {} - -void main() { - group('AutoReloadMixin', () { - test('default duraton is five minutes', () { - expect(TestAutoReloadMixin().autoReloadDuration.inMinutes, equals(5)); - }); - - group('startAutoReload', () { - late TestAutoReloader reloader; - - setUp(() { - reloader = TestAutoReloader(); - }); - - test('performs autoReload after configured timeout', () { - fakeAsync((async) { - reloader.startAutoReload(); - - async.elapse(testDuration + testDurationLag); - - verify(reloader.autoReload()); - }); - }); - test('not performs autoReload after cancelling by cancelAutoReload', () { - fakeAsync((async) { - reloader.startAutoReload(); - - async.elapse(testDuration - testDurationLag); - - reloader.cancelAutoReload(); - - async.elapse(testDuration); - - verifyNever(reloader.autoReload()); - }); - }); - }); - }); -} diff --git a/packages/bottom_navigation_bar/.gitignore b/packages/bottom_navigation_bar/.gitignore deleted file mode 100644 index 3132dc5ff..000000000 --- a/packages/bottom_navigation_bar/.gitignore +++ /dev/null @@ -1,73 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/bottom_navigation_bar/.metadata b/packages/bottom_navigation_bar/.metadata deleted file mode 100644 index 4a44ad73b..000000000 --- a/packages/bottom_navigation_bar/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 68587a0916366e9512a78df22c44163d041dd5f3 - channel: stable - -project_type: package diff --git a/packages/bottom_navigation_bar/CHANGELOG.md b/packages/bottom_navigation_bar/CHANGELOG.md deleted file mode 100644 index a0848c82b..000000000 --- a/packages/bottom_navigation_bar/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changelog - -## 1.0.1 - 2021-05-30 - -* Stable release - -## 1.0.1-dev.1 - 2021-05-24 - -* Fix `closeSelectController`. - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0`. - -## 0.0.1-dev.3 - -* Fix lint hints - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/bottom_navigation_bar/CONTRIBUTING.md b/packages/bottom_navigation_bar/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/bottom_navigation_bar/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/bottom_navigation_bar/LICENSE b/packages/bottom_navigation_bar/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/bottom_navigation_bar/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/bottom_navigation_bar/README.md b/packages/bottom_navigation_bar/README.md deleted file mode 100644 index 9bdd64d35..000000000 --- a/packages/bottom_navigation_bar/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Bottom Navigation Bar - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/bottom_navigation_bar) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=bottom_navigation_bar&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/bottom_navigation_bar?logo=dart&logoColor=white)](https://pub.dev/packages/bottom_navigation_bar) -[![Pub Likes](https://badgen.net/pub/likes/bottom_navigation_bar)](https://pub.dev/packages/bottom_navigation_bar) -[![Pub popularity](https://badgen.net/pub/popularity/bottom_navigation_bar)](https://pub.dev/packages/bottom_navigation_bar/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/bottom_navigation_bar) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Bottom navigation bar - -## Usage - -Main classes: - -1. [Bottom navigator](lib/src/bottom_navigator.dart) -2. [Bottom navigator bar](lib/src/bottom_nav_bar.dart) -3. [Type of tab](lib/src/bottom_nav_tab_type.dart) -4. [Relation between item in bar and content](lib/src/bottom_navigation_relationship.dart) - -## BottomNavigator - -Widget for simple switch content by selected item in bottom bar. -More details of using you can see in example. - -## Installation - -Add `bottom_navigation_bar` to your `pubspec.yaml` file: - -```yaml -dependencies: - bottom_navigation_bar: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/bottom_navigation_bar/analysis_options.yaml b/packages/bottom_navigation_bar/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/bottom_navigation_bar/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/bottom_navigation_bar/example/.gitignore b/packages/bottom_navigation_bar/example/.gitignore deleted file mode 100644 index 10c16abd6..000000000 --- a/packages/bottom_navigation_bar/example/.gitignore +++ /dev/null @@ -1,74 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* -**/ios/Podfile - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/bottom_navigation_bar/example/.metadata b/packages/bottom_navigation_bar/example/.metadata deleted file mode 100644 index fea404f40..000000000 --- a/packages/bottom_navigation_bar/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 68587a0916366e9512a78df22c44163d041dd5f3 - channel: stable - -project_type: app diff --git a/packages/bottom_navigation_bar/example/analysis_options.yaml b/packages/bottom_navigation_bar/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/bottom_navigation_bar/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/bottom_navigation_bar/example/android/app/build.gradle b/packages/bottom_navigation_bar/example/android/app/build.gradle deleted file mode 100644 index ddeebe670..000000000 --- a/packages/bottom_navigation_bar/example/android/app/build.gradle +++ /dev/null @@ -1,67 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/packages/bottom_navigation_bar/example/android/app/src/debug/AndroidManifest.xml b/packages/bottom_navigation_bar/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/bottom_navigation_bar/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/bottom_navigation_bar/example/android/app/src/main/AndroidManifest.xml b/packages/bottom_navigation_bar/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 287714028..000000000 --- a/packages/bottom_navigation_bar/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/packages/bottom_navigation_bar/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/bottom_navigation_bar/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e2c0fd32a..000000000 --- a/packages/bottom_navigation_bar/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.example - -import android.os.Bundle - -import io.flutter.app.FlutterActivity -import io.flutter.plugins.GeneratedPluginRegistrant - -class MainActivity: FlutterActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - GeneratedPluginRegistrant.registerWith(this) - } -} diff --git a/packages/bottom_navigation_bar/example/android/app/src/main/res/drawable/launch_background.xml b/packages/bottom_navigation_bar/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/bottom_navigation_bar/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/bottom_navigation_bar/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/android/app/src/main/res/values/styles.xml b/packages/bottom_navigation_bar/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa4417c..000000000 --- a/packages/bottom_navigation_bar/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/bottom_navigation_bar/example/android/app/src/profile/AndroidManifest.xml b/packages/bottom_navigation_bar/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/bottom_navigation_bar/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/bottom_navigation_bar/example/android/build.gradle b/packages/bottom_navigation_bar/example/android/build.gradle deleted file mode 100644 index 232bc0d67..000000000 --- a/packages/bottom_navigation_bar/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/bottom_navigation_bar/example/android/gradle.properties b/packages/bottom_navigation_bar/example/android/gradle.properties deleted file mode 100644 index 1441b1da9..000000000 --- a/packages/bottom_navigation_bar/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M - -android.enableR8=true diff --git a/packages/bottom_navigation_bar/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/bottom_navigation_bar/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 63ab3ae08..000000000 --- a/packages/bottom_navigation_bar/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/packages/bottom_navigation_bar/example/android/settings.gradle b/packages/bottom_navigation_bar/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/bottom_navigation_bar/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/bottom_navigation_bar/example/ios/Flutter/AppFrameworkInfo.plist b/packages/bottom_navigation_bar/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/bottom_navigation_bar/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/bottom_navigation_bar/example/ios/Flutter/Debug.xcconfig b/packages/bottom_navigation_bar/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/bottom_navigation_bar/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/bottom_navigation_bar/example/ios/Flutter/Release.xcconfig b/packages/bottom_navigation_bar/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/bottom_navigation_bar/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/bottom_navigation_bar/example/ios/Runner.xcodeproj/project.pbxproj b/packages/bottom_navigation_bar/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index f1159c364..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,504 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0910; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/bottom_navigation_bar/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/bottom_navigation_bar/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/bottom_navigation_bar/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/bottom_navigation_bar/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bottom_navigation_bar/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/bottom_navigation_bar/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/bottom_navigation_bar/example/ios/Runner/AppDelegate.swift b/packages/bottom_navigation_bar/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index bd77dd655..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index a91bfcd30..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "LaunchImage.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/bottom_navigation_bar/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Base.lproj/Main.storyboard b/packages/bottom_navigation_bar/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Info.plist b/packages/bottom_navigation_bar/example/ios/Runner/Info.plist deleted file mode 100644 index a060db61e..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/bottom_navigation_bar/example/ios/Runner/Runner-Bridging-Header.h b/packages/bottom_navigation_bar/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 7335fdf90..000000000 --- a/packages/bottom_navigation_bar/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" \ No newline at end of file diff --git a/packages/bottom_navigation_bar/example/lib/main.dart b/packages/bottom_navigation_bar/example/lib/main.dart deleted file mode 100644 index bf17bacc7..000000000 --- a/packages/bottom_navigation_bar/example/lib/main.dart +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:bottom_navigation_bar/bottom_navigation_bar.dart'; -import 'package:flutter/material.dart'; - -// ignore_for_file: avoid-returning-widgets - -void main() => runApp(const MyApp()); - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({ - required this.title, - Key? key, - }) : super(key: key); - final String title; - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - final _selectorController = StreamController.broadcast(); - - late List _types; - late Map _map; - - var _isCustom = true; - - @override - void initState() { - super.initState(); - - _types = const [ - BottomNavTabType(0), - BottomNavTabType(1), - BottomNavTabType(2), - ]; - - _map = { - _types[0]: BottomNavigationRelationship( - tabBuilder: () => _buildPage(const Color(0xFFFF0000)), - navElementBuilder: (isSelected) => _buildElement( - isSelected, - const Color(0x55FF0000), - ), - ), - _types[1]: BottomNavigationRelationship( - tabBuilder: () => _buildPage(const Color(0xFF00FF00)), - navElementBuilder: (isSelected) => _buildElement( - isSelected, - const Color(0x5500FF00), - ), - ), - _types[2]: BottomNavigationRelationship( - tabBuilder: () => _buildPage(const Color(0xFF0000FF)), - navElementBuilder: (isSelected) => _buildElement( - isSelected, - const Color(0x550000FF), - ), - ), - }; - - // ignore: avoid_print - _selectorController.stream.listen((type) => print(type.value)); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Container( - child: - _isCustom ? _buildBottomNavigator() : _buildCustomBottomNavigator(), - ), - ); - } - - BottomNavigator _buildBottomNavigator() { - return BottomNavigator( - key: UniqueKey(), - initialTab: _types[0], - tabsMap: _map, - selectController: _selectorController, - ); - } - - BottomNavigator _buildCustomBottomNavigator() { - return BottomNavigator.custom( - key: UniqueKey(), - tabsMap: _map, - initialTab: _types[0], - bottomNavBar: _buildNavBar(), - selectController: _selectorController, - ); - } - - Widget _buildPage(Color color) { - return Container( - color: color, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - TextButton( - onPressed: () { - setState( - () { - _isCustom = !_isCustom; - }, - ); - }, - style: ButtonStyle( - backgroundColor: MaterialStateProperty.all(Colors.white), - ), - child: const Text('Change mode'), - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - _buildChangeButton(0), - _buildChangeButton(1), - _buildChangeButton(2), - ], - ), - ], - ), - ); - } - - Widget _buildChangeButton(int value) { - return TextButton( - onPressed: () { - _selectorController.sink.add(_types[value]); - }, - style: ButtonStyle( - backgroundColor: MaterialStateProperty.all(Colors.white), - ), - child: Text(value.toString()), - ); - } - - Widget _buildElement(bool isSelected, Color color) { - return Container( - height: 100, - color: color, - child: isSelected ? const Center(child: Icon(Icons.check)) : Container(), - ); - } - - Widget _buildCustomElement(bool isSelected, Color color) { - return Container( - decoration: BoxDecoration( - color: color, - borderRadius: const BorderRadius.all(Radius.circular(50)), - ), - height: 100, - child: isSelected ? const Center(child: Icon(Icons.check)) : Container(), - ); - } - - BottomNavBar _buildNavBar() { - return BottomNavBar( - elements: { - _types[0]: (isSelected) => _buildCustomElement( - isSelected, - const Color(0x55FF0000), - ), - _types[1]: (isSelected) => _buildCustomElement( - isSelected, - const Color(0x5500FF00), - ), - _types[2]: (isSelected) => _buildCustomElement( - isSelected, - const Color(0x550000FF), - ), - }, - initType: _types[0], - selectedController: _selectorController, - ); - } - - @override - void dispose() { - _selectorController.close(); - - super.dispose(); - } -} diff --git a/packages/bottom_navigation_bar/example/pubspec.yaml b/packages/bottom_navigation_bar/example/pubspec.yaml deleted file mode 100644 index 0fb78d886..000000000 --- a/packages/bottom_navigation_bar/example/pubspec.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: example -description: Example of application with bottom navigation bar -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - bottom_navigation_bar: - path: ../ - flutter: - sdk: flutter - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/bottom_navigation_bar/lib/bottom_navigation_bar.dart b/packages/bottom_navigation_bar/lib/bottom_navigation_bar.dart deleted file mode 100644 index fe1ce2039..000000000 --- a/packages/bottom_navigation_bar/lib/bottom_navigation_bar.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:bottom_navigation_bar/src/bottom_nav_bar.dart'; -export 'package:bottom_navigation_bar/src/bottom_nav_tab_type.dart'; -export 'package:bottom_navigation_bar/src/bottom_navigation_relationship.dart'; -export 'package:bottom_navigation_bar/src/bottom_navigator.dart'; diff --git a/packages/bottom_navigation_bar/lib/src/bottom_nav_bar.dart b/packages/bottom_navigation_bar/lib/src/bottom_nav_bar.dart deleted file mode 100644 index 80795780a..000000000 --- a/packages/bottom_navigation_bar/lib/src/bottom_nav_bar.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:bottom_navigation_bar/bottom_navigation_bar.dart'; -import 'package:flutter/material.dart'; - -typedef NavElementBuilder = Widget Function(bool isSelected); - -/// Bottom navigation bar widget. -class BottomNavBar extends StatefulWidget { - const BottomNavBar({ - required this.selectedController, - required this.initType, - required this.elements, - Key? key, - }) : super(key: key); - - final BottomNavTabType initType; - final Map elements; - final StreamController selectedController; - - @override - _BottomNavBarState createState() => _BottomNavBarState(); -} - -class _BottomNavBarState extends State { - late BottomNavTabType _currentType; - late StreamSubscription _outerSubscription; - - @override - void initState() { - super.initState(); - - _currentType = widget.initType; - _outerSubscription = - widget.selectedController.stream.listen(_onSelectedChanged); - } - - @override - Widget build(BuildContext context) { - return Row(children: [ - for (final entry in widget.elements.entries) - Expanded( - child: InkWell( - onTap: () => _updateSelected(entry.key), - child: entry.value(entry.key == _currentType), - ), - ), - ]); - } - - void _onSelectedChanged(BottomNavTabType event) { - if (event != _currentType) { - setState(() { - _currentType = event; - }); - } - } - - void _updateSelected(BottomNavTabType newSelected) { - if (newSelected != _currentType) { - setState(() { - _currentType = newSelected; - widget.selectedController.sink.add(newSelected); - }); - } - } - - @override - void dispose() { - _outerSubscription.cancel(); - - super.dispose(); - } -} diff --git a/packages/bottom_navigation_bar/lib/src/bottom_nav_tab_type.dart b/packages/bottom_navigation_bar/lib/src/bottom_nav_tab_type.dart deleted file mode 100644 index 2f8b87862..000000000 --- a/packages/bottom_navigation_bar/lib/src/bottom_nav_tab_type.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:tabnavigator/tabnavigator.dart'; - -/// Type of a list of tabs -class BottomNavTabType extends TabType { - const BottomNavTabType(int value) : super(value); -} diff --git a/packages/bottom_navigation_bar/lib/src/bottom_navigation_relationship.dart b/packages/bottom_navigation_bar/lib/src/bottom_navigation_relationship.dart deleted file mode 100644 index 2278d63ca..000000000 --- a/packages/bottom_navigation_bar/lib/src/bottom_navigation_relationship.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:bottom_navigation_bar/src/bottom_nav_bar.dart'; -import 'package:flutter/foundation.dart'; -import 'package:tabnavigator/tabnavigator.dart'; - -/// Class describes relations between navigation widget and content widget. -@immutable -class BottomNavigationRelationship { - const BottomNavigationRelationship({ - required this.tabBuilder, - required this.navElementBuilder, - }); - - final TabBuilder tabBuilder; - final NavElementBuilder navElementBuilder; -} diff --git a/packages/bottom_navigation_bar/lib/src/bottom_navigator.dart b/packages/bottom_navigation_bar/lib/src/bottom_navigator.dart deleted file mode 100644 index 07c182aaa..000000000 --- a/packages/bottom_navigation_bar/lib/src/bottom_navigator.dart +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:bottom_navigation_bar/src/bottom_nav_bar.dart'; -import 'package:bottom_navigation_bar/src/bottom_nav_tab_type.dart'; -import 'package:bottom_navigation_bar/src/bottom_navigation_relationship.dart'; -import 'package:flutter/material.dart'; -import 'package:tabnavigator/tabnavigator.dart'; - -// ignore_for_file: avoid-returning-widgets - -/// Widget that display element by item currently selected in bottom bar. -class BottomNavigator extends StatefulWidget { - const BottomNavigator({ - required this.tabsMap, - required this.initialTab, - Key? key, - this.selectController, - }) : bottomNavBar = null, - super(key: key); - - /// In this case bottom navigation bar will be custom, - /// and BottomNavigationRelationship.navElementBuilder will not be called. - /// Also outer selector should be given into custom bottom navigation bar - /// bypass bottom navigator. - const BottomNavigator.custom({ - required this.tabsMap, - required this.initialTab, - required this.bottomNavBar, - required this.selectController, - Key? key, - }) : super(key: key); - - final Map tabsMap; - final BottomNavTabType initialTab; - final StreamController? selectController; - - final BottomNavBar? bottomNavBar; - - @override - _BaseBottomNavigatorState createState() => - // ignore: no_logic_in_create_state - bottomNavBar == null - ? _BottomNavigatorState() - : _CustomBottomNavigatorState(); -} - -class _CustomBottomNavigatorState extends _BaseBottomNavigatorState { - @override - BottomNavBar buildBottomBar() { - return widget.bottomNavBar!; - } - - @override - StreamController initSelectController() { - return widget.selectController ?? - StreamController.broadcast(); - } - - @override - void closeSelectController() { - widget.selectController?.close(); - } -} - -class _BottomNavigatorState extends _BaseBottomNavigatorState { - bool _isControllerOwner = false; - - final _bottomMap = {}; - - @override - void initState() { - super.initState(); - - widget.tabsMap.forEach((tabType, relationship) { - _bottomMap - .addEntries([MapEntry(tabType, relationship.navElementBuilder)]); - }); - } - - @override - StreamController initSelectController() { - if (widget.selectController != null) { - _selectController = widget.selectController!; - } else { - _isControllerOwner = true; - _selectController = StreamController.broadcast(); - } - - return _selectController; - } - - @override - void closeSelectController() { - if (_isControllerOwner) { - _selectController.close(); - } - } - - @override - BottomNavBar buildBottomBar() { - return BottomNavBar( - initType: widget.initialTab, - selectedController: _selectController, - elements: _bottomMap, - ); - } -} - -abstract class _BaseBottomNavigatorState extends State { - @protected - late StreamController _selectController; - - final _navigatorMap = {}; - - @override - void initState() { - super.initState(); - - _selectController = initSelectController()..add(widget.initialTab); - - _navigatorMap.addAll( - widget.tabsMap.map((key, value) => MapEntry(key, value.tabBuilder)), - ); - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Expanded( - child: TabNavigator( - initialTab: widget.initialTab, - selectedTabStream: _selectController.stream, - mappedTabs: _navigatorMap, - ), - ), - buildBottomBar(), - ], - ); - } - - @protected - StreamController initSelectController(); - - @protected - void closeSelectController(); - - @protected - BottomNavBar buildBottomBar(); - - @override - void dispose() { - closeSelectController(); - - super.dispose(); - } -} diff --git a/packages/bottom_navigation_bar/pubspec.yaml b/packages/bottom_navigation_bar/pubspec.yaml deleted file mode 100644 index 951827fbb..000000000 --- a/packages/bottom_navigation_bar/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: bottom_navigation_bar -version: 1.0.1 -description: Widget for simple switch content by selected item in bottom bar -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/bottom_navigation_bar" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - tabnavigator: ^1.0.0 - -dev_dependencies: - flutter_test: - sdk: flutter - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: diff --git a/packages/bottom_navigation_bar/test/bottom_navigation_bar_test.dart b/packages/bottom_navigation_bar/test/bottom_navigation_bar_test.dart deleted file mode 100644 index 8ab81275c..000000000 --- a/packages/bottom_navigation_bar/test/bottom_navigation_bar_test.dart +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:bottom_navigation_bar/src/bottom_nav_tab_type.dart'; -import 'package:bottom_navigation_bar/src/bottom_navigation_relationship.dart'; -import 'package:bottom_navigation_bar/src/bottom_navigator.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -const _greenKey = Key('greenButton'); -const _redKey = Key('redButton'); -const _blueKey = Key('blueButton'); - -const _types = [ - BottomNavTabType(0), - BottomNavTabType(1), - BottomNavTabType(2), -]; - -final _map = { - _types[0]: BottomNavigationRelationship( - tabBuilder: () => const SizedBox(child: Text('Red')), - navElementBuilder: (isSelected) => _buildButton( - _redKey, - isSelected, - const Color(0x55FF0000), - ), - ), - _types[1]: BottomNavigationRelationship( - tabBuilder: () => const SizedBox(child: Text('Green')), - navElementBuilder: (isSelected) => _buildButton( - _greenKey, - isSelected, - const Color(0x5500FF00), - ), - ), - _types[2]: BottomNavigationRelationship( - tabBuilder: () => const SizedBox(child: Text('Blue')), - navElementBuilder: (isSelected) => _buildButton( - _blueKey, - isSelected, - const Color(0x550000FF), - ), - ), -}; - -// ignore: avoid-returning-widgets -Widget _buildButton(Key key, bool isSelected, Color color) { - return Container( - key: key, - height: 100, - color: color, - child: isSelected ? const Center(child: Icon(Icons.check)) : Container(), - ); -} - -void main() { - testWidgets('Red tap', (tester) async { - await _buttonTest(_redKey, 'Red', tester); - }); - - testWidgets('Green tap', (tester) async { - await _buttonTest(_greenKey, 'Green', tester); - }); - - testWidgets('Blue tap', (tester) async { - await _buttonTest(_blueKey, 'Blue', tester); - }); - - testWidgets('Outer action', (tester) async { - final sc = StreamController.broadcast(); - - await tester.pumpWidget(MaterialApp( - home: Scaffold( - body: BottomNavigator( - initialTab: _types[0], - tabsMap: _map, - selectController: sc, - ), - ), - )); - - sc.sink.add(_types[2]); - - await tester.pump(); - - expect(find.text('Blue'), findsOneWidget); - - // ignore: unawaited_futures - sc.close(); - }); -} - -Future _buttonTest(Key key, String result, WidgetTester tester) async { - await tester.pumpWidget(MaterialApp( - home: Scaffold( - body: BottomNavigator( - initialTab: _types[0], - tabsMap: _map, - selectController: StreamController.broadcast(), - ), - ), - )); - - await tester.tap(find.byKey(key).first); - - await tester.pump(); - - expect(find.text(result), findsOneWidget); -} diff --git a/packages/bottom_sheet/.gitignore b/packages/bottom_sheet/.gitignore deleted file mode 100644 index 3132dc5ff..000000000 --- a/packages/bottom_sheet/.gitignore +++ /dev/null @@ -1,73 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/bottom_sheet/.metadata b/packages/bottom_sheet/.metadata deleted file mode 100644 index 4a44ad73b..000000000 --- a/packages/bottom_sheet/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 68587a0916366e9512a78df22c44163d041dd5f3 - channel: stable - -project_type: package diff --git a/packages/bottom_sheet/CHANGELOG.md b/packages/bottom_sheet/CHANGELOG.md deleted file mode 100644 index 13cb0fec7..000000000 --- a/packages/bottom_sheet/CHANGELOG.md +++ /dev/null @@ -1,25 +0,0 @@ -# Changelog - -## 1.0.1 - 2021-06-01 - -* Stable release - -## 1.0.1-dev.2 - 2021-05-29 - -* Remove animation listeners. - -## 1.0.1-dev.1 - 2021-05-24 - -* Apply new lint rules. - -## 1.0.0 - -* Migrate this package to null safety. - -## 0.0.1-dev.3 - -* Fix lint hints - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/bottom_sheet/CONTRIBUTING.md b/packages/bottom_sheet/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/bottom_sheet/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/bottom_sheet/LICENSE b/packages/bottom_sheet/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/bottom_sheet/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/bottom_sheet/README.md b/packages/bottom_sheet/README.md deleted file mode 100644 index 140933e4f..000000000 --- a/packages/bottom_sheet/README.md +++ /dev/null @@ -1,130 +0,0 @@ -# Bottom Sheet - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/bottom_sheet) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=bottom_sheet&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/bottom_sheet?logo=dart&logoColor=white)](https://pub.dev/packages/bottom_sheet) -[![Pub Likes](https://badgen.net/pub/likes/bottom_sheet)](https://pub.dev/packages/bottom_sheet) -[![Pub popularity](https://badgen.net/pub/popularity/bottom_sheet)](https://pub.dev/packages/bottom_sheet/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/bottom_sheet) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Custom bottom sheet widget, that can resize by drag and then scroll. - -## Usage - -Main classes: - -1. [FlexibleBottomSheetController](lib/src/flexible_bottom_sheet_controller.dart) -2. [FlexibleBottomSheetOwner](lib/src/flexible_bottom_sheet_owner.dart) -3. [BottomSheetRoute and Showing methods](lib/src/flexible_bottom_sheet_route.dart) - -Flexible and scrollable bottom sheet. - -You can show it if call `showFlexibleBottomSheet()`, then it will be show as popup like a modal bottom sheet with resize by drag and scrollable. - -Also you can use `FlexibleBottomSheetController` to show it. For this call you must create `FlexibleBottomSheetController` and give to controller. - -There are 2 type of BottomSheet: - -1. BottomSheet -2. StickyBottomSheet - -#### Simple BottomSheet - -![](media/bs1.gif) - -To show bottomSheet, use : - -```dart -showFlexibleBottomSheet( - minHeight: 0, - initHeight: 0.5, - maxHeight: 1, - context: context, - builder: _buildBottomSheet, - anchors: [0, 0.5, 1], -); - -Widget _buildBottomSheet( - BuildContext context, - ScrollController scrollController, - double bottomSheetOffset, - ) { - return SafeArea( - child: Material( - child: Container( - child: ListView( - ... - ), - ), - ), - ); - } -``` - -#### Sticky BottomSheet - -![](media/bs2.gif) - -To show sticky BottomSheet, use: -**You should return SliverChildListDelegate from builder !!!** - -```dart -showStickyFlexibleBottomSheet( - minHeight: 0, - initHeight: 0.5, - maxHeight: 1, - headerHeight: 200, - context: context, - backgroundColor: Colors.white, - headerBuilder: (BuildContext context, double offset) { - return Container( - ... - ); - }, - builder: (BuildContext context, double offset) { - return SliverChildListDelegate( - [...], - ); - }, - anchors: [0, 0.5, 1], - ); -``` - -## Installation - -Add `bottom_sheet` to your `pubspec.yaml` file: - -```yaml -dependencies: - bottom_sheet: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/bottom_sheet/analysis_options.yaml b/packages/bottom_sheet/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/bottom_sheet/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/bottom_sheet/example/.gitignore b/packages/bottom_sheet/example/.gitignore deleted file mode 100644 index 10c16abd6..000000000 --- a/packages/bottom_sheet/example/.gitignore +++ /dev/null @@ -1,74 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* -**/ios/Podfile - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/bottom_sheet/example/.metadata b/packages/bottom_sheet/example/.metadata deleted file mode 100644 index fea404f40..000000000 --- a/packages/bottom_sheet/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 68587a0916366e9512a78df22c44163d041dd5f3 - channel: stable - -project_type: app diff --git a/packages/bottom_sheet/example/analysis_options.yaml b/packages/bottom_sheet/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/bottom_sheet/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/bottom_sheet/example/android/app/build.gradle b/packages/bottom_sheet/example/android/app/build.gradle deleted file mode 100644 index ddeebe670..000000000 --- a/packages/bottom_sheet/example/android/app/build.gradle +++ /dev/null @@ -1,67 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/packages/bottom_sheet/example/android/app/src/debug/AndroidManifest.xml b/packages/bottom_sheet/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/bottom_sheet/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/bottom_sheet/example/android/app/src/main/AndroidManifest.xml b/packages/bottom_sheet/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 287714028..000000000 --- a/packages/bottom_sheet/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/packages/bottom_sheet/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/bottom_sheet/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e2c0fd32a..000000000 --- a/packages/bottom_sheet/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.example - -import android.os.Bundle - -import io.flutter.app.FlutterActivity -import io.flutter.plugins.GeneratedPluginRegistrant - -class MainActivity: FlutterActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - GeneratedPluginRegistrant.registerWith(this) - } -} diff --git a/packages/bottom_sheet/example/android/app/src/main/res/drawable/launch_background.xml b/packages/bottom_sheet/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/bottom_sheet/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/bottom_sheet/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/bottom_sheet/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/bottom_sheet/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/bottom_sheet/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/bottom_sheet/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/bottom_sheet/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/bottom_sheet/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/bottom_sheet/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/bottom_sheet/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/bottom_sheet/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/bottom_sheet/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/bottom_sheet/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/bottom_sheet/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/bottom_sheet/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/bottom_sheet/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/bottom_sheet/example/android/app/src/main/res/values/styles.xml b/packages/bottom_sheet/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa4417c..000000000 --- a/packages/bottom_sheet/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/bottom_sheet/example/android/app/src/profile/AndroidManifest.xml b/packages/bottom_sheet/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/bottom_sheet/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/bottom_sheet/example/android/build.gradle b/packages/bottom_sheet/example/android/build.gradle deleted file mode 100644 index 232bc0d67..000000000 --- a/packages/bottom_sheet/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/bottom_sheet/example/android/gradle.properties b/packages/bottom_sheet/example/android/gradle.properties deleted file mode 100644 index 7be3d8b46..000000000 --- a/packages/bottom_sheet/example/android/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true diff --git a/packages/bottom_sheet/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/bottom_sheet/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 63ab3ae08..000000000 --- a/packages/bottom_sheet/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/packages/bottom_sheet/example/android/settings.gradle b/packages/bottom_sheet/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/bottom_sheet/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/bottom_sheet/example/ios/Flutter/AppFrameworkInfo.plist b/packages/bottom_sheet/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/bottom_sheet/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/bottom_sheet/example/ios/Flutter/Debug.xcconfig b/packages/bottom_sheet/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/bottom_sheet/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/bottom_sheet/example/ios/Flutter/Release.xcconfig b/packages/bottom_sheet/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/bottom_sheet/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/bottom_sheet/example/ios/Runner.xcodeproj/project.pbxproj b/packages/bottom_sheet/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index f1159c364..000000000 --- a/packages/bottom_sheet/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,504 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0910; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/bottom_sheet/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/bottom_sheet/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/bottom_sheet/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/bottom_sheet/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/bottom_sheet/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/bottom_sheet/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bottom_sheet/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/bottom_sheet/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/bottom_sheet/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/bottom_sheet/example/ios/Runner/AppDelegate.swift b/packages/bottom_sheet/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/bottom_sheet/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index bd77dd655..000000000 --- a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index a91bfcd30..000000000 --- a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "LaunchImage.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/bottom_sheet/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/bottom_sheet/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/bottom_sheet/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/bottom_sheet/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bottom_sheet/example/ios/Runner/Base.lproj/Main.storyboard b/packages/bottom_sheet/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/bottom_sheet/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bottom_sheet/example/ios/Runner/Info.plist b/packages/bottom_sheet/example/ios/Runner/Info.plist deleted file mode 100644 index a060db61e..000000000 --- a/packages/bottom_sheet/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/bottom_sheet/example/ios/Runner/Runner-Bridging-Header.h b/packages/bottom_sheet/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 7335fdf90..000000000 --- a/packages/bottom_sheet/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" \ No newline at end of file diff --git a/packages/bottom_sheet/example/lib/main.dart b/packages/bottom_sheet/example/lib/main.dart deleted file mode 100644 index 07b330f4f..000000000 --- a/packages/bottom_sheet/example/lib/main.dart +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:bottom_sheet/bottom_sheet.dart'; -import 'package:flutter/material.dart'; - -// ignore_for_file: avoid-returning-widgets - -void main() => runApp(const MyApp()); - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({ - required this.title, - Key? key, - }) : super(key: key); - - final String title; - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - body: Center( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - ElevatedButton( - onPressed: _showSheet, - child: const Text('Open BottomSheet'), - ), - const SizedBox(height: 20), - ElevatedButton( - onPressed: _showSheetWithoutList, - child: const Text('Open StickyBottomSheet'), - ), - ], - ), - ), - ); - } - - void _showSheet() { - showFlexibleBottomSheet( - minHeight: 0, - initHeight: 0.5, - maxHeight: 1, - context: context, - builder: _buildBottomSheet, - anchors: [0, 0.5, 1], - ); - } - - void _showSheetWithoutList() { - showStickyFlexibleBottomSheet( - minHeight: 0, - initHeight: 0.5, - maxHeight: .8, - headerHeight: 200, - context: context, - decoration: const BoxDecoration( - color: Colors.teal, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(40.0), - topRight: Radius.circular(40.0), - ), - ), - headerBuilder: (context, offset) { - return AnimatedContainer( - duration: const Duration(milliseconds: 300), - width: double.infinity, - height: 200, - decoration: BoxDecoration( - color: Colors.green, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(offset == 0.8 ? 0 : 40), - topRight: Radius.circular(offset == 0.8 ? 0 : 40), - ), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Center( - child: Text( - 'Header', - style: Theme.of(context).textTheme.headline4, - ), - ), - ), - Text( - 'position $offset', - style: Theme.of(context).textTheme.headline6, - ), - ], - ), - ); - }, - builder: (context, offset) { - return SliverChildListDelegate( - _getChildren(offset, isShowPosition: false), - ); - }, - anchors: [.2, 0.5, .8], - ); - } - - List _getChildren( - double bottomSheetOffset, { - required bool isShowPosition, - }) => - [ - if (isShowPosition) - Text( - 'position $bottomSheetOffset', - style: Theme.of(context).textTheme.headline6, - ), - _buildTextField(), - _testContainer(const Color(0xEEFFFF00)), - _buildTextField(), - _testContainer(const Color(0xDD99FF00)), - _buildTextField(), - _testContainer(const Color(0xCC00FFFF)), - _buildTextField(), - _testContainer(const Color(0xBB555555)), - _buildTextField(), - _testContainer(const Color(0xAAFF5555)), - _buildTextField(), - _testContainer(const Color(0x9900FF00)), - _buildTextField(), - _testContainer(const Color(0x8800FF00)), - _buildTextField(), - _testContainer(const Color(0x7700FF00)), - _buildTextField(), - ]; - - Widget _testContainer(Color color) { - return Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - height: 100, - color: color, - ), - ); - } - - Widget _buildBottomSheet( - BuildContext context, - ScrollController scrollController, - double bottomSheetOffset, - ) { - return SafeArea( - child: Material( - child: Container( - decoration: const BoxDecoration( - color: Color(0xFFFFFFFF), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(16), - topRight: Radius.circular(16), - ), - ), - child: ListView( - padding: EdgeInsets.zero, - controller: scrollController, - children: _getChildren(bottomSheetOffset, isShowPosition: true), - ), - ), - ), - ); - } - - Widget _buildTextField() => const TextField( - decoration: InputDecoration( - border: InputBorder.none, - hintText: 'Enter a search term', - ), - ); -} diff --git a/packages/bottom_sheet/example/pubspec.yaml b/packages/bottom_sheet/example/pubspec.yaml deleted file mode 100644 index cc9709d73..000000000 --- a/packages/bottom_sheet/example/pubspec.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: example -description: Example using bottom sheet. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - bottom_sheet: - path: ../ - - flutter: - sdk: flutter - - rxdart: ^0.27.0 - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/bottom_sheet/lib/bottom_sheet.dart b/packages/bottom_sheet/lib/bottom_sheet.dart deleted file mode 100644 index 9976cfb8f..000000000 --- a/packages/bottom_sheet/lib/bottom_sheet.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -library bottom_sheet; - -export 'package:bottom_sheet/src/flexible_bottom_sheet.dart'; -export 'package:bottom_sheet/src/flexible_bottom_sheet_controller.dart'; -export 'package:bottom_sheet/src/flexible_bottom_sheet_header_delegate.dart'; -export 'package:bottom_sheet/src/flexible_bottom_sheet_owner.dart'; -export 'package:bottom_sheet/src/flexible_bottom_sheet_route.dart'; -export 'package:bottom_sheet/src/widgets/flexible_draggable_scrollable_sheet.dart'; diff --git a/packages/bottom_sheet/lib/src/flexible_bottom_sheet.dart b/packages/bottom_sheet/lib/src/flexible_bottom_sheet.dart deleted file mode 100644 index 4de33cca0..000000000 --- a/packages/bottom_sheet/lib/src/flexible_bottom_sheet.dart +++ /dev/null @@ -1,423 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:bottom_sheet/src/flexible_bottom_sheet_header_delegate.dart'; -import 'package:bottom_sheet/src/widgets/flexible_bottom_sheet_scroll_notifyer.dart'; -import 'package:bottom_sheet/src/widgets/flexible_draggable_scrollable_sheet.dart'; -import 'package:flutter/material.dart'; - -/// Flexible and scrollable bottom sheet. -/// -/// This bottom sheet resizing between min and max size, and when size become -/// max start scrolling content. Reduction size available when content -/// scrolled to 0 offset. -/// -/// [minHeight], [maxHeight] are limits of -/// bounds this widget. For example: -/// - you can set [maxHeight] to 1; -/// - you can set [minHeight] to 0.5; -/// -/// [isCollapsible] make possible collapse widget and remove from the screen, -/// but you must be carefully to use it, set it to true only if you show this -/// widget with like showFlexibleBottomSheet() case, because it will be removed -/// by Navigator.pop(). If you set [isCollapsible] true, [minHeight] -/// must be 0. -/// -/// The [animationController] that controls the bottom sheet's entrance and -/// exit animations. -/// The FlexibleBottomSheet widget will manipulate the position of this -/// animation, it is not just a passive observer. -/// -/// [initHeight] - relevant height for init bottom sheet -class FlexibleBottomSheet extends StatefulWidget { - const FlexibleBottomSheet({ - Key? key, - this.minHeight = 0, - this.initHeight = 0.5, - this.maxHeight = 1, - this.builder, - this.headerBuilder, - this.bodyBuilder, - this.isCollapsible = false, - this.isExpand = true, - this.animationController, - this.anchors, - this.minHeaderHeight, - this.maxHeaderHeight, - this.decoration, - this.onDismiss, - }) : assert(minHeight >= 0 && minHeight <= 1), - assert(maxHeight > 0 && maxHeight <= 1), - assert(maxHeight > minHeight), - assert(!isCollapsible || minHeight == 0), - super(key: key); - - const FlexibleBottomSheet.collapsible({ - Key? key, - double initHeight = 0.5, - double maxHeight = 1, - FlexibleDraggableScrollableWidgetBuilder? builder, - FlexibleDraggableScrollableHeaderWidgetBuilder? headerBuilder, - FlexibleDraggableScrollableWidgetBodyBuilder? bodyBuilder, - bool isExpand = true, - AnimationController? animationController, - List? anchors, - double? minHeaderHeight, - double? maxHeaderHeight, - Decoration? decoration, - }) : this( - key: key, - maxHeight: maxHeight, - builder: builder, - headerBuilder: headerBuilder, - bodyBuilder: bodyBuilder, - minHeight: 0, - initHeight: initHeight, - isCollapsible: true, - isExpand: isExpand, - animationController: animationController, - anchors: anchors, - minHeaderHeight: minHeaderHeight, - maxHeaderHeight: maxHeaderHeight, - decoration: decoration, - ); - - final double minHeight; - final double initHeight; - final double maxHeight; - final FlexibleDraggableScrollableWidgetBuilder? builder; - final FlexibleDraggableScrollableHeaderWidgetBuilder? headerBuilder; - final FlexibleDraggableScrollableWidgetBodyBuilder? bodyBuilder; - final bool isCollapsible; - final bool isExpand; - final AnimationController? animationController; - final List? anchors; - final double? minHeaderHeight; - final double? maxHeaderHeight; - final Decoration? decoration; - final VoidCallback? onDismiss; - - @override - _FlexibleBottomSheetState createState() => _FlexibleBottomSheetState(); -} - -class _FlexibleBottomSheetState extends State - with SingleTickerProviderStateMixin { - bool _isClosing = false; - - late AnimationController _animationController; - final _topOffsetTween = Tween(); - - late double _currentAnchor; - - late FlexibleDraggableScrollableSheetScrollController _controller; - - late Animation _topTweenAnimation; - late VoidCallback _animationListener; - late void Function(AnimationStatus) _statusListener; - - bool _isKeyboardOpenedNotified = false; - bool _isKeyboardClosedNotified = false; - - double get _currentExtent => _controller.extent.currentExtent; - - @override - void initState() { - super.initState(); - - _currentAnchor = widget.initHeight; - - _animationController = AnimationController( - duration: const Duration(milliseconds: 200), - vsync: this, - ); - final curve = CurvedAnimation( - parent: _animationController, - curve: Curves.linear, - ); - _topTweenAnimation = _topOffsetTween.animate(curve); - _statusListener = (status) { - if (status == AnimationStatus.completed) { - _controller.extent.currentExtent = _currentAnchor; - _animationController.reset(); - } - }; - _animationListener = () { - if (_animationController.isAnimating) { - _controller.extent.currentExtent = _topTweenAnimation.value; - } - }; - _topTweenAnimation - ..addListener(_animationListener) - ..addStatusListener(_statusListener); - } - - @override - Widget build(BuildContext context) { - _checkKeyboard(); - - return FlexibleScrollNotifyer( - scrollStartCallback: _startScroll, - scrollingCallback: _scrolling, - scrollEndCallback: _endScroll, - child: FlexibleDraggableScrollableSheet( - maxChildSize: widget.maxHeight, - minChildSize: widget.minHeight, - initialChildSize: widget.initHeight, - builder: ( - context, - controller, - ) { - _controller = - controller as FlexibleDraggableScrollableSheetScrollController; - - return AnimatedPadding( - duration: const Duration(milliseconds: 100), - padding: EdgeInsets.only( - bottom: MediaQuery.of(context).viewInsets.bottom, - ), - child: _buildContent(context), - ); - }, - expand: widget.isExpand, - ), - ); - } - - // ignore: avoid-returning-widgets - Widget _buildContent(BuildContext context) { - if (widget.builder != null) { - return widget.builder!( - context, - _controller, - _controller.extent.currentExtent, - ); - } - - return Material( - type: MaterialType.transparency, - child: Container( - decoration: widget.decoration, - child: CustomScrollView( - controller: _controller, - slivers: [ - if (widget.headerBuilder != null) - SliverPersistentHeader( - pinned: true, - delegate: FlexibleBottomSheetHeaderDelegate( - minHeight: widget.minHeaderHeight ?? 0.0, - maxHeight: widget.maxHeaderHeight ?? 1.0, - child: widget.headerBuilder!(context, _currentExtent), - ), - ), - if (widget.bodyBuilder != null) - SliverList( - delegate: widget.bodyBuilder!( - context, - _currentExtent, - ), - ), - ], - ), - ), - ); - } - - @override - void dispose() { - _animationController.dispose(); - _topTweenAnimation - ..removeListener(_animationListener) - ..removeStatusListener(_statusListener); - - super.dispose(); - } - - void _checkKeyboard() { - if (MediaQuery.of(context).viewInsets.bottom != 0) { - if (!_isKeyboardOpenedNotified) { - _isKeyboardOpenedNotified = true; - _isKeyboardClosedNotified = false; - _keyboardOpened(); - } - } else { - if (_isKeyboardOpenedNotified && !_isKeyboardClosedNotified) { - _isKeyboardClosedNotified = true; - _isKeyboardOpenedNotified = false; - _keyboardClosed(); - } - } - } - - void _keyboardOpened() { - final maxBottomSheetHeight = widget.maxHeight; - - _currentAnchor = maxBottomSheetHeight; - _animateToNextAnchor(maxBottomSheetHeight); - if (_currentAnchor == widget.maxHeight) { - _preScroll(); - } - } - - void _keyboardClosed() {} - - void _preScroll() { - if (FocusManager.instance.primaryFocus == null) return; - - final keyboardHeight = MediaQuery.of(context).viewInsets.bottom; - - if (_controller.extent.currentExtent == widget.maxHeight && - keyboardHeight != 0) { - final widgetOffset = FocusManager.instance.primaryFocus!.offset.dy; - final widgetHeight = FocusManager.instance.primaryFocus!.size.height; - final screenHeight = MediaQuery.of(context).size.height; - - final valueToScroll = - keyboardHeight - (screenHeight - (widgetOffset + widgetHeight)); - if (valueToScroll > 0) { - Future.delayed(const Duration(milliseconds: 100)).then((_) { - _controller.animateTo( - _controller.offset + valueToScroll + 10, - duration: const Duration(milliseconds: 200), - curve: Curves.linear, - ); - }); - } - } - } - - bool _startScroll(ScrollStartNotification notification) { - return false; - } - - bool _scrolling(FlexibleDraggableScrollableNotification notification) { - if (_isClosing) return false; - - if (widget.isCollapsible && !_isClosing) { - if (notification.extent == widget.minHeight) { - setState(() { - _isClosing = true; - _dismiss(); - }); - } - } - - final currentVal = notification.extent; - var initVal = notification.initialExtent; - - if (initVal == 0) { - initVal = currentVal; - } - - if (widget.animationController != null) { - widget.animationController!.value = - (1 + (currentVal - initVal) / initVal).clamp(0.0, 1.0); - } - - _checkNeedCloseBottomSheet(); - - return false; - } - - bool _endScroll(ScrollEndNotification notification) { - if (widget.anchors?.isNotEmpty ?? false) { - _scrollToNearestAnchor(notification.dragDetails); - } - - _checkNeedCloseBottomSheet(); - - return false; - } - - void _checkNeedCloseBottomSheet() { - if (_controller.extent.currentExtent <= widget.minHeight && !_isClosing) { - _isClosing = true; - _dismiss(); - } - } - - void _scrollToNearestAnchor(DragEndDetails? oldDragDetails) { - final screenAnchors = _screenAnchors; - final nextAnchor = _calculateNextAnchor(screenAnchors); - - _animateToNextAnchor(nextAnchor); - _currentAnchor = nextAnchor; - } - - double _calculateNextAnchor(List screenAnchor) { - if (screenAnchor.contains(_controller.extent.currentExtent)) { - return _controller.extent.currentExtent; - } - - final nearestAnchor = - _findNearestAnchors(screenAnchor, _controller.extent.currentExtent); - final firstAnchor = nearestAnchor[0]; - final secondAnchor = nearestAnchor[1]; - - if (firstAnchor == _currentAnchor) { - return _findNextAnchorFromPrevious(firstAnchor, secondAnchor); - } else if (secondAnchor == _currentAnchor) { - return _findNextAnchorFromPrevious(secondAnchor, firstAnchor); - } else { - return (firstAnchor - _controller.extent.currentExtent).abs() > - (secondAnchor - _controller.extent.currentExtent).abs() - ? secondAnchor - : firstAnchor; - } - } - - List _findNearestAnchors(List list, double x) { - list.sort(); - final diff = {for (var d in list) d: d - x}; - final firstAnchor = diff.entries.where((me) => me.value > 0).first.key; - final secondAnchor = diff.entries.where((me) => me.value < 0).last.key; - - return [firstAnchor, secondAnchor]; - } - - double _findNextAnchorFromPrevious(double previousAnchor, double nextAnchor) { - const percent = 0.2; - - return (_controller.extent.currentExtent - previousAnchor).abs() > - (nextAnchor - previousAnchor).abs() * percent - ? nextAnchor - : previousAnchor; - } - - Future _animateToNextAnchor(double nextAnchor) async { - if (_controller.extent.currentExtent == nextAnchor) return; - - _topOffsetTween - ..begin = _controller.extent.currentExtent - ..end = nextAnchor; - - await _animationController.forward(); - - if (nextAnchor <= widget.minHeight && !_isClosing) { - _dismiss(); - } - } - - List get _screenAnchors => { - if (widget.anchors != null) ...widget.anchors!, - widget.maxHeight, - widget.minHeight, - widget.initHeight, - }.toList(); - - void _dismiss() { - if (widget.onDismiss != null) widget.onDismiss!(); - Navigator.pop(context); - } -} diff --git a/packages/bottom_sheet/lib/src/flexible_bottom_sheet_controller.dart b/packages/bottom_sheet/lib/src/flexible_bottom_sheet_controller.dart deleted file mode 100644 index d2b7e48a6..000000000 --- a/packages/bottom_sheet/lib/src/flexible_bottom_sheet_controller.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:bottom_sheet/bottom_sheet.dart'; -import 'package:bottom_sheet/src/flexible_bottom_sheet_owner.dart'; -import 'package:flutter/material.dart'; - -/// Default controller of showing bottom sheet that can resize and scroll. -class FlexibleBottomSheetController { - FlexibleBottomSheetController( - this._context, { - required this.owner, - }); - - final BuildContext _context; - final FlexibleBottomSheetOwner owner; - - /// Show registered bottom sheet. - Future show( - Object type, { - BottomSheetData? data, - }) { - final showers = owner.registeredBottomSheetShowers[type]; - - if (showers != null) { - return showers( - _context, - data: data, - ) as Future; - } else { - throw Exception('BottomSheetShowers not registered for type: $type'); - } - } -} diff --git a/packages/bottom_sheet/lib/src/flexible_bottom_sheet_header_delegate.dart b/packages/bottom_sheet/lib/src/flexible_bottom_sheet_header_delegate.dart deleted file mode 100644 index ae8b4da46..000000000 --- a/packages/bottom_sheet/lib/src/flexible_bottom_sheet_header_delegate.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart'; - -class FlexibleBottomSheetHeaderDelegate extends SliverPersistentHeaderDelegate { - FlexibleBottomSheetHeaderDelegate({ - required this.maxHeight, - required this.child, - this.minHeight = 0, - }); - - final Widget child; - - final double minHeight; - - final double maxHeight; - - @override - double get minExtent => minHeight; - - @override - double get maxExtent => maxHeight; - - @override - bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) => true; - - @override - Widget build( - BuildContext context, - double shrinkOffset, - bool overlapsContent, - ) { - return child; - } -} diff --git a/packages/bottom_sheet/lib/src/flexible_bottom_sheet_owner.dart b/packages/bottom_sheet/lib/src/flexible_bottom_sheet_owner.dart deleted file mode 100644 index 25c09eb5e..000000000 --- a/packages/bottom_sheet/lib/src/flexible_bottom_sheet_owner.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart'; - -/// Mixin for register Flexible Bottom Sheet -mixin FlexibleBottomSheetOwner { - Map get registeredBottomSheetShowers; -} - -/// Class represent data for bottom sheet building -abstract class BottomSheetData {} - -class BottomSheetShower { - BottomSheetShower(this.builder); - - final Future Function(BuildContext context, {T? data}) builder; - - Future call(BuildContext context, {T? data}) => - builder(context, data: data); -} diff --git a/packages/bottom_sheet/lib/src/flexible_bottom_sheet_route.dart b/packages/bottom_sheet/lib/src/flexible_bottom_sheet_route.dart deleted file mode 100644 index 599d819dc..000000000 --- a/packages/bottom_sheet/lib/src/flexible_bottom_sheet_route.dart +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:bottom_sheet/src/flexible_bottom_sheet.dart'; -import 'package:bottom_sheet/src/widgets/flexible_draggable_scrollable_sheet.dart'; -import 'package:flutter/material.dart'; - -// ignore_for_file: avoid-returning-widgets - -const Duration _bottomSheetDuration = Duration(milliseconds: 500); - -/// Shows a flexible bottom sheet. -/// -/// [builder] - content's builder -/// [minHeight] - min height in percent for bottom sheet. e.g. 0.1 -/// [initHeight] - init height in percent for bottom sheet. e.g. 0.5 -/// [maxHeight] - init height in percent for bottom sheet. e.g. 0.5 -/// [isModal] - if true, overlay background with dark color -/// [anchors] - percent height that bottom sheet can be -Future showFlexibleBottomSheet({ - required BuildContext context, - required FlexibleDraggableScrollableWidgetBuilder builder, - double? minHeight, - double? initHeight, - double? maxHeight, - bool isCollapsible = true, - bool isExpand = true, - bool useRootNavigator = false, - bool isModal = true, - List? anchors, -}) { - assert(debugCheckHasMediaQuery(context)); - assert(debugCheckHasMaterialLocalizations(context)); - - return Navigator.of(context, rootNavigator: useRootNavigator).push( - _FlexibleBottomSheetRoute( - theme: Theme.of(context), - barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, - minHeight: minHeight ?? 0, - initHeight: initHeight ?? 0.5, - maxHeight: maxHeight ?? 1, - isCollapsible: isCollapsible, - isExpand: isExpand, - builder: builder, - isModal: isModal, - anchors: anchors, - ), - ); -} - -/// Shows a flexible bottom sheet with the ability to scroll content -/// even without a list -/// -/// [builder] - content's builder -/// [minHeight] - min height in percent for bottom sheet. e.g. 0.1 -/// [initHeight] - init height in percent for bottom sheet. e.g. 0.5 -/// [maxHeight] - init height in percent for bottom sheet. e.g. 0.5 -/// [isModal] - if true, overlay background with dark color -/// [anchors] - percent height that bottom sheet can be -/// isPinnedHeader - can the header scroll -/// [decoration] - BottomSheet decoration -/// [minHeaderHeight] - minimum head size -/// [maxHeaderHeight] - maximum head size -/// [headerHeight] - head size. -/// decoratedBox - decoration for header and content -/// Sets both [minHeaderHeight] and [maxHeaderHeight] -Future showStickyFlexibleBottomSheet({ - required BuildContext context, - required FlexibleDraggableScrollableHeaderWidgetBuilder headerBuilder, - required FlexibleDraggableScrollableWidgetBodyBuilder builder, - double? minHeight, - double? initHeight, - double? maxHeight, - bool isCollapsible = true, - bool isExpand = true, - bool useRootNavigator = false, - bool isModal = true, - List? anchors, - double? minHeaderHeight, - double? maxHeaderHeight, - double? headerHeight, - Decoration? decoration, -}) { - assert(maxHeaderHeight != null || headerHeight != null); - assert(debugCheckHasMediaQuery(context)); - assert(debugCheckHasMaterialLocalizations(context)); - - return Navigator.of(context, rootNavigator: useRootNavigator).push( - _FlexibleBottomSheetRoute( - theme: Theme.of(context), - barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, - minHeight: minHeight ?? 0, - initHeight: initHeight ?? 0.5, - maxHeight: maxHeight ?? 1, - isCollapsible: isCollapsible, - isExpand: isExpand, - bodyBuilder: builder, - headerBuilder: headerBuilder, - isModal: isModal, - anchors: anchors, - minHeaderHeight: minHeaderHeight ?? headerHeight ?? maxHeaderHeight! / 2, - maxHeaderHeight: maxHeaderHeight ?? headerHeight!, - decoration: decoration, - ), - ); -} - -/// A modal route with flexible bottom sheet. -class _FlexibleBottomSheetRoute extends PopupRoute { - _FlexibleBottomSheetRoute({ - required this.minHeight, - required this.initHeight, - required this.maxHeight, - required this.isCollapsible, - required this.isExpand, - required this.isModal, - this.builder, - this.headerBuilder, - this.bodyBuilder, - this.theme, - this.barrierLabel, - this.anchors, - this.minHeaderHeight, - this.maxHeaderHeight, - this.decoration, - RouteSettings? settings, - }) : super(settings: settings); - - final FlexibleDraggableScrollableWidgetBuilder? builder; - final FlexibleDraggableScrollableHeaderWidgetBuilder? headerBuilder; - final FlexibleDraggableScrollableWidgetBodyBuilder? bodyBuilder; - final double minHeight; - final double initHeight; - final double maxHeight; - final bool isCollapsible; - final bool isExpand; - final bool isModal; - final List? anchors; - final double? minHeaderHeight; - final double? maxHeaderHeight; - final Decoration? decoration; - - final ThemeData? theme; - - @override - Duration get transitionDuration => _bottomSheetDuration; - - @override - bool get barrierDismissible => true; - - @override - final String? barrierLabel; - - @override - Color? get barrierColor => isModal ? Colors.black54 : const Color(0x00FFFFFF); - - late AnimationController _animationController; - - @override - AnimationController createAnimationController() { - _animationController = AnimationController( - duration: _bottomSheetDuration, - debugLabel: 'FlexibleBottomSheet', - vsync: navigator?.overlay as TickerProvider, - ); - - return _animationController; - } - - @override - Widget buildPage( - BuildContext context, - Animation animation, - Animation secondaryAnimation, - ) { - Widget bottomSheet = MediaQuery.removePadding( - context: context, - removeTop: true, - child: isCollapsible - ? FlexibleBottomSheet.collapsible( - initHeight: initHeight, - maxHeight: maxHeight, - builder: builder, - headerBuilder: headerBuilder, - bodyBuilder: bodyBuilder, - isExpand: isExpand, - animationController: _animationController, - anchors: anchors, - minHeaderHeight: minHeaderHeight, - maxHeaderHeight: maxHeaderHeight, - decoration: decoration, - ) - : FlexibleBottomSheet( - minHeight: minHeight, - initHeight: initHeight, - maxHeight: maxHeight, - builder: builder, - headerBuilder: headerBuilder, - bodyBuilder: bodyBuilder, - isExpand: isExpand, - animationController: _animationController, - anchors: anchors, - minHeaderHeight: minHeaderHeight, - maxHeaderHeight: maxHeaderHeight, - decoration: decoration, - ), - ); - - if (theme != null) { - bottomSheet = Theme(data: theme!, child: bottomSheet); - } - - return bottomSheet; - } - - @override - Widget buildTransitions( - BuildContext context, - Animation animation, - Animation secondaryAnimation, - Widget child, - ) { - const begin = Offset(0.0, 1.0); - const end = Offset.zero; - final curve = Curves.ease; - final tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); - - return SlideTransition( - position: animation.drive(tween), - child: super.buildTransitions( - context, - animation, - secondaryAnimation, - child, - ), - ); - } -} diff --git a/packages/bottom_sheet/lib/src/widgets/flexible_bottom_sheet_scroll_notifyer.dart b/packages/bottom_sheet/lib/src/widgets/flexible_bottom_sheet_scroll_notifyer.dart deleted file mode 100644 index 76e12956d..000000000 --- a/packages/bottom_sheet/lib/src/widgets/flexible_bottom_sheet_scroll_notifyer.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:bottom_sheet/src/widgets/flexible_draggable_scrollable_sheet.dart'; -import 'package:flutter/material.dart'; - -/// Start scrolling -typedef ScrollStartCallback = bool Function(ScrollStartNotification); - -/// Scrolling -typedef ScrollCallback = bool Function(FlexibleDraggableScrollableNotification); - -/// Scroll finished -typedef ScrollEndCallback = bool Function(ScrollEndNotification); - -/// Listen drag-notifications -class FlexibleScrollNotifyer extends StatelessWidget { - const FlexibleScrollNotifyer({ - required this.child, - required this.scrollStartCallback, - required this.scrollingCallback, - required this.scrollEndCallback, - Key? key, - }) : super(key: key); - - final Widget child; - - final ScrollStartCallback scrollStartCallback; - final ScrollCallback scrollingCallback; - final ScrollEndCallback scrollEndCallback; - - @override - Widget build(BuildContext context) { - return NotificationListener( - onNotification: scrollStartCallback, - child: NotificationListener( - onNotification: scrollEndCallback, - child: NotificationListener( - onNotification: scrollingCallback, - child: child, - ), - ), - ); - } -} diff --git a/packages/bottom_sheet/lib/src/widgets/flexible_draggable_scrollable_sheet.dart b/packages/bottom_sheet/lib/src/widgets/flexible_draggable_scrollable_sheet.dart deleted file mode 100644 index 0fb9d0008..000000000 --- a/packages/bottom_sheet/lib/src/widgets/flexible_draggable_scrollable_sheet.dart +++ /dev/null @@ -1,648 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Copyright 2019 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter/gestures.dart'; -import 'package:flutter/material.dart'; - -/// The signature of a method that provides a [BuildContext] and -/// [ScrollController] for building a widget that may overflow the draggable -/// [Axis] of the containing FlexibleDraggableScrollSheet. -/// -/// Users should apply the [scrollController] to a [ScrollView] subclass, such -/// as a [SingleChildScrollView], [ListView] or [GridView], to have the whole -/// sheet be draggable. -/// -/// [bottomSheetOffset] - percent of offset -typedef FlexibleDraggableScrollableWidgetBuilder = Widget Function( - BuildContext context, - FlexibleDraggableScrollableSheetScrollController scrollController, - double bottomSheetOffset, -); - -/// The signature of the method that provides [BuildContext] -/// and [bottomSheetOffset] for determining the position of the BottomSheet -/// relative to the upper border of the screen -/// -typedef FlexibleDraggableScrollableHeaderWidgetBuilder = Widget Function( - BuildContext context, - double bottomSheetOffset, -); - -/// The signature of a method that provides a [BuildContext] -/// and [bottomSheetOffset] for determining the position of the BottomSheet -/// relative to the upper border of the screen -/// [bottomSheetOffset] - percent of offset -/// -typedef FlexibleDraggableScrollableWidgetBodyBuilder = SliverChildDelegate - Function( - BuildContext context, - double bottomSheetOffset, -); - -/// A container for a [Scrollable] that responds to drag gestures by resizing -/// the scrollable until a limit is reached, and then scrolling. -/// -/// {@youtube 560 315 https://www.youtube.com/watch?v=Hgw819mL_78} -/// -/// This widget can be dragged along the vertical axis between its -/// [minChildSize], which defaults to `0.25` and [maxChildSize], which defaults -/// to `1.0`. These sizes are percentages of the height of the parent container. -/// -/// The widget coordinates resizing and scrolling of the widget returned by -/// builder as the user drags along the horizontal axis. -/// -/// The widget will initially be displayed at its initialChildSize which -/// defaults to `0.5`, meaning half the height of its parent. Dragging will work -/// between the range of minChildSize and maxChildSize (as percentages of the -/// parent container's height) as long as the builder creates a widget which -/// uses the provided [ScrollController]. If the widget created by the -/// [ScrollableWidgetBuilder] does not use the provided [ScrollController], the -/// sheet will remain at the initialChildSize. -/// -/// By default, the widget will expand its non-occupied area to fill available -/// space in the parent. If this is not desired, e.g. because the parent wants -/// to position sheet based on the space it is taking, the [expand] property -/// may be set to false. -/// -/// {@tool sample} -/// -/// This is a sample widget which shows a [ListView] that has 25 [ListTile]s. -/// It starts out as taking up half the body of the [Scaffold], and can be -/// dragged up to the full height of the scaffold or down to 25% of the height -/// of the scaffold. Upon reaching full height, the list contents will be -/// scrolled up or down, until they reach the top of the list again and the user -/// drags the sheet back down. -/// -/// ```dart -/// class HomePage extends StatelessWidget { -/// @override -/// Widget build(BuildContext context) { -/// return Scaffold( -/// appBar: AppBar( -/// title: const Text('FlexibleDraggableScrollableSheet'), -/// ), -/// body: SizedBox.expand( -/// child: FlexibleDraggableScrollableSheet( -/// builder: (BuildContext context, ScrollController scrollController){ -/// return Container( -/// color: Colors.blue[100], -/// child: ListView.builder( -/// controller: scrollController, -/// itemCount: 25, -/// itemBuilder: (BuildContext context, int index) { -/// return ListTile(title: Text('Item $index')); -/// }, -/// ), -/// ); -/// }, -/// ), -/// ), -/// ); -/// } -/// } -/// ``` -/// {@end-tool} -class FlexibleDraggableScrollableSheet extends StatefulWidget { - /// Creates a widget that can be dragged and scrolled in a single gesture. - /// - /// The [builder], [initialChildSize], [minChildSize], [maxChildSize] and - /// [expand] parameters must not be null. - const FlexibleDraggableScrollableSheet({ - required this.builder, - Key? key, - this.initialChildSize = 0.5, - this.minChildSize = 0.25, - this.maxChildSize = 1.0, - this.expand = true, - }) : assert(minChildSize >= 0.0), - assert(maxChildSize <= 1.0), - assert(minChildSize <= initialChildSize), - assert(initialChildSize <= maxChildSize), - super(key: key); - - /// The initial fractional value of the parent container's height to use when - /// displaying the widget. - /// - /// The default value is `0.5`. - final double initialChildSize; - - /// The minimum fractional value of the parent container's height to use when - /// displaying the widget. - /// - /// The default value is `0.25`. - final double minChildSize; - - /// The maximum fractional value of the parent container's height to use when - /// displaying the widget. - /// - /// The default value is `1.0`. - final double maxChildSize; - - /// Whether the widget should expand to fill the available space in its parent - /// or not. - /// - /// In most cases, this should be true. However, in the case of a parent - /// widget that will position this one based on its desired size (such as a - /// [Center]), this should be set to false. - /// - /// The default value is true. - final bool expand; - - /// The builder that creates a child to display in this widget, which will - /// use the provided [ScrollController] to enable dragging and scrolling - /// of the contents. - final ScrollableWidgetBuilder builder; - - @override - _FlexibleDraggableScrollableSheetState createState() => - _FlexibleDraggableScrollableSheetState(); -} - -/// A [Notification] related to the extent, which is the size, and scroll -/// offset, which is the position of the child list, of the -/// [FlexibleDraggableScrollableSheet]. -/// -/// [FlexibleDraggableScrollableSheet] widgets notify their ancestors when the -/// size of -/// the sheet changes. When the extent of the sheet changes via a drag, -/// this notification bubbles up through the tree, which means a given -/// [NotificationListener] will receive notifications for all descendant -/// [FlexibleDraggableScrollableSheet] widgets. To focus on notifications -/// from the -/// nearest FlexibleDraggableScrollableSheet descendant, check that the -/// [depth] -/// property of the notification is zero. -/// -/// When an extent notification is received by a [NotificationListener], the -/// listener will already have completed build and layout, and it is therefore -/// too late for that widget to call [State.setState]. Any attempt to adjust the -/// build or layout based on an extent notification would result in a layout -/// that lagged one frame behind, which is a poor user experience. Extent -/// notifications are used primarily to drive animations. The [Scaffold] widget -/// listens for extent notifications and responds by driving animations for the -/// [FloatingActionButton] as the bottom sheet scrolls up. -class FlexibleDraggableScrollableNotification extends Notification - with ViewportNotificationMixin { - /// Creates a notification that the extent of a - /// [FlexibleDraggableScrollableSheet] has - /// changed. - /// - /// All parameters are required. The [minExtent] must be >= 0. The [maxExtent] - /// must be <= 1.0. The [extent] must be between [minExtent] and [maxExtent]. - FlexibleDraggableScrollableNotification({ - required this.extent, - required this.minExtent, - required this.maxExtent, - required this.initialExtent, - this.context, - }) : assert(0.0 <= minExtent), - assert(maxExtent <= 1.0), - assert(minExtent <= extent), - assert(minExtent <= initialExtent), - assert(extent <= maxExtent), - assert(initialExtent <= maxExtent); - - /// The current value of the extent, between [minExtent] and [maxExtent]. - final double extent; - - /// The minimum value of [extent], which is >= 0. - final double minExtent; - - /// The maximum value of [extent]. - final double maxExtent; - - /// The initially requested value for [extent]. - final double initialExtent; - - /// The build context of the widget that fired this notification. - /// - /// This can be used to find the sheet's render objects to determine the size - /// of the viewport, for instance. A listener can only assume this context - /// is live when it first gets the notification. - final BuildContext? context; - - @override - void debugFillDescription(List description) { - super.debugFillDescription(description); - description.add('minExtent: $minExtent, extent: $extent, ' - 'maxExtent: $maxExtent, initialExtent: $initialExtent'); - } -} - -/// Manages state between [_FlexibleDraggableScrollableSheetState], -/// [FlexibleDraggableScrollableSheetScrollController], and -/// [_FlexibleDraggableScrollableSheetScrollPosition]. -/// -/// The State knows the pixels available along the axis the widget wants to -/// scroll, but expects to get a fraction of those pixels to render the sheet. -/// -///The ScrollPosition knows the number of pixels a user wants to move the sheet. -/// -/// The [currentExtent] will never be null. -/// The [availablePixels] will never be null, but may be `double.infinity`. -class FlexibleDraggableSheetExtent { - FlexibleDraggableSheetExtent({ - required this.minExtent, - required this.maxExtent, - required this.initialExtent, - required VoidCallback listener, - }) : assert(minExtent >= 0), - assert(maxExtent <= 1), - assert(minExtent <= initialExtent), - assert(initialExtent <= maxExtent), - _currentExtent = ValueNotifier(initialExtent) - ..addListener(listener), - availablePixels = double.infinity; - - final double minExtent; - final double maxExtent; - final double initialExtent; - final ValueNotifier _currentExtent; - double availablePixels; - - bool get isAtMin => minExtent >= _currentExtent.value; - - bool get isAtMax => maxExtent <= _currentExtent.value; - - set currentExtent(double value) => - _currentExtent.value = value.clamp(minExtent, maxExtent); - - double get currentExtent => _currentExtent.value; - - double get additionalMinExtent => isAtMin ? 0.0 : 1.0; - - double get additionalMaxExtent => isAtMax ? 0.0 : 1.0; - - /// The scroll position gets inputs in terms of pixels, but the extent is - /// expected to be expressed as a number between 0..1. - void addPixelDelta(double delta, BuildContext? context) { - if (availablePixels == 0) { - return; - } - currentExtent += delta / availablePixels * maxExtent; - FlexibleDraggableScrollableNotification( - minExtent: minExtent, - maxExtent: maxExtent, - extent: currentExtent, - initialExtent: initialExtent, - context: context, - ).dispatch(context); - } -} - -class _FlexibleDraggableScrollableSheetState - extends State { - late FlexibleDraggableScrollableSheetScrollController _scrollController; - late FlexibleDraggableSheetExtent _extent; - - @override - void initState() { - super.initState(); - _extent = FlexibleDraggableSheetExtent( - minExtent: widget.minChildSize, - maxExtent: widget.maxChildSize, - initialExtent: widget.initialChildSize, - listener: _setExtent, - ); - _scrollController = - FlexibleDraggableScrollableSheetScrollController(extent: _extent); - } - - @override - void didChangeDependencies() { - super.didChangeDependencies(); - if (_InheritedResetNotifier.shouldReset(context)) { - // jumpTo can result in trying to replace semantics during build. - // Just animate really fast. - // Avoid doing it at all if the offset is already 0.0. - if (_scrollController.offset != 0.0) { - _scrollController.animateTo( - 0.0, - duration: const Duration(milliseconds: 1), - curve: Curves.linear, - ); - } - _extent._currentExtent.value = _extent.initialExtent; - } - } - - void _setExtent() { - setState(() { - // _extent has been updated when this is called. - }); - } - - @override - Widget build(BuildContext context) { - return LayoutBuilder( - builder: (context, constraints) { - _extent.availablePixels = - widget.maxChildSize * constraints.biggest.height; - final Widget sheet = FractionallySizedBox( - heightFactor: _extent.currentExtent, - alignment: Alignment.bottomCenter, - child: widget.builder(context, _scrollController), - ); - return widget.expand ? SizedBox.expand(child: sheet) : sheet; - }, - ); - } - - @override - void dispose() { - _scrollController.dispose(); - super.dispose(); - } -} - -/// A [ScrollController] suitable for use in a [ScrollableWidgetBuilder] created -/// by a [FlexibleDraggableScrollableSheet]. -/// -/// If a [FlexibleDraggableScrollableSheet] contains content that is exceeds -/// the height -/// of its container, this controller will allow the sheet to both be dragged to -/// fill the container and then scroll the child content. -/// -/// See also: -/// -/// * [_FlexibleDraggableScrollableSheetScrollPosition], which manages the -/// positioning logic for -/// this controller. -/// * [PrimaryScrollController], which can be used to establish a -/// [_FlexibleDraggableScrollableSheetScrollController] as the primary -/// controller for -/// descendants. -class FlexibleDraggableScrollableSheetScrollController - extends ScrollController { - FlexibleDraggableScrollableSheetScrollController({ - required this.extent, - double initialScrollOffset = 0.0, - String? debugLabel, - }) : super( - debugLabel: debugLabel, - initialScrollOffset: initialScrollOffset, - ); - - final FlexibleDraggableSheetExtent extent; - - @override - _FlexibleDraggableScrollableSheetScrollPosition createScrollPosition( - ScrollPhysics physics, - ScrollContext context, - ScrollPosition? oldPosition, - ) { - return _FlexibleDraggableScrollableSheetScrollPosition( - physics: physics, - context: context, - oldPosition: oldPosition, - extent: extent, - ); - } - - @override - void debugFillDescription(List description) { - super.debugFillDescription(description); - description.add('extent: $extent'); - } -} - -/// A scroll position that manages scroll activities for -/// [FlexibleDraggableScrollableSheetScrollController]. -/// -/// This class is a concrete subclass of [ScrollPosition] logic that handles a -/// single [ScrollContext], such as a [Scrollable]. An instance of this class -/// manages [ScrollActivity] instances, which changes the -/// [FlexibleDraggableSheetExtent.currentExtent] or visible content offset in -/// the [Scrollable]'s [Viewport] -/// -/// See also: -/// -/// * [FlexibleDraggableScrollableSheetScrollController], which uses this as -/// its [ScrollPosition]. -class _FlexibleDraggableScrollableSheetScrollPosition - extends ScrollPositionWithSingleContext { - _FlexibleDraggableScrollableSheetScrollPosition({ - required ScrollPhysics physics, - required ScrollContext context, - required this.extent, - double initialPixels = 0.0, - bool keepScrollOffset = true, - ScrollPosition? oldPosition, - String? debugLabel, - }) : super( - physics: physics, - context: context, - initialPixels: initialPixels, - keepScrollOffset: keepScrollOffset, - oldPosition: oldPosition, - debugLabel: debugLabel, - ); - - VoidCallback? _dragCancelCallback; - final FlexibleDraggableSheetExtent extent; - - bool get listShouldScroll => pixels > 0.0; - - @override - bool applyContentDimensions(double minScrollExtent, double maxScrollExtent) { - // We need to provide some extra extent if we haven't yet reached the max or - // min extents. Otherwise, a list with fewer children than the extent of - // the available space will get stuck. - return super.applyContentDimensions( - minScrollExtent - extent.additionalMinExtent, - maxScrollExtent + extent.additionalMaxExtent, - ); - } - - @override - void applyUserOffset(double delta) { - if (!listShouldScroll && - (!(extent.isAtMin || extent.isAtMax) || - (extent.isAtMin && delta < 0) || - (extent.isAtMax && delta > 0))) { - extent.addPixelDelta(-delta, context.notificationContext); - } else { - super.applyUserOffset(delta); - } - } - - @override - void goBallistic(double velocity) { - if (velocity == 0.0 || - (velocity < 0.0 && listShouldScroll) || - (velocity > 0.0 && extent.isAtMax)) { - super.goBallistic(velocity); - return; - } - //Scrollable expects that we will dispose of its current _dragCancelCallback - _dragCancelCallback?.call(); - _dragCancelCallback = null; - - // The iOS bouncing simulation just isn't right here - once we delegate - // the ballistic back to the ScrollView, it will use the right simulation. - final Simulation simulation = ClampingScrollSimulation( - position: extent.currentExtent, - velocity: velocity, - tolerance: physics.tolerance, - ); - - final ballisticController = AnimationController.unbounded( - debugLabel: '_FlexibleDraggableScrollableSheetScrollPosition', - vsync: context.vsync, - ); - var lastDelta = 0.0; - void _tick() { - final delta = ballisticController.value - lastDelta; - lastDelta = ballisticController.value; - extent.addPixelDelta(delta, context.notificationContext); - if ((velocity > 0 && extent.isAtMax) || - (velocity < 0 && extent.isAtMin)) { - // Make sure we pass along enough velocity to keep scrolling - otherwise - // we just "bounce" off the top making it look like the list doesn't - // have more to scroll. - // ignore: parameter_assignments - velocity = ballisticController.velocity + - (physics.tolerance.velocity * ballisticController.velocity.sign); - super.goBallistic(velocity); - ballisticController.stop(); - } else if (ballisticController.isCompleted) { - super.goBallistic(0); - } - } - - ballisticController - ..addListener(_tick) - ..animateWith(simulation).whenCompleteOrCancel( - ballisticController.dispose, - ); - } - - @override - Drag drag(DragStartDetails details, VoidCallback dragCancelCallback) { - // Save this so we can call it later if we have to [goBallistic] on our own. - _dragCancelCallback = dragCancelCallback; - return super.drag(details, dragCancelCallback); - } -} - -/// A widget that can notify a descendent [FlexibleDraggableScrollableSheet] -/// that it should reset its position to the initial state. -/// -/// The [Scaffold] uses this widget to notify a persistent bottom sheet that -/// the user has tapped back if the sheet has started to cover more of the body -/// than when at its initial position. This is important for users of assistive -/// technology, where dragging may be difficult to communicate. -class FlexibleDraggableScrollableActuator extends StatelessWidget { - /// Creates a widget that can notify descendent - /// [FlexibleDraggableScrollableSheet]s to reset to their initial position. - /// - /// The [child] parameter is required. - FlexibleDraggableScrollableActuator({ - required this.child, - Key? key, - }) : super(key: key); - - /// This child's [FlexibleDraggableScrollableSheet] descendant will be reset - /// when the [reset] method is applied to a context that includes it. - /// - /// Must not be null. - final Widget child; - - final _ResetNotifier _notifier = _ResetNotifier(); - - /// Notifies any descendant [FlexibleDraggableScrollableSheet] that it should - /// reset to its initial position. - /// - /// Returns `true` if a [FlexibleDraggableScrollableActuator] is available and - /// some [FlexibleDraggableScrollableSheet] is listening for updates, `false` - /// otherwise. - static bool reset(BuildContext context) { - final notifier = - context.dependOnInheritedWidgetOfExactType<_InheritedResetNotifier>(); - if (notifier == null) { - return false; - } - return notifier._sendReset(); - } - - @override - Widget build(BuildContext context) { - return _InheritedResetNotifier( - notifier: _notifier, - child: child, - ); - } -} - -/// A [ChangeNotifier] to use with InheritedResetNotifyer to notify -/// descendants that they should reset to initial state. -class _ResetNotifier extends ChangeNotifier { - /// Whether someone called [sendReset] or not. - /// - /// This flag should be reset after checking it. - bool _wasCalled = false; - - /// Fires a reset notification to descendants. - /// - /// Returns false if there are no listeners. - bool sendReset() { - if (!hasListeners) { - return false; - } - _wasCalled = true; - notifyListeners(); - return true; - } -} - -class _InheritedResetNotifier extends InheritedNotifier<_ResetNotifier> { - /// Creates an [InheritedNotifier] that the - /// [FlexibleDraggableScrollableSheet] will - /// listen to for an indication that it should change its extent. - /// - /// The [child] and [notifier] properties must not be null. - const _InheritedResetNotifier({ - required Widget child, - required _ResetNotifier notifier, - Key? key, - }) : super(key: key, child: child, notifier: notifier); - - // use "!" because notifier is required in overload constructor - bool _sendReset() => notifier!.sendReset(); - - /// Specifies whether the [FlexibleDraggableScrollableSheet] should reset to - /// its initial position. - /// - /// Returns true if the notifier requested a reset, false otherwise. - static bool shouldReset(BuildContext context) { - final widget = - context.dependOnInheritedWidgetOfExactType<_InheritedResetNotifier>(); - if (widget == null) { - return false; - } - assert(widget is _InheritedResetNotifier); - final inheritedNotifier = widget; - if (inheritedNotifier.notifier != null) { - final wasCalled = inheritedNotifier.notifier!._wasCalled; - inheritedNotifier.notifier!._wasCalled = false; - return wasCalled; - } else { - return false; - } - } -} diff --git a/packages/bottom_sheet/media/bs1.gif b/packages/bottom_sheet/media/bs1.gif deleted file mode 100644 index 829fa6f3b..000000000 Binary files a/packages/bottom_sheet/media/bs1.gif and /dev/null differ diff --git a/packages/bottom_sheet/media/bs2.gif b/packages/bottom_sheet/media/bs2.gif deleted file mode 100644 index fca581649..000000000 Binary files a/packages/bottom_sheet/media/bs2.gif and /dev/null differ diff --git a/packages/bottom_sheet/pubspec.yaml b/packages/bottom_sheet/pubspec.yaml deleted file mode 100644 index d287cfbd6..000000000 --- a/packages/bottom_sheet/pubspec.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: bottom_sheet -version: 1.0.1 -description: Flexible bottom sheet with the ability to scroll content even without a list. -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/bottom_sheet" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: - -custom: - is_stable: false - unstable_version: - is_plugin: false - path: bottom_sheet - separate_repo_url: - hostUrl: diff --git a/packages/bottom_sheet/test/bottom_sheet_test.dart b/packages/bottom_sheet/test/bottom_sheet_test.dart deleted file mode 100644 index 7fdc0ff27..000000000 --- a/packages/bottom_sheet/test/bottom_sheet_test.dart +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:bottom_sheet/bottom_sheet.dart'; -import 'package:bottom_sheet/src/widgets/flexible_bottom_sheet_scroll_notifyer.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'scroll.dart'; -import 'test_utils.dart'; - -void main() { - group('Smoke tests', () { - testWidgets('FlexibleDraggableScrollableSheet builds', (tester) async { - final widget = FlexibleDraggableScrollableSheet( - builder: (context, scrollController) { - return ListView.builder( - controller: scrollController, - itemCount: 25, - itemBuilder: (context, index) { - return ListTile(title: Text('Item $index')); - }, - ); - }, - ); - - await tester.pumpWidget(makeTestableWidget(widget)); - }); - - testWidgets('FlexibleScrollNotifyer builds', (tester) async { - final widget = FlexibleScrollNotifyer( - scrollStartCallback: (_) { - return true; - }, - scrollingCallback: (_) { - return true; - }, - scrollEndCallback: (_) { - return true; - }, - child: ListView.builder( - itemCount: 25, - itemBuilder: (context, index) { - return ListTile(title: Text('Item $index')); - }, - ), - ); - - await tester.pumpWidget(makeTestableWidget(widget)); - }); - }); - - group('FlexibleScrollNotifyer', () { - testWidgets('scroll callbacks', (tester) async { - final result = []; - - final widget = FlexibleScrollNotifyer( - scrollStartCallback: (_) { - result.add(Scroll.start); - return true; - }, - scrollingCallback: (_) { - result.add(Scroll.scrolling); - return true; - }, - scrollEndCallback: (_) { - result.add(Scroll.end); - return true; - }, - child: FlexibleDraggableScrollableSheet( - builder: (context, scrollController) { - return ListView.builder( - controller: scrollController, - itemCount: 25, - itemBuilder: (context, index) { - return ListTile(title: Text('Item $index')); - }, - ); - }, - ), - ); - - await tester.pumpWidget(makeTestableWidget(widget)); - - final gesture = await tester.startGesture(const Offset(250, 300)); - - expect(result, [Scroll.start]); - - await gesture.moveBy(const Offset(0, 50)); - - expect(result, contains(Scroll.scrolling)); - - await gesture.up(); - - expect(result.last, equals(Scroll.end)); - }); - }); -} diff --git a/packages/bottom_sheet/test/scroll.dart b/packages/bottom_sheet/test/scroll.dart deleted file mode 100644 index 3b701a9b1..000000000 --- a/packages/bottom_sheet/test/scroll.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -enum Scroll { - start, - scrolling, - end, -} diff --git a/packages/bottom_sheet/test/test_utils.dart b/packages/bottom_sheet/test/test_utils.dart deleted file mode 100644 index f90c9423f..000000000 --- a/packages/bottom_sheet/test/test_utils.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; - -Widget makeTestableWidget(Widget widget) { - return MaterialApp(home: Scaffold(body: SizedBox.expand(child: widget))); -} diff --git a/packages/datalist/.gitignore b/packages/datalist/.gitignore deleted file mode 100644 index 9f87252c6..000000000 --- a/packages/datalist/.gitignore +++ /dev/null @@ -1,72 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/datalist/CHANGELOG.md b/packages/datalist/CHANGELOG.md deleted file mode 100644 index 6234dc82f..000000000 --- a/packages/datalist/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changelog - -## 1.0.1 - 2021-05-30 - -* Stable release - -## 1.0.1-dev.1 - 2021-05-25 - -* Apply new lint rules. - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0`. - -## 0.0.1-dev.4 - -* Fix lint hints - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/datalist/CONTRIBUTING.md b/packages/datalist/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/datalist/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/datalist/LICENSE b/packages/datalist/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/datalist/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/datalist/README.md b/packages/datalist/README.md deleted file mode 100644 index 21d5a1b15..000000000 --- a/packages/datalist/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# Data list - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/datalist) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=datalist&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/datalist?logo=dart&logoColor=white)](https://pub.dev/packages/datalist) -[![Pub Likes](https://badgen.net/pub/likes/datalist)](https://pub.dev/packages/datalist) -[![Pub popularity](https://badgen.net/pub/popularity/datalist)](https://pub.dev/packages/datalist/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/datalist) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## Usage - -### Data list limit-offset - -The main entity - [`OffsetDataList`][dl_offset] - a list for paginated data through the limit / offset mechanism -Has methods: -  1. `merge (DataList data)`, which allows you to combine 2 data blocks. The input should be only OffsetDataList -  2. `int nextOffset` - returns the offset for the trace of the data block -  3. `bool canGetMore` - indicates whether more data can be loaded -  1. `#transform ()` - to convert data in a list - -It can combine two subsequent blocks, and in reverse order. - -[dl_offset]: lib/src/impl/datalist_limit_offset.dart - -### Data list page-count - -The main entity - [`PageCountDataList`][dl_pagecount] - a list of paginated data through the page / count mechanism -Has methods: -  1. `merge (DataList data)`, which allows you to combine 2 data blocks. Input should be only PageCount DataList -  2. `int getNextPage ()` - returns the number of the trace of the data block -  3. `bool canGetMore` - indicates whether more data can be loaded -  1. `#transform ()` - to convert data in a list - -It can combine two subsequent blocks, and in reverse order. - -[dl_pagecount]: lib/src/impl/datalist_page_count.dart - -## Installation - -Add `datalist` to your `pubspec.yaml` file: - -```yaml -dependencies: - datalist: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/datalist/analysis_options.yaml b/packages/datalist/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/datalist/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/datalist/lib/datalist.dart b/packages/datalist/lib/datalist.dart deleted file mode 100644 index a13b58927..000000000 --- a/packages/datalist/lib/datalist.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:datalist/src/datalist.dart'; -export 'package:datalist/src/exceptions.dart'; -export 'package:datalist/src/impl/datalist_limit_offset.dart'; -export 'package:datalist/src/impl/datalist_page_count.dart'; diff --git a/packages/datalist/lib/src/datalist.dart b/packages/datalist/lib/src/datalist.dart deleted file mode 100644 index e8889fd4d..000000000 --- a/packages/datalist/lib/src/datalist.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:collection/collection.dart'; - -/// Родительский List для работы с пагинацией -/// Можно сливать с другим DataList -/// -/// Parent Pagination List -/// May merge with another DataList -/// -/// @param Item -abstract class DataList extends DelegatingList { - DataList(this.data) : super(data); - - /// Download List - List data; - - /// Проверка возможности дозагрузки данных - /// Checking the possibility of reloading data - bool get canGetMore; - - /// Слияние двух DataList - /// Merge two DataList - /// - /// [data] data list for merge with current instance - DataList merge(DataList data); - - /// Преобразует DataList одного типа в DataList другого типа - /// Converts a DataList of one type to a DataList of another type - /// - /// [mapFunc] mapping function - DataList transform(R Function(T item) mapFunc); -} diff --git a/packages/datalist/lib/src/exceptions.dart b/packages/datalist/lib/src/exceptions.dart deleted file mode 100644 index d61b14524..000000000 --- a/packages/datalist/lib/src/exceptions.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// incompatible data blocks -class IncompatibleRangesException implements Exception { - IncompatibleRangesException([this.message]); - - final String? message; - - @override - String toString() { - return (message == null) - ? 'IncompatibleRangesException' - : 'IncompatibleRangesException: $message'; - } -} diff --git a/packages/datalist/lib/src/impl/datalist_limit_offset.dart b/packages/datalist/lib/src/impl/datalist_limit_offset.dart deleted file mode 100644 index 0c9cb5ba3..000000000 --- a/packages/datalist/lib/src/impl/datalist_limit_offset.dart +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:datalist/src/datalist.dart'; -import 'package:datalist/src/exceptions.dart'; - -/// Pagination List -/// Limit-offset mechanism -/// May merge with another DataList -class OffsetDataList extends DataList { - OffsetDataList({ - required this.data, - this.limit = 0, - this.offset = 0, - this.totalCount = 0, - }) : super(data); - - /// Creating an Empty DataList - factory OffsetDataList.empty() { - return OffsetDataList(data: []); - } - - /// Creating an empty DataList with a limit on the maximum number of elements - factory OffsetDataList.emptyWithTotal(int totalCount) { - return OffsetDataList(data: [], totalCount: totalCount); - } - - /// Item count in List - int limit; - - /// Offset relative to the first element - int offset; - - /// Maximum number of list items - int totalCount; - - /// List of items - @override - // ignore: overridden_fields - List data; - - /// Merge two DataList - /// - /// [_data] DataList for merge with current - @override - DataList merge(DataList _data) { - final data = _data as OffsetDataList; - - final reverse = data.offset < offset; - final merged = _tryMerge(reverse ? data : this, reverse ? this : data); - if (merged == null) { - //Отрезки данных не совпадают, слияние не возможно - throw IncompatibleRangesException('incorrect data range'); - } - - this.data - ..clear() - ..addAll(merged); - - if (offset < data.offset) { - limit = data.offset + data.limit - offset; - } else if (offset == data.offset) { - limit = data.limit; - } else { - offset = data.offset; - limit = length; - } - - totalCount = data.totalCount; - return this; - } - - /// Merging two DataList with removing duplicate items - /// When you delete, the current (last sent by the server) items remain - /// - /// [data] data list for merge with current - /// [distinctPredicate] predicate by which duplicate elements are deleted - // ignore: avoid_returning_this - OffsetDataList mergeWithPredicate( - OffsetDataList data, - R Function(T item) distinctPredicate, - ) { - final reverse = data.offset < offset; - final merged = _tryMerge(reverse ? data : this, reverse ? this : data); - if (merged == null) { - throw IncompatibleRangesException('incorrect data range'); - } - - this.data - ..clear() - ..addAll(distinctByLast(merged, distinctPredicate)); - - if (offset < data.offset) { - //загрузка вниз, как обычно - limit = data.offset + data.limit - offset; - } else if (offset == data.offset) { - //коллизия? - limit = data.limit; - } else { - // загрузка вверх - offset = data.offset; - limit = length; - } - - totalCount = data.totalCount; - return this; - } - - /// Converts a dataList of one type to a dataList of another type - /// - /// [mapFunc] mapping function - @override - OffsetDataList transform(R Function(T item) mapFunc) => - OffsetDataList( - data: map(mapFunc.call).toList(), - limit: limit, - offset: offset, - totalCount: totalCount, - ); - - /// Returns the offset value from which you need to start to load the next - /// data block - int get nextOffset => limit + offset; - - int getLimit() => limit; - - int getOffset() => offset; - - int getTotalCount() => totalCount; - - /// Checking the possibility of reloading data - @override - bool get canGetMore => totalCount > limit + offset; - - List? _tryMerge(OffsetDataList to, OffsetDataList from) { - if ((to.offset + to.limit) >= from.offset) { - return _mergeLists(to.data, from.data, from.offset - to.offset); - } - - return null; - } - - List _mergeLists(List to, List from, int start) => [ - ...start < to.length ? to.sublist(0, start) : to, - ...from, - ]; - - @override - bool add(T value) { - throw Exception("Unsupported operation 'add'"); - } - - @override - bool remove(Object? value) { - throw Exception("Unsupported operation 'remove'"); - } - - bool containsAll(Iterable another) => - another.every((item) => data.contains(item)); - - @override - void addAll(Iterable iterable) { - throw Exception("Unsupported operation 'addAll'"); - } - - @override - void clear() { - super.clear(); - - limit = 0; - offset = 0; - } - - @override - List sublist(int start, [int? end]) { - throw Exception("Unsupported operation 'sublist'"); - } - - @override - String toString() { - return 'DataList {limit= $limit , offset= $offset , data= $data }'; - } - - /// Removing duplicate items from source list - /// The criterion that the elements are the same is set by the - /// distinctPredicate parameter - /// - /// [source] source list - /// [distinctPredicate] criterion that the elements are the same - List distinctByLast(List source, R Function(T) distinctPredicate) { - final resultSet = {}; - - for (final element in source) { - resultSet[distinctPredicate.call(element)] = element; - } - - return resultSet.values.toList(); - } -} diff --git a/packages/datalist/lib/src/impl/datalist_page_count.dart b/packages/datalist/lib/src/impl/datalist_page_count.dart deleted file mode 100644 index 3a70a7d48..000000000 --- a/packages/datalist/lib/src/impl/datalist_page_count.dart +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:collection'; - -import 'package:datalist/src/datalist.dart'; -import 'package:datalist/src/exceptions.dart'; - -/// Pagination List -/// Page-count mechanism -/// May merge with another DataList -class PageCountDataList extends DataList { - PageCountDataList({ - required this.data, - required this.pageSize, - required this.startPage, - this.numPages = 1, - this.totalItemsCount = unspecifiedTotalItemsCount, - this.totalPagesCount = unspecifiedTotalPagesCount, - }) : super(data); - - /// Creating an empty DataList with a limit on the maximum number of elements - /// - /// [totalItemsCount] max count of items - /// [totalPagesCount] max count of pages - factory PageCountDataList.emptyWithTotalCount( - int totalItemsCount, - int totalPagesCount, - ) => - PageCountDataList( - data: [], - startPage: unspecifiedPage, - numPages: 0, - pageSize: unspecifiedPageSize, - totalPagesCount: totalPagesCount, - totalItemsCount: totalItemsCount, - ); - - /// Create empty DataList - factory PageCountDataList.empty() => - PageCountDataList.emptyWithTotalCount(0, 0); - - /// Create empty DataList - factory PageCountDataList.emptyUnspecifiedTotal() => - PageCountDataList.emptyWithTotalCount( - unspecifiedTotalItemsCount, - unspecifiedTotalPagesCount, - ); - - static const int unspecifiedPage = -1; - static const int unspecifiedPageSize = -1; - static const int unspecifiedTotalItemsCount = -1; - static const int unspecifiedTotalPagesCount = -1; - - /// Page size - int pageSize; - - /// Which page begins - int startPage; - - /// Page count - int numPages; - - /// Max items count - int totalItemsCount; - - /// Max pages count - int totalPagesCount; - - /// List of items - @override - // ignore: overridden_fields - List data; - - /// Merge two DataList - /// - /// [_inputDataList] DataList for merge with current instance - @override - PageCountDataList merge(DataList _inputDataList) { - final inputDataList = _inputDataList as PageCountDataList; - - if (startPage != unspecifiedPage && - inputDataList.startPage != unspecifiedPage && - pageSize != inputDataList.pageSize) { - throw ArgumentError('pageSize for merging DataList must be same'); - } - - final resultPagesData = SplayTreeMap>() - ..addAll(_split()) - ..addAll(inputDataList._split()); - - final newData = []; - var lastPage = unspecifiedPage; - var lastPageItemsSize = unspecifiedPageSize; - - resultPagesData.forEach((pageNumber, pageItems) { - if (lastPage != unspecifiedPage && - (pageNumber - lastPage > 1 || lastPageItemsSize < pageSize)) { - throw IncompatibleRangesException( - 'Merging DataLists has empty space ' - 'between its ranges\noriginalList:$this\ninputList: $inputDataList', - ); - } - lastPage = pageNumber; - lastPageItemsSize = pageItems.length; - newData.addAll(pageItems); - }); - - data - ..clear() - ..addAll(newData); - - startPage = resultPagesData.entries.first.key; - numPages = lastPage - startPage + 1; - totalItemsCount = - inputDataList.totalItemsCount == unspecifiedTotalItemsCount - ? totalItemsCount - : inputDataList.totalItemsCount; - totalPagesCount = - inputDataList.totalPagesCount == unspecifiedTotalPagesCount - ? totalPagesCount - : inputDataList.totalPagesCount; - - if (inputDataList.pageSize != unspecifiedPageSize) { - pageSize = inputDataList.pageSize; - } - - return this; - } - - /// Divides data into blocks by pages - Map> _split() { - final result = >{}; - - for (var i = startPage; i < startPage + numPages; i++) { - final startItemIndex = (i - startPage) * pageSize; - final itemsRemained = data.length - startItemIndex; - final endItemIndex = startItemIndex + - (itemsRemained < pageSize ? itemsRemained : pageSize); - if (itemsRemained <= 0) { - break; - } - - result.putIfAbsent(i, () => data.sublist(startItemIndex, endItemIndex)); - } - - return result; - } - - /// Converts a DataList of one type to a DataList of another type - /// - /// [mapFunc] mapping function - @override - PageCountDataList transform(R Function(T item) mapFunc) => - PageCountDataList( - data: map(mapFunc.call).toList(), - startPage: startPage, - numPages: numPages, - pageSize: pageSize, - totalItemsCount: totalItemsCount, - totalPagesCount: totalPagesCount, - ); - - /// Checking the possibility of reloading data - @override - bool get canGetMore => - startPage == unspecifiedPage || - (data.length == (numPages - startPage + 1) * pageSize && - totalPagesCount != numPages); - - /// Returns the page value from which to start to load the next data block - int get nextPage => startPage == unspecifiedPage ? 1 : startPage + numPages; - - /// Clear data - @override - void clear() { - data.clear(); - startPage = unspecifiedPage; - pageSize = unspecifiedPageSize; - numPages = 0; - totalItemsCount = unspecifiedTotalItemsCount; - totalPagesCount = unspecifiedTotalPagesCount; - } - - @override - bool add(T value) { - throw Exception("Unsupported operation 'add'"); - } - - @override - bool remove(Object? value) { - throw Exception("Unsupported operation 'remove'"); - } - - @override - void addAll(Iterable iterable) { - throw Exception("Unsupported operation 'addAll'"); - } - - @override - String toString() { - return 'DataList{' - 'pageSize=$pageSize, ' - 'startPage=$startPage, ' - 'numPages=$numPages, ' - 'totalItemsCount=$totalItemsCount, ' - 'totalPagesCount=$totalPagesCount, ' - 'data=$data' - '}'; - } -} diff --git a/packages/datalist/pubspec.yaml b/packages/datalist/pubspec.yaml deleted file mode 100644 index c7e361f5e..000000000 --- a/packages/datalist/pubspec.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: datalist -version: 1.0.1 -description: Implementation DataList in Flutter -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/datalist" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - collection: ^1.15.0 - -dev_dependencies: - surf_lint_rules: ^1.0.0 - test: ^1.17.0 - -environment: - sdk: ">=2.12.0 <3.0.0" diff --git a/packages/datalist/test/datalist_offset_test.dart b/packages/datalist/test/datalist_offset_test.dart deleted file mode 100644 index af8f58a3e..000000000 --- a/packages/datalist/test/datalist_offset_test.dart +++ /dev/null @@ -1,405 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:datalist/src/exceptions.dart'; -import 'package:datalist/src/impl/datalist_limit_offset.dart'; -import 'package:test/test.dart'; - -void main() { - test('testCheckNormalMerge', () { - final list1 = OffsetDataList( - data: [1, 2, 3, 4, 5], - limit: 5, - totalCount: 10, - ); - final list2 = OffsetDataList( - data: [6, 7, 8, 9, 10], - limit: 5, - offset: 5, - totalCount: 5, - ); - final list3 = OffsetDataList( - data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], - limit: 10, - totalCount: 10, - ); - - list1.merge(list2); - expect(list3, equals(list1)); - }); - - test('checkNormalMergeWithOffset', () { - final list1 = OffsetDataList( - data: [1, 2, 3, 4, 5], - limit: 5, - offset: 7, - totalCount: 10, - ); - final list2 = OffsetDataList( - data: [6, 7, 8, 9, 10], - limit: 5, - offset: 12, - totalCount: 10, - ); - final list3 = OffsetDataList( - data: [6, 7, 8, 9, 10], - limit: 5, - offset: 17, - totalCount: 10, - ); - final list4 = OffsetDataList( - data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 6, 7, 8, 9, 10], - limit: 15, - offset: 7, - totalCount: 10, - ); - - list3..merge(list2)..merge(list1); - expect(list3, equals(list4)); - }); - - test('checkNormalMergeWithOffsetAndCollision', () { - final list1 = OffsetDataList( - data: [1, 2, 3, 4, 5], - limit: 5, - offset: 7, - totalCount: 10, - ); - final list2 = OffsetDataList( - data: [6, 7, 8, 9, 10], - limit: 5, - offset: 12, - totalCount: 10, - ); - final list3 = OffsetDataList( - data: [6, 7, 8, 9, 10], - limit: 5, - offset: 14, - totalCount: 10, - ); - final list4 = OffsetDataList( - data: [1, 2, 3, 4, 5, 6, 7, 6, 7, 8, 9, 10], - limit: 12, - offset: 7, - totalCount: 10, - ); - - list3..merge(list2)..merge(list1); - expect(list3, equals(list4)); - }); - - test('checkMergeWithCollision', () { - final list1 = OffsetDataList(data: [1, 2, 3], limit: 3, totalCount: 10); - final list2 = OffsetDataList(data: [6, 7], limit: 3, totalCount: 10); - final list3 = OffsetDataList(data: [6, 7], limit: 3, totalCount: 10); - - list1.merge(list2); - expect(list1, equals(list3)); - }); - - test('checkMergeWithCollision2', () { - final list1 = OffsetDataList( - data: [1, 2, 3], - limit: 3, - offset: 2, - totalCount: 10, - ); - final list2 = OffsetDataList( - data: [4, 5], - limit: 3, - offset: 4, - totalCount: 10, - ); - final list3 = OffsetDataList( - data: [1, 2, 4, 5], - limit: 5, - offset: 2, - totalCount: 10, - ); - - list1.merge(list2); - expect(list1, equals(list3)); - }); - - test('checkMergeWithCollision3', () { - final list1 = OffsetDataList( - data: [1, 2, 3, 4, 5], - limit: 5, - totalCount: 10, - ); - final list2 = OffsetDataList(data: [6, 7], limit: 3, totalCount: 10); - final list3 = OffsetDataList(data: [6, 7], limit: 3, totalCount: 10); - - list1.merge(list2); - expect(list1, equals(list3)); - }); - - test('checkMergeWithCollision4', () { - final list1 = OffsetDataList(data: [6, 7], limit: 3, totalCount: 10); - final list2 = OffsetDataList( - data: [1, 2, 3, 4, 5], - limit: 5, - totalCount: 10, - ); - final list3 = OffsetDataList( - data: [1, 2, 3, 4, 5], - limit: 5, - totalCount: 10, - ); - - list1.merge(list2); - expect(list1, equals(list3)); - }); - - test('checkMergeEmptyWithNormal', () { - final list1 = OffsetDataList.empty(); - final list2 = OffsetDataList( - data: [1, 2, 3, 4, 5], - limit: 5, - totalCount: 10, - ); - final list3 = OffsetDataList( - data: [1, 2, 3, 4, 5], - limit: 5, - totalCount: 10, - ); - - list1.merge(list2); - expect(list3, equals(list1)); - }); - - test('checkInvalidData', () { - final list1 = OffsetDataList( - data: [1, 2, 3], - limit: 3, - offset: 10, - totalCount: 10, - ); - final list2 = OffsetDataList( - data: [4, 5], - limit: 3, - offset: 4, - totalCount: 10, - ); - - try { - list1.merge(list2); - } on IncompatibleRangesException catch (e) { - expect(e.message, equals('incorrect data range')); - } - }); - - test('transformToStringDataList', () { - final intList = OffsetDataList( - data: [1, 2, 3, 4, 5], - limit: 5, - totalCount: 5, - ); - final stringList = intList.transform((i) => i.toString()); - - final expectedList = OffsetDataList( - data: ['1', '2', '3', '4', '5'], - limit: 5, - totalCount: 5, - ); - expect(expectedList, equals(stringList)); - }); - - test('checkDynamicDataInsertion', () { - const element1 = Element(1); - const element2 = Element(2); - const element3 = Element(3); - const element4 = Element(4); - const element5 = Element(5); - const element6 = Element(6); - const element7 = Element(7); - const element8 = Element(8); - - final list1 = OffsetDataList( - data: [element1, element2, element3, element4, element5], - limit: 5, - offset: 4, - totalCount: 20, - ); - - final list2 = OffsetDataList( - data: [element4, element5, element6, element7, element8], - limit: 5, - offset: 9, - totalCount: 10, - ); - - list1.mergeWithPredicate(list2, (element) => element.id); - - final list3 = OffsetDataList( - data: [ - element1, - element2, - element3, - element4, - element5, - element6, - element7, - element8, - ], - limit: 10, - offset: 4, - totalCount: 20, - ); - expect(list3, equals(list1)); - }); - - test('checkDynamicDataInsertion2', () { - const element1 = Element(1); - const element2 = Element(2); - const element3 = Element(3); - const element4 = Element(4); - const element5 = Element(5); - const element6 = Element(6); - const element7 = Element(7); - - final list1 = OffsetDataList( - data: [ - element1, - element2, - element3, - element4, - element5, - element6, - element7, - ], - limit: 7, - offset: 6, - totalCount: 30, - ); - - final list2 = OffsetDataList( - data: [ - element1, - element2, - element3, - element4, - element5, - element6, - element7, - ], - limit: 7, - offset: 13, - totalCount: 30, - ); - - final list3 = OffsetDataList( - data: [ - element1, - element2, - element3, - element4, - element5, - element6, - element7, - ], - limit: 7, - offset: 20, - totalCount: 30, - ); - - list1 - ..mergeWithPredicate(list2, (element) => element.id) - ..mergeWithPredicate(list3, (element) => element.id); - - final list4 = OffsetDataList( - data: [ - element1, - element2, - element3, - element4, - element5, - element6, - element7, - ], - limit: 21, - offset: 6, - totalCount: 30, - ); - - expect(list1, equals(list4)); - }); - - test('checkDynamicDataInsertion3', () { - const element0 = Element(0); - const element1 = Element(1); - const element2 = Element(2); - const element3 = Element(3); - const element4 = Element(4); - const element5 = Element(5); - const element6 = Element(6); - const element7 = Element(7); - const element8 = Element(8); - const element9 = Element(9); - - final list1 = OffsetDataList( - data: [element1, element2, element3, element4, element5], - limit: 5, - offset: 4, - totalCount: 30, - ); - - final list2 = OffsetDataList( - data: [element0, element1, element2, element3, element4], - limit: 5, - offset: 9, - totalCount: 30, - ); - - final list3 = OffsetDataList( - data: [element5, element6, element7, element8, element9], - limit: 5, - offset: 14, - totalCount: 30, - ); - - list1 - ..mergeWithPredicate(list2, (element) => element.id) - ..mergeWithPredicate(list3, (element) => element.id); - - final list4 = OffsetDataList( - data: [ - element1, - element2, - element3, - element4, - element5, - element0, - element6, - element7, - element8, - element9, - ], - limit: 15, - offset: 4, - totalCount: 30, - ); - - expect(list1, equals(list4)); - }); -} - -class Element { - const Element(this.id); - - final int id; - - @override - String toString() => 'Element: $id'; -} diff --git a/packages/datalist/test/datalist_pagecount_test.dart b/packages/datalist/test/datalist_pagecount_test.dart deleted file mode 100644 index 3ace04404..000000000 --- a/packages/datalist/test/datalist_pagecount_test.dart +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:datalist/src/exceptions.dart'; -import 'package:datalist/src/impl/datalist_page_count.dart'; -import 'package:test/test.dart'; - -void main() { - test('testNormalMerge', () { - final list1 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 0, - pageSize: 5, - ); - final list2 = PageCountDataList( - data: [6, 7, 8, 8, 10], - startPage: 1, - pageSize: 5, - ); - final list3 = PageCountDataList( - data: [1, 2, 3, 4, 5, 6, 7, 8, 8, 10], - startPage: 0, - pageSize: 5, - numPages: 2, - ); - - list1.merge(list2); - - expect(list1, equals(list3)); - }); - - test('testMergePagesWithSpace', () { - final list1 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 0, - pageSize: 5, - ); - final list2 = PageCountDataList( - data: [6, 7, 8, 8, 10], - startPage: 2, - pageSize: 5, - ); - - expect( - () => list1.merge(list2), - throwsA(isA()), - ); - }); - - test('testMergeNotFromFirstPage', () { - final list1 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 4, - pageSize: 5, - ); - - final list2 = PageCountDataList( - data: [6, 7, 8, 8, 10], - startPage: 5, - pageSize: 5, - ); - - final list3 = PageCountDataList( - data: [1, 2, 3, 4, 5, 6, 7, 8, 8, 10], - startPage: 4, - pageSize: 5, - numPages: 2, - ); - - list1.merge(list2); - - expect(list1, equals(list3)); - }); - - test('testMergeWithEmptyList', () { - final list1 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 0, - pageSize: 5, - ); - final list2 = PageCountDataList( - data: [], - startPage: 2, - pageSize: 5, - ); - final list3 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 0, - pageSize: 5, - ); - - list1.merge(list2); - - expect(list1, equals(list3)); - }); - - test('testMergeWithEmptyList2', () { - final list1 = PageCountDataList( - data: [], - startPage: 0, - pageSize: 5, - ); - final list2 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 2, - pageSize: 5, - ); - final list3 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 0, - pageSize: 5, - ); - - list1.merge(list2); - - expect(list1, equals(list3)); - }); - - test('testMergeEmptyListWithAnotherList', () { - final list1 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 0, - pageSize: 5, - ); - final list2 = PageCountDataList.empty(); - final list3 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 0, - pageSize: 5, - ); - - list1.merge(list2); - - expect(list1, equals(list3)); - }); - - test('testMergeWithCollision1', () { - final list1 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 2, - pageSize: 5, - ); - final list2 = PageCountDataList( - data: [6, 7, 8, 8, 10], - startPage: 1, - pageSize: 5, - ); - final list3 = PageCountDataList( - data: [6, 7, 8, 8, 10, 1, 2, 3, 4, 5], - startPage: 1, - pageSize: 5, - numPages: 2, - ); - - list1.merge(list2); - - expect(list1, equals(list3)); - }); - - test('testMergeWithCollision2', () { - final list1 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 0, - numPages: 5, - pageSize: 1, - ); - final list2 = PageCountDataList( - data: [6, 7, 8, 9, 10], - startPage: 1, - numPages: 5, - pageSize: 1, - ); - final list3 = PageCountDataList( - data: [1, 6, 7, 8, 9, 10], - startPage: 0, - pageSize: 1, - numPages: 6, - ); - - list1.merge(list2); - - expect(list1, equals(list3)); - }); - - test('testMergeWithError', () { - final list1 = PageCountDataList( - data: [1, 2, 3, 4, 5], - startPage: 2, - pageSize: 5, - ); - final list2 = PageCountDataList( - data: [6, 7, 8, 8, 10], - startPage: 1, - pageSize: 1, - ); - - try { - list1.merge(list2); - // ignore: avoid_catching_errors - } on ArgumentError catch (e) { - expect(e.message, equals('pageSize for merging DataList must be same')); - } - }); -} diff --git a/packages/in_app_rate/.gitignore b/packages/in_app_rate/.gitignore deleted file mode 100644 index e348147fd..000000000 --- a/packages/in_app_rate/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ -*.lock - -.idea - -build/ -**/android/**/GeneratedPluginRegistrant.java -ios/.generated/ -ios/Flutter/Generated.xcconfig -ios/Runner/GeneratedPluginRegistrant.* diff --git a/packages/in_app_rate/.metadata b/packages/in_app_rate/.metadata deleted file mode 100644 index a48e55650..000000000 --- a/packages/in_app_rate/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8af6b2f038c1172e61d418869363a28dffec3cb4 - channel: unknown - -project_type: plugin diff --git a/packages/in_app_rate/CHANGELOG.md b/packages/in_app_rate/CHANGELOG.md deleted file mode 100644 index 93a97a859..000000000 --- a/packages/in_app_rate/CHANGELOG.md +++ /dev/null @@ -1,10 +0,0 @@ -# Changelog - -## 1.0.0 - -* Migrate this package to null safety. - -## 0.0.1 - -* add SKStoreReviewController for iOS -* add Google Play In-App Review API for Android diff --git a/packages/in_app_rate/LICENSE b/packages/in_app_rate/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/in_app_rate/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/in_app_rate/README.md b/packages/in_app_rate/README.md deleted file mode 100644 index 7cedd4e8a..000000000 --- a/packages/in_app_rate/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# In App Rate - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/in_app_rate) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Plugin open native dialog for application rate/review. - -## Usage - -### iOS - -iOS part use [SKStoreReviewController](https://developer.apple.com/documentation/storekit/skstorereviewcontroller). -[Best Practices](https://developer.apple.com/documentation/storekit/skstorereviewcontroller/requesting_app_store_reviews) for a moment to use it. -Note from [documentation](https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview). -*** -When you call this method while your app is still in development mode, a rating/review request view is always displayed so that you can test the user interface and experience. However, this method has no effect when you call it in an app that you distribute using TestFlight. -*** - -### Android - -Android part use [Google Play In-App Review API](https://developer.android.com/guide/playcore/in-app-review). -[Best Practices](https://developer.android.com/guide/playcore/in-app-review#when-to-request) for a moment to use it. -[Testing](https://developer.android.com/guide/playcore/in-app-review/test), if you set `isTest` to `True` then plugin will use `FakeReviewManager`. - -## Installation - -Add `in_app_rate` to your `pubspec.yaml` file: - -```yaml -dependencies: - in_app_rate: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/in_app_rate/analysis_options.yaml b/packages/in_app_rate/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/in_app_rate/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/in_app_rate/android/.gitignore b/packages/in_app_rate/android/.gitignore deleted file mode 100644 index c6cbe562a..000000000 --- a/packages/in_app_rate/android/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures diff --git a/packages/in_app_rate/android/build.gradle b/packages/in_app_rate/android/build.gradle deleted file mode 100644 index 0d1e762a1..000000000 --- a/packages/in_app_rate/android/build.gradle +++ /dev/null @@ -1,48 +0,0 @@ -group 'ru.surfstudio.in_app_rate' -version '1.0-SNAPSHOT' - -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -rootProject.allprojects { - repositories { - google() - jcenter() - } -} - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - defaultConfig { - minSdkVersion 16 - } - lintOptions { - disable 'InvalidPackage' - } -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - - implementation 'com.google.android.play:core:1.8.0' - - // For Kotlin users also import the Kotlin extensions library for Play Core: - implementation 'com.google.android.play:core-ktx:1.8.1' -} diff --git a/packages/in_app_rate/android/gradle.properties b/packages/in_app_rate/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/packages/in_app_rate/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/in_app_rate/android/gradle/wrapper/gradle-wrapper.properties b/packages/in_app_rate/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 01a286e96..000000000 --- a/packages/in_app_rate/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/in_app_rate/android/settings.gradle b/packages/in_app_rate/android/settings.gradle deleted file mode 100644 index c1bd55162..000000000 --- a/packages/in_app_rate/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'in_app_rate' diff --git a/packages/in_app_rate/android/src/main/AndroidManifest.xml b/packages/in_app_rate/android/src/main/AndroidManifest.xml deleted file mode 100644 index 7b789e865..000000000 --- a/packages/in_app_rate/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/packages/in_app_rate/android/src/main/kotlin/ru/surfstudio/in_app_rate/InAppRatePlugin.kt b/packages/in_app_rate/android/src/main/kotlin/ru/surfstudio/in_app_rate/InAppRatePlugin.kt deleted file mode 100644 index 526813871..000000000 --- a/packages/in_app_rate/android/src/main/kotlin/ru/surfstudio/in_app_rate/InAppRatePlugin.kt +++ /dev/null @@ -1,106 +0,0 @@ -package ru.surfstudio.in_app_rate - -import android.app.Activity -import androidx.annotation.NonNull; -import com.google.android.play.core.review.ReviewManager -import com.google.android.play.core.review.ReviewManagerFactory -import com.google.android.play.core.review.testing.FakeReviewManager - -import io.flutter.embedding.engine.plugins.activity.ActivityAware -import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding -import io.flutter.embedding.engine.plugins.FlutterPlugin -import io.flutter.plugin.common.MethodCall -import io.flutter.plugin.common.MethodChannel -import io.flutter.plugin.common.MethodChannel.MethodCallHandler -import io.flutter.plugin.common.MethodChannel.Result -import io.flutter.plugin.common.PluginRegistry.Registrar - -/// Channel -const val channelName = "in_app_rate" - -/// Methods -const val openRatingDialog = "openRatingDialog" - -/// Arguments -const val isTestEnvironment = "isTestEnvironment" - -/** InAppRatePlugin */ -public class InAppRatePlugin : FlutterPlugin, MethodCallHandler, ActivityAware { - private lateinit var channel: MethodChannel - - override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { - channel = MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), channelName) - channel.setMethodCallHandler(this); - } - - companion object { - private var activity: Activity? = null - - @JvmStatic - fun registerWith(registrar: Registrar) { - val channel = MethodChannel(registrar.messenger(), channelName) - InAppRatePlugin.activity = registrar.activity() - channel.setMethodCallHandler(InAppRatePlugin()) - } - } - - override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { - when (call.method) { - openRatingDialog -> { - openDialog(call, result) - } - else -> result.notImplemented() - } - } - - override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { - channel.setMethodCallHandler(null) - } - - /// ActivityAware - override fun onAttachedToActivity(binding: ActivityPluginBinding) { - activity = binding.getActivity() - } - - override fun onDetachedFromActivity() { - activity = null - } - - override fun onDetachedFromActivityForConfigChanges() { - onDetachedFromActivity() - } - - override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) { - activity = binding.getActivity() - } - - /// Methods - private fun openDialog(call: MethodCall, flutterResult: Result) { - if (activity != null) { - val params = call.arguments as Map - val isTest = params[isTestEnvironment] as Boolean? - - var manager = if (isTest == true) FakeReviewManager(activity!!.applicationContext) else ReviewManagerFactory.create(activity!!.applicationContext) - val request = manager.requestReviewFlow() - request.addOnCompleteListener { request -> - if (request.isSuccessful) { - val flow = manager.launchReviewFlow(activity!!, request.result) - flow.addOnCompleteListener { _ -> - // The flow has finished. The API does not indicate whether the user - // reviewed or not, or even whether the review dialog was shown. Thus, no - // matter the result, we continue our app flow. - - flutterResult.success(flow.isSuccessful) - } - } else { - if (request.exception != null) { - flutterResult.error(request.exception.hashCode().toString(), request.exception?.message, null) - } else { - flutterResult.error("404", "Undefined", null) - } - - } - } - } - } -} diff --git a/packages/in_app_rate/example/.gitignore b/packages/in_app_rate/example/.gitignore deleted file mode 100644 index 1ba9c339e..000000000 --- a/packages/in_app_rate/example/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Exceptions to above rules. -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/in_app_rate/example/.metadata b/packages/in_app_rate/example/.metadata deleted file mode 100644 index 5428a4822..000000000 --- a/packages/in_app_rate/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8af6b2f038c1172e61d418869363a28dffec3cb4 - channel: unknown - -project_type: app diff --git a/packages/in_app_rate/example/analysis_options.yaml b/packages/in_app_rate/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/in_app_rate/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/in_app_rate/example/android/.gitignore b/packages/in_app_rate/example/android/.gitignore deleted file mode 100644 index bc2100d8f..000000000 --- a/packages/in_app_rate/example/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/packages/in_app_rate/example/android/app/build.gradle b/packages/in_app_rate/example/android/app/build.gradle deleted file mode 100644 index a2a6f19e2..000000000 --- a/packages/in_app_rate/example/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "ru.surfstudio.in_app_rate_example" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/in_app_rate/example/android/app/src/debug/AndroidManifest.xml b/packages/in_app_rate/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 77f9f9b91..000000000 --- a/packages/in_app_rate/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/in_app_rate/example/android/app/src/main/AndroidManifest.xml b/packages/in_app_rate/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 10ff25884..000000000 --- a/packages/in_app_rate/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/in_app_rate/example/android/app/src/main/kotlin/ru/surfstudio/in_app_rate_example/MainActivity.kt b/packages/in_app_rate/example/android/app/src/main/kotlin/ru/surfstudio/in_app_rate_example/MainActivity.kt deleted file mode 100644 index 33cbb82a3..000000000 --- a/packages/in_app_rate/example/android/app/src/main/kotlin/ru/surfstudio/in_app_rate_example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package ru.surfstudio.in_app_rate_example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/in_app_rate/example/android/app/src/main/res/drawable/launch_background.xml b/packages/in_app_rate/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/in_app_rate/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/in_app_rate/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/in_app_rate/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/in_app_rate/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/in_app_rate/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/in_app_rate/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/in_app_rate/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/in_app_rate/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/in_app_rate/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/in_app_rate/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/in_app_rate/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/in_app_rate/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/in_app_rate/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/in_app_rate/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/in_app_rate/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/in_app_rate/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/in_app_rate/example/android/app/src/main/res/values/styles.xml b/packages/in_app_rate/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33fd..000000000 --- a/packages/in_app_rate/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/in_app_rate/example/android/app/src/profile/AndroidManifest.xml b/packages/in_app_rate/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 77f9f9b91..000000000 --- a/packages/in_app_rate/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/in_app_rate/example/android/build.gradle b/packages/in_app_rate/example/android/build.gradle deleted file mode 100644 index 3100ad2d5..000000000 --- a/packages/in_app_rate/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/in_app_rate/example/android/gradle.properties b/packages/in_app_rate/example/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/packages/in_app_rate/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/in_app_rate/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/in_app_rate/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/packages/in_app_rate/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/in_app_rate/example/android/settings.gradle b/packages/in_app_rate/example/android/settings.gradle deleted file mode 100644 index d3b6a4013..000000000 --- a/packages/in_app_rate/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/packages/in_app_rate/example/ios/.gitignore b/packages/in_app_rate/example/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/packages/in_app_rate/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/in_app_rate/example/ios/Flutter/AppFrameworkInfo.plist b/packages/in_app_rate/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/in_app_rate/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/in_app_rate/example/ios/Flutter/Debug.xcconfig b/packages/in_app_rate/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba114..000000000 --- a/packages/in_app_rate/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/in_app_rate/example/ios/Flutter/Release.xcconfig b/packages/in_app_rate/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e9340e..000000000 --- a/packages/in_app_rate/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/in_app_rate/example/ios/Podfile b/packages/in_app_rate/example/ios/Podfile deleted file mode 100644 index 1e8c3c90a..000000000 --- a/packages/in_app_rate/example/ios/Podfile +++ /dev/null @@ -1,41 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/packages/in_app_rate/example/ios/Runner.xcodeproj/project.pbxproj b/packages/in_app_rate/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index afe226898..000000000 --- a/packages/in_app_rate/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,584 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - DC1563F09486AEF5BFE43418 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DA83156423BBFF50F91730A /* Pods_Runner.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 48768413C53767BB71E2E902 /* 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 = ""; }; - 4DA83156423BBFF50F91730A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 8BF957E0066530D36FCCD485 /* 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 = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E3D2E741A6113347288B37E7 /* 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DC1563F09486AEF5BFE43418 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 177AF58093BFDC63CDB187A5 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 4DA83156423BBFF50F91730A /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 7639819E7336A7123126EA57 /* Pods */ = { - isa = PBXGroup; - children = ( - E3D2E741A6113347288B37E7 /* Pods-Runner.debug.xcconfig */, - 8BF957E0066530D36FCCD485 /* Pods-Runner.release.xcconfig */, - 48768413C53767BB71E2E902 /* Pods-Runner.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - 7639819E7336A7123126EA57 /* Pods */, - 177AF58093BFDC63CDB187A5 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - D9669168551416493BF35AAB /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 5D411563473B91BFF536DDC6 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 5D411563473B91BFF536DDC6 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - D9669168551416493BF35AAB /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "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"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 9XE57L34DX; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = ru.surfstudio.inAppRateExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 9XE57L34DX; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = ru.surfstudio.inAppRateExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 9XE57L34DX; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = ru.surfstudio.inAppRateExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/in_app_rate/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/in_app_rate/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/in_app_rate/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/in_app_rate/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/in_app_rate/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/in_app_rate/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/in_app_rate/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/in_app_rate/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/in_app_rate/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/in_app_rate/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/in_app_rate/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/in_app_rate/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/in_app_rate/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/in_app_rate/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14c..000000000 --- a/packages/in_app_rate/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/packages/in_app_rate/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/in_app_rate/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/in_app_rate/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/in_app_rate/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/in_app_rate/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/in_app_rate/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/in_app_rate/example/ios/Runner/AppDelegate.swift b/packages/in_app_rate/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/in_app_rate/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/in_app_rate/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/in_app_rate/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/in_app_rate/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/in_app_rate/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/in_app_rate/example/ios/Runner/Base.lproj/Main.storyboard b/packages/in_app_rate/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/in_app_rate/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/in_app_rate/example/ios/Runner/Info.plist b/packages/in_app_rate/example/ios/Runner/Info.plist deleted file mode 100644 index 587e91861..000000000 --- a/packages/in_app_rate/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - in_app_rate_example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/in_app_rate/example/ios/Runner/Runner-Bridging-Header.h b/packages/in_app_rate/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/packages/in_app_rate/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/in_app_rate/example/lib/main.dart b/packages/in_app_rate/example/lib/main.dart deleted file mode 100644 index 036ff5cd4..000000000 --- a/packages/in_app_rate/example/lib/main.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:in_app_rate/in_app_rate.dart'; - -// ignore_for_file: avoid_print - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatefulWidget { - const MyApp({Key? key}) : super(key: key); - - @override - _MyAppState createState() => _MyAppState(); -} - -class _MyAppState extends State { - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - appBar: AppBar( - title: const Text('Plugin example app'), - ), - body: Center( - child: ElevatedButton( - onPressed: () async { - final isSuccess = await InAppRate.openRatingDialog( - onError: () => - print('Error: try open url to application store'), - ); -// final isSuccess = await InAppRate.openRatingDialog(isTest: false) -// .catchError((error) { -// return false; -// }); - print('result is - $isSuccess'); - }, - child: const Text('Open dialog'), - ), - ), - ), - ); - } -} diff --git a/packages/in_app_rate/example/pubspec.yaml b/packages/in_app_rate/example/pubspec.yaml deleted file mode 100644 index 1d8d921ad..000000000 --- a/packages/in_app_rate/example/pubspec.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: in_app_rate_example -description: Demonstrates how to use the in_app_rate plugin. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - in_app_rate: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/in_app_rate/ios/.gitignore b/packages/in_app_rate/ios/.gitignore deleted file mode 100644 index aa479fd3c..000000000 --- a/packages/in_app_rate/ios/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/Generated.xcconfig -/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/in_app_rate/ios/Assets/.gitkeep b/packages/in_app_rate/ios/Assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/in_app_rate/ios/Classes/InAppRatePlugin.h b/packages/in_app_rate/ios/Classes/InAppRatePlugin.h deleted file mode 100644 index 339d27595..000000000 --- a/packages/in_app_rate/ios/Classes/InAppRatePlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface InAppRatePlugin : NSObject -@end diff --git a/packages/in_app_rate/ios/Classes/InAppRatePlugin.m b/packages/in_app_rate/ios/Classes/InAppRatePlugin.m deleted file mode 100644 index 2c433650a..000000000 --- a/packages/in_app_rate/ios/Classes/InAppRatePlugin.m +++ /dev/null @@ -1,15 +0,0 @@ -#import "InAppRatePlugin.h" -#if __has_include() -#import -#else -// Support project import fallback if the generated compatibility header -// is not copied when this plugin is created as a library. -// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 -#import "in_app_rate-Swift.h" -#endif - -@implementation InAppRatePlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - [SwiftInAppRatePlugin registerWithRegistrar:registrar]; -} -@end diff --git a/packages/in_app_rate/ios/Classes/SwiftInAppRatePlugin.swift b/packages/in_app_rate/ios/Classes/SwiftInAppRatePlugin.swift deleted file mode 100644 index a352dcf86..000000000 --- a/packages/in_app_rate/ios/Classes/SwiftInAppRatePlugin.swift +++ /dev/null @@ -1,42 +0,0 @@ -import Flutter -import UIKit -import StoreKit - -/// Channel -let channelName = "in_app_rate" - -/// Methods -let openRatingDialogMethod = "openRatingDialog" - -/// Arguments -let isTestEnvironment = "isTestEnvironment" - -public class SwiftInAppRatePlugin: NSObject, FlutterPlugin { - public static func register(with registrar: FlutterPluginRegistrar) { - let channel = FlutterMethodChannel(name: channelName, binaryMessenger: registrar.messenger()) - let instance = SwiftInAppRatePlugin() - registrar.addMethodCallDelegate(instance, channel: channel) - } - - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { - switch call.method { - case openRatingDialogMethod: - openRatingDialog(result) - default: - result(FlutterMethodNotImplemented) - } - } - - private func openRatingDialog(_ result: FlutterResult) { - if #available(iOS 10.3, *) { - SKStoreReviewController.requestReview() - result(true) - } else { - result( - FlutterError( code: "low version", - message: "iOS version is Low, min - 10.3", - details: nil) - ) - } - } -} diff --git a/packages/in_app_rate/ios/in_app_rate.podspec b/packages/in_app_rate/ios/in_app_rate.podspec deleted file mode 100644 index 709f995cd..000000000 --- a/packages/in_app_rate/ios/in_app_rate.podspec +++ /dev/null @@ -1,23 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint in_app_rate.podspec' to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'in_app_rate' - s.version = '0.0.1' - s.summary = 'plugin to open native rating dialog' - s.description = <<-DESC -plugin to open native rating dialog - DESC - s.homepage = 'http://example.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.dependency 'Flutter' - s.platform = :ios, '8.0' - - # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } - s.swift_version = '5.0' -end diff --git a/packages/in_app_rate/lib/exception.dart b/packages/in_app_rate/lib/exception.dart deleted file mode 100644 index 84301f1a3..000000000 --- a/packages/in_app_rate/lib/exception.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Google Play Store has low version or not installed -class PlayServiceNotEnabled implements Exception {} - -/// iOS version is lower then 10.3 -class IOSVersionIsLow implements Exception {} diff --git a/packages/in_app_rate/lib/in_app_rate.dart b/packages/in_app_rate/lib/in_app_rate.dart deleted file mode 100644 index a20300a4f..000000000 --- a/packages/in_app_rate/lib/in_app_rate.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:in_app_rate/exception.dart'; - -/// Channel -const String channelName = 'in_app_rate'; - -/// Methods -const String openRatingDialogMethod = 'openRatingDialog'; - -/// Arguments -const _isTestEnvironment = 'isTestEnvironment'; - -class InAppRate { - static const _channel = MethodChannel(channelName); - - /// Show rating dialog to user - /// - /// [isTest] Replace manager with fake manager, only Android - /// [onError] Callback on nativeError, - /// you could open link to application store - static Future openRatingDialog({ - bool isTest = false, - VoidCallback? onError, - }) { - return _channel.invokeMethod( - openRatingDialogMethod, - {_isTestEnvironment: isTest}, - ).catchError( - // ignore: avoid_types_on_closure_parameters - (Object? error) { - if (onError != null) { - onError(); - return false; - } - Platform.isAndroid - ? throw PlayServiceNotEnabled() - : throw IOSVersionIsLow(); - }, - ); - } -} diff --git a/packages/in_app_rate/pubspec.yaml b/packages/in_app_rate/pubspec.yaml deleted file mode 100644 index fd22723f1..000000000 --- a/packages/in_app_rate/pubspec.yaml +++ /dev/null @@ -1,36 +0,0 @@ -name: in_app_rate -version: "1.0.0" -description: "Plugin use in-app review and App Store Review" -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/in_app_rate" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" -publish_to: none - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=2.0.0" - -flutter: - plugin: - platforms: - android: - package: ru.surfstudio.in_app_rate - pluginClass: InAppRatePlugin - ios: - pluginClass: InAppRatePlugin - -custom: - is_stable: false - unstable_version: - is_plugin: true - path: in_app_rate - separate_repo_url: - hostUrl: diff --git a/packages/in_app_rate/test/in_app_rate_test.dart b/packages/in_app_rate/test/in_app_rate_test.dart deleted file mode 100644 index 76a0d0939..000000000 --- a/packages/in_app_rate/test/in_app_rate_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:in_app_rate/in_app_rate.dart'; - -void main() { - const channel = MethodChannel(channelName); - - TestWidgetsFlutterBinding.ensureInitialized(); - - setUp(() { - channel.setMockMethodCallHandler((methodCall) async { - switch (methodCall.method) { - case openRatingDialogMethod: - return true; - } - }); - }); - - tearDown(() { - channel.setMockMethodCallHandler(null); - }); - - test(openRatingDialogMethod, () async { - expect(await InAppRate.openRatingDialog(), true); - }); -} diff --git a/packages/ink_widget/.gitignore b/packages/ink_widget/.gitignore deleted file mode 100644 index bb431f0d5..000000000 --- a/packages/ink_widget/.gitignore +++ /dev/null @@ -1,75 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Flutter.podspec -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/ink_widget/.metadata b/packages/ink_widget/.metadata deleted file mode 100644 index 1b5cec022..000000000 --- a/packages/ink_widget/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 27321ebbad34b0a3fafe99fac037102196d655ff - channel: stable - -project_type: app diff --git a/packages/ink_widget/CHANGELOG.md b/packages/ink_widget/CHANGELOG.md deleted file mode 100644 index d4e884c2f..000000000 --- a/packages/ink_widget/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changelog - -## 2.0.1 - 2021-05-30 - -* Stable release - -## 2.0.1-dev.1 - 2021-05-25 - -* Apply new lint rules. - -## 2.0.0 - -* Migrate this package to null safety. - -## 1.0.0-dev.3 - -* Fix lint hints - -## 1.0.0-dev.0 - -* Added `InkWidget` wrapper widget over InkWell diff --git a/packages/ink_widget/LICENSE b/packages/ink_widget/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/ink_widget/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/ink_widget/README.md b/packages/ink_widget/README.md deleted file mode 100644 index bb5799fee..000000000 --- a/packages/ink_widget/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# Ink Widget - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/ink_widget) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=ink_widget&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/ink_widget?logo=dart&logoColor=white)](https://pub.dev/packages/ink_widget) -[![Pub Likes](https://badgen.net/pub/likes/ink_widget)](https://pub.dev/packages/ink_widget) -[![Pub popularity](https://badgen.net/pub/popularity/ink_widget)](https://pub.dev/packages/ink_widget/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/ink_widget) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru/). - -## About - -Widget library with ink effect without problems with decoration for child. - -## Installation - -Add ink widget to your `pubspec.yaml` file: - -```yaml -dependencies: - ink_widget: ^2.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/ink_widget/analysis_options.yaml b/packages/ink_widget/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/ink_widget/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/ink_widget/example/.gitignore b/packages/ink_widget/example/.gitignore deleted file mode 100644 index de88f70af..000000000 --- a/packages/ink_widget/example/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# iOS/XCode related -**/ios/Flutter/flutter_export_environment.sh -**/ios/Podfile - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Exceptions to above rules. -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/ink_widget/example/.metadata b/packages/ink_widget/example/.metadata deleted file mode 100644 index 6ac2303db..000000000 --- a/packages/ink_widget/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: f7a6a7906be96d2288f5d63a5a54c515a6e987fe - channel: stable - -project_type: app diff --git a/packages/ink_widget/example/analysis_options.yaml b/packages/ink_widget/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/ink_widget/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/ink_widget/example/android/.gitignore b/packages/ink_widget/example/android/.gitignore deleted file mode 100644 index bc2100d8f..000000000 --- a/packages/ink_widget/example/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/packages/ink_widget/example/android/app/build.gradle b/packages/ink_widget/example/android/app/build.gradle deleted file mode 100644 index 320be2219..000000000 --- a/packages/ink_widget/example/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/ink_widget/example/android/app/src/debug/AndroidManifest.xml b/packages/ink_widget/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/ink_widget/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/ink_widget/example/android/app/src/main/AndroidManifest.xml b/packages/ink_widget/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 55ca830c3..000000000 --- a/packages/ink_widget/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/ink_widget/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/ink_widget/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e793a000d..000000000 --- a/packages/ink_widget/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/ink_widget/example/android/app/src/main/res/drawable/launch_background.xml b/packages/ink_widget/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/ink_widget/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/ink_widget/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/ink_widget/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/ink_widget/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/ink_widget/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/ink_widget/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/ink_widget/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/ink_widget/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/ink_widget/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/ink_widget/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/ink_widget/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/ink_widget/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/ink_widget/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/ink_widget/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/ink_widget/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/ink_widget/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/ink_widget/example/android/app/src/main/res/values/styles.xml b/packages/ink_widget/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33fd..000000000 --- a/packages/ink_widget/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/ink_widget/example/android/app/src/profile/AndroidManifest.xml b/packages/ink_widget/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/ink_widget/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/ink_widget/example/android/build.gradle b/packages/ink_widget/example/android/build.gradle deleted file mode 100644 index 3100ad2d5..000000000 --- a/packages/ink_widget/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/ink_widget/example/android/gradle.properties b/packages/ink_widget/example/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/packages/ink_widget/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/ink_widget/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/ink_widget/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/packages/ink_widget/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/ink_widget/example/android/settings.gradle b/packages/ink_widget/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/ink_widget/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/ink_widget/example/ios/.gitignore b/packages/ink_widget/example/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/packages/ink_widget/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/ink_widget/example/ios/Flutter/AppFrameworkInfo.plist b/packages/ink_widget/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/ink_widget/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/ink_widget/example/ios/Flutter/Debug.xcconfig b/packages/ink_widget/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/ink_widget/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/ink_widget/example/ios/Flutter/Release.xcconfig b/packages/ink_widget/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/ink_widget/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/ink_widget/example/ios/Runner.xcodeproj/project.pbxproj b/packages/ink_widget/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index d59cc08fb..000000000 --- a/packages/ink_widget/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,503 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/ink_widget/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/ink_widget/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/packages/ink_widget/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/ink_widget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/ink_widget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/ink_widget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/ink_widget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/ink_widget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/ink_widget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/ink_widget/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/ink_widget/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/ink_widget/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ink_widget/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/ink_widget/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/ink_widget/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/ink_widget/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/ink_widget/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/ink_widget/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/ink_widget/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/ink_widget/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/ink_widget/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/ink_widget/example/ios/Runner/AppDelegate.swift b/packages/ink_widget/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/ink_widget/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/ink_widget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/ink_widget/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/ink_widget/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/ink_widget/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ink_widget/example/ios/Runner/Base.lproj/Main.storyboard b/packages/ink_widget/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/ink_widget/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ink_widget/example/ios/Runner/Info.plist b/packages/ink_widget/example/ios/Runner/Info.plist deleted file mode 100644 index a060db61e..000000000 --- a/packages/ink_widget/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/ink_widget/example/ios/Runner/Runner-Bridging-Header.h b/packages/ink_widget/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/packages/ink_widget/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/ink_widget/example/lib/main.dart b/packages/ink_widget/example/lib/main.dart deleted file mode 100644 index 54046de7a..000000000 --- a/packages/ink_widget/example/lib/main.dart +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:ink_widget/ink_widget.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'InkWidget example', - theme: ThemeData( - primarySwatch: Colors.blue, - visualDensity: VisualDensity.adaptivePlatformDensity, - ), - home: const MyHomePage(title: 'InkWidget example'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({ - required this.title, - Key? key, - }) : super(key: key); - - final String title; - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - InkWidget( - onTap: () {}, - splashColor: Colors.green, - child: const Text('default InkWidget'), - ), - const SizedBox(height: 20), - InkWidget( - disable: true, - onTap: () {}, - child: const Text('disable InkWidget'), - ), - const SizedBox(height: 20), - InkWidget( - shapeBorder: const RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(20)), - ), - onTap: () {}, - child: Container( - padding: const EdgeInsets.all(10), - decoration: const BoxDecoration( - color: Colors.red, - borderRadius: BorderRadius.all( - Radius.circular(20), - ), - ), - child: const Text('Container with BoxDecoration'), - ), - ), - const SizedBox(height: 20), - InkWidget( - onTap: () {}, - inkWellWidget: InkWell(onTap: () {}), - child: const Text('Custom InkWell (see code)'), - ), - const SizedBox(height: 20), - InkWidget( - disable: true, - onTap: () {}, - disableWidget: Container( - height: 50, - color: Colors.white.withOpacity(.2), - child: const Align( - alignment: Alignment.bottomLeft, - child: Text('text in disableWidget'), - ), - ), - child: const Text('Custom disableWidget (see code)'), - ), - ], - ), - ), - ); - } -} diff --git a/packages/ink_widget/example/pubspec.yaml b/packages/ink_widget/example/pubspec.yaml deleted file mode 100644 index 658e73c23..000000000 --- a/packages/ink_widget/example/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: example -description: A new Flutter application. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - ink_widget: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/ink_widget/lib/ink_widget.dart b/packages/ink_widget/lib/ink_widget.dart deleted file mode 100644 index 977ac00e4..000000000 --- a/packages/ink_widget/lib/ink_widget.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:ink_widget/src/ink_widget.dart'; diff --git a/packages/ink_widget/lib/src/disable_widget.dart b/packages/ink_widget/lib/src/disable_widget.dart deleted file mode 100644 index 528d1c50d..000000000 --- a/packages/ink_widget/lib/src/disable_widget.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; - -/// Disable widget for usage in InkWidget -class DisableWidget extends StatelessWidget { - const DisableWidget({ - required this.color, - required this.opacity, - Key? key, - this.decoration, - this.defaultDecorationShape, - }) : super(key: key); - - final Color color; - final double opacity; - - final Decoration? decoration; - final ShapeBorder? defaultDecorationShape; - - @override - Widget build(BuildContext context) { - return Positioned.fill( - child: Opacity( - opacity: opacity, - child: Container( - color: (decoration == null && defaultDecorationShape == null) - ? color - : null, - decoration: decoration ?? _defaultDecoration(), - ), - ), - ); - } - - Decoration? _defaultDecoration() { - return defaultDecorationShape != null - ? ShapeDecoration(color: color, shape: defaultDecorationShape!) - : null; - } -} diff --git a/packages/ink_widget/lib/src/ink_widget.dart b/packages/ink_widget/lib/src/ink_widget.dart deleted file mode 100644 index 1ec02bddb..000000000 --- a/packages/ink_widget/lib/src/ink_widget.dart +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:ink_widget/src/disable_widget.dart'; - -const _defaultOpacity = 0.5; - -/// Wrapper for InkWell -/// Solves the problem when Material effects overlap with a child’s decoration -class InkWidget extends StatelessWidget { - InkWidget({ - required this.child, - Key? key, - this.disable = false, - this.disableOpacity = _defaultOpacity, - Color? disableColor, - this.disableWidget, - this.shape, - this.shapeBorder, - this.inkWellWidget, - this.onTap, - this.onDoubleTap, - this.onLongPress, - this.onTapDown, - this.onTapCancel, - this.onHighlightChanged, - this.onHover, - this.focusColor, - this.hoverColor, - this.highlightColor, - this.splashColor, - this.splashFactory, - this.radius, - this.borderRadius, - this.customBorder, - this.enableFeedback = true, - this.excludeFromSemantics = false, - this.focusNode, - this.canRequestFocus = true, - this.onFocusChange, - this.autofocus = false, - }) : disableColor = - disableColor ?? Colors.black.withOpacity(_defaultOpacity), - super(key: key); - - final Widget child; - - /// true - disable the widget - /// false enable the widget - final bool disable; - - /// opacity for disabled state - final double disableOpacity; - - /// color for disabled state - final Color disableColor; - - /// shape for InkWell and disable widget - final ShapeDecoration? shape; - - /// shape border for InkWell and disable widget - final ShapeBorder? shapeBorder; - - /// custom disable widget - final Widget? disableWidget; - - /// custom InlWell Widget - final InkWell? inkWellWidget; - - /// Parameters from InkWell - final GestureTapCallback? onTap; - final GestureTapCallback? onDoubleTap; - final GestureLongPressCallback? onLongPress; - final GestureTapDownCallback? onTapDown; - final GestureTapCancelCallback? onTapCancel; - final ValueChanged? onHighlightChanged; - final ValueChanged? onHover; - final Color? focusColor; - final Color? hoverColor; - final Color? highlightColor; - final Color? splashColor; - final InteractiveInkFeatureFactory? splashFactory; - final double? radius; - final BorderRadius? borderRadius; - final ShapeBorder? customBorder; - final bool enableFeedback; - final bool excludeFromSemantics; - final FocusNode? focusNode; - final bool canRequestFocus; - final ValueChanged? onFocusChange; - final bool autofocus; - - @override - Widget build(BuildContext context) { - return Stack( - children: [ - child, - Positioned.fill( - child: Material( - type: MaterialType.transparency, - child: inkWellWidget ?? _buildDefaultInkWell(), - ), - ), - if (disable) - disableWidget ?? - DisableWidget( - color: disableColor, - opacity: disableOpacity, - decoration: shape, - defaultDecorationShape: shapeBorder, - ), - ], - ); - } - - // ignore: avoid-returning-widgets - InkWell _buildDefaultInkWell() => InkWell( - customBorder: customBorder ?? shapeBorder, - onTap: onTap, - onDoubleTap: onDoubleTap, - onLongPress: onLongPress, - onTapDown: onTapDown, - onTapCancel: onTapCancel, - onHighlightChanged: onHighlightChanged, - onHover: onHover, - focusColor: focusColor, - hoverColor: hoverColor, - highlightColor: highlightColor, - splashColor: splashColor, - splashFactory: splashFactory, - radius: radius, - borderRadius: borderRadius, - enableFeedback: enableFeedback, - excludeFromSemantics: excludeFromSemantics, - focusNode: focusNode, - canRequestFocus: canRequestFocus, - onFocusChange: onFocusChange, - autofocus: autofocus, - ); -} diff --git a/packages/ink_widget/pubspec.yaml b/packages/ink_widget/pubspec.yaml deleted file mode 100644 index 8ffb7292f..000000000 --- a/packages/ink_widget/pubspec.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: ink_widget -version: 2.0.1 -description: Widget library with ink effect without problems with decoration for child. -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/ink_widget" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: diff --git a/packages/ink_widget/test/disable_widget_test.dart b/packages/ink_widget/test/disable_widget_test.dart deleted file mode 100644 index 533cd04f0..000000000 --- a/packages/ink_widget/test/disable_widget_test.dart +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:ink_widget/src/disable_widget.dart'; - -import 'utils.dart'; - -void main() { - group('DisableWidget builds', () { - testWidgets( - "with passed color if we don't pass decoration", - (tester) async { - await tester.pumpWidget( - makeTestableWidget( - const DisableWidget(color: Colors.white, opacity: 0.5), - ), - ); - - final typeFinder = find.byWidgetPredicate( - (widget) => widget is Container && widget.color == Colors.white, - ); - - expect(typeFinder, findsOneWidget); - }, - ); - - testWidgets('without passed color if we pass decoration', (tester) async { - await tester.pumpWidget( - makeTestableWidget( - const DisableWidget( - color: Colors.white, - opacity: 0.5, - decoration: ShapeDecoration(shape: RoundedRectangleBorder()), - ), - ), - ); - - final typeFinder = find.byWidgetPredicate( - (widget) => widget is Container && widget.color == null, - ); - - expect(typeFinder, findsOneWidget); - }); - - testWidgets( - "without decoration if we don't pass decaration and shape border", - (tester) async { - await tester.pumpWidget( - makeTestableWidget( - const DisableWidget( - color: Colors.white, - opacity: 0.5, - ), - ), - ); - - final typeFinder = find.byWidgetPredicate( - (widget) => widget is Container && widget.decoration == null, - ); - - expect(typeFinder, findsOneWidget); - }, - ); - - testWidgets('with passed decoration', (tester) async { - const decoration = ShapeDecoration(shape: RoundedRectangleBorder()); - - await tester.pumpWidget( - makeTestableWidget( - const DisableWidget( - color: Colors.white, - opacity: 0.5, - decoration: decoration, - ), - ), - ); - - final typeFinder = find.byWidgetPredicate( - (widget) => widget is Container && widget.decoration == decoration, - ); - - expect(typeFinder, findsOneWidget); - }); - - testWidgets( - 'with default decoration if passed shape for it', - (tester) async { - const shape = RoundedRectangleBorder(); - - await tester.pumpWidget( - makeTestableWidget( - const DisableWidget( - color: Colors.white, - opacity: 0.5, - key: Key('example'), - defaultDecorationShape: shape, - ), - ), - ); - - final typeFinder = find.byWidgetPredicate((widget) => - widget is Container && - widget.decoration is ShapeDecoration && - (widget.decoration as ShapeDecoration).shape == shape); - - expect(typeFinder, findsOneWidget); - }, - ); - }); -} diff --git a/packages/ink_widget/test/ink_widget_test.dart b/packages/ink_widget/test/ink_widget_test.dart deleted file mode 100644 index 4f06ccd56..000000000 --- a/packages/ink_widget/test/ink_widget_test.dart +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:ink_widget/src/disable_widget.dart'; -import 'package:ink_widget/src/ink_widget.dart'; - -import 'utils.dart'; - -void main() { - const defaultOpacity = 0.5; - group('InkWidget builds', () { - group('in disable state if passed active disable argument', () { - testWidgets('with custom disable state arguments', (tester) async { - const text = 'default InkWidget'; - const disableColor = Colors.green; - const disableOpacity = 1.0; - const shapeDecoration = - ShapeDecoration(shape: Border(), color: Colors.yellow); - const defaultDecorationShape = Border(); - - await tester.pumpWidget(makeTestableWidget(InkWidget( - onTap: () {}, - disable: true, - disableColor: disableColor, - disableOpacity: disableOpacity, - shape: shapeDecoration, - shapeBorder: defaultDecorationShape, - child: const Text(text), - ))); - - final typeFinder = find.byWidgetPredicate((widget) => - widget is DisableWidget && - widget.color == disableColor && - widget.opacity == disableOpacity && - widget.decoration == shapeDecoration && - widget.defaultDecorationShape == defaultDecorationShape); - - expect(typeFinder, findsOneWidget); - }); - - testWidgets('without any disable state arguments', (tester) async { - await tester.pumpWidget(makeTestableWidget(InkWidget( - disable: true, - child: const Text('ink'), - ))); - - final typeFinder = find.byWidgetPredicate((widget) => - widget is DisableWidget && - widget.color == Colors.black.withOpacity(defaultOpacity)); - - expect(typeFinder, findsOneWidget); - }); - - testWidgets('with custom disabel widget', (tester) async { - const color = Colors.white; - const disableWidget = - DisableWidget(color: color, opacity: defaultOpacity); - - await tester.pumpWidget(makeTestableWidget(InkWidget( - disable: true, - disableWidget: disableWidget, - child: const Text('ink'), - ))); - - final typeFinder = find.byWidgetPredicate((widget) => - widget is DisableWidget && - widget.color == color && - widget.opacity == defaultOpacity); - - expect(typeFinder, findsOneWidget); - }); - }); - - group('with passed', () { - testWidgets('only shapeBorder', (tester) async { - final shapeBorder = - Border.all(width: 2.0, color: const Color(0xFFFFFFFF)); - - await tester.pumpWidget(makeTestableWidget(InkWidget( - shapeBorder: shapeBorder, - child: const Text('ink'), - ))); - - final typeFinder = find.byWidgetPredicate((widget) => - widget is InkWell && widget.customBorder == shapeBorder); - - expect(typeFinder, findsOneWidget); - }); - - testWidgets('only customBorder', (tester) async { - final customBorder = - Border.all(width: 2.0, color: const Color(0xFFFFFFFF)); - - await tester.pumpWidget(makeTestableWidget(InkWidget( - customBorder: customBorder, - child: const Text('ink'), - ))); - - final typeFinder = find.byWidgetPredicate((widget) => - widget is InkWell && widget.customBorder == customBorder); - - expect(typeFinder, findsOneWidget); - }); - }); - - testWidgets('with passed child', (tester) async { - await tester.pumpWidget(makeTestableWidget(InkWidget( - child: const Text('ink'), - ))); - expect(find.text('ink'), findsOneWidget); - }); - - testWidgets('with custom inkwell', (tester) async { - const inkWell = InkWell(); - - await tester.pumpWidget(makeTestableWidget(InkWidget( - inkWellWidget: inkWell, - child: const Text('ink'), - ))); - - final typeFinder = find.byWidgetPredicate( - (widget) => widget is InkWell && widget == inkWell, - ); - - expect(typeFinder, findsOneWidget); - }); - testWidgets('with default inkWell with custom arguments', (tester) async { - final customBorder = - Border.all(width: 2.0, color: const Color(0xFFFFFFFF)); - const color = Colors.black; - const radius = 0.2; - const borderRadius = BorderRadius.all(Radius.elliptical(5, 9)); - const enableFeedback = false; - const excludeFromSemantics = true; - const canRequestFocus = false; - const autofocus = true; - final focusNode = FocusNode(); - - void onTap() {} - void onDoubleTap() {} - void onLongPress() {} - void onTapDown(TapDownDetails _) {} - void onTapCancel() {} - // ignore: avoid_positional_boolean_parameters - void onHighlightChanged(bool _) {} - // ignore: avoid_positional_boolean_parameters - void onHover(bool _) {} - // ignore: avoid_positional_boolean_parameters - void onFocusChange(bool _) {} - - final inkWidget = InkWidget( - customBorder: customBorder, - onTap: onTap, - onDoubleTap: onDoubleTap, - onLongPress: onLongPress, - onTapDown: onTapDown, - onTapCancel: onTapCancel, - onHighlightChanged: onHighlightChanged, - onHover: onHover, - focusColor: color, - hoverColor: color, - highlightColor: color, - splashColor: color, - radius: radius, - borderRadius: borderRadius, - enableFeedback: enableFeedback, - excludeFromSemantics: excludeFromSemantics, - focusNode: focusNode, - canRequestFocus: canRequestFocus, - onFocusChange: onFocusChange, - autofocus: autofocus, - child: const Text('ink'), - ); - - await tester.pumpWidget(makeTestableWidget(inkWidget)); - - final typeFinder = find.byWidgetPredicate((widget) => - widget is InkWell && - widget.customBorder == customBorder && - widget.onTap == onTap && - widget.onDoubleTap == onDoubleTap && - widget.onLongPress == onLongPress && - widget.onTapDown == onTapDown && - widget.onTapCancel == onTapCancel && - widget.onHighlightChanged == onHighlightChanged && - widget.onHover == onHover && - widget.focusColor == color && - widget.hoverColor == color && - widget.highlightColor == color && - widget.splashColor == color && - widget.radius == radius && - widget.borderRadius == borderRadius && - widget.enableFeedback == enableFeedback && - widget.excludeFromSemantics == excludeFromSemantics && - widget.focusNode == focusNode && - widget.canRequestFocus == canRequestFocus && - widget.onFocusChange == onFocusChange && - widget.autofocus == autofocus); - - expect(typeFinder, findsOneWidget); - }); - }); -} diff --git a/packages/ink_widget/test/utils.dart b/packages/ink_widget/test/utils.dart deleted file mode 100644 index 1c0431997..000000000 --- a/packages/ink_widget/test/utils.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; - -Widget makeTestableWidget(Widget widgetForWrap) => - MaterialApp(home: Scaffold(body: Stack(children: [widgetForWrap]))); diff --git a/packages/keyboard_listener/.gitignore b/packages/keyboard_listener/.gitignore deleted file mode 100644 index bb431f0d5..000000000 --- a/packages/keyboard_listener/.gitignore +++ /dev/null @@ -1,75 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Flutter.podspec -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/keyboard_listener/.metadata b/packages/keyboard_listener/.metadata deleted file mode 100644 index 1b5cec022..000000000 --- a/packages/keyboard_listener/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 27321ebbad34b0a3fafe99fac037102196d655ff - channel: stable - -project_type: app diff --git a/packages/keyboard_listener/CHANGELOG.md b/packages/keyboard_listener/CHANGELOG.md deleted file mode 100644 index 5552fb744..000000000 --- a/packages/keyboard_listener/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -# Changelog - -## 2.0.0 - -* Migrate this package to null safety. - -## 1.0.0-dev.0 - -* Initial release diff --git a/packages/keyboard_listener/LICENSE b/packages/keyboard_listener/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/keyboard_listener/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/keyboard_listener/README.md b/packages/keyboard_listener/README.md deleted file mode 100644 index 6b2ab68d3..000000000 --- a/packages/keyboard_listener/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Keyboard Listener - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/keyboard_listener) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Keyboard listener created only on Flutter - -## Installation - -Add `keyboard_listener` to your `pubspec.yaml` file: - -```yaml -dependencies: - keyboard_listener: ^2.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/keyboard_listener/analysis_options.yaml b/packages/keyboard_listener/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/keyboard_listener/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/keyboard_listener/example/.gitignore b/packages/keyboard_listener/example/.gitignore deleted file mode 100644 index de88f70af..000000000 --- a/packages/keyboard_listener/example/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# iOS/XCode related -**/ios/Flutter/flutter_export_environment.sh -**/ios/Podfile - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Exceptions to above rules. -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/keyboard_listener/example/.metadata b/packages/keyboard_listener/example/.metadata deleted file mode 100644 index 6ac2303db..000000000 --- a/packages/keyboard_listener/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: f7a6a7906be96d2288f5d63a5a54c515a6e987fe - channel: stable - -project_type: app diff --git a/packages/keyboard_listener/example/analysis_options.yaml b/packages/keyboard_listener/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/keyboard_listener/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/keyboard_listener/example/android/.gitignore b/packages/keyboard_listener/example/android/.gitignore deleted file mode 100644 index bc2100d8f..000000000 --- a/packages/keyboard_listener/example/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/packages/keyboard_listener/example/android/app/build.gradle b/packages/keyboard_listener/example/android/app/build.gradle deleted file mode 100644 index 320be2219..000000000 --- a/packages/keyboard_listener/example/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/keyboard_listener/example/android/app/src/debug/AndroidManifest.xml b/packages/keyboard_listener/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/keyboard_listener/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/keyboard_listener/example/android/app/src/main/AndroidManifest.xml b/packages/keyboard_listener/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 55ca830c3..000000000 --- a/packages/keyboard_listener/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/keyboard_listener/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/keyboard_listener/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e793a000d..000000000 --- a/packages/keyboard_listener/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/keyboard_listener/example/android/app/src/main/res/drawable/launch_background.xml b/packages/keyboard_listener/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/keyboard_listener/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/keyboard_listener/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/keyboard_listener/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/keyboard_listener/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/keyboard_listener/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/keyboard_listener/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/keyboard_listener/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/keyboard_listener/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/keyboard_listener/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/keyboard_listener/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/keyboard_listener/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/keyboard_listener/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/keyboard_listener/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/keyboard_listener/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/keyboard_listener/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/keyboard_listener/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/keyboard_listener/example/android/app/src/main/res/values/styles.xml b/packages/keyboard_listener/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33fd..000000000 --- a/packages/keyboard_listener/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/keyboard_listener/example/android/app/src/profile/AndroidManifest.xml b/packages/keyboard_listener/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/keyboard_listener/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/keyboard_listener/example/android/build.gradle b/packages/keyboard_listener/example/android/build.gradle deleted file mode 100644 index 3100ad2d5..000000000 --- a/packages/keyboard_listener/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/keyboard_listener/example/android/gradle.properties b/packages/keyboard_listener/example/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/packages/keyboard_listener/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/keyboard_listener/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/keyboard_listener/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/packages/keyboard_listener/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/keyboard_listener/example/android/settings.gradle b/packages/keyboard_listener/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/keyboard_listener/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/keyboard_listener/example/ios/.gitignore b/packages/keyboard_listener/example/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/packages/keyboard_listener/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/keyboard_listener/example/ios/Flutter/AppFrameworkInfo.plist b/packages/keyboard_listener/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/keyboard_listener/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/keyboard_listener/example/ios/Flutter/Debug.xcconfig b/packages/keyboard_listener/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/keyboard_listener/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/keyboard_listener/example/ios/Flutter/Release.xcconfig b/packages/keyboard_listener/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/keyboard_listener/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.pbxproj b/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index d59cc08fb..000000000 --- a/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,503 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/keyboard_listener/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/keyboard_listener/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/keyboard_listener/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/keyboard_listener/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/keyboard_listener/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/keyboard_listener/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/keyboard_listener/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/keyboard_listener/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/keyboard_listener/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/keyboard_listener/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/keyboard_listener/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/keyboard_listener/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/keyboard_listener/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/keyboard_listener/example/ios/Runner/AppDelegate.swift b/packages/keyboard_listener/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/keyboard_listener/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/keyboard_listener/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/keyboard_listener/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/keyboard_listener/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/keyboard_listener/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/keyboard_listener/example/ios/Runner/Base.lproj/Main.storyboard b/packages/keyboard_listener/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/keyboard_listener/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/keyboard_listener/example/ios/Runner/Info.plist b/packages/keyboard_listener/example/ios/Runner/Info.plist deleted file mode 100644 index a060db61e..000000000 --- a/packages/keyboard_listener/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/keyboard_listener/example/ios/Runner/Runner-Bridging-Header.h b/packages/keyboard_listener/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/packages/keyboard_listener/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/keyboard_listener/example/lib/main.dart b/packages/keyboard_listener/example/lib/main.dart deleted file mode 100644 index 49d5790a2..000000000 --- a/packages/keyboard_listener/example/lib/main.dart +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:keyboard_listener/keyboard_listener.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Keyboard listener example', - theme: ThemeData( - primarySwatch: Colors.blue, - visualDensity: VisualDensity.adaptivePlatformDensity, - ), - home: const MyHomePage(title: 'Keyboard listener example'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({ - required this.title, - Key? key, - }) : super(key: key); - - final String title; - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - bool _isVisible = false; - - late KeyboardListener _keyboardListener; - - @override - void initState() { - super.initState(); - _keyboardListener = KeyboardListener() - ..addListener(onChange: _keyboardHandle); - } - - @override - void dispose() { - _keyboardListener.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), - body: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text(_isVisible ? 'Visible' : 'hidden'), - const SizedBox(height: 50), - const TextField(), - const SizedBox(height: 50), - ElevatedButton( - onPressed: () { - if (FocusManager.instance.primaryFocus != null) { - FocusManager.instance.primaryFocus!.unfocus(); - } else { - FocusScope.of(context).requestFocus(FocusNode()); - } - }, - child: const Text('Reset focus'), - ), - ], - ), - ); - } - - void _keyboardHandle(bool isVisible) { - setState(() { - _isVisible = isVisible; - }); - } -} diff --git a/packages/keyboard_listener/example/pubspec.yaml b/packages/keyboard_listener/example/pubspec.yaml deleted file mode 100644 index 07114fcee..000000000 --- a/packages/keyboard_listener/example/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: example -description: A new Flutter application. -version: 1.0.0+1 -publish_to: 'none' - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - keyboard_listener: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/keyboard_listener/lib/keyboard_listener.dart b/packages/keyboard_listener/lib/keyboard_listener.dart deleted file mode 100644 index 35ee8234f..000000000 --- a/packages/keyboard_listener/lib/keyboard_listener.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:keyboard_listener/src/keyboard_listener.dart'; diff --git a/packages/keyboard_listener/lib/src/keyboard_listener.dart b/packages/keyboard_listener/lib/src/keyboard_listener.dart deleted file mode 100644 index c31baa83e..000000000 --- a/packages/keyboard_listener/lib/src/keyboard_listener.dart +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:math'; -import 'dart:ui'; - -import 'package:flutter/widgets.dart'; - -/// Callback events onChange -typedef KeyboardChangeListener = Function(bool isVisible); - -/// Keyboard display listener -class KeyboardListener extends WidgetsBindingObserver { - static final _random = Random(); - final _changeListeners = {}; - final _showListeners = {}; - final _hideListeners = {}; - - /// Collection of listeners for changing the state of the keyboard - Map get changeListeners => _changeListeners; - - /// Collection of listeners for keyboard display - Map get showListeners => _showListeners; - - /// Collection of listeners to hide the keyboard - Map get hideListeners => _hideListeners; - - /// Getter values whether the keyboard is visible - bool get isVisibleKeyboard { - if (WidgetsBinding.instance == null) { - return false; - } - - return WidgetsBinding.instance!.window.viewInsets.bottom > 0; - } - - bool _isKeyboardOpened = false; - - KeyboardListener() { - _init(); - } - - /// Callback for changing metrics - @override - void didChangeMetrics() { - _listener(); - } - - void dispose() { - WidgetsBinding.instance?.removeObserver(this); - _changeListeners.clear(); - _showListeners.clear(); - _hideListeners.clear(); - } - - /// Add keyboard listener - /// Returns the id for the listener - /// - /// [id] - listener identifier, - /// assigned automatically in case of absence - /// - /// [onChange] - callback for changing the state of the keyboard - /// - /// [onShow] - callback to display the keyboard - /// - /// [onHide] - callback to hide the keyboard - /// - String addListener({ - String? id, - KeyboardChangeListener? onChange, - VoidCallback? onShow, - VoidCallback? onHide, - }) { - assert( - onChange != null || onShow != null || onHide != null, - 'At least any one callback must be defined', - ); - id ??= _generateId(); - - if (onChange != null) _changeListeners[id] = onChange; - if (onShow != null) _showListeners[id] = onShow; - if (onHide != null) _hideListeners[id] = onHide; - - return id; - } - - /// Delete onChange listener - void removeChangeListener(KeyboardChangeListener listener) { - _removeListener(_changeListeners, listener); - } - - /// Delete onShow listener - void removeShowListener(VoidCallback listener) { - _removeListener(_showListeners, listener); - } - - /// Delete onHide listener - void removeHideListener(VoidCallback listener) { - _removeListener(_hideListeners, listener); - } - - /// Delete onChange listener by id - void removeAtChangeListener(String id) { - _removeAtListener(_changeListeners, id); - } - - /// Delete onShow listener by id - void removeAtShowListener(String id) { - _removeAtListener(_showListeners, id); - } - - /// Delete onHide listener by id - void removeAtHideListener(String id) { - _removeAtListener(_hideListeners, id); - } - - /// Delete listener by id - void _removeAtListener(Map listeners, String id) { - listeners.remove(id); - } - - void _removeListener(Map listeners, Function listener) { - listeners.removeWhere((key, value) => value == listener); - } - - String _generateId() { - return _random.nextDouble().toString(); - } - - void _init() { - WidgetsBinding.instance?.addObserver(this); - } - - void _listener() { - // Standard behavior: - // The keyboard appeared - bottom was 0 -> became n - // The keyboard appeared - bottom was n -> became 0 - - // On some devices, as an exception, it may come: - // bottom was m -> n, and should be 0 -> n - // - // Example: - // Keyboard Size == 280. - // Instead of 0 => 280 - 480 => 280 may come - if (isVisibleKeyboard) { - /// The new height is greater than the previous one - /// - the keyboard has opened - _onShow(); - _onChange(true); - } else { - /// The new height is less than the previous one - /// - the keyboard is closed - if (_isKeyboardOpened) { - _onHide(); - } - - _onChange(false); - } - } - - void _onChange(bool isOpen) { - _isKeyboardOpened = isOpen; - for (final listener in _changeListeners.values) { - listener(isOpen); - } - } - - void _onShow() { - for (final listener in _showListeners.values) { - listener(); - } - } - - void _onHide() { - for (final listener in _hideListeners.values) { - listener(); - } - } -} diff --git a/packages/keyboard_listener/pubspec.yaml b/packages/keyboard_listener/pubspec.yaml deleted file mode 100644 index ba1108e0a..000000000 --- a/packages/keyboard_listener/pubspec.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: keyboard_listener -version: "2.0.0" -description: Keyboard listener created only on Flutter -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/keyboard_listener" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" -publish_to: none - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: - -custom: - is_stable: false - unstable_version: - is_plugin: false - path: keyboard_listener - hostUrl: - separate_repo_url: diff --git a/packages/mwwm/.gitignore b/packages/mwwm/.gitignore deleted file mode 100644 index e348147fd..000000000 --- a/packages/mwwm/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ -*.lock - -.idea - -build/ -**/android/**/GeneratedPluginRegistrant.java -ios/.generated/ -ios/Flutter/Generated.xcconfig -ios/Runner/GeneratedPluginRegistrant.* diff --git a/packages/mwwm/.metadata b/packages/mwwm/.metadata deleted file mode 100644 index 281f231a6..000000000 --- a/packages/mwwm/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713 - channel: stable - -project_type: package diff --git a/packages/mwwm/CHANGELOG.md b/packages/mwwm/CHANGELOG.md deleted file mode 100644 index a69aee052..000000000 --- a/packages/mwwm/CHANGELOG.md +++ /dev/null @@ -1,68 +0,0 @@ -# Changelog - -## 2.0.0 - 2021-06-07 - -* Stable release - -## 2.0.0-dev.1 - 2021-06-04 - -* **Breaking Change:** Removed nullable types where possible -* **Breaking Change:** Added generic type of WidgetModel to CoreMwwmWidget and generic type of CoreMwwmWidget to WidgetState to easily get attributes of Widget without cast -* Marked as deprecated `doFuture` and `doFutureHandleError` - -## 1.1.1 - 2021-05-30 - -* Stable release - -## 1.1.1-dev.1 - 2021-05-25 - -* Apply new lint rules. - -## 1.1.0 - -* Made subscribe's stream's values nullable. -* WM's subscribe method now returns StreamSubscription of generic type. - -## 1.0.2 - -* Fix changelog - -## 1.0.1 - -* Add unit tests - -## 1.0.0 - -* Migrate this package to null safety. - -## 0.1.3-dev.0 - -* Change Model resolve performer funcionality -* Add to Performer method canPerform - -## 0.1.0-dev.4 - -* Replace dynamic type in WidgetModel's errorCallbacks - -## 0.1.0+1 - -* [BREAKING CHANGE!] Change API of Performer and Model. Now R may be any object. -* Add special performers for useful cases: FuturePerformer and StreamPerformer -* Add FutureChange and StreamChange which result is Future or Stream, Change can have any object as result - -## 0.1.0 - -* Update CoreMwwmWidget. Change API -* Update docs - -## 0.0.4 - -* Add logo - -## 0.0.3 -* README update -* fix some class docs - -## 0.0.2 - -* Software architectural pattern for flutter apps. diff --git a/packages/mwwm/CONTRIBUTING.md b/packages/mwwm/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/mwwm/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/mwwm/LICENSE b/packages/mwwm/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/mwwm/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/mwwm/README.md b/packages/mwwm/README.md deleted file mode 100644 index 7df834a94..000000000 --- a/packages/mwwm/README.md +++ /dev/null @@ -1,400 +0,0 @@ -# MWWM - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/mwwm) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=mwwm&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/mwwm?logo=dart&logoColor=white)](https://pub.dev/packages/mwwm) -[![Pub Likes](https://badgen.net/pub/likes/mwwm)](https://pub.dev/packages/mwwm) -[![Pub popularity](https://badgen.net/pub/popularity/mwwm)](https://pub.dev/packages/mwwm/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/mwwm) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru/). - -![MWWM Cover](https://i.ibb.co/9qBTf3S/Bunner-LOGO.png) - -## About - -MVVM-inspired lightweight architectural framework for Flutter apps made with respect to Clean Architecture. - -## Currently supported features - -- Complete separation of the application's codebase into independent layers: *UI*, *presentation* and *business logic*; -- Keeps widget tree clear: the main building block is just an extended version of StatefulWidget; -- Built-in mechanisms for handling asynchronous operations; -- The ability to easily implement the default error handling strategy; -- An event-like mechanism that helps keep the business logic well structured and testable. - -## Overview - -MWWM is the perfect mix of the [Flutter framework architectural concept](https://flutter.dev/docs/resources/architectural-overview), the simple [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel) pattern, and the [Clean Architecture principles](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html). - -### MWWM's superpowers - -- **Simple** - no crazy complex abstractions that change the structure of your project beyond recognition; - -- **Flexible** - you can apply MWWM components to a certain project area (screen or widget). You still can use `StatefulWidget` and `StatelessWidget` wherever you would like to keep things simple; - -- **Scalable** - the scale of your project is not a problem. You can use additional MWWM features as your project grows more complex (such as `Model`); - -- **No limitations** - this architecture package doesn't dictate what DI, navigation, or any other approaches you should use in your project. You can even implement communication between layers the way you want. Or take our advice and do so with the [Relation package](https://pub.dev/packages/relation). Everything is up to you! - -### Key components - -![MWWM Architecture Scheme](https://i.ibb.co/Y778rtM/Key-components.png) - -#### Widget - -This is where your declarative layouts live. Components of this layer contain UI-related code only and act like typical `StatefulWidget`. The Widget contains the link to its widget model. - -Presented by `CoreMwwmWidget` class. - -#### WidgetModel - -`WidgetModel` is like the mechanism behind your widget. Its concept is very similar to `State` but there is one big difference. `State` knows nothing about the business logic of your app and can't refer to any business logic components, while `WidgetModel` can. - -- It tells the current state of the widget, which can be meaningful for business logic scenarios; -- It knows which user input (or any other UI event) triggers a certain business logic scenario and acts as a dispatcher between them. - -Presented by the `WidgetModel` class. - -#### Model - -Unlike other components, the `Model` is optional. - -`Model` is a great way to simplify the business logic layer of your app by breaking it into two sets of abstractions: - -- `Change` is an intent to do something without any concrete implementation details, only input parameters; -- `Performer` is the reaction to the `Change` that is associated with it. The Performer contains the implementation of a certain operation that is triggered by the Change. - -Presented by the `Model`, `Change`, and `Performer` classes. - -## Usage - -### Basic use case (without Model) - -![MWWM Architecture Mini Scheme](https://i.ibb.co/qN4z81w/arch-scheme-min.png) - -#### Create WidgetModel - -Create a WidgetModel for the widget by extending the `WidgetModel` class. - -If you want certain part of your code to run as soon as the widget is initialized, you can override the `onLoad()` function and place this code right after the super-function invocation. - -```dart -class LoginWm extends WidgetModel { - - LoginWm( - WidgetModelDependencies baseDependencies, - ) : super(baseDependencies); - - @override - void onLoad() { - super.onLoad(); - ... - } -} -``` - -#### Implement WidgetModel builder - -You need to create an instance of the `WidgetModel`. We recommend using top-level functions for this. - -Don't forget to pass `WidgetModelDependencies` as the first argument. Use it as a bundle that contains a set of dependencies required for all WidgetModels in your app (e.g. error handlers, loggers). - -```dart -WidgetModel buildLoginWM(BuildContext context) => - LoginWm( - WidgetModelDependencies(), - ); -} -``` - -#### Create Widget - -Create a Widget by extending the `CoreMwwmWidget` class. - -```dart -class LoginScreen extends CoreMwwmWidget { - - LoginScreen({ - WidgetModelBuilder widgetModelBuilder, - }) : assert(widgetModelBuilder != null), - super(widgetModelBuilder: widgetModelBuilder); - - @override - State createState() => _LoginScreenState(); -} -``` - -#### Create WidgetState - -`CoreMwwmWidget` is an extended version of `StatefulWidget`. We need to attach a State for it by extending `WidgetState` class. - -Collect the widget tree and return it from a `build()` function the way you usually do it with regular *StatefulWidget*. - -Every `WidgetState` refers to its `WidgetModel`. That's why you need to specify the concrete `WidgetModel` type as a generic type of the `WidgetState`. - -```dart -class _LoginScreenState extends WidgetState { - - @override - Widget build(BuildContext context) => - Scaffold( - body: Container(), - ); -} -``` - -#### Create entry point - -You will most likely start your screen with a *Route*. In this case, the *Route* becomes the place where you put everything together. - -```dart - class LoginScreenRoute extends MaterialPageRoute { - LoginScreenRoute() - : super( - builder: (context) => LoginScreen( - widgetModelBuilder: buildLoginWM(), - ), - ); - } -``` - -That's it! Now you can implement your first MWWM-powered screen. - -### Advanced use case (with Model) - -In case your app is too complicated, you can simplify it by breaking down the business logic layer into a set of smaller components (*Performers*), each responsible for performing a single business logic operation. - -#### Create Change - -**Change** is the intention to perform an action. Each operation is associated with a *Change*. - -Create a *Change* by extending `FutureChange` or `StreamChange` classes. - -The difference between them is the type of the returned operation result. `FutureChange` will wrap the result into a `Future`, and `StreamChange` into a `Stream`. - -A *Change* can also serve to contain passing input parameters if they are needed to perform an operation. If not, leave the class body empty. - -```dart -class LoginUser extends FutureChange { - final String login; - final String password; -} -``` - -#### Create Performer - -**Performer** - is a functional part of the contract. *Performer* should be responsible for no more than one operation. Each *Performer* is associated with *Change* one-to-one. - -While declaring *Performer* you should specify two types of parameters: the first is the operation result type (the same as you already set up in *Change*), the second is the associated *Change* type. - -You can insert any object into the *Performer* to launch any necessary operations. - -Create a Performer by extending the `FuturePerformer` or `StreamPerformer` classes. - -```dart -class LoginUserPerformer extends FuturePerformer { - - final AuthService authService; - - @override - Future perform(LoginUser change) { - // api call retrieving user profile instance - return userProfile; - } -} -``` - -#### Pass configured Model to WidgetModel - -You probably already know the basic MWWM use case. If not, see [this section](#basic-use-case-without-model). - -Declare `Model` instance as an argument for your *WidgetModel* constructor and pass it to its super-constructor. - -```dart -class LoginWm extends WidgetModel { - - LoginWm( - WidgetModelDependencies baseDependencies, - Model model, - ) : super(baseDependencies, model: model); -} -``` - -Go back to the top-level function that creates *WidgetModel*. Pass the newly created *Model* instance to the *WidgetModel's* constructor. - -Remember to pass an array containing all the *Performers* that can be accessed through this *WidgetModel* to the *Model's* constructor. - -```dart -WidgetModel buildLoginWM(BuildContext context) => - LoginWm( - WidgetModelDependencies(), - Model([ - LoginUserPerformer(), - ]), - ); -} -``` - -#### Perform the operation - -Finally, you can request your *Model* to perform any operation by passing the right *Change* through the `Model.perform()` function. You just have to correctly process the result of the operation. - -```dart -class LoginWm extends WidgetModel { - - void performUserLogin() async { - final userProfile = await model.perform(LoginUser(login, password);, - ... - } -} -``` - -That's all folks! You are now familiar with the advanced technique of using MWWM-architecture. - -### Asynchronous operations handling - -MWWM package provides built-in capabilities for asynchronous operations. In addition, you can take advantage of the centralized error handling function. - -| Function name | Supported data type | Is default error handling mechanism enabled | -|----------------------|---------------------|---------------------------------------------| -| subscribe() | Stream | - | -| subscribeHandleError() | Stream | + | -| doFuture() | Future | - | -| doFutureHandleError() | Future | + | - -When using `doFuture()` and `subscribe()`, select `Future` or `Stream` as the first parameter. The `onValue` function handles the result of the asynchronous operation as the second. - -The `onError` parameter is optional and can be used to handle errors manually. - -```dart -doFuture( - isAuthenticated(), - (isAuth) { - if (isAuth) - navigator.push(MainScreenRoute()); - }, - onError: (error) { - print(error); - }, -); -``` - -What about `doFutureHandleError()` and `subscribeHandleError()`? You can use them the same exact way as their "no handle error" companions, with all the benefits of the default error handling mechanism. - -You can still use the `onError` function to pass but it will now act as an addition to default error handling. - -```dart -doFutureHandleError( - login(), - (isLogin) { - if (isLogin) - navigator.push(MainScreenRoute()); - }, - onError: (error) { - print(error); - }, -); -``` - -#### Default error handling customization - -Error handling is easily customizable. - -First, extend the `ErrorHandler` class and override the `handleError()` function. This function will be used whenever an error occurs. You can implement your error handling right there. - -```dart -class CustomErrorHandler extends ErrorHandler { - @override - void handleError(Object e) { - debugPrint('Custom error handler regretfully informs that $e has occurred.'); - } -} -``` - -Follow the top-level function that creates WidgetModel. Pass your custom error handler instance as errorHandler argument value. That's it. - -```dart -WidgetModel buildLoginWM(BuildContext context) => - LoginWm( - WidgetModelDependencies( - errorHandler: LoginScreenErrorHandler(), - ), - ); -} -``` - -Now all errors that occur during asynchronous operations launched by the `doFutureHandleError()` and `subscribeHandleError()` functions will fall into a custom handler. - -## FAQ - -### Where should my UI layout be placed? - -Directly in the `WidgetState.build()` function. For widgets that are simple use `StatelessWidget` or `StatefulWidget` from SDK. - -### How can I access the widget model? - -Every `WidgetState` reference its `WidgetModel` through `wm` getter. You can access it immediately after running `initState()`. - -### Where should I place the navigation? - -We don't limit you in the choice of navigation approaches, but we strongly recommend implementing navigation in the **WidgetModel**. - -## Recommended project structure - -You decide how your project will be arranged. However, we recommend you organize your code this way: - -- /lib - - model/ - - feature1/ - - services - - changes.dart - - performer.dart - - feature2/ - - services - - changes.dart - - performer.dart - - ui/ - - screen1/ - - wm.dart - - widget.dart - - route.dart - - screen2/ - - wm.dart - - widget.dart - - route.dart - -## Installation - -Add mwwm to your `pubspec.yaml` file: - -```yaml -dependencies: - mwwm: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/mwwm/analysis_options.yaml b/packages/mwwm/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/mwwm/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/mwwm/dart_dependency_validator.yaml b/packages/mwwm/dart_dependency_validator.yaml deleted file mode 100644 index c69bdf12d..000000000 --- a/packages/mwwm/dart_dependency_validator.yaml +++ /dev/null @@ -1,2 +0,0 @@ -exclude: - - "example/**" diff --git a/packages/mwwm/doc/images/arch_scheme_min.png b/packages/mwwm/doc/images/arch_scheme_min.png deleted file mode 100644 index 7fa12d0cb..000000000 Binary files a/packages/mwwm/doc/images/arch_scheme_min.png and /dev/null differ diff --git a/packages/mwwm/doc/images/arch_sheme_max.png b/packages/mwwm/doc/images/arch_sheme_max.png deleted file mode 100644 index e4b4879c9..000000000 Binary files a/packages/mwwm/doc/images/arch_sheme_max.png and /dev/null differ diff --git a/packages/mwwm/doc/images/logo-mwwm.png b/packages/mwwm/doc/images/logo-mwwm.png deleted file mode 100644 index 8d87942f2..000000000 Binary files a/packages/mwwm/doc/images/logo-mwwm.png and /dev/null differ diff --git a/packages/mwwm/example/.gitignore b/packages/mwwm/example/.gitignore deleted file mode 100644 index 9d532b18a..000000000 --- a/packages/mwwm/example/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/packages/mwwm/example/.metadata b/packages/mwwm/example/.metadata deleted file mode 100644 index cd984dd00..000000000 --- a/packages/mwwm/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 9b2d32b605630f28625709ebd9d78ab3016b2bf6 - channel: stable - -project_type: app diff --git a/packages/mwwm/example/analysis_options.yaml b/packages/mwwm/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/mwwm/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/mwwm/example/android/.gitignore b/packages/mwwm/example/android/.gitignore deleted file mode 100644 index 0a741cb43..000000000 --- a/packages/mwwm/example/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/packages/mwwm/example/android/app/build.gradle b/packages/mwwm/example/android/app/build.gradle deleted file mode 100644 index 5ea669162..000000000 --- a/packages/mwwm/example/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 29 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.mwwm_counter.counter" - minSdkVersion 16 - targetSdkVersion 29 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/mwwm/example/android/app/src/debug/AndroidManifest.xml b/packages/mwwm/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 5114457f3..000000000 --- a/packages/mwwm/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/mwwm/example/android/app/src/main/AndroidManifest.xml b/packages/mwwm/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index decc2023b..000000000 --- a/packages/mwwm/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/mwwm/example/android/app/src/main/kotlin/com/example/mwwm_counter/counter/MainActivity.kt b/packages/mwwm/example/android/app/src/main/kotlin/com/example/mwwm_counter/counter/MainActivity.kt deleted file mode 100644 index 1386c7359..000000000 --- a/packages/mwwm/example/android/app/src/main/kotlin/com/example/mwwm_counter/counter/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.mwwm_counter.counter - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/mwwm/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mwwm/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/mwwm/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/mwwm/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mwwm/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/mwwm/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/mwwm/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mwwm/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/mwwm/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/mwwm/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mwwm/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/mwwm/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/mwwm/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mwwm/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/mwwm/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/mwwm/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mwwm/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/mwwm/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/mwwm/example/android/app/src/main/res/values/styles.xml b/packages/mwwm/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33fd..000000000 --- a/packages/mwwm/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/mwwm/example/android/app/src/profile/AndroidManifest.xml b/packages/mwwm/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 5114457f3..000000000 --- a/packages/mwwm/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/mwwm/example/android/build.gradle b/packages/mwwm/example/android/build.gradle deleted file mode 100644 index 3100ad2d5..000000000 --- a/packages/mwwm/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/mwwm/example/android/gradle.properties b/packages/mwwm/example/android/gradle.properties deleted file mode 100644 index a6738207f..000000000 --- a/packages/mwwm/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true -android.enableR8=true diff --git a/packages/mwwm/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mwwm/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/packages/mwwm/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/mwwm/example/android/settings.gradle b/packages/mwwm/example/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/packages/mwwm/example/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/packages/mwwm/example/ios/.gitignore b/packages/mwwm/example/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/packages/mwwm/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/mwwm/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mwwm/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/mwwm/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/mwwm/example/ios/Flutter/Debug.xcconfig b/packages/mwwm/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index ec97fc6f3..000000000 --- a/packages/mwwm/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/mwwm/example/ios/Flutter/Release.xcconfig b/packages/mwwm/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index c4855bfe2..000000000 --- a/packages/mwwm/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/mwwm/example/ios/Podfile b/packages/mwwm/example/ios/Podfile deleted file mode 100644 index 1e8c3c90a..000000000 --- a/packages/mwwm/example/ios/Podfile +++ /dev/null @@ -1,41 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/packages/mwwm/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mwwm/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index fa6df3549..000000000 --- a/packages/mwwm/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,563 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 1B3713C676260511CCC41279 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 842D4A9FE12C78B6FC73E7B4 /* Pods_Runner.framework */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 316720D0434F28D8EFD897AD /* 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 = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 513AD4FFC3798D8E4DED1050 /* 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 = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 842D4A9FE12C78B6FC73E7B4 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C8CA6AB70698F415D3A8AE62 /* 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1B3713C676260511CCC41279 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - CEFEE3BC5891BAAD9E654DAA /* Pods */, - 9FD9D4F443F7AE0938CC1E36 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 9FD9D4F443F7AE0938CC1E36 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 842D4A9FE12C78B6FC73E7B4 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - CEFEE3BC5891BAAD9E654DAA /* Pods */ = { - isa = PBXGroup; - children = ( - 513AD4FFC3798D8E4DED1050 /* Pods-Runner.debug.xcconfig */, - C8CA6AB70698F415D3A8AE62 /* Pods-Runner.release.xcconfig */, - 316720D0434F28D8EFD897AD /* Pods-Runner.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 72F957DE4DD4A547EC335D8A /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 80938C9D058B672C26A30AC3 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 72F957DE4DD4A547EC335D8A /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "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"; - showEnvVarsInLog = 0; - }; - 80938C9D058B672C26A30AC3 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.mwwmcounter.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.mwwmcounter.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.mwwmcounter.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/packages/mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/mwwm/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/mwwm/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/mwwm/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mwwm/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mwwm/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14c..000000000 --- a/packages/mwwm/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/packages/mwwm/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mwwm/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/mwwm/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/mwwm/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mwwm/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/mwwm/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/mwwm/example/ios/Runner/AppDelegate.swift b/packages/mwwm/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/mwwm/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/mwwm/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mwwm/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/mwwm/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mwwm/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mwwm/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/mwwm/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/mwwm/example/ios/Runner/Info.plist b/packages/mwwm/example/ios/Runner/Info.plist deleted file mode 100644 index 235197370..000000000 --- a/packages/mwwm/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - counter - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/mwwm/example/ios/Runner/Runner-Bridging-Header.h b/packages/mwwm/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/packages/mwwm/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/mwwm/example/lib/data/counter/repository/counter_repository.dart b/packages/mwwm/example/lib/data/counter/repository/counter_repository.dart deleted file mode 100644 index 2580911d8..000000000 --- a/packages/mwwm/example/lib/data/counter/repository/counter_repository.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:counter/data/counter/storage/shared_prefs.dart'; - -class CounterRepository { - final SharedPrefs _sharedPrefs; - - CounterRepository(this._sharedPrefs); - - Future changeCounter(int value) => _sharedPrefs.set(value); - - Future getCounter() => _sharedPrefs.get(); -} diff --git a/packages/mwwm/example/lib/data/counter/storage/shared_prefs.dart b/packages/mwwm/example/lib/data/counter/storage/shared_prefs.dart deleted file mode 100644 index e7ba489e7..000000000 --- a/packages/mwwm/example/lib/data/counter/storage/shared_prefs.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:shared_preferences/shared_preferences.dart'; - -const _counterKey = '_counterKey'; - -class SharedPrefs { - Future set(int value) async { - final sp = await SharedPreferences.getInstance(); - await sp.setInt(_counterKey, value); - } - - Future get([int defaultValue = 0]) async { - final sp = await SharedPreferences.getInstance(); - return sp.getInt(_counterKey) ?? defaultValue; - } -} diff --git a/packages/mwwm/example/lib/main.dart b/packages/mwwm/example/lib/main.dart deleted file mode 100644 index 00d9f5136..000000000 --- a/packages/mwwm/example/lib/main.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:counter/data/counter/repository/counter_repository.dart'; -import 'package:counter/data/counter/storage/shared_prefs.dart'; -import 'package:counter/ui/app.dart'; -import 'package:counter/ui/counter_screen/counter_wm.dart'; -import 'package:counter/ui/counter_screen/exceptions/default_error_handler.dart'; -import 'package:flutter/widgets.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; - -void main() { - runApp( - MultiProvider( - providers: [ - Provider( - create: (_) => SharedPrefs(), - ), - Provider( - create: (context) => CounterRepository( - context.read(), - ), - ), - ChangeNotifierProvider( - create: (context) => CounterWidgetModel( - WidgetModelDependencies( - errorHandler: DefaultErrorHandler(), - ), - context.read(), - ), - ), - ], - child: const App(), - ), - ); -} diff --git a/packages/mwwm/example/lib/ui/app.dart b/packages/mwwm/example/lib/ui/app.dart deleted file mode 100644 index ea935f0e8..000000000 --- a/packages/mwwm/example/lib/ui/app.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:counter/ui/counter_screen/counter_route.dart'; -import 'package:flutter/material.dart'; - -class App extends StatefulWidget { - const App({Key? key}) : super(key: key); - - @override - _AppState createState() => _AppState(); -} - -class _AppState extends State { - @override - Widget build(BuildContext context) { - return MaterialApp( - debugShowCheckedModeBanner: false, - onGenerateRoute: (_) => CounterScreenRoute(), - ); - } -} diff --git a/packages/mwwm/example/lib/ui/counter_screen/counter_route.dart b/packages/mwwm/example/lib/ui/counter_screen/counter_route.dart deleted file mode 100644 index f045bc419..000000000 --- a/packages/mwwm/example/lib/ui/counter_screen/counter_route.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:counter/ui/counter_screen/counter_screen.dart'; -import 'package:counter/ui/counter_screen/counter_wm.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -/// Route for [CounterScreen] -class CounterScreenRoute extends MaterialPageRoute { - CounterScreenRoute() - : super( - builder: (context) => const CounterScreen( - widgetModelBuilder: _createCounterWm, - ), - ); -} - -/// Dependencies for [CounterWidgetModel] -CounterWidgetModel _createCounterWm(BuildContext context) { - return context.read(); -} diff --git a/packages/mwwm/example/lib/ui/counter_screen/counter_screen.dart b/packages/mwwm/example/lib/ui/counter_screen/counter_screen.dart deleted file mode 100644 index 6ec388c18..000000000 --- a/packages/mwwm/example/lib/ui/counter_screen/counter_screen.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:counter/ui/counter_screen/counter_wm.dart'; -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:provider/provider.dart'; - -/// Counter's screen -class CounterScreen extends CoreMwwmWidget { - const CounterScreen({ - required WidgetModelBuilder widgetModelBuilder, - Key? key, - }) : super(key: key, widgetModelBuilder: widgetModelBuilder); - - @override - WidgetState, CounterWidgetModel> - createWidgetState() { - return _CounterScreenState(); - } -} - -class _CounterScreenState - extends WidgetState { - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: Consumer( - builder: (_, widgetModel, __) { - return Text( - '${widgetModel.counter}', - ); - }, - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: wm.increment, - child: const Icon(Icons.add), - ), - ); - } -} diff --git a/packages/mwwm/example/lib/ui/counter_screen/counter_wm.dart b/packages/mwwm/example/lib/ui/counter_screen/counter_wm.dart deleted file mode 100644 index e313dd046..000000000 --- a/packages/mwwm/example/lib/ui/counter_screen/counter_wm.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'dart:async'; - -import 'package:counter/data/counter/repository/counter_repository.dart'; -import 'package:flutter/widgets.dart'; -import 'package:mwwm/mwwm.dart'; - -/// Counter screen's widget model -// ignore: prefer_mixin -class CounterWidgetModel extends WidgetModel with ChangeNotifier { - final CounterRepository _counterRepository; - - int counter = 0; - - CounterWidgetModel( - WidgetModelDependencies baseDependencies, - this._counterRepository, - ) : super(baseDependencies); - - @override - void onLoad() { - super.onLoad(); - _initCounter(); - } - - void increment() { - counter++; - _counterRepository.changeCounter(counter); - notifyListeners(); - } - - Future _initCounter() async { - counter = await _counterRepository.getCounter(); - notifyListeners(); - } -} diff --git a/packages/mwwm/example/lib/ui/counter_screen/exceptions/default_error_handler.dart b/packages/mwwm/example/lib/ui/counter_screen/exceptions/default_error_handler.dart deleted file mode 100644 index 66142e610..000000000 --- a/packages/mwwm/example/lib/ui/counter_screen/exceptions/default_error_handler.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:mwwm/mwwm.dart'; - -/// Default error handler for [WidgetModelDependencies] -class DefaultErrorHandler implements ErrorHandler { - @override - void handleError(Object e) { - debugPrint(e.toString()); - } -} diff --git a/packages/mwwm/example/pubspec.yaml b/packages/mwwm/example/pubspec.yaml deleted file mode 100644 index 6bb2545f0..000000000 --- a/packages/mwwm/example/pubspec.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: counter -description: A new Flutter project. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - mwwm: - path: ../ - - provider: ^5.0.0 - shared_preferences: ^2.0.5 - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/mwwm/lib/mwwm.dart b/packages/mwwm/lib/mwwm.dart deleted file mode 100644 index f0bb2c87f..000000000 --- a/packages/mwwm/lib/mwwm.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:mwwm/src/dependencies/wm_dependencies.dart'; -export 'package:mwwm/src/error/error_handler.dart'; -export 'package:mwwm/src/model/changes/changes.dart'; -export 'package:mwwm/src/model/model.dart'; -export 'package:mwwm/src/model/performer/performer.dart'; -export 'package:mwwm/src/ticker_providers.dart'; -export 'package:mwwm/src/widget_model.dart'; -export 'package:mwwm/src/widget_state.dart'; diff --git a/packages/mwwm/lib/src/dependencies/wm_dependencies.dart b/packages/mwwm/lib/src/dependencies/wm_dependencies.dart deleted file mode 100644 index 5f34aa4f5..000000000 --- a/packages/mwwm/lib/src/dependencies/wm_dependencies.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/src/error/error_handler.dart'; - -/// Base dependencies for WidgetModel -/// Typically is an [ErrorHandler] -class WidgetModelDependencies { - final ErrorHandler? errorHandler; - - const WidgetModelDependencies({this.errorHandler}); -} diff --git a/packages/mwwm/lib/src/error/error_handler.dart b/packages/mwwm/lib/src/error/error_handler.dart deleted file mode 100644 index 8fb8c3af7..000000000 --- a/packages/mwwm/lib/src/error/error_handler.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Interface for handle error in WidgetModel Layer -/// Typically here describes how handle an error on Prestation Layer. -abstract class ErrorHandler { - const ErrorHandler(); - - void handleError(Object e); -} diff --git a/packages/mwwm/lib/src/model/changes/changes.dart b/packages/mwwm/lib/src/model/changes/changes.dart deleted file mode 100644 index 8a6db9073..000000000 --- a/packages/mwwm/lib/src/model/changes/changes.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Signal for Model to perform some action, -/// i.e. download or upload data. -/// -/// `R` is a type of result which is returned after -/// performing the action. -abstract class Change { - const Change(); - - @override - String toString() { - return '$runtimeType'; - } -} - -/// A Change that return Future as result -/// `R` - type of result inside Future -abstract class FutureChange extends Change> { - const FutureChange(); -} - -/// A Change thate return Stream as result -/// `R` - type of result inside Stream -abstract class StreamChange extends Change> { - const StreamChange(); -} diff --git a/packages/mwwm/lib/src/model/exceptions.dart b/packages/mwwm/lib/src/model/exceptions.dart deleted file mode 100644 index 682decf7b..000000000 --- a/packages/mwwm/lib/src/model/exceptions.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:mwwm/src/model/changes/changes.dart'; - -/// Not found any performer for change -class NoPerformerException implements Exception { - final Change change; - - const NoPerformerException(this.change); - - @override - String toString() { - return 'No performer found for $change'; - } -} - -/// Not found Broadcast for this Change -class NoBroadcastPerformerException implements Exception { - final Type change; - - const NoBroadcastPerformerException(this.change); - - @override - String toString() { - return 'No broadcast found for $change'; - } -} diff --git a/packages/mwwm/lib/src/model/model.dart b/packages/mwwm/lib/src/model/model.dart deleted file mode 100644 index 5d51681ae..000000000 --- a/packages/mwwm/lib/src/model/model.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/foundation.dart'; -import 'package:mwwm/src/model/changes/changes.dart'; -import 'package:mwwm/src/model/exceptions.dart'; -import 'package:mwwm/src/model/performer/performer.dart'; - -/// Model is a mediator between WidgetModel and business logic. -/// -/// Model abstracts the client (WidgetModel) from the supplier (repository, -/// service, storage, etc) and defines the contract between presentation and -/// service layers, thus allowing to develop both independently. -/// -/// Model consists of [Change] and [Performer]. -class Model { - const Model(this._performers); - - final List _performers; - - /// Perform some change inside business logic once - R perform(Change change) { - for (final p in _performers) { - debugPrint('[PERFORM] $p try to perform $change'); - if (p.canPerform(change)) { - return p.perform(change) as R; - } - } - - throw NoPerformerException(change); - } - - /// Listen to changes of exact type - Stream listen>() { - for (final p in _performers) { - try { - if (p is Broadcast) { - return p.broadcast; - } else { - continue; - } - // ignore: avoid_catching_errors - } on TypeError catch (e) { - debugPrint(e.toString()); - continue; - } on Exception catch (e) { - return Stream.error(e); - } - } - - return Stream.error(NoBroadcastPerformerException(C)); - } -} diff --git a/packages/mwwm/lib/src/model/performer/performer.dart b/packages/mwwm/lib/src/model/performer/performer.dart deleted file mode 100644 index 86a1a0530..000000000 --- a/packages/mwwm/lib/src/model/performer/performer.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:mwwm/mwwm.dart'; - -/// Performer handles a specific [Change]. -/// It's a key component in the relationship between WidgetModel -/// that requests some data, and the source of these data. -/// R - type of result -/// C - type of change on which performer triggers -abstract class Performer> { - const Performer(); - - factory Performer.from(FunctionalPerformer _performerFunc) => - _Performer(_performerFunc); - - /// Main method to perform a Change - /// - /// Here placed a logic to react to change. There can be - /// request to a server or something else. - /// - /// This method use Model when perform change. - /// - /// Typically don't use directly - R perform(C change); - - /// Method to check ability to perform a object - /// c - can be anything - /// - /// Typically used only in Model - bool canPerform(Object c) => c is C; -} - -typedef FunctionalPerformer = R Function(C); - -class _Performer> extends Performer { - const _Performer(this._performerFunc); - - final FunctionalPerformer _performerFunc; - - @override - R perform(C change) { - return _performerFunc(change); - } -} - -/// Alias for performers which result is a Future with data -/// This operations do only once -abstract class FuturePerformer> - extends Performer, C> { - const FuturePerformer(); -} - -/// Alias for performers that return Stream of data -/// Recommended for observabling data -abstract class StreamPerformer> - extends Performer, C> { - const StreamPerformer(); -} - -/// Broadcast is a [Performer] that allows listening to -/// results of [perform]. -/// R - type of result -/// C - type of change on which performer triggers -abstract class Broadcast> - extends FuturePerformer { - final _controller = StreamController.broadcast(); - - /// Stream of results of [perform]. - Stream get broadcast => _controller.stream; - - @override - Future perform(C change) { - final result = performInternal(change); - _addBroadcast(result); - return result; - } - - Future performInternal(C change); - - void _addBroadcast(Future result) { - _controller.addStream(result.asStream()); - } -} diff --git a/packages/mwwm/lib/src/ticker_providers.dart b/packages/mwwm/lib/src/ticker_providers.dart deleted file mode 100644 index 46d022128..000000000 --- a/packages/mwwm/lib/src/ticker_providers.dart +++ /dev/null @@ -1,136 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/scheduler.dart'; -import 'package:flutter/widgets.dart'; -import 'package:mwwm/src/widget_model.dart'; - -/// Single ticker provider for [WidgetModel] -/// based on [SingleTickerProviderStateMixin] -/// https://api.flutter.dev/flutter/widgets/SingleTickerProviderStateMixin-mixin.html -mixin SingleTickerProviderWidgetModelMixin on WidgetModel - implements TickerProvider { - Ticker? _ticker; - - @override - Ticker createTicker(TickerCallback onTick) { - assert(() { - if (_ticker == null) return true; - throw FlutterError.fromParts( - [ - ErrorSummary( - '$runtimeType is a SingleTickerProviderWidgetModelMixin but multiple tickers were created.', - ), - ErrorDescription( - 'A SingleTickerProviderWidgetModelMixin can only be used as a TickerProvider once.', - ), - ErrorHint( - 'If a WidgetModel is used for multiple AnimationController objects, or if it is passed to other ' - 'objects and those objects might use it more than one time in total, then instead of ' - 'mixing in a SingleTickerProviderWidgetModelMixin, implement your own TickerProviderWidgetModelMixin.', - ), - ], - ); - }()); - _ticker = - Ticker(onTick, debugLabel: kDebugMode ? 'created by $this' : null); - return _ticker!; - } - - @override - void dispose() { - assert(() { - if (_ticker == null || !_ticker!.isActive) return true; - throw FlutterError.fromParts( - [ - ErrorSummary( - '$this was disposed with an active Ticker.', - ), - ErrorDescription( - '$runtimeType created a Ticker via its SingleTickerProviderWidgetModelMixin, but at the time ' - 'dispose() was called on the mixin, that Ticker was still active. The Ticker must ' - 'be disposed before calling super.dispose().', - ), - ErrorHint( - 'Tickers used by AnimationControllers ' - 'should be disposed by calling dispose() on the AnimationController itself. ' - 'Otherwise, the ticker will leak.', - ), - _ticker!.describeForError('The offending ticker was'), - ], - ); - }()); - super.dispose(); - } -} - -/// Ticker provider for [WidgetModel] -/// based on [TickerProviderStateMixin] -/// https://api.flutter.dev/flutter/widgets/TickerProviderStateMixin-mixin.html -mixin TickerProviderWidgetModelMixin on WidgetModel implements TickerProvider { - final _tickers = {}; - - @override - Ticker createTicker(TickerCallback onTick) { - final result = _WidgetTicker(onTick, this, debugLabel: 'created by $this'); - _tickers.add(result); - return result; - } - - void _removeTicker(_WidgetTicker ticker) { - assert(_tickers.contains(ticker)); - _tickers.remove(ticker); - } - - @override - void dispose() { - assert(() { - for (final ticker in _tickers) { - if (ticker.isActive) { - throw FlutterError.fromParts( - [ - ErrorSummary( - '$this was disposed with an active Ticker.', - ), - ErrorDescription( - '$runtimeType created a Ticker via its TickerProviderWidgetModelMixin, but at the time ' - 'dispose() was called on the mixin, that Ticker was still active. The Ticker must ' - 'be disposed before calling super.dispose().', - ), - ErrorHint( - 'Tickers used by AnimationControllers ' - 'should be disposed by calling dispose() on the AnimationController itself. ' - 'Otherwise, the ticker will leak.', - ), - ticker.describeForError('The offending ticker was'), - ], - ); - } - } - return true; - }()); - - super.dispose(); - } -} - -// This class should really be called _DisposingTicker or some such, but this -// class name leaks into stack traces and error messages and that name would be -// confusing. Instead we use the less precise but more anodyne "_WidgetTicker", -// which attracts less attention. -class _WidgetTicker extends Ticker { - _WidgetTicker( - TickerCallback onTick, - this._creator, { - String? debugLabel, - }) : super( - onTick, - debugLabel: debugLabel, - ); - - final TickerProviderWidgetModelMixin _creator; - - @override - void dispose() { - _creator._removeTicker(this); - super.dispose(); - } -} diff --git a/packages/mwwm/lib/src/utils/composite_subscription.dart b/packages/mwwm/lib/src/utils/composite_subscription.dart deleted file mode 100755 index dd66538f7..000000000 --- a/packages/mwwm/lib/src/utils/composite_subscription.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -/// inspired by rxDart -/// -/// Acts as a container for multiple subscriptions that can be canceled at once -/// e.g. view subscriptions in Flutter that need to be canceled on view disposal -/// -/// Can be cleared or disposed. When disposed, cannot be used again. -/// ### Example -/// // init your subscriptions -/// composite.add(observable1.listen(listener1)) -/// ..add(observable2.listen(listener1)) -/// ..add(observable3.listen(listener1)); -/// -/// // clear them all at once -/// composite.clear(); -class CompositeSubscription { - bool _isDisposed = false; - - final _subscriptionsList = >[]; - - /// Checks if this composite is disposed. If it is, the composite can't be used again - /// and will throw an error if you try to add more subscriptions to it. - bool get isDisposed => _isDisposed; - - /// Adds new subscription to this composite. - /// - /// Throws an exception if this composite was disposed - StreamSubscription add(StreamSubscription subscription) { - if (isDisposed) { - throw Exception( - 'This composite was disposed, try to use new instance instead', - ); - } - _subscriptionsList.add(subscription); - return subscription; - } - - /// Cancels subscription and removes it from this composite. - void remove(StreamSubscription subscription) { - subscription.cancel(); - _subscriptionsList.remove(subscription); - } - - /// Cancels all subscriptions added to this composite. Clears subscriptions collection. - /// - /// This composite can be reused after calling this method. - void clear() { - _subscriptionsList - ..forEach((subscription) => subscription.cancel()) - ..clear(); - } - - /// Cancels all subscriptions added to this composite. Disposes this. - /// - /// This composite can't be reused after calling this method. - void dispose() { - clear(); - _isDisposed = true; - } -} diff --git a/packages/mwwm/lib/src/widget_model.dart b/packages/mwwm/lib/src/widget_model.dart deleted file mode 100644 index 10efbf0d4..000000000 --- a/packages/mwwm/lib/src/widget_model.dart +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:mwwm/src/dependencies/wm_dependencies.dart'; -import 'package:mwwm/src/error/error_handler.dart'; -import 'package:mwwm/src/utils/composite_subscription.dart'; - -/// WidgetModel -/// WM is logical representation of widget and its state. -/// `WidgetModelDependencies` - is pack of dependencies for WidgetModel. Most often it is `ErrorHandler`. -/// `Model` - optionally, but recommended, manager for connection with business layer -abstract class WidgetModel { - @protected - final Model model; - - final _compositeSubscription = CompositeSubscription(); - - final ErrorHandler? _errorHandler; - - WidgetModel( - WidgetModelDependencies baseDependencies, { - Model? model, - }) : _errorHandler = baseDependencies.errorHandler, - model = model ?? const Model([]); - - /// called when widget ready - @mustCallSuper - void onLoad() {} - - /// here need to bind - @mustCallSuper - void onBind() {} - - /// subscribe for interactors - StreamSubscription subscribe( - Stream stream, - void Function(T value) onValue, { - void Function(Object error)? onError, - }) => - _compositeSubscription - .add(stream.listen(onValue, onError: onError?.call)); - - /// subscribe for interactors with default handle error - StreamSubscription subscribeHandleError( - Stream stream, - void Function(T value) onValue, { - void Function(Object error)? onError, - }) { - // ignore: avoid_types_on_closure_parameters - final subscription = stream.listen(onValue, onError: (Object e) { - handleError(e); - onError?.call(e); - }); - - return _compositeSubscription.add(subscription); - } - - /// Call a future. - /// Using Rx wrappers with [subscribe] method is preferable. - @Deprecated('Use try/catch instead') - void doFuture( - Future future, - void Function(T value) onValue, { - void Function(Object error)? onError, - }) { - // ignore: avoid_types_on_closure_parameters - future.then(onValue).catchError((Object e) { - onError?.call(e); - }); - } - - /// Call a future with default error handling - @Deprecated('Use try/catch instead') - void doFutureHandleError( - Future future, - void Function(T value) onValue, { - void Function(Object error)? onError, - }) { - // ignore: avoid_types_on_closure_parameters - future.then(onValue).catchError((Object e) { - handleError(e); - onError?.call(e); - }); - } - - /// Close streams of WM - void dispose() { - _compositeSubscription.dispose(); - } - - /// standard error handling - @protected - void handleError(Object e) { - _errorHandler?.handleError(e); - } -} diff --git a/packages/mwwm/lib/src/widget_state.dart b/packages/mwwm/lib/src/widget_state.dart deleted file mode 100644 index 8a393ca0b..000000000 --- a/packages/mwwm/lib/src/widget_state.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/foundation.dart'; -import 'package:flutter/widgets.dart'; -import 'package:mwwm/mwwm.dart'; - -typedef WidgetModelBuilder = WM Function(BuildContext context); - -/// Class for widgets that has [WidgetModel] -/// You must provide [WidgetModel] in constructor or by WidgetModelFactory -abstract class CoreMwwmWidget extends StatefulWidget { - /// Builder for `WidgetModel` - /// There are two possibilities to provide `WidgetModel` : - /// 1. Here by [widgetModelBuilder] (prefer) - /// 2. Or by `WidgetModelFactory` - /// - /// By convention provide builder for WM this way - /// ``` - /// const MyAwesomeWidget( - /// WidgetModel wmBuilder, - /// ) : super( - /// widgetModelBuilder: wmBuilder ?? myBuilderFn - /// ); - /// ``` - final WidgetModelBuilder widgetModelBuilder; - - const CoreMwwmWidget({ - required this.widgetModelBuilder, - Key? key, - }) : super(key: key); - - @override - @nonVirtual - // ignore: no_logic_in_create_state - State createState() => createWidgetState(); - - WidgetState, WM> createWidgetState(); -} - -/// Base class for state of [CoreMwwmWidget]. -/// Has [WidgetModel] from [initState]. -abstract class WidgetState, WM extends WidgetModel> - extends State { - @protected - WM get wm => _wm; - - /// [WidgetModel] for widget. - late WM _wm; - - /// Descendants must call super firstly - @mustCallSuper - @override - void initState() { - _wm = widget.widgetModelBuilder(context); - - super.initState(); - - _wm - ..onLoad() - ..onBind(); - } - - /// Descendants must call super in the end - @protected - @mustCallSuper - @override - void dispose() { - _wm.dispose(); - super.dispose(); - } -} diff --git a/packages/mwwm/logo.png b/packages/mwwm/logo.png deleted file mode 100644 index b5b487e5a..000000000 Binary files a/packages/mwwm/logo.png and /dev/null differ diff --git a/packages/mwwm/pubspec.yaml b/packages/mwwm/pubspec.yaml deleted file mode 100644 index fc3d1a318..000000000 --- a/packages/mwwm/pubspec.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: mwwm -version: 2.0.0 -description: | - Software architecture pattern for teams with different sizes. Add possibility to work separately. Separate UI, presentation logic and business logic. - -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/mwwm" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - mocktail: ^0.1.1 - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: diff --git a/packages/mwwm/test/composite_subscription_test.dart b/packages/mwwm/test/composite_subscription_test.dart deleted file mode 100644 index c67da5b22..000000000 --- a/packages/mwwm/test/composite_subscription_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:mwwm/src/utils/composite_subscription.dart'; - -import 'mocks/steam_subscription_mock.dart'; - -void main() { - group('CompositeSubscription', () { - late CompositeSubscription compositeSubscription; - late StreamSubscriptionMock streamSubscriptionMock; - - setUp(() { - compositeSubscription = CompositeSubscription(); - - streamSubscriptionMock = StreamSubscriptionMock(); - when(streamSubscriptionMock.cancel) - .thenAnswer((_) => Future.value()); - }); - - test('isDisposed returns false if no called dispose()', () { - expect(compositeSubscription.isDisposed, isFalse); - }); - - group('add()', () { - test('returns subscription', () { - expect( - compositeSubscription.add(streamSubscriptionMock), - streamSubscriptionMock, - ); - }); - - test('does not throw an exception isDisposed is false', () { - expect( - () => compositeSubscription.add(streamSubscriptionMock), - returnsNormally, - ); - }); - - test('throws an exception if isDisposed is true', () { - compositeSubscription.dispose(); - - expect( - () => compositeSubscription.add(streamSubscriptionMock), - throwsA(isException), - ); - }); - - group('remove', () { - test('calls subscription.cancel()', () { - compositeSubscription - ..add(streamSubscriptionMock) - ..remove(streamSubscriptionMock); - - verify(streamSubscriptionMock.cancel); - }); - }); - - group('clear', () { - test('calls clear for all streamSubscription', () { - final streamSubscriptionMock1 = StreamSubscriptionMock(); - when(streamSubscriptionMock1.cancel) - .thenAnswer((_) => Future.value()); - - compositeSubscription - ..add(streamSubscriptionMock) - ..add(streamSubscriptionMock1) - ..clear(); - - verify(streamSubscriptionMock.cancel); - verify(streamSubscriptionMock1.cancel); - }); - }); - - group('dispose', () { - test('calls clear()', () { - compositeSubscription - ..add(streamSubscriptionMock) - ..dispose(); - - verify(streamSubscriptionMock.cancel); - }); - }); - }); - }); -} diff --git a/packages/mwwm/test/mocks/change_mock.dart b/packages/mwwm/test/mocks/change_mock.dart deleted file mode 100644 index a1966e35f..000000000 --- a/packages/mwwm/test/mocks/change_mock.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:mocktail/mocktail.dart'; -import 'package:mwwm/src/model/changes/changes.dart'; - -class ChangeMock extends Mock implements Change {} - -class FutureChangeMock extends Mock implements FutureChange {} diff --git a/packages/mwwm/test/mocks/error_handler_mock.dart b/packages/mwwm/test/mocks/error_handler_mock.dart deleted file mode 100644 index 713622810..000000000 --- a/packages/mwwm/test/mocks/error_handler_mock.dart +++ /dev/null @@ -1,4 +0,0 @@ -import 'package:mocktail/mocktail.dart'; -import 'package:mwwm/src/error/error_handler.dart'; - -class ErrorHandlerMock extends Mock implements ErrorHandler {} diff --git a/packages/mwwm/test/mocks/performer_mock.dart b/packages/mwwm/test/mocks/performer_mock.dart deleted file mode 100644 index 3c917fe0e..000000000 --- a/packages/mwwm/test/mocks/performer_mock.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:mocktail/mocktail.dart'; -import 'package:mwwm/src/model/changes/changes.dart'; -import 'package:mwwm/src/model/performer/performer.dart'; - -class PerformerMock> extends Mock - implements Performer {} - -class BroadcastMock> extends Mock - implements Broadcast {} diff --git a/packages/mwwm/test/mocks/steam_subscription_mock.dart b/packages/mwwm/test/mocks/steam_subscription_mock.dart deleted file mode 100644 index 3848b2a07..000000000 --- a/packages/mwwm/test/mocks/steam_subscription_mock.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'dart:async'; - -import 'package:mocktail/mocktail.dart'; - -class StreamSubscriptionMock extends Mock implements StreamSubscription {} diff --git a/packages/mwwm/test/mocks/stream_mock.dart b/packages/mwwm/test/mocks/stream_mock.dart deleted file mode 100644 index 98501ce6a..000000000 --- a/packages/mwwm/test/mocks/stream_mock.dart +++ /dev/null @@ -1,3 +0,0 @@ -import 'package:mocktail/mocktail.dart'; - -class StreamMock extends Mock implements Stream {} diff --git a/packages/mwwm/test/mocks/widget_model_mock.dart b/packages/mwwm/test/mocks/widget_model_mock.dart deleted file mode 100644 index f7a98800f..000000000 --- a/packages/mwwm/test/mocks/widget_model_mock.dart +++ /dev/null @@ -1,4 +0,0 @@ -import 'package:mocktail/mocktail.dart'; -import 'package:mwwm/mwwm.dart'; - -class WidgetModelMock extends Mock implements WidgetModel {} diff --git a/packages/mwwm/test/model_test.dart b/packages/mwwm/test/model_test.dart deleted file mode 100644 index f3a50a013..000000000 --- a/packages/mwwm/test/model_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -import 'dart:async'; - -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:mwwm/src/model/exceptions.dart'; -import 'package:mwwm/src/model/model.dart'; - -import 'mocks/change_mock.dart'; -import 'mocks/performer_mock.dart'; - -void main() { - group('Model', () { - late Model model; - late PerformerMock> performerMock; - late ChangeMock changeMock; - - late PerformerMock> performerStringMock; - - setUp(() { - registerFallbackValue>(ChangeMock()); - registerFallbackValue>(ChangeMock()); - - performerMock = PerformerMock>(); - performerStringMock = PerformerMock>(); - - model = Model([ - performerStringMock, - performerMock, - ]); - - changeMock = ChangeMock(); - }); - - group('perform()', () { - test('returns result of perform passed changes by optimal performer', () { - const changes = 4; - - when(() => performerMock.canPerform(any())).thenReturn(true); - when(() => performerStringMock.canPerform(any())) - .thenReturn(false); - when(() => performerMock.perform(any())).thenReturn(changes); - - expect(model.perform(changeMock), equals(changes)); - verifyNever(() => performerStringMock.perform(any())); - }); - - test('returns NoPerformerException if no found perfomer', () { - when(() => performerMock.canPerform(any())).thenReturn(false); - when(() => performerStringMock.canPerform(any())) - .thenReturn(false); - - expect( - () => model.perform(changeMock), - throwsA(isA()), - ); - }); - }); - - group('listen', () { - test('return stream if performer is broadcast', () { - final broadcastMock = BroadcastMock>(); - final stream = StreamController().stream; - when(() => broadcastMock.broadcast).thenAnswer((_) => stream); - - model = Model([ - performerStringMock, - performerMock, - broadcastMock, - ]); - - expect(model.listen>(), equals(stream)); - }); - - test('return Stream.error if model no contains broadcast', () { - expect(model.listen>(), isA>()); - - try { - model.listen>(); - } on Exception catch (e) { - expect(e, isA()); - } - }); - }); - }); -} diff --git a/packages/mwwm/test/test_entities/test_widget_model.dart b/packages/mwwm/test/test_entities/test_widget_model.dart deleted file mode 100644 index 37ad7e5d1..000000000 --- a/packages/mwwm/test/test_entities/test_widget_model.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:mwwm/src/dependencies/wm_dependencies.dart'; -import 'package:mwwm/src/widget_model.dart'; - -class TestWidgetModel extends WidgetModel { - TestWidgetModel(WidgetModelDependencies baseDependencies) - : super(baseDependencies); -} diff --git a/packages/mwwm/test/widget_model_test.dart b/packages/mwwm/test/widget_model_test.dart deleted file mode 100644 index c5d53432c..000000000 --- a/packages/mwwm/test/widget_model_test.dart +++ /dev/null @@ -1,164 +0,0 @@ -import 'dart:async'; - -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:mwwm/src/dependencies/wm_dependencies.dart'; -import 'package:mwwm/src/widget_model.dart'; - -import 'mocks/error_handler_mock.dart'; -import 'mocks/steam_subscription_mock.dart'; -import 'mocks/stream_mock.dart'; -import 'test_entities/test_widget_model.dart'; -// ignore_for_file: deprecated_member_use_from_same_package - -void main() { - group('WidgetModel', () { - late WidgetModel widgetModel; - late ErrorHandlerMock errorHandlerMock; - late StreamController streamController; - late Completer completer; - const value = 1; - - setUp(() { - errorHandlerMock = ErrorHandlerMock(); - streamController = StreamController(); - completer = Completer.sync(); - widgetModel = TestWidgetModel( - WidgetModelDependencies(errorHandler: errorHandlerMock), - ); - }); - - group('subscribe', () { - test('returns StreamSubscription', () { - expect( - widgetModel.subscribe(streamController.stream, (t) {}), - isA>(), - ); - }); - - test('uses onValue handle on stream', () { - widgetModel.subscribe(streamController.stream, (v) { - expect(v, equals(value)); - }); - - streamController - ..add(value) - ..close(); - }); - - test('uses onError handle on stream', () { - widgetModel.subscribe(streamController.stream, (t) {}, onError: (v) { - expect(v, equals(value)); - }); - - streamController - ..addError(value) - ..close(); - }); - }); - - group('subscribeHandleError', () { - test('returns StreamSubscription', () { - expect( - widgetModel.subscribeHandleError(streamController.stream, (t) {}), - isA>(), - ); - }); - - test('subscribes onValue handle on stream', () { - widgetModel.subscribeHandleError(streamController.stream, (v) { - expect(v, equals(value)); - }); - - streamController - ..add(value) - ..close(); - }); - - test('subscribes onError handle on stream', () { - void verifyFunc(Object v) { - verify(() => errorHandlerMock.handleError(value)); - expect(v, equals(value)); - } - - widgetModel.subscribeHandleError( - streamController.stream, - (t) {}, - onError: verifyFunc, - ); - - streamController - ..addError(value) - ..close(); - }); - }); - - group('doFuture', () { - test('calls onValue after complete Future', () { - late int res; - widgetModel.doFuture(completer.future, (value) { - res = value; - }); - completer.complete(value); - expect(res, equals(value)); - }); - - test('calls onError after throw Error', () { - widgetModel.doFuture( - completer.future, - (value) { - throw Exception(); - }, - onError: (e) { - expect(e, isException); - }, - ); - completer.complete(value); - }); - }); - - group('doFutureHandleError', () { - test('calls onValue after complete Future', () { - late int res; - widgetModel.doFutureHandleError(completer.future, (newValue) { - res = newValue; - }); - completer.complete(value); - expect(res, equals(value)); - }); - - test('calls onError after throw Error', () { - FutureOr onValue(int c) { - throw Exception(); - } - - widgetModel.doFutureHandleError( - completer.future, - onValue, - onError: (e) { - expect(e, isException); - }, - ); - - completer.complete(value); - verify(() => errorHandlerMock.handleError(any())); - }); - }); - - group('dispose', () { - test('call cancel for stream', () { - final streamMock = StreamMock(); - - final streamSubscription = StreamSubscriptionMock(); - when(streamSubscription.cancel).thenAnswer((_) => Future.value()); - when(() => streamMock.listen(any())).thenReturn(streamSubscription); - - widgetModel - ..subscribe(streamMock, (t) {}) - ..dispose(); - - verify(streamSubscription.cancel); - }); - }); - }); -} diff --git a/packages/mwwm/test/widget_state_test.dart b/packages/mwwm/test/widget_state_test.dart deleted file mode 100644 index af00fbc01..000000000 --- a/packages/mwwm/test/widget_state_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:mwwm/mwwm.dart'; - -import 'mocks/widget_model_mock.dart'; - -class TestWidget extends CoreMwwmWidget { - const TestWidget( - {required WidgetModelBuilder widgetModelBuilder, - Key? key}) - : super( - key: key, - widgetModelBuilder: widgetModelBuilder, - ); - - @override - WidgetState, WidgetModelMock> - createWidgetState() { - return TestWidgetState(); - } -} - -class TestWidgetState extends WidgetState { - @override - Widget build(BuildContext context) { - return const SizedBox.shrink(); - } -} - -void main() { - group('WidgetState', () { - late TestWidget testWidget; - late WidgetModelMock widgetModelMock; - setUp(() { - widgetModelMock = WidgetModelMock(); - testWidget = TestWidget( - key: UniqueKey(), widgetModelBuilder: (context) => widgetModelMock); - }); - testWidgets( - 'onLoad and onBind called on initState', - (tester) async { - await tester.pumpWidget(testWidget); - verify(() => widgetModelMock.onLoad()); - verify(() => widgetModelMock.onBind()); - }, - ); - }); -} diff --git a/packages/otp_autofill/.gitignore b/packages/otp_autofill/.gitignore deleted file mode 100644 index e9dc58d3d..000000000 --- a/packages/otp_autofill/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ - -build/ diff --git a/packages/otp_autofill/.metadata b/packages/otp_autofill/.metadata deleted file mode 100644 index ccb634bb6..000000000 --- a/packages/otp_autofill/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8af6b2f038c1172e61d418869363a28dffec3cb4 - channel: stable - -project_type: plugin diff --git a/packages/otp_autofill/CHANGELOG.md b/packages/otp_autofill/CHANGELOG.md deleted file mode 100644 index 18b9ec3e8..000000000 --- a/packages/otp_autofill/CHANGELOG.md +++ /dev/null @@ -1,38 +0,0 @@ -# Changelog - -## 1.1.0 - 2021-07-13 - -* Stable release - -## 1.1.0-dev.1 - 2021-07-08 - -* Make native Android receivers null after unregister. -* Add `autoStop` param to `OTPTextEditController`. -* Make `OTPTextEditController`'s `onCodeReceive` non-required. - -## 1.0.2 - 2021-05-30 - -* Stable release - -## 1.0.2-dev.1 - 2021-05-25 - -* Apply new lint rules. - -## 1.0.1 - -* Fix android build bug related on null-safety. -* Update readme. - -## 1.0.0 - -* Migrate this package to null safety. - -## 0.0.1-dev.4 - -* fix platformException on TimeOut - -## 0.0.1 - Released - -* add SMS Retriever API support -* add SMS User Consent API support -* add OTPStrategy for another OTP code input diff --git a/packages/otp_autofill/LICENSE b/packages/otp_autofill/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/otp_autofill/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/otp_autofill/README.md b/packages/otp_autofill/README.md deleted file mode 100644 index b713e62db..000000000 --- a/packages/otp_autofill/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# OTP autofill - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/otp_autofill) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=otp_autofill&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/otp_autofill?logo=dart&logoColor=white)](https://pub.dev/packages/otp_autofill) -[![Pub Likes](https://badgen.net/pub/likes/otp_autofill)](https://pub.dev/packages/otp_autofill) -[![Pub popularity](https://badgen.net/pub/popularity/otp_autofill)](https://pub.dev/packages/otp_autofill/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/otp_autofill) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -This plugin uses [SMS User Consent API](https://developers.google.com/identity/sms-retriever/user-consent/overview) and [SMS Retriever API](https://developers.google.com/identity/sms-retriever/overview) on Android. - -You could use autofill from another input by using OTPStrategy. (e.g. from push-notification). - -For testing you could create `TestStrategy`. - -## iOS - -On iOS OTP autofill is built in `TextField`. -Code from sms stores for 3 minutes. - -### Rules for sms - -1. Sms must contain the word `code` or it translation to ios supported localizations. -1. Must be only one digit sequence in sms. - -### iOS Testing - -iOS can receive number from any other number. - -## Android - -`OTPInteractor.hint` - show system dialog to select saved phone numbers (recommendation from google). -`OTPInteractor.getAppSignature` - create hash-code of your application, that used in [SMS Retriever API](https://developers.google.com/identity/sms-retriever/overview). -`OTPInteractor.startListenUserConsent` - BroadcastReceiver start listen for code from Google Services for 5 minutes. Above 5 minutes raise timeout exception. Using [SMS User Consent API](https://developers.google.com/identity/sms-retriever/user-consent/overview). -`OTPInteractor.startListenRetriever` - BroadcastReceiver start listen for code from Google Services for 5 minutes. Above 5 minutes raise timeout exception. Using [SMS Retriever API](https://developers.google.com/identity/sms-retriever/overview). -`OTPInteractor.stopListenForCode` - use in dispose. - -Plugin receive full sms text, need parser for sms. - -If you use [SMS User Consent API](https://developers.google.com/identity/sms-retriever/user-consent/overview) then system ask for permission to reed incoming message. - -### Rules for sms. SMS User Consent API - -1. The message contains a 4-10 character alphanumeric string with at least one number. -2. The message was sent by a phone number that's not in the user's contacts. -3. If you specified the sender's phone number, the message was sent by that number. - -### Rules for sms. SMS Retriever API - -1. Be no longer than 140 bytes -1. Contain a one-time code that the client sends back to your server to complete the verification flow -1. Include an 11-character hash string that identifies your app ([documentation for server](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string), for testing you can get in from `OTPInteractor.getAppSignature`) - -### Android Testing - -`OTPInteractor.startListenForCode` has `senderPhone` argument. Application start receiving code from this number. - -## Usage - -You could user `OTPInteractor` to interact with OTP. - -For easy implementation you could use `OTPTextEditController` as a controller to your `TextField`. - -`OTPTextEditController.startListenUserConsent` - use [SMS User Consent API](user_consent_link), and custom strategies. -`OTPTextEditController.startListenRetriever` - use [SMS Retriever API](retriever_link), and custom strategies. -`OTPTextEditController.startListenOnlyStrategies` - listen only custom strategies. -`OTPTextEditController.stopListen` - use in dispose. - -## Installation - -Add `otp_autofill` to your `pubspec.yaml` file: - -```yaml -dependencies: - otp_autofill: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -### Android Installation - -Set `minSdkVersion` at least to 19 in `/project/android/app/build.gradle`. - -``` gradle -android { - ... - defaultConfig { - ... - minSdkVersion 19 - ... - } - ... -} -``` - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/otp_autofill/analysis_options.yaml b/packages/otp_autofill/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/otp_autofill/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/otp_autofill/android/.gitignore b/packages/otp_autofill/android/.gitignore deleted file mode 100644 index c6cbe562a..000000000 --- a/packages/otp_autofill/android/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures diff --git a/packages/otp_autofill/android/build.gradle b/packages/otp_autofill/android/build.gradle deleted file mode 100644 index 6b8970939..000000000 --- a/packages/otp_autofill/android/build.gradle +++ /dev/null @@ -1,45 +0,0 @@ -group 'ru.surfstudio.otp_autofill' -version '1.0-SNAPSHOT' - -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -rootProject.allprojects { - repositories { - google() - jcenter() - } -} - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - defaultConfig { - minSdkVersion 19 - } - lintOptions { - disable 'InvalidPackage' - } -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.google.android.gms:play-services-auth:17.0.0' - implementation 'com.google.android.gms:play-services-auth-api-phone:17.4.0' -} diff --git a/packages/otp_autofill/android/gradle.properties b/packages/otp_autofill/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/packages/otp_autofill/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/otp_autofill/android/gradle/wrapper/gradle-wrapper.properties b/packages/otp_autofill/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 01a286e96..000000000 --- a/packages/otp_autofill/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/otp_autofill/android/settings.gradle b/packages/otp_autofill/android/settings.gradle deleted file mode 100644 index 9f7268943..000000000 --- a/packages/otp_autofill/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'otp_autofill' diff --git a/packages/otp_autofill/android/src/main/AndroidManifest.xml b/packages/otp_autofill/android/src/main/AndroidManifest.xml deleted file mode 100644 index c20e05f2f..000000000 --- a/packages/otp_autofill/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/AppSignatureHelper.kt b/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/AppSignatureHelper.kt deleted file mode 100644 index 1e6a23310..000000000 --- a/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/AppSignatureHelper.kt +++ /dev/null @@ -1,45 +0,0 @@ -package ru.surfstudio.otp_autofill - -import android.content.Context -import android.content.ContextWrapper -import android.content.pm.PackageManager -import android.util.Base64 -import java.nio.charset.StandardCharsets -import java.security.MessageDigest -import java.security.NoSuchAlgorithmException - -private const val HASH_TYPE = "SHA-256" -private const val NUM_HASHED_BYTES = 9 -private const val NUM_BASE64_CHAR = 11 - -/// From Google Example App -// https://github.com/googlearchive/android-credentials/blob/master/sms-verification/android/app/src/main/java/com/google/samples/smartlock/sms_verify/AppSignatureHelper.java -class AppSignatureHelper(context: Context) : ContextWrapper(context) { - - fun getAppSignatures(): List { - return try { - val packageName = packageName - val packageManager = packageManager - val signatures = packageManager.getPackageInfo(packageName, - PackageManager.GET_SIGNATURES).signatures - signatures.mapNotNull { hash(packageName, it.toCharsString()) } - } catch (e: PackageManager.NameNotFoundException) { - emptyList() - } - } - - private fun hash(packageName: String, signature: String): String? { - val appInfo = "$packageName $signature" - return try { - val messageDigest = MessageDigest.getInstance(HASH_TYPE) - messageDigest.update(appInfo.toByteArray(StandardCharsets.UTF_8)) - val hashSignature = messageDigest.digest().copyOfRange(0, NUM_HASHED_BYTES) - var base64Hash = Base64.encodeToString(hashSignature, Base64.NO_PADDING or Base64.NO_WRAP) - base64Hash = base64Hash.substring(0, NUM_BASE64_CHAR) - base64Hash - } catch (e: NoSuchAlgorithmException) { - null - } - } - -} \ No newline at end of file diff --git a/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/OTPPlugin.kt b/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/OTPPlugin.kt deleted file mode 100644 index 7b89fd9b3..000000000 --- a/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/OTPPlugin.kt +++ /dev/null @@ -1,215 +0,0 @@ -package ru.surfstudio.otp_autofill - -import android.app.Activity -import android.content.Context -import android.content.Intent -import android.content.IntentFilter -import androidx.annotation.NonNull; -import com.google.android.gms.auth.api.credentials.Credential -import com.google.android.gms.auth.api.credentials.Credentials -import com.google.android.gms.auth.api.credentials.HintRequest -import com.google.android.gms.auth.api.phone.SmsRetriever - -import io.flutter.embedding.engine.plugins.FlutterPlugin -import io.flutter.embedding.engine.plugins.activity.ActivityAware -import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding -import io.flutter.plugin.common.MethodCall -import io.flutter.plugin.common.MethodChannel -import io.flutter.plugin.common.MethodChannel.MethodCallHandler -import io.flutter.plugin.common.MethodChannel.Result -import io.flutter.plugin.common.PluginRegistry -import io.flutter.plugin.common.PluginRegistry.Registrar - -/// Channel -const val channelName: String = "otp_surfstudio" - -/// Requests -const val credentialPickerRequest = 1 -const val smsConsentRequest = 2 - -/// Methods -const val getTelephoneHint: String = "getTelephoneHint" -const val startListenUserConsent: String = "startListenUserConsent" -const val startListenRetriever: String = "startListenRetriever" -const val stopListenForCode: String = "stopListenForCode" -const val getAppSignatureMethod: String = "getAppSignature" - -/// Arguments -const val senderTelephoneNumber: String = "senderTelephoneNumber" - -/** OtpTextEditControllerPlugin */ -public class OTPPlugin : FlutterPlugin, MethodCallHandler, PluginRegistry.ActivityResultListener, ActivityAware { - - private lateinit var channel: MethodChannel - - private var smsUserConsentBroadcastReceiver: SmsUserConsentReceiver? = null - private var smsRetrieverBroadcastReceiver: SmsRetrieverReceiver? = null - private var activity: Activity? = null - - override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { - context = flutterPluginBinding.applicationContext - channel = MethodChannel(flutterPluginBinding.binaryMessenger, channelName) - channel.setMethodCallHandler(this); - } - - companion object { - private var context: Context? = null - private var lastResult: Result? = null - - @JvmStatic - fun registerWith(registrar: Registrar) { - context = registrar.context() - val channel = MethodChannel(registrar.messenger(), channelName) - val plugin = OTPPlugin() - channel.setMethodCallHandler(plugin) - registrar.addActivityResultListener(plugin) - } - } - - override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { - when (call.method) { - startListenRetriever -> { - listenRetriever(result) - } - startListenUserConsent -> { - listenUserConsent(call, result) - } - getTelephoneHint -> { - showNumberHint(result) - } - stopListenForCode -> { - unRegisterBroadcastReceivers() - result.success(true) - } - getAppSignatureMethod -> { - if (activity != null) { - val signature = AppSignatureHelper(this.activity!!).getAppSignatures()[0] - result.success(signature) - } else result.success(null) - } - else -> result.notImplemented() - } - } - - private fun showNumberHint(result: Result) { - lastResult = result - if (activity != null) { - val hintRequest = HintRequest.Builder() - .setPhoneNumberIdentifierSupported(true) - .build() - val credentialsClient = Credentials.getClient(activity!!) - val intent = credentialsClient.getHintPickerIntent(hintRequest) - activity!!.startIntentSenderForResult( - intent.intentSender, - credentialPickerRequest, - null, 0, 0, 0 - ) - } - - } - - override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { - channel.setMethodCallHandler(null) - } - - override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?): Boolean { - when (requestCode) { - smsConsentRequest -> - // Obtain the phone number from the result - if (resultCode == Activity.RESULT_OK && data != null) { - // Get SMS message content - val message = data.getStringExtra(SmsRetriever.EXTRA_SMS_MESSAGE) - lastResult?.success(message) - } else { - // Consent denied. User can type OTC manually. - } - credentialPickerRequest -> if (resultCode == Activity.RESULT_OK && data != null) { - val credential = data.getParcelableExtra(Credential.EXTRA_KEY) - lastResult?.success(credential?.id) - } - } - return true - } - - override fun onAttachedToActivity(binding: ActivityPluginBinding) { - this.activity = binding.activity - binding.addActivityResultListener(this) - } - - private fun listenUserConsent(@NonNull call: MethodCall, @NonNull result: Result) { - val senderNumber = call.argument(senderTelephoneNumber) - // Start listening for SMS User Consent broadcasts from senderPhoneNumber - // The Task will be successful if SmsRetriever was able to start - // SMS User Consent, and will error if there was an error starting. - if (context != null) { - lastResult = result - val task = SmsRetriever.getClient(context!!).startSmsUserConsent(senderNumber) - task.addOnSuccessListener { registerSmsUserConsentBroadcastReceiver() } - } - } - - private fun listenRetriever(@NonNull result: Result) { - if (activity != null) { - lastResult = result - val client = SmsRetriever.getClient(activity!!) - val task = client.startSmsRetriever() - task.addOnSuccessListener { registerSmsRetrieverBroadcastReceiver() } - } - } - - private fun registerSmsUserConsentBroadcastReceiver() { - smsUserConsentBroadcastReceiver = SmsUserConsentReceiver().also { - it.smsBroadcastReceiverListener = object : SmsUserConsentReceiver.SmsUserConsentBroadcastReceiverListener { - override fun onSuccess(intent: Intent?) { - intent?.let { context -> activity?.startActivityForResult(context, smsConsentRequest) } - } - - override fun onFailure() { - lastResult?.error("408", "Timeout exception", null) - } - } - } - - val intentFilter = IntentFilter(SmsRetriever.SMS_RETRIEVED_ACTION) - this.activity?.registerReceiver(smsUserConsentBroadcastReceiver, intentFilter, SmsRetriever.SEND_PERMISSION, null) - } - - private fun registerSmsRetrieverBroadcastReceiver() { - smsRetrieverBroadcastReceiver = SmsRetrieverReceiver().also { - it.smsBroadcastReceiverListener = object : SmsRetrieverReceiver.SmsRetrieverBroadcastReceiverListener { - override fun onSuccess(sms: String?) { - sms?.let { it -> lastResult?.success(it) } - } - - override fun onFailure() { - lastResult?.error("408", "Timeout exception", null) - } - } - } - - val intentFilter = IntentFilter(SmsRetriever.SMS_RETRIEVED_ACTION) - this.activity?.registerReceiver(smsRetrieverBroadcastReceiver, intentFilter) - } - - private fun unRegisterBroadcastReceivers() { - if (smsUserConsentBroadcastReceiver != null) { - activity?.unregisterReceiver(smsUserConsentBroadcastReceiver) - smsUserConsentBroadcastReceiver = null - } - if (smsRetrieverBroadcastReceiver != null) { - activity?.unregisterReceiver(smsRetrieverBroadcastReceiver) - smsRetrieverBroadcastReceiver = null - } - } - - override fun onDetachedFromActivity() { - unRegisterBroadcastReceivers() - activity = null - } - - override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) { - } - - override fun onDetachedFromActivityForConfigChanges() { - } -} diff --git a/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/SmsRetrieverReceiver.kt b/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/SmsRetrieverReceiver.kt deleted file mode 100644 index 4952430c8..000000000 --- a/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/SmsRetrieverReceiver.kt +++ /dev/null @@ -1,43 +0,0 @@ -package ru.surfstudio.otp_autofill - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import com.google.android.gms.auth.api.phone.SmsRetriever -import com.google.android.gms.common.api.CommonStatusCodes -import com.google.android.gms.common.api.Status - -class SmsRetrieverReceiver : BroadcastReceiver() { - - lateinit var smsBroadcastReceiverListener: SmsRetrieverBroadcastReceiverListener - - override fun onReceive(context: Context?, intent: Intent?) { - - if (intent?.action == SmsRetriever.SMS_RETRIEVED_ACTION) { - - val extras = intent.extras - val smsRetrieverStatus = extras?.get(SmsRetriever.EXTRA_STATUS) as Status - - when (smsRetrieverStatus.statusCode) { - CommonStatusCodes.SUCCESS -> { - extras.get(SmsRetriever.EXTRA_SMS_MESSAGE)?.also { - smsBroadcastReceiverListener.onSuccess(it as String) - } - } - - CommonStatusCodes.TIMEOUT -> { - try { - smsBroadcastReceiverListener.onFailure() - } catch (e: Exception) { - ///DO NOTHING, end listening - } - } - } - } - } - - interface SmsRetrieverBroadcastReceiverListener { - fun onSuccess(sms: String?) - fun onFailure() - } -} \ No newline at end of file diff --git a/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/SmsUserConsentReceiver.kt b/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/SmsUserConsentReceiver.kt deleted file mode 100644 index 605ea5ef6..000000000 --- a/packages/otp_autofill/android/src/main/kotlin/ru/surfstudio/otp_autofill/SmsUserConsentReceiver.kt +++ /dev/null @@ -1,43 +0,0 @@ -package ru.surfstudio.otp_autofill - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import com.google.android.gms.auth.api.phone.SmsRetriever -import com.google.android.gms.common.api.CommonStatusCodes -import com.google.android.gms.common.api.Status - -class SmsUserConsentReceiver : BroadcastReceiver() { - - lateinit var smsBroadcastReceiverListener: SmsUserConsentBroadcastReceiverListener - - override fun onReceive(context: Context?, intent: Intent?) { - - if (intent?.action == SmsRetriever.SMS_RETRIEVED_ACTION) { - - val extras = intent.extras - val smsRetrieverStatus = extras?.get(SmsRetriever.EXTRA_STATUS) as Status - - when (smsRetrieverStatus.statusCode) { - CommonStatusCodes.SUCCESS -> { - extras.getParcelable(SmsRetriever.EXTRA_CONSENT_INTENT)?.also { - smsBroadcastReceiverListener.onSuccess(it) - } - } - - CommonStatusCodes.TIMEOUT -> { - try{ - smsBroadcastReceiverListener.onFailure() - } catch (e: Exception) { - ///DO NOTHING, end listening - } - } - } - } - } - - interface SmsUserConsentBroadcastReceiverListener { - fun onSuccess(intent: Intent?) - fun onFailure() - } -} \ No newline at end of file diff --git a/packages/otp_autofill/example/.gitignore b/packages/otp_autofill/example/.gitignore deleted file mode 100644 index 1ba9c339e..000000000 --- a/packages/otp_autofill/example/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Exceptions to above rules. -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/otp_autofill/example/.metadata b/packages/otp_autofill/example/.metadata deleted file mode 100644 index ade6bc987..000000000 --- a/packages/otp_autofill/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8af6b2f038c1172e61d418869363a28dffec3cb4 - channel: stable - -project_type: app diff --git a/packages/otp_autofill/example/analysis_options.yaml b/packages/otp_autofill/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/otp_autofill/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/otp_autofill/example/android/.gitignore b/packages/otp_autofill/example/android/.gitignore deleted file mode 100644 index bc2100d8f..000000000 --- a/packages/otp_autofill/example/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/packages/otp_autofill/example/android/app/build.gradle b/packages/otp_autofill/example/android/app/build.gradle deleted file mode 100644 index 6d0d38acb..000000000 --- a/packages/otp_autofill/example/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId 'ru.surfstudio.otp_autofill' - minSdkVersion 19 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/otp_autofill/example/android/app/src/debug/AndroidManifest.xml b/packages/otp_autofill/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 08f1e4615..000000000 --- a/packages/otp_autofill/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/otp_autofill/example/android/app/src/main/AndroidManifest.xml b/packages/otp_autofill/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 2e9dfcc55..000000000 --- a/packages/otp_autofill/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/otp_autofill/example/android/app/src/main/kotlin/ru/surfstudio/otp_text_edit_controller_example/MainActivity.kt b/packages/otp_autofill/example/android/app/src/main/kotlin/ru/surfstudio/otp_text_edit_controller_example/MainActivity.kt deleted file mode 100644 index 8e3bfdf26..000000000 --- a/packages/otp_autofill/example/android/app/src/main/kotlin/ru/surfstudio/otp_text_edit_controller_example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package ru.surfstudio.otp_autofill_example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/otp_autofill/example/android/app/src/main/res/drawable/launch_background.xml b/packages/otp_autofill/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/otp_autofill/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/otp_autofill/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/otp_autofill/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/otp_autofill/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/otp_autofill/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/otp_autofill/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/otp_autofill/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/otp_autofill/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/otp_autofill/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/otp_autofill/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/otp_autofill/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/otp_autofill/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/otp_autofill/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/otp_autofill/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/otp_autofill/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/otp_autofill/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/otp_autofill/example/android/app/src/main/res/values/styles.xml b/packages/otp_autofill/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33fd..000000000 --- a/packages/otp_autofill/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/otp_autofill/example/android/app/src/profile/AndroidManifest.xml b/packages/otp_autofill/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 08f1e4615..000000000 --- a/packages/otp_autofill/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/otp_autofill/example/android/build.gradle b/packages/otp_autofill/example/android/build.gradle deleted file mode 100644 index 3100ad2d5..000000000 --- a/packages/otp_autofill/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/otp_autofill/example/android/gradle.properties b/packages/otp_autofill/example/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/packages/otp_autofill/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/otp_autofill/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/otp_autofill/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/packages/otp_autofill/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/otp_autofill/example/android/settings.gradle b/packages/otp_autofill/example/android/settings.gradle deleted file mode 100644 index d3b6a4013..000000000 --- a/packages/otp_autofill/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/packages/otp_autofill/example/ios/.gitignore b/packages/otp_autofill/example/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/packages/otp_autofill/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/otp_autofill/example/ios/Flutter/AppFrameworkInfo.plist b/packages/otp_autofill/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/otp_autofill/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/otp_autofill/example/ios/Flutter/Debug.xcconfig b/packages/otp_autofill/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba114..000000000 --- a/packages/otp_autofill/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/otp_autofill/example/ios/Flutter/Release.xcconfig b/packages/otp_autofill/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e9340e..000000000 --- a/packages/otp_autofill/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/otp_autofill/example/ios/Podfile b/packages/otp_autofill/example/ios/Podfile deleted file mode 100644 index 1e8c3c90a..000000000 --- a/packages/otp_autofill/example/ios/Podfile +++ /dev/null @@ -1,41 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/packages/otp_autofill/example/ios/Runner.xcodeproj/project.pbxproj b/packages/otp_autofill/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 397f3945e..000000000 --- a/packages/otp_autofill/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,571 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - E71E4599FD854AAD86A45474 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54AFA37FA8B36F32D47B642E /* Pods_Runner.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 35F86BAAF3ACFCC6F7A644F5 /* 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 = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 54AFA37FA8B36F32D47B642E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 692E3D255E30FED2EEF0C646 /* 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 = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7F117691BA722E0EBECFDA38 /* 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 = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - E71E4599FD854AAD86A45474 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1F4892A2FADD72946F380767 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 54AFA37FA8B36F32D47B642E /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - E8926B80A145B28B8BFA3E29 /* Pods */, - 1F4892A2FADD72946F380767 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; - E8926B80A145B28B8BFA3E29 /* Pods */ = { - isa = PBXGroup; - children = ( - 7F117691BA722E0EBECFDA38 /* Pods-Runner.debug.xcconfig */, - 35F86BAAF3ACFCC6F7A644F5 /* Pods-Runner.release.xcconfig */, - 692E3D255E30FED2EEF0C646 /* Pods-Runner.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - CD2BE8D846AEEBA2A8D52266 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 0CA3BEFE152417381F977566 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0CA3BEFE152417381F977566 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - CD2BE8D846AEEBA2A8D52266 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "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"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = ru.surfstudio.otpTextEditControllerExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = ru.surfstudio.otpTextEditControllerExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = ru.surfstudio.otpTextEditControllerExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/otp_autofill/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/otp_autofill/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/otp_autofill/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/otp_autofill/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/otp_autofill/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/otp_autofill/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/otp_autofill/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/otp_autofill/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/otp_autofill/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/otp_autofill/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/otp_autofill/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/otp_autofill/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/otp_autofill/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/otp_autofill/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14c..000000000 --- a/packages/otp_autofill/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/packages/otp_autofill/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/otp_autofill/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/otp_autofill/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/otp_autofill/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/otp_autofill/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/otp_autofill/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/otp_autofill/example/ios/Runner/AppDelegate.swift b/packages/otp_autofill/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/otp_autofill/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/otp_autofill/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/otp_autofill/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/otp_autofill/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/otp_autofill/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/otp_autofill/example/ios/Runner/Base.lproj/Main.storyboard b/packages/otp_autofill/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/otp_autofill/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/otp_autofill/example/ios/Runner/Info.plist b/packages/otp_autofill/example/ios/Runner/Info.plist deleted file mode 100644 index abe559f9a..000000000 --- a/packages/otp_autofill/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - otp_autofill_example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/otp_autofill/example/ios/Runner/Runner-Bridging-Header.h b/packages/otp_autofill/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/packages/otp_autofill/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/otp_autofill/example/lib/main.dart b/packages/otp_autofill/example/lib/main.dart deleted file mode 100644 index 9a26ffd3b..000000000 --- a/packages/otp_autofill/example/lib/main.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:otp_autofill/otp_autofill.dart'; -import 'package:otp_autofill_example/sample_strategy.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatefulWidget { - const MyApp({Key? key}) : super(key: key); - - @override - _MyAppState createState() => _MyAppState(); -} - -class _MyAppState extends State { - late OTPTextEditController controller; - final scaffoldKey = GlobalKey(); - - @override - void initState() { - super.initState(); - OTPInteractor.getAppSignature() - //ignore: avoid_print - .then((value) => print('signature - $value')); - controller = OTPTextEditController( - codeLength: 5, - //ignore: avoid_print - onCodeReceive: (code) => print('Your Application receive code - $code'), - )..startListenUserConsent( - (code) { - final exp = RegExp(r'(\d{5})'); - return exp.stringMatch(code ?? '') ?? ''; - }, - strategies: [ - SampleStrategy(), - ], - ); - } - - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - key: scaffoldKey, - appBar: AppBar( - title: const Text('Plugin example app'), - ), - body: Center( - child: Padding( - padding: const EdgeInsets.all(40.0), - child: TextField( - textAlign: TextAlign.center, - keyboardType: TextInputType.number, - controller: controller, - ), - ), - ), - ), - ); - } - - @override - Future dispose() async { - await controller.stopListen(); - super.dispose(); - } -} diff --git a/packages/otp_autofill/example/lib/sample_strategy.dart b/packages/otp_autofill/example/lib/sample_strategy.dart deleted file mode 100644 index da3a7fb01..000000000 --- a/packages/otp_autofill/example/lib/sample_strategy.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:otp_autofill/otp_autofill.dart'; - -class SampleStrategy extends OTPStrategy { - @override - Future listenForCode() { - return Future.delayed( - const Duration(seconds: 4), - () => 'Your code is 54321', - ); - } -} diff --git a/packages/otp_autofill/example/pubspec.yaml b/packages/otp_autofill/example/pubspec.yaml deleted file mode 100644 index 6ee56395b..000000000 --- a/packages/otp_autofill/example/pubspec.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: otp_autofill_example -description: Demonstrates how to use the otp_autofill plugin. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - otp_autofill: - path: ../ - - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/otp_autofill/ios/.gitignore b/packages/otp_autofill/ios/.gitignore deleted file mode 100644 index aa479fd3c..000000000 --- a/packages/otp_autofill/ios/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/Generated.xcconfig -/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/otp_autofill/ios/Assets/.gitkeep b/packages/otp_autofill/ios/Assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/otp_autofill/ios/Classes/OTPPlugin.h b/packages/otp_autofill/ios/Classes/OTPPlugin.h deleted file mode 100644 index 1e428cb91..000000000 --- a/packages/otp_autofill/ios/Classes/OTPPlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface OTPPlugin : NSObject -@end diff --git a/packages/otp_autofill/ios/Classes/OTPPlugin.m b/packages/otp_autofill/ios/Classes/OTPPlugin.m deleted file mode 100644 index 4a6e9eef7..000000000 --- a/packages/otp_autofill/ios/Classes/OTPPlugin.m +++ /dev/null @@ -1,15 +0,0 @@ -#import "OTPPlugin.h" -#if __has_include() -#import -#else -// Support project import fallback if the generated compatibility header -// is not copied when this plugin is created as a library. -// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 -#import "otp_autofill-Swift.h" -#endif - -@implementation OTPPlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - [SwiftOTPPlugin registerWithRegistrar:registrar]; -} -@end diff --git a/packages/otp_autofill/ios/Classes/SwiftOTPPlugin.swift b/packages/otp_autofill/ios/Classes/SwiftOTPPlugin.swift deleted file mode 100644 index 061ad8595..000000000 --- a/packages/otp_autofill/ios/Classes/SwiftOTPPlugin.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Flutter -import UIKit - -public class SwiftOTPPlugin: NSObject, FlutterPlugin { - public static func register(with registrar: FlutterPluginRegistrar) { - let channel = FlutterMethodChannel(name: "otp_surfstudio", binaryMessenger: registrar.messenger()) - let instance = SwiftOTPPlugin() - registrar.addMethodCallDelegate(instance, channel: channel) - } - - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { - result("iOS " + UIDevice.current.systemVersion) - } -} diff --git a/packages/otp_autofill/ios/otp_autofill.podspec b/packages/otp_autofill/ios/otp_autofill.podspec deleted file mode 100644 index 1310035db..000000000 --- a/packages/otp_autofill/ios/otp_autofill.podspec +++ /dev/null @@ -1,23 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint otp_autofill.podspec' to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'otp_autofill' - s.version = '0.0.1' - s.summary = 'Controller that extends TextEditingController and can recieve OTP verification code' - s.description = <<-DESC -Controller that extends TextEditingController and can recieve OTP verification code - DESC - s.homepage = 'http://example.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.dependency 'Flutter' - s.platform = :ios, '8.0' - - # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } - s.swift_version = '5.0' -end diff --git a/packages/otp_autofill/lib/otp_autofill.dart b/packages/otp_autofill/lib/otp_autofill.dart deleted file mode 100644 index 6158637d8..000000000 --- a/packages/otp_autofill/lib/otp_autofill.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:otp_autofill/src/base/exceptions.dart'; -export 'package:otp_autofill/src/base/strategy.dart'; -export 'package:otp_autofill/src/otp_interactor.dart'; -export 'package:otp_autofill/src/otp_text_edit_controller.dart'; diff --git a/packages/otp_autofill/lib/src/base/exceptions.dart b/packages/otp_autofill/lib/src/base/exceptions.dart deleted file mode 100644 index 78a780f0b..000000000 --- a/packages/otp_autofill/lib/src/base/exceptions.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Plugin doesn't support platform -class UnsupportedPlatform implements Exception {} diff --git a/packages/otp_autofill/lib/src/base/strategy.dart b/packages/otp_autofill/lib/src/base/strategy.dart deleted file mode 100644 index fd5c92932..000000000 --- a/packages/otp_autofill/lib/src/base/strategy.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -typedef ExtractStringCallback = String Function(String?); - -/// Strategy interface, another variant of code input -/// e.g. from push notification or for testing -// ignore: one_member_abstracts -abstract class OTPStrategy { - Future listenForCode(); -} diff --git a/packages/otp_autofill/lib/src/otp_interactor.dart b/packages/otp_autofill/lib/src/otp_interactor.dart deleted file mode 100644 index 31a446d60..000000000 --- a/packages/otp_autofill/lib/src/otp_interactor.dart +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:io'; - -import 'package:flutter/services.dart'; -import 'package:otp_autofill/src/base/exceptions.dart'; - -typedef StringCallback = void Function(String); - -/// Channel -const channelName = 'otp_surfstudio'; - -/// Methods -const getTelephoneHint = 'getTelephoneHint'; -const startListenUserConsentMethod = 'startListenUserConsent'; -const startListenRetrieverMethod = 'startListenRetriever'; -const stopListenForCodeMethod = 'stopListenForCode'; -const getAppSignatureMethod = 'getAppSignature'; - -/// Arguments -const senderTelephoneNumber = 'senderTelephoneNumber'; - -/// Interact with native to get OTP code and telephone hint -class OTPInteractor { - static const MethodChannel _channel = MethodChannel(channelName); - - /// Show user telephone picker and get chosen number - static Future get hint { - if (Platform.isAndroid) { - return _channel.invokeMethod(getTelephoneHint); - } else { - throw UnsupportedPlatform(); - } - } - - /// Get app signature, that used in Retriever API - static Future getAppSignature() async { - if (Platform.isAndroid) { - return _channel.invokeMethod(getAppSignatureMethod); - } else { - throw UnsupportedPlatform(); - } - } - - /// Broadcast receiver stop listen for OTP code, use in dispose - Future stopListenForCode() { - return _channel.invokeMethod(stopListenForCodeMethod); - } - - /// Broadcast receiver start listen for OTP code with User Consent API - Future startListenUserConsent([String? senderPhone]) async { - if (Platform.isAndroid) { - return _channel.invokeMethod( - startListenUserConsentMethod, - { - senderTelephoneNumber: senderPhone, - }, - ); - } else { - throw UnsupportedPlatform(); - } - } - - /// Broadcast receiver start listen for OTP code with Retriever API - Future startListenRetriever() async { - if (Platform.isAndroid) { - return _channel.invokeMethod(startListenRetrieverMethod); - } else { - throw UnsupportedPlatform(); - } - } -} diff --git a/packages/otp_autofill/lib/src/otp_text_edit_controller.dart b/packages/otp_autofill/lib/src/otp_text_edit_controller.dart deleted file mode 100644 index 468b82962..000000000 --- a/packages/otp_autofill/lib/src/otp_text_edit_controller.dart +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:otp_autofill/src/base/strategy.dart'; -import 'package:otp_autofill/src/otp_interactor.dart'; - -/// Custom controller for text views, IOS autofill is built in flutter -class OTPTextEditController extends TextEditingController { - OTPTextEditController({ - required this.codeLength, - this.onCodeReceive, - this.onTimeOutException, - this.autoStop = true, - }) { - addListener(checkForComplete); - } - - /// interaction with OTP - final _otpInteractor = OTPInteractor(); - - /// OTP code length - trigger for callback - final int codeLength; - - /// [OTPTextEditController]'s receive OTP code callback - final StringCallback? onCodeReceive; - - /// Receiver gets TimeoutError after 5 minutes without sms - final VoidCallback? onTimeOutException; - - /// Stop listening after receiving or error an OTP code - final bool autoStop; - - /// Start listen for OTP code with User Consent API - /// sms by default - /// could be added another input as [OTPStrategy] - void startListenUserConsent( - ExtractStringCallback codeExtractor, { - List? strategies, - String? senderNumber, - }) { - final smsListen = _otpInteractor.startListenUserConsent(senderNumber); - final strategiesListen = strategies?.map((e) => e.listenForCode()); - - Stream.fromFutures([ - if (Platform.isAndroid) smsListen, - if (strategiesListen != null) ...strategiesListen, - ]).first.then((value) { - if (autoStop) { - stopListen(); - } - text = codeExtractor(value); - //ignore: avoid_types_on_closure_parameters - }).catchError((Object _) { - if (autoStop) { - stopListen(); - } - onTimeOutException?.call(); - }); - } - - /// Start listen for OTP code with Retriever API - /// sms by default - /// could be added another input as [OTPStrategy] - void startListenRetriever( - ExtractStringCallback codeExtractor, { - List? additionalStrategies, - }) { - final smsListen = _otpInteractor.startListenRetriever(); - final strategiesListen = additionalStrategies?.map( - (e) => e.listenForCode(), - ); - - Stream.fromFutures([ - if (Platform.isAndroid) smsListen, - if (strategiesListen != null) ...strategiesListen, - ]).first.then((value) { - if (autoStop) { - stopListen(); - } - text = codeExtractor(value); - //ignore: avoid_types_on_closure_parameters - }).catchError((Object _) { - if (autoStop) { - stopListen(); - } - onTimeOutException?.call(); - }); - } - - /// Get OTP code from another input - /// don't register any BroadcastReceivers - void startListenOnlyStrategies( - List? strategies, - ExtractStringCallback codeExtractor, - ) { - final strategiesListen = strategies?.map((e) => e.listenForCode()); - Stream.fromFutures([ - if (strategiesListen != null) ...strategiesListen, - ]).first.then((value) { - text = codeExtractor(value); - }); - } - - /// Broadcast receiver stop listen for OTP code, use in dispose - Future stopListen() { - return _otpInteractor.stopListenForCode(); - } - - /// call onComplete callback if code entered - void checkForComplete() { - if (text.length == codeLength) onCodeReceive?.call(text); - } -} diff --git a/packages/otp_autofill/pubspec.yaml b/packages/otp_autofill/pubspec.yaml deleted file mode 100644 index 8dc54d8dd..000000000 --- a/packages/otp_autofill/pubspec.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: otp_autofill -version: 1.1.0 -description: Android implementation of OTP autofill with using User Consent API and Retriever API. Add possibility to receive OTP code from another input. -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/otp_autofill" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=2.0.0" - -flutter: - plugin: - platforms: - android: - package: ru.surfstudio.otp_autofill - pluginClass: OTPPlugin - ios: - pluginClass: OTPPlugin - -custom: - is_stable: false - unstable_version: - is_plugin: true - path: otp_autofill - separate_repo_url: - hostUrl: - -dependency_validator: - exclude: - - "example/**" diff --git a/packages/otp_autofill/test/otp_autofill_test.dart b/packages/otp_autofill/test/otp_autofill_test.dart deleted file mode 100644 index 483b97ee0..000000000 --- a/packages/otp_autofill/test/otp_autofill_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter_test/flutter_test.dart'; -import 'package:otp_autofill/src/base/strategy.dart'; -import 'package:otp_autofill/src/otp_text_edit_controller.dart'; - -const testCode = '54321'; - -class SampleStrategy extends OTPStrategy { - @override - Future listenForCode() { - return Future.delayed( - const Duration(milliseconds: 250), - () => 'Your code is $testCode', - ); - } -} - -void main() { - // This code binds the [TestWidgetsFlutterBinding] - // to a [LiveTestWidgetsFlutterBinding], - // which runs test code in a real async zone. - LiveTestWidgetsFlutterBinding(); - - late OTPTextEditController controller; - - setUp(() { - controller = OTPTextEditController( - codeLength: testCode.length, - onCodeReceive: (code) {}, - )..startListenOnlyStrategies([SampleStrategy()], (code) { - final exp = RegExp(r'(\d{5})'); - return exp.stringMatch(code ?? '') ?? ''; - }); - }); - - testWidgets('OTPTextEditController startListenOnlyStrategies', - (tester) async { - expect(controller.text, isEmpty); - - await tester.pump(const Duration(milliseconds: 500)); - - expect(controller.text, equals(testCode)); - }); -} diff --git a/packages/packages_get.sh b/packages/packages_get.sh deleted file mode 100644 index d4665922a..000000000 --- a/packages/packages_get.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -flutter packages get -for dir in */ ; do - - echo ${dir} - cd ${dir} - pwd - flutter packages get - cd .. - pwd - shift -done \ No newline at end of file diff --git a/packages/push_notification/.gitignore b/packages/push_notification/.gitignore deleted file mode 100644 index 2543d1d8f..000000000 --- a/packages/push_notification/.gitignore +++ /dev/null @@ -1,80 +0,0 @@ -.DS_Store -.dart_tool/ -.packages -.pub/ -*.lock -.idea -build/ -**/android/**/GeneratedPluginRegistrant.java -ios/.generated/ -ios/Flutter/Generated.xcconfig -ios/Runner/GeneratedPluginRegistrant.* -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ -# Visual Studio Code related -.vscode/ -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ -*.lock -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/flutter_export_environment.sh -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages -# Support file for ci -~changed_list_file -packages/template/ios/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/push_notification/.metadata b/packages/push_notification/.metadata deleted file mode 100644 index d098c3c2f..000000000 --- a/packages/push_notification/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 9f5ff2306bb3e30b2b98eee79cd231b1336f41f4 - channel: stable - -project_type: plugin diff --git a/packages/push_notification/CHANGELOG.md b/packages/push_notification/CHANGELOG.md deleted file mode 100644 index c5c7084ad..000000000 --- a/packages/push_notification/CHANGELOG.md +++ /dev/null @@ -1,25 +0,0 @@ -# Changelog - -## 1.1.0 - 2021-05-30 - -* Stable release - -## 1.0.1-dev.1 - 2021-05-25 - -* Update `rxdart` dependency to `0.27.0`. - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0`. - -## 0.0.1-dev.6 - -* now delegate implements in show instead of requestPermission - -## 0.0.1-dev.3 - -* Fix lint hints - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/push_notification/CONTRIBUTING.md b/packages/push_notification/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/push_notification/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/push_notification/LICENSE b/packages/push_notification/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/push_notification/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/push_notification/README.md b/packages/push_notification/README.md deleted file mode 100644 index 2174500df..000000000 --- a/packages/push_notification/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Push Notification - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/push_notification) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=push_notification&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/push_notification?logo=dart&logoColor=white)](https://pub.dev/packages/push_notification) -[![Pub Likes](https://badgen.net/pub/likes/push_notification)](https://pub.dev/packages/push_notification) -[![Pub popularity](https://badgen.net/pub/popularity/push_notification)](https://pub.dev/packages/push_notification/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/push_notification) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Library for implementing push notifications. -The module contains the main work with push notifications. - -## Usage - -An example of using the library can be found in [example](example). - -* Create a notification data type through inheritance `NotificationPayload` -* Create a strategy for handling notifications through inheritance `PushHandleStrategy` -* Create a factory of strategies through inheritance `PushHandleStrategyFactory` - -* To receive notifications, you need to create an instance. `MessagingService` -* To display notifications, you need to create an instance `NotificationController`. -* And pass created instances when creating `PushHandler` that will create the strategy using the factory. - -* In the notification there should be a field: `click_action: FLUTTER_NOTIFICATION_CLICK` -* in manifest in \ you need to add intent filter: -```xml - - - - -``` - -## Installation - -Add `push_notification` to your `pubspec.yaml` file: - -```yaml -dependencies: - push_notification: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/push_notification/analysis_options.yaml b/packages/push_notification/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/push_notification/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/push_notification/android/.gitignore b/packages/push_notification/android/.gitignore deleted file mode 100644 index c6cbe562a..000000000 --- a/packages/push_notification/android/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures diff --git a/packages/push_notification/android/build.gradle b/packages/push_notification/android/build.gradle deleted file mode 100644 index 5d2fcdf59..000000000 --- a/packages/push_notification/android/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -group 'pushnotification.push_notification' -version '1.0-SNAPSHOT' - -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -rootProject.allprojects { - repositories { - google() - jcenter() - } -} - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - defaultConfig { - minSdkVersion 17 - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - lintOptions { - disable 'InvalidPackage' - } -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation "ru.surfstudio.android:push:0.4.0" - implementation "ru.surfstudio.android:activity-holder:0.4.0" -} diff --git a/packages/push_notification/android/gradle.properties b/packages/push_notification/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/packages/push_notification/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/push_notification/android/gradle/wrapper/gradle-wrapper.properties b/packages/push_notification/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index e972df907..000000000 --- a/packages/push_notification/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Mar 13 10:19:27 YEKT 2020 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/packages/push_notification/android/push/PushPlugin.kt b/packages/push_notification/android/push/PushPlugin.kt deleted file mode 100644 index a9806607f..000000000 --- a/packages/push_notification/android/push/PushPlugin.kt +++ /dev/null @@ -1,128 +0,0 @@ -package push.push - -import android.content.Context -import android.content.Intent -import androidx.annotation.NonNull; -import io.flutter.embedding.engine.plugins.FlutterPlugin -import io.flutter.plugin.common.MethodCall -import io.flutter.plugin.common.MethodChannel -import io.flutter.plugin.common.MethodChannel.MethodCallHandler -import io.flutter.plugin.common.MethodChannel.Result -import push.push.handler.PushHandler -import push.push.strategy.PushStrategy -import push.push.type.PushNotificationTypeData -import ru.surfstudio.android.activity.holder.ActiveActivityHolder -import ru.surfstudio.android.notification.interactor.push.PushInteractor -import ru.surfstudio.android.notification.ui.PushClickProvider -import ru.surfstudio.android.notification.ui.PushEventListener -import ru.surfstudio.android.notification.ui.notification.NOTIFICATION_DATA -import ru.surfstudio.android.utilktx.ktx.text.EMPTY_STRING - -//channels and methods names -private const val CHANNEL = "surf_notification" -private const val CALL_SHOW = "show" -private const val CALL_INIT = "initialize" -private const val CALLBACK_OPEN = "notificationOpen" -private const val CALLBACK_DISMISS = "notificationDismiss" -//resource folder names -private const val FOLDER_DRAWABLE = "drawable" -private const val FOLDER_STRING = "string" -private const val FOLDER_COLOR = "color" -///arguments names -private const val ARG_SPECIFICS = "notificationSpecifics" -private const val ARG_ICON = "icon" -private const val ARG_CHANNEL_ID = "channelId" -private const val ARG_CHANNEL_NAME = "channelName" -private const val ARG_COLOR = "color" -private const val ARG_DATA = "data" -private const val ARG_PUSH_ID = "pushId" -private const val ARG_TITLE = "title" -private const val ARG_BODY = "body" -private const val ARG_AUTOCANCELABLE = "autoCancelable" -// default notification specifics -private const val DEFAULT_ICON_NAME = "@mipmap/ic_launcher" -private const val DEFAULT_CHANNEL_ID = "@string/notification_channel_id" -private const val DEFAULT_CHANNEL_NAME = "@string/data_push_channel_name" -private const val DEFAULT_COLOR = "@color/design_default_color_primary" -private const val DEFAULT_AUTOCANCEL = true - -/** SurfNotificationPlugin */ -public class PushPlugin(private var context: Context? = null, - private var channel: MethodChannel? = null -) : FlutterPlugin, MethodCallHandler { - - private val activeActivityHolder = ActiveActivityHolder() - private val pusInteractor = PushInteractor() - - private val pushHandler = PushHandler(activeActivityHolder, pusInteractor) - - override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { - val channel = MethodChannel(flutterPluginBinding.flutterEngine.dartExecutor, CHANNEL) - channel.setMethodCallHandler(PushPlugin(flutterPluginBinding.applicationContext, channel)) - } - - override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { - val args = call.arguments as Map? - - when (call.method) { - CALL_INIT -> { - initNotificationTapListener() - } - CALL_SHOW -> handleNotification(args!!) - else -> result.notImplemented() - } - } - - private fun initNotificationTapListener() { - PushClickProvider.pushEventListener = object : PushEventListener { - override fun pushDismissListener(context: Context, intent: Intent) { - channel!!.invokeMethod(CALLBACK_DISMISS, null) - } - - override fun pushOpenListener(context: Context, intent: Intent) { - val notificationTypeData = intent.getSerializableExtra(NOTIFICATION_DATA) as PushNotificationTypeData - val notificationData = HashMap(notificationTypeData.data?.notificationData) - - channel!!.invokeMethod(CALLBACK_OPEN, notificationData) - } - } - } - - private fun handleNotification(args: Map) { - val notificationSpecifics = args[ARG_SPECIFICS] as HashMap - val icon = notificationSpecifics[ARG_ICON] as String? ?: DEFAULT_ICON_NAME - val channelId = notificationSpecifics[ARG_CHANNEL_ID] as String? ?: DEFAULT_CHANNEL_ID - val channelName = notificationSpecifics[ARG_CHANNEL_NAME] as String? ?: DEFAULT_CHANNEL_NAME - val color = notificationSpecifics[ARG_COLOR] as String? ?: DEFAULT_COLOR - val autoCancelable: Boolean = notificationSpecifics[ARG_AUTOCANCELABLE] as Boolean? - ?: DEFAULT_AUTOCANCEL - - val data = args[ARG_DATA] as HashMap? - - val strategy = PushStrategy( - icon = getResourceId(icon, FOLDER_DRAWABLE), - channelId = getResourceId(channelId, FOLDER_STRING), - channelName = getResourceId(channelName, FOLDER_STRING), - color = getResourceId(color, FOLDER_COLOR), - autoCancelable = autoCancelable) - - if (data != null) { - strategy.typeData.setDataFromMap(data) - } - - pushHandler.handleMessage(context!!, - uniqueId = args[ARG_PUSH_ID] as Int? ?: -1, - title = args[ARG_TITLE] as String? ?: EMPTY_STRING, - body = args[ARG_BODY] as String? ?: EMPTY_STRING, - pushHandleStrategy = strategy - ) - } - - override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) {} - - private fun getResourceId(resName: String, defType: String): Int { - return context!!.resources.getIdentifier(resName, defType, context!!.packageName) - } - -} - diff --git a/packages/push_notification/android/push/handler/PushHandler.kt b/packages/push_notification/android/push/handler/PushHandler.kt deleted file mode 100644 index b1da0e7b0..000000000 --- a/packages/push_notification/android/push/handler/PushHandler.kt +++ /dev/null @@ -1,29 +0,0 @@ -package push.push.handler - -import android.content.Context -import ru.surfstudio.android.activity.holder.ActiveActivityHolder -import ru.surfstudio.android.notification.interactor.push.PushInteractor -import push.push.strategy.PushStrategy - -/** Push notification handler **/ -class PushHandler( - private val activeActivityHolder: ActiveActivityHolder, - private val pushInteractor: PushInteractor -) { - - fun handleMessage(context: Context, - uniqueId: Int, - title: String, - body: String, - pushHandleStrategy: PushStrategy) { - val activity = activeActivityHolder.activity - pushHandleStrategy.handle( - context = activity ?: context, - pushInteractor = pushInteractor, - uniqueId = uniqueId, - title = title, - body = body - ) - } -} - diff --git a/packages/push_notification/android/push/notification/PushNotificationData.kt b/packages/push_notification/android/push/notification/PushNotificationData.kt deleted file mode 100644 index e876bf35a..000000000 --- a/packages/push_notification/android/push/notification/PushNotificationData.kt +++ /dev/null @@ -1,17 +0,0 @@ -package push.push.notification - -import java.io.Serializable - -/** - * Notification model - * - * @param notificationData custom data in notification - */ -class PushNotificationData( - val notificationData: Map -) : Serializable { - override fun toString(): String { - return "PushNotificationData(notificationData=$notificationData)" - } -} - diff --git a/packages/push_notification/android/push/strategy/PushStrategy.kt b/packages/push_notification/android/push/strategy/PushStrategy.kt deleted file mode 100644 index 22c18ef74..000000000 --- a/packages/push_notification/android/push/strategy/PushStrategy.kt +++ /dev/null @@ -1,33 +0,0 @@ -package push.push.strategy - -import android.app.Activity -import android.app.NotificationChannel -import android.content.Context -import android.content.Intent -import android.widget.RemoteViews -import androidx.core.app.NotificationCompat -import ru.surfstudio.android.notification.ui.notification.strategies.PushHandleStrategy -import push.push.type.PushNotificationTypeData - -/** Push strategy for [PushHandler]**/ -class PushStrategy(override val icon: Int, - override val channelId: Int, - override val color: Int, - override val autoCancelable: Boolean, - override val channelName: Int -) : PushHandleStrategy() { - - override val typeData by lazy { PushNotificationTypeData() } - - override val contentView: RemoteViews? = null - - override fun makeNotificationBuilder(context: Context, title: String, body: String): NotificationCompat.Builder? = null - override fun makeNotificationChannel(context: Context, title: String): NotificationChannel? = null - - override fun coldStartIntent(context: Context): Intent? { - return null - } - - override fun handlePushInActivity(activity: Activity): Boolean = false - -} \ No newline at end of file diff --git a/packages/push_notification/android/push/type/PushNotificationTypeData.kt b/packages/push_notification/android/push/type/PushNotificationTypeData.kt deleted file mode 100644 index e4b62de00..000000000 --- a/packages/push_notification/android/push/type/PushNotificationTypeData.kt +++ /dev/null @@ -1,15 +0,0 @@ -package push.push.type - -import push.push.notification.PushNotificationData -import ru.surfstudio.android.notification.interactor.push.BaseNotificationTypeData - -/** - * Push type with data - */ -class PushNotificationTypeData : BaseNotificationTypeData() { - - /**todo Данные из флаттера могут приходить в любом формате, не только в строках - * необходимо в [BaseNotificationTypeData] в методе setDataFromMap поменять параметр String - * на dymamic**/ - override fun extractData(map: Map): PushNotificationData? = PushNotificationData(map) -} \ No newline at end of file diff --git a/packages/push_notification/android/settings.gradle b/packages/push_notification/android/settings.gradle deleted file mode 100644 index e2584df54..000000000 --- a/packages/push_notification/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'push_notification' diff --git a/packages/push_notification/android/src/main/AndroidManifest.xml b/packages/push_notification/android/src/main/AndroidManifest.xml deleted file mode 100644 index c09b1d71e..000000000 --- a/packages/push_notification/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/PushNotificationPlugin.kt b/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/PushNotificationPlugin.kt deleted file mode 100644 index c04843c69..000000000 --- a/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/PushNotificationPlugin.kt +++ /dev/null @@ -1,132 +0,0 @@ -package pushnotification.push_notification - -import io.flutter.plugin.common.MethodChannel -import io.flutter.plugin.common.MethodChannel.MethodCallHandler -import io.flutter.plugin.common.MethodChannel.Result -import io.flutter.plugin.common.MethodCall -import io.flutter.plugin.common.PluginRegistry.Registrar -import android.content.Context -import android.content.Intent -import android.os.AsyncTask -import androidx.annotation.NonNull -import pushnotification.push_notification.handler.PushHandler -import pushnotification.push_notification.strategy.PushStrategy -import pushnotification.push_notification.type.PushNotificationTypeData -import ru.surfstudio.android.activity.holder.ActiveActivityHolder -import ru.surfstudio.android.notification.interactor.push.PushInteractor -import ru.surfstudio.android.notification.ui.PushClickProvider -import ru.surfstudio.android.notification.ui.PushEventListener -import ru.surfstudio.android.notification.ui.notification.NOTIFICATION_DATA -import ru.surfstudio.android.utilktx.ktx.text.EMPTY_STRING - -//channels and methods names -private const val CHANNEL = "surf_notification" -private const val CALL_SHOW = "show" -private const val CALL_INIT = "initialize" -private const val CALLBACK_OPEN = "notificationOpen" -private const val CALLBACK_DISMISS = "notificationDismiss" - -//resource folder names -private const val FOLDER_DRAWABLE = "drawable" -private const val FOLDER_STRING = "string" -private const val FOLDER_COLOR = "color" - -///arguments names -private const val ARG_SPECIFICS = "notificationSpecifics" -private const val ARG_ICON = "icon" -private const val ARG_CHANNEL_ID = "channelId" -private const val ARG_CHANNEL_NAME = "channelName" -private const val ARG_COLOR = "color" -private const val ARG_DATA = "data" -private const val ARG_PUSH_ID = "pushId" -private const val ARG_TITLE = "title" -private const val ARG_BODY = "body" -private const val ARG_IMAGE_URL = "imageUrl" -private const val ARG_AUTOCANCELABLE = "autoCancelable" - -// default notification specifics -private const val DEFAULT_ICON_NAME = "@mipmap/ic_launcher" -private const val DEFAULT_CHANNEL_ID = "@string/notification_channel_id" -private const val DEFAULT_CHANNEL_NAME = "@string/notification_channel_name" -private const val DEFAULT_COLOR = "@color/design_default_color_primary" -private const val DEFAULT_AUTOCANCEL = true - -/** PushNotificationPlugin */ -public class PushNotificationPlugin(private var context: Context? = null, - private var channel: MethodChannel? = null) : MethodCallHandler { - private val activeActivityHolder = ActiveActivityHolder() - private val pusInteractor = PushInteractor() - - private val pushHandler = PushHandler(activeActivityHolder, pusInteractor) - - companion object { - @JvmStatic - fun registerWith(registrar: Registrar): Unit { - val channel = MethodChannel(registrar.messenger(), CHANNEL) - channel.setMethodCallHandler(PushNotificationPlugin(registrar.context(), channel)) - } - } - - override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { - val args = call.arguments as Map? - - when (call.method) { - CALL_INIT -> { - initNotificationTapListener() - } - CALL_SHOW -> handleNotification(args!!) - else -> result.notImplemented() - } - } - - private fun initNotificationTapListener() { - PushClickProvider.pushEventListener = object : PushEventListener { - override fun pushDismissListener(context: Context, intent: Intent) {} - - override fun pushOpenListener(context: Context, intent: Intent) { - val notificationTypeData = intent.getSerializableExtra(NOTIFICATION_DATA) as PushNotificationTypeData - val notificationData = HashMap(notificationTypeData.data?.notificationData) - - channel!!.invokeMethod(CALLBACK_OPEN, notificationData) - } - } - } - - private fun handleNotification(args: Map) { - val notificationSpecifics = args[ARG_SPECIFICS] as HashMap - val icon = notificationSpecifics[ARG_ICON] as String? ?: DEFAULT_ICON_NAME - val channelId = notificationSpecifics[ARG_CHANNEL_ID] as String? ?: DEFAULT_CHANNEL_ID - val channelName = notificationSpecifics[ARG_CHANNEL_NAME] as String? ?: DEFAULT_CHANNEL_NAME - val color = notificationSpecifics[ARG_COLOR] as String? ?: DEFAULT_COLOR - val imageUrl = args[ARG_IMAGE_URL] as String? - val autoCancelable: Boolean = notificationSpecifics[ARG_AUTOCANCELABLE] as Boolean? - ?: DEFAULT_AUTOCANCEL - - val data = args[ARG_DATA] as HashMap? - - val strategy = PushStrategy( - icon = getResourceId(icon, FOLDER_DRAWABLE), - channelId = getResourceId(channelId, FOLDER_STRING), - channelName = getResourceId(channelName, FOLDER_STRING), - color = getResourceId(color, FOLDER_COLOR), - autoCancelable = autoCancelable, - imageUrl = imageUrl) - - if (data != null) { - strategy.typeData.setDataFromMap(data) - } - - AsyncTask.execute { - pushHandler.handleMessage(context!!, - uniqueId = args[ARG_PUSH_ID] as Int? ?: -1, - title = args[ARG_TITLE] as String? ?: EMPTY_STRING, - body = args[ARG_BODY] as String? ?: EMPTY_STRING, - pushHandleStrategy = strategy - ) - } - } - - private fun getResourceId(resName: String, defType: String): Int { - return context!!.resources.getIdentifier(resName, defType, context!!.packageName) - } -} diff --git a/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/handler/PushHandler.kt b/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/handler/PushHandler.kt deleted file mode 100644 index 19af2f98c..000000000 --- a/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/handler/PushHandler.kt +++ /dev/null @@ -1,29 +0,0 @@ -package pushnotification.push_notification.handler - -import android.content.Context -import ru.surfstudio.android.activity.holder.ActiveActivityHolder -import ru.surfstudio.android.notification.interactor.push.PushInteractor -import pushnotification.push_notification.strategy.PushStrategy - -/** Push notification handler **/ -class PushHandler( - private val activeActivityHolder: ActiveActivityHolder, - private val pushInteractor: PushInteractor -) { - - fun handleMessage(context: Context, - uniqueId: Int, - title: String, - body: String, - pushHandleStrategy: PushStrategy) { - val activity = activeActivityHolder.activity - pushHandleStrategy.handle( - context = activity ?: context, - pushInteractor = pushInteractor, - uniqueId = uniqueId, - title = title, - body = body - ) - } -} - diff --git a/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/notification/PushNotificationData.kt b/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/notification/PushNotificationData.kt deleted file mode 100644 index 73358db4d..000000000 --- a/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/notification/PushNotificationData.kt +++ /dev/null @@ -1,17 +0,0 @@ -package pushnotification.push_notification.notification - -import java.io.Serializable - -/** - * Notification model - * - * @param notificationData custom data in notification - */ -class PushNotificationData( - val notificationData: Map -) : Serializable { - override fun toString(): String { - return "PushNotificationData(notificationData=$notificationData)" - } -} - diff --git a/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/strategy/PushStrategy.kt b/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/strategy/PushStrategy.kt deleted file mode 100644 index cf33aa77e..000000000 --- a/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/strategy/PushStrategy.kt +++ /dev/null @@ -1,84 +0,0 @@ -package pushnotification.push_notification.strategy - -import android.app.Activity -import android.app.NotificationChannel -import android.content.Context -import android.content.Intent -import android.graphics.Bitmap -import android.graphics.BitmapFactory -import android.widget.RemoteViews -import androidx.core.app.NotificationCompat -import androidx.core.content.ContextCompat -import ru.surfstudio.android.notification.ui.notification.strategies.PushHandleStrategy -import pushnotification.push_notification.type.PushNotificationTypeData -import ru.surfstudio.android.utilktx.ktx.text.EMPTY_STRING -import java.io.IOException -import java.net.HttpURLConnection -import java.net.URL - -/** Push strategy for [PushHandler]**/ -class PushStrategy(override val icon: Int, - override val channelId: Int, - override val color: Int, - override val autoCancelable: Boolean, - override val channelName: Int, - private val imageUrl: String? -) : PushHandleStrategy() { - - override val typeData by lazy { PushNotificationTypeData() } - - override val contentView: RemoteViews? = null - - override fun makeNotificationBuilder(context: Context, title: String, body: String): NotificationCompat.Builder? { - return NotificationCompat.Builder(context, context.getString(channelId)) - .setContentTitle(title) - .setContentText(body) - .setSmallIcon(icon) - .setColor(ContextCompat.getColor(context, color)) - .setAutoCancel(autoCancelable) - .setGroup(group?.groupAlias) - .setContentIntent(pendingIntent) - .applyLargeIcon(imageUrl) - - } - - override fun makeNotificationChannel(context: Context, title: String): NotificationChannel? = null - - override fun coldStartIntent(context: Context): Intent? { - return null - } - - override fun handlePushInActivity(activity: Activity): Boolean = false - -} - -private fun NotificationCompat.Builder.applyLargeIcon(imageUrl: String?): NotificationCompat.Builder = apply { - if (imageUrl != null && imageUrl != EMPTY_STRING) { - try { - val bitmap = getBitmapFromURL(imageUrl) - if (bitmap != null) { - val bigPictureStyle = NotificationCompat.BigPictureStyle() - .bigPicture(bitmap) - .bigLargeIcon(null) // Hide small icon and show image - setStyle(bigPictureStyle) - setLargeIcon(bitmap) - } - } catch (e: Exception) { - print("Error while downloading image") - } - - } -} - -private fun getBitmapFromURL(src: String?): Bitmap? { - return try { - val url = URL(src) - val connection = url.openConnection() as HttpURLConnection - connection.doInput = true - connection.connect() - val input = connection.inputStream - BitmapFactory.decodeStream(input) - } catch (e: IOException) { // Log exception - null - } -} diff --git a/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/type/PushNotificationTypeData.kt b/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/type/PushNotificationTypeData.kt deleted file mode 100644 index 3f95611ea..000000000 --- a/packages/push_notification/android/src/main/kotlin/pushnotification/push_notification/type/PushNotificationTypeData.kt +++ /dev/null @@ -1,15 +0,0 @@ -package pushnotification.push_notification.type - -import pushnotification.push_notification.notification.PushNotificationData -import ru.surfstudio.android.notification.interactor.push.BaseNotificationTypeData - -/** - * Push type with data - */ -class PushNotificationTypeData : BaseNotificationTypeData() { - - /**todo Данные из флаттера могут приходить в любом формате, не только в строках - * необходимо в [BaseNotificationTypeData] в методе setDataFromMap поменять параметр String - * на dymamic**/ - override fun extractData(map: Map): PushNotificationData? = PushNotificationData(map) -} \ No newline at end of file diff --git a/packages/push_notification/android/src/main/res/values/strings.xml b/packages/push_notification/android/src/main/res/values/strings.xml deleted file mode 100644 index 17c9c5bee..000000000 --- a/packages/push_notification/android/src/main/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - CHANNEL_ID - Data push channel - \ No newline at end of file diff --git a/packages/push_notification/android/values/strings.xml b/packages/push_notification/android/values/strings.xml deleted file mode 100644 index 0f0cc2278..000000000 --- a/packages/push_notification/android/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - CHANNEL_ID - Data push channel - \ No newline at end of file diff --git a/packages/push_notification/dart_dependency_validator.yaml b/packages/push_notification/dart_dependency_validator.yaml deleted file mode 100644 index c69bdf12d..000000000 --- a/packages/push_notification/dart_dependency_validator.yaml +++ /dev/null @@ -1,2 +0,0 @@ -exclude: - - "example/**" diff --git a/packages/push_notification/example/.gitignore b/packages/push_notification/example/.gitignore deleted file mode 100644 index 22f9d5b9e..000000000 --- a/packages/push_notification/example/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# iOS/XCode related -**/ios/Flutter/flutter_export_environment.sh -**/ios/Podfile - -# Web related -lib/generated_plugin_registrant.dart - -# Exceptions to above rules. -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/push_notification/example/.metadata b/packages/push_notification/example/.metadata deleted file mode 100644 index 5d1241efe..000000000 --- a/packages/push_notification/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 9f5ff2306bb3e30b2b98eee79cd231b1336f41f4 - channel: stable - -project_type: app diff --git a/packages/push_notification/example/analysis_options.yaml b/packages/push_notification/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/push_notification/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/push_notification/example/android/.gitignore b/packages/push_notification/example/android/.gitignore deleted file mode 100644 index bc2100d8f..000000000 --- a/packages/push_notification/example/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/packages/push_notification/example/android/app/build.gradle b/packages/push_notification/example/android/app/build.gradle deleted file mode 100644 index e4006fb4f..000000000 --- a/packages/push_notification/example/android/app/build.gradle +++ /dev/null @@ -1,67 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.push_demo" - minSdkVersion 17 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' -} diff --git a/packages/push_notification/example/android/app/google-services.json b/packages/push_notification/example/android/app/google-services.json deleted file mode 100644 index a5e505f94..000000000 --- a/packages/push_notification/example/android/app/google-services.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "project_info": { - "project_number": "917884143617", - "firebase_url": "https://push-notification-demo-bb294.firebaseio.com", - "project_id": "push-notification-demo-bb294", - "storage_bucket": "push-notification-demo-bb294.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:917884143617:android:7909f0682e8c3a37", - "android_client_info": { - "package_name": "com.example.push_demo" - } - }, - "oauth_client": [ - { - "client_id": "917884143617-hheht8438h8begt900nfqkpjk7tj20m0.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyCB7XR_e5yhGlG4eQgry4-2fjz3hjXRqyI" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "917884143617-hheht8438h8begt900nfqkpjk7tj20m0.apps.googleusercontent.com", - "client_type": 3 - } - ] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/packages/push_notification/example/android/app/src/debug/AndroidManifest.xml b/packages/push_notification/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 42c863d30..000000000 --- a/packages/push_notification/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/push_notification/example/android/app/src/main/AndroidManifest.xml b/packages/push_notification/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 68f758c54..000000000 --- a/packages/push_notification/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/packages/push_notification/example/android/app/src/main/kotlin/com/example/push_demo/MainActivity.kt b/packages/push_notification/example/android/app/src/main/kotlin/com/example/push_demo/MainActivity.kt deleted file mode 100644 index 90d2b36fe..000000000 --- a/packages/push_notification/example/android/app/src/main/kotlin/com/example/push_demo/MainActivity.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.push_demo - -import androidx.annotation.NonNull; -import io.flutter.embedding.android.FlutterActivity -import io.flutter.embedding.engine.FlutterEngine -import io.flutter.plugins.GeneratedPluginRegistrant - -class MainActivity: FlutterActivity() { - override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { - GeneratedPluginRegistrant.registerWith(flutterEngine); - } -} diff --git a/packages/push_notification/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/push_notification/example/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3f..000000000 --- a/packages/push_notification/example/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/push_notification/example/android/app/src/main/res/drawable/launch_background.xml b/packages/push_notification/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/push_notification/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/push_notification/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/push_notification/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/push_notification/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/push_notification/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/push_notification/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/push_notification/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/push_notification/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/push_notification/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/push_notification/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/push_notification/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/push_notification/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/push_notification/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/push_notification/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/push_notification/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/push_notification/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/push_notification/example/android/app/src/main/res/values-night/styles.xml b/packages/push_notification/example/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 449a9f930..000000000 --- a/packages/push_notification/example/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/push_notification/example/android/app/src/main/res/values/styles.xml b/packages/push_notification/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa4417c..000000000 --- a/packages/push_notification/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/push_notification/example/android/app/src/profile/AndroidManifest.xml b/packages/push_notification/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 42c863d30..000000000 --- a/packages/push_notification/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/push_notification/example/android/build.gradle b/packages/push_notification/example/android/build.gradle deleted file mode 100644 index 3100ad2d5..000000000 --- a/packages/push_notification/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/push_notification/example/android/gradle.properties b/packages/push_notification/example/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/packages/push_notification/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/push_notification/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/push_notification/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/packages/push_notification/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/push_notification/example/android/settings.gradle b/packages/push_notification/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/push_notification/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/push_notification/example/ios/.gitignore b/packages/push_notification/example/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/packages/push_notification/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/push_notification/example/ios/Flutter/.last_build_id b/packages/push_notification/example/ios/Flutter/.last_build_id deleted file mode 100644 index a038d9029..000000000 --- a/packages/push_notification/example/ios/Flutter/.last_build_id +++ /dev/null @@ -1 +0,0 @@ -25930036dcbf7351ddfc501cfd18d63f \ No newline at end of file diff --git a/packages/push_notification/example/ios/Flutter/AppFrameworkInfo.plist b/packages/push_notification/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 9367d483e..000000000 --- a/packages/push_notification/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/push_notification/example/ios/Flutter/Debug.xcconfig b/packages/push_notification/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index ec97fc6f3..000000000 --- a/packages/push_notification/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/push_notification/example/ios/Flutter/Release.xcconfig b/packages/push_notification/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index c4855bfe2..000000000 --- a/packages/push_notification/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/push_notification/example/ios/Podfile b/packages/push_notification/example/ios/Podfile deleted file mode 100644 index 1e8c3c90a..000000000 --- a/packages/push_notification/example/ios/Podfile +++ /dev/null @@ -1,41 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/packages/push_notification/example/ios/Runner.xcodeproj/project.pbxproj b/packages/push_notification/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index b6400c54e..000000000 --- a/packages/push_notification/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,539 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 7603E1A2D9BD2D946A0A9F67 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C96715A4AA90AB95A8390A /* Pods_Runner.framework */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 032E2F5EF4B2152998A6EEAA /* 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 = ""; }; - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 625A75EC7DC2838CC0D4ACC8 /* 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 = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 84C96715A4AA90AB95A8390A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D8CE2F4659801B536B717926 /* 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7603E1A2D9BD2D946A0A9F67 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63589BD1BFD38CB4C4B12372 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 84C96715A4AA90AB95A8390A /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - E1CAA66EC17E11872E396486 /* Pods */, - 63589BD1BFD38CB4C4B12372 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - E1CAA66EC17E11872E396486 /* Pods */ = { - isa = PBXGroup; - children = ( - D8CE2F4659801B536B717926 /* Pods-Runner.debug.xcconfig */, - 625A75EC7DC2838CC0D4ACC8 /* Pods-Runner.release.xcconfig */, - 032E2F5EF4B2152998A6EEAA /* Pods-Runner.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 4E37CB5B9B396E92A9882F15 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 0D26B08A9BDD96B2752D9376 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0D26B08A9BDD96B2752D9376 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 4E37CB5B9B396E92A9882F15 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "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"; - showEnvVarsInLog = 0; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/push_notification/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/push_notification/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/packages/push_notification/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/push_notification/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/push_notification/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/push_notification/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/push_notification/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/push_notification/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/push_notification/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/push_notification/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/push_notification/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/push_notification/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/push_notification/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/push_notification/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14c..000000000 --- a/packages/push_notification/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/packages/push_notification/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/push_notification/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/push_notification/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/push_notification/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/push_notification/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/push_notification/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/push_notification/example/ios/Runner/AppDelegate.swift b/packages/push_notification/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/push_notification/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/push_notification/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/push_notification/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/push_notification/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/push_notification/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/push_notification/example/ios/Runner/Base.lproj/Main.storyboard b/packages/push_notification/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/push_notification/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/push_notification/example/ios/Runner/Info.plist b/packages/push_notification/example/ios/Runner/Info.plist deleted file mode 100644 index ff2fc23de..000000000 --- a/packages/push_notification/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - push_demo - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/push_notification/example/ios/Runner/Runner-Bridging-Header.h b/packages/push_notification/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/packages/push_notification/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/push_notification/example/lib/domain/message.dart b/packages/push_notification/example/lib/domain/message.dart deleted file mode 100644 index 48694240e..000000000 --- a/packages/push_notification/example/lib/domain/message.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:push_notification/push_notification.dart'; - -class Message extends NotificationPayload { - const Message( - Map messageData, - String title, - String body, - this.extraInt, - this.extraDouble, - ) : super(messageData, title, body); - - factory Message.fromMap(Map map) { - return Message( - map, - (map['notification'] as Map)['title'] as String, - (map['notification'] as Map)['body'] as String, - map['extraInt'] as int, - map['extraDouble'] as double, - ); - } - - final int extraInt; - final double extraDouble; -} diff --git a/packages/push_notification/example/lib/main.dart b/packages/push_notification/example/lib/main.dart deleted file mode 100644 index e73b110b4..000000000 --- a/packages/push_notification/example/lib/main.dart +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:push_notification/push_notification.dart'; - -void main() => runApp(const MyApp()); - -class MyApp extends StatefulWidget { - const MyApp({Key? key}) : super(key: key); - @override - _MyAppState createState() => _MyAppState(); -} - -class _MyAppState extends State { - late Notificator notification; - - String _bodyText = 'notification test'; - String notificationKey = 'key'; - - @override - void initState() { - super.initState(); - notification = Notificator( - onPermissionDecline: () { - // ignore: avoid_print - print('permission decline'); - }, - onNotificationTapCallback: (notificationData) { - setState( - () { - _bodyText = 'notification open: ' - '${notificationData[notificationKey].toString()}'; - }, - ); - }, - )..requestPermissions( - requestSoundPermission: true, - requestAlertPermission: true, - ); - } - - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - appBar: AppBar( - title: const Text('Plugin example app'), - ), - body: Center( - child: Text(_bodyText), - ), - floatingActionButton: FloatingActionButton( - onPressed: () { - notification.show( - 1, - 'hello', - 'this is test', - imageUrl: 'https://www.lumico.io/wp-019/09/flutter.jpg', - data: {notificationKey: '[notification data]'}, - notificationSpecifics: NotificationSpecifics( - AndroidNotificationSpecifics( - autoCancelable: true, - ), - ), - ); - }, - child: const Icon( - Icons.notifications, - color: Colors.white, - ), - ), - ), - ); - } -} diff --git a/packages/push_notification/example/lib/notification/example_factory.dart b/packages/push_notification/example/lib/notification/example_factory.dart deleted file mode 100644 index 783ec01c8..000000000 --- a/packages/push_notification/example/lib/notification/example_factory.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:push_demo/domain/message.dart'; -import 'package:push_demo/notification/first_strategy.dart'; -import 'package:push_demo/notification/second_strategy.dart'; -import 'package:push_notification/push_notification.dart'; - -class ExampleFactory extends PushHandleStrategyFactory { - @override - Map get map => { - 'type1': (payload) { - final message = Message.fromMap(payload); - return FirstStrategy(message); - }, - 'type2': (payload) { - final message = Message.fromMap(payload); - return SecondStrategy(message); - }, - }; - - @override - StrategyBuilder get defaultStrategy { - return (payload) => FirstStrategy( - Message.fromMap(payload), - ); - } -} diff --git a/packages/push_notification/example/lib/notification/first_strategy.dart b/packages/push_notification/example/lib/notification/first_strategy.dart deleted file mode 100644 index 8f86e4fec..000000000 --- a/packages/push_notification/example/lib/notification/first_strategy.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:push_demo/domain/message.dart'; -import 'package:push_demo/ui/first_screen.dart'; -import 'package:push_notification/push_notification.dart'; - -class FirstStrategy extends PushHandleStrategy { - FirstStrategy(Message payload) : super(payload); - - @override - void onTapNotification(NavigatorState? navigator) { - debugPrint('on tap notification'); - - navigator?.push( - MaterialPageRoute( - builder: (context) => FirstScreen(payload), - ), - ); - } - - @override - void onBackgroundProcess(Map message) { - debugPrint('on process notification in background'); - } -} diff --git a/packages/push_notification/example/lib/notification/messaging_service.dart b/packages/push_notification/example/lib/notification/messaging_service.dart deleted file mode 100644 index d875350a1..000000000 --- a/packages/push_notification/example/lib/notification/messaging_service.dart +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:firebase_messaging/firebase_messaging.dart'; -import 'package:push_demo/utils/logger.dart'; -import 'package:push_notification/push_notification.dart'; - -/// Wrapper over [FirebaseMessaging] -class MessagingService extends BaseMessagingService { - final FirebaseMessaging _messaging = FirebaseMessaging.instance; - late HandleMessageFunction _handleMessage; - - Future get fcmToken => _messaging.getToken(); - - final List _topicsSubscription = []; - - /// request notification permissions for ios platform - void requestNotificationPermissions() { - _messaging.requestPermission(); - } - - /// no need to call. initialization is called inside the [PushHandler] - @override - void initNotification(HandleMessageFunction handleMessage) { - _handleMessage = handleMessage; - FirebaseMessaging.onMessage.listen( - (message) => _internalMessageInterceptor( - message.data, - MessageHandlerType.onMessage, - ), - ); - FirebaseMessaging.onMessageOpenedApp.listen( - (message) { - _internalMessageInterceptor( - message.data, - MessageHandlerType.onLaunch, - ); - }, - ); - FirebaseMessaging.onBackgroundMessage( - (message) => _internalMessageInterceptor( - message.data, - MessageHandlerType.onResume, - ), - ); - } - - /// subscribe to [topic] in background. - void subscribeToTopic(String topic) { - _messaging.subscribeToTopic(topic); - _topicsSubscription.add(topic); - } - - /// subscribe on a list of [topics] in background. - void subscribeToTopics(List topics) { - topics.forEach(subscribeToTopic); - } - - /// unsubscribe from [topic] in background1. - void unsubscribeFromTopic(String topic) { - _messaging.unsubscribeFromTopic(topic); - _topicsSubscription.remove(topic); - } - - /// unsubscribe from [topics] - void unsubscribeFromTopics(List topics) { - topics.forEach(unsubscribeFromTopic); - } - - /// unsubscribe from all topics - void unsubscribe() { - _topicsSubscription.forEach(unsubscribeFromTopic); - } - - Future _internalMessageInterceptor( - Map message, - MessageHandlerType handlerType, - ) async { - logger.d('FIREBASE MESSAGE: $handlerType - $message'); - _handleMessage.call(message, handlerType); - } -} diff --git a/packages/push_notification/example/lib/notification/second_strategy.dart b/packages/push_notification/example/lib/notification/second_strategy.dart deleted file mode 100644 index 4a6ba5f3a..000000000 --- a/packages/push_notification/example/lib/notification/second_strategy.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:push_demo/domain/message.dart'; -import 'package:push_demo/ui/second_screen.dart'; -import 'package:push_notification/push_notification.dart'; - -class SecondStrategy extends PushHandleStrategy { - SecondStrategy(Message payload) : super(payload); - - @override - void onTapNotification(NavigatorState? navigator) { - debugPrint('on tap notification'); - - navigator?.push( - MaterialPageRoute( - builder: (context) => SecondScreen(payload), - ), - ); - } - - @override - void onBackgroundProcess(Map message) { - debugPrint('on process notification in background'); - } -} diff --git a/packages/push_notification/example/lib/ui/app.dart b/packages/push_notification/example/lib/ui/app.dart deleted file mode 100644 index e098d0be3..000000000 --- a/packages/push_notification/example/lib/ui/app.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:push_demo/ui/main_screen.dart'; -import 'package:push_notification/push_notification.dart'; - -class MyApp extends StatelessWidget { - const MyApp(this._pushHandler, {Key? key}) : super(key: key); - - final PushHandler _pushHandler; - - @override - Widget build(BuildContext context) { - return MaterialApp( - navigatorObservers: [ - PushObserver(), - ], - title: 'Push demo', - theme: ThemeData( - primarySwatch: Colors.indigo, - ), - home: MessageScreen(_pushHandler), - ); - } -} diff --git a/packages/push_notification/example/lib/ui/first_screen.dart b/packages/push_notification/example/lib/ui/first_screen.dart deleted file mode 100644 index ace727138..000000000 --- a/packages/push_notification/example/lib/ui/first_screen.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:push_demo/domain/message.dart'; - -const String androidMipMapIcon = '@mipmap/ic_launcher'; - -class FirstScreen extends StatefulWidget { - const FirstScreen(this.payload, {Key? key}) : super(key: key); - - final Message payload; - - @override - FirstScreenState createState() => FirstScreenState(); -} - -class FirstScreenState extends State { - @override - void initState() { - super.initState(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('First notification screen'), - ), - body: Center( - child: Column( - children: [ - const Text('Incoming message'), - Text('Title : ${widget.payload.title}'), - Text('Body: ${widget.payload.body}'), - ], - ), - ), - ); - } -} diff --git a/packages/push_notification/example/lib/ui/main_screen.dart b/packages/push_notification/example/lib/ui/main_screen.dart deleted file mode 100644 index 1be077720..000000000 --- a/packages/push_notification/example/lib/ui/main_screen.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:push_demo/domain/message.dart'; -import 'package:push_notification/push_notification.dart'; - -const String androidMipMapIcon = '@mipmap/ic_launcher'; - -class MessageScreen extends StatefulWidget { - const MessageScreen(this.pushHandler, {Key? key}) : super(key: key); - - final PushHandler pushHandler; - - @override - MessageScreenState createState() => MessageScreenState(); -} - -class MessageScreenState extends State { - final List messageList = []; - - @override - void initState() { - super.initState(); - - widget.pushHandler.messageSubject.listen((messageMap) { - final message = Message.fromMap(messageMap); - setState(() { - messageList.add(message); - }); - }); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Push demo'), - ), - body: ListView.builder( - itemCount: messageList.length, - itemBuilder: (_, index) { - final message = messageList[index]; - - return ListTile( - title: Text(message.title), - subtitle: Text(message.body), - ); - }, - ), - ); - } -} diff --git a/packages/push_notification/example/lib/ui/second_screen.dart b/packages/push_notification/example/lib/ui/second_screen.dart deleted file mode 100644 index 1fd25a340..000000000 --- a/packages/push_notification/example/lib/ui/second_screen.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:push_demo/domain/message.dart'; - -const String androidMipMapIcon = '@mipmap/ic_launcher'; - -class SecondScreen extends StatefulWidget { - const SecondScreen(this.payload, {Key? key}) : super(key: key); - - final Message payload; - - @override - SecondScreenState createState() => SecondScreenState(); -} - -class SecondScreenState extends State { - @override - void initState() { - super.initState(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Second notification screen'), - ), - body: Center( - child: Column( - children: [ - const Text('Incoming message'), - Text('Title : ${widget.payload.title}'), - Text('Body: ${widget.payload.body}'), - ], - ), - ), - ); - } -} diff --git a/packages/push_notification/example/lib/utils/logger.dart b/packages/push_notification/example/lib/utils/logger.dart deleted file mode 100644 index 55058ea0d..000000000 --- a/packages/push_notification/example/lib/utils/logger.dart +++ /dev/null @@ -1,3 +0,0 @@ -import 'package:logger/logger.dart'; - -final logger = Logger(); diff --git a/packages/push_notification/example/pubspec.yaml b/packages/push_notification/example/pubspec.yaml deleted file mode 100644 index 8a77288a9..000000000 --- a/packages/push_notification/example/pubspec.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: push_demo -description: A new Flutter application. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - firebase_core: ^1.0.4 - firebase_messaging: ^9.1.2 - flutter: - sdk: flutter - logger: ^1.0.0 - push_notification: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/push_notification/ios/.gitignore b/packages/push_notification/ios/.gitignore deleted file mode 100644 index aa479fd3c..000000000 --- a/packages/push_notification/ios/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/Generated.xcconfig -/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/push_notification/ios/Assets/.gitkeep b/packages/push_notification/ios/Assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/push_notification/ios/Classes/PushNotificationPlugin.h b/packages/push_notification/ios/Classes/PushNotificationPlugin.h deleted file mode 100644 index d06d5d3b0..000000000 --- a/packages/push_notification/ios/Classes/PushNotificationPlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface PushNotificationPlugin : NSObject -@end diff --git a/packages/push_notification/ios/Classes/PushNotificationPlugin.m b/packages/push_notification/ios/Classes/PushNotificationPlugin.m deleted file mode 100644 index 873e259de..000000000 --- a/packages/push_notification/ios/Classes/PushNotificationPlugin.m +++ /dev/null @@ -1,15 +0,0 @@ -#import "PushNotificationPlugin.h" -#if __has_include() -#import -#else -// Support project import fallback if the generated compatibility header -// is not copied when this plugin is created as a library. -// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 -#import "push_notification-Swift.h" -#endif - -@implementation PushNotificationPlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - [SwiftPushNotificationPlugin registerWithRegistrar:registrar]; -} -@end diff --git a/packages/push_notification/ios/Classes/SwiftPushNotificationPlugin.swift b/packages/push_notification/ios/Classes/SwiftPushNotificationPlugin.swift deleted file mode 100644 index 4c29e74c9..000000000 --- a/packages/push_notification/ios/Classes/SwiftPushNotificationPlugin.swift +++ /dev/null @@ -1,180 +0,0 @@ -import Flutter -import UIKit -import UserNotifications - -// Channels and methods names -let CHANNEL = "surf_notification" -let CALL_SHOW = "show" -let CALL_REQUEST = "request" -let CALLBACK_OPEN = "notificationOpen" -let CALLBACK_PERMISSION_DECLINE = "permissionDecline" -// Arguments names -let ARG_PUSH_ID = "pushId" -let ARG_TITLE = "title" -let ARG_BODY = "body" -let ARG_IMAGE_URL = "imageUrl" -let ARG_DATA = "data" - -// Plugin to display notifications -@available(iOS 10.0, *) -public class SwiftPushNotificationPlugin: NSObject, FlutterPlugin, UNUserNotificationCenterDelegate { - - let notificationCenter = UNUserNotificationCenter.current() - - var channel :FlutterMethodChannel - - init(channel: FlutterMethodChannel) { - self.channel = channel - } - - public static func register(with registrar: FlutterPluginRegistrar) { - let channel = FlutterMethodChannel(name: CHANNEL, binaryMessenger: registrar.messenger()) - let instance = SwiftPushNotificationPlugin(channel: channel) - registrar.addMethodCallDelegate(instance, channel: channel) - } - - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { - let args = call.arguments as! NSDictionary - switch call.method{ - case CALL_REQUEST: - requestPermissions(args: args) - break - case CALL_SHOW: - show(args: args) - break; - default: - result(FlutterMethodNotImplemented) - return - } - } - - // Initialize Notifications - func requestPermissions(args : NSDictionary) { - // Read notification request request parameter - let requestAlertPermission = args["requestAlertPermission"] as! Bool - // Read request notification sound parameter - let requestSoundPermission = args["requestSoundPermission"] as! Bool - // Notification Options - var options: UNAuthorizationOptions = [] - - // Enable notifications if requestAlertPermission == true - if requestAlertPermission { - options.insert(.alert) - } - // Enable notification sound if requestSoundPermission == true - if requestSoundPermission { - options.insert(.sound) - } - - // Permission request for notifications - notificationCenter.requestAuthorization(options: options) { - (didAllow, error) in - if !didAllow { - self.channel.invokeMethod(CALLBACK_PERMISSION_DECLINE, arguments: nil) - return - } - print("notification request is done") - } - } - - // Show notifications - func show(args: NSDictionary) { - //Implements a notification display while the program is running - notificationCenter.delegate = self - // Notification id - let id: Int = args[ARG_PUSH_ID] as! Int - // Notification title - let title: String = args[ARG_TITLE] as! String - // Notification body text - let body: String = args[ARG_BODY] as! String - // Notification image url - let imageUrl: String? = args[ARG_IMAGE_URL] as? String - // Data for notification - var data: Dictionary = [:] - - if !(args[ARG_DATA] is NSNull){ - data = args[ARG_DATA] as! Dictionary - } - - // The object in which previously received data is stored - let content = UNMutableNotificationContent() - - content.title = title - content.body = body - content.sound = UNNotificationSound.default - content.userInfo = data - - if let path = imageUrl { - if let url = URL(string: path){ - if let imageData = NSData(contentsOf: url){ - if let attachment = UNNotificationAttachment.create(imageFileIdentifier: "image.jpg", data: imageData, options: nil) { - content.attachments = [ attachment ] - } else { - print("error in UNNotificationAttachment.create()") - } - } - } - } - - - /* Trigger when notification is displayed -       Now it is configured to show -       notification with a minimum delay without repetitions - */ - let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 0.1, repeats: false) - let identifier = String(id) - // Notification request - let request = UNNotificationRequest(identifier: identifier, content: content, trigger: trigger) - - // Add notification to notificationCenter - // After that, a notification is displayed - notificationCenter.add(request) - } - - /* Called when the application is in the foreground. We get a UNNotification object that contains the UNNotificationRequest request. In the body of the method, you need to make a completion handler call with a set of options to notify UNNotificationPresentationOptions - */ - @available(iOS 10.0, *) - public func userNotificationCenter(_ center: UNUserNotificationCenter, - willPresent notification: UNNotification, - withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { - completionHandler([.alert,.sound]) - } - - /* Used to select a tap action for notification. You get a UNNotificationResponse object that contains an actionIdentifier to define an action. The system identifiers UNNotificationDefaultActionIdentifier and UNNotificationDismissActionIdentifier are used when you need to open the application by tap on a notification or close a notification with a swipe. - */ - @available(iOS 10.0, *) - public func userNotificationCenter(_ center: UNUserNotificationCenter, - didReceive response: UNNotificationResponse, - withCompletionHandler completionHandler: @escaping () -> Void) { - let notification = response.notification - let notificationData = notification.request.content.userInfo - - channel.invokeMethod(CALLBACK_OPEN, arguments: notificationData) - completionHandler() - } -} - -@available(iOS 10.0, *) -@available(iOSApplicationExtension 10.0, *) -extension UNNotificationAttachment { - - /// Save the image to disk - static func create(imageFileIdentifier: String, data: NSData, options: [NSObject : AnyObject]?) -> UNNotificationAttachment? { - let fileManager = FileManager.default - let tmpSubFolderName = ProcessInfo.processInfo.globallyUniqueString - guard let tmpSubFolderURL = NSURL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(tmpSubFolderName, isDirectory: true) else { return nil } - - do { - try fileManager.createDirectory(at: tmpSubFolderURL, withIntermediateDirectories: true, attributes: nil) - let fileURL = tmpSubFolderURL.appendingPathComponent(imageFileIdentifier) - try data.write(to: fileURL, options: []) - let imageAttachment = try UNNotificationAttachment(identifier: imageFileIdentifier, url: fileURL, options: options) - return imageAttachment - } catch let error { - print("error \(error)") - } - - return nil - } - -} diff --git a/packages/push_notification/ios/push_notification.podspec b/packages/push_notification/ios/push_notification.podspec deleted file mode 100644 index a9468390e..000000000 --- a/packages/push_notification/ios/push_notification.podspec +++ /dev/null @@ -1,23 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint push_notification.podspec' to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'push_notification' - s.version = '0.0.1' - s.summary = 'A new Flutter plugin.' - s.description = <<-DESC -A new Flutter plugin. - DESC - s.homepage = 'http://example.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.dependency 'Flutter' - s.platform = :ios, '8.0' - - # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } - s.swift_version = '5.0' -end diff --git a/packages/push_notification/lib/push_notification.dart b/packages/push_notification/lib/push_notification.dart deleted file mode 100644 index 1d4c0f4e4..000000000 --- a/packages/push_notification/lib/push_notification.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:push_notification/src/base/base_messaging_service.dart'; -export 'package:push_notification/src/base/notification_payload.dart'; -export 'package:push_notification/src/base/push_handle_strategy.dart'; -export 'package:push_notification/src/base/push_handle_strategy_factory.dart'; -export 'package:push_notification/src/notification/notification_controller.dart'; -export 'package:push_notification/src/notification/notificator/android/android_notiffication_specifics.dart'; -export 'package:push_notification/src/notification/notificator/notification_specifics.dart'; -export 'package:push_notification/src/notification/notificator/notificator.dart'; -export 'package:push_notification/src/push_handler.dart'; -export 'package:push_notification/src/push_navigator_holder.dart'; -export 'package:push_notification/src/push_observer.dart'; diff --git a/packages/push_notification/lib/src/base/base_messaging_service.dart b/packages/push_notification/lib/src/base/base_messaging_service.dart deleted file mode 100644 index bf9dcc696..000000000 --- a/packages/push_notification/lib/src/base/base_messaging_service.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:push_notification/src/push_handler.dart'; - -enum MessageHandlerType { onMessage, onLaunch, onResume } - -/// Base wrapper over any message service -// ignore: one_member_abstracts -abstract class BaseMessagingService { - /// no need to call. initialization is called inside the [PushHandler] - void initNotification(HandleMessageFunction handleMessage); -} diff --git a/packages/push_notification/lib/src/base/notification_payload.dart b/packages/push_notification/lib/src/base/notification_payload.dart deleted file mode 100644 index 41a326714..000000000 --- a/packages/push_notification/lib/src/base/notification_payload.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// notification base payload data -abstract class NotificationPayload { - const NotificationPayload( - this.messageData, - this.title, - this.body, { - this.imageUrl, - }); - - /// original message - final Map messageData; - - /// field required to show notification - final String title; - final String body; - final String? imageUrl; -} diff --git a/packages/push_notification/lib/src/base/push_handle_strategy.dart b/packages/push_notification/lib/src/base/push_handle_strategy.dart deleted file mode 100644 index e552126ee..000000000 --- a/packages/push_notification/lib/src/base/push_handle_strategy.dart +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/cupertino.dart'; -import 'package:push_notification/src/base/notification_payload.dart'; - -/// abstract notification processing strategy -abstract class PushHandleStrategy { - PushHandleStrategy(this.payload); - - /// Android notification channel id - /// - /// "@string/notification_channel_id"" - String? notificationChannelId; - - /// Android notification channel name - /// - /// "@string/notification_channel_name" - String? notificationChannelName; - - /// push id - int pushId = 0; - - /// Auto close notification - bool autoCancelable = false; - - /// Path to string resource color notification icons - /// "@color/notificaion_icon_color_name" - String? color; - - /// Path to string resource notification icons - /// "@mipmap/notificaion_icon_name" - String? icon; - - /// non-removable notification - /// Android only - bool ongoing = false; - - /// Indicates if a sound should be played when the notification is displayed. - bool playSound = true; - - /// Display an alert when the notification is triggered while app is in the - /// foreground. iOS 10+ only - bool presentAlert = true; - - /// notification payload - final PT payload; - - /// function that is called to process notification clicks - void onTapNotification(NavigatorState? navigator); - - /// function that is called to process notification background - void onBackgroundProcess(Map message); - - @override - String toString() { - return 'PushHandleStrategy{notificationChannelId: $notificationChannelId,' - ' notificationChannelName: $notificationChannelName, pushId: $pushId,' - ' autoCancelable: $autoCancelable, color: $color, icon: $icon, ongoing:' - ' $ongoing, playSound: $playSound, presentAlert: $presentAlert,' - ' payload: $payload}'; - } -} diff --git a/packages/push_notification/lib/src/base/push_handle_strategy_factory.dart b/packages/push_notification/lib/src/base/push_handle_strategy_factory.dart deleted file mode 100644 index b1107c0dd..000000000 --- a/packages/push_notification/lib/src/base/push_handle_strategy_factory.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:io'; - -import 'package:push_notification/src/base/push_handle_strategy.dart'; - -/// strategy builder function -typedef StrategyBuilder = PushHandleStrategy Function( - Map payload, -); - -/// Abstract factory for push notification strategies -abstract class PushHandleStrategyFactory { - /// Action key in data firebase's push - /// You can customize your format in the factory implementation. - static const _key = 'event'; - - /// Default strategy, if in the notification is no strategy information - StrategyBuilder get defaultStrategy; - - /// Override with the necessary matching actions and strategy builder - Map get map => {}; - - /// Returns a strategy from push data - PushHandleStrategy createByData(Map messageData) { - StrategyBuilder? builder; - try { - if (Platform.isAndroid) { - builder = map[(messageData['data'] as Map)[_key]]; - } else if (Platform.isIOS) { - builder = map[messageData[_key]]; - } - - return builder!(messageData); - } on Exception catch (e) { - // ignore: avoid_print - print('$e - cant found $_key'); - return defaultStrategy(messageData); - } - } -} diff --git a/packages/push_notification/lib/src/notification/notification_controller.dart b/packages/push_notification/lib/src/notification/notification_controller.dart deleted file mode 100644 index 35010149b..000000000 --- a/packages/push_notification/lib/src/notification/notification_controller.dart +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:collection'; - -import 'package:push_notification/src/base/push_handle_strategy.dart'; -import 'package:push_notification/src/notification/notificator/android/android_notiffication_specifics.dart'; -import 'package:push_notification/src/notification/notificator/notification_specifics.dart'; -import 'package:push_notification/src/notification/notificator/notificator.dart'; - -typedef NotificationCallback = void Function(Map payload); - -const String pushIdParam = 'localPushId'; - -/// Wrapper over surf notifications -class NotificationController { - NotificationController(OnPermissionDeclineCallback onPermissionDecline) { - _notificator = Notificator( - onNotificationTapCallback: _internalOnSelectNotification, - onPermissionDecline: onPermissionDecline, - ); - } - - late Notificator _notificator; - - Map callbackMap = - HashMap(); - - /// Request notification permissions (iOS only) - Future requestPermissions({ - bool? requestSoundPermission, - bool? requestAlertPermission, - }) { - return _notificator.requestPermissions( - requestSoundPermission: requestSoundPermission, - requestAlertPermission: requestAlertPermission, - ); - } - - /// displaying notification from the strategy - Future show( - PushHandleStrategy strategy, - NotificationCallback onSelectNotification, - ) { - final androidSpecifics = AndroidNotificationSpecifics( - channelId: strategy.notificationChannelId, - channelName: strategy.notificationChannelName, - autoCancelable: strategy.autoCancelable, - color: strategy.color, - icon: strategy.icon, - ); - - final platformSpecifics = NotificationSpecifics(androidSpecifics); - - // ignore: avoid_print - print( - 'DEV_INFO receive for show push : ${strategy.payload.title}, ' - '${strategy.payload.body}', - ); - - final pushId = DateTime.now().millisecondsSinceEpoch; - - final tmpPayload = strategy.payload.messageData.map( - // ignore: avoid_annotating_with_dynamic - (key, dynamic value) => MapEntry( - key.toString(), - value.toString(), - ), - ); - - tmpPayload[pushIdParam] = '$pushId'; - callbackMap[pushId] = onSelectNotification; - - return _notificator.show( - strategy.pushId, - strategy.payload.title, - strategy.payload.body, - imageUrl: strategy.payload.imageUrl, - data: tmpPayload, - notificationSpecifics: platformSpecifics, - ); - } - - void _internalOnSelectNotification(Map? payload) { - // ignore: avoid_print - print('DEV_INFO onSelectNotification, payload: $payload'); - - final tmpPayload = payload as Map; - final pushId = int.tryParse(tmpPayload[pushIdParam]!); - final onSelectNotification = callbackMap[pushId]; - callbackMap.remove(pushId); - - onSelectNotification?.call(tmpPayload); - } -} diff --git a/packages/push_notification/lib/src/notification/notificator/android/android_notiffication_specifics.dart b/packages/push_notification/lib/src/notification/notificator/android/android_notiffication_specifics.dart deleted file mode 100644 index 401aa0b58..000000000 --- a/packages/push_notification/lib/src/notification/notificator/android/android_notiffication_specifics.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Android notification settings -class AndroidNotificationSpecifics { - AndroidNotificationSpecifics({ - this.icon, - this.channelId, - this.channelName, - this.color, - this.autoCancelable, - }); - - ///Icon drawable - /// - /// @mipmap/ic_launcher - final String? icon; - - /// channelId - /// - /// @string/notification_channel_id - final String? channelId; - - /// Channel name - /// - /// @string/notification_channel_name - final String? channelName; - - /// Icon color - /// - /// @color/notification_color - final String? color; - - /// Notification is auto cancel - final bool? autoCancelable; - - Map toMap() { - return { - 'icon': icon, - 'channelId': channelId, - 'channelName': channelName, - 'color': color, - 'autoCancelable': autoCancelable, - }; - } -} diff --git a/packages/push_notification/lib/src/notification/notificator/android/android_notification.dart b/packages/push_notification/lib/src/notification/notificator/android/android_notification.dart deleted file mode 100644 index 06455a518..000000000 --- a/packages/push_notification/lib/src/notification/notificator/android/android_notification.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/services.dart'; -import 'package:push_notification/src/notification/notificator/android/android_notiffication_specifics.dart'; -import 'package:push_notification/src/notification/notificator/notificator.dart'; - -/// Notifications for the android platform -class AndroidNotification { - AndroidNotification({ - required this.channel, - required this.onNotificationTap, - }); - - /// MethodChannel for connecting to android native code - final MethodChannel channel; - - /// Callback notification push - final OnNotificationTapCallback onNotificationTap; - - /// Initialize notification - /// - /// Initializes notification parameters and click listener - Future init() async { - channel.setMethodCallHandler( - (call) async { - switch (call.method) { - case openCallback: - final notificationData = call.arguments as Map; - onNotificationTap(notificationData); - break; - } - }, - ); - return channel.invokeMethod(callInit); - } - - /// Show notification - /// - /// id - notification identifier - /// title - title - /// body - the main text of the notification - /// notificationDetails - notification details - Future show( - int id, - String title, - String body, - String? imageUrl, - Map? data, - AndroidNotificationSpecifics notificationSpecifics, - ) async { - return channel.invokeMethod( - callShow, - { - pushIdArg: id, - titleArg: title, - bodyArg: body, - imageUrlArg: imageUrl, - dataArg: data, - notificationSpecificsArg: notificationSpecifics.toMap(), - }, - ); - } -} diff --git a/packages/push_notification/lib/src/notification/notificator/ios/ios_notification.dart b/packages/push_notification/lib/src/notification/notificator/ios/ios_notification.dart deleted file mode 100644 index 347565301..000000000 --- a/packages/push_notification/lib/src/notification/notificator/ios/ios_notification.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/services.dart'; -import 'package:push_notification/src/notification/notificator/ios/ios_notification_specifics.dart'; -import 'package:push_notification/src/notification/notificator/notificator.dart'; - -/// Notifications for the ios platform -class IOSNotification { - IOSNotification({ - required this.channel, - required this.onNotificationTap, - this.onPermissionDecline, - }); - - /// MethodChannel for connecting to ios native platform - final MethodChannel channel; - - /// Callback notification push - final OnNotificationTapCallback onNotificationTap; - - /// Callback notification decline - final OnPermissionDeclineCallback? onPermissionDecline; - - Future init() async { - channel.setMethodCallHandler( - (call) async { - switch (call.method) { - case openCallback: - onNotificationTap(call.arguments as Map); - break; - case permissionDeclineCallback: - if (onPermissionDecline != null) { - onPermissionDecline!(); - } - break; - } - }, - ); - } - - /// Request permissions - /// - /// requestSoundPermission - is play sound - /// requestSoundPermission - is show alert - Future requestPermissions({ - bool? requestSoundPermission, - bool? requestAlertPermission, - }) => - channel.invokeMethod( - callRequest, - { - 'requestAlertPermission': requestAlertPermission ?? false, - 'requestSoundPermission': requestSoundPermission ?? false, - }, - ); - - /// Show notification - /// id - notification identifier - /// title - title - /// body - the main text of the notification - Future show( - int id, - String title, - String body, - String? imageUrl, - Map? data, - IosNotificationSpecifics? notificationSpecifics, - ) => - channel.invokeMethod( - callShow, - { - pushIdArg: id, - titleArg: title, - bodyArg: body, - imageUrlArg: imageUrl, - dataArg: data, - }, - ); -} diff --git a/packages/push_notification/lib/src/notification/notificator/ios/ios_notification_specifics.dart b/packages/push_notification/lib/src/notification/notificator/ios/ios_notification_specifics.dart deleted file mode 100644 index cce6448c9..000000000 --- a/packages/push_notification/lib/src/notification/notificator/ios/ios_notification_specifics.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Ios notification settings -/// todo подумать над доп.опциями ios уведомления -class IosNotificationSpecifics {} diff --git a/packages/push_notification/lib/src/notification/notificator/notification_specifics.dart b/packages/push_notification/lib/src/notification/notificator/notification_specifics.dart deleted file mode 100644 index 01a914d1e..000000000 --- a/packages/push_notification/lib/src/notification/notificator/notification_specifics.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:push_notification/src/notification/notificator/android/android_notiffication_specifics.dart'; -import 'package:push_notification/src/notification/notificator/ios/ios_notification_specifics.dart'; - -/// Specific notification settings for platforms -class NotificationSpecifics { - NotificationSpecifics(this.androidNotificationSpecifics); - - /// Settings for android - AndroidNotificationSpecifics androidNotificationSpecifics; - - IosNotificationSpecifics? iosNotificationSpecifics; -} diff --git a/packages/push_notification/lib/src/notification/notificator/notificator.dart b/packages/push_notification/lib/src/notification/notificator/notificator.dart deleted file mode 100644 index c6c521f72..000000000 --- a/packages/push_notification/lib/src/notification/notificator/notificator.dart +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; -import 'dart:io'; - -import 'package:flutter/services.dart'; -import 'package:push_notification/src/notification/notificator/android/android_notification.dart'; -import 'package:push_notification/src/notification/notificator/ios/ios_notification.dart'; -import 'package:push_notification/src/notification/notificator/notification_specifics.dart'; - -/// Callback notification clicks -/// -/// notificationData - notification data -typedef OnNotificationTapCallback = void Function(Map notificationData); - -/// Callback permission decline -typedef OnPermissionDeclineCallback = void Function(); - -/// Channels and methods names -const String channelName = 'surf_notification'; -const String callInit = 'initialize'; -const String callShow = 'show'; -const String callRequest = 'request'; -const String openCallback = 'notificationOpen'; -const String permissionDeclineCallback = 'permissionDecline'; - -/// Arguments names -const String pushIdArg = 'pushId'; -const String titleArg = 'title'; -const String bodyArg = 'body'; -const String imageUrlArg = 'imageUrl'; -const String dataArg = 'data'; -const String notificationSpecificsArg = 'notificationSpecifics'; - -/// Util for displaying notifications for android and ios -class Notificator { - Notificator({ - required this.onNotificationTapCallback, - this.onPermissionDecline, - }) { - _init(); - } - - static const _channel = MethodChannel(channelName); - late IOSNotification _iosNotification; - late AndroidNotification _androidNotification; - - /// Callback notification clicks - final OnNotificationTapCallback onNotificationTapCallback; - - /// Callback notification decline(ios only) - final OnPermissionDeclineCallback? onPermissionDecline; - - Future _init() async { - if (Platform.isAndroid) { - _androidNotification = AndroidNotification( - channel: _channel, - onNotificationTap: onNotificationTapCallback, - ); - - return _androidNotification.init(); - } else if (Platform.isIOS) { - _iosNotification = IOSNotification( - channel: _channel, - onNotificationTap: onNotificationTapCallback, - onPermissionDecline: onPermissionDecline, - ); - - return _iosNotification.init(); - } - } - - /// Request notification permissions (iOS only) - Future requestPermissions({ - bool? requestSoundPermission, - bool? requestAlertPermission, - }) { - if (Platform.isAndroid) { - return Future.value(true); - } - - return _iosNotification.requestPermissions( - requestSoundPermission: requestSoundPermission, - requestAlertPermission: requestAlertPermission, - ); - } - - /// Request to display notifications - /// - /// id - notification identifier - /// title - title - /// body - the main text of the notification - /// data - data for notification - Future show( - int id, - String title, - String body, { - String? imageUrl, - Map? data, - NotificationSpecifics? notificationSpecifics, - }) { - if (Platform.isAndroid) { - return _androidNotification.show( - id, - title, - body, - imageUrl, - data, - notificationSpecifics!.androidNotificationSpecifics, - ); - } else if (Platform.isIOS) { - return _iosNotification.show( - id, - title, - body, - imageUrl, - data, - notificationSpecifics!.iosNotificationSpecifics, - ); - } - - return Future.value(); - } -} diff --git a/packages/push_notification/lib/src/push_handler.dart b/packages/push_notification/lib/src/push_handler.dart deleted file mode 100644 index 80b92dc94..000000000 --- a/packages/push_notification/lib/src/push_handler.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:push_notification/push_notification.dart'; -import 'package:push_notification/src/base/base_messaging_service.dart'; -import 'package:push_notification/src/base/push_handle_strategy_factory.dart'; -import 'package:push_notification/src/notification/notification_controller.dart'; -import 'package:push_notification/src/push_navigator_holder.dart'; -import 'package:rxdart/subjects.dart'; - -typedef HandleMessageFunction = void Function( - Map message, - MessageHandlerType handlerType, -); - -/// Notification handling -class PushHandler { - PushHandler( - this._strategyFactory, - this._notificationController, - this._messagingService, - ) { - _messagingService.initNotification(handleMessage); - } - - /// The ability to directly subscribe to receive messages - final PublishSubject> messageSubject = PublishSubject(); - final BehaviorSubject selectNotificationSubject = - BehaviorSubject(); - - final PushHandleStrategyFactory _strategyFactory; - final NotificationController _notificationController; - final BaseMessagingService _messagingService; - - /// request permission for show notification - /// soundPemission - is play sound - /// alertPermission - is show alert - Future requestPermissions({ - bool? soundPemission, - bool? alertPermission, - }) { - return _notificationController.requestPermissions( - requestSoundPermission: soundPemission, - requestAlertPermission: alertPermission, - ); - } - - /// display local notification - /// MessagingService calls this method to display the notification that - /// came from message service - void handleMessage( - Map message, - MessageHandlerType handlerType, { - bool localNotification = false, - }) { - if (!localNotification) { - messageSubject.add(message); - } - - final strategy = _strategyFactory.createByData(message); - - if (handlerType == MessageHandlerType.onLaunch || - handlerType == MessageHandlerType.onResume) { - strategy.onBackgroundProcess(message); - } - - if (handlerType == MessageHandlerType.onMessage) { - _notificationController.show( - strategy, - (_) { - selectNotificationSubject.add(strategy); - strategy.onTapNotification(PushNavigatorHolder().navigator); - }, - ); - } - } -} diff --git a/packages/push_notification/lib/src/push_navigator_holder.dart b/packages/push_notification/lib/src/push_navigator_holder.dart deleted file mode 100644 index ddb16740b..000000000 --- a/packages/push_notification/lib/src/push_navigator_holder.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart'; - -/// global navigator context storage -class PushNavigatorHolder { - factory PushNavigatorHolder() => _instance; - - PushNavigatorHolder._internal(); - - NavigatorState? navigator; - - static final _instance = PushNavigatorHolder._internal(); - - static PushNavigatorHolder get instance => _instance; -} diff --git a/packages/push_notification/lib/src/push_observer.dart b/packages/push_notification/lib/src/push_observer.dart deleted file mode 100644 index f28a24e3d..000000000 --- a/packages/push_notification/lib/src/push_observer.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart'; -import 'package:push_notification/src/push_navigator_holder.dart'; - -/// mixin to get navigator context -class PushObserver extends NavigatorObserver { - @override - void didPush(Route route, Route? previousRoute) { - PushNavigatorHolder().navigator = navigator; - } - - @override - void didPop(Route route, Route? previousRoute) { - PushNavigatorHolder().navigator = navigator; - } -} diff --git a/packages/push_notification/pubspec.yaml b/packages/push_notification/pubspec.yaml deleted file mode 100644 index a81914683..000000000 --- a/packages/push_notification/pubspec.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: push_notification -version: 1.1.0 -description: Library for implementing push notifications. The module contains the main work with push notifications. -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/push_notification" - -dependencies: - flutter: - sdk: flutter - rxdart: ^0.27.0 - -dev_dependencies: - flutter_test: - sdk: flutter - mocktail: ^0.1.2 - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=2.0.0" - -flutter: - plugin: - platforms: - android: - package: pushnotification.push_notification - pluginClass: PushNotificationPlugin - ios: - pluginClass: PushNotificationPlugin diff --git a/packages/push_notification/test/push_handler_test.dart b/packages/push_notification/test/push_handler_test.dart deleted file mode 100644 index 4662181fd..000000000 --- a/packages/push_notification/test/push_handler_test.dart +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:push_notification/src/base/base_messaging_service.dart'; -import 'package:push_notification/src/base/push_handle_strategy.dart'; -import 'package:push_notification/src/base/push_handle_strategy_factory.dart'; -import 'package:push_notification/src/notification/notification_controller.dart'; -import 'package:push_notification/src/push_handler.dart'; - -class BaseMessagingServiceMock extends Mock implements BaseMessagingService {} - -class PushHandleStrategyFactoryMock extends Mock - implements PushHandleStrategyFactory {} - -class PushHandleStrategyMock extends Mock implements PushHandleStrategy {} - -class NotificationControllerMock extends Mock - implements NotificationController {} - -void main() { - setUpAll(() { - registerFallbackValue(PushHandleStrategyMock()); - }); - - group('PushHandler', () { - late PushHandler handler; - - late NotificationControllerMock notificationController; - late PushHandleStrategyMock pushHandleStrategy; - - setUp(() { - pushHandleStrategy = PushHandleStrategyMock(); - - final pushHandleStrategyFactory = PushHandleStrategyFactoryMock(); - when(() => pushHandleStrategyFactory.createByData(any())) - .thenReturn(pushHandleStrategy); - - notificationController = NotificationControllerMock(); - when(() => notificationController.requestPermissions( - requestSoundPermission: any(named: 'requestSoundPermission'), - requestAlertPermission: any(named: 'requestAlertPermission'), - )).thenAnswer((_) => Future.value(true)); - when(() => notificationController.show(any(), any())) - .thenAnswer((_) => Future.value()); - - handler = PushHandler( - pushHandleStrategyFactory, - notificationController, - BaseMessagingServiceMock(), - ); - }); - - test( - 'requestPermissions request required permission from passed notification controller', - () { - handler.requestPermissions( - soundPemission: false, - alertPermission: true, - ); - - final args = verify( - () => notificationController.requestPermissions( - requestSoundPermission: captureAny(named: 'requestSoundPermission'), - requestAlertPermission: captureAny(named: 'requestAlertPermission'), - ), - ).captured; - expect(args, equals([false, true])); - }, - ); - - group('handleMessage process passed', () { - test('global onLaunch message', () async { - const message = {'message': 'simple on launch text'}; - - final messages = >[]; - handler.messageSubject.listen(messages.add); - - handler.handleMessage(message, MessageHandlerType.onLaunch); - - await handler.messageSubject.close(); - expect(messages, equals([message])); - verify(() => pushHandleStrategy.onBackgroundProcess(message)) - .called(equals(1)); - verifyNever(() => notificationController.show(any(), any())); - }); - - test('local onResume message', () async { - const message = {'message': 'simple on resume text'}; - - final messages = >[]; - handler.messageSubject.listen(messages.add); - - handler.handleMessage( - message, - MessageHandlerType.onResume, - localNotification: true, - ); - - await handler.messageSubject.close(); - expect(messages, isEmpty); - verify(() => pushHandleStrategy.onBackgroundProcess(message)) - .called(equals(1)); - verifyNever(() => notificationController.show(any(), any())); - }); - - test('local onMessage message', () async { - const message = {'message': 'simple on message text'}; - - final messages = >[]; - handler.messageSubject.listen(messages.add); - - handler.handleMessage( - message, - MessageHandlerType.onMessage, - ); - - await handler.messageSubject.close(); - expect(messages, equals([message])); - verifyNever(() => pushHandleStrategy.onBackgroundProcess(any())); - verify(() => notificationController.show(any(), any())) - .called(equals(1)); - }); - }); - }); -} diff --git a/packages/relation/.gitignore b/packages/relation/.gitignore deleted file mode 100644 index e348147fd..000000000 --- a/packages/relation/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ -*.lock - -.idea - -build/ -**/android/**/GeneratedPluginRegistrant.java -ios/.generated/ -ios/Flutter/Generated.xcconfig -ios/Runner/GeneratedPluginRegistrant.* diff --git a/packages/relation/.metadata b/packages/relation/.metadata deleted file mode 100644 index 281f231a6..000000000 --- a/packages/relation/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713 - channel: stable - -project_type: package diff --git a/packages/relation/CHANGELOG.md b/packages/relation/CHANGELOG.md deleted file mode 100644 index 479c3b982..000000000 --- a/packages/relation/CHANGELOG.md +++ /dev/null @@ -1,75 +0,0 @@ -# Changelog - -## 3.1.0 - 2021-06-28 - -* Stable release - -## 3.1.0-dev.1 - 2021-06-21 - -* Marked as deprecated `fromStream` constructors of `StreamedState` and `EntityState` -* Added possibility to configure nullable type by generic in `StreamedStateBuilder` - -## 3.0.0 - 2021-06-07 - -* Stable release - -## 4.0.0-dev.1 - 2021-06-04 - -* **Breaking Change:** `Action` renamed to `StreamedAction` -* **Breaking Change:** `StreamedAction`'s, `ScrollOffsetAction`'s and `TextEditingAction`'s `onChanged` callback is named parameter now. -* **Breaking Change:** replaced `Object` with `Exception` in `EntityEvent` and all derived classes -* **Breaking Change:** removed value return from `Event.accept`, `EntityEvent.accept` and all derived -* **Breaking Change:** removed nullable types where possible -* Add `acceptUnique` param to `StreamedAction`. -* Add `acceptUnique` method to `StreamedState`. - -## 2.0.1 - 2021-05-30 - -* Stable release - -## 2.0.1-dev.1 - 2021-05-25 - -* Apply new lint rules. - -## 2.0.0 - -* **Breaking Change:** `EntityStateBuilder`'s `child` argument replaced with `builder` -* **Breaking Change:** `EntityStateBuilder`'s `errorBuilder` argument now passes `Widget Function(BuildContext, Exception)`. If you'd like to get `data` from `error` please use `errorDataBuilder` instead. -* Add the ability to get an `error` in `EntityStateBuilder` from `errorChild`. -* Add `data` argument to `EntityStreamedState`. -* Update `rxdart` dependency to `0.27.0`. - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0` -* Remove `ControllerAction` - -## 0.0.4-dev.3 - -* Fixed loading and error builders on empty stream data -* Update README.md - -## 0.0.4-dev.1 - -* Up rxdart dependency - -## 0.0.3-dev.4 - -* Add 'from' constructors to StreamedStates - -## 0.0.3-dev.3 - -* Change error type from Exception to Object - -## 0.0.2-dev.5 - -* Added previous value to loadState -* Added error to data builder - -## 0.0.2-dev.4 - -* Fix lint hints - -## 0.0.2 - 21.0.2020 - -* Initial release diff --git a/packages/relation/CONTRIBUTING.md b/packages/relation/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/relation/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/relation/LICENSE b/packages/relation/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/relation/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/relation/README.md b/packages/relation/README.md deleted file mode 100644 index 6fc1dadb1..000000000 --- a/packages/relation/README.md +++ /dev/null @@ -1,299 +0,0 @@ -# Relation - -[![Build Status](https://github.com/surfstudio/SurfGear/workflows/build/badge.svg)](https://github.com/surfstudio/SurfGear) -[![Coverage Status](https://codecov.io/gh/surfstudio/SurfGear/branch/dev/graph/badge.svg?flag=relation)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/relation)](https://pub.dev/packages/relation) -[![Pub Likes](https://badgen.net/pub/likes/relation)](https://pub.dev/packages/relation) -![Flutter Platform](https://badgen.net/pub/flutter-platform/relation) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru/). - -![Relation Cover](https://i.ibb.co/f1yC8d5/relation-logo.png) - -## About - -Two-way communication channels for transferring data between different architectural layers of a Flutter application. - -## Currently supported features - -- Notify your app's presentation layer about every user input or UI event (button tap, focus change, gesture detection, etc.) using `StreamedAction` and implement a reaction to them; -- Write less code with *StreamedAction* that are customized for specific user cases (scrolling, editing text, `ValueNotifier` value changing). -- React to the data state changes and redraw UI using `StreamedState` together with `StreamedStateBuilder` and its variations; -- Manage the screen state easily with a special stream that handles three predefined states: data, loading, error. - -## Usage - -### Notify and react - -#### StreamedAction - -![StreamedAction Scheme](https://i.ibb.co/rcvRN44/Streamed-Action-scheme.png) - -`StreamedAction` is a good way to notify consumers about every event coming from the UI. - -Create an `StreamedAction` class instance. You can pass data with `StreamedAction`'s events, so you need to specify the concrete type of `StreamedAction` while declaring it. - -```dart -final logoutAction = VoidAction(); - -final addItemToCartAction = StreamedAction(); -``` - -Find the place where you're going to handle events triggered by your `StreamedAction`. Subscribe to the event stream. You can access it through the `stream` property. - -```dart -logoutAction.stream.listen( - (_) => logout() -); - -addItemToCartAction.stream.listen( - (item) => addItemToCart(item) -); -``` - -Now you can trigger an event through an `StreamedAction` instance from anywhere just like that: - -```dart -logoutAction.accept(); - -addItemToCartAction.accept(item); -``` - -Or even easier: - -```dart -TextButton( - onPressed: logoutAction, - ... -), -``` - -#### StreamedState - -![StreamedState Scheme](https://i.ibb.co/nwZWsP2/relation-streamed-state.png) - -With `StreamedState` you can notify consumers of data changes. - -Create a `StreamedState` class instance. `StreamedState` constructor allows you to set the initial value that the consumers will receive as soon as they subscribe to the `StreamedState`. You need to specify the data type that your `StreamedState` will handle. - -```dart -final userBalanceState = StreamedState(0); - -final itemsInCartState = StreamedState>(); -``` - -You can subscribe to `StreamedState` changes the same way as with `Action`. - -```dart -userBalanceState.stream.listen( - (balance) => showUserBalance(balance) -); -``` - -To notify consumers of any data changes, you can release the relevant data to the `StreamedState` via the `accept()` function. - -```dart -userBalanceState.accept(100); -``` - -In fact, you can use `Action`s and `StreamedState`s to communicate between any objects in your application. However, we recommend using them to connect the UI and presentation layers. - -### Update UI - -#### StreamStateBuilder - -![StreamedStateBuilder Scheme](https://i.ibb.co/xhVBkt8/relation-streamed-state-builder.png) - -`StreamStateBuilder` is a widget built on the latest snapshot of interaction with a `StreamedState`. The `StreamStateBuilder`'s behavior is almost the same as the standard `StreamBuilder`. The only difference is that it accepts `StreamedState` instead of the usual `Stream`, thus simplifying the initial data setup. - -`StreamStateBuilder` rebuilds its widget subtree each time as its corresponding `StreamedState` emits a new value. This is the recommended way to organize your UI layer. It can save you from multiple `setState()` function calls. - -```dart -Container( - child: StreamedStateBuilder( - streamedState: userBalanceState, - builder: (ctx, balance) => _buildUserBalanceWidget(balance), - ), -) -``` - -### State Management - -![State Management Scheme](https://i.ibb.co/YcnGww0/relation-state-management.png) - -You can build a state management solution for your Flutter app using all of the components above. - -We recommend using **Relation** package in conjunction with [MWWM architecture](https://pub.dev/packages/mwwm). - -- Use `StreamedAction` to notify the presentation layer of all UI events (button taps, pull-to-refresh triggers, swipes, or other gestures detections); -- Use `StreamedState` to report any data changes to the UI layer; -- Let `StreamedStateBuilder` manage the UI state for you. It will rebuild all its child widgets right after it detects any newly released data in the associated `StreamedState`. - -## Extra units - -The **Relation** package provides you not only with some basic components for common use cases, but with even more highly specialized classes for solving specific issues. - -### Extra StreamedActions - -#### ScrollOffsetActon - -You can use special `ScrollOffsetAction` to track the scroll offset of a scrollable widget. This is possible thanks to the built-in `ScrollController`. - -```dart -final scrollOffsetAction = ScrollOffsetAction(); - -scrollOffsetAction.stream.listen((offset) { - print("Current scroll offset = $offset"); -}); - -SingleChildScrollView( - controller: scrollOffsetAction.controller, -) -``` - -#### TextEditingActon - -`TextEditingAction` is a special type of **Action** that tracks text changes in the text field. The built-in `TextEditingController` makes it possible. - -```dart -final textEditingAction = TextEditingAction(); - -textEditingAction.stream.listen((text) { - print("Typed text = $text"); -}); - -TextField( - controller: textEditingAction.controller, - onChanged: textEditingAction, -), -``` - -#### ControllerActon - -`ControllerAction` is more common than the two previous variations. You can pass a [`ValueNotifier`](https://api.flutter.dev/flutter/foundation/ValueNotifier-class.html) inheritor during the `ControllerAction` instantiation. - -This means you can work with the `ClipboardStatusNotifier`, `TextEditingController` or `TransformationController` through the `ControllerAction`. - -### Extra StreamedStates - -#### EntityStreamedState + EntityStateBuilder - -`EntityStreamedState` is an extended version of `StreamedState` designed to make implementing typical dynamic data screens easier. - -Most screens in mobile applications are quite simple and usually have several typical states: - -- data; -- loading; -- error. - -`EntityStreamedState` provides you with a convenient interface for the data stream to handle these states properly. - -Create a `EntityStreamedState` class instance. It has the same abilities as `StreamedState`: the initial value setup and the specific data type declaration. Keep in mind that `EntityStreamedState` accepts an `EntityState` wrapper around your data rather than a raw part of your data. - -```dart -final userProfileState = EntityStreamedState(EntityState(isLoading: true)); -``` - -Now you can switch your `EntityStreamedState`'s state with just a simple function call. A typical workflow for a query providing some data would look like this: - -```dart -userProfileState.loading(); -try { - final result = await _loadUserProfile(); - userProfileState.content(result); -} on Exception catch (error) { - userProfileState.error(error); -} -``` - -But what do all these functions actually do? The answer is on the other side. By using `EntityStateBuilder` instead of just `StreamedStateBuilder` you can set widgets for all three states and switch between them easily. - -Pass `EntityStreamedState` instance to the `streamedState` argument first. After that, you can specify a set of widgets for displaying data (`child`), load state (`loadingChild`), and error state (`errorChild`). - -```dart -EntityStateBuilder( - streamedState: userProfileState, - builder: (ctx, data) => UserProfileWidget(data), - loadingChild: CircularProgressIndicator(), - errorChild: ErrorWidget('Something went wrong. Please, try again'), -), -``` - -Another way to deal with `EntityStateBuilder` is to use `loadingBuilder` and `errorBuilder`. This allows you to customize the error state widgets because you can account for the type of error and the last registered data value from the data stream received by the `errorBuilder`. The same with `loadingBuilder`. - -```dart -EntityStateBuilder( - streamedState: userProfileState, - builder: (ctx, data) => UserProfileWidget(data), - loadingBuilder: (context, data) { - return LoadingWidget(data); - }, - errorBuilder: (context, data, error) { - return ErrorWidget(error); - }, -), -``` - -To summarize, every time someone calls an `EntityStateBuilder`'s functions (`loading()`, `content()` or `error()`), the builder redraws its widget subtree and displays the state that corresponds to the last call. - -#### TextFieldStreamedState + TextFieldStateBuilder - -The idea behind `TextFieldStreamedState` and `TextFieldStateBuilder` is technically the same. The only difference is that `TextFieldStreamedState` is designed to work with text widgets (`Text`, `TextField`, etc.). - -`TextFieldStreamedState` allows you to set up your text field validation rules and some other settings, such as making the text field mandatory for the user to fill out. - -```dart -final textState = TextFieldStreamedState( - 'initialString', - validator: '[a-zA-Z]{3,30}', - canEdit: true, - incorrectTextMsg: 'Text is invalid', - mandatory: true, -); -``` - -`TextFieldStateBuilder` accepts the `TextFieldStreamedState` instance and allows to create text widgets according to all state properties. - -```dart -TextFieldStateBuilder( - state: textState, - stateBuilder: (context, textStateValue) { - return Text(textStateValue.data); - }, -), -``` - -## Installation - -Add `relation` to your `pubspec.yaml` file: - -```yaml -dependencies: - relation: ^2.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/relation/analysis_options.yaml b/packages/relation/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/relation/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/relation/dart_dependency_validator.yaml b/packages/relation/dart_dependency_validator.yaml deleted file mode 100644 index 71f4e3c68..000000000 --- a/packages/relation/dart_dependency_validator.yaml +++ /dev/null @@ -1,2 +0,0 @@ -exclude: - - "example/**" \ No newline at end of file diff --git a/packages/relation/doc/images/relation_action.png b/packages/relation/doc/images/relation_action.png deleted file mode 100644 index b390f742d..000000000 Binary files a/packages/relation/doc/images/relation_action.png and /dev/null differ diff --git a/packages/relation/doc/images/relation_state_management.png b/packages/relation/doc/images/relation_state_management.png deleted file mode 100644 index e288b6326..000000000 Binary files a/packages/relation/doc/images/relation_state_management.png and /dev/null differ diff --git a/packages/relation/doc/images/relation_streamed_state.png b/packages/relation/doc/images/relation_streamed_state.png deleted file mode 100644 index f62845780..000000000 Binary files a/packages/relation/doc/images/relation_streamed_state.png and /dev/null differ diff --git a/packages/relation/doc/images/relation_streamed_state_builder.png b/packages/relation/doc/images/relation_streamed_state_builder.png deleted file mode 100644 index e153fe880..000000000 Binary files a/packages/relation/doc/images/relation_streamed_state_builder.png and /dev/null differ diff --git a/packages/relation/example/.gitignore b/packages/relation/example/.gitignore deleted file mode 100644 index 10c16abd6..000000000 --- a/packages/relation/example/.gitignore +++ /dev/null @@ -1,74 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* -**/ios/Podfile - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/relation/example/.metadata b/packages/relation/example/.metadata deleted file mode 100644 index e0236519d..000000000 --- a/packages/relation/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 20e59316b8b8474554b38493b8ca888794b0234a - channel: stable - -project_type: app diff --git a/packages/relation/example/analysis_options.yaml b/packages/relation/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/relation/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/relation/example/android/app/build.gradle b/packages/relation/example/android/app/build.gradle deleted file mode 100644 index 47d5e31c7..000000000 --- a/packages/relation/example/android/app/build.gradle +++ /dev/null @@ -1,61 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.counter" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/packages/relation/example/android/app/src/debug/AndroidManifest.xml b/packages/relation/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index a091ca11a..000000000 --- a/packages/relation/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/relation/example/android/app/src/main/AndroidManifest.xml b/packages/relation/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index ad3f1f648..000000000 --- a/packages/relation/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/packages/relation/example/android/app/src/main/java/com/example/counter/MainActivity.java b/packages/relation/example/android/app/src/main/java/com/example/counter/MainActivity.java deleted file mode 100644 index 2aec4dccf..000000000 --- a/packages/relation/example/android/app/src/main/java/com/example/counter/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.counter; - -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } -} diff --git a/packages/relation/example/android/app/src/main/res/drawable/launch_background.xml b/packages/relation/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/relation/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/relation/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/relation/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/relation/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/relation/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/relation/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/relation/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/relation/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/relation/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/relation/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/relation/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/relation/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/relation/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/relation/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/relation/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/relation/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/relation/example/android/app/src/main/res/values/styles.xml b/packages/relation/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa4417c..000000000 --- a/packages/relation/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/relation/example/android/app/src/profile/AndroidManifest.xml b/packages/relation/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index a091ca11a..000000000 --- a/packages/relation/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/relation/example/android/build.gradle b/packages/relation/example/android/build.gradle deleted file mode 100644 index bb8a30389..000000000 --- a/packages/relation/example/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/relation/example/android/gradle.properties b/packages/relation/example/android/gradle.properties deleted file mode 100644 index 2bd6f4fda..000000000 --- a/packages/relation/example/android/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M - diff --git a/packages/relation/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/relation/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 2819f022f..000000000 --- a/packages/relation/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/packages/relation/example/android/settings.gradle b/packages/relation/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/relation/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/relation/example/ios/Flutter/AppFrameworkInfo.plist b/packages/relation/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/relation/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/relation/example/ios/Flutter/Debug.xcconfig b/packages/relation/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/relation/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/relation/example/ios/Flutter/Release.xcconfig b/packages/relation/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/relation/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/relation/example/ios/Runner.xcodeproj/project.pbxproj b/packages/relation/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index fa55581b7..000000000 --- a/packages/relation/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,497 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = S8QB4VV633; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/relation/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/relation/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/packages/relation/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/relation/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/relation/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/relation/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/relation/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/relation/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/relation/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/relation/example/ios/Runner/AppDelegate.h b/packages/relation/example/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bbf9..000000000 --- a/packages/relation/example/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/packages/relation/example/ios/Runner/AppDelegate.m b/packages/relation/example/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e90b..000000000 --- a/packages/relation/example/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index bd77dd655..000000000 --- a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 3d43d11e6..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index a91bfcd30..000000000 --- a/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "LaunchImage.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/relation/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/relation/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/relation/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/relation/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/relation/example/ios/Runner/Base.lproj/Main.storyboard b/packages/relation/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/relation/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/relation/example/ios/Runner/Info.plist b/packages/relation/example/ios/Runner/Info.plist deleted file mode 100644 index 235197370..000000000 --- a/packages/relation/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - counter - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/relation/example/ios/Runner/main.m b/packages/relation/example/ios/Runner/main.m deleted file mode 100644 index dff6597e4..000000000 --- a/packages/relation/example/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/packages/relation/example/lib/demo_relations.dart b/packages/relation/example/lib/demo_relations.dart deleted file mode 100644 index 20370ba94..000000000 --- a/packages/relation/example/lib/demo_relations.dart +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:relation/relation.dart'; - -// ignore_for_file: avoid-returning-widgets - -class DemoRelations extends StatefulWidget { - const DemoRelations({Key? key}) : super(key: key); - - @override - _DemoRelationsState createState() => _DemoRelationsState(); -} - -class _DemoRelationsState extends State { - final incrementAction = VoidAction(); - final incrementState = StreamedState(0); - - final reloadAction = VoidAction(); - final loadDataState = EntityStreamedState(); - - final textAction = TextEditingAction(); - - final scrollAction = ScrollOffsetAction(); - - @override - void initState() { - super.initState(); - incrementAction.stream.listen( - (_) => incrementState.accept(incrementState.value + 1), - ); - - reloadAction.stream.listen((_) => _load()); - - textAction.stream.listen((event) { - debugPrint('typed $event'); - }); - - scrollAction.stream.listen((event) { - debugPrint('scroll offset $event'); - }); - } - - Future _load() async { - await loadDataState.loading(); - final result = await Future.delayed( - const Duration(seconds: 2), - () => DateTime.now().second, - ); - await loadDataState.content(result); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Demo for relations'), - ), - body: SingleChildScrollView( - physics: const AlwaysScrollableScrollPhysics( - parent: BouncingScrollPhysics(), - ), - controller: scrollAction.controller, - child: Center( - child: Column( - children: [ - _buildDemo(), - _buildEntityDemo(), - TextField( - controller: textAction.controller, - onChanged: textAction, - ), - ], - ), - ), - ), - ); - } - - @override - void dispose() { - incrementState.dispose(); - loadDataState.dispose(); - super.dispose(); - } - - Widget _buildDemo() { - return Center( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 32.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - /// build state by StreamedState - StreamedStateBuilder( - streamedState: incrementState, - builder: (ctx, count) => Text('number of count: $count'), - ), - - const SizedBox(width: 32.0), - - /// button for increment - TextButton( - onPressed: incrementAction, - style: TextButton.styleFrom( - primary: Colors.black, - backgroundColor: Colors.red, - ), - child: const Text('increment'), - ), - ], - ), - ), - ); - } - - Widget _buildEntityDemo() { - return Center( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - /// build state by StreamedState - EntityStateBuilder( - streamedState: loadDataState, - builder: (ctx, data) => Text('success load: $data'), - loadingChild: const CircularProgressIndicator(), - errorChild: const Text('sorry - error, try again'), - ), - - const SizedBox(width: 32.0), - - /// button for increment - TextButton( - onPressed: reloadAction, - style: TextButton.styleFrom( - primary: Colors.black, - backgroundColor: Colors.red, - ), - child: const Text('reload'), - ), - ], - ), - ); - } -} diff --git a/packages/relation/example/lib/main.dart b/packages/relation/example/lib/main.dart deleted file mode 100644 index effb2a9b7..000000000 --- a/packages/relation/example/lib/main.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:counter/demo_relations.dart'; -import 'package:flutter/material.dart'; - -void main() { - runApp(const MaterialApp(home: DemoRelations())); -} diff --git a/packages/relation/example/pubspec.yaml b/packages/relation/example/pubspec.yaml deleted file mode 100644 index 37ec17619..000000000 --- a/packages/relation/example/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: counter -description: A new Flutter project. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - relation: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/relation/lib/relation.dart b/packages/relation/lib/relation.dart deleted file mode 100644 index ec5c93da2..000000000 --- a/packages/relation/lib/relation.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// builders -export 'package:relation/src/builder/entity_state_builder.dart'; -export 'package:relation/src/builder/streamed_state_builder.dart'; -export 'package:relation/src/builder/textfield_state_builder.dart'; -export 'package:relation/src/relation/action/actions/scroll_action.dart'; -export 'package:relation/src/relation/action/actions/text_editing_action.dart'; - -/// relations -export 'package:relation/src/relation/action/streamed_action.dart'; -export 'package:relation/src/relation/event.dart'; -export 'package:relation/src/relation/state/entity_state.dart'; -export 'package:relation/src/relation/state/streamed_state.dart'; diff --git a/packages/relation/lib/src/builder/entity_state_builder.dart b/packages/relation/lib/src/builder/entity_state_builder.dart deleted file mode 100644 index 89fecf476..000000000 --- a/packages/relation/lib/src/builder/entity_state_builder.dart +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart'; -import 'package:relation/src/relation/state/entity_state.dart'; - -typedef LoadingWidgetBuilder = Widget Function( - BuildContext context, - T? data, -); - -typedef DataWidgetBuilder = Widget Function(BuildContext context, T data); - -typedef ErrorWidgetBuilder = Widget Function( - BuildContext context, - Exception? e, -); - -typedef DataErrorWidgetBuilder = Widget Function( - BuildContext context, - T? data, - Exception? e, -); - -/// Reactive widget for [EntityStreamedState] -/// -/// [streamedState] - external stream that controls the state of the widget -/// widget has three states: -/// [builder] - content; -/// [loadingChild] - loading; -/// [errorChild] - error. -/// -/// Error builders priority order: -/// 1. [errorDataBuilder] -/// 2. [errorBuilder] -/// 3. [errorChild] -/// -/// ### example -/// ```dart -/// EntityStateBuilder( -/// streamedState: wm.dataState, -/// builder: (context, data) => DataWidget(data), -/// loadingChild: LoadingWidget(), -/// errorChild: ErrorPlaceholder(), -/// ); -/// ``` -class EntityStateBuilder extends StatelessWidget { - const EntityStateBuilder({ - required this.streamedState, - required this.builder, - this.loadingBuilder, - this.errorDataBuilder, - this.errorBuilder, - this.loadingChild = const SizedBox(), - this.errorChild = const SizedBox(), - Key? key, - }) : super(key: key); - - /// StreamedState of entity - final EntityStreamedState streamedState; - - /// WidgetBuilder for [streamedState]'s data - final DataWidgetBuilder builder; - - /// WidgetBuilder for empty data - final LoadingWidgetBuilder? loadingBuilder; - - /// WidgetBuilder for error with previous data - final DataErrorWidgetBuilder? errorDataBuilder; - - /// WidgetBuilder for error - final ErrorWidgetBuilder? errorBuilder; - - /// Loading child widget - final Widget loadingChild; - - /// Error child widget - final Widget errorChild; - - @override - Widget build(BuildContext context) { - //todo(maksimenko): replace with StreamedStateBuilder when not nullable StreamedStateBuilder is stable - return StreamBuilder>( - stream: streamedState.stream, - initialData: streamedState.value, - builder: (context, snapshot) { - final streamData = snapshot.data!; - if (streamData.isLoading) { - if (loadingBuilder != null) { - return loadingBuilder!(context, streamData.data); - } else { - return loadingChild; - } - } else if (streamData.hasError) { - if (errorDataBuilder != null) { - return errorDataBuilder!( - context, - streamData.data, - streamData.error, - ); - } else if (errorBuilder != null) { - return errorBuilder!(context, streamData.error); - } - } else if (streamData.data != null) { - return builder(context, streamData.data!); - } - - return errorChild; - }, - ); - } -} diff --git a/packages/relation/lib/src/builder/streamed_state_builder.dart b/packages/relation/lib/src/builder/streamed_state_builder.dart deleted file mode 100644 index 8db4239c0..000000000 --- a/packages/relation/lib/src/builder/streamed_state_builder.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart'; -import 'package:relation/src/relation/state/streamed_state.dart'; - -typedef StreamedStateWidgetBuilder = Widget Function( - BuildContext context, - T data, -); - -/// Widget for StreamedState. -class StreamedStateBuilder extends StreamBuilderBase { - StreamedStateBuilder({ - required this.streamedState, - required this.builder, - Key? key, - }) : super(key: key, stream: streamedState.stream); - - /// Input streamed state - final StreamedState streamedState; - - /// Builder of widget child - final StreamedStateWidgetBuilder builder; - - @override - T afterData(T current, T data) => data; - - @override - T initial() => streamedState.value; - - @override - Widget build(BuildContext context, T currentSummary) => - builder(context, currentSummary); -} diff --git a/packages/relation/lib/src/builder/textfield_state_builder.dart b/packages/relation/lib/src/builder/textfield_state_builder.dart deleted file mode 100644 index bbf73feae..000000000 --- a/packages/relation/lib/src/builder/textfield_state_builder.dart +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart'; -import 'package:relation/src/builder/streamed_state_builder.dart'; -import 'package:relation/src/relation/event.dart'; -import 'package:relation/src/relation/state/entity_state.dart'; -import 'package:relation/src/relation/state/streamed_state.dart'; - -/// Stream builder for text fields -class TextFieldStateBuilder extends StatelessWidget { - const TextFieldStateBuilder({ - required this.state, - required this.stateBuilder, - Key? key, - }) : super(key: key); - - /// State of text field - final TextFieldStreamedState state; - - /// Builder of state - final Widget Function(BuildContext, TextFieldState?) stateBuilder; - - @override - Widget build(BuildContext context) { - return StreamedStateBuilder( - streamedState: state, - builder: stateBuilder, - ); - } -} - -/// Text field state -/// can: -/// - loading -/// - error -/// - disable -/// - content -/// todo come up with how to combine with the controller -class TextFieldState extends EntityState { - /// Content constructor - TextFieldState.content(String data) - : isEnabled = true, - super.content(data); - - /// Error constructor - TextFieldState.error(String? data, [Exception? e]) - : isEnabled = true, - super.error(e, data); - - /// Loading constructor - TextFieldState.loading() - : isEnabled = false, - super.loading(''); - - /// Enabled constructor - TextFieldState.enabled(String? data, {bool enabled = true}) - : isEnabled = enabled, - super.content(data); - - /// Text field is enabled - final bool isEnabled; -} - -/// Stream view of text field state -/// For validations, it is possible to set restrictions such as [validator], -/// [mandatory], [canEdit] -class TextFieldStreamedState extends StreamedState - implements EntityEvent { - TextFieldStreamedState( - String initialData, { - String validator = '', - this.mandatory = false, - this.canEdit = true, - this.incorrectTextMsg = '', - }) : validator = RegExp(validator), - super(TextFieldState.enabled(initialData, enabled: canEdit)); - - /// Validator of regex - final RegExp validator; - - /// Is required for fill - final bool mandatory; - - /// is can edit text - final bool canEdit; - - /// Text of error - final String incorrectTextMsg; - - @override - Future content(String data) { - if (!validator.hasMatch(data) || (data.isEmpty && mandatory)) { - return accept( - TextFieldState.error( - data, - IncorrectTextException(incorrectTextMsg), - ), - ); - } else if (!canEdit) { - return accept(TextFieldState.enabled(value.data, enabled: canEdit)); - } else { - return accept(TextFieldState.content(data)); - } - } - - @override - Future error([Exception? error]) => - accept(TextFieldState.error(value.data, error)); - - @override - Future loading() => accept(TextFieldState.loading()); -} - -/// Exception of incorrect text wrapper -class IncorrectTextException implements Exception { - const IncorrectTextException(this.message); - - final String message; -} diff --git a/packages/relation/lib/src/relation/action/actions/scroll_action.dart b/packages/relation/lib/src/relation/action/actions/scroll_action.dart deleted file mode 100644 index 603db22f4..000000000 --- a/packages/relation/lib/src/relation/action/actions/scroll_action.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart' as flutter; -import 'package:relation/src/relation/action/streamed_action.dart'; - -/// Action for scroll -class ScrollOffsetAction extends StreamedAction { - ScrollOffsetAction({ - @Deprecated('Use subscription on stream instead. And handle changes in listener. Will be removed in next major version') - void Function(double data)? onChanged, - }) - // ignore: deprecated_member_use_from_same_package - : super(onChanged: onChanged) { - controller.addListener(() { - accept(controller.offset); - }); - } - - /// Scroll controller of some list - final flutter.ScrollController controller = flutter.ScrollController(); - - @override - Future dispose() { - controller.dispose(); - - return super.dispose(); - } -} diff --git a/packages/relation/lib/src/relation/action/actions/text_editing_action.dart b/packages/relation/lib/src/relation/action/actions/text_editing_action.dart deleted file mode 100644 index 3b299e47e..000000000 --- a/packages/relation/lib/src/relation/action/actions/text_editing_action.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart' as flutter; -import 'package:relation/src/relation/action/streamed_action.dart'; - -/// Action for text editing -class TextEditingAction extends StreamedAction { - TextEditingAction({ - @Deprecated('Use subscription on stream instead. And handle changes in listener. Will be removed in next major version') - void Function(String? data)? onChanged, - // ignore: deprecated_member_use_from_same_package - }) : super(onChanged: onChanged) { - controller.addListener(() { - accept(controller.value.text); - }); - } - - /// TextEditing controller of text field - final ExtendedTextEditingController controller = - ExtendedTextEditingController(); - - @override - Future dispose() { - controller.dispose(); - - return super.dispose(); - } -} - -/// When updating text through the setter, moves the cursor to the end of the -/// line -class ExtendedTextEditingController extends flutter.TextEditingController { - ExtendedTextEditingController({String? text}) : super(text: text); - - @override - set text(String newText) { - value = value.copyWith( - text: newText, - selection: flutter.TextSelection.collapsed(offset: newText.length), - composing: flutter.TextRange.empty, - ); - } -} diff --git a/packages/relation/lib/src/relation/action/streamed_action.dart b/packages/relation/lib/src/relation/action/streamed_action.dart deleted file mode 100644 index 32bbc2c58..000000000 --- a/packages/relation/lib/src/relation/action/streamed_action.dart +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:relation/src/relation/event.dart'; -import 'package:rxdart/rxdart.dart'; - -/// It's wrapper over an action on screen. -/// It may be a text changes, focus changes and so on. -/// -/// It is **reactive**. -/// -/// Usage: -/// ``` -/// SomeWidget( -/// onValueChanged: someAction, -/// ) -/// -/// someAction.action.listen(doSomething); -/// ``` -class StreamedAction implements Event { - /// [acceptUnique] - data will be accepted only if it's unique - StreamedAction({ - @Deprecated( - 'Use subscription on stream instead. And handle changes in listener. Will be removed in next major version', - ) - this.onChanged, - bool acceptUnique = false, - }) : _acceptUnique = acceptUnique; - - final bool _acceptUnique; - - /// Publish subject for updating actions - final _actionSubject = PublishSubject(); - - /// Callback for handling a new action - @Deprecated( - 'Use subscription on stream instead. And handle changes in listener. Will be removed in next major version', - ) - final void Function(T data)? onChanged; - - /// Data of action - T? _value; - - @Deprecated( - 'Accept value to StreamedState instead and use its getter value. Will be removed in next major version', - ) - T? get value => _value; - - @override - Stream get stream => _actionSubject.stream; - - @override - Future accept(T data) { - if (!_acceptUnique || _value != data) { - _value = data; - _actionSubject.add(data); - // ignore: deprecated_member_use_from_same_package - onChanged?.call(data); - } - return Future.value(); - } - - /// Call action - Future call(T data) => accept(data); - - /// Close stream - Future dispose() => _actionSubject.close(); -} - -/// It's wrapper over an void action on screen. -/// It may be a tap action -/// -/// It is **reactive**. -/// -/// Usage: -/// ``` -/// SomeWidget( -/// onTap: someAction, -/// ) -/// -/// someAction.action.listen(doSomething); -/// ``` -class VoidAction extends Event { - VoidAction(); - - /// Publish subject for updating actions - final _actionSubject = PublishSubject(); - - @override - Future accept(void data) { - _actionSubject.add(data); - return Future.value(); - } - - @override - Stream get stream => _actionSubject.stream; - - /// Call action - Future call() => accept(null); - - /// Close stream - Future dispose() => _actionSubject.close(); -} diff --git a/packages/relation/lib/src/relation/event.dart b/packages/relation/lib/src/relation/event.dart deleted file mode 100644 index 42c0189e0..000000000 --- a/packages/relation/lib/src/relation/event.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// An event that can take some value -abstract class Event { - const Event(); - - /// The stream to which the event is transmitted - Stream get stream; - - /// Acceptance of a new event - Future accept(T data); -} - -/// An event that has multiple States -abstract class EntityEvent { - const EntityEvent(); - - /// Acceptance of a new entity event - Future content(T data); - - /// Setting the event data is loading - Future loading(); - - /// Setting the event data is error - Future error([Exception? error]); -} diff --git a/packages/relation/lib/src/relation/state/entity_state.dart b/packages/relation/lib/src/relation/state/entity_state.dart deleted file mode 100644 index 835ee8966..000000000 --- a/packages/relation/lib/src/relation/state/entity_state.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:relation/src/relation/event.dart'; -import 'package:relation/src/relation/state/streamed_state.dart'; - -///[StreamedState] that have download/error/content status -class EntityStreamedState extends StreamedState> - implements EntityEvent> { - EntityStreamedState([EntityState? initialData]) - : super(initialData ?? EntityState()); - - @Deprecated('Better use other subjects or streams') - // ignore: deprecated_member_use_from_same_package - EntityStreamedState.from(Stream> stream) : super.from(stream); - - @override - Future content(T data) => super.accept(EntityState.content(data)); - - @override - Future error([Exception? exception, T? data]) => - super.accept(EntityState.error(exception, data)); - - @override - Future loading([T? previousData]) => - super.accept(EntityState.loading(previousData)); -} - -/// State of some logical entity -class EntityState { - /// Data of entity - final T? data; - - /// State is loading - final bool isLoading; - - /// State has error - final bool hasError; - - /// Exception from state - final Exception? error; - - const EntityState({ - this.data, - this.isLoading = false, - this.hasError = false, - this.error, - }); - - /// Loading constructor - const EntityState.loading([this.data]) - : isLoading = true, - hasError = false, - error = null; - - /// Error constructor - const EntityState.error([this.error, this.data]) - : isLoading = false, - hasError = true; - - /// Content constructor - const EntityState.content(this.data) - : isLoading = false, - hasError = false, - error = null; -} diff --git a/packages/relation/lib/src/relation/state/streamed_state.dart b/packages/relation/lib/src/relation/state/streamed_state.dart deleted file mode 100644 index fa18a0740..000000000 --- a/packages/relation/lib/src/relation/state/streamed_state.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:relation/src/relation/event.dart'; -import 'package:rxdart/rxdart.dart'; - -/// A state of some type wrapped in a stream -/// dictates the widget's state -/// -/// It is **reactive**. -/// -/// Usage: -/// ``` -/// StreamedStateBuilder( -/// streamedState: yourStreamedState, -/// builder: (ctx, data) => Text(data.toString()), -/// ) -/// ``` -class StreamedState implements Event { - StreamedState(T initialData) - : _stateSubject = BehaviorSubject.seeded(initialData); - - @Deprecated('Better use other subjects or streams') - StreamedState.from(Stream stream) : _stateSubject = BehaviorSubject() { - _stateSubject.addStream(stream); - } - - /// Behavior state for updating events - final BehaviorSubject _stateSubject; - - /// Current value of stream - T get value => _stateSubject.value; - - @override - Stream get stream => _stateSubject.stream; - - @override - Future accept(T data) { - _stateSubject.add(data); - return Future.value(); - } - - /// Accepts new [data] if current [value] is not equal to [data] - Future acceptUnique(T data) { - if (value != data) { - accept(data); - } - return Future.value(); - } - - void dispose() { - _stateSubject.close(); - } -} diff --git a/packages/relation/pubspec.yaml b/packages/relation/pubspec.yaml deleted file mode 100644 index f736dee60..000000000 --- a/packages/relation/pubspec.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: relation -version: 3.1.0 -description: the stream representation of the relations of the entities and widget utilities -homepage: "https://github.com/surfstudio/SurfGear/tree/main/packages/relation" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - rxdart: ^0.27.0 - -dev_dependencies: - flutter_test: - sdk: flutter - pedantic: ^1.11.0 - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=2.2.0" - -flutter: diff --git a/packages/relation/test/builder/entity_state_builder_test.dart b/packages/relation/test/builder/entity_state_builder_test.dart deleted file mode 100644 index ad32fd44c..000000000 --- a/packages/relation/test/builder/entity_state_builder_test.dart +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:pedantic/pedantic.dart'; -import 'package:relation/relation.dart'; - -void main() { - testWidgets('EntityStateBuilder accept test', (tester) async { - final testData = - EntityStreamedState(const EntityState(data: 'test')); - - final streamedStateBuilder = EntityStateBuilder( - streamedState: testData, - builder: (context, data) { - return Text(data); - }, - ); - - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: streamedStateBuilder, - ), - ), - ); - final testFinder = find.text('test'); - expect(testFinder, findsOneWidget); - }); - - testWidgets('EntityStateBuilder error test', (tester) async { - final testData = EntityStreamedState(); - final streamedStateBuilder = EntityStateBuilder( - streamedState: testData, - builder: (context, data) { - return const Text('test'); - }, - errorChild: const Text('error_text'), - ); - - unawaited(testData.error(Exception())); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: streamedStateBuilder, - ), - ), - ); - - final errorFinder = find.text('error_text'); - expect(errorFinder, findsOneWidget); - }); - - testWidgets('EntityStateBuilder loading test', (tester) async { - final testData = EntityStreamedState(); - final streamedStateBuilder = EntityStateBuilder( - streamedState: testData, - builder: (context, data) { - return const Text('test'); - }, - loadingChild: const Text('loading_child'), - ); - - unawaited(testData.loading()); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: streamedStateBuilder, - ), - ), - ); - - final loadingFinder = find.text('loading_child'); - expect(loadingFinder, findsOneWidget); - }); - - testWidgets('EntityStateBuilder with loadingBuilder', (tester) async { - final testData = EntityStreamedState(); - final streamedStateBuilder = EntityStateBuilder( - streamedState: testData, - builder: (context, data) { - return const Text('test'); - }, - loadingBuilder: (context, data) => const Text('loadingBuilder'), - ); - - unawaited(testData.loading()); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: streamedStateBuilder, - ), - ), - ); - - final loadingBuilderFinder = find.text('loadingBuilder'); - expect(loadingBuilderFinder, findsOneWidget); - }); - - testWidgets('EntityStateBuilder with errorChild', (tester) async { - final testData = EntityStreamedState(); - final streamedStateBuilder = EntityStateBuilder( - streamedState: testData, - builder: (context, data) { - return const Text('test'); - }, - errorChild: const Text('errorChild'), - ); - - unawaited(testData.error()); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: streamedStateBuilder, - ), - ), - ); - - final loadingBuilderFinder = find.text('errorChild'); - expect(loadingBuilderFinder, findsOneWidget); - }); - - testWidgets('EntityStateBuilder with errorBuilder', (tester) async { - final testData = EntityStreamedState(); - final streamedStateBuilder = EntityStateBuilder( - streamedState: testData, - builder: (context, data) { - return const Text('test'); - }, - errorBuilder: (context, e) => const Text('errorBuilder'), - ); - - unawaited(testData.error()); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: streamedStateBuilder, - ), - ), - ); - - final loadingBuilderFinder = find.text('errorBuilder'); - expect(loadingBuilderFinder, findsOneWidget); - }); - - testWidgets('EntityStateBuilder with errorDataBuilder passing data', - (tester) async { - final testData = EntityStreamedState(); - final streamedStateBuilder = EntityStateBuilder( - streamedState: testData, - builder: (context, data) { - return const Text('test'); - }, - errorDataBuilder: (context, data, error) => - Text('errorDataBuilder $data'), - ); - - unawaited(testData.error(Exception(), 'data')); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: streamedStateBuilder, - ), - ), - ); - - final loadingBuilderFinder = find.text('errorDataBuilder data'); - expect(loadingBuilderFinder, findsOneWidget); - }); - - group('EntityStateBuilder order:', () { - testWidgets('errorDataBuilder has hightest priority', (tester) async { - final testData = EntityStreamedState(); - final streamedStateBuilder = EntityStateBuilder( - streamedState: testData, - builder: (context, data) { - return const Text('test'); - }, - errorChild: const Text('errorChild'), - errorBuilder: (context, error) => const Text('errorBuilder'), - errorDataBuilder: ( - context, - data, - error, - ) => - Text('errorDataBuilder $data'), - ); - - unawaited(testData.error(Exception(), 'data')); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: streamedStateBuilder, - ), - ), - ); - - final loadingBuilderFinder = find.text('errorDataBuilder data'); - expect(loadingBuilderFinder, findsOneWidget); - }); - testWidgets('errorBuilder has medium priority', (tester) async { - final testData = EntityStreamedState(); - final streamedStateBuilder = EntityStateBuilder( - streamedState: testData, - builder: (context, data) { - return const Text('test'); - }, - errorChild: const Text('errorChild'), - errorBuilder: (context, error) => const Text('errorBuilder'), - ); - - unawaited(testData.error(Exception(), 'data')); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: streamedStateBuilder, - ), - ), - ); - - final loadingBuilderFinder = find.text('errorBuilder'); - expect(loadingBuilderFinder, findsOneWidget); - }); - - testWidgets('errorBuilder has lowest priority', (tester) async { - final testData = EntityStreamedState(); - final streamedStateBuilder = EntityStateBuilder( - streamedState: testData, - builder: (context, data) { - return const Text('test'); - }, - errorChild: const Text('errorChild'), - ); - - unawaited(testData.error(Exception(), 'data')); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: streamedStateBuilder, - ), - ), - ); - - final loadingBuilderFinder = find.text('errorChild'); - expect(loadingBuilderFinder, findsOneWidget); - }); - }); -} diff --git a/packages/relation/test/builder/streamed_state_builder_test.dart b/packages/relation/test/builder/streamed_state_builder_test.dart deleted file mode 100644 index de6a53d9e..000000000 --- a/packages/relation/test/builder/streamed_state_builder_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:relation/relation.dart'; - -import '../test_utils.dart'; - -const _testNotNullString = 'test'; -const _defaultString = 'def'; - -void main() { - testWidgets('StreamedStateBuilder nullable test', (tester) async { - final testStreamedState = StreamedState(null); - final streamedStateBuilder = StreamedStateBuilder( - streamedState: testStreamedState, - builder: (context, data) { - return Text(data ?? _defaultString); - }, - ); - await tester.pumpWidget(makeTestableWidget(streamedStateBuilder)); - expect(find.text(_defaultString), findsOneWidget); - await testStreamedState.accept(_testNotNullString); - await tester.pump(); - expect(find.text(_testNotNullString), findsOneWidget); - }); - - testWidgets('StreamedStateBuilder not nullable test', (tester) async { - final testStreamedState = StreamedState(0); - final streamedStateBuilder = StreamedStateBuilder( - streamedState: testStreamedState, - builder: (context, data) { - return Text(data.toString()); - }, - ); - await tester.pumpWidget(makeTestableWidget(streamedStateBuilder)); - expect(find.text(0.toString()), findsOneWidget); - await testStreamedState.accept(1); - await tester.pump(); - expect(find.text(1.toString()), findsOneWidget); - }); -} diff --git a/packages/relation/test/builder/textfield_state_builder_test.dart b/packages/relation/test/builder/textfield_state_builder_test.dart deleted file mode 100644 index b0f55de7c..000000000 --- a/packages/relation/test/builder/textfield_state_builder_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:pedantic/pedantic.dart'; -import 'package:relation/relation.dart'; - -void main() { - testWidgets( - 'TextfieldStreamBuilder content test', - (tester) async { - final testData = TextFieldStreamedState('test'); - final textFieldStateBuilder = TextFieldStateBuilder( - state: testData, - stateBuilder: (context, data) { - return const Text('test'); - }, - ); - - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: textFieldStateBuilder, - ), - ), - ); - - final textFinder = find.text('test'); - expect(textFinder, findsOneWidget); - }, - ); - - testWidgets( - 'TextfieldStreamBuilder error test', - (tester) async { - final testData = TextFieldStreamedState('test'); - - final textFieldStateBuilder = TextFieldStateBuilder( - state: testData, - stateBuilder: (context, data) { - if (data != null && data.hasError) { - return const Text('error'); - } - return const Text('test'); - }, - ); - - unawaited(testData.error()); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: textFieldStateBuilder, - ), - ), - ); - - final textFinder = find.text('error'); - expect(textFinder, findsOneWidget); - }, - ); - - testWidgets( - 'TextfieldStreamBuilder loading test', - (tester) async { - final testData = TextFieldStreamedState('test'); - - final textFieldStateBuilder = TextFieldStateBuilder( - state: testData, - stateBuilder: (context, data) { - if (data != null && data.isLoading) { - return const Text('loading'); - } - return const Text('test'); - }, - ); - - unawaited(testData.loading()); - await tester.pumpWidget( - MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - body: textFieldStateBuilder, - ), - ), - ); - - final textFinder = find.text('loading'); - expect(textFinder, findsOneWidget); - }, - ); -} diff --git a/packages/relation/test/relation/actions/scroll_offset_streamed_action_test.dart b/packages/relation/test/relation/actions/scroll_offset_streamed_action_test.dart deleted file mode 100644 index bce30af1c..000000000 --- a/packages/relation/test/relation/actions/scroll_offset_streamed_action_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:relation/relation.dart'; -import 'package:rxdart/subjects.dart'; - -void main() { - testWidgets( - 'ScrollOffsetAction test', - (tester) async { - // ignore: deprecated_member_use_from_same_package - final action = ScrollOffsetAction(onChanged: (data) { - expect(data, equals(1.0)); - }); - - await tester.pumpWidget(MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - appBar: AppBar( - title: const Text('test'), - ), - body: ListView( - controller: action.controller, - children: const [ - Text('test'), - Text('test'), - Text('test'), - ], - ), - ), - )); - - action.controller.jumpTo(1.0); - }, - ); - - testWidgets( - 'ScrollOffsetAction dispose test', - (tester) async { - final action = ScrollOffsetAction(); - - await tester.pumpWidget(MaterialApp( - title: 'Flutter Demo', - home: Scaffold( - appBar: AppBar( - title: const Text('test'), - ), - body: ListView( - controller: action.controller, - children: const [ - Text('test'), - Text('test'), - Text('test'), - ], - ), - ), - )); - - await action.dispose(); - expect((action.stream as Subject).isClosed, isTrue); - }, - ); -} diff --git a/packages/relation/test/relation/actions/streamed_action_test.dart b/packages/relation/test/relation/actions/streamed_action_test.dart deleted file mode 100644 index 0e317a8a0..000000000 --- a/packages/relation/test/relation/actions/streamed_action_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter_test/flutter_test.dart'; -import 'package:relation/src/relation/action/streamed_action.dart'; - -void main() { - test('accept test', () { - final action = StreamedAction(); - - action.stream.listen((event) { - expect(event, equals('test')); - }); - - action.accept('test'); - }); - - test('acceptUnique test', () async { - final action = StreamedAction(acceptUnique: true); - final result = []; - - action.stream.listen(result.add); - - await action.accept('test'); - await action.accept('test'); - - expect(result, equals(['test'])); - }); - - test('call test', () { - final action = StreamedAction(); - - action.stream.listen((event) { - expect(event, equals('test')); - }); - - action.call('test'); - }); - - test('dispose test', () { - final streamedState = StreamedAction()..dispose(); - expectLater(streamedState.stream, emitsDone); - }); -} diff --git a/packages/relation/test/relation/actions/text_editing_streamed_action_test.dart b/packages/relation/test/relation/actions/text_editing_streamed_action_test.dart deleted file mode 100644 index 88fded60c..000000000 --- a/packages/relation/test/relation/actions/text_editing_streamed_action_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart' hide TextEditingAction; -import 'package:flutter_test/flutter_test.dart'; -import 'package:relation/relation.dart'; -import 'package:rxdart/rxdart.dart'; - -void main() { - test('TextEditingAction test', () { - final action = TextEditingAction( - // ignore: deprecated_member_use_from_same_package - onChanged: (data) { - expect(data, equals('test')); - }, - ); - action.controller.text = 'test'; - }); - - test('TextEditingAction dispose test', () { - final action = TextEditingAction()..dispose(); - expect((action.stream as Subject).isClosed, isTrue); - }); - - test('ExtendedTextEditingController setText({String text}) test', () { - final TextEditingController controller = ExtendedTextEditingController() - ..text = 'test'; - expect(controller.value.text, 'test'); - expect( - controller.selection, - const TextSelection.collapsed(offset: 'test'.length), - ); - expect(controller.value.composing, TextRange.empty); - }); -} diff --git a/packages/relation/test/relation/states/entity_streamed_state_test.dart b/packages/relation/test/relation/states/entity_streamed_state_test.dart deleted file mode 100644 index c38730715..000000000 --- a/packages/relation/test/relation/states/entity_streamed_state_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter_test/flutter_test.dart'; -import 'package:relation/relation.dart'; - -void main() { - test('EntityStreamedState content test', () async { - final entityStreamedState = EntityStreamedState(); - final result = >[]; - entityStreamedState.stream.listen(result.add); - await entityStreamedState.content('test'); - expect(result.map((state) => state.data).toList(), equals([null, 'test'])); - }); - - test('EntityStreamedState error test', () async { - final entityStreamedState = EntityStreamedState(); - final result = >[]; - entityStreamedState.stream.listen(result.add); - await entityStreamedState.error(Exception()); - expect( - result.map((state) => state.error).toList(), - equals([null, isException]), - ); - }); - - test('EntityStreamedState loading test isLoading value is correct', () async { - final entityStreamedState = EntityStreamedState(); - final result = >[]; - entityStreamedState.stream.listen(result.add); - await entityStreamedState.loading(); - expect( - result.map((state) => state.isLoading).toList(), - equals([false, true]), - ); - }); - - test('EntityStreamedState fromStream test', () async { - final testIterable = [1, 2, 3].map((value) => EntityState.content(value)); - final entityStreamedState = - // ignore: deprecated_member_use_from_same_package - EntityStreamedState.from(Stream.fromIterable(testIterable)); - final result = >[]; - entityStreamedState.stream.listen(result.add); - await Future.delayed(Duration.zero); - Map, EntityState>.fromIterables(result, testIterable) - .forEach((key, value) => expect(key.data, value.data)); - }); -} diff --git a/packages/relation/test/relation/states/streamed_state_test.dart b/packages/relation/test/relation/states/streamed_state_test.dart deleted file mode 100644 index 88a044224..000000000 --- a/packages/relation/test/relation/states/streamed_state_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter_test/flutter_test.dart'; -import 'package:relation/src/relation/state/streamed_state.dart'; - -void main() { - test('not nullable StreamedState value getter test', () { - final streamedState = StreamedState('a'); - expect(streamedState.value, equals('a')); - streamedState.accept('b'); - expect(streamedState.value, equals('b')); - }); - test('nullable StreamedState value getter test', () { - final streamedState = StreamedState(null); - expect(streamedState.value, isNull); - streamedState.accept('b'); - expect(streamedState.value, equals('b')); - }); - test('StreamedState accept test', () async { - final streamedState = StreamedState('a'); - final result = []; - - streamedState.stream.listen(result.add); - await streamedState.accept('a'); - await streamedState.accept('b'); - expect(result, equals(['a', 'a', 'b'])); - }); - - test('StreamedState accept test with initial null', () async { - final streamedState = StreamedState(null); - final result = []; - - streamedState.stream.listen(result.add); - await streamedState.accept('a'); - await streamedState.accept('b'); - expect(result, equals([null, 'a', 'b'])); - }); - - test('StreamedState acceptUnique test', () async { - final result = []; - - final streamedState = StreamedState('initial'); - streamedState.stream.listen(result.add); - - await streamedState.acceptUnique('a'); - await streamedState.acceptUnique('a'); - await streamedState.acceptUnique('b'); - await streamedState.acceptUnique('b'); - expect(result, equals(['initial', 'a', 'b'])); - }); - - test('StreamedState dispose test', () { - final streamedState = StreamedState('initial')..dispose(); - expectLater( - streamedState.stream, - emitsInOrder(['initial', emitsDone]), - ); - }); -} diff --git a/packages/relation/test/relation/states/text_field_streamed_state_test.dart b/packages/relation/test/relation/states/text_field_streamed_state_test.dart deleted file mode 100644 index 682c2c39b..000000000 --- a/packages/relation/test/relation/states/text_field_streamed_state_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:relation/relation.dart'; - -void main() { - test('TextFieldStreamedState accepts error if form is not valid', () async { - final entityStreamedState = TextFieldStreamedState('', validator: 'txt'); - await entityStreamedState.content('text'); - expect(entityStreamedState.value.hasError, isTrue); - }); - test('TextFieldStreamedState accepts content if form is valid', () async { - final entityStreamedState = TextFieldStreamedState('', validator: 'text'); - await entityStreamedState.content('text'); - expect(entityStreamedState.value.hasError, isFalse); - expect(entityStreamedState.value.data, 'text'); - }); - test( - 'TextFieldStreamedState accepts error if data isEmpty and mandatory', - () async { - final entityStreamedState = - TextFieldStreamedState('', validator: 'text', mandatory: true); - - await entityStreamedState.content('text'); - await entityStreamedState.content(''); - expect(entityStreamedState.value.hasError, isTrue); - }, - ); -} diff --git a/packages/relation/test/test_utils.dart b/packages/relation/test/test_utils.dart deleted file mode 100644 index cc35cb87e..000000000 --- a/packages/relation/test/test_utils.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'package:flutter/material.dart'; - -Widget makeTestableWidget(Widget widget) { - return MaterialApp(home: Scaffold(body: widget)); -} diff --git a/packages/render_metrics/.gitignore b/packages/render_metrics/.gitignore deleted file mode 100644 index bb431f0d5..000000000 --- a/packages/render_metrics/.gitignore +++ /dev/null @@ -1,75 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Flutter.podspec -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/render_metrics/.metadata b/packages/render_metrics/.metadata deleted file mode 100644 index 1b5cec022..000000000 --- a/packages/render_metrics/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 27321ebbad34b0a3fafe99fac037102196d655ff - channel: stable - -project_type: app diff --git a/packages/render_metrics/CHANGELOG.md b/packages/render_metrics/CHANGELOG.md deleted file mode 100644 index a7f055697..000000000 --- a/packages/render_metrics/CHANGELOG.md +++ /dev/null @@ -1,27 +0,0 @@ -# Changelog - -## 2.0.1 - 2021-05-30 - -* Stable release - -## 2.0.1-dev.1 - 2021-05-25 - -* Apply new lint rules. - -## 2.0.0 - -* Migrate this package to null safety. - -## 1.0.1-dev.4 - -* Fix lint hints - -## 1.0.0 - -* Add `RenderData` class with widget metrics -* Add `ComparisonDiff` class with the difference between two `RenderData` -* Add `CoordsMetrics` class with x and y coordinates -* Add class `RenderManager` -* Add class `RenderParametersManager` -* Add class `RenderMetricsObject` -* Add class `RenderMetricsBox` diff --git a/packages/render_metrics/LICENSE b/packages/render_metrics/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/render_metrics/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/render_metrics/README.md b/packages/render_metrics/README.md deleted file mode 100644 index 4867f97b1..000000000 --- a/packages/render_metrics/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# Render Metrics - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/render_metrics) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=render_metrics&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/render_metrics?logo=dart&logoColor=white)](https://pub.dev/packages/render_metrics) -[![Pub Likes](https://badgen.net/pub/likes/render_metrics)](https://pub.dev/packages/render_metrics) -[![Pub popularity](https://badgen.net/pub/popularity/render_metrics)](https://pub.dev/packages/render_metrics/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/render_metrics) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru/). - -[![SurfGear](https://i.ibb.co/wpPb5N5/render-metrics-logo.png)](https://github.com/surfstudio/SurfGear) - -## About - -This package helps retrieve the current positioning coordinates of any widget in a widgets tree in your Flutter application. - -## Currently supported features - -- Retrieve the full set of positioning coordinates of the desired widget at any time; -- Calculate the difference in positioning between two widgets and use it the way you need. - -## Usage - -### Getting widget's coordinates - -Instantiate `RenderParametersManager` object. You can set a special type for the widget's unique identifier or leave it `dynamic`. - -```dart -final renderManager = RenderParametersManager(); -``` - -Wrap the desired widget in a `RenderMetricsObject`. The `id` parameter is the widget’s unique identifier. - -```dart -RenderMetricsObject( - id: "uniqueWidgetId", - manager: renderManager, - child: Container( - ... - ), -), -``` - -Get a bundle with the positioning coordinates of the wrapped widget. - -```dart -RenderData data = renderManager.getRenderData("uniqueWidgetId"); -``` - -### Calculating the difference in positioning between two widgets - -Wrap the widgets you want to compare in `RenderMetricsObject`s. Specify two different `id`s for each of them. Please note, that the `manager` parameter of both widgets should contain the link to the same `RenderParametersManager` instance. - -```dart -RenderMetricsObject( - id: "rowWidgetId", - manager: renderManager, - child: Row( - ... - ), -), -RenderMetricsObject( - id: "columnWidgetId", - manager: renderManager, - child: Column( - ... - ), -), -``` - -Specify two unique widget identifiers when using the `getDiffById()` function and extract a bundle with the relative difference in positioning coordinates between the widgets. - -```dart -ComparisonDiff diff = - renderManager.getDiffById("rowWidgetId", "columnWidgetId"); -``` - -## What metrics can I get? - -### RenderData - -`RenderData` instance contains a complete set of properties that characterize any widget in a two-dimensional space. - -All metrics positioning coordinates are global, meaning they are relative to the entire screen coordinate space. - -![RenderData](https://i.ibb.co/KbTvkB9/render-data-1.png) - -`RenderData` also provides you an ability to get all widget keypoint XY-coordinates by calling one of special getters. - -![RenderData](https://i.ibb.co/xHmtBnH/render-data-2.png) - -### ComparisonDiff - -You can get the comparison relative results for each widget keypoint from the `ComparisonDiff` instance. - -An additional set of special getters can help you calculate the difference between two adjacent sides of two different widgets (e.g. right to left, top to bottom, etc.). - -![RenderData](https://i.ibb.co/sb5W99K/render-diff.png) - -## Installation - -Add Render Metrics to your `pubspec.yaml` file: - -```yaml -dependencies: - render_metrics: version -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/render_metrics/analysis_options.yaml b/packages/render_metrics/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/render_metrics/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/render_metrics/docs/images/render_data_1.png b/packages/render_metrics/docs/images/render_data_1.png deleted file mode 100644 index f8d45dc45..000000000 Binary files a/packages/render_metrics/docs/images/render_data_1.png and /dev/null differ diff --git a/packages/render_metrics/docs/images/render_data_2.png b/packages/render_metrics/docs/images/render_data_2.png deleted file mode 100644 index b46e83544..000000000 Binary files a/packages/render_metrics/docs/images/render_data_2.png and /dev/null differ diff --git a/packages/render_metrics/docs/images/render_diff.png b/packages/render_metrics/docs/images/render_diff.png deleted file mode 100644 index 39745910b..000000000 Binary files a/packages/render_metrics/docs/images/render_diff.png and /dev/null differ diff --git a/packages/render_metrics/example/.gitignore b/packages/render_metrics/example/.gitignore deleted file mode 100644 index d3bedc7c5..000000000 --- a/packages/render_metrics/example/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ - -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -*.swp -profile - -DerivedData/ - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -build/ -.android/ -.ios/ -.flutter-plugins -.flutter-plugins-dependencies -**/ios/Podfile \ No newline at end of file diff --git a/packages/render_metrics/example/.metadata b/packages/render_metrics/example/.metadata deleted file mode 100644 index 51f0eb649..000000000 --- a/packages/render_metrics/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 27321ebbad34b0a3fafe99fac037102196d655ff - channel: stable - -project_type: module diff --git a/packages/render_metrics/example/analysis_options.yaml b/packages/render_metrics/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/render_metrics/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/render_metrics/example/lib/main.dart b/packages/render_metrics/example/lib/main.dart deleted file mode 100644 index 1db91de0f..000000000 --- a/packages/render_metrics/example/lib/main.dart +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:render_metrics/render_metrics.dart'; - -// ignore_for_file: avoid-returning-widgets - -void main() => runApp(const MyApp()); - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Render Metrics Example', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: const MyHomePage(title: 'Auto reload Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({ - required this.title, - Key? key, - }) : super(key: key); - - final String title; - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - final renderManager = RenderParametersManager(); - - final String _text0Id = 'text0Id'; - final String _text1Id = 'text1Id'; - final String _containerPositionedId = 'containerPositionedId'; - final String _textBlockId = 'textBlockId'; - - final _scrollController = ScrollController(); - - bool _isOpacity = false; - - String _text0 = ''; - - @override - void initState() { - super.initState(); - _scrollController.addListener(_scrollListener); - WidgetsBinding.instance?.addPostFrameCallback((_) { - setState(() {}); - }); - } - - void _scrollListener() { - setState(() { - _text0 = _getRenderDataText(_text0Id); - }); - - final diff = renderManager.getDiffById( - _containerPositionedId, - _textBlockId, - ); - - if (diff != null) { - _changeBlockUi((diff.diffBottomToTop) > 0); - } - } - - void _changeBlockUi(bool isChange) { - if (_isOpacity == isChange) return; - setState(() { - _isOpacity = isChange; - }); - } - - @override - void dispose() { - _scrollController.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), - body: Stack( - children: [ - ListView( - controller: _scrollController, - children: [ - const SizedBox(height: 500), - RenderMetricsObject( - id: _textBlockId, - manager: renderManager, - // ignore: avoid_annotating_with_dynamic - onMount: (dynamic id, box) { - // Method called when creating a RenderObject - // id - passed id (In this case, the string from _textBlockId) - // box - renderMetricsBox instance from which data is taken - }, - // ignore: avoid_annotating_with_dynamic - onUnMount: (dynamic box) { - // Method called when RenderObject is removed from the tree - // box - renderMetricsBox instance from which data is taken - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - RenderMetricsObject( - id: _text1Id, - manager: renderManager, - child: _buildTextContainer( - 'Diff metrics between the current and the blue square:' - '\n\n' - // ignore: lines_longer_than_80_chars - '${renderManager.getDiffById(_text1Id, _containerPositionedId) ?? ''}', - ), - ), - const SizedBox(height: 20), - RenderMetricsObject( - id: _text0Id, - manager: renderManager, - child: _buildTextContainer( - 'Metrics:\n\n$_text0', - ), - ), - const SizedBox(height: 1500), - ], - ), - ), - ], - ), - Positioned( - top: 50, - left: 10, - child: _buildBox(), - ), - ], - ), - ); - } - - Widget _buildBox() { - return RenderMetricsObject( - id: _containerPositionedId, - manager: renderManager, - child: AnimatedOpacity( - duration: const Duration(milliseconds: 250), - opacity: _isOpacity ? .5 : 1, - child: Container( - width: 300, - height: 210, - color: Colors.blue, - child: Padding( - padding: const EdgeInsets.all(10), - child: Text( - 'Blue Container() widget metrics:' - '\n\n' - '${_getRenderDataText(_containerPositionedId)}', - style: const TextStyle(color: Colors.white), - ), - ), - ), - ), - ); - } - - Widget _buildTextContainer(String text) { - return Container( - color: Colors.black.withOpacity(.2), - child: Padding( - padding: const EdgeInsets.all(10), - child: Text( - text, - ), - ), - ); - } - - String _getRenderDataText(T id) { - final data = renderManager.getRenderData(id); - if (data == null) return ''; - return data.toString(); - } -} diff --git a/packages/render_metrics/example/pubspec.yaml b/packages/render_metrics/example/pubspec.yaml deleted file mode 100644 index d4fb11f68..000000000 --- a/packages/render_metrics/example/pubspec.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: example -description: A new Flutter module. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - render_metrics: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true - module: - androidX: false - androidPackage: rendermetrics.example - iosBundleIdentifier: rendermetrics.example diff --git a/packages/render_metrics/lib/render_metrics.dart b/packages/render_metrics/lib/render_metrics.dart deleted file mode 100644 index 9c5035d81..000000000 --- a/packages/render_metrics/lib/render_metrics.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -library render_metrics; - -export 'package:render_metrics/src/data/comparison_diff.dart'; -export 'package:render_metrics/src/data/render_data.dart'; -export 'package:render_metrics/src/manager/render_manager.dart'; -export 'package:render_metrics/src/manager/render_parameters_manager.dart'; -export 'package:render_metrics/src/render/render_metrics.dart'; diff --git a/packages/render_metrics/lib/src/data/comparison_diff.dart b/packages/render_metrics/lib/src/data/comparison_diff.dart deleted file mode 100644 index c4087e134..000000000 --- a/packages/render_metrics/lib/src/data/comparison_diff.dart +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:render_metrics/src/data/coords_metrics.dart'; - -/// An object with data on the difference of render metrics between two objects -/// `RenderData` -/// -/// [yTop] - difference of the upper Y position relative to the screen -/// [yBottom] - difference of the lower Y position relative to the screen -/// [yCenter] - difference of the central Y position relative to the screen -/// [xLeft] - difference left X position relative to the screen -/// [xRight] - difference of the right X position relative to the screen -/// [xCenter] - difference of the central X position relative to the screen -/// [diffTopToBottom] - difference between the upper border of first object and the lower -/// border of second object -/// [diffBottomToTop] - difference between the lower border of first object and the upper -/// border of second object -/// [diffLeftToRight] - difference between the left border of first object and the right -/// border of second object -/// [diffRightToLeft] - difference between the right border of first object and the left -/// border of second object -/// [width] - difference in width of elements -/// [height] - difference in element heights -/// [topLeft] - upper left coordinate -/// [topRight] - upper right coordinate -/// [bottomLeft] - lower left coordinate -/// [bottomRight] - lower right coordinate -/// [center] - central coordinate -/// [topCenter] - upper center coordinate -/// [bottomCenter] - lower central coordinate -/// [centerLeft] - center left coordinate -/// [centerRight] - center right coordinate -class ComparisonDiff { - const ComparisonDiff({ - required this.yTop, - required this.yBottom, - required this.yCenter, - required this.xLeft, - required this.xRight, - required this.xCenter, - required this.diffTopToBottom, - required this.diffBottomToTop, - required this.diffLeftToRight, - required this.diffRightToLeft, - required this.width, - required this.height, - }); - - final double yTop; - final double yBottom; - final double yCenter; - final double xLeft; - final double xRight; - final double xCenter; - final double diffTopToBottom; - final double diffBottomToTop; - final double diffLeftToRight; - final double diffRightToLeft; - final double width; - final double height; - - CoordsMetrics get topLeft => CoordsMetrics(y: yTop, x: xLeft); - - CoordsMetrics get topRight => CoordsMetrics(y: yTop, x: xRight); - - CoordsMetrics get bottomLeft => CoordsMetrics(y: yBottom, x: xLeft); - - CoordsMetrics get bottomRight => CoordsMetrics(y: yBottom, x: xRight); - - CoordsMetrics get center => CoordsMetrics(y: yCenter, x: xCenter); - - CoordsMetrics get topCenter => CoordsMetrics(y: yTop, x: xCenter); - - CoordsMetrics get bottomCenter => CoordsMetrics(y: yBottom, x: xCenter); - - CoordsMetrics get centerLeft => CoordsMetrics(y: yCenter, x: xLeft); - - CoordsMetrics get centerRight => CoordsMetrics(y: yCenter, x: xRight); - - @override - String toString() { - return 'ComparisonDiff(\n' - ' yTop = $yTop;\n' - ' yBottom = $yBottom;\n' - ' yCenter = $yCenter;\n' - ' xLeft = $xLeft;\n' - ' xRight = $xRight;\n' - ' xCenter = $xCenter;\n' - ' diffTopToBottom = $diffTopToBottom;\n' - ' diffBottomToTop = $diffBottomToTop;\n' - ' diffLeftToRight = $diffLeftToRight;\n' - ' diffRightToLeft = $diffRightToLeft;\n' - ' width = $width;\n' - ' height = $height;\n' - ')'; - } -} diff --git a/packages/render_metrics/lib/src/data/coords_metrics.dart b/packages/render_metrics/lib/src/data/coords_metrics.dart deleted file mode 100644 index 43b09f7b7..000000000 --- a/packages/render_metrics/lib/src/data/coords_metrics.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Defines a point representing -/// a location in (x,y) coordinate space. -class CoordsMetrics { - const CoordsMetrics({ - required this.x, - required this.y, - }); - - final double x; - final double y; -} diff --git a/packages/render_metrics/lib/src/data/render_data.dart b/packages/render_metrics/lib/src/data/render_data.dart deleted file mode 100644 index d03c6feef..000000000 --- a/packages/render_metrics/lib/src/data/render_data.dart +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:render_metrics/src/data/comparison_diff.dart'; -import 'package:render_metrics/src/data/coords_metrics.dart'; - -/// Widget metric data class -/// [yTop] - top Y position relative to the screen -/// [yBottom] - lower Y position relative to the screen -/// [yCenter] - center Y position relative to the screen -/// [xLeft] - left X position relative to the screen -/// [xRight] - right X position relative to the screen -/// [xCenter] - center X position relative to the screen -/// [width] - element width -/// [height] - element height -/// [topLeft] - upper left coordinate -/// [topRight] - upper right coordinate -/// [bottomLeft] - lower left coordinate -/// [bottomRight] - lower right coordinate -/// [center] - central coordinate -/// [topCenter] - upper center coordinate -/// [bottomCenter] - lower central coordinate -/// [centerLeft] - center left coordinate -/// [centerRight] - center right coordinate -class RenderData { - const RenderData({ - required this.yTop, - required this.yBottom, - required this.yCenter, - required this.xLeft, - required this.xRight, - required this.xCenter, - required this.width, - required this.height, - }); - - final double yTop; - final double yBottom; - final double yCenter; - final double xLeft; - final double xRight; - final double xCenter; - final double width; - final double height; - - CoordsMetrics get topLeft => CoordsMetrics(y: yTop, x: xLeft); - - CoordsMetrics get topRight => CoordsMetrics(y: yTop, x: xRight); - - CoordsMetrics get bottomLeft => CoordsMetrics(y: yBottom, x: xLeft); - - CoordsMetrics get bottomRight => CoordsMetrics(y: yBottom, x: xRight); - - CoordsMetrics get center => CoordsMetrics(y: yCenter, x: xCenter); - - CoordsMetrics get topCenter => CoordsMetrics(y: yTop, x: xCenter); - - CoordsMetrics get bottomCenter => CoordsMetrics(y: yBottom, x: xCenter); - - CoordsMetrics get centerLeft => CoordsMetrics(y: yCenter, x: xLeft); - - CoordsMetrics get centerRight => CoordsMetrics(y: yCenter, x: xRight); - - /// Returns the difference between - /// the external and the current instance ofRenderData, - /// as an instance of the ComparisonDiff class - ComparisonDiff operator -(RenderData other) => ComparisonDiff( - yTop: yTop - other.yTop, - yBottom: yBottom - other.yBottom, - yCenter: yCenter - other.yCenter, - xLeft: xLeft - other.xLeft, - xRight: xRight - other.xRight, - xCenter: xCenter - other.xCenter, - diffTopToBottom: yTop - other.yBottom, - diffBottomToTop: yBottom - other.yTop, - diffLeftToRight: xLeft - other.xRight, - diffRightToLeft: xRight - other.xLeft, - width: width - other.width, - height: height - other.height, - ); - - @override - String toString() { - return 'RenderData(\n' - ' yTop = $yTop;\n' - ' yBottom = $yBottom;\n' - ' yCenter = $yCenter;\n' - ' xLeft = $xLeft;\n' - ' xRight = $xRight;\n' - ' xCenter = $xCenter;\n' - ' width = $width;\n' - ' height = $height;\n' - ')'; - } -} diff --git a/packages/render_metrics/lib/src/manager/render_manager.dart b/packages/render_metrics/lib/src/manager/render_manager.dart deleted file mode 100644 index 8122d1297..000000000 --- a/packages/render_metrics/lib/src/manager/render_manager.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/rendering.dart'; - -/// Base class for rendering interaction managers -abstract class RenderManager { - /// Handling the RenderObject Add Call - void addRenderObject(T id, RenderObject object); - - /// Handling the RenderObject Update Call - void updateRenderObject(T id, RenderObject object); - - /// Handling the RenderObject Delete Call - void removeRenderObject(T id); -} diff --git a/packages/render_metrics/lib/src/manager/render_parameters_manager.dart b/packages/render_metrics/lib/src/manager/render_parameters_manager.dart deleted file mode 100644 index e1d3c69e8..000000000 --- a/packages/render_metrics/lib/src/manager/render_parameters_manager.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/rendering.dart'; -import 'package:render_metrics/src/data/comparison_diff.dart'; -import 'package:render_metrics/src/data/render_data.dart'; -import 'package:render_metrics/src/manager/render_manager.dart'; -import 'package:render_metrics/src/render/render_metrics.dart'; - -/// Manager class extending [RenderManager]. -/// Contains a collection of mounted [RenderMetricsBox] -/// and provides methods for working with it. -class RenderParametersManager extends RenderManager { - final _renderObjects = {}; - - /// Collection with mounted RenderMetricsBox - RenderMetricsBox? operator [](T id) { - return _renderObjects[id]; - } - - /// Add an instance of [RenderObject] by [id] - @override - void addRenderObject(T id, RenderObject renderObject) { - _renderObjects[id] = renderObject as RenderMetricsBox; - } - - /// Update an instance of [RenderObject] by [id] - @override - void updateRenderObject(T id, RenderObject renderObject) { - _renderObjects[id] = renderObject as RenderMetricsBox; - } - - /// Get an instance of [RenderObject] by [id] - RenderMetricsBox? getRenderObject(T id) { - return _renderObjects[id]; - } - - /// Get instance of [RenderData] from [RenderObject] by [id] - RenderData? getRenderData(T id) { - return getRenderObject(id)?.data; - } - - /// Delete an instance of [RenderObject] by [id] - @override - void removeRenderObject(T id) { - _renderObjects.remove(id); - } - - /// Get the difference between - /// two instances [RenderObject] - /// by [firstId] and [secondId] - ComparisonDiff? getDiffById(T firstId, T secondId) { - final first = getRenderData(firstId); - final second = getRenderData(secondId); - return getDiffByInstance(first, second); - } - - /// Get the difference between - /// two instances [RenderObject] by Instance - ComparisonDiff? getDiffByInstance(RenderData? first, RenderData? second) { - if (first == null || second == null) return null; - return first - second; - } -} diff --git a/packages/render_metrics/lib/src/render/render_metrics.dart b/packages/render_metrics/lib/src/render/render_metrics.dart deleted file mode 100644 index 10290d3c6..000000000 --- a/packages/render_metrics/lib/src/render/render_metrics.dart +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/rendering.dart'; -import 'package:flutter/widgets.dart'; -import 'package:render_metrics/src/data/render_data.dart'; -import 'package:render_metrics/src/manager/render_manager.dart'; - -typedef MountCallback = void Function(T id, RenderMetricsBox box); -typedef UnMountCallback = void Function(T id); - -/// [RenderObjectWidget] for getting widget metrics -/// [id] - widget id -/// [manager] - an instance of the RenderManager for getting and processing -/// metrics -/// [onMount] - mount / create instance callback [RenderMetricsObject] -/// [onUnMount] - unmounted / uninstall instance callback [RenderMetricsObject] -/// -/// When mounting a RenderMetricsObject, the createRenderObject method fires. -/// It calls onMount if the manager addRenderObject method -/// is also passed if it is passed. -/// When deleted from the tree, didUnmountRenderObject is triggered. -/// It calls onUnMount if passed and the removeRenderObject method -class RenderMetricsObject extends SingleChildRenderObjectWidget { - const RenderMetricsObject({ - required this.id, - required this.manager, - this.onMount, - this.onUpdate, - this.onUnMount, - Key? key, - Widget? child, - }) : super(key: key, child: child); - - final T id; - final RenderManager manager; - final MountCallback? onMount; - final MountCallback? onUpdate; - final UnMountCallback? onUnMount; - - @override - RenderMetricsBox createRenderObject(BuildContext context) { - final r = RenderMetricsBox(); - onMount?.call(id, r); - manager.addRenderObject(id, r); - return r; - } - - @override - void updateRenderObject( - BuildContext context, - covariant RenderObject renderObject, - ) { - if (renderObject is RenderMetricsBox) { - onUpdate?.call(id, renderObject); - manager.updateRenderObject(id, renderObject); - } - } - - @override - void didUnmountRenderObject(covariant RenderObject renderObject) { - manager.removeRenderObject(id); - onUnMount?.call(id); - } -} - -/// [RenderBox] for getting widget metrics -/// extends RenderProxyBox which extends RenderObject -/// [data] - getter for receiving data in the instance [RenderData] -class RenderMetricsBox extends RenderProxyBox { - RenderMetricsBox({ - RenderBox? child, - }) : super(child); - - RenderData get data { - final size = this.size; - final width = size.width; - final height = size.height; - final globalOffset = localToGlobal(Offset(width, height)); - final dy = globalOffset.dy; - final dx = globalOffset.dx; - - return RenderData( - yTop: dy - height, - yBottom: dy, - yCenter: dy - height / 2, - xLeft: dx - width, - xRight: dx, - xCenter: dx - width / 2, - width: width, - height: height, - ); - } -} diff --git a/packages/render_metrics/pubspec.yaml b/packages/render_metrics/pubspec.yaml deleted file mode 100644 index dc7acacef..000000000 --- a/packages/render_metrics/pubspec.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: render_metrics -version: 2.0.1 -description: Library for getting widget metrics. Uses RenderObject to get the size and position of widgets relative to the screen window, as well as the difference between widgets. -homepage: "https://github.com/surfstudio/SurfGear/tree/main/packages/render_metrics" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: diff --git a/packages/render_metrics/test/render_metrics_test.dart b/packages/render_metrics/test/render_metrics_test.dart deleted file mode 100644 index 021afa921..000000000 --- a/packages/render_metrics/test/render_metrics_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:render_metrics/render_metrics.dart'; - -import 'test_utils.dart'; - -void main() { - group('RenderParametersManager', () { - testWidgets('returns renderData', (tester) async { - const box = SizedBox(height: 400, width: 800); - - const firstId = 'box'; - - final renderManager = RenderParametersManager(); - - final object = RenderMetricsObject( - id: firstId, - manager: renderManager, - child: box, - ); - - await tester.pumpWidget(makeTestableWidget(object)); - - final renderData = renderManager.getRenderData('box'); - - expect(renderData?.height, 400); - expect(renderData?.width, 800); - }); - - testWidgets('calculates diff', (tester) async { - const firstBox = SizedBox(height: 400, width: 800); - const secondBox = SizedBox(height: 200, width: 400); - - const firstId = 'first'; - const secondId = 'second'; - - final renderManager = RenderParametersManager(); - - final firstObject = RenderMetricsObject( - id: firstId, - manager: renderManager, - child: firstBox, - ); - final secondObject = RenderMetricsObject( - id: secondId, - manager: renderManager, - child: secondBox, - ); - - await tester.pumpWidget( - makeTestableWidget(Column(children: [firstObject, secondObject])), - ); - - final diff = renderManager.getDiffById(firstId, secondId); - - expect(diff?.height, equals(200)); - expect(diff?.width, equals(400)); - - final firstRenderData = renderManager.getRenderData(firstId); - final secondRenderData = renderManager.getRenderData(secondId); - - final diffUsingOperatior = firstRenderData! - secondRenderData!; - - expect(diffUsingOperatior.height, equals(200)); - expect(diffUsingOperatior.width, equals(400)); - }); - }); -} diff --git a/packages/render_metrics/test/test_utils.dart b/packages/render_metrics/test/test_utils.dart deleted file mode 100644 index 83374193c..000000000 --- a/packages/render_metrics/test/test_utils.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; - -Widget makeTestableWidget(Widget widget) => - MaterialApp(home: Scaffold(body: widget)); diff --git a/packages/surf_controllers/.gitignore b/packages/surf_controllers/.gitignore deleted file mode 100644 index 1985397a2..000000000 --- a/packages/surf_controllers/.gitignore +++ /dev/null @@ -1,74 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Flutter.podspec -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 diff --git a/packages/surf_controllers/.metadata b/packages/surf_controllers/.metadata deleted file mode 100644 index a9b92ecf8..000000000 --- a/packages/surf_controllers/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 9b2d32b605630f28625709ebd9d78ab3016b2bf6 - channel: stable - -project_type: package diff --git a/packages/surf_controllers/CHANGELOG.md b/packages/surf_controllers/CHANGELOG.md deleted file mode 100644 index 6b17fc3f2..000000000 --- a/packages/surf_controllers/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Changelog - -## 1.0.1 - 2021-05-30 - -* Stable release - -## 1.0.1-dev.1 - 2021-05-25 - -* Apply new lint rules. - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0`. - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/surf_controllers/LICENSE b/packages/surf_controllers/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/surf_controllers/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/surf_controllers/README.md b/packages/surf_controllers/README.md deleted file mode 100644 index 0c0e69e9a..000000000 --- a/packages/surf_controllers/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Surf Controllers - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/surf_controllers) -[![Pub Version](https://img.shields.io/pub/v/surf_controllers?logo=dart&logoColor=white)](https://pub.dev/packages/surf_controllers) -[![Pub Likes](https://badgen.net/pub/likes/surf_controllers)](https://pub.dev/packages/surf_controllers) -[![Pub popularity](https://badgen.net/pub/popularity/surf_controllers)](https://pub.dev/packages/surf_controllers/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/surf_controllers) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Common controller for call dialogs. - -## Installation - -Add `surf_controllers` to your `pubspec.yaml` file: - -```yaml -dependencies: - surf_controllers: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/surf_controllers/analysis_options.yaml b/packages/surf_controllers/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/surf_controllers/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/surf_controllers/dart_dependency_validator.yaml b/packages/surf_controllers/dart_dependency_validator.yaml deleted file mode 100644 index c69bdf12d..000000000 --- a/packages/surf_controllers/dart_dependency_validator.yaml +++ /dev/null @@ -1,2 +0,0 @@ -exclude: - - "example/**" diff --git a/packages/surf_controllers/example/.gitignore b/packages/surf_controllers/example/.gitignore deleted file mode 100644 index 9d532b18a..000000000 --- a/packages/surf_controllers/example/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/packages/surf_controllers/example/.metadata b/packages/surf_controllers/example/.metadata deleted file mode 100644 index cd984dd00..000000000 --- a/packages/surf_controllers/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 9b2d32b605630f28625709ebd9d78ab3016b2bf6 - channel: stable - -project_type: app diff --git a/packages/surf_controllers/example/analysis_options.yaml b/packages/surf_controllers/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/surf_controllers/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/surf_controllers/example/android/.gitignore b/packages/surf_controllers/example/android/.gitignore deleted file mode 100644 index 0a741cb43..000000000 --- a/packages/surf_controllers/example/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/packages/surf_controllers/example/android/app/build.gradle b/packages/surf_controllers/example/android/app/build.gradle deleted file mode 100644 index 0e6c636a2..000000000 --- a/packages/surf_controllers/example/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 29 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.controllers.example" - minSdkVersion 16 - targetSdkVersion 29 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/surf_controllers/example/android/app/src/debug/AndroidManifest.xml b/packages/surf_controllers/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 1734e27c9..000000000 --- a/packages/surf_controllers/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/surf_controllers/example/android/app/src/main/AndroidManifest.xml b/packages/surf_controllers/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 0e86722ea..000000000 --- a/packages/surf_controllers/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/surf_controllers/example/android/app/src/main/kotlin/com/example/controllers/example/MainActivity.kt b/packages/surf_controllers/example/android/app/src/main/kotlin/com/example/controllers/example/MainActivity.kt deleted file mode 100644 index 7c5fd4fc2..000000000 --- a/packages/surf_controllers/example/android/app/src/main/kotlin/com/example/controllers/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.controllers.example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/surf_controllers/example/android/app/src/main/res/drawable/launch_background.xml b/packages/surf_controllers/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/surf_controllers/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/surf_controllers/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/surf_controllers/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/surf_controllers/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_controllers/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/surf_controllers/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/surf_controllers/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_controllers/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/surf_controllers/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/surf_controllers/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_controllers/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/surf_controllers/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/surf_controllers/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_controllers/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/surf_controllers/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/surf_controllers/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_controllers/example/android/app/src/main/res/values/styles.xml b/packages/surf_controllers/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33fd..000000000 --- a/packages/surf_controllers/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/surf_controllers/example/android/app/src/profile/AndroidManifest.xml b/packages/surf_controllers/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 1734e27c9..000000000 --- a/packages/surf_controllers/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/surf_controllers/example/android/build.gradle b/packages/surf_controllers/example/android/build.gradle deleted file mode 100644 index 3100ad2d5..000000000 --- a/packages/surf_controllers/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/surf_controllers/example/android/gradle.properties b/packages/surf_controllers/example/android/gradle.properties deleted file mode 100644 index a6738207f..000000000 --- a/packages/surf_controllers/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true -android.enableR8=true diff --git a/packages/surf_controllers/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/surf_controllers/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/packages/surf_controllers/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/surf_controllers/example/android/settings.gradle b/packages/surf_controllers/example/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/packages/surf_controllers/example/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/packages/surf_controllers/example/ios/.gitignore b/packages/surf_controllers/example/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/packages/surf_controllers/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/surf_controllers/example/ios/Flutter/AppFrameworkInfo.plist b/packages/surf_controllers/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/surf_controllers/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/surf_controllers/example/ios/Flutter/Debug.xcconfig b/packages/surf_controllers/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/surf_controllers/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/surf_controllers/example/ios/Flutter/Release.xcconfig b/packages/surf_controllers/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/surf_controllers/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/surf_controllers/example/ios/Runner.xcodeproj/project.pbxproj b/packages/surf_controllers/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index fa9a4b010..000000000 --- a/packages/surf_controllers/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,495 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.controllers.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.controllers.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.controllers.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/surf_controllers/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/surf_controllers/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/surf_controllers/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/surf_controllers/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/surf_controllers/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/surf_controllers/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/surf_controllers/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/surf_controllers/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/surf_controllers/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/surf_controllers/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/surf_controllers/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/surf_controllers/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_controllers/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/surf_controllers/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/surf_controllers/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/surf_controllers/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/surf_controllers/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/surf_controllers/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/surf_controllers/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/surf_controllers/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/surf_controllers/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/surf_controllers/example/ios/Runner/AppDelegate.swift b/packages/surf_controllers/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/surf_controllers/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/surf_controllers/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/surf_controllers/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/surf_controllers/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/surf_controllers/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_controllers/example/ios/Runner/Base.lproj/Main.storyboard b/packages/surf_controllers/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/surf_controllers/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_controllers/example/ios/Runner/Info.plist b/packages/surf_controllers/example/ios/Runner/Info.plist deleted file mode 100644 index a060db61e..000000000 --- a/packages/surf_controllers/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/surf_controllers/example/ios/Runner/Runner-Bridging-Header.h b/packages/surf_controllers/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/packages/surf_controllers/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/surf_controllers/example/lib/main.dart b/packages/surf_controllers/example/lib/main.dart deleted file mode 100644 index ab4832c5e..000000000 --- a/packages/surf_controllers/example/lib/main.dart +++ /dev/null @@ -1,4 +0,0 @@ -import 'package:example/ui/app/app.dart'; -import 'package:flutter/widgets.dart'; - -void main() => runApp(const App()); diff --git a/packages/surf_controllers/example/lib/ui/app/app.dart b/packages/surf_controllers/example/lib/ui/app/app.dart deleted file mode 100644 index 6e23b1940..000000000 --- a/packages/surf_controllers/example/lib/ui/app/app.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:example/ui/screen/home_screen/home_route.dart'; -import 'package:flutter/material.dart'; - -class App extends StatelessWidget { - const App({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - debugShowCheckedModeBanner: false, - onGenerateRoute: (_) => HomeScreenRoute(), - ); - } -} diff --git a/packages/surf_controllers/example/lib/ui/base/default_dialog_controller.dart b/packages/surf_controllers/example/lib/ui/base/default_dialog_controller.dart deleted file mode 100644 index ecdcf6719..000000000 --- a/packages/surf_controllers/example/lib/ui/base/default_dialog_controller.dart +++ /dev/null @@ -1,101 +0,0 @@ -import 'package:example/ui/base/owners/dialog_owner.dart'; -import 'package:flutter/material.dart'; -import 'package:surf_controllers/surf_controllers.dart'; - -typedef ClickedAction = void Function(BuildContext context); - -class DefaultDialogController implements DialogController { - DefaultDialogController( - this._scaffoldKey, { - this.dialogOwner, - }); - - DefaultDialogController.from( - this._context, { - this.dialogOwner, - }); - - final DialogOwner? dialogOwner; - - BuildContext? _context; - PersistentBottomSheetController? _sheetController; - GlobalKey? _scaffoldKey; - - BuildContext? get context => _context ?? _scaffoldKey?.currentContext; - - ScaffoldState get _scaffoldState => - _scaffoldKey?.currentState ?? Scaffold.of(_context!); - - @override - Future showAlertDialog({ - String? title, - String? message, - ClickedAction? onAgreeClicked, - ClickedAction? onDisagreeClicked, - bool useRootNavigator = false, - }) => - showDialog( - context: context!, - useRootNavigator: useRootNavigator, - builder: (ctx) => AlertDialog( - title: title != null ? Text(title) : const SizedBox.shrink(), - content: message != null ? Text(message) : const SizedBox.shrink(), - actions: [ - TextButton( - onPressed: () => onDisagreeClicked?.call(ctx), - child: const Text('Cancel'), - ), - TextButton( - onPressed: () => onAgreeClicked?.call(ctx), - child: const Text('Yes'), - ), - ], - ), - ); - - @override - Future showModalSheet( - Object type, { - required DialogData data, - bool isScrollControlled = false, - bool useRootNavigator = false, - }) { - assert(dialogOwner != null); - assert(dialogOwner!.registeredDialogs.containsKey(type)); - - final dialogBuilder = dialogOwner!.registeredDialogs[type]!; - - return showModalBottomSheet( - context: context!, - isScrollControlled: isScrollControlled, - useRootNavigator: useRootNavigator, - builder: (ctx) => dialogBuilder(ctx, data: data), - ); - } - - @override - Future showSheet( - Object type, { - required DialogData data, - VoidCallback? onDismiss, - }) { - assert(dialogOwner != null); - assert(dialogOwner!.registeredDialogs.containsKey(type)); - - final dialogBuilder = dialogOwner!.registeredDialogs[type]!; - - final sheetController = _scaffoldState.showBottomSheet( - (ctx) => dialogBuilder(ctx, data: data), - ); - _sheetController = sheetController; - - return sheetController.closed.whenComplete(() { - _sheetController = null; - onDismiss?.call(); - }); - } - - void hideSheet() { - _sheetController?.close(); - } -} diff --git a/packages/surf_controllers/example/lib/ui/base/default_message_controller.dart b/packages/surf_controllers/example/lib/ui/base/default_message_controller.dart deleted file mode 100644 index 0b08d96d1..000000000 --- a/packages/surf_controllers/example/lib/ui/base/default_message_controller.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:surf_controllers/surf_controllers.dart'; - -typedef SnackBarBuilder = SnackBar Function(String, SnackBarAction?); - -class DefaultMessageController implements MessageController { - DefaultMessageController(GlobalKey scaffoldKey) - : _scaffoldKey = scaffoldKey; - - DefaultMessageController.from(BuildContext context) : _context = context; - - BuildContext? _context; - GlobalKey? _scaffoldKey; - - final _defaultSnackBarBuilder = { - MsgType.common: (text, action) => _defaultSnackBar(text, action: action), - MsgType.error: (text, action) => - _defaultSnackBar(text, hasError: true, action: action), - }; - - ScaffoldState get _scaffoldState => - _scaffoldKey?.currentState ?? Scaffold.of(_context!); - - @override - void show({String? msg, Object? msgType}) { - _show(type: msgType is MsgType ? msgType : MsgType.common, msg: msg ?? ''); - } - - void _show({ - required MsgType type, - required String msg, - SnackBarAction? action, - }) { - final builder = _defaultSnackBarBuilder[type]; - if (builder != null) { - _showBottomSnack(builder(msg, action)); - } - } - - void _showBottomSnack(SnackBar snack) { - _scaffoldState - ..removeCurrentSnackBar() // ignore: deprecated_member_use - ..showSnackBar(snack); // ignore: deprecated_member_use - } - - // ignore: avoid-returning-widgets - static SnackBar _defaultSnackBar( - String text, { - bool hasError = false, - SnackBarAction? action, - }) { - return SnackBar( - content: Text(text), - backgroundColor: hasError ? Colors.red : Colors.black, - action: action, - ); - } -} - -enum MsgType { - common, - error, -} diff --git a/packages/surf_controllers/example/lib/ui/base/owners/dialog_owner.dart b/packages/surf_controllers/example/lib/ui/base/owners/dialog_owner.dart deleted file mode 100644 index 2d4b97616..000000000 --- a/packages/surf_controllers/example/lib/ui/base/owners/dialog_owner.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:surf_controllers/surf_controllers.dart'; - -/// Dialog widget builder -class DialogBuilder { - DialogBuilder(this.builder); - - final Widget Function(BuildContext context, {required T data}) builder; - - // ignore: avoid-returning-widgets - Widget call(BuildContext context, {required T data}) => - builder(context, data: data); -} - -/// Register dialogs -mixin DialogOwner { - Map get registeredDialogs; -} diff --git a/packages/surf_controllers/example/lib/ui/screen/home_screen/home_dialog_owner.dart b/packages/surf_controllers/example/lib/ui/screen/home_screen/home_dialog_owner.dart deleted file mode 100644 index ea9e4810b..000000000 --- a/packages/surf_controllers/example/lib/ui/screen/home_screen/home_dialog_owner.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:example/ui/base/owners/dialog_owner.dart'; -import 'package:example/ui/widgets/example_dialog.dart'; -import 'package:surf_controllers/surf_controllers.dart'; - -class HomeDialogOwner with DialogOwner { - @override - Map> get registeredDialogs => { - ExampleDialogType.text: DialogBuilder(( - context, { - required data, - }) { - return ExampleDialog(data: data); - }), - }; -} diff --git a/packages/surf_controllers/example/lib/ui/screen/home_screen/home_route.dart b/packages/surf_controllers/example/lib/ui/screen/home_screen/home_route.dart deleted file mode 100644 index 2bb4d892d..000000000 --- a/packages/surf_controllers/example/lib/ui/screen/home_screen/home_route.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:example/ui/screen/home_screen/home_screen.dart'; -import 'package:flutter/material.dart'; - -/// Route for [HomeScreen] -class HomeScreenRoute extends MaterialPageRoute { - HomeScreenRoute() : super(builder: (context) => const HomeScreen()); -} diff --git a/packages/surf_controllers/example/lib/ui/screen/home_screen/home_screen.dart b/packages/surf_controllers/example/lib/ui/screen/home_screen/home_screen.dart deleted file mode 100644 index c74ec3972..000000000 --- a/packages/surf_controllers/example/lib/ui/screen/home_screen/home_screen.dart +++ /dev/null @@ -1,69 +0,0 @@ -import 'package:example/ui/base/default_dialog_controller.dart'; -import 'package:example/ui/base/default_message_controller.dart'; -import 'package:example/ui/screen/home_screen/home_dialog_owner.dart'; -import 'package:example/ui/widgets/example_dialog.dart'; -import 'package:flutter/material.dart'; -import 'package:surf_controllers/surf_controllers.dart'; - -class HomeScreen extends StatefulWidget { - const HomeScreen({Key? key}) : super(key: key); - - @override - _HomeScreenState createState() => _HomeScreenState(); -} - -class _HomeScreenState extends State { - final _scaffoldKey = GlobalKey(); - late DialogController _dialogController; - late MessageController _messageController; - - @override - void initState() { - super.initState(); - _dialogController = DefaultDialogController.from( - context, - dialogOwner: HomeDialogOwner(), - ); - _messageController = DefaultMessageController(_scaffoldKey); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - key: _scaffoldKey, - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - TextButton( - onPressed: _showExampleDialog, - child: const Text('Show example dialog'), - ), - TextButton( - onPressed: _showExampleMessage, - child: const Text('Show message'), - ), - TextButton( - onPressed: () => _showExampleMessage(MsgType.error), - child: const Text('Show error message'), - ), - ], - ), - ), - ); - } - - void _showExampleDialog() { - _dialogController.showModalSheet( - ExampleDialogType.text, - data: ExampleDialogData( - title: 'Example title', - subtitle: 'Example subtitle', - ), - ); - } - - void _showExampleMessage([MsgType type = MsgType.common]) { - _messageController.show(msg: 'Example message', msgType: type); - } -} diff --git a/packages/surf_controllers/example/lib/ui/widgets/example_dialog.dart b/packages/surf_controllers/example/lib/ui/widgets/example_dialog.dart deleted file mode 100644 index 8928dbcb6..000000000 --- a/packages/surf_controllers/example/lib/ui/widgets/example_dialog.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:surf_controllers/surf_controllers.dart'; - -enum ExampleDialogType { - text, -} - -class ExampleDialogData extends DialogData { - ExampleDialogData({ - required this.title, - required this.subtitle, - }); - - final String title; - final String subtitle; -} - -class ExampleDialog extends StatelessWidget { - const ExampleDialog({ - required this.data, - Key? key, - }) : super(key: key); - - final ExampleDialogData data; - - @override - Widget build(BuildContext context) { - return Container( - color: Colors.green[200], - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - data.title, - style: const TextStyle(fontSize: 24), - ), - const SizedBox(height: 20), - Text( - data.subtitle, - style: const TextStyle(fontSize: 16), - ), - ], - ), - ); - } -} diff --git a/packages/surf_controllers/example/pubspec.yaml b/packages/surf_controllers/example/pubspec.yaml deleted file mode 100644 index 64a397854..000000000 --- a/packages/surf_controllers/example/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: example -description: A new Flutter project. -version: 1.0.0+1 -publish_to: 'none' - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - surf_controllers: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/surf_controllers/lib/src/dialog_controller.dart b/packages/surf_controllers/lib/src/dialog_controller.dart deleted file mode 100644 index 85c075bbe..000000000 --- a/packages/surf_controllers/lib/src/dialog_controller.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart'; - -/// Controller for call dialogs -abstract class DialogController { - Future showAlertDialog({ - String title, - String message, - void Function(BuildContext context) onAgreeClicked, - void Function(BuildContext context) onDisagreeClicked, - }); - - Future showSheet( - Object type, { - required DialogData data, - VoidCallback onDismiss, - }); - - Future showModalSheet( - Object type, { - required DialogData data, - bool isScrollControlled, - }); -} - -/// Dialog parameters -abstract class DialogData {} diff --git a/packages/surf_controllers/lib/src/message_controller.dart b/packages/surf_controllers/lib/src/message_controller.dart deleted file mode 100644 index 3d99d5312..000000000 --- a/packages/surf_controllers/lib/src/message_controller.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Controller for call messages -// ignore: one_member_abstracts -abstract class MessageController { - /// Show [msg] according to [msgType] - /// - /// [msgType] is defined on concrete widget(UI Layer) - dynamic show({String? msg, Object? msgType}); -} diff --git a/packages/surf_controllers/lib/surf_controllers.dart b/packages/surf_controllers/lib/surf_controllers.dart deleted file mode 100644 index 32cfe4243..000000000 --- a/packages/surf_controllers/lib/surf_controllers.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:surf_controllers/src/dialog_controller.dart'; -export 'package:surf_controllers/src/message_controller.dart'; diff --git a/packages/surf_controllers/pubspec.yaml b/packages/surf_controllers/pubspec.yaml deleted file mode 100644 index 9194f92de..000000000 --- a/packages/surf_controllers/pubspec.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: surf_controllers -version: 1.0.1 -description: Common controller for call dialogs -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/surf_controllers" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: diff --git a/packages/surf_lint_rules/CHANGELOG.md b/packages/surf_lint_rules/CHANGELOG.md deleted file mode 100644 index 18e7d97f2..000000000 --- a/packages/surf_lint_rules/CHANGELOG.md +++ /dev/null @@ -1,66 +0,0 @@ -# Changelog - -## 1.4.0 - 2021-07-05 - -* Stable release - -## 1.4.0-dev.1 - 2021-07-01 - -* Remove pedantic dependency - -## 1.3.0 - 2021-06-11 - -* Stable release - -## 1.2.1-dev.2 - 2021-06-07 - -* Add some rules: [always-remove-listener](https://github.com/dart-code-checker/dart-code-metrics/blob/master/doc/rules/always-remove-listener.md), [avoid-unnecessary-setstate](https://github.com/dart-code-checker/dart-code-metrics/blob/master/doc/rules/avoid-unnecessary-setstate.md). - -## 1.2.1-dev.1 - 2021-06-05 - -* Switch on `dart_code_metrics` 4.0.0-dev.1 - -## 1.2.0 - 2021-05-30 - -* Stable release - -## 1.1.1-dev.4 - 2021-05-27 - -* Add new rule: [member-ordering-extended](https://github.com/dart-code-checker/dart-code-metrics/blob/master/doc/rules/member-ordering-extended.md) - -## 1.1.1-dev.3 - 2021-05-25 - -* Tune metrics settings - -## 1.1.1-dev.2 - 2021-05-24 - -* Set min SDK version to `2.13.0`. -* Tune `avoid-returning-widgets`. - -## 1.1.1-dev.1 - 2021-05-24 - -* Add some rules: `avoid_multiple_declarations_per_line`, `deprecated_consistency`, `prefer_if_elements_to_conditional_expressions`, `unnecessary_null_checks`, `unnecessary_nullable_for_final_variable_declarations`, `use_if_null_to_convert_nulls_to_bools`, `use_late_for_private_fields_and_variables`, `use_named_constants`, `missing_whitespace_between_adjacent_strings`, `avoid_type_to_string`, `use_build_context_synchronously`. -* Disable rules: `sort_child_properties_last`, `sort_constructors_first`, `sort_unnamed_constructors_first`. - -## 1.1.0 - -* Bump pedantic version. -* Add [dart-code-metrics](https://pub.dev/packages/dart_code_metrics) dependency. - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0`. - -## 0.0.2-dev.6 - -* Add new error-rule : no_runtimeType_toString. -* Lint level changed from warning to error for : type_annotate_public_apis, await_only_futures, always_declare_return_types rules. -* Add new rule : flutter_style_todos - -## 0.0.2-dev.2 - -* Disabled lines_longer_than_80_chars to increase line length without warnings - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/surf_lint_rules/LICENSE b/packages/surf_lint_rules/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/surf_lint_rules/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/surf_lint_rules/README.md b/packages/surf_lint_rules/README.md deleted file mode 100644 index 86ba04d5f..000000000 --- a/packages/surf_lint_rules/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Surf Lint Rules - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/surf_lint_rules) -[![Pub Version](https://img.shields.io/pub/v/surf_lint_rules?logo=dart&logoColor=white)](https://pub.dev/packages/surf_lint_rules) -[![Pub Likes](https://badgen.net/pub/likes/surf_lint_rules)](https://pub.dev/packages/surf_lint_rules) -[![Pub popularity](https://badgen.net/pub/popularity/surf_lint_rules)](https://pub.dev/packages/surf_lint_rules/score) -![Dart Platform](https://badgen.net/pub/dart-platform/surf_lint_rules) -![Flutter Platform](https://badgen.net/pub/flutter-platform/surf_lint_rules) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Lint rules for "Surf" company. - -## Installation - -Add `surf_lint_rules` as dependency to your pubspec.yaml - -```yaml -dev_dependencies: - surf_lint_rules: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -Create `analysis_options.yaml` file - -```yaml -include: package:surf_lint_rules/analysis_options.yaml -``` - -See the `dartanalyzer` executing the lint checks in you favorite editor. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/surf_lint_rules/analysis_options.yaml b/packages/surf_lint_rules/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/surf_lint_rules/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/surf_lint_rules/dart_dependency_validator.yaml b/packages/surf_lint_rules/dart_dependency_validator.yaml deleted file mode 100644 index e0a3b1b5c..000000000 --- a/packages/surf_lint_rules/dart_dependency_validator.yaml +++ /dev/null @@ -1,6 +0,0 @@ -ignore: - - dart_code_metrics - - flutter_lints - -exclude: - - "example/**" diff --git a/packages/surf_lint_rules/example/README.md b/packages/surf_lint_rules/example/README.md deleted file mode 100644 index f2af38e5f..000000000 --- a/packages/surf_lint_rules/example/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Using this rules set - -Add `surf_lint_rules` as dependency to your pubspec.yaml - -```yaml -dev_dependencies: - surf_lint_rules: ^1.0.0 -``` - -Then, add an include in your analysis_options.yaml - -```yaml -include: package:surf_lint_rules/analysis_options.yaml -``` - -See the `dartanalyzer` executing the lint checks in you favorite editor. diff --git a/packages/surf_lint_rules/example/analysis_options.yaml b/packages/surf_lint_rules/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/surf_lint_rules/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/surf_lint_rules/example/lib/async_function.dart b/packages/surf_lint_rules/example/lib/async_function.dart deleted file mode 100644 index d00430381..000000000 --- a/packages/surf_lint_rules/example/lib/async_function.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -Future asyncFunction() => Future.value(); diff --git a/packages/surf_lint_rules/example/lib/main.dart b/packages/surf_lint_rules/example/lib/main.dart deleted file mode 100644 index 0e2a60f1b..000000000 --- a/packages/surf_lint_rules/example/lib/main.dart +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// ignore_for_file: unused_element, prefer_final_fields, unused_field, type_annotate_public_apis -import 'package:meta/meta.dart'; -import 'package:surf_lint_rules/surf_lint_rules.dart'; - -import 'package:example/async_function.dart'; - -Future main() async { - await asyncFunction(); - - unawaited(asyncFunction()); -} - -class OrderExample { - static const staticConst = 42; - - static const _staticConst = staticConst; - - static final staticFinal = staticConst.isEven; - - static final _staticFinal = _staticConst.isEven; - - static var staticField = 42; - - static var _staticField = 42; - - final fin = 42; - - final String finalField; - - final _fin = 42; - - String publicField; - - String get string => publicField.toString(); - - set string(String newString) => publicField = newString; - - String _privateField = '42'; - - String get _field => _privateField; - - set _field(String newString) => _privateField = '42'; - - OrderExample({ - required this.finalField, - required this.publicField, - }); - - OrderExample.empty() - : finalField = '', - publicField = ''; - - factory OrderExample.factored( - String finalField, - String publicField, - ) => - OrderExample( - finalField: finalField, - publicField: publicField, - ); - - @override - String toString() { - return super.toString().substring(0); - } - - static void staticFoo() { - return; - } - - void foo() { - return; - } - - @protected - void protectedFoo() { - return; - } - - static void _staticFoo() { - return; - } - - void _foo() { - return; - } -} diff --git a/packages/surf_lint_rules/example/pubspec.yaml b/packages/surf_lint_rules/example/pubspec.yaml deleted file mode 100644 index f19fd883e..000000000 --- a/packages/surf_lint_rules/example/pubspec.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: example -description: Surf lint rules example. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dev_dependencies: - meta: ^1.3.0 - surf_lint_rules: - path: ../ diff --git a/packages/surf_lint_rules/lib/analysis_options.1.1.0.yaml b/packages/surf_lint_rules/lib/analysis_options.1.1.0.yaml deleted file mode 100644 index 6b98f469e..000000000 --- a/packages/surf_lint_rules/lib/analysis_options.1.1.0.yaml +++ /dev/null @@ -1,230 +0,0 @@ -include: package:pedantic/analysis_options.yaml - -analyzer: - plugins: - - dart_code_metrics - exclude: - - "build/**" - strong-mode: - implicit-casts: false - implicit-dynamic: false - errors: - always_use_package_imports: error - avoid_empty_else: error - avoid_print: error - avoid_relative_lib_imports: error - avoid_returning_null_for_future: error - avoid_slow_async_io: error - avoid_types_as_parameter_names: error - avoid_web_libraries_in_flutter: error - cancel_subscriptions: error - close_sinks: error - comment_references: error - control_flow_in_finally: error - empty_statements: error - hash_and_equals: error - invariant_booleans: error - iterable_contains_unrelated_type: error - list_remove_unrelated_type: error - literal_only_boolean_expressions: error - no_adjacent_strings_in_list: error - no_duplicate_case_values: error - no_logic_in_create_state: error - prefer_void_to_null: error - test_types_in_equals: error - throw_in_finally: error - unnecessary_statements: error - unrelated_type_equality_checks: error - use_key_in_widget_constructors: error - valid_regexps: error - no_runtimeType_toString: error - type_annotate_public_apis: error - await_only_futures: error - always_declare_return_types: error - -dart_code_metrics: - anti-patterns: - - long-method - - long-parameter-list - metrics: - cyclomatic-complexity: 20 - maximum-nesting-level: 5 - number-of-parameters: 4 - source-lines-of-code: 75 - metrics-exclude: - - test/** - rules: - - avoid-returning-widgets - - binary-expression-operand-order - - double-literal-format - - newline-before-return - - no-boolean-literal-compare - - no-empty-block - - no-equal-then-else - - no-object-declaration - - prefer-conditional-expressions - - prefer-trailing-comma - -linter: - rules: - # Const rules. - prefer_const_constructors: true - prefer_const_constructors_in_immutables: true - prefer_const_declarations: true - prefer_const_literals_to_create_immutables: true - unnecessary_const: true - - # Style rules. - always_declare_return_types: true - always_put_required_named_parameters_first: true - always_require_non_null_named_parameters: true - annotate_overrides: true - avoid_annotating_with_dynamic: true - avoid_bool_literals_in_conditional_expressions: true - avoid_catches_without_on_clauses: true - avoid_catching_errors: true - avoid_equals_and_hash_code_on_mutable_classes: true - avoid_escaping_inner_quotes: true - avoid_field_initializers_in_const_classes: true - avoid_function_literals_in_foreach_calls: true - avoid_implementing_value_types: true - avoid_init_to_null: true - avoid_js_rounded_ints: true - avoid_null_checks_in_equality_operators: true - avoid_positional_boolean_parameters: true - avoid_private_typedef_functions: true - avoid_redundant_argument_values: true - avoid_renaming_method_parameters: true - avoid_return_types_on_setters: true - avoid_returning_null: true - avoid_returning_null_for_void: true - avoid_returning_this: true - avoid_setters_without_getters: true - avoid_shadowing_type_parameters: true - avoid_single_cascade_in_expression_statements: true - avoid_types_on_closure_parameters: true - avoid_unnecessary_containers: true - avoid_unused_constructor_parameters: true - avoid_void_async: true - await_only_futures: true - camel_case_extensions: true - camel_case_types: true - cascade_invocations: true - constant_identifier_names: true - curly_braces_in_flow_control_structures: true - directives_ordering: true - do_not_use_environment: true - empty_catches: true - empty_constructor_bodies: true - exhaustive_cases: true - file_names: true - implementation_imports: true - leading_newlines_in_multiline_strings: true - library_names: true - library_prefixes: true - non_constant_identifier_names: true - null_closures: true - omit_local_variable_types: true - one_member_abstracts: true - only_throw_errors: true - overridden_fields: true - package_api_docs: true - parameter_assignments: true - prefer_adjacent_string_concatenation: true - prefer_asserts_in_initializer_lists: true - prefer_collection_literals: true - prefer_conditional_assignment: true - prefer_constructors_over_static_methods: true - prefer_contains: true - prefer_equal_for_default_values: true - prefer_final_fields: true - prefer_final_in_for_each: true - prefer_final_locals: true - prefer_for_elements_to_map_fromIterable: true - prefer_function_declarations_over_variables: true - prefer_generic_function_type_aliases: true - prefer_if_null_operators: true - prefer_initializing_formals: true - prefer_inlined_adds: true - prefer_interpolation_to_compose_strings: true - prefer_is_empty: true - prefer_is_not_empty: true - prefer_is_not_operator: true - prefer_iterable_whereType: true - prefer_mixin: true - prefer_null_aware_operators: true - prefer_single_quotes: true - prefer_spread_collections: true - prefer_typing_uninitialized_variables: true - provide_deprecation_message: true - public_member_api_docs: false - recursive_getters: true - sized_box_for_whitespace: true - slash_for_doc_comments: true - sort_child_properties_last: true - sort_constructors_first: false - sort_unnamed_constructors_first: true - type_annotate_public_apis: true - type_init_formals: true - unawaited_futures: true - unnecessary_await_in_return: true - unnecessary_brace_in_string_interps: true - unnecessary_getters_setters: true - unnecessary_lambdas: true - unnecessary_new: true - unnecessary_null_aware_assignments: true - unnecessary_null_in_if_null_operators: true - unnecessary_overrides: true - unnecessary_parenthesis: true - unnecessary_raw_strings: true - unnecessary_string_escapes: true - unnecessary_string_interpolations: true - unnecessary_this: true - use_full_hex_values_for_flutter_colors: true - use_function_type_syntax_for_parameters: true - use_is_even_rather_than_modulo: true - use_raw_strings: true - use_rethrow_when_possible: true - use_setters_to_change_properties: true - use_string_buffers: true - use_to_and_as_if_applicable: true - void_checks: true - lines_longer_than_80_chars: false - no_runtimeType_toString: true - flutter_style_todos: true - - # Error rules. - always_use_package_imports: true - avoid_dynamic_calls: true - avoid_empty_else: true - avoid_print: true - avoid_relative_lib_imports: true - avoid_returning_null_for_future: true - avoid_slow_async_io: true - avoid_types_as_parameter_names: true - avoid_web_libraries_in_flutter: true - cancel_subscriptions: true - close_sinks: true - comment_references: true - control_flow_in_finally: true - empty_statements: true - hash_and_equals: true - invariant_booleans: true - iterable_contains_unrelated_type: true - list_remove_unrelated_type: true - literal_only_boolean_expressions: true - no_adjacent_strings_in_list: true - no_duplicate_case_values: true - no_logic_in_create_state: true - prefer_void_to_null: true - test_types_in_equals: true - throw_in_finally: true - unnecessary_statements: true - unrelated_type_equality_checks: true - unsafe_html: true - use_key_in_widget_constructors: true - valid_regexps: true - - # Pub rules. - package_names: true - sort_pub_dependencies: true diff --git a/packages/surf_lint_rules/lib/analysis_options.1.2.0.yaml b/packages/surf_lint_rules/lib/analysis_options.1.2.0.yaml deleted file mode 100644 index fe8e8745d..000000000 --- a/packages/surf_lint_rules/lib/analysis_options.1.2.0.yaml +++ /dev/null @@ -1,253 +0,0 @@ -include: package:pedantic/analysis_options.yaml - -analyzer: - plugins: - - dart_code_metrics - exclude: - - "build/**" - strong-mode: - implicit-casts: false - implicit-dynamic: false - errors: - always_use_package_imports: error - avoid_dynamic_calls: error - avoid_empty_else: error - avoid_print: error - avoid_relative_lib_imports: error - avoid_returning_null_for_future: error - avoid_slow_async_io: error - avoid_type_to_string: error - avoid_types_as_parameter_names: error - avoid_web_libraries_in_flutter: error - cancel_subscriptions: error - close_sinks: error - comment_references: error - control_flow_in_finally: error - empty_statements: error - hash_and_equals: error - invariant_booleans: error - iterable_contains_unrelated_type: error - list_remove_unrelated_type: error - literal_only_boolean_expressions: error - no_adjacent_strings_in_list: error - no_duplicate_case_values: error - no_logic_in_create_state: error - prefer_void_to_null: error - test_types_in_equals: error - throw_in_finally: error - unnecessary_statements: error - unrelated_type_equality_checks: error - unsafe_html: error - use_build_context_synchronously: error - use_key_in_widget_constructors: error - valid_regexps: error - -dart_code_metrics: - metrics-exclude: - - test/** - rules: - - avoid-returning-widgets: - ignored-names: - - makeTestableWidget - - binary-expression-operand-order - - no-equal-then-else - - prefer-trailing-comma - - member-ordering-extended: - alphabetize: false # TODO set true after code-dart_code_metrics update - order: - - public-static-const-fields - - private-static-const-fields - - public-static-final-fields - - private-static-final-fields - - public-static-fields - - private-static-fields - - public-final-fields - - private-final-fields - - public-fields - - public-getters-setters - - private-fields - - private-getters-setters - - constructors - - named-constructors - - factory-constructors - - overridden-methods - - public-static-methods - - public-methods - - protected-methods - - private-static-methods - - private-methods - -linter: - rules: - # Const rules. - prefer_const_constructors: true - prefer_const_constructors_in_immutables: true - prefer_const_declarations: true - prefer_const_literals_to_create_immutables: true - unnecessary_const: true - - # Error rules. - always_use_package_imports: true - avoid_dynamic_calls: true - avoid_empty_else: true - avoid_print: true - avoid_relative_lib_imports: true - avoid_returning_null_for_future: true - avoid_slow_async_io: true - avoid_type_to_string: true - avoid_types_as_parameter_names: true - avoid_web_libraries_in_flutter: true - cancel_subscriptions: true - close_sinks: true - comment_references: true - control_flow_in_finally: true - empty_statements: true - hash_and_equals: true - invariant_booleans: true - iterable_contains_unrelated_type: true - list_remove_unrelated_type: true - literal_only_boolean_expressions: true - no_adjacent_strings_in_list: true - no_duplicate_case_values: true - no_logic_in_create_state: true - prefer_void_to_null: true - test_types_in_equals: true - throw_in_finally: true - unnecessary_statements: true - unrelated_type_equality_checks: true - unsafe_html: true - use_build_context_synchronously: true - use_key_in_widget_constructors: true - valid_regexps: true - - # Style rules. - always_declare_return_types: true - always_put_required_named_parameters_first: true - always_require_non_null_named_parameters: true - annotate_overrides: true - avoid_annotating_with_dynamic: true - avoid_bool_literals_in_conditional_expressions: true - avoid_catches_without_on_clauses: true - avoid_catching_errors: true - avoid_equals_and_hash_code_on_mutable_classes: true - avoid_escaping_inner_quotes: true - avoid_field_initializers_in_const_classes: true - avoid_function_literals_in_foreach_calls: true - avoid_implementing_value_types: true - avoid_init_to_null: true - avoid_js_rounded_ints: true - avoid_multiple_declarations_per_line: true - avoid_null_checks_in_equality_operators: true - avoid_positional_boolean_parameters: true - avoid_private_typedef_functions: true - avoid_redundant_argument_values: true - avoid_renaming_method_parameters: true - avoid_return_types_on_setters: true - avoid_returning_null: true - avoid_returning_null_for_void: true - avoid_returning_this: true - avoid_setters_without_getters: true - avoid_shadowing_type_parameters: true - avoid_single_cascade_in_expression_statements: true - avoid_types_on_closure_parameters: true - avoid_unnecessary_containers: true - avoid_unused_constructor_parameters: true - avoid_void_async: true - await_only_futures: true - camel_case_extensions: true - camel_case_types: true - cascade_invocations: true - constant_identifier_names: true - curly_braces_in_flow_control_structures: true - deprecated_consistency: true - directives_ordering: true - do_not_use_environment: true - empty_catches: true - empty_constructor_bodies: true - exhaustive_cases: true - file_names: true - implementation_imports: true - leading_newlines_in_multiline_strings: true - library_names: true - library_prefixes: true - missing_whitespace_between_adjacent_strings: true - no_runtimeType_toString: true - non_constant_identifier_names: true - null_closures: true - omit_local_variable_types: true - one_member_abstracts: true - only_throw_errors: true - overridden_fields: true - package_api_docs: true - parameter_assignments: true - prefer_adjacent_string_concatenation: true - prefer_asserts_in_initializer_lists: true - prefer_collection_literals: true - prefer_conditional_assignment: true - prefer_constructors_over_static_methods: true - prefer_contains: true - prefer_equal_for_default_values: true - prefer_final_fields: true - prefer_final_in_for_each: true - prefer_final_locals: true - prefer_for_elements_to_map_fromIterable: true - prefer_function_declarations_over_variables: true - prefer_generic_function_type_aliases: true - prefer_if_elements_to_conditional_expressions: true - prefer_if_null_operators: true - prefer_initializing_formals: true - prefer_inlined_adds: true - prefer_interpolation_to_compose_strings: true - prefer_is_empty: true - prefer_is_not_empty: true - prefer_is_not_operator: true - prefer_iterable_whereType: true - prefer_mixin: true - prefer_null_aware_operators: true - prefer_single_quotes: true - prefer_spread_collections: true - prefer_typing_uninitialized_variables: true - provide_deprecation_message: true - public_member_api_docs: false - recursive_getters: true - sized_box_for_whitespace: true - slash_for_doc_comments: true - sort_child_properties_last: false - sort_constructors_first: false - sort_unnamed_constructors_first: false - type_annotate_public_apis: true - type_init_formals: true - unawaited_futures: true - unnecessary_await_in_return: true - unnecessary_brace_in_string_interps: true - unnecessary_getters_setters: true - unnecessary_lambdas: true - unnecessary_new: true - unnecessary_null_aware_assignments: true - unnecessary_null_checks: true - unnecessary_null_in_if_null_operators: true - unnecessary_nullable_for_final_variable_declarations: true - unnecessary_overrides: true - unnecessary_parenthesis: true - unnecessary_raw_strings: true - unnecessary_string_escapes: true - unnecessary_string_interpolations: true - unnecessary_this: true - use_full_hex_values_for_flutter_colors: true - use_function_type_syntax_for_parameters: true - use_if_null_to_convert_nulls_to_bools: true - use_is_even_rather_than_modulo: true - use_late_for_private_fields_and_variables: true - use_named_constants: true - use_raw_strings: true - use_rethrow_when_possible: true - use_setters_to_change_properties: true - use_string_buffers: true - use_to_and_as_if_applicable: true - void_checks: true - lines_longer_than_80_chars: false - flutter_style_todos: true - - # Pub rules. - package_names: true - sort_pub_dependencies: true diff --git a/packages/surf_lint_rules/lib/analysis_options.1.3.0.yaml b/packages/surf_lint_rules/lib/analysis_options.1.3.0.yaml deleted file mode 100644 index 7f388de13..000000000 --- a/packages/surf_lint_rules/lib/analysis_options.1.3.0.yaml +++ /dev/null @@ -1,253 +0,0 @@ -include: package:pedantic/analysis_options.yaml - -analyzer: - plugins: - - dart_code_metrics - exclude: - - "build/**" - strong-mode: - implicit-casts: false - implicit-dynamic: false - errors: - always_use_package_imports: error - avoid_dynamic_calls: error - avoid_empty_else: error - avoid_print: error - avoid_relative_lib_imports: error - avoid_returning_null_for_future: error - avoid_slow_async_io: error - avoid_type_to_string: error - avoid_types_as_parameter_names: error - avoid_web_libraries_in_flutter: error - cancel_subscriptions: error - close_sinks: error - comment_references: error - control_flow_in_finally: error - empty_statements: error - hash_and_equals: error - invariant_booleans: error - iterable_contains_unrelated_type: error - list_remove_unrelated_type: error - literal_only_boolean_expressions: error - no_adjacent_strings_in_list: error - no_duplicate_case_values: error - no_logic_in_create_state: error - prefer_void_to_null: error - test_types_in_equals: error - throw_in_finally: error - unnecessary_statements: error - unrelated_type_equality_checks: error - unsafe_html: error - use_build_context_synchronously: error - use_key_in_widget_constructors: error - valid_regexps: error - -dart_code_metrics: - metrics-exclude: - - test/** - rules: - - always-remove-listener - - avoid-returning-widgets - - avoid-unnecessary-setstate - - binary-expression-operand-order - - no-equal-then-else - - prefer-trailing-comma - - member-ordering-extended: - alphabetize: false # TODO set true after code-dart_code_metrics update - order: - - public-static-const-fields - - private-static-const-fields - - public-static-final-fields - - private-static-final-fields - - public-static-fields - - private-static-fields - - public-final-fields - - private-final-fields - - public-fields - - public-getters-setters - - private-fields - - private-getters-setters - - constructors - - named-constructors - - factory-constructors - - overridden-methods - - public-static-methods - - public-methods - - protected-methods - - private-static-methods - - private-methods - -linter: - rules: - # Const rules. - prefer_const_constructors: true - prefer_const_constructors_in_immutables: true - prefer_const_declarations: true - prefer_const_literals_to_create_immutables: true - unnecessary_const: true - - # Error rules. - always_use_package_imports: true - avoid_dynamic_calls: true - avoid_empty_else: true - avoid_print: true - avoid_relative_lib_imports: true - avoid_returning_null_for_future: true - avoid_slow_async_io: true - avoid_type_to_string: true - avoid_types_as_parameter_names: true - avoid_web_libraries_in_flutter: true - cancel_subscriptions: true - close_sinks: true - comment_references: true - control_flow_in_finally: true - empty_statements: true - hash_and_equals: true - invariant_booleans: true - iterable_contains_unrelated_type: true - list_remove_unrelated_type: true - literal_only_boolean_expressions: true - no_adjacent_strings_in_list: true - no_duplicate_case_values: true - no_logic_in_create_state: true - prefer_void_to_null: true - test_types_in_equals: true - throw_in_finally: true - unnecessary_statements: true - unrelated_type_equality_checks: true - unsafe_html: true - use_build_context_synchronously: true - use_key_in_widget_constructors: true - valid_regexps: true - - # Style rules. - always_declare_return_types: true - always_put_required_named_parameters_first: true - always_require_non_null_named_parameters: true - annotate_overrides: true - avoid_annotating_with_dynamic: true - avoid_bool_literals_in_conditional_expressions: true - avoid_catches_without_on_clauses: true - avoid_catching_errors: true - avoid_equals_and_hash_code_on_mutable_classes: true - avoid_escaping_inner_quotes: true - avoid_field_initializers_in_const_classes: true - avoid_function_literals_in_foreach_calls: true - avoid_implementing_value_types: true - avoid_init_to_null: true - avoid_js_rounded_ints: true - avoid_multiple_declarations_per_line: true - avoid_null_checks_in_equality_operators: true - avoid_positional_boolean_parameters: true - avoid_private_typedef_functions: true - avoid_redundant_argument_values: true - avoid_renaming_method_parameters: true - avoid_return_types_on_setters: true - avoid_returning_null: true - avoid_returning_null_for_void: true - avoid_returning_this: true - avoid_setters_without_getters: true - avoid_shadowing_type_parameters: true - avoid_single_cascade_in_expression_statements: true - avoid_types_on_closure_parameters: true - avoid_unnecessary_containers: true - avoid_unused_constructor_parameters: true - avoid_void_async: true - await_only_futures: true - camel_case_extensions: true - camel_case_types: true - cascade_invocations: true - constant_identifier_names: true - curly_braces_in_flow_control_structures: true - deprecated_consistency: true - directives_ordering: true - do_not_use_environment: true - empty_catches: true - empty_constructor_bodies: true - exhaustive_cases: true - file_names: true - implementation_imports: true - leading_newlines_in_multiline_strings: true - library_names: true - library_prefixes: true - missing_whitespace_between_adjacent_strings: true - no_runtimeType_toString: true - non_constant_identifier_names: true - null_closures: true - omit_local_variable_types: true - one_member_abstracts: true - only_throw_errors: true - overridden_fields: true - package_api_docs: true - parameter_assignments: true - prefer_adjacent_string_concatenation: true - prefer_asserts_in_initializer_lists: true - prefer_collection_literals: true - prefer_conditional_assignment: true - prefer_constructors_over_static_methods: true - prefer_contains: true - prefer_equal_for_default_values: true - prefer_final_fields: true - prefer_final_in_for_each: true - prefer_final_locals: true - prefer_for_elements_to_map_fromIterable: true - prefer_function_declarations_over_variables: true - prefer_generic_function_type_aliases: true - prefer_if_elements_to_conditional_expressions: true - prefer_if_null_operators: true - prefer_initializing_formals: true - prefer_inlined_adds: true - prefer_interpolation_to_compose_strings: true - prefer_is_empty: true - prefer_is_not_empty: true - prefer_is_not_operator: true - prefer_iterable_whereType: true - prefer_mixin: true - prefer_null_aware_operators: true - prefer_single_quotes: true - prefer_spread_collections: true - prefer_typing_uninitialized_variables: true - provide_deprecation_message: true - public_member_api_docs: false - recursive_getters: true - sized_box_for_whitespace: true - slash_for_doc_comments: true - sort_child_properties_last: false - sort_constructors_first: false - sort_unnamed_constructors_first: false - type_annotate_public_apis: true - type_init_formals: true - unawaited_futures: true - unnecessary_await_in_return: true - unnecessary_brace_in_string_interps: true - unnecessary_getters_setters: true - unnecessary_lambdas: true - unnecessary_new: true - unnecessary_null_aware_assignments: true - unnecessary_null_checks: true - unnecessary_null_in_if_null_operators: true - unnecessary_nullable_for_final_variable_declarations: true - unnecessary_overrides: true - unnecessary_parenthesis: true - unnecessary_raw_strings: true - unnecessary_string_escapes: true - unnecessary_string_interpolations: true - unnecessary_this: true - use_full_hex_values_for_flutter_colors: true - use_function_type_syntax_for_parameters: true - use_if_null_to_convert_nulls_to_bools: true - use_is_even_rather_than_modulo: true - use_late_for_private_fields_and_variables: true - use_named_constants: true - use_raw_strings: true - use_rethrow_when_possible: true - use_setters_to_change_properties: true - use_string_buffers: true - use_to_and_as_if_applicable: true - void_checks: true - lines_longer_than_80_chars: false - flutter_style_todos: true - - # Pub rules. - package_names: true - sort_pub_dependencies: true diff --git a/packages/surf_lint_rules/lib/analysis_options.1.4.0.yaml b/packages/surf_lint_rules/lib/analysis_options.1.4.0.yaml deleted file mode 100644 index e00c8e5af..000000000 --- a/packages/surf_lint_rules/lib/analysis_options.1.4.0.yaml +++ /dev/null @@ -1,253 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -analyzer: - plugins: - - dart_code_metrics - exclude: - - "build/**" - strong-mode: - implicit-casts: false - implicit-dynamic: false - errors: - always_use_package_imports: error - avoid_dynamic_calls: error - avoid_empty_else: error - avoid_print: error - avoid_relative_lib_imports: error - avoid_returning_null_for_future: error - avoid_slow_async_io: error - avoid_type_to_string: error - avoid_types_as_parameter_names: error - avoid_web_libraries_in_flutter: error - cancel_subscriptions: error - close_sinks: error - comment_references: error - control_flow_in_finally: error - empty_statements: error - hash_and_equals: error - invariant_booleans: error - iterable_contains_unrelated_type: error - list_remove_unrelated_type: error - literal_only_boolean_expressions: error - no_adjacent_strings_in_list: error - no_duplicate_case_values: error - no_logic_in_create_state: error - prefer_void_to_null: error - test_types_in_equals: error - throw_in_finally: error - unnecessary_statements: error - unrelated_type_equality_checks: error - unsafe_html: error - use_build_context_synchronously: error - use_key_in_widget_constructors: error - valid_regexps: error - -dart_code_metrics: - metrics-exclude: - - test/** - rules: - - always-remove-listener - - avoid-returning-widgets - - avoid-unnecessary-setstate - - binary-expression-operand-order - - no-equal-then-else - - prefer-trailing-comma - - member-ordering-extended: - alphabetize: false # TODO set true after code-dart_code_metrics update - order: - - public-static-const-fields - - private-static-const-fields - - public-static-final-fields - - private-static-final-fields - - public-static-fields - - private-static-fields - - public-final-fields - - private-final-fields - - public-fields - - public-getters-setters - - private-fields - - private-getters-setters - - constructors - - named-constructors - - factory-constructors - - overridden-methods - - public-static-methods - - public-methods - - protected-methods - - private-static-methods - - private-methods - -linter: - rules: - # Const rules. - prefer_const_constructors: true - prefer_const_constructors_in_immutables: true - prefer_const_declarations: true - prefer_const_literals_to_create_immutables: true - unnecessary_const: true - - # Error rules. - always_use_package_imports: true - avoid_dynamic_calls: true - avoid_empty_else: true - avoid_print: true - avoid_relative_lib_imports: true - avoid_returning_null_for_future: true - avoid_slow_async_io: true - avoid_type_to_string: true - avoid_types_as_parameter_names: true - avoid_web_libraries_in_flutter: true - cancel_subscriptions: true - close_sinks: true - comment_references: true - control_flow_in_finally: true - empty_statements: true - hash_and_equals: true - invariant_booleans: true - iterable_contains_unrelated_type: true - list_remove_unrelated_type: true - literal_only_boolean_expressions: true - no_adjacent_strings_in_list: true - no_duplicate_case_values: true - no_logic_in_create_state: true - prefer_void_to_null: true - test_types_in_equals: true - throw_in_finally: true - unnecessary_statements: true - unrelated_type_equality_checks: true - unsafe_html: true - use_build_context_synchronously: true - use_key_in_widget_constructors: true - valid_regexps: true - - # Style rules. - always_declare_return_types: true - always_put_required_named_parameters_first: true - always_require_non_null_named_parameters: true - annotate_overrides: true - avoid_annotating_with_dynamic: true - avoid_bool_literals_in_conditional_expressions: true - avoid_catches_without_on_clauses: true - avoid_catching_errors: true - avoid_equals_and_hash_code_on_mutable_classes: true - avoid_escaping_inner_quotes: true - avoid_field_initializers_in_const_classes: true - avoid_function_literals_in_foreach_calls: true - avoid_implementing_value_types: true - avoid_init_to_null: true - avoid_js_rounded_ints: true - avoid_multiple_declarations_per_line: true - avoid_null_checks_in_equality_operators: true - avoid_positional_boolean_parameters: true - avoid_private_typedef_functions: true - avoid_redundant_argument_values: true - avoid_renaming_method_parameters: true - avoid_return_types_on_setters: true - avoid_returning_null: true - avoid_returning_null_for_void: true - avoid_returning_this: true - avoid_setters_without_getters: true - avoid_shadowing_type_parameters: true - avoid_single_cascade_in_expression_statements: true - avoid_types_on_closure_parameters: true - avoid_unnecessary_containers: true - avoid_unused_constructor_parameters: true - avoid_void_async: true - await_only_futures: true - camel_case_extensions: true - camel_case_types: true - cascade_invocations: true - constant_identifier_names: true - curly_braces_in_flow_control_structures: true - deprecated_consistency: true - directives_ordering: true - do_not_use_environment: true - empty_catches: true - empty_constructor_bodies: true - exhaustive_cases: true - file_names: true - implementation_imports: true - leading_newlines_in_multiline_strings: true - library_names: true - library_prefixes: true - missing_whitespace_between_adjacent_strings: true - no_runtimeType_toString: true - non_constant_identifier_names: true - null_closures: true - omit_local_variable_types: true - one_member_abstracts: true - only_throw_errors: true - overridden_fields: true - package_api_docs: true - parameter_assignments: true - prefer_adjacent_string_concatenation: true - prefer_asserts_in_initializer_lists: true - prefer_collection_literals: true - prefer_conditional_assignment: true - prefer_constructors_over_static_methods: true - prefer_contains: true - prefer_equal_for_default_values: true - prefer_final_fields: true - prefer_final_in_for_each: true - prefer_final_locals: true - prefer_for_elements_to_map_fromIterable: true - prefer_function_declarations_over_variables: true - prefer_generic_function_type_aliases: true - prefer_if_elements_to_conditional_expressions: true - prefer_if_null_operators: true - prefer_initializing_formals: true - prefer_inlined_adds: true - prefer_interpolation_to_compose_strings: true - prefer_is_empty: true - prefer_is_not_empty: true - prefer_is_not_operator: true - prefer_iterable_whereType: true - prefer_mixin: true - prefer_null_aware_operators: true - prefer_single_quotes: true - prefer_spread_collections: true - prefer_typing_uninitialized_variables: true - provide_deprecation_message: true - public_member_api_docs: false - recursive_getters: true - sized_box_for_whitespace: true - slash_for_doc_comments: true - sort_child_properties_last: false - sort_constructors_first: false - sort_unnamed_constructors_first: false - type_annotate_public_apis: true - type_init_formals: true - unawaited_futures: true - unnecessary_await_in_return: true - unnecessary_brace_in_string_interps: true - unnecessary_getters_setters: true - unnecessary_lambdas: true - unnecessary_new: true - unnecessary_null_aware_assignments: true - unnecessary_null_checks: true - unnecessary_null_in_if_null_operators: true - unnecessary_nullable_for_final_variable_declarations: true - unnecessary_overrides: true - unnecessary_parenthesis: true - unnecessary_raw_strings: true - unnecessary_string_escapes: true - unnecessary_string_interpolations: true - unnecessary_this: true - use_full_hex_values_for_flutter_colors: true - use_function_type_syntax_for_parameters: true - use_if_null_to_convert_nulls_to_bools: true - use_is_even_rather_than_modulo: true - use_late_for_private_fields_and_variables: true - use_named_constants: true - use_raw_strings: true - use_rethrow_when_possible: true - use_setters_to_change_properties: true - use_string_buffers: true - use_to_and_as_if_applicable: true - void_checks: true - lines_longer_than_80_chars: false - flutter_style_todos: true - - # Pub rules. - package_names: true - sort_pub_dependencies: true diff --git a/packages/surf_lint_rules/lib/analysis_options.yaml b/packages/surf_lint_rules/lib/analysis_options.yaml deleted file mode 100644 index 33bfc6d89..000000000 --- a/packages/surf_lint_rules/lib/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.1.4.0.yaml diff --git a/packages/surf_lint_rules/lib/surf_lint_rules.dart b/packages/surf_lint_rules/lib/surf_lint_rules.dart deleted file mode 100644 index 8c36fc8e7..000000000 --- a/packages/surf_lint_rules/lib/surf_lint_rules.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Indicates to tools that `Future` is intentionally not `await`-ed. -/// -/// In an `async` context, it is normally expected that all `Future`s are -/// awaited, and that is the basis of the lint `unawaited_futures`. However, -/// there are times where one or more futures are intentionally not awaited. -/// This function may be used to ignore a particular future. It silences the -/// `unawaited_futures` lint. -void unawaited(Future? future) {} diff --git a/packages/surf_lint_rules/pubspec.yaml b/packages/surf_lint_rules/pubspec.yaml deleted file mode 100644 index e1565a526..000000000 --- a/packages/surf_lint_rules/pubspec.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: surf_lint_rules -version: 1.4.0 -description: Lint rules for "Surf" company for Dart and Flutter projects. -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/surf_lint_rules" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - dart_code_metrics: ^4.0.0-dev.2 - flutter_lints: ^1.0.3 - -environment: - sdk: ">=2.13.0 <3.0.0" diff --git a/packages/surf_logger/CHANGELOG.md b/packages/surf_logger/CHANGELOG.md deleted file mode 100644 index d1a787956..000000000 --- a/packages/surf_logger/CHANGELOG.md +++ /dev/null @@ -1,33 +0,0 @@ -# Changelog - -## 1.0.1 - 2021-05-30 - -* Stable release - -## 1.0.0-dev.1 - 2021-05-25 - -* Apply new lint rules. - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0`. - -## 0.0.1-dev.8 - -* Hide stacktrace in DebugLogStrategy output - -## 0.0.1-dev.6 - -* Replace print in DebugLogStrategy to third library Logger - -## 0.0.1-dev.5 - -* Fix lint hints - -## 0.0.1-dev.1 - -* fix errors - -## 0.0.1-dev.0 - -* initial release diff --git a/packages/surf_logger/CONTRIBUTING.md b/packages/surf_logger/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/surf_logger/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/surf_logger/LICENSE b/packages/surf_logger/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/surf_logger/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/surf_logger/README.md b/packages/surf_logger/README.md deleted file mode 100644 index 7267403eb..000000000 --- a/packages/surf_logger/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Surf Logger - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/surf_logger) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=surf_logger&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/surf_logger?logo=dart&logoColor=white)](https://pub.dev/packages/surf_logger) -[![Pub Likes](https://badgen.net/pub/likes/surf_logger)](https://pub.dev/packages/surf_logger) -[![Pub popularity](https://badgen.net/pub/popularity/surf_logger)](https://pub.dev/packages/surf_logger/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/surf_logger) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Logger for Dart & Flutter - -## Usage - -Main classes: - -* [Logger](./lib/src/logger.dart) -* [RemoteLogger](./lib/src/remote_logger.dart) - -## Logger - -[Logger](./lib/src/logger.dart) is used as a singleton. The main methods: - -* .`d` - debug -* .`w` - warn, for expected error -* .`e` - error - -You can use either [DebugLogStrategy](./lib/src/strategies/impl/debug_strategy.dart) as strategy for [Logger](./lib/src/logger.dart) or [RemoteLogStrategy](./lib/src/strategies/impl/remote_strategy.dart) for [RemoteLogger](./lib/src/remote_logger.dart). Or create your own strategy by implementing [LogStrategy](./lib/src/strategies/log_strategy.dart). - -When adding [RemoteLogStrategy](lib/src/strategies/impl/remote_strategy.dart) to the remote server, all logs are sent above the WARN level. - -In order not to pollute Crashlytics we use `Logger # w ()` for the expected errors. - -## Installation - -Add `surf_logger` to your `pubspec.yaml` file: - -```yaml -dependencies: - surf_logger: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/surf_logger/analysis_options.yaml b/packages/surf_logger/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/surf_logger/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/surf_logger/dart_dependency_validator.yaml b/packages/surf_logger/dart_dependency_validator.yaml deleted file mode 100644 index c69bdf12d..000000000 --- a/packages/surf_logger/dart_dependency_validator.yaml +++ /dev/null @@ -1,2 +0,0 @@ -exclude: - - "example/**" diff --git a/packages/surf_logger/example/.metadata b/packages/surf_logger/example/.metadata deleted file mode 100644 index e0236519d..000000000 --- a/packages/surf_logger/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 20e59316b8b8474554b38493b8ca888794b0234a - channel: stable - -project_type: app diff --git a/packages/surf_logger/example/analysis_options.yaml b/packages/surf_logger/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/surf_logger/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/surf_logger/example/android/app/build.gradle b/packages/surf_logger/example/android/app/build.gradle deleted file mode 100644 index 47d5e31c7..000000000 --- a/packages/surf_logger/example/android/app/build.gradle +++ /dev/null @@ -1,61 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.counter" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/packages/surf_logger/example/android/app/src/debug/AndroidManifest.xml b/packages/surf_logger/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index a091ca11a..000000000 --- a/packages/surf_logger/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/surf_logger/example/android/app/src/main/AndroidManifest.xml b/packages/surf_logger/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index ad3f1f648..000000000 --- a/packages/surf_logger/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/packages/surf_logger/example/android/app/src/main/java/com/example/counter/MainActivity.java b/packages/surf_logger/example/android/app/src/main/java/com/example/counter/MainActivity.java deleted file mode 100644 index 2aec4dccf..000000000 --- a/packages/surf_logger/example/android/app/src/main/java/com/example/counter/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.counter; - -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } -} diff --git a/packages/surf_logger/example/android/app/src/main/res/drawable/launch_background.xml b/packages/surf_logger/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/surf_logger/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/surf_logger/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/surf_logger/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/surf_logger/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_logger/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/surf_logger/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/surf_logger/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_logger/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/surf_logger/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/surf_logger/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_logger/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/surf_logger/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/surf_logger/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_logger/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/surf_logger/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/surf_logger/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_logger/example/android/app/src/main/res/values/styles.xml b/packages/surf_logger/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa4417c..000000000 --- a/packages/surf_logger/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/surf_logger/example/android/app/src/profile/AndroidManifest.xml b/packages/surf_logger/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index a091ca11a..000000000 --- a/packages/surf_logger/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/surf_logger/example/android/build.gradle b/packages/surf_logger/example/android/build.gradle deleted file mode 100644 index 6de372893..000000000 --- a/packages/surf_logger/example/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/surf_logger/example/android/gradle.properties b/packages/surf_logger/example/android/gradle.properties deleted file mode 100644 index 1441b1da9..000000000 --- a/packages/surf_logger/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M - -android.enableR8=true diff --git a/packages/surf_logger/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/surf_logger/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 63ab3ae08..000000000 --- a/packages/surf_logger/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/packages/surf_logger/example/android/settings.gradle b/packages/surf_logger/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/surf_logger/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/surf_logger/example/ios/Flutter/AppFrameworkInfo.plist b/packages/surf_logger/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/surf_logger/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/surf_logger/example/ios/Flutter/Debug.xcconfig b/packages/surf_logger/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba114..000000000 --- a/packages/surf_logger/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/surf_logger/example/ios/Flutter/Release.xcconfig b/packages/surf_logger/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e9340e..000000000 --- a/packages/surf_logger/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/packages/surf_logger/example/ios/Podfile b/packages/surf_logger/example/ios/Podfile deleted file mode 100644 index 64ba7492e..000000000 --- a/packages/surf_logger/example/ios/Podfile +++ /dev/null @@ -1,72 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def parse_KV_file(file, separator='=') - file_abs_path = File.expand_path(file) - if !File.exists? file_abs_path - return []; - end - pods_ary = [] - skip_line_start_symbols = ["#", "/"] - File.foreach(file_abs_path) { |line| - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } - plugin = line.split(pattern=separator) - if plugin.length == 2 - podname = plugin[0].strip() - path = plugin[1].strip() - podpath = File.expand_path("#{path}", file_abs_path) - pods_ary.push({:name => podname, :path => podpath}); - else - puts "Invalid plugin specification: #{line}" - end - } - return pods_ary -end - -target 'Runner' do - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - system('rm -rf .symlinks') - system('mkdir -p .symlinks/plugins') - - # Flutter Pods - generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') - if generated_xcode_build_settings.empty? - puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first." - end - generated_xcode_build_settings.map { |p| - if p[:name] == 'FLUTTER_FRAMEWORK_DIR' - symlink = File.join('.symlinks', 'flutter') - File.symlink(File.dirname(p[:path]), symlink) - pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) - end - } - - # Plugin Pods - plugin_pods = parse_KV_file('../.flutter-plugins') - plugin_pods.map { |p| - symlink = File.join('.symlinks', 'plugins', p[:name]) - File.symlink(p[:path], symlink) - pod p[:name], :path => File.join(symlink, 'ios') - } -end - -# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. -install! 'cocoapods', :disable_input_output_paths => true - -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - end - end -end diff --git a/packages/surf_logger/example/ios/Runner.xcodeproj/project.pbxproj b/packages/surf_logger/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index acabab0e5..000000000 --- a/packages/surf_logger/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,562 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 8C0E7E047318822C929E973D /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B2F6CEBA2E9ED9E962DC142 /* libPods-Runner.a */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 2B2F6CEBA2E9ED9E962DC142 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 8137D3FBFCFC177B6837C1EF /* 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 = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BC89F9FEF58F58C49D29C8FE /* 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 = ""; }; - CEB92397D5A364FE1A4E9179 /* 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8C0E7E047318822C929E973D /* libPods-Runner.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 4B90B39E111A14E76B733CFA /* Pods */ = { - isa = PBXGroup; - children = ( - CEB92397D5A364FE1A4E9179 /* Pods-Runner.debug.xcconfig */, - 8137D3FBFCFC177B6837C1EF /* Pods-Runner.release.xcconfig */, - BC89F9FEF58F58C49D29C8FE /* Pods-Runner.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - 4B90B39E111A14E76B733CFA /* Pods */, - A3288C6F132A542CD9F192CA /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - A3288C6F132A542CD9F192CA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 2B2F6CEBA2E9ED9E962DC142 /* libPods-Runner.a */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 4559C73D3D3D06190882F9F1 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 68B3D0BA54726A090DF40A53 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 4559C73D3D3D06190882F9F1 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "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"; - showEnvVarsInLog = 0; - }; - 68B3D0BA54726A090DF40A53 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = S8QB4VV633; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/surf_logger/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/surf_logger/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/packages/surf_logger/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/surf_logger/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/surf_logger/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/surf_logger/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_logger/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/surf_logger/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14c..000000000 --- a/packages/surf_logger/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/packages/surf_logger/example/ios/Runner/AppDelegate.h b/packages/surf_logger/example/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bbf9..000000000 --- a/packages/surf_logger/example/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/packages/surf_logger/example/ios/Runner/AppDelegate.m b/packages/surf_logger/example/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e90b..000000000 --- a/packages/surf_logger/example/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index bd77dd655..000000000 --- a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 3d43d11e6..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index a91bfcd30..000000000 --- a/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "LaunchImage.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/surf_logger/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/surf_logger/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/surf_logger/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/surf_logger/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_logger/example/ios/Runner/Base.lproj/Main.storyboard b/packages/surf_logger/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/surf_logger/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_logger/example/ios/Runner/Info.plist b/packages/surf_logger/example/ios/Runner/Info.plist deleted file mode 100644 index 235197370..000000000 --- a/packages/surf_logger/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - counter - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/surf_logger/example/ios/Runner/main.m b/packages/surf_logger/example/ios/Runner/main.m deleted file mode 100644 index dff6597e4..000000000 --- a/packages/surf_logger/example/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/packages/surf_logger/example/lib/main.dart b/packages/surf_logger/example/lib/main.dart deleted file mode 100644 index b0456281f..000000000 --- a/packages/surf_logger/example/lib/main.dart +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:surf_logger/surf_logger.dart'; - -void main() { - _initLogger(); - runApp(MyApp()); -} - -void _initLogger() { - Logger.addStrategy(DebugLogStrategy()); -} - -class MyApp extends StatelessWidget { - MyApp({Key? key}) : super(key: key) { - Logger.d('MyApp constructor'); - } - - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - Logger.d('MyApp build'); - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - MyHomePage({ - required this.title, - Key? key, - }) : super(key: key) { - Logger.d('MyHomePage constructor'); - } - - final String title; - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - _MyHomePageState() { - Logger.d('MyHomePageState constructor'); - } - - int _counter = 0; - - void _incrementCounter() { - Logger.d('counter value = $_counter before setState'); - setState(() { - _counter++; - }); - Logger.d('counter value = $_counter after setState'); - } - - @override - void initState() { - Logger.d('MyHomePageState initState'); - super.initState(); - } - - @override - Widget build(BuildContext context) { - Logger.d('MyHomePageState build'); - return Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headline4, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), - ); - } -} diff --git a/packages/surf_logger/example/pubspec.yaml b/packages/surf_logger/example/pubspec.yaml deleted file mode 100644 index 5de5a78a2..000000000 --- a/packages/surf_logger/example/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: example -description: Example -version: 1.0.0 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - surf_logger: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/surf_logger/lib/src/const.dart b/packages/surf_logger/lib/src/const.dart deleted file mode 100644 index 45dff23c1..000000000 --- a/packages/surf_logger/lib/src/const.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Set of constants for the logger - -/// logging priorities -const priorityLogDebug = 1; -const priorityLogWarn = 2; -const priorityLogError = 3; - -const prefixLogDebug = 'DEBUG_INFO'; -const prefixLogWarn = 'DEBUG_WARN'; -const prefixLogError = 'DEBUG_ERROR'; diff --git a/packages/surf_logger/lib/src/logger.dart b/packages/surf_logger/lib/src/logger.dart deleted file mode 100644 index eb4273e82..000000000 --- a/packages/surf_logger/lib/src/logger.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:surf_logger/src/const.dart'; -import 'package:surf_logger/src/strategies/log_strategy.dart'; - -/// Wrapping for logging using various strategies -class Logger { - static final _strategies = {}; - - /// debug - static void d(String msg, [Exception? error]) { - _forAllStrategies( - (strategy) => strategy.log(msg, priorityLogDebug, error), - ); - } - - /// warn (for expected errors) - static void w(String msg, [Exception? error]) { - _forAllStrategies( - (strategy) => strategy.log(msg, priorityLogWarn, error), - ); - } - - /// error (for errors) - static void e(String msg, [Exception? error]) { - _forAllStrategies( - (strategy) => strategy.log(msg, priorityLogError, error), - ); - } - - static void addStrategy(LogStrategy strategy) { - _strategies[strategy.runtimeType] = strategy; - } - - static void removeStrategy(LogStrategy strategy) { - _strategies.remove(strategy.runtimeType); - } - - static void _forAllStrategies(Function(LogStrategy) action) { - _strategies.values.forEach(action); - } -} diff --git a/packages/surf_logger/lib/src/remote/strategies/remote_log_user_strategy.dart b/packages/surf_logger/lib/src/remote/strategies/remote_log_user_strategy.dart deleted file mode 100644 index 44c42a23b..000000000 --- a/packages/surf_logger/lib/src/remote/strategies/remote_log_user_strategy.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Strategy for sending logs of user to a remote server -abstract class RemoteUserLogStrategy { - void setUser(String id, String username, String email); - - void clearUser(); - - void log(String message); - - void logError(Exception error); - - void logInfo(String key, Object? info); -} diff --git a/packages/surf_logger/lib/src/remote_logger.dart b/packages/surf_logger/lib/src/remote_logger.dart deleted file mode 100644 index b215017db..000000000 --- a/packages/surf_logger/lib/src/remote_logger.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:surf_logger/src/remote/strategies/remote_log_user_strategy.dart'; - -/// Wrapper for logging to a remote server -/// using various strategies -class RemoteLogger { - static final _strategies = {}; - - static void setUser(String id, String username, String email) { - _forAllStrategies((strategy) => strategy.setUser(id, username, email)); - } - - static void clearUser() { - _forAllStrategies((strategy) => strategy.clearUser()); - } - - static void log(String message) { - _forAllStrategies((strategy) => strategy.log(message)); - } - - static void logError(Exception error) { - _forAllStrategies((strategy) => strategy.logError(error)); - } - - static void logInfo(String key, Object info) { - _forAllStrategies((strategy) => strategy.logInfo(key, info)); - } - - static void addStrategy(RemoteUserLogStrategy strategy) { - _strategies[strategy.runtimeType] = strategy; - } - - static void removeStrategy(RemoteUserLogStrategy strategy) { - _strategies.remove(strategy.runtimeType); - } - - static void _forAllStrategies(Function(RemoteUserLogStrategy) action) { - _strategies.values.forEach(action); - } -} diff --git a/packages/surf_logger/lib/src/strategies/impl/debug_strategy.dart b/packages/surf_logger/lib/src/strategies/impl/debug_strategy.dart deleted file mode 100644 index 89747e96a..000000000 --- a/packages/surf_logger/lib/src/strategies/impl/debug_strategy.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:logger/logger.dart'; -import 'package:surf_logger/src/const.dart'; -import 'package:surf_logger/src/strategies/log_strategy.dart'; - -/// Strategy for log output to console -/// * used for local debugging -class DebugLogStrategy extends LogStrategy { - DebugLogStrategy([Logger? logger]) - : _logger = logger ??= Logger(printer: PrettyPrinter(methodCount: 0)); - - final Logger _logger; - - @override - void log(String message, int priority, [Exception? error]) { - if (error != null) { - _logger.e(message, error); - } else { - _logMessage(message, priority); - } - } - - void _logMessage(String message, int priority) { - switch (priority) { - case priorityLogDebug: - _logger.d(message); - break; - case priorityLogWarn: - _logger.w(message); - break; - case priorityLogError: - _logger.e(message); - break; - default: - _logger.d(message); - } - } -} diff --git a/packages/surf_logger/lib/src/strategies/impl/remote_strategy.dart b/packages/surf_logger/lib/src/strategies/impl/remote_strategy.dart deleted file mode 100644 index c3c9afcfe..000000000 --- a/packages/surf_logger/lib/src/strategies/impl/remote_strategy.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:surf_logger/src/const.dart'; -import 'package:surf_logger/src/remote_logger.dart'; -import 'package:surf_logger/src/strategies/log_strategy.dart'; - -const minRemotePriority = priorityLogWarn; - -/// Strategy for sending logs to a remote server -/// * logs are sent starting from [minRemotePriority] -class RemoteLogStrategy extends LogStrategy { - @override - void log(String message, int priority, [Exception? error]) { - if (priority < minRemotePriority) return; - - RemoteLogger.log(message); - - if (error != null) { - RemoteLogger.logError(error); - } - } -} diff --git a/packages/surf_logger/lib/src/strategies/log_strategy.dart b/packages/surf_logger/lib/src/strategies/log_strategy.dart deleted file mode 100644 index d79c2c2ae..000000000 --- a/packages/surf_logger/lib/src/strategies/log_strategy.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// ignore: one_member_abstracts -abstract class LogStrategy { - void log(String message, int priority, [Exception? error]); -} diff --git a/packages/surf_logger/lib/surf_logger.dart b/packages/surf_logger/lib/surf_logger.dart deleted file mode 100644 index bcb41bfd4..000000000 --- a/packages/surf_logger/lib/surf_logger.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:surf_logger/src/logger.dart' show Logger; -export 'package:surf_logger/src/remote/strategies/remote_log_user_strategy.dart'; -export 'package:surf_logger/src/remote_logger.dart' show RemoteLogger; -export 'package:surf_logger/src/strategies/impl/debug_strategy.dart'; -export 'package:surf_logger/src/strategies/impl/remote_strategy.dart'; diff --git a/packages/surf_logger/pubspec.yaml b/packages/surf_logger/pubspec.yaml deleted file mode 100644 index 31935db39..000000000 --- a/packages/surf_logger/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: surf_logger -version: 1.0.1 -description: "Logger for Dart & Flutter" -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/surf_logger" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - logger: ^1.0.0 - -dev_dependencies: - mocktail: ^0.1.1 - surf_lint_rules: ^1.0.0 - test: ^1.16.0 - -environment: - sdk: ">=2.12.0 <3.0.0" diff --git a/packages/surf_logger/test/logger_test.dart b/packages/surf_logger/test/logger_test.dart deleted file mode 100644 index fdcdc7bf1..000000000 --- a/packages/surf_logger/test/logger_test.dart +++ /dev/null @@ -1,104 +0,0 @@ -import 'package:mocktail/mocktail.dart'; -import 'package:surf_logger/src/const.dart'; -import 'package:surf_logger/surf_logger.dart'; -import 'package:test/test.dart'; - -class DebugLogStrategyMock extends Mock implements DebugLogStrategy {} - -class RemoteLogStrategyMock extends Mock implements RemoteLogStrategy {} - -void main() { - group('Logger', () { - const debug = 'debug'; - const warning = 'warning'; - const error = 'error'; - - late DebugLogStrategyMock debugStrategy; - late RemoteLogStrategyMock remoteStrategy; - - setUp(() { - debugStrategy = DebugLogStrategyMock(); - remoteStrategy = RemoteLogStrategyMock(); - }); - - test('works with DebugLogStrategy', () { - Logger.addStrategy(debugStrategy); - - Logger.d(debug); - verify(() => debugStrategy.log(debug, priorityLogDebug)); - - Logger.w(warning); - verify(() => debugStrategy.log(warning, priorityLogWarn)); - - Logger.e(error); - verify(() => debugStrategy.log(error, priorityLogError)); - - Logger.removeStrategy(debugStrategy); - - Logger.d(debug); - verifyNever(() => debugStrategy.log(debug, priorityLogDebug)); - - Logger.w(warning); - verifyNever(() => debugStrategy.log(warning, priorityLogWarn)); - - Logger.e(error); - verifyNever(() => debugStrategy.log(error, priorityLogError)); - }); - - test('works with RemoteLogStrategy', () { - Logger.addStrategy(remoteStrategy); - - Logger.d(debug); - verify(() => remoteStrategy.log(debug, priorityLogDebug)); - - Logger.w(warning); - verify(() => remoteStrategy.log(warning, priorityLogWarn)); - - Logger.e(error); - verify(() => remoteStrategy.log(error, priorityLogError)); - - Logger.removeStrategy(remoteStrategy); - - Logger.d(debug); - verifyNever(() => remoteStrategy.log(debug, priorityLogDebug)); - - Logger.w(warning); - verifyNever(() => remoteStrategy.log(warning, priorityLogWarn)); - - Logger.e(error); - verifyNever(() => remoteStrategy.log(error, priorityLogError)); - }); - - test('works both strategies', () { - Logger.addStrategy(debugStrategy); - Logger.addStrategy(remoteStrategy); - - Logger.d(debug); - verify(() => remoteStrategy.log(debug, priorityLogDebug)); - verify(() => debugStrategy.log(debug, priorityLogDebug)); - - Logger.removeStrategy(debugStrategy); - - Logger.d(debug); - verify(() => remoteStrategy.log(debug, priorityLogDebug)); - verifyNever(() => debugStrategy.log(debug, priorityLogDebug)); - - Logger.removeStrategy(remoteStrategy); - - Logger.d(debug); - verifyNever(() => remoteStrategy.log(debug, priorityLogDebug)); - verifyNever(() => debugStrategy.log(debug, priorityLogDebug)); - }); - - test('works with exceptions', () { - Logger.addStrategy(debugStrategy); - Logger.addStrategy(remoteStrategy); - - final e = Exception('eception'); - - Logger.d(debug, e); - verify(() => debugStrategy.log(debug, priorityLogDebug, e)); - verify(() => remoteStrategy.log(debug, priorityLogDebug, e)); - }); - }); -} diff --git a/packages/surf_logger/test/remote_logger_test.dart b/packages/surf_logger/test/remote_logger_test.dart deleted file mode 100644 index 22639798c..000000000 --- a/packages/surf_logger/test/remote_logger_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -import 'package:mocktail/mocktail.dart'; -import 'package:surf_logger/surf_logger.dart'; -import 'package:test/test.dart'; - -class RemoteUserLogStrategyMock extends Mock implements RemoteUserLogStrategy {} - -void main() { - group('RemoteLogger', () { - const userId = '0'; - const username = 'test'; - const email = 'test@example.com'; - - late RemoteUserLogStrategyMock strategyMock; - - setUp(() { - strategyMock = RemoteUserLogStrategyMock(); - }); - - test("setUser calls strategy's setUser", () { - RemoteLogger.addStrategy(strategyMock); - - RemoteLogger.setUser(userId, username, email); - verify(() => strategyMock.setUser(userId, username, email)); - - RemoteLogger.removeStrategy(strategyMock); - RemoteLogger.setUser(userId, username, email); - verifyNever(() => strategyMock.setUser(userId, username, email)); - }); - - test("clearUser calls strategy's clearUser", () { - RemoteLogger.addStrategy(strategyMock); - - RemoteLogger.clearUser(); - verify(() => strategyMock.clearUser()); - - RemoteLogger.removeStrategy(strategyMock); - RemoteLogger.clearUser(); - verifyNever(() => strategyMock.clearUser()); - }); - - test("logs calls strategy's logs", () { - const message = 'Howdy'; - final exception = Exception('exception'); - const key = 'key'; - const info = {'wow': 'wow'}; - - RemoteLogger.addStrategy(strategyMock); - - RemoteLogger.log(message); - verify(() => strategyMock.log(message)); - - RemoteLogger.logError(exception); - verify(() => strategyMock.logError(exception)); - - RemoteLogger.logInfo(key, info); - verify(() => strategyMock.logInfo('key', info)); - - RemoteLogger.removeStrategy(strategyMock); - - RemoteLogger.log(message); - verifyNever(() => strategyMock.log(message)); - RemoteLogger.logError(exception); - verifyNever(() => strategyMock.logError(exception)); - RemoteLogger.logInfo(key, info); - verifyNever(() => strategyMock.logInfo(key, 'info')); - }); - - test('add method supposed to set an old value to a new one', () { - final strategyMock2 = RemoteUserLogStrategyMock(); - RemoteLogger.addStrategy(strategyMock); - RemoteLogger.addStrategy(strategyMock2); - - /// This method should remove both strategies - RemoteLogger.removeStrategy(strategyMock); - - RemoteLogger.log('message'); - verifyNever(() => strategyMock2.log('message')); - }); - }); -} diff --git a/packages/surf_logger/test/strategies/impl/debug_strategy_test.dart b/packages/surf_logger/test/strategies/impl/debug_strategy_test.dart deleted file mode 100644 index cbec9b97b..000000000 --- a/packages/surf_logger/test/strategies/impl/debug_strategy_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:logger/logger.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:surf_logger/src/const.dart'; -import 'package:surf_logger/src/strategies/impl/debug_strategy.dart'; -import 'package:test/test.dart'; - -class LoggerMock extends Mock implements Logger {} - -void main() { - group('DebugLogStrategy', () { - late LoggerMock logger; - late DebugLogStrategy strategy; - - setUp(() { - logger = LoggerMock(); - strategy = DebugLogStrategy(logger); - }); - - test('log calls appropriate logger method', () { - const message = 'simple message'; - - strategy.log(message, priorityLogDebug); - verify(() => logger.d(message)); - - strategy.log(message, priorityLogWarn); - verify(() => logger.w(message)); - - strategy.log(message, priorityLogError); - verify(() => logger.e(message)); - - strategy.log(message, 100500); - verify(() => logger.d(message)); - }); - - test('log with Exception always calls error logger method', () { - const message = 'simple message'; - final exception = Exception('simple exception message'); - - strategy.log(message, priorityLogDebug, exception); - verify(() => logger.e(message, exception)); - - strategy.log(message, priorityLogWarn, exception); - verify(() => logger.e(message, exception)); - - strategy.log(message, priorityLogError, exception); - verify(() => logger.e(message, exception)); - - strategy.log(message, 100500, exception); - verify(() => logger.e(message, exception)); - }); - }); -} diff --git a/packages/surf_logger/test/strategies/impl/remote_strategy_test.dart b/packages/surf_logger/test/strategies/impl/remote_strategy_test.dart deleted file mode 100644 index a72dfda02..000000000 --- a/packages/surf_logger/test/strategies/impl/remote_strategy_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:mocktail/mocktail.dart'; -import 'package:surf_logger/src/const.dart'; -import 'package:surf_logger/surf_logger.dart'; -import 'package:test/test.dart'; - -class RemoteUserLogStrategyMock extends Mock implements RemoteUserLogStrategy {} - -void main() { - group('RemoteLogStrategy', () { - const message = 'test message'; - - late RemoteLogStrategy strategy; - late RemoteUserLogStrategyMock userStrategyMock; - - setUp(() { - strategy = RemoteLogStrategy(); - userStrategyMock = RemoteUserLogStrategyMock(); - }); - - test('log with 3rd (highest) priority', () { - RemoteLogger.addStrategy(userStrategyMock); - strategy.log(message, priorityLogError); - verify(() => userStrategyMock.log(message)); - - RemoteLogger.removeStrategy(userStrategyMock); - strategy.log(message, priorityLogError); - verifyNever(() => userStrategyMock.log(message)); - }); - - test('log with 2nd (medium) priority', () { - RemoteLogger.addStrategy(userStrategyMock); - strategy.log(message, priorityLogWarn); - verify(() => userStrategyMock.log(message)); - - RemoteLogger.removeStrategy(userStrategyMock); - strategy.log(message, priorityLogWarn); - verifyNever(() => userStrategyMock.log(message)); - }); - - test("don't log with 1nd (lowest) priority", () { - RemoteLogger.addStrategy(userStrategyMock); - strategy.log(message, priorityLogDebug); - verifyNever(() => userStrategyMock.log(message)); - - RemoteLogger.removeStrategy(userStrategyMock); - strategy.log(message, priorityLogDebug); - verifyNever(() => userStrategyMock.log(message)); - }); - - test('log errors', () { - final error = Exception('some exception'); - RemoteLogger.addStrategy(userStrategyMock); - strategy.log(message, priorityLogError, error); - verify(() => userStrategyMock.log(message)); - verify(() => userStrategyMock.logError(error)); - - strategy.log(message, priorityLogWarn, error); - verify(() => userStrategyMock.log(message)); - verify(() => userStrategyMock.logError(error)); - - /// This message shouldn't be logged since lowest priority - strategy.log(message, priorityLogDebug, error); - verifyNever(() => userStrategyMock.log(message)); - verifyNever(() => userStrategyMock.logError(error)); - }); - }); -} diff --git a/packages/surf_mwwm/.gitignore b/packages/surf_mwwm/.gitignore deleted file mode 100644 index e348147fd..000000000 --- a/packages/surf_mwwm/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ -*.lock - -.idea - -build/ -**/android/**/GeneratedPluginRegistrant.java -ios/.generated/ -ios/Flutter/Generated.xcconfig -ios/Runner/GeneratedPluginRegistrant.* diff --git a/packages/surf_mwwm/.metadata b/packages/surf_mwwm/.metadata deleted file mode 100644 index 281f231a6..000000000 --- a/packages/surf_mwwm/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713 - channel: stable - -project_type: package diff --git a/packages/surf_mwwm/CHANGELOG.md b/packages/surf_mwwm/CHANGELOG.md deleted file mode 100644 index de59e32da..000000000 --- a/packages/surf_mwwm/CHANGELOG.md +++ /dev/null @@ -1,44 +0,0 @@ -# Changelog - -## 2.0.2 - 2021-06-28 - -* Stable release - -## 2.0.2-dev.1 - 2021-06-21 - -* switch on `relation` 3.1.0-dev.1 - -## 2.0.1 - 2021-06-15 - -* Stable release - -## 2.0.1-dev.1 - 2021-06-11 - -* OldWidgetState fixed to be state of _ProxyMwwmWidget instead of CoreMwwmWidget - -## 2.0.0 - 2021-06-07 - -* Stable release - -## 2.0.0-dev.1 - 2021-06-04 - -* Added `bindVoid` extension to bind `VoidAction`s -* Added `OldWidgetState` to simplify migration of projects with legacy codebase to new mwwm -* Removed null type of generic in `bind` - -## 1.0.1 - 2021-05-30 - -* Stable release - -## 1.0.1-dev.1 - 2021-05-25 - -* Update `relation` dependency to `2.0.0`. -* Update `rxdart` dependency to `0.27.0`. - -## 1.0.0 - -* Migrate this package to null safety. - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/surf_mwwm/CONTRIBUTING.md b/packages/surf_mwwm/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/surf_mwwm/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/surf_mwwm/LICENSE b/packages/surf_mwwm/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/surf_mwwm/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/surf_mwwm/README.md b/packages/surf_mwwm/README.md deleted file mode 100644 index d9a48ba49..000000000 --- a/packages/surf_mwwm/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# Surf MWWM - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/surf_mwwm) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=surf_mwwm&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/surf_mwwm?logo=dart&logoColor=white)](https://pub.dev/packages/surf_mwwm) -[![Pub Likes](https://badgen.net/pub/likes/surf_mwwm)](https://pub.dev/packages/surf_mwwm) -[![Pub popularity](https://badgen.net/pub/popularity/surf_mwwm)](https://pub.dev/packages/surf_mwwm/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/surf_mwwm) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru/). - -## About - -Reflection of widget in a single entity - -## Installation - -Add `surf_mwwm` to your `pubspec.yaml` file: - -```yaml -dependencies: - surf_mwwm: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -You PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/surf_mwwm/analysis_options.yaml b/packages/surf_mwwm/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/surf_mwwm/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/surf_mwwm/dart_dependency_validator.yaml b/packages/surf_mwwm/dart_dependency_validator.yaml deleted file mode 100644 index 71f4e3c68..000000000 --- a/packages/surf_mwwm/dart_dependency_validator.yaml +++ /dev/null @@ -1,2 +0,0 @@ -exclude: - - "example/**" \ No newline at end of file diff --git a/packages/surf_mwwm/example/.gitignore b/packages/surf_mwwm/example/.gitignore deleted file mode 100644 index 10c16abd6..000000000 --- a/packages/surf_mwwm/example/.gitignore +++ /dev/null @@ -1,74 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* -**/ios/Podfile - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/surf_mwwm/example/.metadata b/packages/surf_mwwm/example/.metadata deleted file mode 100644 index e0236519d..000000000 --- a/packages/surf_mwwm/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 20e59316b8b8474554b38493b8ca888794b0234a - channel: stable - -project_type: app diff --git a/packages/surf_mwwm/example/analysis_options.yaml b/packages/surf_mwwm/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/surf_mwwm/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/surf_mwwm/example/android/app/build.gradle b/packages/surf_mwwm/example/android/app/build.gradle deleted file mode 100644 index 47d5e31c7..000000000 --- a/packages/surf_mwwm/example/android/app/build.gradle +++ /dev/null @@ -1,61 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.counter" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/packages/surf_mwwm/example/android/app/src/debug/AndroidManifest.xml b/packages/surf_mwwm/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index a091ca11a..000000000 --- a/packages/surf_mwwm/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/surf_mwwm/example/android/app/src/main/AndroidManifest.xml b/packages/surf_mwwm/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index ad3f1f648..000000000 --- a/packages/surf_mwwm/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/packages/surf_mwwm/example/android/app/src/main/java/com/example/counter/MainActivity.java b/packages/surf_mwwm/example/android/app/src/main/java/com/example/counter/MainActivity.java deleted file mode 100644 index 2aec4dccf..000000000 --- a/packages/surf_mwwm/example/android/app/src/main/java/com/example/counter/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.counter; - -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } -} diff --git a/packages/surf_mwwm/example/android/app/src/main/res/drawable/launch_background.xml b/packages/surf_mwwm/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/surf_mwwm/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/surf_mwwm/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/surf_mwwm/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/surf_mwwm/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_mwwm/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/surf_mwwm/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/surf_mwwm/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_mwwm/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/surf_mwwm/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/surf_mwwm/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_mwwm/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/surf_mwwm/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/surf_mwwm/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_mwwm/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/surf_mwwm/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/surf_mwwm/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_mwwm/example/android/app/src/main/res/values/styles.xml b/packages/surf_mwwm/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa4417c..000000000 --- a/packages/surf_mwwm/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/surf_mwwm/example/android/app/src/profile/AndroidManifest.xml b/packages/surf_mwwm/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index a091ca11a..000000000 --- a/packages/surf_mwwm/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/surf_mwwm/example/android/build.gradle b/packages/surf_mwwm/example/android/build.gradle deleted file mode 100644 index bb8a30389..000000000 --- a/packages/surf_mwwm/example/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/surf_mwwm/example/android/gradle.properties b/packages/surf_mwwm/example/android/gradle.properties deleted file mode 100644 index 1441b1da9..000000000 --- a/packages/surf_mwwm/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M - -android.enableR8=true diff --git a/packages/surf_mwwm/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/surf_mwwm/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 2819f022f..000000000 --- a/packages/surf_mwwm/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/packages/surf_mwwm/example/android/settings.gradle b/packages/surf_mwwm/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/surf_mwwm/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/surf_mwwm/example/ios/Flutter/AppFrameworkInfo.plist b/packages/surf_mwwm/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/surf_mwwm/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/surf_mwwm/example/ios/Flutter/Debug.xcconfig b/packages/surf_mwwm/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/surf_mwwm/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/surf_mwwm/example/ios/Flutter/Flutter.podspec b/packages/surf_mwwm/example/ios/Flutter/Flutter.podspec deleted file mode 100644 index 5ca30416b..000000000 --- a/packages/surf_mwwm/example/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'High-performance, high-fidelity mobile apps.' - s.description = <<-DESC -Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. - DESC - s.homepage = 'https://flutter.io' - s.license = { :type => 'MIT' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - s.vendored_frameworks = 'Flutter.framework' -end diff --git a/packages/surf_mwwm/example/ios/Flutter/Release.xcconfig b/packages/surf_mwwm/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/surf_mwwm/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/surf_mwwm/example/ios/Runner.xcodeproj/project.pbxproj b/packages/surf_mwwm/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index fa55581b7..000000000 --- a/packages/surf_mwwm/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,497 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = S8QB4VV633; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.counter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/surf_mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/surf_mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/surf_mwwm/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/surf_mwwm/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/surf_mwwm/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/surf_mwwm/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_mwwm/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/surf_mwwm/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/surf_mwwm/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/surf_mwwm/example/ios/Runner/AppDelegate.h b/packages/surf_mwwm/example/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bbf9..000000000 --- a/packages/surf_mwwm/example/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/packages/surf_mwwm/example/ios/Runner/AppDelegate.m b/packages/surf_mwwm/example/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e90b..000000000 --- a/packages/surf_mwwm/example/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index bd77dd655..000000000 --- a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 3d43d11e6..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index a91bfcd30..000000000 --- a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "LaunchImage.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/surf_mwwm/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/surf_mwwm/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/surf_mwwm/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/surf_mwwm/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_mwwm/example/ios/Runner/Base.lproj/Main.storyboard b/packages/surf_mwwm/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/surf_mwwm/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_mwwm/example/ios/Runner/Info.plist b/packages/surf_mwwm/example/ios/Runner/Info.plist deleted file mode 100644 index 235197370..000000000 --- a/packages/surf_mwwm/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - counter - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/surf_mwwm/example/ios/Runner/main.m b/packages/surf_mwwm/example/ios/Runner/main.m deleted file mode 100644 index dff6597e4..000000000 --- a/packages/surf_mwwm/example/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/packages/surf_mwwm/example/lib/main.dart b/packages/surf_mwwm/example/lib/main.dart deleted file mode 100644 index f2f963a4a..000000000 --- a/packages/surf_mwwm/example/lib/main.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:counter/ui/app/app.dart'; -import 'package:counter/ui/app/app_wm.dart'; -import 'package:counter/ui/app/di/app.dart'; -import 'package:counter/ui/screen/counter/counter_wm.dart'; -import 'package:counter/ui/screen/counter/di/counter.dart'; -import 'package:flutter/material.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:surf_injector/surf_injector.dart'; -import 'package:surf_mwwm/surf_mwwm.dart'; - -AppWidgetModel createAppModel(BuildContext context) => AppWidgetModel( - const WidgetModelDependencies(), - Injector.of(context).component.navigatorKey, - ); - -CounterWidgetModel createCounterModel(BuildContext context) => - CounterWidgetModel( - const WidgetModelDependencies(), - Injector.of(context).component.navigator, - Injector.of(context).component.scaffoldKey, - ); - -void main() { - runApp(App()); -} diff --git a/packages/surf_mwwm/example/lib/ui/app/app.dart b/packages/surf_mwwm/example/lib/ui/app/app.dart deleted file mode 100644 index 6bf86bb58..000000000 --- a/packages/surf_mwwm/example/lib/ui/app/app.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:counter/main.dart'; -import 'package:counter/ui/app/app_wm.dart'; -import 'package:counter/ui/app/di/app.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; -import 'package:surf_mwwm/surf_mwwm.dart'; - -/// Widget приложения -class App extends MwwmWidget { - App({Key? key}) - : super( - key: key, - dependenciesBuilder: (context) => AppComponent(), - widgetStateBuilder: () => _AppState(), - widgetModelBuilder: createAppModel, - ); -} - -class _AppState extends OldWidgetState { - late final GlobalKey _navKey; - - @override - void initState() { - super.initState(); - _navKey = context.getComponent().navigatorKey; - } - - @override - Widget build(BuildContext context) { - return MaterialApp( - navigatorKey: _navKey, - home: const Scaffold( - body: Center( - child: Icon( - Icons.plus_one, - size: 200, - color: Colors.indigo, - ), - ), - ), - ); - } -} diff --git a/packages/surf_mwwm/example/lib/ui/app/app_wm.dart b/packages/surf_mwwm/example/lib/ui/app/app_wm.dart deleted file mode 100644 index 3733c7282..000000000 --- a/packages/surf_mwwm/example/lib/ui/app/app_wm.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:counter/ui/screen/counter/counter_route.dart'; -import 'package:flutter/widgets.dart'; -import 'package:rxdart/rxdart.dart'; -import 'package:surf_mwwm/surf_mwwm.dart'; - -/// WidgetModel приложения -class AppWidgetModel extends WidgetModel { - AppWidgetModel( - WidgetModelDependencies dependencies, - this._navigator, - ) : super(dependencies); - - final GlobalKey _navigator; - - @override - void onLoad() { - _loadApp(); - super.onLoad(); - } - - Future _loadApp() async { - initApp().listenCatchError(this, onValue: (isAuth) { - _openScreen(CounterScreenRoute()); - }); - } - - Stream initApp() { - /// имитация задержки на инициализацию приложения - return Stream.value(true).delay(const Duration(seconds: 2)); - } - - void _openScreen(PageRoute route) { - _navigator.currentState?.pushReplacement(route); - } -} diff --git a/packages/surf_mwwm/example/lib/ui/app/di/app.dart b/packages/surf_mwwm/example/lib/ui/app/di/app.dart deleted file mode 100644 index e2c4f147b..000000000 --- a/packages/surf_mwwm/example/lib/ui/app/di/app.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:surf_injector/surf_injector.dart'; - -/// Component для приложения -class AppComponent extends Component { - final GlobalKey navigatorKey = GlobalKey(); -} diff --git a/packages/surf_mwwm/example/lib/ui/screen/counter/counter_route.dart b/packages/surf_mwwm/example/lib/ui/screen/counter/counter_route.dart deleted file mode 100644 index 2a5d78559..000000000 --- a/packages/surf_mwwm/example/lib/ui/screen/counter/counter_route.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:counter/ui/screen/counter/counter_screen.dart'; -import 'package:flutter/material.dart'; - -/// Route для экрана счетчика -class CounterScreenRoute extends MaterialPageRoute { - CounterScreenRoute() : super(builder: (ctx) => CounterScreen()); -} diff --git a/packages/surf_mwwm/example/lib/ui/screen/counter/counter_screen.dart b/packages/surf_mwwm/example/lib/ui/screen/counter/counter_screen.dart deleted file mode 100644 index 8dae261b4..000000000 --- a/packages/surf_mwwm/example/lib/ui/screen/counter/counter_screen.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:counter/main.dart'; -import 'package:counter/ui/screen/counter/counter_wm.dart'; -import 'package:counter/ui/screen/counter/di/counter.dart'; -import 'package:flutter/material.dart'; -import 'package:surf_mwwm/surf_mwwm.dart'; - -/// Widget для экрана счетчика -class CounterScreen extends MwwmWidget { - CounterScreen({Key? key}) - : super( - key: key, - dependenciesBuilder: (context) => - CounterComponent(Navigator.of(context)), - widgetStateBuilder: () => _CounterScreenState(), - widgetModelBuilder: createCounterModel, - ); -} - -class _CounterScreenState extends OldWidgetState { - @override - Widget build(BuildContext context) { - return Scaffold( - key: context.getComponent().scaffoldKey, - appBar: AppBar( - title: const Text('Counter Demo'), - ), - body: StreamBuilder( - stream: wm.counterState.stream, - initialData: 0, - builder: (context, snapshot) { - return Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text('You have pushed the this many times:'), - Text( - '${snapshot.data}', - style: Theme.of(context).textTheme.caption, - ), - TextField( - autofocus: true, - onChanged: (_) {}, - ), - ], - ), - ); - }, - ), - floatingActionButton: FloatingActionButton( - onPressed: wm.incrementAction, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), - ); - } -} diff --git a/packages/surf_mwwm/example/lib/ui/screen/counter/counter_wm.dart b/packages/surf_mwwm/example/lib/ui/screen/counter/counter_wm.dart deleted file mode 100644 index 3ae80ceb7..000000000 --- a/packages/surf_mwwm/example/lib/ui/screen/counter/counter_wm.dart +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// import 'package:flutter/material.dart' show NavigatorState; -// import 'package:flutter/material.dart' as w; -// import 'package:flutter/material.dart' hide Action; -// import 'package:surf_mwwm/surf_mwwm.dart'; - -import 'package:flutter/material.dart' hide Action; -import 'package:surf_mwwm/surf_mwwm.dart'; - -/// WidgetModel для экрана счетчика -class CounterWidgetModel extends WidgetModel { - CounterWidgetModel( - WidgetModelDependencies dependencies, - this.navigator, - this._key, - ) : super(dependencies); - - final NavigatorState navigator; - final GlobalKey _key; - - StreamedState counterState = StreamedState(0); - - final incrementAction = VoidAction(); - final showInit = StreamedAction(); - - @override - void onLoad() { - _listenToActions(); - super.onLoad(); - } - - void _listenToActions() { - incrementAction.bind((_) { - counterState.accept(counterState.value + 1); - }).listenOn( - this, - onValue: (_) {}, - ); - - showInit.bind((_) { - ScaffoldMessenger.of(_key.currentContext!).showSnackBar( - const SnackBar( - content: Text('init'), - ), - ); - }).listenOn(this, onValue: (_) {}); - - counterState.stream.where((c) => c.isEven).skip(1).listenOn( - this, - onValue: (c) { - navigator.push( - MaterialPageRoute( - builder: (ctx) => Scaffold( - body: Column( - children: [ - TextField( - autofocus: true, - onChanged: (_) {}, - ), - ], - ), - ), - ), - ); - }, - ); - } -} diff --git a/packages/surf_mwwm/example/lib/ui/screen/counter/di/counter.dart b/packages/surf_mwwm/example/lib/ui/screen/counter/di/counter.dart deleted file mode 100644 index f12798afd..000000000 --- a/packages/surf_mwwm/example/lib/ui/screen/counter/di/counter.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:surf_injector/surf_injector.dart'; - -/// Component для экрана счетчика -class CounterComponent implements Component { - CounterComponent( - this.navigator, - ); - - final NavigatorState navigator; - final GlobalKey scaffoldKey = GlobalKey(); -} diff --git a/packages/surf_mwwm/example/pubspec.yaml b/packages/surf_mwwm/example/pubspec.yaml deleted file mode 100644 index 129c96d1b..000000000 --- a/packages/surf_mwwm/example/pubspec.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: counter -description: A new Flutter project. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - rxdart: ^0.27.0 - - surf_mwwm: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/surf_mwwm/lib/src/extensions/mwwm_extensions.dart b/packages/surf_mwwm/lib/src/extensions/mwwm_extensions.dart deleted file mode 100644 index b6c4d6b7e..000000000 --- a/packages/surf_mwwm/lib/src/extensions/mwwm_extensions.dart +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/widgets.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:relation/relation.dart'; -import 'package:rxdart/rxdart.dart'; -import 'package:surf_injector/surf_injector.dart'; - -/// Extensions for [WidgetModel] -extension SurfMwwmExtension on WidgetModel { - /// bind ui [StreamedAction]'s - StreamSubscription bind( - StreamedAction action, - void Function(T value) onValue, { - void Function(Object error)? onError, - }) => - subscribe(action.stream, onValue, onError: onError); - - /// bind ui [VoidAction]'s - StreamSubscription bindVoid( - VoidAction action, - void Function() onAction, { - void Function(Object error)? onError, - }) => - subscribe(action.stream, (value) => onAction(), onError: onError); -} - -extension FutureExt on Future { - /// Do future on specified listener - /// - /// ```dart - /// await Future.value("wow").on(wm).then(result.add); - /// await Future.value("rly").on(wm).then(result.add); - /// ``` - @Deprecated('Will be removed because of deprecation of `doFuture`') - Future on( - WidgetModel listener, { - void Function(Object error)? onError, - }) { - final completer = Completer(); - listener.doFuture( - this, - completer.complete, - onError: (e) { - onError?.call(e); - completer.completeError(e); - }, - ); - - return completer.future; - } - - /// Do future with error catching on specified listener - @Deprecated('Will be removed because of deprecation of `doFutureHandleError`') - Future withErrorHandling(WidgetModel listener) { - final completer = Completer(); - listener.doFutureHandleError( - this, - completer.complete, - onError: completer.completeError, - ); - - return completer.future; - } -} - -extension EventExt on Event { - /// Bind one event to another - Event bind(void Function(T?) onData) { - stream.doOnData( - (t) { - onData(t); - }, - ).listen(null); - - return this; - } - - /// Listen on specifited listener with possibility to add callbacks - StreamSubscription listenOn( - WidgetModel listener, { - void Function(T? value)? onValue, - }) { - return listener.subscribe(stream, onValue ?? (_) {}); - } -} - -extension StreamX on Stream { - /// Listen on specifited listener with possibility to add callbacks - StreamSubscription listenOn( - WidgetModel listener, { - void Function(T? value)? onValue, - void Function(Object error)? onError, - }) { - return listener.subscribe(this, onValue ?? (_) {}, onError: onError); - } - - /// Listen on WM with error catching - StreamSubscription listenCatchError( - WidgetModel listener, { - void Function(T? value)? onValue, - void Function(Object error)? onError, - }) { - return listener.subscribeHandleError( - this, - onValue ?? (_) {}, - onError: onError, - ); - } -} - -extension InjectorExt on BuildContext { - /// Getter for component by type - T getComponent() { - return Injector.of(this).component; - } -} diff --git a/packages/surf_mwwm/lib/src/mixins/lifecycle_logging_mixin.dart b/packages/surf_mwwm/lib/src/mixins/lifecycle_logging_mixin.dart deleted file mode 100644 index 3dbf8660c..000000000 --- a/packages/surf_mwwm/lib/src/mixins/lifecycle_logging_mixin.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; - -mixin LifecycleLoggingMixin on State { - @override - void initState() { - super.initState(); - debugPrint('${this} initState'); - } - - @override - void didChangeDependencies() { - super.didChangeDependencies(); - debugPrint('${this} didChangeDependencies'); - } - - @override - void dispose() { - super.dispose(); - debugPrint('${this} dispose'); - } -} diff --git a/packages/surf_mwwm/lib/src/mwwm_widget.dart b/packages/surf_mwwm/lib/src/mwwm_widget.dart deleted file mode 100644 index 258ced99b..000000000 --- a/packages/surf_mwwm/lib/src/mwwm_widget.dart +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart'; -import 'package:mwwm/mwwm.dart'; -import 'package:surf_injector/surf_injector.dart'; - -typedef DependenciesBuilder = C Function(BuildContext context); -typedef WidgetStateBuilder = State Function(); - -/// Base class for widgets that has [WidgetModel] -/// and has dependencies in [Component] -abstract class MwwmWidget extends StatefulWidget { - const MwwmWidget({ - required this.dependenciesBuilder, - required this.widgetStateBuilder, - required this.widgetModelBuilder, - Key? key, - }) : super(key: key); - - /// A function that build dependencies for WidgetModel and Widget - final DependenciesBuilder dependenciesBuilder; - - /// Builder for [WidgetState] - final WidgetStateBuilder widgetStateBuilder; - - /// Builder for [WidgetModel]. - /// Typically is null because - /// WidgetModelBuilders set in the `WidgetModelFactory` - final WidgetModelBuilder widgetModelBuilder; - - @override - _MwwmWidgetState createState() => _MwwmWidgetState(); -} - -/// Hidden widget that create [WidgetState] -/// It's only proxy builder for [State] -class _ProxyMwwmWidget extends StatefulWidget { - const _ProxyMwwmWidget({ - required WidgetStateBuilder widgetStateBuilder, - required this.widgetModelBuilder, - Key? key, - }) : _wsBuilder = widgetStateBuilder, - super( - key: key, - ); - final WidgetModelBuilder widgetModelBuilder; - final WidgetStateBuilder _wsBuilder; - - @override - // ignore: no_logic_in_create_state - State createState() => _wsBuilder(); -} - -/// Hold child widget -class _MwwmWidgetState extends State { - late final Widget child; - - @override - void initState() { - super.initState(); - - child = Injector( - component: widget.dependenciesBuilder(context) as C, - builder: (ctx) => _ProxyMwwmWidget( - widgetStateBuilder: widget.widgetStateBuilder, - widgetModelBuilder: widget.widgetModelBuilder, - ), - ); - } - - @override - Widget build(BuildContext context) => child; -} - -/// WidgetState which doesn't require Widget to be CoreMwwmWidget. -/// -/// It is supposed to be used with [MwwmWidget] and not with [CoreMwwmWidget] -/// -/// Because of complexity of changes and migration, and because of -/// changes are not profitable after surf_injector is not preferable DI solution -/// it is easier to use widget state from mwwm which is not coupled with widget by generic type -abstract class OldWidgetState - extends State<_ProxyMwwmWidget> { - /// [WidgetModel] for widget. - late WM _wm; - - @protected - WM get wm => _wm; - - /// Descendants must call super firstly - @mustCallSuper - @override - void initState() { - _wm = widget.widgetModelBuilder(context) as WM; - - super.initState(); - - _wm - ..onLoad() - ..onBind(); - } - - /// Descendants must call super in the end - @override - @protected - @mustCallSuper - void dispose() { - _wm.dispose(); - super.dispose(); - } -} - -/// Implementation of MwwmWidget based on [InheritedWidget] -/// todo test perfomance -abstract class MwwmInheritedWidget - extends InheritedWidget { - MwwmInheritedWidget({ - required DependenciesBuilder dependenciesBuilder, - required WidgetStateBuilder widgetStateBuilder, - required WidgetModelBuilder widgetModelBuilder, - Key? key, - }) : super( - key: key, - child: Builder( - builder: (context) => Injector( - component: dependenciesBuilder(context), - builder: (ctx) { - return _ProxyMwwmWidget( - widgetStateBuilder: widgetStateBuilder, - widgetModelBuilder: widgetModelBuilder, - ); - }, - ), - ), - ); - - /// Yet this forever true because otherwise hot reload not working. - @override - bool updateShouldNotify(InheritedWidget oldWidget) { - return true; - } -} diff --git a/packages/surf_mwwm/lib/surf_mwwm.dart b/packages/surf_mwwm/lib/surf_mwwm.dart deleted file mode 100644 index ed9b1cade..000000000 --- a/packages/surf_mwwm/lib/surf_mwwm.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:mwwm/mwwm.dart'; -export 'package:relation/relation.dart'; -export 'package:surf_mwwm/src/extensions/mwwm_extensions.dart'; -export 'package:surf_mwwm/src/mixins/lifecycle_logging_mixin.dart'; -export 'package:surf_mwwm/src/mwwm_widget.dart'; diff --git a/packages/surf_mwwm/pubspec.yaml b/packages/surf_mwwm/pubspec.yaml deleted file mode 100644 index a34727f0f..000000000 --- a/packages/surf_mwwm/pubspec.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: surf_mwwm -version: 2.0.2 -description: | - Reflection of widget in a single entity. Includes: surf_injector, relation, mwwm, rxdart. -homepage: "https://github.com/surfstudio/SurfGear/tree/main/packages/surf_mwwm" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - mwwm: ^2.0.0-dev.1 - relation: ^3.1.0-dev.1 - rxdart: ^0.27.0 - surf_injector: ^1.0.0 - -dev_dependencies: - flutter_test: - sdk: flutter - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: diff --git a/packages/surf_mwwm/test/extentions/mwwm_extentions_test.dart b/packages/surf_mwwm/test/extentions/mwwm_extentions_test.dart deleted file mode 100644 index fda11be64..000000000 --- a/packages/surf_mwwm/test/extentions/mwwm_extentions_test.dart +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:surf_injector/surf_injector.dart'; -import 'package:surf_mwwm/surf_mwwm.dart'; - -// ignore_for_file: deprecated_member_use_from_same_package -void main() { - test('SurfMwwmExtension bind', () async { - final wm = TestWM(); - final event = StreamedAction(); - - final result = []; - - wm.bind(event, result.add); - - await event.accept('wow'); - await event.accept('rly'); - - expect(result, equals(['wow', 'rly'])); - }); - - test('SurfMwwmExtension bindVoid', () async { - final wm = TestWM(); - final action = VoidAction(); - - final result = []; - - wm.bindVoid(action, () => result.add('1')); - await action(); - await action(); - - expect(result, equals(['1', '1'])); - }); - - group('FutureExt', () { - test('on', () async { - final wm = TestWM(); - - final result = []; - - await Future.value('wow').on(wm).then(result.add); - await Future.value('rly').on(wm).then(result.add); - - expect(result, equals(['wow', 'rly'])); - }); - - test('on with error', () async { - final wm = TestWM(); - - final result = []; - - await Future.value('wow').on(wm).then(result.add); - - try { - await Future.error(Exception()).on( - wm, - onError: (e) { - result.add('rly'); - }, - ); - } on Exception catch (_) { - expect(result, equals(['wow', 'rly'])); - } - }); - - test('withErrorHandling', () async { - final errors = []; - - final expectedException = Exception('error'); - - Future fetchSomething() async { - throw expectedException; - } - - Future onError(Object error) async { - errors.add(error); - } - - final wm = TestWM( - baseDependencies: WidgetModelDependencies( - errorHandler: TestErrorHandler(onError), - ), - ); - - try { - await fetchSomething().withErrorHandling(wm); - } on Exception { - expect(errors, equals([expectedException])); - } - }); - }); - - group('Event', () { - test('bind', () async { - final event = StringEvent(); - final result = []; - - event.bind(result.add); - - await event.accept('wow'); - await event.accept('rly'); - - expect(result, equals(['wow', 'rly'])); - }); - - test('listenOn', () async { - final wm = TestWM(); - final event = StringEvent(); - - final result = []; - - event.listenOn(wm, onValue: result.add); - - await event.accept('wow'); - await event.accept('rly'); - - expect(result, equals(['wow', 'rly'])); - }); - }); - - group('StreamX', () { - test('listenOn', () async { - // ignore: close_sinks - final _controller = StreamController(sync: true); - final stream = _controller.stream; - - final wm = TestWM(); - - final result = []; - - stream.listenOn(wm, onValue: result.add); - - _controller..add('wow')..add('rly'); - - expect(result, equals(['wow', 'rly'])); - }); - - test('listenCatchError', () async { - // ignore: close_sinks - final _controller = StreamController(sync: true); - final stream = _controller.stream; - - final wm = TestWM(); - - final result = []; - - stream.listenCatchError( - wm, - onValue: result.add, - onError: (error) { - result.add('rly'); - }, - ); - - _controller - ..add('wow') - ..addError('error'); - - expect(result, equals(['wow', 'rly'])); - }); - }); - - testWidgets( - 'context.getComponent', - (tester) async { - final component = TestComponent('home'); - - late final BuildContext context; - - final widget = MaterialApp( - home: Injector( - builder: (_context) { - context = _context; - return Container(); - }, - component: component, - ), - ); - - await tester.pumpWidget(widget); - - expect(context.getComponent(), equals(component)); - }, - ); -} - -class TestComponent extends Component { - TestComponent(this.data); - - final String data; -} - -class TestErrorHandler extends ErrorHandler { - TestErrorHandler(this.onError); - - final void Function(Object e) onError; - - @override - void handleError(Object e) => onError(e); -} - -class TestWM extends WidgetModel { - TestWM({ - WidgetModelDependencies baseDependencies = const WidgetModelDependencies(), - }) : super(baseDependencies); -} - -class StringEvent extends Event { - final _controller = StreamController(); - - @override - Stream get stream => _controller.stream; - - @override - Future accept(String data) async { - _controller.add(data); - return Future.value(null); - } - - Future dispose() async { - await _controller.close(); - } -} diff --git a/packages/surf_util/.metadata b/packages/surf_util/.metadata deleted file mode 100644 index 45789c722..000000000 --- a/packages/surf_util/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 20e59316b8b8474554b38493b8ca888794b0234a - channel: stable - -project_type: package diff --git a/packages/surf_util/CHANGELOG.md b/packages/surf_util/CHANGELOG.md deleted file mode 100644 index 81527b571..000000000 --- a/packages/surf_util/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Changelog - -## 1.0.1 - 2021-05-30 - -* Stable release - -## 1.0.0-dev.2 - 2021-05-25 - -* Apply new lint rules. - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0`. - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/surf_util/CONTRIBUTING.md b/packages/surf_util/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/surf_util/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/surf_util/LICENSE b/packages/surf_util/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/surf_util/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/surf_util/README.md b/packages/surf_util/README.md deleted file mode 100644 index 03828bb7e..000000000 --- a/packages/surf_util/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# Surf Util - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/surf_util) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=surf_util&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/surf_util?logo=dart&logoColor=white)](https://pub.dev/packages/surf_util) -[![Pub Likes](https://badgen.net/pub/likes/surf_util)](https://pub.dev/packages/surf_util) -[![Pub popularity](https://badgen.net/pub/popularity/surf_util)](https://pub.dev/packages/surf_util/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/surf_util) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -A library with set of common classes and utilities used in different modules - -## Main classes - -1. [Bitmask](/lib/src/enum/bitmask.dart) - A generic implementation of the Bitmask type -2. [Enum](/lib/src/enum/enum.dart) - Java-like enum -3. [Transformable](/lib/src/transformable.dart) - Base class for transformation -4. [DisableOverscroll](/lib/src/ui/widget/disable_overscroll_widget.dart) - Prevent glowing when scrolling over the edge - -## Installation - -Add `surf_util` to your `pubspec.yaml` file: - -```yaml -dependencies: - surf_util: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/surf_util/analysis_options.yaml b/packages/surf_util/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/surf_util/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/surf_util/example/.metadata b/packages/surf_util/example/.metadata deleted file mode 100644 index e7e76479c..000000000 --- a/packages/surf_util/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 20e59316b8b8474554b38493b8ca888794b0234a - channel: unknown - -project_type: app diff --git a/packages/surf_util/example/analysis_options.yaml b/packages/surf_util/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/surf_util/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/surf_util/example/android/app/build.gradle b/packages/surf_util/example/android/app/build.gradle deleted file mode 100644 index 4ed2e2549..000000000 --- a/packages/surf_util/example/android/app/build.gradle +++ /dev/null @@ -1,61 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/packages/surf_util/example/android/app/src/debug/AndroidManifest.xml b/packages/surf_util/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/surf_util/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/surf_util/example/android/app/src/main/AndroidManifest.xml b/packages/surf_util/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 287714028..000000000 --- a/packages/surf_util/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/packages/surf_util/example/android/app/src/main/java/com/example/example/MainActivity.java b/packages/surf_util/example/android/app/src/main/java/com/example/example/MainActivity.java deleted file mode 100644 index 84f8920f6..000000000 --- a/packages/surf_util/example/android/app/src/main/java/com/example/example/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.example; - -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } -} diff --git a/packages/surf_util/example/android/app/src/main/res/drawable/launch_background.xml b/packages/surf_util/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/surf_util/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/surf_util/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/surf_util/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/surf_util/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_util/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/surf_util/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/surf_util/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_util/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/surf_util/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/surf_util/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_util/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/surf_util/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/surf_util/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_util/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/surf_util/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/surf_util/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/surf_util/example/android/app/src/main/res/values/styles.xml b/packages/surf_util/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa4417c..000000000 --- a/packages/surf_util/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/surf_util/example/android/app/src/profile/AndroidManifest.xml b/packages/surf_util/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/surf_util/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/surf_util/example/android/build.gradle b/packages/surf_util/example/android/build.gradle deleted file mode 100644 index bb8a30389..000000000 --- a/packages/surf_util/example/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/surf_util/example/android/gradle.properties b/packages/surf_util/example/android/gradle.properties deleted file mode 100644 index 1441b1da9..000000000 --- a/packages/surf_util/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M - -android.enableR8=true diff --git a/packages/surf_util/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/surf_util/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 2819f022f..000000000 --- a/packages/surf_util/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/packages/surf_util/example/android/settings.gradle b/packages/surf_util/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/surf_util/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/surf_util/example/ios/Flutter/AppFrameworkInfo.plist b/packages/surf_util/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/surf_util/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/surf_util/example/ios/Flutter/Debug.xcconfig b/packages/surf_util/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/surf_util/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/surf_util/example/ios/Flutter/Release.xcconfig b/packages/surf_util/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/surf_util/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/surf_util/example/ios/Runner.xcodeproj/project.pbxproj b/packages/surf_util/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index ffec43751..000000000 --- a/packages/surf_util/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,497 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = S8QB4VV633; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/surf_util/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/surf_util/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/packages/surf_util/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/surf_util/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/surf_util/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/surf_util/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_util/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/surf_util/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/surf_util/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/surf_util/example/ios/Runner/AppDelegate.h b/packages/surf_util/example/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bbf9..000000000 --- a/packages/surf_util/example/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/packages/surf_util/example/ios/Runner/AppDelegate.m b/packages/surf_util/example/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e90b..000000000 --- a/packages/surf_util/example/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index bd77dd655..000000000 --- a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 3d43d11e6..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index a91bfcd30..000000000 --- a/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "LaunchImage.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/surf_util/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/surf_util/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/surf_util/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/surf_util/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_util/example/ios/Runner/Base.lproj/Main.storyboard b/packages/surf_util/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/surf_util/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/surf_util/example/ios/Runner/Info.plist b/packages/surf_util/example/ios/Runner/Info.plist deleted file mode 100644 index a060db61e..000000000 --- a/packages/surf_util/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/surf_util/example/ios/Runner/main.m b/packages/surf_util/example/ios/Runner/main.m deleted file mode 100644 index dff6597e4..000000000 --- a/packages/surf_util/example/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/packages/surf_util/example/lib/main.dart b/packages/surf_util/example/lib/main.dart deleted file mode 100644 index 2f119c745..000000000 --- a/packages/surf_util/example/lib/main.dart +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:surf_util/surf_util.dart'; - -void main() => runApp(const MyApp()); - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'DisableOverscroll Example', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: const RefresherPage(), - ); - } -} - -class RefresherPage extends StatefulWidget { - const RefresherPage({Key? key}) : super(key: key); - - @override - _RefresherPageState createState() => _RefresherPageState(); -} - -class _RefresherPageState extends State { - @override - Widget build(BuildContext context) { - return DefaultTabController( - length: 2, - child: Scaffold( - appBar: AppBar( - title: const Text('DisableOverscroll'), - ), - body: DisableOverscroll( - child: SingleChildScrollView( - child: Column( - children: Colors.primaries - .map( - (color) => Container( - height: 200, - color: color, - ), - ) - .toList(), - ), - ), - ), - ), - ); - } -} - -const white = Color(0xFFFFFFFF); -const red = Color(0xFFFF0000); -const blue = Color(0xFF0000FF); diff --git a/packages/surf_util/example/pubspec.yaml b/packages/surf_util/example/pubspec.yaml deleted file mode 100644 index 036ce273a..000000000 --- a/packages/surf_util/example/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: example -description: Example -version: 1.0.0 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - surf_util: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/surf_util/lib/src/enum/bitmask.dart b/packages/surf_util/lib/src/enum/bitmask.dart deleted file mode 100644 index cae04bd67..000000000 --- a/packages/surf_util/lib/src/enum/bitmask.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:surf_util/src/enum/enum.dart'; - -/// A generic implementation of the Bitmask type. -/// -/// Each value must be a power of two. -abstract class Bitmask extends Enum { - const Bitmask(int value) - : assert(value > 0 && (value & (value - 1) == 0)), - super(value); - - /// Возвращает значение маски по списку значений - static int getMask(Iterable list) => - list.fold(0, (value, element) => value | element.value); - - /// Выполняет проверку на активность флага. - bool isOn(int mask) { - return (mask & value) != 0; - } -} diff --git a/packages/surf_util/lib/src/enum/enum.dart b/packages/surf_util/lib/src/enum/enum.dart deleted file mode 100644 index ea746cf21..000000000 --- a/packages/surf_util/lib/src/enum/enum.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Java-like enum -/// While extending this class you can create -/// a static method `byValue` returning -/// a class field. -/// -/// Example: -/// ```dart -/// class TransactionType extends Enum { -/// const TransactionType(String val) : super(val); -/// -/// static const TransactionType IN = TransactionType('in'); -/// static const TransactionType OUT = TransactionType('out'); -/// -/// static TransactionType byValue(String value) { -/// switch (value) { -/// case 'in': -/// return IN; -/// case 'out': -/// return OUT; -/// default: -/// return OUT; -/// } -/// } -/// } -/// ``` -abstract class Enum { - const Enum(this.value); - - final T value; -} diff --git a/packages/surf_util/lib/src/enum/int_extension.dart b/packages/surf_util/lib/src/enum/int_extension.dart deleted file mode 100644 index 529ab2e19..000000000 --- a/packages/surf_util/lib/src/enum/int_extension.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'package:surf_util/src/enum/bitmask.dart'; - -extension BitmaskIntExtension on int { - bool isOn(Bitmask mask) => mask.isOn(this); -} diff --git a/packages/surf_util/lib/src/transformable.dart b/packages/surf_util/lib/src/transformable.dart deleted file mode 100644 index d5465ca79..000000000 --- a/packages/surf_util/lib/src/transformable.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Interface for transform a data object from one format to another -// ignore: one_member_abstracts -abstract class Transformable { - T transform(); -} diff --git a/packages/surf_util/lib/src/ui/widget/disable_overscroll_widget.dart b/packages/surf_util/lib/src/ui/widget/disable_overscroll_widget.dart deleted file mode 100644 index 8479303b6..000000000 --- a/packages/surf_util/lib/src/ui/widget/disable_overscroll_widget.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/widgets.dart'; - -/// Place the [SingleChildScrollView] inside the [DisableOverscroll] widget -/// to prevent glowing when scrolling over the edge. -class DisableOverscroll extends StatelessWidget { - const DisableOverscroll({ - required this.child, - Key? key, - }) : super(key: key); - - final Widget child; - - @override - Widget build(BuildContext context) { - return NotificationListener( - onNotification: (notification) { - if (notification is OverscrollIndicatorNotification) { - notification.disallowGlow(); - } - return false; - }, - child: child, - ); - } -} diff --git a/packages/surf_util/lib/surf_util.dart b/packages/surf_util/lib/surf_util.dart deleted file mode 100644 index 4fe3b19da..000000000 --- a/packages/surf_util/lib/surf_util.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:surf_util/src/enum/bitmask.dart'; -export 'package:surf_util/src/enum/enum.dart'; -export 'package:surf_util/src/enum/int_extension.dart'; -export 'package:surf_util/src/transformable.dart'; -export 'package:surf_util/src/ui/widget/disable_overscroll_widget.dart'; diff --git a/packages/surf_util/pubspec.yaml b/packages/surf_util/pubspec.yaml deleted file mode 100644 index 07a9dfc35..000000000 --- a/packages/surf_util/pubspec.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: surf_util -version: 1.0.1 -description: A library with set of common classes and utilities. -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/surf_util" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" diff --git a/packages/surf_util/test/enum/bitwise_test.dart b/packages/surf_util/test/enum/bitwise_test.dart deleted file mode 100644 index d8447f75a..000000000 --- a/packages/surf_util/test/enum/bitwise_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter_test/flutter_test.dart'; -import 'package:surf_util/src/enum/bitmask.dart'; - -class TestBitmask extends Bitmask { - const TestBitmask(int value) : super(value); -} - -void main() { - group('Bitmask', () { - test('getMask returns aggregated mask for provided values', () { - expect( - Bitmask.getMask(const [ - TestBitmask(0x0001), - TestBitmask(0x0002), - TestBitmask(0x0008), - TestBitmask(0x0200), - ]), - equals(0x020b), - ); - }); - - test('isOn returns true if checked value contains provided mask', () { - expect(const TestBitmask(0x0001).isOn(0xFFFFFF), isTrue); - expect(const TestBitmask(0x1000).isOn(0xFFEFFF), isFalse); - }); - }); -} diff --git a/packages/surf_util/test/enum/int_extension_test.dart b/packages/surf_util/test/enum/int_extension_test.dart deleted file mode 100644 index 076310f3d..000000000 --- a/packages/surf_util/test/enum/int_extension_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter_test/flutter_test.dart'; -import 'package:surf_util/src/enum/bitmask.dart'; -import 'package:surf_util/src/enum/int_extension.dart'; - -class TestBitmask extends Bitmask { - const TestBitmask(int value) : super(value); -} - -void main() { - test('isOn returns true if checked value contains provided mask', () { - expect(15.isOn(const TestBitmask(0x0001)), isTrue); - expect(15.isOn(const TestBitmask(0x0100)), isFalse); - }); -} diff --git a/packages/swipe_refresh/.gitignore b/packages/swipe_refresh/.gitignore deleted file mode 100644 index 9f87252c6..000000000 --- a/packages/swipe_refresh/.gitignore +++ /dev/null @@ -1,72 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/swipe_refresh/.metadata b/packages/swipe_refresh/.metadata deleted file mode 100644 index a6fd6bacd..000000000 --- a/packages/swipe_refresh/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 20e59316b8b8474554b38493b8ca888794b0234a - channel: unknown - -project_type: package diff --git a/packages/swipe_refresh/CHANGELOG.md b/packages/swipe_refresh/CHANGELOG.md deleted file mode 100644 index 8668af647..000000000 --- a/packages/swipe_refresh/CHANGELOG.md +++ /dev/null @@ -1,33 +0,0 @@ -# Changelog - -## 1.0.1 - 2021-05-30 - -* Stable release - -## 1.0.1-dev.1 - 2021-05-25 - -* Apply new lint rules. - -## 1.0.0 - -* Migrate this package to null safety. - -## 0.0.1-dev.9 - -* Added keyboardDismissBehavior (Material) and scroll physics - -## 0.0.1-dev.7 - -* Added shrinkWrap to Refreshers - -## 0.0.1-dev.6 - -* Added Scroll controller to Refreshers - -## 0.0.1-dev.5 - -* Fix lint hints - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/swipe_refresh/CONTRIBUTING.md b/packages/swipe_refresh/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/swipe_refresh/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/swipe_refresh/LICENSE b/packages/swipe_refresh/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/swipe_refresh/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/swipe_refresh/README.md b/packages/swipe_refresh/README.md deleted file mode 100644 index bb42e007e..000000000 --- a/packages/swipe_refresh/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Swipe Refresh - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/swipe_refresh) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=swipe_refresh&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/swipe_refresh?logo=dart&logoColor=white)](https://pub.dev/packages/swipe_refresh) -[![Pub Likes](https://badgen.net/pub/likes/swipe_refresh)](https://pub.dev/packages/swipe_refresh) -[![Pub popularity](https://badgen.net/pub/popularity/swipe_refresh)](https://pub.dev/packages/swipe_refresh/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/swipe_refresh) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Widget for refresh by swipe. - -![](media/material.gif) -![](media/cupertino.gif) - -## Usage - -Main classes: - -1. [Refresh state](lib/src/swipe_refresh_state.dart) -2. [Widget for indicate swipe refresh](lib/src/swipe_refresh.dart) -3. [Widget for indicate swipe refresh Material style](lib/src/material_swipe_refresh.dart) -4. [Widget for indicate swipe refresh Cupertino style](lib/src/cupertino_swipe_refresh.dart) - -## Installation - -Add `swipe_refresh` to your `pubspec.yaml` file: - -```yaml -dependencies: - swipe_refresh: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/swipe_refresh/analysis_options.yaml b/packages/swipe_refresh/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/swipe_refresh/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/swipe_refresh/example/.gitignore b/packages/swipe_refresh/example/.gitignore deleted file mode 100644 index 10c16abd6..000000000 --- a/packages/swipe_refresh/example/.gitignore +++ /dev/null @@ -1,74 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* -**/ios/Podfile - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/swipe_refresh/example/.metadata b/packages/swipe_refresh/example/.metadata deleted file mode 100644 index e7e76479c..000000000 --- a/packages/swipe_refresh/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 20e59316b8b8474554b38493b8ca888794b0234a - channel: unknown - -project_type: app diff --git a/packages/swipe_refresh/example/analysis_options.yaml b/packages/swipe_refresh/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/swipe_refresh/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/swipe_refresh/example/android/app/build.gradle b/packages/swipe_refresh/example/android/app/build.gradle deleted file mode 100644 index 28b9bf959..000000000 --- a/packages/swipe_refresh/example/android/app/build.gradle +++ /dev/null @@ -1,62 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 30 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 30 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/packages/swipe_refresh/example/android/app/src/debug/AndroidManifest.xml b/packages/swipe_refresh/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/swipe_refresh/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/swipe_refresh/example/android/app/src/main/AndroidManifest.xml b/packages/swipe_refresh/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 34dd77efb..000000000 --- a/packages/swipe_refresh/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/packages/swipe_refresh/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/swipe_refresh/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e793a000d..000000000 --- a/packages/swipe_refresh/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/swipe_refresh/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/swipe_refresh/example/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3f..000000000 --- a/packages/swipe_refresh/example/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/swipe_refresh/example/android/app/src/main/res/drawable/launch_background.xml b/packages/swipe_refresh/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/swipe_refresh/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/swipe_refresh/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/swipe_refresh/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/swipe_refresh/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/swipe_refresh/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/swipe_refresh/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/swipe_refresh/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/swipe_refresh/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/swipe_refresh/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/swipe_refresh/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/swipe_refresh/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/swipe_refresh/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/swipe_refresh/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/swipe_refresh/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/swipe_refresh/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/swipe_refresh/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/swipe_refresh/example/android/app/src/main/res/values-night/styles.xml b/packages/swipe_refresh/example/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 449a9f930..000000000 --- a/packages/swipe_refresh/example/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/swipe_refresh/example/android/app/src/main/res/values/styles.xml b/packages/swipe_refresh/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d74aa35c2..000000000 --- a/packages/swipe_refresh/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/swipe_refresh/example/android/app/src/profile/AndroidManifest.xml b/packages/swipe_refresh/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/swipe_refresh/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/swipe_refresh/example/android/build.gradle b/packages/swipe_refresh/example/android/build.gradle deleted file mode 100644 index c505a8635..000000000 --- a/packages/swipe_refresh/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/swipe_refresh/example/android/gradle.properties b/packages/swipe_refresh/example/android/gradle.properties deleted file mode 100644 index 94adc3a3f..000000000 --- a/packages/swipe_refresh/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/swipe_refresh/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/swipe_refresh/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bc6a58afd..000000000 --- a/packages/swipe_refresh/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/packages/swipe_refresh/example/android/settings.gradle b/packages/swipe_refresh/example/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/packages/swipe_refresh/example/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/packages/swipe_refresh/example/ios/Flutter/AppFrameworkInfo.plist b/packages/swipe_refresh/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/swipe_refresh/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/swipe_refresh/example/ios/Flutter/Debug.xcconfig b/packages/swipe_refresh/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/swipe_refresh/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/swipe_refresh/example/ios/Flutter/Release.xcconfig b/packages/swipe_refresh/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/swipe_refresh/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/swipe_refresh/example/ios/Runner.xcodeproj/project.pbxproj b/packages/swipe_refresh/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index ffec43751..000000000 --- a/packages/swipe_refresh/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,497 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = S8QB4VV633; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/swipe_refresh/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/swipe_refresh/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/swipe_refresh/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/swipe_refresh/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/swipe_refresh/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/swipe_refresh/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/swipe_refresh/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/swipe_refresh/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/swipe_refresh/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/swipe_refresh/example/ios/Runner/AppDelegate.h b/packages/swipe_refresh/example/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bbf9..000000000 --- a/packages/swipe_refresh/example/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/packages/swipe_refresh/example/ios/Runner/AppDelegate.m b/packages/swipe_refresh/example/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e90b..000000000 --- a/packages/swipe_refresh/example/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index bd77dd655..000000000 --- a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 3d43d11e6..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index a91bfcd30..000000000 --- a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "LaunchImage.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "LaunchImage@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/swipe_refresh/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/swipe_refresh/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/swipe_refresh/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/swipe_refresh/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/swipe_refresh/example/ios/Runner/Base.lproj/Main.storyboard b/packages/swipe_refresh/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/swipe_refresh/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/swipe_refresh/example/ios/Runner/Info.plist b/packages/swipe_refresh/example/ios/Runner/Info.plist deleted file mode 100644 index a060db61e..000000000 --- a/packages/swipe_refresh/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/swipe_refresh/example/ios/Runner/main.m b/packages/swipe_refresh/example/ios/Runner/main.m deleted file mode 100644 index dff6597e4..000000000 --- a/packages/swipe_refresh/example/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/packages/swipe_refresh/example/lib/main.dart b/packages/swipe_refresh/example/lib/main.dart deleted file mode 100644 index 3b00df20f..000000000 --- a/packages/swipe_refresh/example/lib/main.dart +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:swipe_refresh/swipe_refresh.dart'; - -// ignore_for_file: avoid-returning-widgets - -void main() => runApp(const MyApp()); - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Refresher Example', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: const MainPage(), - ); - } -} - -class MainPage extends StatefulWidget { - const MainPage({Key? key}) : super(key: key); - - @override - _MainPageState createState() => _MainPageState(); -} - -class _MainPageState extends State { - final _controller = StreamController.broadcast(); - - Stream get _stream => _controller.stream; - - @override - Widget build(BuildContext context) { - return DefaultTabController( - length: 3, - child: Scaffold( - body: Padding( - padding: const EdgeInsets.only(top: 25), - child: Column( - children: [ - TabBar( - tabs: [ - _buildTab(SwipeRefreshStyle.material), - _buildTab(SwipeRefreshStyle.cupertino), - _buildTab(SwipeRefreshStyle.builder), - ], - ), - Expanded( - child: TabBarView( - children: [ - SwipeRefresh.material( - stateStream: _stream, - onRefresh: _refresh, - padding: const EdgeInsets.symmetric(vertical: 10), - children: _buildExampleBody(SwipeRefreshStyle.material), - ), - SwipeRefresh.cupertino( - stateStream: _stream, - onRefresh: _refresh, - padding: const EdgeInsets.symmetric(vertical: 10), - children: _buildExampleBody(SwipeRefreshStyle.cupertino), - ), - SwipeRefresh.builder( - stateStream: _stream, - onRefresh: _refresh, - padding: const EdgeInsets.symmetric(vertical: 10), - itemCount: Colors.primaries.length, - itemBuilder: (context, index) { - return Container( - color: Colors.primaries[index], - height: 100, - child: const Center( - child: Text( - 'Builder example', - style: TextStyle(color: white), - ), - ), - ); - }, - ), - ], - ), - ), - ], - ), - ), - ), - ); - } - - @override - void dispose() { - _controller.close(); - - super.dispose(); - } - - Widget _buildTab(SwipeRefreshStyle style) { - var color = _getColor(style); - color = color.withOpacity(.5); - return InkWell( - child: SizedBox( - height: 100, - child: Center( - child: Text( - _getText(style), - style: TextStyle(color: color), - ), - ), - ), - ); - } - - List _buildExampleBody(SwipeRefreshStyle style) { - final isMaterial = style == SwipeRefreshStyle.material; - final color = _getColor(style); - return [ - Container( - color: color, - height: 100, - child: Center( - child: Text( - isMaterial ? 'Material example' : 'Cupertino example', - style: const TextStyle(color: white), - ), - ), - ), - ]; - } - - Color _getColor(SwipeRefreshStyle style) { - switch (style) { - case SwipeRefreshStyle.material: - return red; - case SwipeRefreshStyle.cupertino: - return blue; - case SwipeRefreshStyle.builder: - return green; - default: - return black; - } - } - - String _getText(SwipeRefreshStyle style) { - switch (style) { - case SwipeRefreshStyle.material: - return 'Material'; - case SwipeRefreshStyle.cupertino: - return 'Cupertino'; - case SwipeRefreshStyle.builder: - return 'Builder'; - default: - return 'SipeRefresh'; - } - } - - Future _refresh() async { - await Future.delayed(const Duration(seconds: 3)); - // when all needed is done change state - _controller.sink.add(SwipeRefreshState.hidden); - } -} - -const white = Color(0xFFFFFFFF); -const black = Color(0xFF000000); -const red = Color(0xFFFF0000); -const green = Color(0xFF00FF00); -const blue = Color(0xFF0000FF); diff --git a/packages/swipe_refresh/example/pubspec.yaml b/packages/swipe_refresh/example/pubspec.yaml deleted file mode 100644 index d54adeece..000000000 --- a/packages/swipe_refresh/example/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: example -description: Example of using swipe refresh. -version: 1.0.0+1 -publish_to: none - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - swipe_refresh: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/swipe_refresh/lib/src/cupertino_swipe_refresh.dart b/packages/swipe_refresh/lib/src/cupertino_swipe_refresh.dart deleted file mode 100644 index be5bc77d8..000000000 --- a/packages/swipe_refresh/lib/src/cupertino_swipe_refresh.dart +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/cupertino.dart'; -import 'package:swipe_refresh/src/swipe_refresh_base.dart'; -import 'package:swipe_refresh/src/swipe_refresh_state.dart'; - -// ignore_for_file: avoid-returning-widgets - -/// Refresh indicator widget with Cupertino style. -class CupertinoSwipeRefresh extends SwipeRefreshBase { - const CupertinoSwipeRefresh({ - required Stream stateStream, - required VoidCallback onRefresh, - Key? key, - SliverChildDelegate? childrenDelegate, - List? children, - SwipeRefreshState? initState, - EdgeInsets? padding, - ScrollController? scrollController, - bool shrinkWrap = false, - this.refreshTriggerPullDistance = defaultRefreshTriggerPullDistance, - this.refreshIndicatorExtent = defaultRefreshIndicatorExtent, - this.indicatorBuilder = CupertinoSliverRefreshControl.buildRefreshIndicator, - //FIXME add parameter to CustomScrollView, when fix it in Flutter - ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, - ScrollPhysics? physics, - }) : super( - key: key, - children: children, - childrenDelegate: childrenDelegate, - stateStream: stateStream, - initState: initState, - onRefresh: onRefresh, - padding: padding, - scrollController: scrollController, - shrinkWrap: shrinkWrap, - keyboardDismissBehavior: keyboardDismissBehavior, - physics: physics, - ); - - static const double defaultRefreshTriggerPullDistance = 100.0; - static const double defaultRefreshIndicatorExtent = 60.0; - - final double refreshTriggerPullDistance; - final double refreshIndicatorExtent; - final RefreshControlIndicatorBuilder indicatorBuilder; - - @override - // ignore: no_logic_in_create_state - SwipeRefreshBaseState createState() => _CupertinoSwipeRefreshState( - scrollController, - ); -} - -class _CupertinoSwipeRefreshState - extends SwipeRefreshBaseState { - _CupertinoSwipeRefreshState( - ScrollController? scrollController, - ) : _scrollController = scrollController ?? ScrollController(); - - final ScrollController _scrollController; - - @override - Widget buildRefresher( - Key key, - List children, - Future Function() onRefresh, - ) { - return CustomScrollView( - shrinkWrap: widget.shrinkWrap, - controller: _scrollController, - physics: widget.physics == null - ? const BouncingScrollPhysics( - parent: AlwaysScrollableScrollPhysics(), - ) - : AlwaysScrollableScrollPhysics(parent: widget.physics), - slivers: [ - CupertinoSliverRefreshControl( - key: key, - onRefresh: onRefresh, - refreshTriggerPullDistance: widget.refreshTriggerPullDistance, - refreshIndicatorExtent: widget.refreshIndicatorExtent, - builder: widget.indicatorBuilder, - ), - SliverSafeArea( - bottom: widget.padding == null, - left: widget.padding == null, - right: widget.padding == null, - top: widget.padding == null, - sliver: _buildList(children), - ), - ], - ); - } - - @override - void onUpdateState(SwipeRefreshState state) { - if (state == SwipeRefreshState.loading) { - _scrollController.jumpTo(-(widget.refreshIndicatorExtent + 5)); - } - - if (state == SwipeRefreshState.hidden) { - if (completer != null) { - completer!.complete(); - completer = null; - } - } - } - - Widget _buildList(List children) { - if (widget.padding != null) { - return SliverPadding( - padding: widget.padding!, - sliver: SliverList( - delegate: widget.childrenDelegate ?? - SliverChildListDelegate( - children, - ), - ), - ); - } - return SliverList( - delegate: widget.childrenDelegate ?? - SliverChildListDelegate( - children, - ), - ); - } -} diff --git a/packages/swipe_refresh/lib/src/material_swipe_refresh.dart b/packages/swipe_refresh/lib/src/material_swipe_refresh.dart deleted file mode 100644 index b551268aa..000000000 --- a/packages/swipe_refresh/lib/src/material_swipe_refresh.dart +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; -import 'package:swipe_refresh/src/swipe_refresh_base.dart'; -import 'package:swipe_refresh/src/swipe_refresh_state.dart'; - -// ignore_for_file: avoid-returning-widgets - -/// Refresh indicator widget with Material Design style. -class MaterialSwipeRefresh extends SwipeRefreshBase { - const MaterialSwipeRefresh({ - required Stream stateStream, - required VoidCallback onRefresh, - Key? key, - this.indicatorColor, - List? children, - SliverChildDelegate? childrenDelegate, - SwipeRefreshState? initState, - Color? backgroundColor, - ScrollController? scrollController, - EdgeInsets? padding, - bool shrinkWrap = false, - ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, - ScrollPhysics? physics, - }) : backgroundColor = backgroundColor ?? const Color(0xFFFFFFFF), - super( - key: key, - children: children, - childrenDelegate: childrenDelegate, - stateStream: stateStream, - initState: initState, - onRefresh: onRefresh, - scrollController: scrollController, - padding: padding, - shrinkWrap: shrinkWrap, - keyboardDismissBehavior: keyboardDismissBehavior, - physics: physics, - ); - - final Color? indicatorColor; - final Color backgroundColor; - - @override - _MaterialSwipeRefreshState createState() => _MaterialSwipeRefreshState(); -} - -class _MaterialSwipeRefreshState - extends SwipeRefreshBaseState { - @override - Widget buildRefresher( - Key key, - List children, - Future Function() onRefresh, - ) { - return RefreshIndicator( - key: key, - onRefresh: onRefresh, - color: widget.indicatorColor, - backgroundColor: widget.backgroundColor, - child: widget.childrenDelegate == null - ? ListView( - shrinkWrap: widget.shrinkWrap, - padding: widget.padding, - controller: widget.scrollController ?? ScrollController(), - physics: AlwaysScrollableScrollPhysics(parent: widget.physics), - keyboardDismissBehavior: widget.keyboardDismissBehavior ?? - ScrollViewKeyboardDismissBehavior.manual, - children: children, - ) - : ListView.custom( - shrinkWrap: widget.shrinkWrap, - padding: widget.padding, - childrenDelegate: widget.childrenDelegate!, - controller: widget.scrollController ?? ScrollController(), - keyboardDismissBehavior: widget.keyboardDismissBehavior ?? - ScrollViewKeyboardDismissBehavior.manual, - physics: AlwaysScrollableScrollPhysics(parent: widget.physics), - ), - ); - } - - @override - void onUpdateState(SwipeRefreshState state) { - if (state == SwipeRefreshState.loading) { - (refreshKey.currentState as RefreshIndicatorState).show(); - } - - if (state == SwipeRefreshState.hidden) { - if (completer != null) { - completer!.complete(); - completer = null; - } - } - } -} diff --git a/packages/swipe_refresh/lib/src/swipe_refresh.dart b/packages/swipe_refresh/lib/src/swipe_refresh.dart deleted file mode 100644 index 543f39473..000000000 --- a/packages/swipe_refresh/lib/src/swipe_refresh.dart +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:io'; - -import 'package:flutter/cupertino.dart'; -import 'package:swipe_refresh/src/cupertino_swipe_refresh.dart'; -import 'package:swipe_refresh/src/material_swipe_refresh.dart'; -import 'package:swipe_refresh/src/swipe_refresh_state.dart'; -import 'package:swipe_refresh/src/swipe_refresh_style.dart'; - -/// Refresh indicator widget. -/// -/// Params for Material Design style: -/// [indicatorColor], [backgroundColor]. -/// -/// Params for Cupertino style: -/// [refreshTriggerPullDistance], [refreshIndicatorExtent], [indicatorBuilder]. -class SwipeRefresh extends StatelessWidget { - const SwipeRefresh( - this.style, { - required this.stateStream, - required this.onRefresh, - Key? key, - this.children, - this.initState, - this.scrollController, - this.childrenDelegate, - this.padding, - this.indicatorColor, - this.shrinkWrap = false, - this.keyboardDismissBehavior, - this.physics, - Color? backgroundColor, - double? refreshTriggerPullDistance, - double? refreshIndicatorExtent, - RefreshControlIndicatorBuilder? indicatorBuilder, - }) : backgroundColor = backgroundColor ?? const Color(0xFFFFFFFF), - refreshTriggerPullDistance = refreshTriggerPullDistance ?? - CupertinoSwipeRefresh.defaultRefreshTriggerPullDistance, - refreshIndicatorExtent = refreshIndicatorExtent ?? - CupertinoSwipeRefresh.defaultRefreshIndicatorExtent, - indicatorBuilder = indicatorBuilder ?? - CupertinoSliverRefreshControl.buildRefreshIndicator, - super(key: key); - - /// Create refresh indicator adaptive to platform. - const SwipeRefresh.adaptive({ - required Stream stateStream, - required VoidCallback onRefresh, - required List children, - Key? key, - SwipeRefreshState? initState, - Color? indicatorColor, - Color? backgroundColor, - double? refreshTriggerPullDistance, - double? refreshIndicatorExtent, - RefreshControlIndicatorBuilder? indicatorBuilder, - ScrollController? scrollController, - EdgeInsets? padding, - bool shrinkWrap = false, - ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, - ScrollPhysics? physics, - }) : this( - SwipeRefreshStyle.adaptive, - key: key, - children: children, - stateStream: stateStream, - initState: initState, - onRefresh: onRefresh, - indicatorColor: indicatorColor, - backgroundColor: backgroundColor, - refreshTriggerPullDistance: refreshTriggerPullDistance, - refreshIndicatorExtent: refreshIndicatorExtent, - indicatorBuilder: indicatorBuilder, - scrollController: scrollController, - padding: padding, - shrinkWrap: shrinkWrap, - keyboardDismissBehavior: keyboardDismissBehavior, - physics: physics, - ); - - /// Create refresh indicator with Material Design style. - const SwipeRefresh.material({ - required Stream stateStream, - required VoidCallback onRefresh, - required List children, - Key? key, - SwipeRefreshState? initState, - Color? indicatorColor, - Color? backgroundColor, - ScrollController? scrollController, - EdgeInsets? padding, - bool shrinkWrap = false, - ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, - ScrollPhysics? physics, - }) : this( - SwipeRefreshStyle.material, - key: key, - children: children, - stateStream: stateStream, - initState: initState, - onRefresh: onRefresh, - indicatorColor: indicatorColor, - backgroundColor: backgroundColor, - scrollController: scrollController, - padding: padding, - shrinkWrap: shrinkWrap, - keyboardDismissBehavior: keyboardDismissBehavior, - physics: physics, - ); - - /// Create refresh indicator with Cupertino style. - const SwipeRefresh.cupertino({ - required Stream stateStream, - required VoidCallback onRefresh, - required List children, - Key? key, - SwipeRefreshState? initState, - double? refreshTriggerPullDistance, - double? refreshIndicatorExtent, - RefreshControlIndicatorBuilder? indicatorBuilder, - ScrollController? scrollController, - EdgeInsets? padding, - bool shrinkWrap = false, - ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, - ScrollPhysics? physics, - }) : this( - SwipeRefreshStyle.cupertino, - key: key, - children: children, - stateStream: stateStream, - initState: initState, - onRefresh: onRefresh, - refreshTriggerPullDistance: refreshTriggerPullDistance, - refreshIndicatorExtent: refreshIndicatorExtent, - indicatorBuilder: indicatorBuilder, - scrollController: scrollController, - padding: padding, - shrinkWrap: shrinkWrap, - keyboardDismissBehavior: keyboardDismissBehavior, - physics: physics, - ); - - /// Crete SwipeRefresh as common link - /// remove some conflicts between ScrollControllers when ListView added into - /// SwipeRefresh (remove need to add extra ListView) - factory SwipeRefresh.builder({ - required IndexedWidgetBuilder itemBuilder, - required int itemCount, - required Stream stateStream, - required VoidCallback onRefresh, - Key? key, - SwipeRefreshState? initState, - Color? indicatorColor, - Color? backgroundColor, - double? refreshTriggerPullDistance, - double? refreshIndicatorExtent, - RefreshControlIndicatorBuilder? indicatorBuilder, - ScrollController? scrollController, - EdgeInsets? padding, - bool shrinkWrap = false, - ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, - ScrollPhysics? physics, - }) { - return SwipeRefresh( - SwipeRefreshStyle.adaptive, - key: key, - stateStream: stateStream, - initState: initState, - onRefresh: onRefresh, - indicatorColor: indicatorColor, - backgroundColor: backgroundColor, - refreshTriggerPullDistance: refreshTriggerPullDistance, - refreshIndicatorExtent: refreshIndicatorExtent, - indicatorBuilder: indicatorBuilder, - scrollController: scrollController, - padding: padding, - shrinkWrap: shrinkWrap, - keyboardDismissBehavior: keyboardDismissBehavior, - physics: physics, - childrenDelegate: SliverChildBuilderDelegate( - itemBuilder, - childCount: itemCount, - ), - ); - } - - final List? children; - final VoidCallback onRefresh; - final SwipeRefreshState? initState; - final Stream stateStream; - final Color? indicatorColor; - final Color backgroundColor; - final double refreshTriggerPullDistance; - final double refreshIndicatorExtent; - final RefreshControlIndicatorBuilder indicatorBuilder; - final SwipeRefreshStyle style; - final ScrollController? scrollController; - final SliverChildDelegate? childrenDelegate; - final EdgeInsets? padding; - final bool shrinkWrap; - final ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior; - final ScrollPhysics? physics; - - @override - Widget build(BuildContext context) { - return _buildByStyle(style); - } - - // ignore: avoid-returning-widgets - Widget _buildByStyle(SwipeRefreshStyle style) { - switch (style) { - case SwipeRefreshStyle.material: - return MaterialSwipeRefresh( - key: key, - childrenDelegate: childrenDelegate, - stateStream: stateStream, - initState: initState, - onRefresh: onRefresh, - scrollController: scrollController, - backgroundColor: backgroundColor, - indicatorColor: indicatorColor, - shrinkWrap: shrinkWrap, - padding: padding, - keyboardDismissBehavior: keyboardDismissBehavior, - physics: physics, - children: children, - ); - case SwipeRefreshStyle.cupertino: - return CupertinoSwipeRefresh( - key: key, - childrenDelegate: childrenDelegate, - stateStream: stateStream, - initState: initState, - onRefresh: onRefresh, - scrollController: scrollController, - refreshIndicatorExtent: refreshIndicatorExtent, - refreshTriggerPullDistance: refreshTriggerPullDistance, - indicatorBuilder: indicatorBuilder, - shrinkWrap: shrinkWrap, - padding: padding, - physics: physics, - children: children, - ); - case SwipeRefreshStyle.builder: - case SwipeRefreshStyle.adaptive: - if (Platform.isAndroid) { - return _buildByStyle(SwipeRefreshStyle.material); - } else if (Platform.isIOS) { - return _buildByStyle(SwipeRefreshStyle.cupertino); - } - } - - return Container(); - } -} diff --git a/packages/swipe_refresh/lib/src/swipe_refresh_base.dart b/packages/swipe_refresh/lib/src/swipe_refresh_base.dart deleted file mode 100644 index 24e767221..000000000 --- a/packages/swipe_refresh/lib/src/swipe_refresh_base.dart +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:swipe_refresh/src/swipe_refresh_state.dart'; - -/// Base refresh indicator widget. -abstract class SwipeRefreshBase extends StatefulWidget { - const SwipeRefreshBase({ - required this.stateStream, - required this.onRefresh, - Key? key, - this.initState, - this.scrollController, - this.childrenDelegate, - this.children, - this.padding, - this.shrinkWrap = false, - this.keyboardDismissBehavior, - this.physics, - }) : assert((children == null || childrenDelegate == null) && - (children != null || childrenDelegate != null)), - super(key: key); - - final List? children; - final VoidCallback onRefresh; - final SwipeRefreshState? initState; - final Stream stateStream; - final ScrollController? scrollController; - final SliverChildDelegate? childrenDelegate; - final EdgeInsets? padding; - final bool shrinkWrap; - final ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior; - final ScrollPhysics? physics; - - @override - @protected - // ignore: no_logic_in_create_state - SwipeRefreshBaseState createState(); -} - -abstract class SwipeRefreshBaseState - extends State { - @protected - Completer? completer; - @protected - final GlobalKey refreshKey = GlobalKey(); - StreamSubscription? _stateSubscription; - - SwipeRefreshState _currentState = SwipeRefreshState.hidden; - - @override - void initState() { - super.initState(); - - if (widget.initState != null) { - _currentState = widget.initState!; - } - - _stateSubscription = widget.stateStream.listen(_updateState); - } - - @override - Widget build(BuildContext context) { - return buildRefresher(refreshKey, widget.children ?? [], _onRefresh); - } - - // ignore: avoid-returning-widgets - @protected - Widget buildRefresher( - Key key, - List children, - Future Function() onRefresh, - ); - - @protected - void onUpdateState(SwipeRefreshState state); - - void _updateState(SwipeRefreshState newState) { - if (_currentState != newState) { - setState( - () { - _currentState = newState; - - onUpdateState(_currentState); - }, - ); - } - } - - @protected - Future _onRefresh() { - _currentState = SwipeRefreshState.loading; - widget.onRefresh(); - completer = Completer(); - return completer!.future; - } - - @override - void dispose() { - _stateSubscription?.cancel(); - - super.dispose(); - } -} diff --git a/packages/swipe_refresh/lib/src/swipe_refresh_state.dart b/packages/swipe_refresh/lib/src/swipe_refresh_state.dart deleted file mode 100644 index 04433dcef..000000000 --- a/packages/swipe_refresh/lib/src/swipe_refresh_state.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Refresh indicator states. -enum SwipeRefreshState { - /// Indicator hidden. - hidden, - - /// Indicator showed. - loading, -} diff --git a/packages/swipe_refresh/lib/src/swipe_refresh_style.dart b/packages/swipe_refresh/lib/src/swipe_refresh_style.dart deleted file mode 100644 index a58de0a90..000000000 --- a/packages/swipe_refresh/lib/src/swipe_refresh_style.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Indicator style. -enum SwipeRefreshStyle { - /// Material Design - material, - - /// Cupertino - cupertino, - - /// Adaptive - adaptive, - - /// Builder - builder, -} diff --git a/packages/swipe_refresh/lib/swipe_refresh.dart b/packages/swipe_refresh/lib/swipe_refresh.dart deleted file mode 100644 index 64aa38f41..000000000 --- a/packages/swipe_refresh/lib/swipe_refresh.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:swipe_refresh/src/cupertino_swipe_refresh.dart'; -export 'package:swipe_refresh/src/material_swipe_refresh.dart'; -export 'package:swipe_refresh/src/swipe_refresh.dart'; -export 'package:swipe_refresh/src/swipe_refresh_state.dart'; -export 'package:swipe_refresh/src/swipe_refresh_style.dart'; diff --git a/packages/swipe_refresh/media/cupertino.gif b/packages/swipe_refresh/media/cupertino.gif deleted file mode 100644 index 66199672b..000000000 Binary files a/packages/swipe_refresh/media/cupertino.gif and /dev/null differ diff --git a/packages/swipe_refresh/media/material.gif b/packages/swipe_refresh/media/material.gif deleted file mode 100644 index 8c6d0182f..000000000 Binary files a/packages/swipe_refresh/media/material.gif and /dev/null differ diff --git a/packages/swipe_refresh/pubspec.yaml b/packages/swipe_refresh/pubspec.yaml deleted file mode 100644 index aa1b41904..000000000 --- a/packages/swipe_refresh/pubspec.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: swipe_refresh -version: 1.0.1 -description: Widget for refresh by swipe. -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/swipe_refresh" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: diff --git a/packages/swipe_refresh/test/swipe_refresh_cupertino_test.dart b/packages/swipe_refresh/test/swipe_refresh_cupertino_test.dart deleted file mode 100644 index 9a25412b8..000000000 --- a/packages/swipe_refresh/test/swipe_refresh_cupertino_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:swipe_refresh/swipe_refresh.dart'; - -import 'test_utils.dart'; - -void main() { - group('SwipeRefresh.cupertino', () { - late StreamController _controller; - late Stream stream; - - setUp(() { - _controller = StreamController.broadcast(); - stream = _controller.stream; - }); - - tearDown(() async { - await _controller.close(); - }); - - Future _onRefresh() async { - await Future.delayed(const Duration(seconds: 3)); - - _controller.sink.add(SwipeRefreshState.hidden); - } - - group("doesn't break", () { - testWidgets('with children as argument', (tester) async { - final testWidget = makeTestableWidget( - SwipeRefresh.cupertino( - stateStream: stream, - onRefresh: _onRefresh, - children: Colors.primaries - .map( - (e) => Container( - color: e, - height: 100, - ), - ) - .toList(), - ), - ); - - await tester.pumpWidget(testWidget); - }); - }); - - testWidgets('emits hidden state on drag after 3 seconds', (tester) async { - final events = []; - - stream.listen(expectAsync1(events.add)); - - final testWidget = makeTestableWidget( - SwipeRefresh.cupertino( - stateStream: stream, - onRefresh: _onRefresh, - children: const [ - SizedBox(height: 100), - SizedBox(height: 100), - ], - ), - ); - - await tester.pumpWidget(testWidget); - - expect(events, isEmpty); - - /// drag is not enouth to trugger refresh - await tester.drag(find.byType(SwipeRefresh), const Offset(0, 100)); - - expect(events, isEmpty); - - await tester.drag(find.byType(SwipeRefresh), const Offset(0, 300)); - - await tester.pump(const Duration(seconds: 1)); - - /// event must reveal after 3 seconds - expect(events, isEmpty); - - await tester.pump(const Duration(seconds: 3)); - - expect(events, equals([SwipeRefreshState.hidden])); - }); - }); -} diff --git a/packages/swipe_refresh/test/swipe_refresh_material_test.dart b/packages/swipe_refresh/test/swipe_refresh_material_test.dart deleted file mode 100644 index 30f474371..000000000 --- a/packages/swipe_refresh/test/swipe_refresh_material_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:swipe_refresh/swipe_refresh.dart'; - -import 'test_utils.dart'; - -void main() { - group('SwipeRefresh.material', () { - late StreamController _controller; - late Stream stream; - - setUp(() { - _controller = StreamController.broadcast(); - stream = _controller.stream; - }); - - tearDown(() async { - await _controller.close(); - }); - - Future _onRefresh() async { - await Future.delayed(const Duration(seconds: 3)); - - _controller.sink.add(SwipeRefreshState.hidden); - } - - group("doesn't break", () { - testWidgets('with children as argument', (tester) async { - final testWidget = makeTestableWidget( - SwipeRefresh.material( - stateStream: stream, - onRefresh: _onRefresh, - children: Colors.primaries - .map( - (e) => Container( - color: e, - height: 100, - ), - ) - .toList(), - ), - ); - - await tester.pumpWidget(testWidget); - }); - }); - - testWidgets('emits hidden state on drag after 3 seconds', (tester) async { - final events = []; - - stream.listen(expectAsync1(events.add)); - - final testWidget = makeTestableWidget( - SwipeRefresh.material( - stateStream: stream, - onRefresh: _onRefresh, - children: const [ - SizedBox(height: 100), - SizedBox(height: 100), - ], - ), - ); - - await tester.pumpWidget(testWidget); - - expect(events, isEmpty); - - /// drag is not enouth to trugger refresh - await tester.drag(find.byType(SwipeRefresh), const Offset(0, 100)); - - expect(events, isEmpty); - - await tester.drag(find.byType(SwipeRefresh), const Offset(0, 300)); - - await tester.pump(const Duration(seconds: 1)); - - /// event must reveal after 3 seconds - expect(events, isEmpty); - - await tester.pump(const Duration(seconds: 3)); - - expect(events, equals([SwipeRefreshState.hidden])); - }); - }); -} diff --git a/packages/swipe_refresh/test/swipe_refresh_test.dart b/packages/swipe_refresh/test/swipe_refresh_test.dart deleted file mode 100644 index fae7597e0..000000000 --- a/packages/swipe_refresh/test/swipe_refresh_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:swipe_refresh/swipe_refresh.dart'; - -import 'test_utils.dart'; - -void main() { - group('SwipeRefresh', () { - late StreamController _controller; - late Stream stream; - - setUp(() { - _controller = StreamController.broadcast(); - stream = _controller.stream; - }); - - tearDown(() async { - await _controller.close(); - }); - - Future _onRefresh() async { - await Future.delayed(const Duration(seconds: 3)); - - _controller.sink.add(SwipeRefreshState.hidden); - } - - group("doesn't break", () { - testWidgets('with children as argument', (tester) async { - final testWidget = makeTestableWidget( - SwipeRefresh.adaptive( - stateStream: stream, - onRefresh: _onRefresh, - children: Colors.primaries - .map( - (e) => Container( - color: e, - height: 100, - ), - ) - .toList(), - ), - ); - - await tester.pumpWidget(testWidget); - }); - - testWidgets('with itemBuilder as argument', (tester) async { - final testWidget = makeTestableWidget( - SwipeRefresh.builder( - stateStream: stream, - onRefresh: _onRefresh, - itemCount: Colors.primaries.length, - itemBuilder: (_, index) => Container( - color: Colors.primaries[index], - height: 100, - ), - ), - ); - - await tester.pumpWidget(testWidget); - }); - }); - }); -} diff --git a/packages/swipe_refresh/test/test_utils.dart b/packages/swipe_refresh/test/test_utils.dart deleted file mode 100644 index cf7674f71..000000000 --- a/packages/swipe_refresh/test/test_utils.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; - -Widget makeTestableWidget(Widget widget) => MaterialApp(home: widget); diff --git a/packages/tabnavigator/.gitignore b/packages/tabnavigator/.gitignore deleted file mode 100644 index 3132dc5ff..000000000 --- a/packages/tabnavigator/.gitignore +++ /dev/null @@ -1,73 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/tabnavigator/.metadata b/packages/tabnavigator/.metadata deleted file mode 100644 index 70a78156f..000000000 --- a/packages/tabnavigator/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f - channel: stable - -project_type: package diff --git a/packages/tabnavigator/CHANGELOG.md b/packages/tabnavigator/CHANGELOG.md deleted file mode 100644 index c71a343e2..000000000 --- a/packages/tabnavigator/CHANGELOG.md +++ /dev/null @@ -1,29 +0,0 @@ -# Changelog - -## PATCH - -* Apply new lint rules. - -## 1.0.0 - -* Migrated to null safety, min SDK is `2.12.0`. - -## 0.0.1-dev.8 - -* add HeroControllerScope to local Navigators - -## 0.0.1-dev.6 - -* fix emptyValue - -## 0.0.1-dev.5 - -* add emptyValue to clear current tabs - -## 0.0.1-dev.3 - -* Fix lint hints - -## 0.0.1-dev.0 - -* Initial release diff --git a/packages/tabnavigator/CONTRIBUTING.md b/packages/tabnavigator/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/packages/tabnavigator/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/packages/tabnavigator/LICENSE b/packages/tabnavigator/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/tabnavigator/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/tabnavigator/README.md b/packages/tabnavigator/README.md deleted file mode 100644 index 604d01e82..000000000 --- a/packages/tabnavigator/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# Tab Navigator - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/tabnavigator) -[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/SurfGear?flag=tabnavigator&logo=codecov&logoColor=white)](https://codecov.io/gh/surfstudio/SurfGear) -[![Pub Version](https://img.shields.io/pub/v/tabnavigator?logo=dart&logoColor=white)](https://pub.dev/packages/tabnavigator) -[![Pub Likes](https://badgen.net/pub/likes/tabnavigator)](https://pub.dev/packages/tabnavigator) -[![Pub popularity](https://badgen.net/pub/popularity/tabnavigator)](https://pub.dev/packages/tabnavigator/score) -![Flutter Platform](https://badgen.net/pub/flutter-platform/tabnavigator) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Possibly the most common style of navigation in mobile apps is tab-based navigation. -This module can manage the tabs on the screen. - -## Usage - -* Add [TabNavigator](lib/src/tab_navigator.dart) to your widget. -* Add mapping of tabs to widgets inside the tab via [mappedTabs](lib/src/tab_navigator.dart#L22). -* Add a subscription to the stream of selected tabs through [selectedTabStream](lib/src/tab_navigator.dart#L23). -* Define a tab to be opened by default through [initialTab](lib/src/tab_navigator.dart#L24). -* Using [transitionsBuilder](lib/src/tab_navigator.dart#L27) and [transitionDuration](lib/src/tab_navigator.dart#L28), you can define a custom transformation to display the contents of the tab. - -## Installation - -Add `tabnavigator` to your `pubspec.yaml` file: - -```yaml -dependencies: - tabnavigator: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/tabnavigator/analysis_options.yaml b/packages/tabnavigator/analysis_options.yaml deleted file mode 100644 index 27e5a83c9..000000000 --- a/packages/tabnavigator/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml \ No newline at end of file diff --git a/packages/tabnavigator/example/.gitignore b/packages/tabnavigator/example/.gitignore deleted file mode 100644 index 0fa6b675c..000000000 --- a/packages/tabnavigator/example/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release diff --git a/packages/tabnavigator/example/.metadata b/packages/tabnavigator/example/.metadata deleted file mode 100644 index 38e3a3826..000000000 --- a/packages/tabnavigator/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: b1395592de68cc8ac4522094ae59956dd21a91db - channel: unknown - -project_type: app diff --git a/packages/tabnavigator/example/android/.gitignore b/packages/tabnavigator/example/android/.gitignore deleted file mode 100644 index 0a741cb43..000000000 --- a/packages/tabnavigator/example/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/packages/tabnavigator/example/android/app/build.gradle b/packages/tabnavigator/example/android/app/build.gradle deleted file mode 100644 index 6ca23448e..000000000 --- a/packages/tabnavigator/example/android/app/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 30 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 30 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/tabnavigator/example/android/app/src/debug/AndroidManifest.xml b/packages/tabnavigator/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/tabnavigator/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/tabnavigator/example/android/app/src/main/AndroidManifest.xml b/packages/tabnavigator/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 34dd77efb..000000000 --- a/packages/tabnavigator/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/packages/tabnavigator/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/tabnavigator/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e793a000d..000000000 --- a/packages/tabnavigator/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/tabnavigator/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/tabnavigator/example/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3f..000000000 --- a/packages/tabnavigator/example/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/tabnavigator/example/android/app/src/main/res/drawable/launch_background.xml b/packages/tabnavigator/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/tabnavigator/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/tabnavigator/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/tabnavigator/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/tabnavigator/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/tabnavigator/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/tabnavigator/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/tabnavigator/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/tabnavigator/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/tabnavigator/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/tabnavigator/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/tabnavigator/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/tabnavigator/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/tabnavigator/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/tabnavigator/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/tabnavigator/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/tabnavigator/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/tabnavigator/example/android/app/src/main/res/values-night/styles.xml b/packages/tabnavigator/example/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 449a9f930..000000000 --- a/packages/tabnavigator/example/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/tabnavigator/example/android/app/src/main/res/values/styles.xml b/packages/tabnavigator/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d74aa35c2..000000000 --- a/packages/tabnavigator/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/tabnavigator/example/android/app/src/profile/AndroidManifest.xml b/packages/tabnavigator/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/tabnavigator/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/tabnavigator/example/android/build.gradle b/packages/tabnavigator/example/android/build.gradle deleted file mode 100644 index c505a8635..000000000 --- a/packages/tabnavigator/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/tabnavigator/example/android/gradle.properties b/packages/tabnavigator/example/android/gradle.properties deleted file mode 100644 index 94adc3a3f..000000000 --- a/packages/tabnavigator/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/tabnavigator/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/tabnavigator/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bc6a58afd..000000000 --- a/packages/tabnavigator/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/packages/tabnavigator/example/android/settings.gradle b/packages/tabnavigator/example/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/packages/tabnavigator/example/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/packages/tabnavigator/example/ios/.gitignore b/packages/tabnavigator/example/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/packages/tabnavigator/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/tabnavigator/example/ios/Flutter/AppFrameworkInfo.plist b/packages/tabnavigator/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 9367d483e..000000000 --- a/packages/tabnavigator/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/tabnavigator/example/ios/Flutter/Debug.xcconfig b/packages/tabnavigator/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/tabnavigator/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/tabnavigator/example/ios/Flutter/Release.xcconfig b/packages/tabnavigator/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/tabnavigator/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/tabnavigator/example/ios/Runner.xcodeproj/project.pbxproj b/packages/tabnavigator/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index c6759a6e8..000000000 --- a/packages/tabnavigator/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,471 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/tabnavigator/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/tabnavigator/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/packages/tabnavigator/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/tabnavigator/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/tabnavigator/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/tabnavigator/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/tabnavigator/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/tabnavigator/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/tabnavigator/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/tabnavigator/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/tabnavigator/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/tabnavigator/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/tabnavigator/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/tabnavigator/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/tabnavigator/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/tabnavigator/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/tabnavigator/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/tabnavigator/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/tabnavigator/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/tabnavigator/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/tabnavigator/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/tabnavigator/example/ios/Runner/AppDelegate.swift b/packages/tabnavigator/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/tabnavigator/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/tabnavigator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/tabnavigator/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/tabnavigator/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/tabnavigator/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/tabnavigator/example/ios/Runner/Base.lproj/Main.storyboard b/packages/tabnavigator/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/tabnavigator/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/tabnavigator/example/ios/Runner/Info.plist b/packages/tabnavigator/example/ios/Runner/Info.plist deleted file mode 100644 index a060db61e..000000000 --- a/packages/tabnavigator/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/tabnavigator/example/ios/Runner/Runner-Bridging-Header.h b/packages/tabnavigator/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/packages/tabnavigator/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/tabnavigator/example/lib/main.dart b/packages/tabnavigator/example/lib/main.dart deleted file mode 100644 index 6ba4e7316..000000000 --- a/packages/tabnavigator/example/lib/main.dart +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:tabnavigator/tabnavigator.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: const MyHomePage(), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({ - Key? key, - }) : super(key: key); - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - final _tabController = StreamController.broadcast(); - final _initTab = AppTab.feed; - - Stream get tabStream => _tabController.stream; - - final _map = { - AppTab.feed: () { - return ListView.builder( - itemCount: 100, - itemBuilder: (context, index) { - return ListTile( - title: Text('item $index'), - onTap: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => Scaffold( - appBar: AppBar(title: Text('item $index')), - ), - ), - ); - }, - ); - }, - ); - }, - AppTab.colors: () { - return ListView( - children: Colors.accents - .map( - (color) => Builder(builder: (context) { - return InkWell( - onTap: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => Scaffold( - appBar: AppBar( - backgroundColor: color, - ), - ), - ), - ); - }, - child: Container( - height: 100, - color: color, - child: const Center( - child: Text( - 'tap me', - style: TextStyle(color: Colors.grey), - ), - ), - ), - ); - }), - ) - .toList(), - ); - }, - AppTab.info: () { - return Builder(builder: (context) { - return Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'TabNavigator', - style: Theme.of(context).textTheme.headline6, - ), - Text( - 'example', - style: Theme.of(context).textTheme.bodyText2, - ), - Text( - 'Powered by Surf', - style: Theme.of(context).textTheme.subtitle1, - ), - ], - ); - }); - }, - }; - - @override - Widget build(BuildContext context) { - return Scaffold( - body: TabNavigator( - initialTab: _initTab, - selectedTabStream: tabStream, - mappedTabs: _map, - ), - bottomNavigationBar: StreamBuilder( - stream: tabStream, - initialData: _initTab, - builder: (context, snapshot) { - return BottomNavigationBar( - items: const [ - BottomNavigationBarItem( - icon: Icon(Icons.feedback), - label: 'Feed', - ), - BottomNavigationBarItem( - icon: Icon(Icons.color_lens), - label: 'Colors', - ), - BottomNavigationBarItem( - icon: Icon(Icons.info), - label: 'Info', - ), - ], - currentIndex: snapshot.hasData ? snapshot.data!.value : 0, - onTap: (value) => _tabController.sink.add(AppTab.byValue(value)), - ); - }, - ), - ); - } - - @override - void dispose() { - _tabController.close(); - super.dispose(); - } -} - -class AppTab extends TabType { - const AppTab._(int value) : super(value); - - static const feed = AppTab._(0); - static const colors = AppTab._(1); - static const info = AppTab._(2); - - static AppTab byValue(int value) { - switch (value) { - case 0: - return feed; - case 1: - return colors; - case 2: - return info; - default: - throw Exception('no tab for such value'); - } - } -} diff --git a/packages/tabnavigator/example/pubspec.yaml b/packages/tabnavigator/example/pubspec.yaml deleted file mode 100644 index e101a99cc..000000000 --- a/packages/tabnavigator/example/pubspec.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: example -description: A new Flutter project. -publish_to: "none" -version: 1.0.0+1 - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - tabnavigator: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/tabnavigator/example/web/favicon.png b/packages/tabnavigator/example/web/favicon.png deleted file mode 100644 index 8aaa46ac1..000000000 Binary files a/packages/tabnavigator/example/web/favicon.png and /dev/null differ diff --git a/packages/tabnavigator/example/web/icons/Icon-192.png b/packages/tabnavigator/example/web/icons/Icon-192.png deleted file mode 100644 index b749bfef0..000000000 Binary files a/packages/tabnavigator/example/web/icons/Icon-192.png and /dev/null differ diff --git a/packages/tabnavigator/example/web/icons/Icon-512.png b/packages/tabnavigator/example/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48df..000000000 Binary files a/packages/tabnavigator/example/web/icons/Icon-512.png and /dev/null differ diff --git a/packages/tabnavigator/example/web/index.html b/packages/tabnavigator/example/web/index.html deleted file mode 100644 index 1460b5e9b..000000000 --- a/packages/tabnavigator/example/web/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - example - - - - - - - - diff --git a/packages/tabnavigator/example/web/manifest.json b/packages/tabnavigator/example/web/manifest.json deleted file mode 100644 index 8c012917d..000000000 --- a/packages/tabnavigator/example/web/manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "example", - "short_name": "example", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} diff --git a/packages/tabnavigator/lib/src/tab_navigator.dart b/packages/tabnavigator/lib/src/tab_navigator.dart deleted file mode 100644 index 0642e1e1d..000000000 --- a/packages/tabnavigator/lib/src/tab_navigator.dart +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; -import 'package:tabnavigator/tabnavigator.dart'; - -// ignore_for_file: avoid-returning-widgets - -typedef TabBuilder = Widget Function(); -typedef ObserversBuilder = List Function(TabType tabType); - -Type _typeOf() => T; - -Widget _defaultTransitionBuilder( - BuildContext context, - Animation animation, - Animation secondaryAnimation, - Widget child, -) => - child; - -/// Implementation of tab navigation -class TabNavigator extends StatefulWidget { - const TabNavigator({ - required this.mappedTabs, - required this.selectedTabStream, - required this.initialTab, - Key? key, - this.onActiveTabReopened, - this.observersBuilder, - this.transitionsBuilder = _defaultTransitionBuilder, - this.transitionDuration = const Duration(milliseconds: 300), - this.onGenerateRoute, - }) : super(key: key); - - final Map mappedTabs; - final Stream selectedTabStream; - final TabType initialTab; - final void Function(BuildContext, TabType)? onActiveTabReopened; - final ObserversBuilder? observersBuilder; - final RouteTransitionsBuilder transitionsBuilder; - final Duration transitionDuration; - final RouteFactory? onGenerateRoute; - - static TabNavigatorState of(BuildContext context) { - final type = _typeOf(); - TabNavigatorState? tabNavigator; - tabNavigator = context.findAncestorStateOfType(); - if (tabNavigator == null) { - throw Exception( - 'Can not find nearest _TabNavigator of type $type. Do you define it?', - ); - } - - return tabNavigator; - } - - @override - TabNavigatorState createState() => TabNavigatorState(); -} - -class TabNavigatorState extends State { - final List _initializedTabs = []; - final Map> mappedNavKeys = {}; - final TabObserver tabObserver = TabObserver(); - late ValueNotifier _activeTab; - - @override - void initState() { - super.initState(); - _activeTab = ValueNotifier(widget.initialTab) - ..addListener(() { - tabObserver.toggleActiveTab(_activeTab.value); - }); - - // to track clicks on the tab - widget.selectedTabStream.listen( - (tabType) { - if (tabType.value == TabType.emptyValue) { - _initializedTabs.clear(); - mappedNavKeys.clear(); - } else { - if (_activeTab.value == tabType) { - tabObserver.onDoubleTapped(tabType); - } - } - }, - ); - } - - @override - Widget build(BuildContext context) { - return StreamBuilder( - stream: widget.selectedTabStream, - initialData: widget.initialTab, - builder: (context, snapshot) { - if (snapshot.data == null) { - return const SizedBox(); - } - final tabType = snapshot.data!; - if (tabType.value != TabType.emptyValue && - !_initializedTabs.contains(tabType)) { - _initializedTabs.add(tabType); - tabObserver.addTab(tabType); - } - - _activeTab.value = tabType; - return Stack(children: _buildTabs(tabType)); - }, - ); - } - - @override - void dispose() { - tabObserver.dispose(); - mappedNavKeys.clear(); - _activeTab.dispose(); - super.dispose(); - } - - List _buildTabs(TabType selectedTab) { - if (selectedTab.value != TabType.emptyValue) { - mappedNavKeys.putIfAbsent( - selectedTab, - () => GlobalKey(debugLabel: '$selectedTab'), - ); - } - return [ - for (TabType tabType in _initializedTabs) - WillPopScope( - onWillPop: () => _willPop(tabType), - child: Offstage( - key: ValueKey(tabType.value), - offstage: tabType != selectedTab, - child: HeroControllerScope( - controller: MaterialApp.createMaterialHeroController(), - child: Navigator( - key: mappedNavKeys[tabType], - observers: widget.observersBuilder != null - ? widget.observersBuilder!(tabType) - : [], - onGenerateRoute: (rs) => rs.name == Navigator.defaultRouteName - ? PageRouteBuilder( - settings: const RouteSettings( - name: Navigator.defaultRouteName, - ), - transitionsBuilder: widget.transitionsBuilder, - transitionDuration: widget.transitionDuration, - pageBuilder: ( - context, - animation, - secondaryAnimation, - ) { - return widget.mappedTabs[tabType]!(); - }, - ) - : widget.onGenerateRoute?.call(rs), - ), - ), - ), - ), - ]; - } - - Future _willPop(TabType tabType) async { - final maybePop = - mappedNavKeys[tabType]?.currentState?.maybePop() ?? Future.value(false); - - return !(await maybePop); - } -} diff --git a/packages/tabnavigator/lib/src/tab_observer.dart b/packages/tabnavigator/lib/src/tab_observer.dart deleted file mode 100644 index f73c33888..000000000 --- a/packages/tabnavigator/lib/src/tab_observer.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; - -import 'package:tabnavigator/src/tab_state.dart'; -import 'package:tabnavigator/tabnavigator.dart'; - -class TabObserver { - final _tabControllers = >{}; - - Stream? observeShowTab(TabType type) => _tabControllers[type] - ?.stream - .where((lifecycleState) => lifecycleState == TabState.show); - - Stream? observeHideTab(TabType type) => _tabControllers[type] - ?.stream - .where((lifecycleState) => lifecycleState == TabState.hidden); - - Stream? observeDoubleTap(TabType type) => _tabControllers[type] - ?.stream - .where((state) => state == TabState.doubleTapped); - - void toggleActiveTab(TabType activeTab) { - _tabControllers.forEach((type, controller) { - if (type != activeTab) { - controller.add(TabState.hidden); - } - }); - - _tabControllers[activeTab]?.add( - TabState.show, - ); - } - - void addTab(TabType tab) { - _tabControllers.putIfAbsent( - tab, - () => StreamController.broadcast(), - ); - } - - void onDoubleTapped(TabType tabType) { - _tabControllers[tabType]?.add(TabState.doubleTapped); - } - - Future dispose() async { - for (final controller in _tabControllers.values) { - await controller.close(); - } - } -} diff --git a/packages/tabnavigator/lib/src/tab_state.dart b/packages/tabnavigator/lib/src/tab_state.dart deleted file mode 100644 index 7e3e8eb07..000000000 --- a/packages/tabnavigator/lib/src/tab_state.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -enum TabState { show, hidden, doubleTapped } diff --git a/packages/tabnavigator/lib/src/tab_type.dart b/packages/tabnavigator/lib/src/tab_type.dart deleted file mode 100644 index 7a0462df8..000000000 --- a/packages/tabnavigator/lib/src/tab_type.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// base type for a list of tabs -/// adding new types of tabs via the [append] method -abstract class TabType { - const TabType(this.value); - - final int value; - - static const int emptyValue = -1; - - static final _values = []; - - static Iterable get values => _values; - - static void append(TabType newTab) { - _values.add(newTab); - } - - static TabType byValue(int ordinal) { - return _values.firstWhere( - (value) => ordinal == value.value, - orElse: () => throw Exception('Unknown TabType by ordinal $ordinal'), - ); - } -} diff --git a/packages/tabnavigator/lib/tabnavigator.dart b/packages/tabnavigator/lib/tabnavigator.dart deleted file mode 100644 index 3d09a81aa..000000000 --- a/packages/tabnavigator/lib/tabnavigator.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:tabnavigator/src/tab_navigator.dart'; -export 'package:tabnavigator/src/tab_observer.dart'; -export 'package:tabnavigator/src/tab_state.dart'; -export 'package:tabnavigator/src/tab_type.dart'; diff --git a/packages/tabnavigator/pubspec.yaml b/packages/tabnavigator/pubspec.yaml deleted file mode 100644 index bd143d604..000000000 --- a/packages/tabnavigator/pubspec.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: tabnavigator -version: "1.0.0" -description: Module can manage the tabs on the screen. -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/tabnavigator" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: diff --git a/packages/tabnavigator/test/tab_navigator_test.dart b/packages/tabnavigator/test/tab_navigator_test.dart deleted file mode 100644 index f343d5a78..000000000 --- a/packages/tabnavigator/test/tab_navigator_test.dart +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:tabnavigator/tabnavigator.dart'; - -void main() { - late StreamController _tabController; - - setUp(() { - _tabController = StreamController.broadcast(sync: true); - }); - - group('TabNavigator', () { - testWidgets('smoke test', (tester) async { - const _initTab = TestTab.first; - - Stream tabStream() => _tabController.stream; - - final _map = { - TestTab.first: () => Container(color: Colors.white), - TestTab.second: () => Container(color: Colors.blue), - TestTab.third: () => Container(color: Colors.red), - }; - - final _widget = MaterialApp( - home: Scaffold( - body: TabNavigator( - initialTab: _initTab, - selectedTabStream: tabStream(), - mappedTabs: _map, - ), - ), - ); - - await tester.pumpWidget(_widget); - }); - - testWidgets('navigation between tabs', (tester) async { - const _initTab = TestTab.first; - - const _keys = [ - Key('first'), - Key('second'), - Key('third'), - ]; - - final _map = { - TestTab.first: () => Container(color: Colors.white, key: _keys[0]), - TestTab.second: () => Container(color: Colors.blue, key: _keys[1]), - TestTab.third: () => Container(color: Colors.red, key: _keys[2]), - }; - - Stream tabStream() => _tabController.stream; - - final _widget = MaterialApp( - home: Scaffold( - body: TabNavigator( - initialTab: _initTab, - selectedTabStream: tabStream(), - mappedTabs: _map, - ), - ), - ); - - await tester.pumpWidget(_widget); - - // current tab is first with white color - expect( - find.descendant( - of: find.byType(TabNavigator), - matching: find.byKey(_keys[0]), - ), - findsWidgets, - ); - - expect( - find.descendant( - of: find.byType(TabNavigator), - matching: find.byWidgetPredicate( - (widget) => - widget is Container && - (widget.color == Colors.blue || widget.color == Colors.red), - ), - ), - findsNothing, - ); - - // set current tab to second with blue color - _tabController.sink.add(TestTab.second); - await tester.pump(); - - // current tab is second with blue color - expect( - find.descendant( - of: find.byType(TabNavigator), - matching: find.byKey(_keys[1]), - ), - findsWidgets, - ); - - expect( - find.descendant( - of: find.byType(TabNavigator), - matching: find.byWidgetPredicate( - (widget) => - widget is Container && - (widget.color == Colors.red || widget.color == Colors.white), - ), - ), - findsNothing, - ); - }); - - testWidgets('deep navigation', (tester) async { - const _initTab = TestTab.first; - - const _keys = [ - Key('first'), - Key('second'), - Key('third'), - ]; - - final _map = { - TestTab.first: () { - return Builder(builder: (context) { - return InkWell( - onTap: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => Scaffold( - body: Container( - color: Colors.green, - ), - ), - ), - ); - }, - child: Container(color: Colors.white, key: _keys[0]), - ); - }); - }, - TestTab.second: () => Container(color: Colors.blue, key: _keys[1]), - TestTab.third: () => Container(color: Colors.red, key: _keys[2]), - }; - - Stream tabStream() => _tabController.stream; - - final _widget = MaterialApp( - home: Scaffold( - body: TabNavigator( - initialTab: _initTab, - selectedTabStream: tabStream(), - mappedTabs: _map, - ), - bottomNavigationBar: StreamBuilder( - stream: tabStream(), - initialData: _initTab, - builder: (context, snapshot) { - return BottomNavigationBar( - items: const [ - BottomNavigationBarItem( - icon: Icon(Icons.feedback), - label: 'Feed', - ), - BottomNavigationBarItem( - icon: Icon(Icons.color_lens), - label: 'Colors', - ), - BottomNavigationBarItem( - icon: Icon(Icons.info), - label: 'Info', - ), - ], - currentIndex: snapshot.hasData ? snapshot.data!.value : 0, - onTap: (value) => - _tabController.sink.add(TestTab.byValue(value)), - ); - }, - ), - ), - ); - - await tester.pumpWidget(_widget); - - // current tab is first with white color - expect( - find.descendant( - of: find.byType(TabNavigator), - matching: find.byKey(_keys[0]), - ), - findsWidgets, - ); - - expect( - find.byWidgetPredicate( - (widget) => widget is Container && widget.color == Colors.green, - ), - findsNothing, - ); - - await tester.tap(find.byKey(_keys[0])); - await tester.pumpAndSettle(); - - // this means that we're at second screen of first tab - expect( - find.byWidgetPredicate( - (widget) => widget is Container && widget.color == Colors.green, - ), - findsWidgets, - ); - - await tester.tap(find.byIcon(Icons.color_lens)); - await tester.pumpAndSettle(); - - // current tab is second with blue color - expect( - find.descendant( - of: find.byType(TabNavigator), - matching: find.byKey(_keys[0]), - ), - findsNothing, - ); - expect( - find.descendant( - of: find.byType(TabNavigator), - matching: find.byKey(_keys[1]), - ), - findsWidgets, - ); - }); - }); - - tearDown(() async { - await _tabController.close(); - }); -} - -class TestTab extends TabType { - const TestTab._(int value) : super(value); - - static const first = TestTab._(0); - static const second = TestTab._(1); - static const third = TestTab._(2); - - static TestTab byValue(int value) { - switch (value) { - case 0: - return first; - case 1: - return second; - case 2: - return third; - default: - throw Exception('no tab for such value'); - } - } -} diff --git a/packages/tabnavigator/test/tab_type_test.dart b/packages/tabnavigator/test/tab_type_test.dart deleted file mode 100644 index 765721ca1..000000000 --- a/packages/tabnavigator/test/tab_type_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter_test/flutter_test.dart'; -import 'package:tabnavigator/tabnavigator.dart'; - -void main() { - test('TabType append', () { - final _tabs = [ - TestTab.first, - TestTab.second, - TestTab.third, - ]..forEach(TabType.append); - - expect(TabType.values, equals(_tabs)); - }); - - test('TabType byValue', () { - final _tabs = [ - TestTab.first, - TestTab.second, - TestTab.third, - ]..forEach(TabType.append); - - expect(TabType.byValue(0), equals(_tabs[0])); - expect(TabType.byValue(1), equals(_tabs[1])); - expect(TabType.byValue(2), equals(_tabs[2])); - - try { - expect(TabType.byValue(3), throwsException); - } on Exception catch (_) {} - }); -} - -class TestTab extends TabType { - const TestTab._(int value) : super(value); - - static const first = TestTab._(0); - static const second = TestTab._(1); - static const third = TestTab._(2); - - static TestTab byValue(int value) { - switch (value) { - case 0: - return first; - case 1: - return second; - case 2: - return third; - default: - throw Exception('no tab for such value'); - } - } -} diff --git a/packages/virtual_keyboard/.gitignore b/packages/virtual_keyboard/.gitignore deleted file mode 100644 index bb431f0d5..000000000 --- a/packages/virtual_keyboard/.gitignore +++ /dev/null @@ -1,75 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Flutter.podspec -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/virtual_keyboard/.metadata b/packages/virtual_keyboard/.metadata deleted file mode 100644 index 1b5cec022..000000000 --- a/packages/virtual_keyboard/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 27321ebbad34b0a3fafe99fac037102196d655ff - channel: stable - -project_type: app diff --git a/packages/virtual_keyboard/CHANGELOG.md b/packages/virtual_keyboard/CHANGELOG.md deleted file mode 100644 index 2af8bc2f9..000000000 --- a/packages/virtual_keyboard/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -# Changelog - -## 1.0.0 - -* Migrate this package to null safety. - -* ## 0.0.1-dev.0 - -* Initial release diff --git a/packages/virtual_keyboard/LICENSE b/packages/virtual_keyboard/LICENSE deleted file mode 100644 index ea57b2884..000000000 --- a/packages/virtual_keyboard/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 SurfStudio LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/virtual_keyboard/README.md b/packages/virtual_keyboard/README.md deleted file mode 100644 index d16733396..000000000 --- a/packages/virtual_keyboard/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Virtual Keyboard - -[![Build Status](https://shields.io/github/workflow/status/surfstudio/SurfGear/build?logo=github&logoColor=white)](https://github.com/surfstudio/SurfGear/tree/main/packages/virtual_keyboard) - -This package is part of the [SurfGear](https://github.com/surfstudio/SurfGear) toolkit made by [Surf](https://surf.ru). - -## About - -Keyboard widget for use in widget tree - -## Installation - -Add `virtual_keyboard` to your `pubspec.yaml` file: - -```yaml -dependencies: - virtual_keyboard: ^1.0.0 -``` - -You can use both `stable` and `dev` versions of the package listed above in the badges bar. - -## Changelog - -All notable changes to this project will be documented in [this file](./CHANGELOG.md). - -## Issues - -For issues, file directly in the [main SurfGear repo](https://github.com/surfstudio/SurfGear). - -## Contribute - -If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our [contribution guide](../../CONTRIBUTING.md) first and send us your pull request. - -Your PRs are always welcome. - -## How to reach us - -Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian. - -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear) - -## License - -[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/virtual_keyboard/analysis_options.yaml b/packages/virtual_keyboard/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/virtual_keyboard/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/virtual_keyboard/example/.gitignore b/packages/virtual_keyboard/example/.gitignore deleted file mode 100644 index fab2dcbd0..000000000 --- a/packages/virtual_keyboard/example/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# iOS/XCode related -**/ios/Flutter/flutter_export_environment.sh - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Exceptions to above rules. -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/packages/virtual_keyboard/example/.metadata b/packages/virtual_keyboard/example/.metadata deleted file mode 100644 index 6ac2303db..000000000 --- a/packages/virtual_keyboard/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: f7a6a7906be96d2288f5d63a5a54c515a6e987fe - channel: stable - -project_type: app diff --git a/packages/virtual_keyboard/example/analysis_options.yaml b/packages/virtual_keyboard/example/analysis_options.yaml deleted file mode 100644 index 388e27df4..000000000 --- a/packages/virtual_keyboard/example/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml diff --git a/packages/virtual_keyboard/example/android/.gitignore b/packages/virtual_keyboard/example/android/.gitignore deleted file mode 100644 index bc2100d8f..000000000 --- a/packages/virtual_keyboard/example/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/packages/virtual_keyboard/example/android/app/build.gradle b/packages/virtual_keyboard/example/android/app/build.gradle deleted file mode 100644 index 320be2219..000000000 --- a/packages/virtual_keyboard/example/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/virtual_keyboard/example/android/app/src/debug/AndroidManifest.xml b/packages/virtual_keyboard/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/virtual_keyboard/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/virtual_keyboard/example/android/app/src/main/AndroidManifest.xml b/packages/virtual_keyboard/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 55ca830c3..000000000 --- a/packages/virtual_keyboard/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/virtual_keyboard/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/virtual_keyboard/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e793a000d..000000000 --- a/packages/virtual_keyboard/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/virtual_keyboard/example/android/app/src/main/res/drawable/launch_background.xml b/packages/virtual_keyboard/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f88..000000000 --- a/packages/virtual_keyboard/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/packages/virtual_keyboard/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/android/app/src/main/res/values/styles.xml b/packages/virtual_keyboard/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33fd..000000000 --- a/packages/virtual_keyboard/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/virtual_keyboard/example/android/app/src/profile/AndroidManifest.xml b/packages/virtual_keyboard/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index c208884f3..000000000 --- a/packages/virtual_keyboard/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/virtual_keyboard/example/android/build.gradle b/packages/virtual_keyboard/example/android/build.gradle deleted file mode 100644 index 3100ad2d5..000000000 --- a/packages/virtual_keyboard/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/virtual_keyboard/example/android/gradle.properties b/packages/virtual_keyboard/example/android/gradle.properties deleted file mode 100644 index 38c8d4544..000000000 --- a/packages/virtual_keyboard/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/virtual_keyboard/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/virtual_keyboard/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b7..000000000 --- a/packages/virtual_keyboard/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/virtual_keyboard/example/android/settings.gradle b/packages/virtual_keyboard/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/packages/virtual_keyboard/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/virtual_keyboard/example/ios/.gitignore b/packages/virtual_keyboard/example/ios/.gitignore deleted file mode 100644 index e96ef602b..000000000 --- a/packages/virtual_keyboard/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/virtual_keyboard/example/ios/Flutter/AppFrameworkInfo.plist b/packages/virtual_keyboard/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78a..000000000 --- a/packages/virtual_keyboard/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/virtual_keyboard/example/ios/Flutter/Debug.xcconfig b/packages/virtual_keyboard/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/virtual_keyboard/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/virtual_keyboard/example/ios/Flutter/Release.xcconfig b/packages/virtual_keyboard/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee85..000000000 --- a/packages/virtual_keyboard/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.pbxproj b/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index d59cc08fb..000000000 --- a/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,503 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/virtual_keyboard/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/virtual_keyboard/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/virtual_keyboard/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cfd..000000000 --- a/packages/virtual_keyboard/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/virtual_keyboard/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/virtual_keyboard/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16e..000000000 --- a/packages/virtual_keyboard/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/virtual_keyboard/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/virtual_keyboard/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/packages/virtual_keyboard/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/virtual_keyboard/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/virtual_keyboard/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/packages/virtual_keyboard/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/virtual_keyboard/example/ios/Runner/AppDelegate.swift b/packages/virtual_keyboard/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/packages/virtual_keyboard/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab2..000000000 --- a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2fd..000000000 --- a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eaca..000000000 Binary files a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/packages/virtual_keyboard/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You 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. \ No newline at end of file diff --git a/packages/virtual_keyboard/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/virtual_keyboard/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7c..000000000 --- a/packages/virtual_keyboard/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/virtual_keyboard/example/ios/Runner/Base.lproj/Main.storyboard b/packages/virtual_keyboard/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/packages/virtual_keyboard/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/virtual_keyboard/example/ios/Runner/Info.plist b/packages/virtual_keyboard/example/ios/Runner/Info.plist deleted file mode 100644 index a060db61e..000000000 --- a/packages/virtual_keyboard/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/virtual_keyboard/example/ios/Runner/Runner-Bridging-Header.h b/packages/virtual_keyboard/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/packages/virtual_keyboard/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/virtual_keyboard/example/lib/main.dart b/packages/virtual_keyboard/example/lib/main.dart deleted file mode 100644 index 3a12338ec..000000000 --- a/packages/virtual_keyboard/example/lib/main.dart +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:virtual_keyboard/virtual_keyboard.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'InkWidget example', - theme: ThemeData( - primarySwatch: Colors.blue, - visualDensity: VisualDensity.adaptivePlatformDensity, - ), - home: const MyHomePage(title: 'InkWidget example'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({ - required this.title, - Key? key, - }) : super(key: key); - - final String title; - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - static const _maxCount = 4; - - var _symbols = ''; - - int get _symbolsCount => _symbols.length; - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), - body: Center( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text(_symbols), - const SizedBox(height: 20), - Padding( - padding: const EdgeInsets.all(50), - child: VirtualKeyboardWidget( - virtualKeyboardEffect: VirtualKeyboardEffect.keyRipple, - keyboardKeys: numericKeyboardKeys, - onPressKey: _handleTapKey, - ), - ), - ], - ), - ), - ); - } - - VirtualKeyboardKey _buildClear() { - return VirtualKeyboardDeleteKey( - useAsKey: true, - widget: InkWell( - splashColor: Colors.green, - onTap: () { - _symbols = ''; - numericKeyboardKeys[3][2] = buildDelete(); - setState(() {}); - }, - child: const SizedBox( - height: 50, - child: Center(child: Text('Clear')), - ), - ), - ); - } - - void _handleTapKey(VirtualKeyboardKey key) { - if (key is VirtualKeyboardDeleteKey) { - if (_symbolsCount == 0) { - return; - } - - _symbols = _symbols.substring(0, _symbolsCount - 1); - } else if (key is VirtualKeyboardNumberKey) { - _symbols += key.value; - } - - if (_symbolsCount >= _maxCount) { - numericKeyboardKeys[3][2] = _buildClear(); - } else { - numericKeyboardKeys[3][2] = buildDelete(); - } - - setState(() {}); - } -} - -/// Клавиши для цифровой экранной клавиатуры -List> numericKeyboardKeys = [ - for (var i = 1; i < 4; i++) - [ - for (var j = 1; j < 4; j++) VirtualKeyboardNumberKey((i * j).toString()), - ], - [ - VirtualKeyboardEmptyStubKey(), - VirtualKeyboardNumberKey( - '0', - widget: const Text('Zero'), - keyDecoration: BoxDecoration( - color: Colors.red.withOpacity(.1), - ), - ), - buildDelete(), - ], -]; - -VirtualKeyboardKey buildDelete() { - return VirtualKeyboardDeleteKey(widget: const Text('delete')); -} diff --git a/packages/virtual_keyboard/example/pubspec.yaml b/packages/virtual_keyboard/example/pubspec.yaml deleted file mode 100644 index 700af5e72..000000000 --- a/packages/virtual_keyboard/example/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: example -description: A new Flutter application. -version: 1.0.0+1 -publish_to: "none" - -environment: - sdk: ">=2.12.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - virtual_keyboard: - path: ../ - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -flutter: - uses-material-design: true diff --git a/packages/virtual_keyboard/lib/src/table_button.dart b/packages/virtual_keyboard/lib/src/table_button.dart deleted file mode 100644 index 4ca74ee81..000000000 --- a/packages/virtual_keyboard/lib/src/table_button.dart +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:ink_widget/ink_widget.dart'; -import 'package:virtual_keyboard/src/virtual_keyboard_effect.dart'; - -class TableButton extends StatelessWidget { - const TableButton({ - required this.child, - Key? key, - this.width, - this.height, - this.onTap, - this.padding, - this.keyDecoration, - this.inkShapeRipple, - this.inkShapeBorder, - VirtualKeyboardEffect? virtualKeyboardEffect, - bool? useAsKey, - }) : virtualKeyboardEffect = - virtualKeyboardEffect ?? VirtualKeyboardEffect.none, - useAsKey = useAsKey ?? false, - super(key: key); - - /// Button Width - final double? width; - - /// Button Height - final double? height; - - final Widget child; - - final VoidCallback? onTap; - - final EdgeInsets? padding; - - final VirtualKeyboardEffect virtualKeyboardEffect; - - /// Use child instead as a key - final bool useAsKey; - - /// Key decoration - final BoxDecoration? keyDecoration; - - /// [ShapeDecoration] for InkWell Effect - final ShapeDecoration? inkShapeRipple; - - /// [ShapeBorder] for InkWell - final ShapeBorder? inkShapeBorder; - - @override - Widget build(BuildContext context) { - if (useAsKey) { - return child; - } - - return _buildContainer( - child: Padding( - padding: padding ?? EdgeInsets.zero, - child: ConstrainedBox( - constraints: BoxConstraints( - minHeight: height ?? 0.0, - ), - child: SizedBox( - width: width, - child: Center(child: child), - ), - ), - ), - ); - } - - // ignore: avoid-returning-widgets - Widget _buildContainer({required Widget child}) { - switch (virtualKeyboardEffect) { - case VirtualKeyboardEffect.keyboardRipple: - return TableRowInkWell( - onTap: onTap, - child: Container( - decoration: keyDecoration, - child: child, - ), - ); - case VirtualKeyboardEffect.keyRipple: - return InkWidget( - shape: inkShapeRipple, - shapeBorder: inkShapeBorder, - onTap: onTap, - child: Container( - decoration: keyDecoration, - child: Center( - child: child, - ), - ), - ); - case VirtualKeyboardEffect.none: - default: - return GestureDetector( - onTap: onTap, - behavior: HitTestBehavior.opaque, - child: Container( - decoration: keyDecoration, - child: child, - ), - ); - } - } -} diff --git a/packages/virtual_keyboard/lib/src/virtual_keyboard_effect.dart b/packages/virtual_keyboard/lib/src/virtual_keyboard_effect.dart deleted file mode 100644 index 2d6f0eea5..000000000 --- a/packages/virtual_keyboard/lib/src/virtual_keyboard_effect.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// Tap effects -enum VirtualKeyboardEffect { - /// row ripple - keyboardRipple, - - /// key ripple - keyRipple, - - /// none - none, -} diff --git a/packages/virtual_keyboard/lib/src/virtual_keyboard_key.dart b/packages/virtual_keyboard/lib/src/virtual_keyboard_key.dart deleted file mode 100644 index fec4076be..000000000 --- a/packages/virtual_keyboard/lib/src/virtual_keyboard_key.dart +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:math'; - -import 'package:flutter/widgets.dart'; - -/// Keyboard key base class -abstract class VirtualKeyboardKey { - VirtualKeyboardKey({ - required this.widget, - String? id, - bool? useAsKey, - this.keyDecoration, - this.inkShapeRipple, - this.inkShapeBorder, - }) : id = id ?? _r.nextDouble().toString(), - useAsKey = useAsKey ?? false; - - static final _r = Random(); - - /// id keys - final String id; - - /// Widget for use in a key - final Widget? widget; - - /// Use Widget instead as a key - final bool useAsKey; - - /// Key decoration - final BoxDecoration? keyDecoration; - - /// [ShapeDecoration] for InkWell Effect - final ShapeDecoration? inkShapeRipple; - - /// [ShapeBorder] for InkWell - final ShapeBorder? inkShapeBorder; - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes , avoid_annotating_with_dynamic - bool operator ==(dynamic other) { - // ignore: avoid_dynamic_calls - return id == other.id; - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => id.hashCode; -} - -/// Keyboard key with value -abstract class VirtualKeyboardValueKey extends VirtualKeyboardKey { - VirtualKeyboardValueKey( - this._value, { - String? id, - Widget? widget, - bool? useAsKey, - BoxDecoration? keyDecoration, - ShapeDecoration? inkShapeRipple, - ShapeBorder? inkShapeBorder, - }) : super( - id: id, - widget: widget, - useAsKey: useAsKey, - keyDecoration: keyDecoration, - inkShapeRipple: inkShapeRipple, - inkShapeBorder: inkShapeBorder, - ); - - final String _value; - - /// Key value - String get value => _value; -} - -/// Numeric key -class VirtualKeyboardNumberKey extends VirtualKeyboardValueKey { - VirtualKeyboardNumberKey( - String value, { - String? id, - Widget? widget, - bool? useAsKey, - BoxDecoration? keyDecoration, - ShapeDecoration? inkShapeRipple, - ShapeBorder? inkShapeBorder, - }) : super( - value, - id: id, - widget: widget, - useAsKey: useAsKey, - keyDecoration: keyDecoration, - inkShapeRipple: inkShapeRipple, - inkShapeBorder: inkShapeBorder, - ); - - int? _parsedVale; - - /// Get a numeric representation of the key value - int? get number => _parsedVale ??= int.tryParse(value); -} - -/// Blank dummy key -class VirtualKeyboardEmptyStubKey extends VirtualKeyboardKey { - VirtualKeyboardEmptyStubKey({String? id, Widget? widget}) - : super(id: id, widget: widget); -} - -/// Delete key -class VirtualKeyboardDeleteKey extends VirtualKeyboardKey { - VirtualKeyboardDeleteKey({ - String? id, - Widget? widget, - bool? useAsKey, - BoxDecoration? keyDecoration, - ShapeDecoration? inkShapeRipple, - ShapeBorder? inkShapeBorder, - }) : super( - id: id ?? _defaultId, - widget: widget, - useAsKey: useAsKey, - keyDecoration: keyDecoration, - inkShapeRipple: inkShapeRipple, - inkShapeBorder: inkShapeBorder, - ); - - static const _defaultId = 'delete'; -} diff --git a/packages/virtual_keyboard/lib/src/virtual_keyboard_widget.dart b/packages/virtual_keyboard/lib/src/virtual_keyboard_widget.dart deleted file mode 100644 index 68f05e72e..000000000 --- a/packages/virtual_keyboard/lib/src/virtual_keyboard_widget.dart +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'package:flutter/material.dart'; -import 'package:virtual_keyboard/src/table_button.dart'; -import 'package:virtual_keyboard/src/virtual_keyboard_effect.dart'; -import 'package:virtual_keyboard/src/virtual_keyboard_key.dart'; - -// ignore_for_file: avoid-returning-widgets - -/// On-screen keyboard widget - -/// Callback key on the on-screen keyboard -typedef KeyboardPressCallback = void Function(VirtualKeyboardKey keyboardKey); - -class VirtualKeyboardWidget extends StatefulWidget { - const VirtualKeyboardWidget({ - required this.keyboardKeys, - Key? key, - this.buttonWidth, - this.buttonHeight, - this.onPressKey, - this.keyTextStyle, - this.virtualKeyboardEffect, - }) : super(key: key); - - /// Keyboard data list - final List> keyboardKeys; - - /// Button Width - final double? buttonWidth; - - /// Button height - final double? buttonHeight; - - /// Callback button click - final KeyboardPressCallback? onPressKey; - - /// Button text textStyle - final TextStyle? keyTextStyle; - - /// Effect of pressing a button - final VirtualKeyboardEffect? virtualKeyboardEffect; - - @override - State createState() { - return _VirtualKeyboardWidgetState(); - } -} - -class _VirtualKeyboardWidgetState extends State { - static const double _buttonSizeDefault = 36; - - double get _buttonWidth => widget.buttonWidth ?? _buttonSizeDefault; - double get _buttonHeight => widget.buttonHeight ?? _buttonSizeDefault; - - @override - Widget build(BuildContext context) { - return Material( - type: MaterialType.transparency, - child: Table( - children: [ - for (final line in widget.keyboardKeys) - TableRow( - children: [ - for (final keyboardKey in line) _buildKey(keyboardKey), - ], - ), - ], - ), - ); - } - - Widget _buildKey(VirtualKeyboardKey keyboardKey) { - if (keyboardKey is VirtualKeyboardEmptyStubKey) { - return const SizedBox.shrink(); - } - - return TableButton( - padding: const EdgeInsets.symmetric(vertical: 16), - width: _buttonWidth, - height: _buttonHeight, - onTap: () => widget.onPressKey?.call(keyboardKey), - virtualKeyboardEffect: widget.virtualKeyboardEffect, - useAsKey: keyboardKey.useAsKey, - keyDecoration: keyboardKey.keyDecoration, - inkShapeRipple: keyboardKey.inkShapeRipple, - inkShapeBorder: keyboardKey.inkShapeBorder, - child: _buildValueKey(keyboardKey), - ); - } - - Widget _buildValueKey(VirtualKeyboardKey keyboardKey) { - if (keyboardKey.widget != null) { - return keyboardKey.widget!; - } - - if (keyboardKey is VirtualKeyboardValueKey) { - return Text(keyboardKey.value, style: widget.keyTextStyle); - } else if (keyboardKey is VirtualKeyboardDeleteKey) { - return Text('delete', style: widget.keyTextStyle); - } else { - return const SizedBox.shrink(); - } - } -} diff --git a/packages/virtual_keyboard/lib/virtual_keyboard.dart b/packages/virtual_keyboard/lib/virtual_keyboard.dart deleted file mode 100644 index 4035f25ef..000000000 --- a/packages/virtual_keyboard/lib/virtual_keyboard.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2019-present, SurfStudio LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -export 'package:virtual_keyboard/src/virtual_keyboard_effect.dart'; -export 'package:virtual_keyboard/src/virtual_keyboard_key.dart'; -export 'package:virtual_keyboard/src/virtual_keyboard_widget.dart'; diff --git a/packages/virtual_keyboard/pubspec.yaml b/packages/virtual_keyboard/pubspec.yaml deleted file mode 100644 index 13d6ed731..000000000 --- a/packages/virtual_keyboard/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: virtual_keyboard -version: "1.0.0" -description: Keyboard widget for use in widget tree -repository: "https://github.com/surfstudio/SurfGear/tree/main/packages/virtual_keyboard" -issue_tracker: "https://github.com/surfstudio/SurfGear/issues" -publish_to: none - -dependencies: - flutter: - sdk: flutter - - ink_widget: ^2.0.0 - -dev_dependencies: - surf_lint_rules: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -flutter: diff --git a/template/.gitignore b/template/.gitignore deleted file mode 100644 index d4b7e7166..000000000 --- a/template/.gitignore +++ /dev/null @@ -1,73 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# Visual Studio Code related -.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ -*.lock -.flutter-plugins-dependencies - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/template/.metadata b/template/.metadata deleted file mode 100644 index 07763f72f..000000000 --- a/template/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713 - channel: stable - -project_type: app diff --git a/template/CHANGELOG.md b/template/CHANGELOG.md deleted file mode 100644 index 89e655670..000000000 --- a/template/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## [0.0.1-rc1+1] - TODO: Add release date. - -* TODO: Describe initial release. diff --git a/template/CONTRIBUTING.md b/template/CONTRIBUTING.md deleted file mode 100644 index 496da65ad..000000000 --- a/template/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contributing rules - -Thank you for your help! Before you start, let's take a look at some agreements. - -## Pull request rules - -Make sure that your code: - -1. Does not contain analyzer errors -2. Follows a [official style](https://dart.dev/guides/language/effective-dart/style) -3. Follows the official [style of formatting](https://flutter.dev/docs/development/tools/formatting) -3. Contains no errors -4. New functionality is covered by tests. New functionality passes old tests -5. Create example that demonstrate new functionality if it is possible - -## Accepting the changes - -After your pull request passes the review code, the project maintainers will merge the changes -into the branch to which the pull request was sent. - -## Issues - -Feel free to report any issues and bugs. - -1. To report about the problem, create an issue on GithHub -2. In the issue add the description of the problem -3. Do not forget to mention your development environment, Flutter version, libraries required for - illustration of the problem -4. It is necessary to attach the code part that causes an issue or to make a small demo project - that shows the issue -5. Attach stack trace so it helps us to deal with the issue -6. If the issue is related to graphics, screen recording is required diff --git a/template/README.md b/template/README.md deleted file mode 100644 index 021c6c015..000000000 --- a/template/README.md +++ /dev/null @@ -1,10 +0,0 @@ -#### [SurfGear](https://github.com/surfstudio/SurfGear) - -# template - -A project with a template structure. -Designed for development in [Surf](https://surfstudio.ru) - -# Attention - -Runs from version flutter >= 1.25 diff --git a/template/analysis_options.yaml b/template/analysis_options.yaml deleted file mode 100644 index 27e5a83c9..000000000 --- a/template/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:surf_lint_rules/analysis_options.yaml \ No newline at end of file diff --git a/template/android/.gitignore b/template/android/.gitignore deleted file mode 100644 index e8cfc3e60..000000000 --- a/template/android/.gitignore +++ /dev/null @@ -1,71 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# Visual Studio Code related -.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ -*.lock - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/template/android/Gemfile b/template/android/Gemfile deleted file mode 100644 index 9b4253ed1..000000000 --- a/template/android/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -# Ensure github repositories are fetched using HTTPS -git_source(:github) do |repo_name| - repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") - puts(repo_name) - "https://github.com/#{repo_name}.git" -end if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('2') - -gem "fastlane", "~> 2.134.0" #todo your fastlane version - -plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') -eval_gemfile(plugins_path) if File.exist?(plugins_path) \ No newline at end of file diff --git a/template/android/Makefile b/template/android/Makefile deleted file mode 100644 index 8d1ece3ae..000000000 --- a/template/android/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# COLORS -GREEN := $(shell tput -Txterm setaf 2) -YELLOW := $(shell tput -Txterm setaf 3) -WHITE := $(shell tput -Txterm setaf 7) -RESET := $(shell tput -Txterm sgr0) - -RVM_VERSION := 2.5.5 - -TARGET_MAX_CHAR_NUM=20 -## Show help -help: - @echo '' - @echo 'Usage:' - @echo ' ${YELLOW}make${RESET} ${GREEN}${RESET}' - @echo '' - @echo 'Targets:' - @awk '/^[a-zA-Z\-\_0-9]+:/ { \ - helpMessage = match(lastLine, /^## (.*)/); \ - if (helpMessage) { \ - helpCommand = substr($$1, 0, index($$1, ":")-1); \ - helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \ - printf " ${YELLOW}%-$(TARGET_MAX_CHAR_NUM)s${RESET} ${GREEN}%s${RESET}\n", helpCommand, helpMessage; \ - } \ - } \ - { lastLine = $$0 }' $(MAKEFILE_LIST) - -## Initialization of the working environ -init: - # Install bundler if not installed - if ! gem spec bundler > /dev/null 2>&1; then\ - echo "bundler gem is not installed!";\ - -gem install bundler -v 1.17.3;\ - fi - - -bundle install --path .bundle - -## Used to upload debug build in fabric. Usually, it is not called manually, it is necessary for the CI to work. -beta: - bundle exec fastlane beta - -## Used to upload debug build in app_store. Usually, it is not called manually, it is necessary for the CI to work. -release: - bundle exec fastlane release diff --git a/template/android/app/build.gradle b/template/android/app/build.gradle deleted file mode 100644 index a0a8ea188..000000000 --- a/template/android/app/build.gradle +++ /dev/null @@ -1,82 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" -apply from: "../keystore/signingConfigs.gradle" - -android { - compileSdkVersion 29 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "ru.surfstudio.flutterTemplate" - minSdkVersion 21 - targetSdkVersion 29 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } - - flavorDimensions "release-type" - - productFlavors { - dev { - dimension "release-type" - applicationIdSuffix ".dev" - versionNameSuffix "-dev" - } - - prod { - dimension "release-type" - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/template/android/app/fabric.properties b/template/android/app/fabric.properties deleted file mode 100644 index db689790f..000000000 --- a/template/android/app/fabric.properties +++ /dev/null @@ -1,3 +0,0 @@ -apiSecret=API_SECRET -apiKey=API_KEY -todo \ No newline at end of file diff --git a/template/android/app/google-services.json b/template/android/app/google-services.json deleted file mode 100644 index fda1558d0..000000000 --- a/template/android/app/google-services.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "project_info": { - "project_number": "408916197886", - "firebase_url": "https://fluttertemplate-dev.firebaseio.com", - "project_id": "fluttertemplate-dev", - "storage_bucket": "fluttertemplate-dev.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:408916197886:android:cb9a7fce044b7a857240af", - "android_client_info": { - "package_name": "ru.surfstudio.flutterTemplate.dev" - } - }, - "oauth_client": [ - { - "client_id": "408916197886-it0jiq8690u5tuitemf9khcl7ho60v0i.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyACfLGIeVlabRzerXoKELbVFEDaWBqzG7Q" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "408916197886-it0jiq8690u5tuitemf9khcl7ho60v0i.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "408916197886-k8e3qnq63i7a033fovheq41nmme1q0pp.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "ru.surfstudio.flutterAppTestSwift.dev" - } - } - ] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/template/android/app/src/debug/AndroidManifest.xml b/template/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 381195185..000000000 --- a/template/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/template/android/app/src/dev/dev_flavor.md b/template/android/app/src/dev/dev_flavor.md deleted file mode 100644 index 368bfd494..000000000 --- a/template/android/app/src/dev/dev_flavor.md +++ /dev/null @@ -1,3 +0,0 @@ -# Флейвор для разработки - -Сюда поставляются файлы, которые используются в приложениии для разработки. Например, google-services.json. diff --git a/template/android/app/src/main/AndroidManifest.xml b/template/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index bbaa7d936..000000000 --- a/template/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/template/android/app/src/main/kotlin/com/example/flutter_template/MainActivity.kt b/template/android/app/src/main/kotlin/com/example/flutter_template/MainActivity.kt deleted file mode 100644 index 22c9df6ac..000000000 --- a/template/android/app/src/main/kotlin/com/example/flutter_template/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.flutter_template - -import io.flutter.embedding.android.FlutterActivity; - -class MainActivity : FlutterActivity() { -} diff --git a/template/android/app/src/main/res/drawable/launch_background.xml b/template/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 0db4a835d..000000000 --- a/template/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7..000000000 Binary files a/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79b..000000000 Binary files a/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d439148..000000000 Binary files a/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34..000000000 Binary files a/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eeb..000000000 Binary files a/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/template/android/app/src/main/res/values/styles.xml b/template/android/app/src/main/res/values/styles.xml deleted file mode 100644 index f392f84af..000000000 --- a/template/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/template/android/app/src/profile/AndroidManifest.xml b/template/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 381195185..000000000 --- a/template/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/template/android/build.gradle b/template/android/build.gradle deleted file mode 100644 index 949759b21..000000000 --- a/template/android/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - maven { url 'https://maven.fabric.io/public' } - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - classpath 'com.google.gms:google-services:4.3.3' - classpath 'io.fabric.tools:gradle:1.29.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/template/android/fastlane/Appfile b/template/android/fastlane/Appfile deleted file mode 100644 index 089d2738d..000000000 --- a/template/android/fastlane/Appfile +++ /dev/null @@ -1,2 +0,0 @@ -json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one -package_name(YOUR_PACKAGE_NAME) # e.g. com.krausefx.app todo diff --git a/template/android/fastlane/Fastfile b/template/android/fastlane/Fastfile deleted file mode 100644 index 6d19d7741..000000000 --- a/template/android/fastlane/Fastfile +++ /dev/null @@ -1,63 +0,0 @@ -# Конфигурация Fastlane для Android-сборки. -# -# ВАЖНО: в релизном цикле Android-сборки Fastlane используется только для CD (выгрузка приложения в -# Firebase App Distribution). -# -# Документация:https://docs.fastlane.tools - -# Uncomment the line if you want fastlane to automatically update itself -# update_fastlane -fastlane_version "2.108.0" #todo your fastlane version - -default_platform(:android) - -platform :android do - - desc "Submit a new debug build to Firebase App Distribution" - lane :beta do - puts "Firebase App Distribution | QA Build | 32-bit" - upload_to_fad( - app_id: "1:408916197886:android:cb9a7fce044b7a857240af", #todo input your app_id - apk_path: "../build/app/outputs/apk/dev/release/app-qa-armeabi-v7a.apk", - groups: "surf", #todo input your app_id - release_notes: "QA x32", - ) - - puts "Firebase App Distribution | QA Build | 64-bit" - upload_to_fad( - app_id: "1:408916197886:android:cb9a7fce044b7a857240af", #todo input your app_id - apk_path: "../build/app/outputs/apk/dev/release/app-qa-arm64-v8a.apk", - groups: "surf", #todo input your app_id - release_notes: "QA x64", - ) - - puts "Firebase App Distribution | Prod Build | 32-bit" - upload_to_fad( - app_id: "1:408916197886:android:cb9a7fce044b7a857240af", #todo input your app_id - apk_path: "../build/app/outputs/apk/prod/release/app-release-armeabi-v7a.apk", - release_notes: "Prod x32", - ) - - puts "Firebase App Distribution | Prod Build | 64-bit" - upload_to_fad( - app_id: "1:408916197886:android:cb9a7fce044b7a857240af", #todo input your app_id - apk_path: "../build/app/outputs/apk/prod/release/app-release-arm64-v8a.apk", - release_notes: "Prod x64", - ) - end - - lane :upload_to_fad do |options| - app_id = options[:app_id] - apk_path = options[:apk_path] - groups = options[:groups] - release_notes = options[:release_notes] - firebase_app_distribution( - app: "#{app_id}", - apk_path: "#{apk_path}", - groups: "#{groups}", #todo тут надо проверить будет ли работать функция без groups на входе - release_notes: "#{release_notes}", - firebase_cli_path: "/usr/local/bin/firebase", - firebase_cli_token: "$FIREBASE_TOKEN", - ) - end -end diff --git a/template/android/fastlane/Pluginfile b/template/android/fastlane/Pluginfile deleted file mode 100644 index d1ef63edd..000000000 --- a/template/android/fastlane/Pluginfile +++ /dev/null @@ -1 +0,0 @@ -gem 'fastlane-plugin-firebase_app_distribution' \ No newline at end of file diff --git a/template/android/fastlane/README.md b/template/android/fastlane/README.md deleted file mode 100644 index 3aecedb36..000000000 --- a/template/android/fastlane/README.md +++ /dev/null @@ -1,34 +0,0 @@ -fastlane documentation -================ -# Installation - -Make sure you have the latest version of the Xcode command line tools installed: - -``` -xcode-select --install -``` - -Install _fastlane_ using -``` -[sudo] gem install fastlane -NV -``` -or alternatively using `brew cask install fastlane` - -# Available Actions -## Android -### android beta -``` -fastlane android beta -``` -Submit a new debug build to Firebase App Distribution -### android upload_to_fad -``` -fastlane android upload_to_fad -``` - - ----- - -This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. -More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). -The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/template/android/gradle.properties b/template/android/gradle.properties deleted file mode 100644 index b6e61b62b..000000000 --- a/template/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -android.enableJetifier=true -android.useAndroidX=true -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true diff --git a/template/android/gradle/wrapper/gradle-wrapper.properties b/template/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 6ee1468c9..000000000 --- a/template/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Mon Sep 23 16:25:00 MSK 2019 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/template/android/keystore/keystoreConfig.gradle b/template/android/keystore/keystoreConfig.gradle deleted file mode 100755 index 8c01c7b95..000000000 --- a/template/android/keystore/keystoreConfig.gradle +++ /dev/null @@ -1,26 +0,0 @@ -ext { - def releaseKeystorePropsFile = rootProject.file("keystore/keystore_release.properties") - if (releaseKeystorePropsFile.exists()) { - println "Start extract release keystore config from keystore_release.properties" - def keystoreProps = new Properties() - keystoreProps.load(new FileInputStream(releaseKeystorePropsFile)) - keystoreConfig = [ - storePassword: keystoreProps['storePassword'], - keyPassword : keystoreProps['keyPassword'], - keyAlias : keystoreProps['keyAlias'], - storeFile : keystoreProps['storeFile'] - ] - } else { - println "Start extract release keystore config from global vars" - keystoreConfig = [ - storePassword: System.getenv('storePassword'), - keyPassword : System.getenv('keyPassword'), - keyAlias : System.getenv('keyAlias'), - storeFile : System.getenv('storeFile') - ] - } - if(!keystoreConfig.storeFile) { - keystoreConfig.storeFile = "no_keystore_file" //fix crash file(storeFile) - } - println "Extracted keystore config: $keystoreConfig" -} \ No newline at end of file diff --git a/template/android/keystore/sign_app_rules.md b/template/android/keystore/sign_app_rules.md deleted file mode 100644 index f26574382..000000000 --- a/template/android/keystore/sign_app_rules.md +++ /dev/null @@ -1,87 +0,0 @@ -[TOC] - -# Подпись приложения - -Для сборки релизной версии приложения необходимо подписать apk-файл. - -Для этого необходимо сделать следующее: - -* создать keystore - -* создать необходимые градл-таски - -* загрузить keystore в jenkins - -* настроить CI в проекте - -## Создание keystore - -Подпись приложения будет файлом в формате *.jks. -Название файла должно соответствовать паттерну: *название_проекта_release.jks* - -Для создания подписи можно воспользоваться [официальной документацией][keystore]. - -Также следует создать файл `keystore_release.properties`, в который поместить -следующие данные: -``` -storePassword=*ключ к храниилищу* -keyPassword=*пароль к подписи* -keyAlias=*алиас* -storeFile=../keystore/*название_проекта*_release.jks -``` - -**Важно:** - -* Не изменяйте название файла `keystore_release.properties`! - -* Эти файлы необходимо поместить в директорию `keystore`. - -* **Запрещено их хранение в репозитории.** - -Для того, чтобы члены команды могли локально собрать релизную версию, стоит -также расшарить на них данные файлы. - -## Настройка проекта для работы с keystore - - -Далее необходимо в папке `keystore` создать файл [`keystoreConfig.gradle`][task]. -Его можно скопировать к себе в проект. - -Скопировать себе в проект [`signinConfigs.gradle`][signin]. -Проверить, что в нем присутствует следующее: -``` -release { - apply from: '../keystore/keystoreConfig.gradle' - - keyAlias keystoreConfig.keyAlias - keyPassword keystoreConfig.keyPassword - storeFile file(keystoreConfig.storeFile) - storePassword keystoreConfig.storePassword - } -``` - -В релизном [`buildTypes`][bt] прописать `signingConfig signingConfigs.release`. - -Пример можно посмотреть [здесь][gradle] - -## Загрузка в Jenkins / Настройка CI в проекте - -Два файла, полученные на предыдущем этапе, `*.jks` и `*.properties` следует -загрузить в Jenkins для поддержки сборки релизной версии приложения через -**CI**(ContinuousIntegration). - -Для того, чтобы загрузить файлы в систему обратитесь к администратору. - -Подробнее описано [здесь][release]. - -## Локальная сборка релизной версии - -Для того, чтобы собрать релизную версию приложения локально, необходимо -поместить файл с подписью в папку `keystore`. - -[keystore]: https://developer.android.com/studio/publish/app-signing -[task]: keystoreConfig.gradle -[gradle]: ../app-injector/build.gradle -[release]: https://jirasurf.atlassian.net/wiki/spaces/ANDDEP/pages/413237258 -[signin]: signingConfigs.gradle -[bt]: ../buildTypes.gradle \ No newline at end of file diff --git a/template/android/keystore/signingConfigs.gradle b/template/android/keystore/signingConfigs.gradle deleted file mode 100644 index f80ec7046..000000000 --- a/template/android/keystore/signingConfigs.gradle +++ /dev/null @@ -1,22 +0,0 @@ -//Информация о подписи приложения - -android { - signingConfigs { - //todo настроить релизную подпись приложения - release { - apply from: '../keystore/keystoreConfig.gradle' - - keyAlias keystoreConfig.keyAlias - keyPassword keystoreConfig.keyPassword - storeFile file(keystoreConfig.storeFile) - storePassword keystoreConfig.storePassword - } - - debug { - storeFile file("../keystore/test.keystore") - storePassword "qatest" - keyAlias "test" - keyPassword "qatest" - } - } -} \ No newline at end of file diff --git a/template/android/keystore/test.keystore b/template/android/keystore/test.keystore deleted file mode 100755 index 692f3b970..000000000 Binary files a/template/android/keystore/test.keystore and /dev/null differ diff --git a/template/android/settings.gradle b/template/android/settings.gradle deleted file mode 100644 index 5a2f14fb1..000000000 --- a/template/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/template/android/src/main/AndroidManifest.xml b/template/android/src/main/AndroidManifest.xml deleted file mode 100644 index 9ebf2628d..000000000 --- a/template/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/template/android/src/main/kotlin/ru/surfstudio/template/TemplatePlugin.kt b/template/android/src/main/kotlin/ru/surfstudio/template/TemplatePlugin.kt deleted file mode 100644 index f04d4b1f4..000000000 --- a/template/android/src/main/kotlin/ru/surfstudio/template/TemplatePlugin.kt +++ /dev/null @@ -1,25 +0,0 @@ -package ru.surfstudio.template - -import io.flutter.plugin.common.MethodCall -import io.flutter.plugin.common.MethodChannel -import io.flutter.plugin.common.MethodChannel.MethodCallHandler -import io.flutter.plugin.common.MethodChannel.Result -import io.flutter.plugin.common.PluginRegistry.Registrar - -class TemplatePlugin : MethodCallHandler { - companion object { - @JvmStatic - fun registerWith(registrar: Registrar) { - val channel = MethodChannel(registrar.messenger(), "template") - channel.setMethodCallHandler(TemplatePlugin()) - } - } - - override fun onMethodCall(call: MethodCall, result: Result) { - if (call.method == "getPlatformVersion") { - result.success("Android ${android.os.Build.VERSION.RELEASE}") - } else { - result.notImplemented() - } - } -} diff --git a/template/ci/JenkinsfilePullRequestJob.groovy b/template/ci/JenkinsfilePullRequestJob.groovy deleted file mode 100644 index 56b51a40d..000000000 --- a/template/ci/JenkinsfilePullRequestJob.groovy +++ /dev/null @@ -1,19 +0,0 @@ -@Library('surf-lib@flutter') -import ru.surfstudio.ci.pipeline.pr.PrPipelineFlutter -@Library('surf-lib@flutter') -// https://bitbucket.org/surfstudio/jenkins-pipeline-lib/ //todo change version to snapshot -import ru.surfstudio.ci.pipeline.pr.PrPipelineFlutter -import ru.surfstudio.ci.stage.StageStrategy - -//init -def pipeline = new PrPipelineFlutter(this) -pipeline.init() - -pipeline.androidKeystoreCredentials = null //todo -pipeline.androidKeystorePropertiesCredentials = null //todo - -pipeline.getStage(pipeline.UNIT_TEST).strategy = StageStrategy.SKIP_STAGE -pipeline.getStage(pipeline.STATIC_CODE_ANALYSIS).strategy = StageStrategy.SKIP_STAGE - -//run -pipeline.run() diff --git a/template/ci/JenkinsfileTagJob.groovy b/template/ci/JenkinsfileTagJob.groovy deleted file mode 100644 index 8096b8955..000000000 --- a/template/ci/JenkinsfileTagJob.groovy +++ /dev/null @@ -1,29 +0,0 @@ -@Library('surf-lib@flutter') -import ru.surfstudio.ci.pipeline.tag.TagPipelineFlutter -@Library('surf-lib@flutter') -// https://bitbucket.org/surfstudio/jenkins-pipeline-lib/ //todo change version to snapshot -import ru.surfstudio.ci.pipeline.tag.TagPipelineFlutter -import ru.surfstudio.ci.stage.StageStrategy - -//init -def pipeline = new TagPipelineFlutter(this) - -pipeline.init() - -//configuration -//TODO: set real values ↓↓↓ (mechanism see in AndroidUtil.withKeystore) -pipeline.androidKeystoreCredentials = null -pipeline.androidKeystorePropertiesCredentials = null - - -//customization -pipeline.getStage(pipeline.CLEAN_PREV_BUILD).strategy = StageStrategy.SKIP_STAGE -pipeline.getStage(pipeline.UNIT_TEST).strategy = StageStrategy.SKIP_STAGE -pipeline.getStage(pipeline.STATIC_CODE_ANALYSIS).strategy = StageStrategy.SKIP_STAGE - - -// project specific - - -//run -pipeline.run() \ No newline at end of file diff --git a/template/ci/Readme.md b/template/ci/Readme.md deleted file mode 100644 index f35c2b4cd..000000000 --- a/template/ci/Readme.md +++ /dev/null @@ -1,6 +0,0 @@ -#CI - -Текущая папка содержит скрипты для дженкинса, основанные на библиотеке [jenkins-pipeline-lib](https://bitbucket.org/surfstudio/jenkins-pipeline-lib/) - -Изменять содержимое этой папки нужно в той ветке, которая используется в Job для получения скипта (см параметр "Branch Specifier" в блоке "Pipeline" в настройках Job), по умолчанию эта ветка - master - diff --git a/template/clean_ios.sh b/template/clean_ios.sh deleted file mode 100644 index 5a2b735d7..000000000 --- a/template/clean_ios.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -flutter clean -cd ios/ -pod cache clean --all -#rm -rf ~/Library/Developer/Xcode/DerivedData todo uncomment -xcodebuild clean -rm -rf .symlinks/ -rm -rf Pods -rm -rf Podfile.lock -cd .. \ No newline at end of file diff --git a/template/docs/tech_doc.md b/template/docs/tech_doc.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/template/ios/.gitignore b/template/ios/.gitignore deleted file mode 100644 index 4c1e93c05..000000000 --- a/template/ios/.gitignore +++ /dev/null @@ -1,50 +0,0 @@ -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -*.gcno -*.xcscmblueprint -*dSYM -*dSYM.zip -*.mobileprovision - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control -# -Podfile.lock -Pods/ - -# Exported environment variables for XcodeCoverage -env.sh - -# OS X Finder stuff -.DS_Store - -# Fastlane Stuff -fastlane/local_config.sh -fastlane/test_output -fastlane/Provisioning -fastlane/Build -fastlane/report.xml - -# Bundler -.bundle/ -Gemfile.lock -vendor/ \ No newline at end of file diff --git a/template/ios/Assets/.gitkeep b/template/ios/Assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/template/ios/Classes/SwiftTemplatePlugin.swift b/template/ios/Classes/SwiftTemplatePlugin.swift deleted file mode 100644 index 03193e8d1..000000000 --- a/template/ios/Classes/SwiftTemplatePlugin.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Flutter -import UIKit - -public class SwiftTemplatePlugin: NSObject, FlutterPlugin { - public static func register(with registrar: FlutterPluginRegistrar) { - let channel = FlutterMethodChannel(name: "template", binaryMessenger: registrar.messenger()) - let instance = SwiftTemplatePlugin() - registrar.addMethodCallDelegate(instance, channel: channel) - } - - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { - result("iOS " + UIDevice.current.systemVersion) - } -} diff --git a/template/ios/Classes/TemplatePlugin.h b/template/ios/Classes/TemplatePlugin.h deleted file mode 100644 index 31cf68382..000000000 --- a/template/ios/Classes/TemplatePlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface TemplatePlugin : NSObject -@end diff --git a/template/ios/Classes/TemplatePlugin.m b/template/ios/Classes/TemplatePlugin.m deleted file mode 100644 index 3fec6f620..000000000 --- a/template/ios/Classes/TemplatePlugin.m +++ /dev/null @@ -1,8 +0,0 @@ -#import "TemplatePlugin.h" -#import