diff --git a/.fvmrc b/.fvmrc deleted file mode 100644 index 4cac08f7..00000000 --- a/.fvmrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "flutter": "3.29.2" -} \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml deleted file mode 100644 index 5da7b205..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ /dev/null @@ -1,72 +0,0 @@ -name: Bug Report 🐛 -description: Report a bug -labels: ["bug"] -body: - - type: markdown - attributes: - value: | - **Bug Report 🐛** - - Please fill out the sections below to help everyone identify and fix the bug. - - - type: textarea - id: description - attributes: - label: Describe your issue - placeholder: Provide a clear and concise description of the bug. - validations: - required: true - - - type: textarea - id: steps - attributes: - label: Steps to reproduce - placeholder: | - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See error - validations: - required: true - - - type: textarea - id: expected - attributes: - label: What was the expected result? - placeholder: Provide a clear and concise description of what you expected to happen. - - - type: textarea - id: screenshots - attributes: - label: Put here any screenshots or videos (optional) - - - type: textarea - id: contact - attributes: - label: How can we contact you (optional) - placeholder: Leave your slack for clarifications or updates. - validations: - required: false - - - type: dropdown - id: assign - attributes: - label: "Would you like to work on this issue?" - options: - - "Yes" - - "No" - - - type: checkboxes - id: terms - attributes: - label: "By submitting this issue, I have confirmed that:" - options: - - label: I have starred the repo ⭐ and watched 👀 it on GitHub and followed the contribution guidelines. - required: true - - - type: markdown - attributes: - value: | - **Thank you for reporting this issue!** - - Your contribution is crucial, and we will investigate the bug as soon as possible. We appreciate your effort in improving the project. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index c73d60e1..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,9 +0,0 @@ -blank_issues_enabled: true -contact_links: - - name: Questions - url: https://rhccgsoc15.slack.com/join/shared_invite/zt-2a4ankwic-~HR0g1yTtetDWzGNAW3tDA#/shared-invite/email - about: You can join the discussions on Slack . - - name: GSoC - url: https://ccextractor.org/docs/ideas_page_for_summer_of_code_2024/ - about: You can find more information about the project on the CCextractor website. - \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature.yaml b/.github/ISSUE_TEMPLATE/feature.yaml deleted file mode 100644 index 04bc2ff7..00000000 --- a/.github/ISSUE_TEMPLATE/feature.yaml +++ /dev/null @@ -1,61 +0,0 @@ -name: Feature Request 🚀 -description: Suggest an idea for this project -labels: [enhancement] -body: - - type: markdown - attributes: - value: | - Please fill out the sections below to help everyone identify the issue - - type: textarea - id: description - attributes: - label: Describe your improvement idea or feature request - placeholder: A clear and concise description of what the idea or feature is. - validations: - required: true - - - type: textarea - id: steps - attributes: - label: How would you like to see it implemented? - placeholder: | - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See improvement - validations: - required: true - - type: textarea - id: screenshots - attributes: - label: Put here any screenshots or videos (optional) - placeholder: | - If you have any screenshots or videos or mockups, please add them here. - - - type: textarea - id: contact - attributes: - label: How can we contact you (optional) - placeholder: | - Leave your slack . - validations: - required: false - - type: dropdown - id: assign - attributes: - label: "Would you like to work on this issue?" - options: - - "Yes" - - "No" - - type: checkboxes - id: terms - attributes: - label: "By submitting this issue, I have confirmed that:" - options: - - label: I have starred the repo ⭐ and watched 👀 it on GitHub and followed the contribution guidelines. - required: true - - - type: markdown - attributes: - value: | - Thanks for reporting this issue! We will get back to you as soon as possible. \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 5f715685..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,19 +0,0 @@ -# Description - -Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change. - -## Fixes #(issue_no) - -Replace `issue_no` with the issue number which is fixed in this PR - -## Screenshots - - - -## Checklist - - -- [ ] Tests have been added or updated to cover the changes -- [ ] Documentation has been updated to reflect the changes -- [ ] Code follows the established coding style guidelines -- [ ] All tests are passing \ No newline at end of file diff --git a/.github/workflows/flutterci.yml b/.github/workflows/flutterci.yml deleted file mode 100644 index 62991ff1..00000000 --- a/.github/workflows/flutterci.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Flutter CI - -on: - pull_request: - branches: - - main - - reports - -jobs: - build: - runs-on: ubuntu-latest - - steps: - # Step 1: Checkout the repository - - uses: actions/checkout@v2 - - # Step 2: Setup Java with version 12.x - - uses: actions/setup-java@v1 - with: - java-version: "17.x" - - # Step 3: Setup Flutter with version 3.7.11 - - uses: subosito/flutter-action@v1 - with: - flutter-version: "3.29.2" - - # Step 4: Get dependencies using pub get - - run: flutter pub get - - # Step 5: Analyze the code using flutter analyze - - run: flutter analyze --no-fatal-warnings --no-fatal-infos - - # Step 6: Format the code using flutter format (uncomment if needed) - # - run: flutter format -n --set-exit-if-changed . - - # Step 7: Run tests using flutter test - # - run: flutter test - - # Step 8: Build APK using flutter build apk - - run: flutter build apk --release --flavor production - - # Step 9: Upload the built APK as an artifact - - uses: actions/upload-artifact@v4 - with: - name: release-apk - path: build/app/outputs/flutter-apk/app-production-release.apk diff --git a/.github/workflows/nightlydepolyci.yml b/.github/workflows/nightlydepolyci.yml deleted file mode 100644 index 30ce4d0e..00000000 --- a/.github/workflows/nightlydepolyci.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: Nightly F-Droid CI - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - # Step 1: Checkout the main branch - - name: Checkout Main Branch - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - # Step 2: Setup Java with version 17.x - - name: Setup Java - uses: actions/setup-java@v1 - with: - java-version: "17.x" - - # Step 3: Setup Flutter with version 3.29.2 - - name: Setup Flutter - uses: subosito/flutter-action@v1 - with: - flutter-version: "3.29.2" - - # Step 4: Get dependencies - - name: Get dependencies - run: flutter pub get - - # Step 5: Decode signing secrets for keystore and properties - - name: Decode Signing Secrets - env: - NIGHTLY_KEYSTORE_B64: ${{ secrets.NIGHTLY_KEYSTORE_B64 }} - NIGHTLY_PROPERTIES_B64: ${{ secrets.NIGHTLY_PROPERTIES_B64 }} - run: | - echo "$NIGHTLY_KEYSTORE_B64" | base64 --decode > android/nightly.jks - echo "$NIGHTLY_PROPERTIES_B64" | base64 --decode > android/key_nightly.properties - - # Step 6: Build the APK with nightly flavor and release mode - - name: Build APK - run: flutter build apk --flavor nightly --build-number=${{ github.run_number }} --release - - # Step 7: Verify the APK is signed - - name: Verify sign - run: keytool -printcert -jarfile build/app/outputs/flutter-apk/app-nightly-release.apk - - # Step 8: Configure git and push the APK to fdroid-repo branch - - name: Configure and push to fdroid-repo - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git fetch origin fdroid-repo:fdroid-repo - git checkout fdroid-repo - mv build/app/outputs/flutter-apk/app-nightly-release.apk repo/nightly.${{ github.run_number }}.apk - git add repo/ - git commit -m "chore: Add new signed APK from build ${{ github.run_number }}" - - # Step 9: Prune old APKs, keeping only the 5 most recent - - name: Prune Old APKs - run: | - echo "Checking for old APKs to prune..." - if [ $(ls -1 repo/*.apk 2>/dev/null | wc -l) -gt 5 ]; then - echo "More than 5 APKs found. Deleting all but the 5 most recent..." - ls -1 repo/*.apk | sort -V | head -n -5 | xargs rm -f - else - echo "5 or fewer APKs found. No cleanup needed." - fi - - # Step 10: Setup F-Droid (install fdroidserver) and update the repo - - name: Fdroid Install - uses: subosito/flutter-action@v1 - - name: Run F-Droid Update - env: - FDROID_CONFIG_YML_B64: ${{ secrets.FDROID_CONFIG_YML }} - FDROID_KEYSTORE_P12_B64: ${{ secrets.FDROID_KEYSTORE_P12 }} - run: | - # Decode the secrets into files - echo $FDROID_CONFIG_YML_B64 | base64 --decode > config.yml - echo $FDROID_KEYSTORE_P12_B64 | base64 --decode > keystore.p12 - - # Install fdroidserver - sudo apt-get update - sudo apt-get install -y fdroidserver - - # Run the update command, referencing the files - fdroid update -c - - # Step 12: Push the updated repo files with amended commit - - name: Push F-Droid updates - run: | - git add . - git commit --amend -m "chore: Add new signed APK from build ${{ github.run_number }} and update F-Droid metadata" - git push origin fdroid-repo --force diff --git a/.github/workflows/fdroidupdateci.yml b/.github/workflows/update.yml similarity index 51% rename from .github/workflows/fdroidupdateci.yml rename to .github/workflows/update.yml index 1fc27109..85904cab 100644 --- a/.github/workflows/fdroidupdateci.yml +++ b/.github/workflows/update.yml @@ -1,35 +1,54 @@ -name: Nightly F-Droid CI - -on: - push: - branches: - - fdroid-repo - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Fdroid Install - uses: subosito/flutter-action@v1 - - name: Run F-Droid Update - env: - FDROID_CONFIG_YML_B64: ${{ secrets.FDROID_CONFIG_YML }} - FDROID_KEYSTORE_P12_B64: ${{ secrets.FDROID_KEYSTORE_P12 }} - run: | - # Decode the secrets into files - echo $FDROID_CONFIG_YML_B64 | base64 --decode > config.yml - echo $FDROID_KEYSTORE_P12_B64 | base64 --decode > keystore.p12 - - # Install fdroidserver - sudo apt-get update - sudo apt-get install -y fdroidserver - - # Run the update command, referencing the files - fdroid update -c - - - name: Push F-Droid updates - run: | - git add . - git commit --amend -m "update: a repo update ${{ github.run_number }}" - git push origin fdroid-repo --force +name: Fdroid Repo Update + +on: + push: + branches: + - fdroid-repo + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # Step 1: Checkout the main branch + - name: Checkout Fdroid-repo Branch + uses: actions/checkout@v2 + with: + ref: fdroid-repo + fetch-depth: 0 + + + # Step 2: Setup Java with version 17.x + - name: Setup Java + uses: actions/setup-java@v1 + with: + java-version: "17.x" + + # Step 3: Setup F-Droid (install fdroidserver) and update the repo + - name: Fdroid Install + uses: subosito/flutter-action@v1 + - name: Run F-Droid Update + env: + FDROID_CONFIG_YML_B64: ${{ secrets.FDROID_CONFIG_YML }} + FDROID_KEYSTORE_P12_B64: ${{ secrets.FDROID_KEYSTORE_P12 }} + run: | + # Decode the secrets into files + echo $FDROID_CONFIG_YML_B64 | base64 --decode > config.yml + echo $FDROID_KEYSTORE_P12_B64 | base64 --decode > keystore.p12 + + # Install fdroidserver + sudo apt-get update + sudo apt-get install -y fdroidserver + + # Run the update command, referencing the files + fdroid update -c + + # Step 4: Push the updated repo files with amended commit + - name: Push F-Droid updates + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + git add . + git commit -m "chore:${{ github.run_number }} update F-Droid metadata" || echo "No changes to commit" + git push origin fdroid-repo diff --git a/.gitignore b/.gitignore index 583fc590..abe0069f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +config.yml +keystore.p12 + # Miscellaneous *.class *.log @@ -47,4 +50,14 @@ app.*.map.json /android/app/release # FVM Version Cache -.fvm/ \ No newline at end of file +.fvm/ + +# Platform specific directories +# this branch does not require these files + +/ios +/linux +/macos +/windows +/android +/tmp \ No newline at end of file diff --git a/.metadata b/.metadata deleted file mode 100644 index cbf1dc0e..00000000 --- a/.metadata +++ /dev/null @@ -1,45 +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: "a14f74ff3a1cbd521163c5f03d68113d50af93d3" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - - platform: android - create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - - platform: ios - create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - - platform: linux - create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - - platform: macos - create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - - platform: web - create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - - platform: windows - create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 7348ba08..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "html.format.wrapAttributesIndentSize": 4, - "[dart]": { - "editor.tabSize": 4, - "editor.insertSpaces": false, - "editor.detectIndentation": true, - "editor.suggest.insertMode": "replace", - "editor.formatOnSave": true - }, - "editor.formatOnSave": true, - "editor.insertSpaces": false, - "editor.detectIndentation": false, - "editor.tabSize": 4, - "editor.codeActionsOnSave": { - "source.fixAll": "explicit" - }, - "java.configuration.updateBuildConfiguration": "interactive", - "dart.flutterSdkPath": ".fvm/versions/3.29.2" -} \ No newline at end of file diff --git a/AUTHORS.md b/AUTHORS.md deleted file mode 100644 index 56644223..00000000 --- a/AUTHORS.md +++ /dev/null @@ -1,5 +0,0 @@ -Maintainer: Nishant Singhal - -Portions taken from other GPLv3 projects such as https://github.com/bradyt/taskw-dart - -This project started as part of Google Summer of Code 2022. Other than this very generous sponsorship the project has no relationship with Google. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 2133f67f..00000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,128 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, religion, or sexual identity -and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -Nishant Singhal. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct -enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index a5006321..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,80 +0,0 @@ - - - - -# Getting Started - -In order to use the mobile app, you would need the flood backend running on your local machine. There are several ways -you can do that and all these approaches can be found at [Taskwarrior-Flutter](https://github.com/CCExtractor/taskwarrior-flutter/wiki) - - -## Steps - -### Installation -1. Clone the repository from GitHub: - -```bash -git clone https://github.com/CCExtractor/taskwarrior-flutter.git -``` - -2. Navigate to project's root directory: - -```bash -cd taskwarrior-flutter -``` - -3. Check for Flutter setup and connected devices: - -```bash -flutter doctor -``` - -4. Get the dependancies - -```bash -flutter pub get -``` - -5. Run the app: - -```bash -flutter run --flavor production -``` -Also Check if it's working with nightly with -```bash -flutter run --flavor nightly -``` - -### Check out the app -___ - - -1. Open mobile app - 1. Check out the app - 2. Make Profile - 3. Connect with TaskServer - 4. Sync Tasks with it - - -## Prerequisites - -* Flutter -* VSCode / Android Studio - -## Contributing - -1. Fork the Project -2. Clone the Forked Repo. `git clone https://github.com/[username]/taskwarrior-flutter.git` -3. Create a branch - - For your Feature Branch (`git checkout -b feature/AmazingFeature`) - - For your Fix Branch (`git checkout -b fix/BugFix`) -4. Do the changes in that branch -5. Add all files (`git add .`) - - Do Not add files generated by code editor of Android Studio IDE - - Only add files that related to your feature -6. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) -7. Make sure branch is synced with main branch of `CCExtractor/taskwarrior-flutter` - - If not, please sync it and test again - - If any conflict, resolve according to feature and test again -7. Push to the Branch (`git push origin feature/AmazingFeature`) -8. Open a Pull Request for the `main` branch. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f288702d..00000000 --- a/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/README.md b/README.md deleted file mode 100644 index 7b40c054..00000000 --- a/README.md +++ /dev/null @@ -1,256 +0,0 @@ -# Taskwarrior Mobile App - - -![Group 3](https://github.com/Pavel401/taskwarrior-flutter/assets/47685150/1ffb623b-b147-4176-9f7c-abda544b257c) - -[![Slack](https://img.shields.io/badge/chat-on_slack-purple.svg?style=for-the-badge&logo=slack)](https://slackinvite.ccextractor.org/) - - -
- Table of Contents -
    -
  1. About The Project
  2. -
  3. Built With
  4. -
  5. Usage & Screenshots
  6. -
  7. - TaskServer Setup - -
  8. -
  9. Timeline and Project Page
  10. -
  11. Getting Started
  12. -
  13. Contributing
  14. -
  15. Community
  16. -
  17. Flutter
  18. -
  19. Contact
  20. -
-
- - - - -## About The Project - -[![logo](https://github.com/Pavel401/taskwarrior-flutter/assets/47685150/65afcc8e-d5df-4b06-9ae5-093d51e20178)](https://taskwarrior.org/) - - -Taskwarrior is Free and Open Source Software that manages your TODO list from the command line. -It is flexible, fast, and unobtrusive. It does its job then gets out of your way. The CLI tool and other relevant documentation can be -found at [Taskwarrior](https://taskwarrior.org/download/). - -This project aims to build an app for Taskwarrior. It is your task management app across all platforms. It helps you manage your tasks and filter them as per your needs. - - -### Built With - -* [Dart](https://dart.dev/) -* [Flutter](https://flutter.dev/) - - - -## Getting started & Contribution guide - -[CONTRIBUTING.md](https://github.com/CCExtractor/taskwarrior-flutter/blob/main/CONTRIBUTING.md) - - - -## Usage & Screenshots - - - - - - - - - - - - - - - - - - - - - ---- - - -# Timeline and Project Page - - -[GSoC page](https://summerofcode.withgoogle.com/programs/2022/projects/8pYfxjXv) - -## Getting Started - -1. Clone the repository from GitHub: - -```bash -git clone https://github.com/CCExtractor/taskwarrior-flutter -``` - -2. Navigate to the project's root directory: - -```bash -cd taskwarrior-flutter -``` - -3. Install dependencies: - -```bash -flutter pub get -``` - -4. Check for Flutter setup and connected devices: - -```bash -flutter doctor -``` - -5. Run the app: - -```bash -flutter run -``` - -## Contributing - -Help is always appreciated, whether it comes in the form of feature requests or suggestions, code improvements, refactoring, or performance enhancements. The more is done, the better it gets. If you find any bug(s), consider opening an [issue](https://github.com/NishantSinghal19/taskwarrior-gsoc/issues/new). -Please make sure you specify the commit type while opening pull requests: - -``` -feat: The new feature you're proposing - -fix: A bug fix in the project - -test: Everything related to testing - -docs: Everything related to documentation -``` - -You can Check community guidlines at [Contribution Guidelines & Development Practices](https://github.com/CCExtractor/taskwarrior-flutter/wiki/Contribution-Guidelines-&-Development-Practices) page in Wiki section -## Community - -We would love to hear from you! You may join the gsoc-taskwarrior channel of CCExtractor community through Slack: - -[![Slack](https://img.shields.io/badge/chat-on_slack-purple.svg?style=for-the-badge&logo=slack)](https://ccextractor.org/public/general/support/) - -## Flutter - -For help in getting started with Flutter, view -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. - -## TaskServer Setup - -**Why Consider TaskServer?** - -You might wonder if you need a Taskserver when using Taskwarrior on a single device. The answer depends on your needs. If you want to effortlessly share tasks across multiple clients or devices, then the Taskserver is your ideal choice. It's the only option that seamlessly syncs your data, making it accessible from anywhere. - -**Streamline Your Task Management** - -With a Taskserver in place, you can synchronize your tasks across various clients and devices, eliminating the hassle of manually updating data on each one. This means less data entry and more efficient task management. - -**Automatic Task Backup** - -One valuable benefit of using a Taskserver is automatic task backup. Your tasks are safeguarded, ensuring you won't lose any critical information. - -Consider setting up a Taskserver for a smoother, more efficient Taskwarrior experience! - ---- - -## TaskServer Setup Options - -There are multiple ways to set up a TaskServer, depending on your preferences and requirements. You can either host it on your own server or take advantage of free TaskServer options. - -### Self-Hosted TaskServer - -**Official TaskServer Guide:** -You can follow the official guide provided by TaskServer for detailed instructions. Check out the documentation here: [TaskServer Official Guide](https://gothenburgbitfactory.github.io/taskserver-setup/). - -**Video Tutorial:** -For a step-by-step visual guide, you can watch the latest video tutorial on YouTube: [Watch Tutorial](https://www.youtube.com/watch?v=6Ci_JyvVIaI&ab_channel=MetaphysicsComputing). - -**Cloud Server Hosting:** -Consider setting up the TaskServer in the cloud, such as Azure or any other cloud server provider, for accessibility from anywhere. - -**Docker Container:** -For easy installation, you can opt for the unofficial Docker container. Check out the latest Docker container here: [Docker Container](https://github.com/ogarcia/docker-taskd). - -## [#WingTask](https://app.wingtask.com/) - -### 1. [Sign Up](https://app.wingtask.com/signup) at WingTask - -![image](https://github.com/Rancho-rachit/taskwarrior-flutter/assets/111473259/90efd152-87ed-4d39-8a9b-acdffe4879a5) - -### 2. Download Configuration Files - -![image](https://github.com/Rancho-rachit/taskwarrior-flutter/assets/111473259/436435d5-c33a-4ffe-a839-c907563eecf2) - -### 3. Once extracted, you'll find the following files and folders: - -- `install.sh` -- `README` -- `taskrc` -- `wingtask_certs` - -![Files and Folders](https://github.com/CCExtractor/taskwarrior-flutter/assets/47685150/34fc908a-682d-426c-a5a9-54043a3c7583) - - -### 4. Run install script - -#### 4.1 Change the directory to the respective folder having configuration files - -`cd /mnt/c/...../folder_name/wingtask_configuration` - -![image](https://github.com/Rancho-rachit/taskwarrior-flutter/assets/111473259/732b58d0-3826-4de0-b253-3d88cae7edcd) - -#### 4.2 Run the install script - -- run 2 commands - -`chmod +x install.sh` - -`./install.sh` - -![image](https://github.com/Rancho-rachit/taskwarrior-flutter/assets/111473259/a088befa-9a33-494e-8383-ba75a0df1f31) - -- if the above commands run successfully, you'll get an interface like this - -![image](https://github.com/Rancho-rachit/taskwarrior-flutter/assets/111473259/2096249c-165e-41d9-941c-4ce1f3dc81f6) - -### 5. Syncing for the first time - -- run `task sync init` - -![image](https://github.com/Rancho-rachit/taskwarrior-flutter/assets/111473259/b562e125-1ca1-480b-8b96-6d7c709eb4b9) - -### 6. Configure the certificates in the app: - - Select `example@gmail.com.cert.pem` for "Configure your certificate." - - Select `example@gmail.com.key.pem` for "Configure TaskServer key." - - Select `letsencrypt_root_cert.pem` for "Configure Server Certificate." - -![Configure Certificates](https://github.com/CCExtractor/taskwarrior-flutter/assets/47685150/8b73f087-152a-4207-9d93-87d0b87404d8) - -### 7. Click on the "Stats" button in the app bar and check the response. If the response code is 200, you are good to go. - -![Check Response](https://github.com/CCExtractor/taskwarrior-flutter/assets/47685150/21c82242-63fe-46d1-9f30-c681ca9a699f) - -### 8. Sync your tasks and enjoy! - -Feel free to reach out if you encounter any issues. - ---- - -## Contact - -[Nishant Singhal](https://www.linkedin.com/in/nishant-singhal19/) - -[Mabud Alam](https://www.linkedin.com/in/mabud/) - -Project Link: [Taskwarrior](https://github.com/CCExtractor/taskwarrior-flutter) diff --git a/analysis_options.yaml b/analysis_options.yaml deleted file mode 100644 index 61b6c4de..00000000 --- a/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore deleted file mode 100644 index 308c19aa..00000000 --- a/android/.gitignore +++ /dev/null @@ -1,14 +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 -**/*.keystore -**/*.jks -key_nightly.properties \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle deleted file mode 100644 index a755ea05..00000000 --- a/android/app/build.gradle +++ /dev/null @@ -1,105 +0,0 @@ -plugins { - id "com.android.application" - id "kotlin-android" - id "dev.flutter.flutter-gradle-plugin" -} - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -def keystoreProperties = new Properties() - def keystorePropertiesFile = rootProject.file('key.properties') - if (keystorePropertiesFile.exists()) { - keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) -} - -def nightlyKeystoreProperties = new Properties() -def nightlyKeystorePropertiesFile = rootProject.file('key_nightly.properties') -if (nightlyKeystorePropertiesFile.exists()) { - nightlyKeystoreProperties.load(new FileInputStream(nightlyKeystorePropertiesFile)) -} - -android { - namespace "com.ccextractor.taskwarriorflutter" - compileSdkVersion 35 - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - signingConfigs { - production { - keyAlias keystoreProperties['keyAlias'] - keyPassword keystoreProperties['keyPassword'] - storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null - storePassword keystoreProperties['storePassword'] - } - nightly { - keyAlias nightlyKeystoreProperties['keyAlias'] - keyPassword nightlyKeystoreProperties['keyPassword'] - storeFile nightlyKeystoreProperties['storeFile'] ? file(nightlyKeystoreProperties['storeFile']) : null - storePassword nightlyKeystoreProperties['storePassword'] - } - } - - defaultConfig { - minSdkVersion flutter.minSdkVersion - targetSdkVersion 33 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - flavorDimensions "default" - productFlavors { - production { - dimension "default" - applicationId "com.ccextractor.taskwarrior" - signingConfig keystoreProperties.isEmpty() ? signingConfigs.debug : signingConfigs.production - } - nightly { - dimension "default" - applicationId "com.ccextractor.taskwarrior.nightly" - versionNameSuffix "-nightly" - signingConfig nightlyKeystoreProperties.isEmpty() ? signingConfigs.debug : signingConfigs.nightly - } - } - - buildTypes { - release { - minifyEnabled false - shrinkResources false - } - } -} - -flutter { - source '../..' -} - -dependencies { -} - diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index b91c8f67..00000000 --- a/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 055b29ff..00000000 --- a/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/BurndownChart.kt b/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/BurndownChart.kt deleted file mode 100644 index 7318b9de..00000000 --- a/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/BurndownChart.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.ccextractor.taskwarriorflutter - -import android.appwidget.AppWidgetManager -import android.content.Context -import android.content.SharedPreferences -import es.antonborri.home_widget.HomeWidgetProvider - -class BurndownChartProvider : HomeWidgetProvider() { - override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray, widgetData: SharedPreferences) { - // This method is intentionally left blank. - // Widget updates are handled by WidgetUpdateReceiver. - } -} \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/MainActivity.kt b/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/MainActivity.kt deleted file mode 100644 index 3a8aba62..00000000 --- a/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/MainActivity.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.ccextractor.taskwarriorflutter - -import android.content.Intent -import android.os.Bundle -import io.flutter.embedding.android.FlutterActivity -import io.flutter.embedding.engine.FlutterEngine -import io.flutter.plugin.common.MethodChannel -import android.content.Context -import android.content.IntentFilter -import android.appwidget.AppWidgetManager -import android.content.ComponentName - -class MainActivity: FlutterActivity() { - private val channel = "com.example.taskwarrior/widget" - - override fun configureFlutterEngine(flutterEngine: FlutterEngine) { - super.configureFlutterEngine(flutterEngine) - - MethodChannel(flutterEngine.dartExecutor.binaryMessenger, channel).setMethodCallHandler { - call, result -> - if (call.method == "updateWidget") { - updateWidget() - result.success("Widget updated") - } else { - result.notImplemented() - } - } - } - - private fun updateWidget() { - val intent = Intent(this, WidgetUpdateReceiver::class.java).apply { - action = "UPDATE_WIDGET" - } - sendBroadcast(intent) - } -} \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/TaskWarriorWidgetProvider.kt b/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/TaskWarriorWidgetProvider.kt deleted file mode 100644 index 5662cd2a..00000000 --- a/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/TaskWarriorWidgetProvider.kt +++ /dev/null @@ -1,210 +0,0 @@ -package com.ccextractor.taskwarriorflutter -import android.annotation.TargetApi -import android.appwidget.AppWidgetManager -import android.content.Context -import android.net.Uri -import android.widget.RemoteViews -import es.antonborri.home_widget.HomeWidgetBackgroundIntent -import es.antonborri.home_widget.HomeWidgetLaunchIntent -import es.antonborri.home_widget.HomeWidgetProvider -import es.antonborri.home_widget.HomeWidgetPlugin -import org.json.JSONException -import android.content.Intent -import android.widget.RemoteViewsService -import org.json.JSONObject -import org.json.JSONArray as OrgJSONArray -import android.os.Bundle -import android.app.PendingIntent -import android.appwidget.AppWidgetProvider -import android.os.Build - - -@TargetApi(Build.VERSION_CODES.CUPCAKE) -class TaskWarriorWidgetProvider : AppWidgetProvider() { - - override fun onReceive(context: Context, intent: Intent) { - // val myaction = intent.action - if (intent.action == "TASK_ACTION") { - val extras = intent.extras - if(extras!=null){ - val uuid = extras.getString("uuid")?:"" - val add_task = extras.getString("launchedFor") - val host = if(add_task == "ADD_TASK"){context.getString(R.string.app_widget_add_clicked_uri)}else{context.getString(R.string.app_widget_card_clicked_uri)} - val launchIntent = Intent(context, MainActivity::class.java).apply { - action = context.getString(R.string.app_widget_launch_action) - data = Uri.parse("$host?uuid=$uuid") - flags = Intent. FLAG_ACTIVITY_NEW_TASK - context?.startActivity(this) - } - // HomeWidgetLaunchIntent.getActivity(context, MainActivity::class.java, Uri.parse("TaskWarrior://taskView?taskId=$uuid")) - } - } - super.onReceive(context, intent) - } - fun getLayoutId(context: Context) : Int{ - val sharedPrefs = HomeWidgetPlugin.getData(context) - val theme = sharedPrefs.getString("themeMode", "") - val layoutId = if (theme.equals("dark")) { - R.layout.taskwarrior_layout_dark // Define a dark mode layout in your resources - } else { - R.layout.taskwarrior_layout - } - return layoutId - } - @TargetApi(Build.VERSION_CODES.DONUT) - override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) { - appWidgetIds.forEach { widgetId -> - val sharedPrefs = HomeWidgetPlugin.getData(context) - val tasks = sharedPrefs.getString("tasks", "") - val intent = Intent(context, ListViewRemoteViewsService::class.java).apply { - putExtra("tasksJsonString", tasks) - data = Uri.parse(toUri(Intent.URI_INTENT_SCHEME)) - } - val views = RemoteViews(context.packageName, getLayoutId(context)).apply { - val pendingIntent: PendingIntent = HomeWidgetLaunchIntent.getActivity( - context, - MainActivity::class.java - ) - setOnClickPendingIntent(R.id.logo, pendingIntent) - val intent_for_add = Intent(context, TaskWarriorWidgetProvider::class.java).apply { - setAction("TASK_ACTION") - data=Uri.parse(toUri(Intent.URI_INTENT_SCHEME)) - putExtra("launchedFor", "ADD_TASK") - } - val pendingIntentAdd: PendingIntent = PendingIntent.getBroadcast( - context, - 0, // requestCode, can be any unique integer - intent_for_add, - PendingIntent.FLAG_MUTABLE or PendingIntent.FLAG_UPDATE_CURRENT or Intent.FILL_IN_COMPONENT // Use appropriate flags - ) - setOnClickPendingIntent(R.id.add_btn, pendingIntentAdd) - setRemoteAdapter(R.id.list_view, intent) - } - - val clickPendingIntent: PendingIntent = Intent( - context, - TaskWarriorWidgetProvider::class.java - ).run { - setAction("TASK_ACTION") - setIdentifier("uuid") - data = Uri.parse(toUri(Intent.URI_INTENT_SCHEME)) - - PendingIntent.getBroadcast( - context, - 0, - this, - PendingIntent.FLAG_MUTABLE or PendingIntent.FLAG_UPDATE_CURRENT or Intent.FILL_IN_COMPONENT - ) - } - - views.setPendingIntentTemplate(R.id.list_view, clickPendingIntent) - appWidgetManager.updateAppWidget(widgetId, views) - } - super.onUpdate(context, appWidgetManager, appWidgetIds) - } - } -class ListViewRemoteViewsFactory( - private val context: Context, - private val tasksJsonString: String? -) : RemoteViewsService.RemoteViewsFactory { - - private val tasks = mutableListOf() - - override fun onCreate() {} - - override fun onDataSetChanged() { - if (tasksJsonString != null) { - try { - val jsonArray = OrgJSONArray(tasksJsonString as String) - for (i in 0 until jsonArray.length()) { - tasks.add(Task.fromJson(jsonArray.getJSONObject(i))) - } - } catch (e: JSONException) { - e.printStackTrace() - } - } - } - - override fun onDestroy() {} - - override fun getCount(): Int = tasks.size - - fun getListItemLayoutId(): Int{ - val sharedPrefs = HomeWidgetPlugin.getData(context) - val theme = sharedPrefs.getString("themeMode", "") - val layoutId = if (theme.equals("dark")) { - R.layout.listitem_layout_dark // Define a dark mode layout in your resources - } else { - R.layout.listitem_layout - } - return layoutId - } - fun getListItemLayoutIdForR1(): Int{ - val sharedPrefs = HomeWidgetPlugin.getData(context) - val theme = sharedPrefs.getString("themeMode", "") - val layoutId = if (theme.equals("dark")) { - R.layout.no_tasks_found_li_dark // Define a dark mode layout in your resources - } else { - R.layout.no_tasks_found_li - } - return layoutId - } - fun getDotIdByPriority(p: String) : Int{ - println("PRIORITY: "+p) - if(p.equals("L")) return R.drawable.low_priority_dot - if(p.equals("M")) return R.drawable.mid_priority_dot - if(p.equals("H")) return R.drawable.high_priority_dot - return R.drawable.no_priority_dot - } - - override fun getViewAt(position: Int): RemoteViews { - val task = tasks[position] - if(task.uuid.equals("NO_TASK")) - return RemoteViews(context.packageName, getListItemLayoutIdForR1()).apply { - if(task.priority.equals("1")) - setTextViewText(R.id.tv, "No tasks added yet") - if(task.priority.equals("2")) - setTextViewText(R.id.tv, "Filters applied are hiding all tasks") - } - return RemoteViews(context.packageName, getListItemLayoutId()).apply { - setTextViewText(R.id.todo__title, task.title) - setImageViewResource(R.id.dot, getDotIdByPriority(task.priority)) - val a = Intent().apply { - - Bundle().also { extras -> - extras.putString("action", "show_task") - extras.putString("uuid", tasks[position].uuid) - putExtras(extras) - } - - } - setOnClickFillInIntent(R.id.list_item_container,a) - } - - } - override fun getLoadingView(): RemoteViews? = null - - override fun getViewTypeCount(): Int = 1 - - override fun getItemId(position: Int): Long = position.toLong() - - override fun hasStableIds(): Boolean = true -} -class ListViewRemoteViewsService : RemoteViewsService() { - - override fun onGetViewFactory(intent: Intent): RemoteViewsFactory { - val tasksJsonString = intent.getStringExtra("tasksJsonString") - return ListViewRemoteViewsFactory(applicationContext, tasksJsonString) - } -} -data class Task(val title: String, val urgencyLevel: String,val uuid:String, val priority: String) { - companion object { - fun fromJson(json: JSONObject): Task { - val title = json.optString("description", "") - val urgencyLevel = json.optString("urgency", "") - val uuid = json.optString("uuid","") - val priority = json.optString("priority", "") - return Task(title, urgencyLevel, uuid, priority) - } - } -} \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/WidgetUpdateReceiver.kt b/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/WidgetUpdateReceiver.kt deleted file mode 100644 index 49d9375c..00000000 --- a/android/app/src/main/kotlin/com/ccextractor/taskwarriorflutter/WidgetUpdateReceiver.kt +++ /dev/null @@ -1,68 +0,0 @@ -package com.ccextractor.taskwarriorflutter - -import android.appwidget.AppWidgetManager -import android.view.View -import android.content.BroadcastReceiver -import android.content.ComponentName -import android.content.Context -import android.content.Intent -import android.graphics.BitmapFactory -import android.util.Log -import android.widget.RemoteViews -import java.io.File -import com.ccextractor.taskwarriorflutter.R -import es.antonborri.home_widget.HomeWidgetPlugin - -class WidgetUpdateReceiver : BroadcastReceiver() { - - override fun onReceive(context: Context, intent: Intent) { - if (intent.action == "UPDATE_WIDGET") { - Log.d("WidgetUpdateReceiver", "Received UPDATE_WIDGET broadcast") - - val appWidgetManager = AppWidgetManager.getInstance(context) - val appWidgetIds = appWidgetManager.getAppWidgetIds(ComponentName(context, BurndownChartProvider::class.java)) - - for (appWidgetId in appWidgetIds) { - updateAppWidget(context, appWidgetManager, appWidgetId) - } - } - } - - private fun updateAppWidget(context: Context, appWidgetManager: AppWidgetManager, appWidgetId: Int) { - Log.d("WidgetUpdateReceiver", "Updating widget $appWidgetId") - - val views = RemoteViews(context.packageName, R.layout.report_layout) - - // Retrieve the chart image path from HomeWidget - val chartImage = HomeWidgetPlugin.getData(context).getString("chart_image", null) - - if (chartImage != null) { - Log.d("WidgetUpdateReceiver", "Chart image path: $chartImage") - val file = File(chartImage) - if (file.exists()) { - Log.d("WidgetUpdateReceiver", "File exists!") - val b = BitmapFactory.decodeFile(file.absolutePath) - if (b != null) { - Log.d("WidgetUpdateReceiver", "Bitmap decoded successfully!") - views.setImageViewBitmap(R.id.widget_image, b) - views.setViewVisibility(R.id.widget_image, View.VISIBLE) - views.setViewVisibility(R.id.no_image_text, View.GONE) - } else { - Log.e("WidgetUpdateReceiver", "Bitmap decoding failed!") - views.setViewVisibility(R.id.widget_image, View.GONE) - views.setViewVisibility(R.id.no_image_text, View.VISIBLE) - } - } else { - Log.e("WidgetUpdateReceiver", "File does not exist: $chartImage") - views.setViewVisibility(R.id.widget_image, View.GONE) - views.setViewVisibility(R.id.no_image_text, View.VISIBLE) - } - } else { - Log.d("WidgetUpdateReceiver", "No chart image saved yet") - views.setViewVisibility(R.id.widget_image, View.GONE) - views.setViewVisibility(R.id.no_image_text, View.VISIBLE) - } - - appWidgetManager.updateAppWidget(appWidgetId, views) - } -} \ No newline at end of file diff --git a/android/app/src/main/res/drawable-hdpi/splash.png b/android/app/src/main/res/drawable-hdpi/splash.png deleted file mode 100644 index 8a4e8751..00000000 Binary files a/android/app/src/main/res/drawable-hdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-hdpi/taskwarrior.png b/android/app/src/main/res/drawable-hdpi/taskwarrior.png deleted file mode 100644 index b33228f6..00000000 Binary files a/android/app/src/main/res/drawable-hdpi/taskwarrior.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-mdpi/splash.png b/android/app/src/main/res/drawable-mdpi/splash.png deleted file mode 100644 index df2c5e6d..00000000 Binary files a/android/app/src/main/res/drawable-mdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-mdpi/taskwarrior.png b/android/app/src/main/res/drawable-mdpi/taskwarrior.png deleted file mode 100644 index e59b3df5..00000000 Binary files a/android/app/src/main/res/drawable-mdpi/taskwarrior.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-v21/app_widget_background.xml b/android/app/src/main/res/drawable-v21/app_widget_background.xml deleted file mode 100644 index c7183f68..00000000 --- a/android/app/src/main/res/drawable-v21/app_widget_background.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/drawable-v21/app_widget_inner_view_background.xml b/android/app/src/main/res/drawable-v21/app_widget_inner_view_background.xml deleted file mode 100644 index 007e2872..00000000 --- a/android/app/src/main/res/drawable-v21/app_widget_inner_view_background.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/drawable-v21/background.png b/android/app/src/main/res/drawable-v21/background.png deleted file mode 100644 index 6fc03989..00000000 Binary files a/android/app/src/main/res/drawable-v21/background.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index 3cc4948a..00000000 --- a/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/android/app/src/main/res/drawable-xhdpi/splash.png b/android/app/src/main/res/drawable-xhdpi/splash.png deleted file mode 100644 index e9b10fe0..00000000 Binary files a/android/app/src/main/res/drawable-xhdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xhdpi/taskwarrior.png b/android/app/src/main/res/drawable-xhdpi/taskwarrior.png deleted file mode 100644 index 975f5729..00000000 Binary files a/android/app/src/main/res/drawable-xhdpi/taskwarrior.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxhdpi/splash.png b/android/app/src/main/res/drawable-xxhdpi/splash.png deleted file mode 100644 index edc661df..00000000 Binary files a/android/app/src/main/res/drawable-xxhdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/splash.png b/android/app/src/main/res/drawable-xxxhdpi/splash.png deleted file mode 100644 index 8f7a4b28..00000000 Binary files a/android/app/src/main/res/drawable-xxxhdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/taskwarrior.png b/android/app/src/main/res/drawable-xxxhdpi/taskwarrior.png deleted file mode 100644 index 8d854c5a..00000000 Binary files a/android/app/src/main/res/drawable-xxxhdpi/taskwarrior.png and /dev/null differ diff --git a/android/app/src/main/res/drawable/add.xml b/android/app/src/main/res/drawable/add.xml deleted file mode 100644 index c322ed1c..00000000 --- a/android/app/src/main/res/drawable/add.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/android/app/src/main/res/drawable/add_dark.xml b/android/app/src/main/res/drawable/add_dark.xml deleted file mode 100644 index 74251df6..00000000 --- a/android/app/src/main/res/drawable/add_dark.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/android/app/src/main/res/drawable/app_widget_item_layout_bg.xml b/android/app/src/main/res/drawable/app_widget_item_layout_bg.xml deleted file mode 100644 index fcb60d19..00000000 --- a/android/app/src/main/res/drawable/app_widget_item_layout_bg.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/drawable/app_widget_layout_bg.xml b/android/app/src/main/res/drawable/app_widget_layout_bg.xml deleted file mode 100644 index e9016b3c..00000000 --- a/android/app/src/main/res/drawable/app_widget_layout_bg.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/drawable/background.png b/android/app/src/main/res/drawable/background.png deleted file mode 100644 index 6fc03989..00000000 Binary files a/android/app/src/main/res/drawable/background.png and /dev/null differ diff --git a/android/app/src/main/res/drawable/bg_button_add.xml b/android/app/src/main/res/drawable/bg_button_add.xml deleted file mode 100644 index 79c8ede0..00000000 --- a/android/app/src/main/res/drawable/bg_button_add.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/android/app/src/main/res/drawable/bg_button_add_dark.xml b/android/app/src/main/res/drawable/bg_button_add_dark.xml deleted file mode 100644 index 4b97c721..00000000 --- a/android/app/src/main/res/drawable/bg_button_add_dark.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/android/app/src/main/res/drawable/border_style.xml b/android/app/src/main/res/drawable/border_style.xml deleted file mode 100644 index a760078d..00000000 --- a/android/app/src/main/res/drawable/border_style.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/drawable/border_style_dark.xml b/android/app/src/main/res/drawable/border_style_dark.xml deleted file mode 100644 index b492555c..00000000 --- a/android/app/src/main/res/drawable/border_style_dark.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/drawable/down_btn_icon.xml b/android/app/src/main/res/drawable/down_btn_icon.xml deleted file mode 100644 index bf9aa923..00000000 --- a/android/app/src/main/res/drawable/down_btn_icon.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/android/app/src/main/res/drawable/down_btn_icon_dark.xml b/android/app/src/main/res/drawable/down_btn_icon_dark.xml deleted file mode 100644 index 4a2f4f6b..00000000 --- a/android/app/src/main/res/drawable/down_btn_icon_dark.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/android/app/src/main/res/drawable/high_priority_dot.xml b/android/app/src/main/res/drawable/high_priority_dot.xml deleted file mode 100644 index 2e6506e3..00000000 --- a/android/app/src/main/res/drawable/high_priority_dot.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 3cc4948a..00000000 --- a/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/android/app/src/main/res/drawable/low_priority_dot.xml b/android/app/src/main/res/drawable/low_priority_dot.xml deleted file mode 100644 index baf70648..00000000 --- a/android/app/src/main/res/drawable/low_priority_dot.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/android/app/src/main/res/drawable/mid_priority_dot.xml b/android/app/src/main/res/drawable/mid_priority_dot.xml deleted file mode 100644 index 6407db39..00000000 --- a/android/app/src/main/res/drawable/mid_priority_dot.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/android/app/src/main/res/drawable/no_priority_dot.xml b/android/app/src/main/res/drawable/no_priority_dot.xml deleted file mode 100644 index e656e3d6..00000000 --- a/android/app/src/main/res/drawable/no_priority_dot.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/android/app/src/main/res/drawable/preview.png b/android/app/src/main/res/drawable/preview.png deleted file mode 100644 index 5f32f708..00000000 Binary files a/android/app/src/main/res/drawable/preview.png and /dev/null differ diff --git a/android/app/src/main/res/drawable/preview_report.jpg b/android/app/src/main/res/drawable/preview_report.jpg deleted file mode 100644 index 761c8ff8..00000000 Binary files a/android/app/src/main/res/drawable/preview_report.jpg and /dev/null differ diff --git a/android/app/src/main/res/drawable/taskwarrior_widget_icon.png b/android/app/src/main/res/drawable/taskwarrior_widget_icon.png deleted file mode 100644 index 06fcb3df..00000000 Binary files a/android/app/src/main/res/drawable/taskwarrior_widget_icon.png and /dev/null differ diff --git a/android/app/src/main/res/drawable/taskwarrior_widget_icon_dark.png b/android/app/src/main/res/drawable/taskwarrior_widget_icon_dark.png deleted file mode 100644 index f28c15bf..00000000 Binary files a/android/app/src/main/res/drawable/taskwarrior_widget_icon_dark.png and /dev/null differ diff --git a/android/app/src/main/res/layout/listitem_layout.xml b/android/app/src/main/res/layout/listitem_layout.xml deleted file mode 100644 index a64d2523..00000000 --- a/android/app/src/main/res/layout/listitem_layout.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/layout/listitem_layout_dark.xml b/android/app/src/main/res/layout/listitem_layout_dark.xml deleted file mode 100644 index 7c221b2c..00000000 --- a/android/app/src/main/res/layout/listitem_layout_dark.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/layout/no_tasks_found_li.xml b/android/app/src/main/res/layout/no_tasks_found_li.xml deleted file mode 100644 index 32246c84..00000000 --- a/android/app/src/main/res/layout/no_tasks_found_li.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/layout/no_tasks_found_li_dark.xml b/android/app/src/main/res/layout/no_tasks_found_li_dark.xml deleted file mode 100644 index bbc37495..00000000 --- a/android/app/src/main/res/layout/no_tasks_found_li_dark.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/layout/report_layout.xml b/android/app/src/main/res/layout/report_layout.xml deleted file mode 100644 index cd6aaca4..00000000 --- a/android/app/src/main/res/layout/report_layout.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/layout/taskwarrior_layout.xml b/android/app/src/main/res/layout/taskwarrior_layout.xml deleted file mode 100644 index 7f40a80b..00000000 --- a/android/app/src/main/res/layout/taskwarrior_layout.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/layout/taskwarrior_layout_dark.xml b/android/app/src/main/res/layout/taskwarrior_layout_dark.xml deleted file mode 100644 index c310fdff..00000000 --- a/android/app/src/main/res/layout/taskwarrior_layout_dark.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png deleted file mode 100644 index f9a49395..00000000 Binary files a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-hdpi/splash.png b/android/app/src/main/res/mipmap-hdpi/splash.png deleted file mode 100644 index 849fb374..00000000 Binary files a/android/app/src/main/res/mipmap-hdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png deleted file mode 100644 index c3b89957..00000000 Binary files a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-mdpi/splash.png b/android/app/src/main/res/mipmap-mdpi/splash.png deleted file mode 100644 index 8f7a4b28..00000000 Binary files a/android/app/src/main/res/mipmap-mdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png deleted file mode 100644 index 827b5777..00000000 Binary files a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xhdpi/splash.png b/android/app/src/main/res/mipmap-xhdpi/splash.png deleted file mode 100644 index edc661df..00000000 Binary files a/android/app/src/main/res/mipmap-xhdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png deleted file mode 100644 index 2e83bc6d..00000000 Binary files a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/splash.png b/android/app/src/main/res/mipmap-xxhdpi/splash.png deleted file mode 100644 index 8f7a4b28..00000000 Binary files a/android/app/src/main/res/mipmap-xxhdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png deleted file mode 100644 index 3d6c26ed..00000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/splash.png b/android/app/src/main/res/mipmap-xxxhdpi/splash.png deleted file mode 100644 index e1d5660a..00000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/splash.png and /dev/null differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be7..00000000 --- a/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/android/app/src/main/res/values-v21/styles.xml b/android/app/src/main/res/values-v21/styles.xml deleted file mode 100644 index 0b35f7d8..00000000 --- a/android/app/src/main/res/values-v21/styles.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/values-v31/styles.xml b/android/app/src/main/res/values-v31/styles.xml deleted file mode 100644 index 6b133976..00000000 --- a/android/app/src/main/res/values-v31/styles.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/values-v31/themes.xml b/android/app/src/main/res/values-v31/themes.xml deleted file mode 100644 index badd306a..00000000 --- a/android/app/src/main/res/values-v31/themes.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/values/attrs.xml b/android/app/src/main/res/values/attrs.xml deleted file mode 100644 index 7781ac86..00000000 --- a/android/app/src/main/res/values/attrs.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml deleted file mode 100644 index 22648051..00000000 --- a/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,20 +0,0 @@ - - #000000 - #FFFFFF - #000 - #fff - #000 - #4D4D4D - #efefef - #FFFFFF - #000000 - #FFFFFF - #2C2C2C - #FFFFFF - #787878 - #4D4D4D - #FF0000 - #FFF200 - #00FF42 - #A2A2A2 - \ No newline at end of file diff --git a/android/app/src/main/res/values/dimens.xml b/android/app/src/main/res/values/dimens.xml deleted file mode 100644 index 27da692e..00000000 --- a/android/app/src/main/res/values/dimens.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - 0dp - 40dp - 15dp - 60dp - 40dp - \ No newline at end of file diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml deleted file mode 100644 index 182c4b81..00000000 --- a/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - TaskWarrior - nurture.farm.android.appwidget.CTA - nurture.farm.android.appwidget.ACTION_CLICK - textData - imageData - es.antonborri.home_widget.action.LAUNCH - taskwarriorappwidget://cardclicked - taskwarriorappwidget://addclicked - This widget shows pending tasks from TaskWarrior app - This widget shows the daily reports graph to track your progress - Click Refresh button in Daily Reports Tab - TaskWarrior - Add widget - Task List - add_task - No Tasks available - \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d1d13fc7..00000000 --- a/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/android/app/src/main/res/values/themes.xml b/android/app/src/main/res/values/themes.xml deleted file mode 100644 index dcd8899e..00000000 --- a/android/app/src/main/res/values/themes.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/xml/burndownchartconfig.xml b/android/app/src/main/res/xml/burndownchartconfig.xml deleted file mode 100644 index fff84148..00000000 --- a/android/app/src/main/res/xml/burndownchartconfig.xml +++ /dev/null @@ -1,10 +0,0 @@ - - \ No newline at end of file diff --git a/android/app/src/main/res/xml/taskwarriorconfig.xml b/android/app/src/main/res/xml/taskwarriorconfig.xml deleted file mode 100644 index 1a5d2c7f..00000000 --- a/android/app/src/main/res/xml/taskwarriorconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index b91c8f67..00000000 --- a/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/android/build.gradle b/android/build.gradle deleted file mode 100644 index bc157bd1..00000000 --- a/android/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index 94adc3a3..00000000 --- a/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 89e56bdb..00000000 --- a/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-8.0-all.zip diff --git a/android/settings.gradle b/android/settings.gradle deleted file mode 100644 index 07ca9fc7..00000000 --- a/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -pluginManagement { - def flutterSdkPath = { - def properties = new Properties() - file("local.properties").withInputStream { properties.load(it) } - def flutterSdkPath = properties.getProperty("flutter.sdk") - assert flutterSdkPath != null, "flutter.sdk not set in local.properties" - return flutterSdkPath - }() - - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.9.10" apply false -} - -include ":app" \ No newline at end of file diff --git a/assets/fonts/OFL.txt b/assets/fonts/OFL.txt deleted file mode 100644 index 76df3b56..00000000 --- a/assets/fonts/OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins) - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/Poppins-Bold.ttf b/assets/fonts/Poppins-Bold.ttf deleted file mode 100644 index b94d47f3..00000000 Binary files a/assets/fonts/Poppins-Bold.ttf and /dev/null differ diff --git a/assets/fonts/Poppins-ExtraBold.ttf b/assets/fonts/Poppins-ExtraBold.ttf deleted file mode 100644 index 8f008c36..00000000 Binary files a/assets/fonts/Poppins-ExtraBold.ttf and /dev/null differ diff --git a/assets/fonts/Poppins-Regular.ttf b/assets/fonts/Poppins-Regular.ttf deleted file mode 100644 index be06e7fd..00000000 Binary files a/assets/fonts/Poppins-Regular.ttf and /dev/null differ diff --git a/assets/fonts/SFProDisplay-Regular.ttf b/assets/fonts/SFProDisplay-Regular.ttf deleted file mode 100644 index 5ae2fafb..00000000 Binary files a/assets/fonts/SFProDisplay-Regular.ttf and /dev/null differ diff --git a/assets/fonts/SegoeUI.ttf b/assets/fonts/SegoeUI.ttf deleted file mode 100644 index 46b3b993..00000000 Binary files a/assets/fonts/SegoeUI.ttf and /dev/null differ diff --git a/assets/fonts/Ubuntu-Light.ttf b/assets/fonts/Ubuntu-Light.ttf deleted file mode 100644 index 0e9f90d7..00000000 Binary files a/assets/fonts/Ubuntu-Light.ttf and /dev/null differ diff --git a/assets/images/taskwarrior.png b/assets/images/taskwarrior.png deleted file mode 100644 index 06fcb3df..00000000 Binary files a/assets/images/taskwarrior.png and /dev/null differ diff --git a/assets/images/taskwarrior_dark.png b/assets/images/taskwarrior_dark.png deleted file mode 100644 index f28c15bf..00000000 Binary files a/assets/images/taskwarrior_dark.png and /dev/null differ diff --git a/assets/svg/github.svg b/assets/svg/github.svg deleted file mode 100644 index 25f9df58..00000000 --- a/assets/svg/github.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/svg/link.svg b/assets/svg/link.svg deleted file mode 100644 index ed0217c8..00000000 --- a/assets/svg/link.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/svg/logo.svg b/assets/svg/logo.svg deleted file mode 100644 index 8b9c96c4..00000000 --- a/assets/svg/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/svg/s1.svg b/assets/svg/s1.svg deleted file mode 100644 index e6a19003..00000000 --- a/assets/svg/s1.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/svg/s2.svg b/assets/svg/s2.svg deleted file mode 100644 index fdbe175c..00000000 --- a/assets/svg/s2.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/svg/s3.svg b/assets/svg/s3.svg deleted file mode 100644 index 429e0325..00000000 --- a/assets/svg/s3.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/flutter_launcher_icons.yaml b/flutter_launcher_icons.yaml deleted file mode 100644 index b610d107..00000000 --- a/flutter_launcher_icons.yaml +++ /dev/null @@ -1,9 +0,0 @@ -dev_dependencies: - flutter_launcher_icons: "^0.13.1" - -flutter_launcher_icons: - android: "launcher_icon" - ios: true - image_path: "assets/images/taskwarrior.png" - min_sdk_android: 21 # android min sdk min:16, default 21 - diff --git a/flutter_native_splash.yaml b/flutter_native_splash.yaml deleted file mode 100644 index 278af04b..00000000 --- a/flutter_native_splash.yaml +++ /dev/null @@ -1,3 +0,0 @@ -flutter_native_splash: - image: assets/images/taskwarrior_dark.png - color: "#1a1a1a" diff --git a/icons/icon.png b/icons/icon.png new file mode 100644 index 00000000..90b7a9cd Binary files /dev/null and b/icons/icon.png differ diff --git a/index.html b/index.html new file mode 100644 index 00000000..ea6bf215 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +goto /repo \ No newline at end of file diff --git a/ios/.gitignore b/ios/.gitignore deleted file mode 100644 index 7a7f9873..00000000 --- a/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.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/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 7c569640..00000000 --- a/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 - 12.0 - - diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig deleted file mode 100644 index ec97fc6f..00000000 --- a/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/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig deleted file mode 100644 index c4855bfe..00000000 --- a/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/ios/Podfile b/ios/Podfile deleted file mode 100644 index 279576f3..00000000 --- a/ios/Podfile +++ /dev/null @@ -1,41 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '12.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/ios/Podfile.lock b/ios/Podfile.lock deleted file mode 100644 index a7b8abbb..00000000 --- a/ios/Podfile.lock +++ /dev/null @@ -1,147 +0,0 @@ -PODS: - - connectivity_plus (0.0.1): - - Flutter - - ReachabilitySwift - - DKImagePickerController/Core (4.3.4): - - DKImagePickerController/ImageDataManager - - DKImagePickerController/Resource - - DKImagePickerController/ImageDataManager (4.3.4) - - DKImagePickerController/PhotoGallery (4.3.4): - - DKImagePickerController/Core - - DKPhotoGallery - - DKImagePickerController/Resource (4.3.4) - - DKPhotoGallery (0.0.17): - - DKPhotoGallery/Core (= 0.0.17) - - DKPhotoGallery/Model (= 0.0.17) - - DKPhotoGallery/Preview (= 0.0.17) - - DKPhotoGallery/Resource (= 0.0.17) - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Core (0.0.17): - - DKPhotoGallery/Model - - DKPhotoGallery/Preview - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Model (0.0.17): - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Preview (0.0.17): - - DKPhotoGallery/Model - - DKPhotoGallery/Resource - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Resource (0.0.17): - - SDWebImage - - SwiftyGif - - file_picker (0.0.1): - - DKImagePickerController/PhotoGallery - - Flutter - - file_picker_writable (0.0.1): - - Flutter - - file_selector_ios (0.0.1): - - Flutter - - Flutter (1.0.0) - - flutter_local_notifications (0.0.1): - - Flutter - - flutter_native_splash (0.0.1): - - Flutter - - flutter_native_timezone (0.0.1): - - Flutter - - home_widget (0.0.1): - - Flutter - - package_info_plus (0.4.5): - - Flutter - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - - permission_handler_apple (9.0.4): - - Flutter - - ReachabilitySwift (5.0.0) - - SDWebImage (5.19.0): - - SDWebImage/Core (= 5.19.0) - - SDWebImage/Core (5.19.0) - - shared_preferences_foundation (0.0.1): - - Flutter - - FlutterMacOS - - SwiftyGif (5.4.4) - - url_launcher_ios (0.0.1): - - Flutter - -DEPENDENCIES: - - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - - file_picker (from `.symlinks/plugins/file_picker/ios`) - - file_picker_writable (from `.symlinks/plugins/file_picker_writable/ios`) - - file_selector_ios (from `.symlinks/plugins/file_selector_ios/ios`) - - Flutter (from `Flutter`) - - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - - flutter_native_timezone (from `.symlinks/plugins/flutter_native_timezone/ios`) - - home_widget (from `.symlinks/plugins/home_widget/ios`) - - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - -SPEC REPOS: - trunk: - - DKImagePickerController - - DKPhotoGallery - - ReachabilitySwift - - SDWebImage - - SwiftyGif - -EXTERNAL SOURCES: - connectivity_plus: - :path: ".symlinks/plugins/connectivity_plus/ios" - file_picker: - :path: ".symlinks/plugins/file_picker/ios" - file_picker_writable: - :path: ".symlinks/plugins/file_picker_writable/ios" - file_selector_ios: - :path: ".symlinks/plugins/file_selector_ios/ios" - Flutter: - :path: Flutter - flutter_local_notifications: - :path: ".symlinks/plugins/flutter_local_notifications/ios" - flutter_native_splash: - :path: ".symlinks/plugins/flutter_native_splash/ios" - flutter_native_timezone: - :path: ".symlinks/plugins/flutter_native_timezone/ios" - home_widget: - :path: ".symlinks/plugins/home_widget/ios" - package_info_plus: - :path: ".symlinks/plugins/package_info_plus/ios" - path_provider_foundation: - :path: ".symlinks/plugins/path_provider_foundation/darwin" - permission_handler_apple: - :path: ".symlinks/plugins/permission_handler_apple/ios" - shared_preferences_foundation: - :path: ".symlinks/plugins/shared_preferences_foundation/darwin" - url_launcher_ios: - :path: ".symlinks/plugins/url_launcher_ios/ios" - -SPEC CHECKSUMS: - connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d - DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac - DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 - file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de - file_picker_writable: 67959f5c516feb5121693a14eda63fcbe6cbb6dc - file_selector_ios: 8c25d700d625e1dcdd6599f2d927072f2254647b - Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 - flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef - flutter_native_timezone: 5f05b2de06c9776b4cc70e1839f03de178394d22 - home_widget: 0434835a4c9a75704264feff6be17ea40e0f0d57 - package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85 - path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce - ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 - SDWebImage: 981fd7e860af070920f249fd092420006014c3eb - shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 - SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f - url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812 - -PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011 - -COCOAPODS: 1.14.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index dbf0250c..00000000 --- a/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,552 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - 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 */; }; - 64C7FEE08035BC9BB0C038EF /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 089D9819C0366C673FE320BF /* Pods_Runner.framework */; }; - 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 */ - 089D9819C0366C673FE320BF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 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 = ""; }; - 162E9301614D923D4E360425 /* 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 = ""; }; - 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 = ""; }; - CCEEA0AE8F1C59FFACAE45B3 /* 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 = ""; }; - DB57389FBBE4024E44956E34 /* 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 = ( - 64C7FEE08035BC9BB0C038EF /* 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 */, - C3171261BB8F68A7E2CB70A5 /* Pods */, - EC04A4346BDDFBE60E9077C7 /* 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 = ""; - }; - C3171261BB8F68A7E2CB70A5 /* Pods */ = { - isa = PBXGroup; - children = ( - CCEEA0AE8F1C59FFACAE45B3 /* Pods-Runner.debug.xcconfig */, - DB57389FBBE4024E44956E34 /* Pods-Runner.release.xcconfig */, - 162E9301614D923D4E360425 /* Pods-Runner.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - EC04A4346BDDFBE60E9077C7 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 089D9819C0366C673FE320BF /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 2123C8066096B8DDE567BB91 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - E6257F2992FA3E40BE65E7BD /* [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 = 1510; - 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 */ - 2123C8066096B8DDE567BB91 /* [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; - }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", - ); - 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; - alwaysOutOfDate = 1; - 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"; - }; - E6257F2992FA3E40BE65E7BD /* [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 */, - ); - 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 = 12.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.taskwarrior; - 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 = 12.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 = 12.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.taskwarrior; - 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.taskwarrior; - 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/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 5e31d3d3..00000000 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift deleted file mode 100644 index 090af1a3..00000000 --- a/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,16 +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) - if #available(iOS 10.0, *) { - UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate - } - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png deleted file mode 100644 index b4dadf05..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png deleted file mode 100644 index 5d664ded..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png deleted file mode 100644 index 5754669a..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png deleted file mode 100644 index ea28448d..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png deleted file mode 100644 index acf60b1a..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png deleted file mode 100644 index ff2552d3..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png deleted file mode 100644 index 0873c996..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png deleted file mode 100644 index 78314f14..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png deleted file mode 100644 index 85a2db81..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png deleted file mode 100644 index f0440b17..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png deleted file mode 100644 index d0563ec3..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png deleted file mode 100644 index 87bdd6a5..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png deleted file mode 100644 index 5204368f..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png deleted file mode 100644 index ce9a2ffc..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png deleted file mode 100644 index d213182d..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png deleted file mode 100644 index 8a205814..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png deleted file mode 100644 index 618d3da2..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png deleted file mode 100644 index 1b17281d..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png deleted file mode 100644 index e42df5ae..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png deleted file mode 100644 index b1d246d2..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png deleted file mode 100644 index 0ea54da7..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png deleted file mode 100644 index 78665122..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png deleted file mode 100644 index 3bab1549..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png deleted file mode 100644 index a41b3ba5..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png deleted file mode 100644 index e11cd0a8..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 5c82812f..00000000 --- a/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"},{"size":"128x128","expected-size":"128","filename":"128.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"256x256","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"128x128","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"256x256","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"512x512","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"16","filename":"16.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"64","filename":"64.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"512x512","expected-size":"1024","filename":"1024.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"}]} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index c24c7ef0..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index a5614000..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 587245be..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index 1f2f123a..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 668e73b4..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index 678b4594..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index 23e796f4..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 587245be..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index f7c73971..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index 4d952243..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png deleted file mode 100644 index ffbcb702..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png deleted file mode 100644 index 1a5b6146..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png deleted file mode 100644 index 84b71305..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png deleted file mode 100644 index ee0efead..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index 4d952243..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 80f8831f..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png deleted file mode 100644 index f9a49395..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png deleted file mode 100644 index 2e83bc6d..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index 08480c41..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6c24066c..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index e1a389c3..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json deleted file mode 100644 index 9f447e1b..00000000 --- a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "background.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png deleted file mode 100644 index 6fc03989..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 00cabce8..00000000 --- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "LaunchImage.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "LaunchImage@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "LaunchImage@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index df2c5e6d..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index e9b10fe0..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index edc661df..00000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/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/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 7aa6dfbc..00000000 --- a/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist deleted file mode 100644 index a878453f..00000000 --- a/ios/Runner/Info.plist +++ /dev/null @@ -1,58 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Taskwarrior - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.ccextractor.taskwarriorflutter - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - TaskWarrior - 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 - - LSApplicationQueriesSchemes - - https://ccextractor.org/ - https://github.com/CCExtractor/taskwarrior-flutter - - UIViewControllerBasedStatusBarAppearance - - UIStatusBarHidden - - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - - - diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift deleted file mode 100644 index 86a7c3b1..00000000 --- a/ios/RunnerTests/RunnerTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Flutter -import UIKit -import XCTest - -class RunnerTests: XCTestCase { - - func testExample() { - // If you add code to the Runner application, consider adding tests here. - // See https://developer.apple.com/documentation/xctest for more information about using XCTest. - } - -} diff --git a/lib/app/models/chart.dart b/lib/app/models/chart.dart deleted file mode 100644 index 841caf27..00000000 --- a/lib/app/models/chart.dart +++ /dev/null @@ -1,6 +0,0 @@ -class ChartData { - ChartData(this.x, this.y1, this.y2); - final String x; - final int y1; - final int y2; -} diff --git a/lib/app/models/data.dart b/lib/app/models/data.dart deleted file mode 100644 index 3fe5c66c..00000000 --- a/lib/app/models/data.dart +++ /dev/null @@ -1,233 +0,0 @@ -// ignore_for_file: prefer_expression_function_bodies - -import 'dart:collection'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/services/notification_services.dart'; -import 'package:taskwarrior/app/utils/taskc/payload.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/urgency.dart'; -class Data { - Data(this.home); - - final Directory home; - - void updateWaitOrUntil(Iterable pendingData) { - var now = DateTime.now().toUtc(); - for (var task in pendingData) { - if (task.until != null && task.until!.isBefore(now)) { - mergeTask( - task.rebuild( - (b) => b - ..status = 'deleted' - ..end = now, - ), - ); - } else if (task.status == 'waiting' && - (task.wait == null || task.wait!.isBefore(now))) { - _mergeTasks( - [ - task.rebuild( - (b) => b - ..status = 'pending' - ..wait = null, - ), - ], - ); - } - } - } - - List pendingData() { - var data = _allData().where( - (task) => task.status != 'completed' && task.status != 'deleted'); - var now = DateTime.now(); - if (data.any((task) => - (task.until != null && task.until!.isBefore(now)) || - (task.status == 'waiting' && - (task.wait == null || task.wait!.isBefore(now))))) { - updateWaitOrUntil(data); - data = _allData().where( - (task) => task.status != 'completed' && task.status != 'deleted'); - } - return data - .toList() - .asMap() - .entries - .map((entry) => entry.value.rebuild((b) => b..id = entry.key + 1)) - .toList(); - } - - List _completedData() { - var data = _allData().where( - (task) => task.status == 'completed' || task.status == 'deleted'); - return [ - for (var task in data) task.rebuild((b) => b..id = 0), - ]; - } - - List completedData() { - var data = _allData().where( - (task) => task.status == 'completed' || task.status == 'deleted'); - return data - .toList() - .asMap() - .entries - .map((entry) => entry.value.rebuild((b) => b..id = entry.key + 1)) - .toList(); - } - - List waitingData() { - var data = _allData().where((task) => task.status == 'waiting'); - return [ - for (var task in data) task.rebuild((b) => b..id = 0), - ]; - } - - List allData() { - var data = pendingData()..addAll(_completedData()); - return data; - } - - List _allData() => [ - if (File('${home.path}/.task/all.data').existsSync()) - for (var line in File('${home.path}/.task/all.data') - .readAsStringSync() - .trim() - .split('\n')) - if (line.isNotEmpty) Task.fromJson(json.decode(line)), - ]; - - String export() { - var string = allData() - .map((task) { - var jsonTask = task.toJson(); - - jsonTask['urgency'] = num.parse(urgency(task) - .toStringAsFixed(1) - .replaceFirst(RegExp(r'.0$'), '')); - - var keyOrder = [ - 'id', - 'annotations', - 'depends', - 'description', - 'due', - 'end', - 'entry', - 'imask', - 'mask', - 'modified', - 'parent', - 'priority', - 'project', - 'recur', - 'scheduled', - 'start', - 'status', - 'tags', - 'until', - 'uuid', - 'wait', - 'urgency', - ].asMap().map((key, value) => MapEntry(value, key)); - - var fallbackOrder = jsonTask.keys - .toList() - .asMap() - .map((key, value) => MapEntry(value, key)); - - for (var entry in fallbackOrder.entries) { - keyOrder.putIfAbsent( - entry.key, - () => entry.value + keyOrder.length, - ); - } - - return json.encode(SplayTreeMap.of(jsonTask, (key1, key2) { - return keyOrder[key1]!.compareTo(keyOrder[key2]!); - })); - }) - .toList() - .join(',\n'); - return '[\n$string\n]\n'; - } - - void mergeTask(Task task) { - NotificationService notificationService = NotificationService(); - notificationService.initiliazeNotification(); - - if (task.status == 'pending' && task.due != null) { - int notificationid = notificationService.calculateNotificationId( - task.due!, task.description, false, task.entry); - notificationService.cancelNotification(notificationid); - notificationService.sendNotification( - task.due!, task.description, false, task.entry); - if (task.wait != null) { - int waitNotificationId = notificationService.calculateNotificationId( - task.wait!, task.description, true, task.entry); - notificationService.cancelNotification(waitNotificationId); - notificationService.sendNotification( - task.wait!, task.description, true, task.entry); - } - } else if (task.due != null) { - int notificationid = notificationService.calculateNotificationId( - task.due!, task.description, false, task.entry); - - notificationService.cancelNotification(notificationid); - } - _mergeTasks([task]); - File('${home.path}/.task/backlog.data').writeAsStringSync( - '${json.encode(task.rebuild((b) => b..id = null).toJson())}\n', - mode: FileMode.append, - ); - } - - Task getTask(String uuid) { - return allData().firstWhere((task) => task.uuid == uuid); - } - - void _mergeTasks(List tasks) { - File('${home.path}/.task/all.data').createSync(recursive: true); - var lines = File('${home.path}/.task/all.data') - .readAsStringSync() - .trim() - .split('\n'); - var taskMap = { - for (var taskLine in lines) - if (taskLine.isNotEmpty) - (json.decode(taskLine) as Map)['uuid']: taskLine, - }; - for (var task in tasks) { - taskMap[task.uuid] = - json.encode(task.rebuild((b) => b..id = null).toJson()); - } - File('${home.path}/.task/all.data').writeAsStringSync(''); - for (var task in taskMap.values) { - File('${home.path}/.task/all.data').writeAsStringSync( - '$task\n', - mode: FileMode.append, - ); - } - } - - String payload() { - var payload = ''; - if (File('${home.path}/.task/backlog.data').existsSync()) { - payload = File('${home.path}/.task/backlog.data').readAsStringSync(); - } - return payload; - } - - void mergeSynchronizeResponse(Payload payload) { - var tasks = [ - for (var task in payload.tasks) - Task.fromJson( - (json.decode(task) as Map)..remove('id')), - ]; - _mergeTasks(tasks); - File('${home.path}/.task/backlog.data') - .writeAsStringSync('${payload.userKey}\n'); - } -} diff --git a/lib/app/models/filters.dart b/lib/app/models/filters.dart deleted file mode 100644 index a2296246..00000000 --- a/lib/app/models/filters.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:taskwarrior/app/services/tag_filter.dart'; - -class Filters { - const Filters({ - required this.pendingFilter, - required this.waitingFilter, - required this.togglePendingFilter, - required this.toggleWaitingFilter, - required this.tagFilters, - required this.projects, - required this.projectFilter, - required this.toggleProjectFilter, - }); - - final bool pendingFilter; - final bool waitingFilter; - final void Function() togglePendingFilter; - final void Function() toggleWaitingFilter; - final TagFilters tagFilters; - final dynamic projects; - final String projectFilter; - final void Function(String) toggleProjectFilter; -} \ No newline at end of file diff --git a/lib/app/models/json/annotation.dart b/lib/app/models/json/annotation.dart deleted file mode 100644 index 5fe2b34a..00000000 --- a/lib/app/models/json/annotation.dart +++ /dev/null @@ -1,26 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; -import 'package:taskwarrior/app/models/json/serializers.dart'; - - - -part 'annotation.g.dart'; - -abstract class Annotation implements Built { - factory Annotation([void Function(AnnotationBuilder) updates]) = _$Annotation; - Annotation._(); - - static Annotation fromJson(dynamic json) { - return serializers.deserializeWith(Annotation.serializer, json)!; - } - - DateTime get entry; - String get description; - - Map toJson() => - serializers.serializeWith(Annotation.serializer, this)! as Map; - - static Serializer get serializer => _$annotationSerializer; -} diff --git a/lib/app/models/json/annotation.g.dart b/lib/app/models/json/annotation.g.dart deleted file mode 100644 index 161b5500..00000000 --- a/lib/app/models/json/annotation.g.dart +++ /dev/null @@ -1,151 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'annotation.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -Serializer _$annotationSerializer = new _$AnnotationSerializer(); - -class _$AnnotationSerializer implements StructuredSerializer { - @override - final Iterable types = const [Annotation, _$Annotation]; - @override - final String wireName = 'Annotation'; - - @override - Iterable serialize(Serializers serializers, Annotation object, - {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'entry', - serializers.serialize(object.entry, - specifiedType: const FullType(DateTime)), - 'description', - serializers.serialize(object.description, - specifiedType: const FullType(String)), - ]; - - return result; - } - - @override - Annotation deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = new AnnotationBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final Object? value = iterator.current; - switch (key) { - case 'entry': - result.entry = serializers.deserialize(value, - specifiedType: const FullType(DateTime))! as DateTime; - break; - case 'description': - result.description = serializers.deserialize(value, - specifiedType: const FullType(String))! as String; - break; - } - } - - return result.build(); - } -} - -class _$Annotation extends Annotation { - @override - final DateTime entry; - @override - final String description; - - factory _$Annotation([void Function(AnnotationBuilder)? updates]) => - (new AnnotationBuilder()..update(updates))._build(); - - _$Annotation._({required this.entry, required this.description}) : super._() { - BuiltValueNullFieldError.checkNotNull(entry, r'Annotation', 'entry'); - BuiltValueNullFieldError.checkNotNull( - description, r'Annotation', 'description'); - } - - @override - Annotation rebuild(void Function(AnnotationBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - AnnotationBuilder toBuilder() => new AnnotationBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is Annotation && - entry == other.entry && - description == other.description; - } - - @override - int get hashCode { - return $jf($jc($jc(0, entry.hashCode), description.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'Annotation') - ..add('entry', entry) - ..add('description', description)) - .toString(); - } -} - -class AnnotationBuilder implements Builder { - _$Annotation? _$v; - - DateTime? _entry; - DateTime? get entry => _$this._entry; - set entry(DateTime? entry) => _$this._entry = entry; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - AnnotationBuilder(); - - AnnotationBuilder get _$this { - final $v = _$v; - if ($v != null) { - _entry = $v.entry; - _description = $v.description; - _$v = null; - } - return this; - } - - @override - void replace(Annotation other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$Annotation; - } - - @override - void update(void Function(AnnotationBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - Annotation build() => _build(); - - _$Annotation _build() { - final _$result = _$v ?? - new _$Annotation._( - entry: BuiltValueNullFieldError.checkNotNull( - entry, r'Annotation', 'entry'), - description: BuiltValueNullFieldError.checkNotNull( - description, r'Annotation', 'description')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/app/models/json/iso_8601_basic.dart b/lib/app/models/json/iso_8601_basic.dart deleted file mode 100644 index a7451a43..00000000 --- a/lib/app/models/json/iso_8601_basic.dart +++ /dev/null @@ -1,24 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'package:built_value/iso_8601_date_time_serializer.dart'; -import 'package:built_value/serializer.dart'; -import 'package:intl/intl.dart'; - -/// > Dates are rendered in ISO 8601 combined date and time in UTC format using -/// > the template: `YYYYMMDDTHHMMSSZ`. An example: `20120110T231200Z`. No other -/// > formats are supported. -- -/// > . -final DateFormat iso8601Basic = DateFormat('yMMddTHHmmss\'Z\''); - -class Iso8601BasicDateTimeSerializer extends Iso8601DateTimeSerializer { - @override - Object serialize(Serializers serializers, DateTime dateTime, - {FullType specifiedType = FullType.unspecified}) { - if (!dateTime.isUtc) { - throw ArgumentError.value( - dateTime, 'dateTime', 'Must be in utc for serialization.'); - } - - return iso8601Basic.format(dateTime); - } -} diff --git a/lib/app/models/json/serializers.dart b/lib/app/models/json/serializers.dart deleted file mode 100644 index fce4ca6b..00000000 --- a/lib/app/models/json/serializers.dart +++ /dev/null @@ -1,21 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/serializer.dart'; -import 'package:built_value/standard_json_plugin.dart'; -import 'package:taskwarrior/app/models/json/annotation.dart'; -import 'package:taskwarrior/app/models/json/iso_8601_basic.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; - - - -part 'serializers.g.dart'; - -@SerializersFor([ - Annotation, - Task, -]) -final Serializers serializers = (_$serializers.toBuilder() - ..add(Iso8601BasicDateTimeSerializer()) - ..addPlugin(StandardJsonPlugin())) - .build(); diff --git a/lib/app/models/json/serializers.g.dart b/lib/app/models/json/serializers.g.dart deleted file mode 100644 index a2a1ced5..00000000 --- a/lib/app/models/json/serializers.g.dart +++ /dev/null @@ -1,23 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'serializers.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -Serializers _$serializers = (new Serializers().toBuilder() - ..add(Annotation.serializer) - ..add(Task.serializer) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(Annotation)]), - () => new ListBuilder())) - .build(); - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/app/models/json/task.dart b/lib/app/models/json/task.dart deleted file mode 100644 index b178ef35..00000000 --- a/lib/app/models/json/task.dart +++ /dev/null @@ -1,106 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'dart:convert'; - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; -import 'package:taskwarrior/app/models/json/annotation.dart'; -import 'package:taskwarrior/app/models/json/serializers.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/validate.dart'; - - -part 'task.g.dart'; - -final coreAttributes = [ - 'id', - 'status', - 'uuid', - 'entry', - 'description', - 'start', - 'end', - 'due', - 'until', - 'wait', - 'modified', - 'scheduled', - 'recur', - 'mask', - 'imask', - 'parent', - 'project', - 'priority', - 'depends', - 'tags', - 'annotations', - 'urgency', -]; - -abstract class Task implements Built { - factory Task([void Function(TaskBuilder) updates]) = _$Task; - Task._() { - validateTaskDescription(description); - if (project != null) { - validateTaskProject(project!); - } - if (tags != null) { - tags!.forEach(validateTaskTags); - } - } - - static Task fromJson(Map json) { - var udas = Map.of(json) - ..removeWhere((key, _) => coreAttributes.contains(key)); - var result = Map.of(json) - ..removeWhere((key, _) => !coreAttributes.contains(key)) - ..['depends'] = ((x) => (x is String) ? x.split(',') : x)(json['depends']) - ..['imask'] = (json['imask'] as num?)?.toInt() - ..['udas'] = (udas.isEmpty) ? null : jsonEncode(udas); - return serializers.deserializeWith(Task.serializer, result)!; - } - - Map toJson() { - var result = serializers.serializeWith(Task.serializer, this)! - as Map; - - if (result['depends'] != null) { - result['depends'] = (result['depends'] as List).join(','); - } - - if (result['udas'] != null) { - var udas = Map.of(json.decode(result['udas'])); - result - ..remove('udas') - ..addAll(udas); - } - - return result; - } - - int? get id; - String get status; - String get uuid; - DateTime get entry; - String get description; - DateTime? get start; - DateTime? get end; - DateTime? get due; - DateTime? get until; - DateTime? get wait; - DateTime? get modified; - DateTime? get scheduled; - String? get recur; - String? get mask; - int? get imask; - String? get parent; - String? get project; - String? get priority; - BuiltList? get depends; - BuiltList? get tags; - BuiltList? get annotations; - String? get udas; - double? get urgency; - - static Serializer get serializer => _$taskSerializer; -} diff --git a/lib/app/models/json/task.g.dart b/lib/app/models/json/task.g.dart deleted file mode 100644 index a1232df1..00000000 --- a/lib/app/models/json/task.g.dart +++ /dev/null @@ -1,678 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'task.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -Serializer _$taskSerializer = new _$TaskSerializer(); - -class _$TaskSerializer implements StructuredSerializer { - @override - final Iterable types = const [Task, _$Task]; - @override - final String wireName = 'Task'; - - @override - Iterable serialize(Serializers serializers, Task object, - {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'status', - serializers.serialize(object.status, - specifiedType: const FullType(String)), - 'uuid', - serializers.serialize(object.uuid, specifiedType: const FullType(String)), - 'entry', - serializers.serialize(object.entry, - specifiedType: const FullType(DateTime)), - 'description', - serializers.serialize(object.description, - specifiedType: const FullType(String)), - ]; - Object? value; - value = object.id; - if (value != null) { - result - ..add('id') - ..add(serializers.serialize(value, specifiedType: const FullType(int))); - } - value = object.start; - if (value != null) { - result - ..add('start') - ..add(serializers.serialize(value, - specifiedType: const FullType(DateTime))); - } - value = object.end; - if (value != null) { - result - ..add('end') - ..add(serializers.serialize(value, - specifiedType: const FullType(DateTime))); - } - value = object.due; - if (value != null) { - result - ..add('due') - ..add(serializers.serialize(value, - specifiedType: const FullType(DateTime))); - } - value = object.until; - if (value != null) { - result - ..add('until') - ..add(serializers.serialize(value, - specifiedType: const FullType(DateTime))); - } - value = object.wait; - if (value != null) { - result - ..add('wait') - ..add(serializers.serialize(value, - specifiedType: const FullType(DateTime))); - } - value = object.modified; - if (value != null) { - result - ..add('modified') - ..add(serializers.serialize(value, - specifiedType: const FullType(DateTime))); - } - value = object.scheduled; - if (value != null) { - result - ..add('scheduled') - ..add(serializers.serialize(value, - specifiedType: const FullType(DateTime))); - } - value = object.recur; - if (value != null) { - result - ..add('recur') - ..add(serializers.serialize(value, - specifiedType: const FullType(String))); - } - value = object.mask; - if (value != null) { - result - ..add('mask') - ..add(serializers.serialize(value, - specifiedType: const FullType(String))); - } - value = object.imask; - if (value != null) { - result - ..add('imask') - ..add(serializers.serialize(value, specifiedType: const FullType(int))); - } - value = object.parent; - if (value != null) { - result - ..add('parent') - ..add(serializers.serialize(value, - specifiedType: const FullType(String))); - } - value = object.project; - if (value != null) { - result - ..add('project') - ..add(serializers.serialize(value, - specifiedType: const FullType(String))); - } - value = object.priority; - if (value != null) { - result - ..add('priority') - ..add(serializers.serialize(value, - specifiedType: const FullType(String))); - } - value = object.depends; - if (value != null) { - result - ..add('depends') - ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); - } - value = object.tags; - if (value != null) { - result - ..add('tags') - ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); - } - value = object.annotations; - if (value != null) { - result - ..add('annotations') - ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(Annotation)]))); - } - value = object.udas; - if (value != null) { - result - ..add('udas') - ..add(serializers.serialize(value, - specifiedType: const FullType(String))); - } - value = object.urgency; - if (value != null) { - result - ..add('urgency') - ..add(serializers.serialize(value, - specifiedType: const FullType(double))); - } - return result; - } - - @override - Task deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = new TaskBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final Object? value = iterator.current; - switch (key) { - case 'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int?; - break; - case 'status': - result.status = serializers.deserialize(value, - specifiedType: const FullType(String))! as String; - break; - case 'uuid': - result.uuid = serializers.deserialize(value, - specifiedType: const FullType(String))! as String; - break; - case 'entry': - result.entry = serializers.deserialize(value, - specifiedType: const FullType(DateTime))! as DateTime; - break; - case 'description': - result.description = serializers.deserialize(value, - specifiedType: const FullType(String))! as String; - break; - case 'start': - result.start = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime?; - break; - case 'end': - result.end = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime?; - break; - case 'due': - result.due = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime?; - break; - case 'until': - result.until = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime?; - break; - case 'wait': - result.wait = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime?; - break; - case 'modified': - result.modified = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime?; - break; - case 'scheduled': - result.scheduled = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime?; - break; - case 'recur': - result.recur = serializers.deserialize(value, - specifiedType: const FullType(String)) as String?; - break; - case 'mask': - result.mask = serializers.deserialize(value, - specifiedType: const FullType(String)) as String?; - break; - case 'imask': - result.imask = serializers.deserialize(value, - specifiedType: const FullType(int)) as int?; - break; - case 'parent': - result.parent = serializers.deserialize(value, - specifiedType: const FullType(String)) as String?; - break; - case 'project': - result.project = serializers.deserialize(value, - specifiedType: const FullType(String)) as String?; - break; - case 'priority': - result.priority = serializers.deserialize(value, - specifiedType: const FullType(String)) as String?; - break; - case 'depends': - result.depends.replace(serializers.deserialize(value, - specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! - as BuiltList); - break; - case 'tags': - result.tags.replace(serializers.deserialize(value, - specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! - as BuiltList); - break; - case 'annotations': - result.annotations.replace(serializers.deserialize(value, - specifiedType: const FullType( - BuiltList, const [const FullType(Annotation)]))! - as BuiltList); - break; - case 'udas': - result.udas = serializers.deserialize(value, - specifiedType: const FullType(String)) as String?; - break; - case 'urgency': - result.urgency = serializers.deserialize(value, - specifiedType: const FullType(double)) as double?; - break; - } - } - - return result.build(); - } -} - -class _$Task extends Task { - @override - final int? id; - @override - final String status; - @override - final String uuid; - @override - final DateTime entry; - @override - final String description; - @override - final DateTime? start; - @override - final DateTime? end; - @override - final DateTime? due; - @override - final DateTime? until; - @override - final DateTime? wait; - @override - final DateTime? modified; - @override - final DateTime? scheduled; - @override - final String? recur; - @override - final String? mask; - @override - final int? imask; - @override - final String? parent; - @override - final String? project; - @override - final String? priority; - @override - final BuiltList? depends; - @override - final BuiltList? tags; - @override - final BuiltList? annotations; - @override - final String? udas; - @override - final double? urgency; - - factory _$Task([void Function(TaskBuilder)? updates]) => - (new TaskBuilder()..update(updates))._build(); - - _$Task._( - {this.id, - required this.status, - required this.uuid, - required this.entry, - required this.description, - this.start, - this.end, - this.due, - this.until, - this.wait, - this.modified, - this.scheduled, - this.recur, - this.mask, - this.imask, - this.parent, - this.project, - this.priority, - this.depends, - this.tags, - this.annotations, - this.udas, - this.urgency}) - : super._() { - BuiltValueNullFieldError.checkNotNull(status, r'Task', 'status'); - BuiltValueNullFieldError.checkNotNull(uuid, r'Task', 'uuid'); - BuiltValueNullFieldError.checkNotNull(entry, r'Task', 'entry'); - BuiltValueNullFieldError.checkNotNull(description, r'Task', 'description'); - } - - @override - Task rebuild(void Function(TaskBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TaskBuilder toBuilder() => new TaskBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is Task && - id == other.id && - status == other.status && - uuid == other.uuid && - entry == other.entry && - description == other.description && - start == other.start && - end == other.end && - due == other.due && - until == other.until && - wait == other.wait && - modified == other.modified && - scheduled == other.scheduled && - recur == other.recur && - mask == other.mask && - imask == other.imask && - parent == other.parent && - project == other.project && - priority == other.priority && - depends == other.depends && - tags == other.tags && - annotations == other.annotations && - udas == other.udas && - urgency == other.urgency; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc($jc($jc(0, id.hashCode), status.hashCode), uuid.hashCode), entry.hashCode), - description.hashCode), - start.hashCode), - end.hashCode), - due.hashCode), - until.hashCode), - wait.hashCode), - modified.hashCode), - scheduled.hashCode), - recur.hashCode), - mask.hashCode), - imask.hashCode), - parent.hashCode), - project.hashCode), - priority.hashCode), - depends.hashCode), - tags.hashCode), - annotations.hashCode), - udas.hashCode), - urgency.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'Task') - ..add('id', id) - ..add('status', status) - ..add('uuid', uuid) - ..add('entry', entry) - ..add('description', description) - ..add('start', start) - ..add('end', end) - ..add('due', due) - ..add('until', until) - ..add('wait', wait) - ..add('modified', modified) - ..add('scheduled', scheduled) - ..add('recur', recur) - ..add('mask', mask) - ..add('imask', imask) - ..add('parent', parent) - ..add('project', project) - ..add('priority', priority) - ..add('depends', depends) - ..add('tags', tags) - ..add('annotations', annotations) - ..add('udas', udas) - ..add('urgency', urgency)) - .toString(); - } -} - -class TaskBuilder implements Builder { - _$Task? _$v; - - int? _id; - int? get id => _$this._id; - set id(int? id) => _$this._id = id; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - String? _uuid; - String? get uuid => _$this._uuid; - set uuid(String? uuid) => _$this._uuid = uuid; - - DateTime? _entry; - DateTime? get entry => _$this._entry; - set entry(DateTime? entry) => _$this._entry = entry; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - DateTime? _start; - DateTime? get start => _$this._start; - set start(DateTime? start) => _$this._start = start; - - DateTime? _end; - DateTime? get end => _$this._end; - set end(DateTime? end) => _$this._end = end; - - DateTime? _due; - DateTime? get due => _$this._due; - set due(DateTime? due) => _$this._due = due; - - DateTime? _until; - DateTime? get until => _$this._until; - set until(DateTime? until) => _$this._until = until; - - DateTime? _wait; - DateTime? get wait => _$this._wait; - set wait(DateTime? wait) => _$this._wait = wait; - - DateTime? _modified; - DateTime? get modified => _$this._modified; - set modified(DateTime? modified) => _$this._modified = modified; - - DateTime? _scheduled; - DateTime? get scheduled => _$this._scheduled; - set scheduled(DateTime? scheduled) => _$this._scheduled = scheduled; - - String? _recur; - String? get recur => _$this._recur; - set recur(String? recur) => _$this._recur = recur; - - String? _mask; - String? get mask => _$this._mask; - set mask(String? mask) => _$this._mask = mask; - - int? _imask; - int? get imask => _$this._imask; - set imask(int? imask) => _$this._imask = imask; - - String? _parent; - String? get parent => _$this._parent; - set parent(String? parent) => _$this._parent = parent; - - String? _project; - String? get project => _$this._project; - set project(String? project) => _$this._project = project; - - String? _priority; - String? get priority => _$this._priority; - set priority(String? priority) { - if (priority != 'None') { - _$this._priority = priority; - } - } - - ListBuilder? _depends; - ListBuilder get depends => - _$this._depends ??= new ListBuilder(); - set depends(ListBuilder? depends) => _$this._depends = depends; - - ListBuilder? _tags; - ListBuilder get tags => _$this._tags ??= new ListBuilder(); - set tags(ListBuilder? tags) => _$this._tags = tags; - - ListBuilder? _annotations; - ListBuilder get annotations => - _$this._annotations ??= new ListBuilder(); - set annotations(ListBuilder? annotations) => - _$this._annotations = annotations; - - String? _udas; - String? get udas => _$this._udas; - set udas(String? udas) => _$this._udas = udas; - - double? _urgency; - double? get urgency => _$this._urgency; - set urgency(double? urgency) => _$this._urgency = urgency; - - TaskBuilder(); - - TaskBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _status = $v.status; - _uuid = $v.uuid; - _entry = $v.entry; - _description = $v.description; - _start = $v.start; - _end = $v.end; - _due = $v.due; - _until = $v.until; - _wait = $v.wait; - _modified = $v.modified; - _scheduled = $v.scheduled; - _recur = $v.recur; - _mask = $v.mask; - _imask = $v.imask; - _parent = $v.parent; - _project = $v.project; - _priority = $v.priority; - _depends = $v.depends?.toBuilder(); - _tags = $v.tags?.toBuilder(); - _annotations = $v.annotations?.toBuilder(); - _udas = $v.udas; - _urgency = $v.urgency; - _$v = null; - } - return this; - } - - @override - void replace(Task other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$Task; - } - - @override - void update(void Function(TaskBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - Task build() => _build(); - - _$Task _build() { - _$Task _$result; - try { - _$result = _$v ?? - new _$Task._( - id: id, - status: BuiltValueNullFieldError.checkNotNull( - status, r'Task', 'status'), - uuid: - BuiltValueNullFieldError.checkNotNull(uuid, r'Task', 'uuid'), - entry: BuiltValueNullFieldError.checkNotNull( - entry, r'Task', 'entry'), - description: BuiltValueNullFieldError.checkNotNull( - description, r'Task', 'description'), - start: start, - end: end, - due: due, - until: until, - wait: wait, - modified: modified, - scheduled: scheduled, - recur: recur, - mask: mask, - imask: imask, - parent: parent, - project: project, - priority: priority, - depends: _depends?.build(), - tags: _tags?.build(), - annotations: _annotations?.build(), - udas: udas, - urgency: urgency); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'depends'; - _depends?.build(); - _$failedField = 'tags'; - _tags?.build(); - _$failedField = 'annotations'; - _annotations?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'Task', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/app/models/models.dart b/lib/app/models/models.dart deleted file mode 100644 index 6eabc8b9..00000000 --- a/lib/app/models/models.dart +++ /dev/null @@ -1,6 +0,0 @@ -export './onboarding_model.dart'; -export './size_config_model.dart'; -export './json/annotation.dart'; -export './json/iso_8601_basic.dart'; -export './json/serializers.dart'; -export './json/task.dart'; \ No newline at end of file diff --git a/lib/app/models/onboarding_model.dart b/lib/app/models/onboarding_model.dart deleted file mode 100644 index ab0796a2..00000000 --- a/lib/app/models/onboarding_model.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:flutter/material.dart'; - -class OnboardingModel { - final String title; - final String image; - final String desc; - final Color colors; - - OnboardingModel({ - required this.title, - required this.image, - required this.desc, - required this.colors, - }); -} \ No newline at end of file diff --git a/lib/app/models/size_config_model.dart b/lib/app/models/size_config_model.dart deleted file mode 100644 index 00271a17..00000000 --- a/lib/app/models/size_config_model.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:flutter/material.dart'; - -class SizeConfig { - MediaQueryData? _mediaQueryData; - double? screenW; - double? screenH; - double? blockH; - double? blockV; - - void init(BuildContext context) { - _mediaQueryData = MediaQuery.of(context); - screenW = _mediaQueryData!.size.width; - screenH = _mediaQueryData!.size.height; - blockH = screenW! / 100; - blockV = screenH! / 100; - } -} diff --git a/lib/app/models/storage.dart b/lib/app/models/storage.dart deleted file mode 100644 index 78212b0d..00000000 --- a/lib/app/models/storage.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'dart:io'; - -import 'package:taskwarrior/app/models/data.dart'; -import 'package:taskwarrior/app/models/storage/tabs.dart'; -import 'package:taskwarrior/app/utils/home_path/impl/gui_pem_file_paths.dart'; -import 'package:taskwarrior/app/utils/home_path/impl/home.dart'; -import 'package:taskwarrior/app/utils/home_path/impl/taskrc.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/query.dart'; - - -class Storage { - const Storage(this.profile); - - final Directory profile; - - Data get data => Data(profile); - GUIPemFiles get guiPemFiles => GUIPemFiles(profile); - Home get home => Home( - home: profile, - pemFilePaths: guiPemFiles.pemFilePaths, - ); - Query get query => Query(profile); - Tabs get tabs => Tabs(profile); - Taskrc get taskrc => Taskrc(profile); -} diff --git a/lib/app/models/storage/client.dart b/lib/app/models/storage/client.dart deleted file mode 100644 index 0e24de91..00000000 --- a/lib/app/models/storage/client.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:package_info_plus/package_info_plus.dart'; - -Future client() async { - var packageInfo = await PackageInfo.fromPlatform(); - return '${packageInfo.packageName} ${packageInfo.version}'; -} diff --git a/lib/app/models/storage/exceptions/bad_certificate_exception.dart b/lib/app/models/storage/exceptions/bad_certificate_exception.dart deleted file mode 100644 index 1a169865..00000000 --- a/lib/app/models/storage/exceptions/bad_certificate_exception.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'dart:io'; - -class BadCertificateException implements Exception { - BadCertificateException({ - required this.home, - required this.certificate, - }); - - Directory home; - X509Certificate certificate; -} diff --git a/lib/app/models/storage/exceptions/taskserver_configuration_exception.dart b/lib/app/models/storage/exceptions/taskserver_configuration_exception.dart deleted file mode 100644 index 25b31b17..00000000 --- a/lib/app/models/storage/exceptions/taskserver_configuration_exception.dart +++ /dev/null @@ -1,10 +0,0 @@ -class TaskserverConfigurationException implements Exception { - TaskserverConfigurationException(this.message); - - String message; - - @override - String toString() { - return message; - } -} diff --git a/lib/app/models/storage/savefile.dart b/lib/app/models/storage/savefile.dart deleted file mode 100644 index 0a3b8140..00000000 --- a/lib/app/models/storage/savefile.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'dart:io'; -import 'dart:typed_data'; -import 'package:file_selector/file_selector.dart'; -import 'package:file_picker_writable/file_picker_writable.dart'; - -Future saveServerCert(String contents) async { - if (Platform.isLinux || Platform.isMacOS || Platform.isWindows) { - var saveLocation = await getSaveLocation( - suggestedName: 'server.cert.pem', - ); - - if (saveLocation != null) { - var data = Uint8List.fromList(contents.codeUnits); - var file = XFile.fromData(data); - await file.saveTo(saveLocation.path); - } - } else { - await FilePickerWritable().openFileForCreate( - fileName: 'server.cert.pem', - writer: (tempFile) => tempFile.writeAsString(contents), - ); - } -} - -Future exportTasks({ - required String contents, - required String suggestedName, -}) async { - if (Platform.isLinux || Platform.isMacOS || Platform.isWindows) { - var saveLocation = await getSaveLocation( - suggestedName: suggestedName, - ); - - if (saveLocation != null) { - var data = Uint8List.fromList(contents.codeUnits); - var file = XFile.fromData(data); - await file.saveTo(saveLocation.path); - } - } else { - await FilePickerWritable().openFileForCreate( - fileName: suggestedName, - writer: (tempFile) => tempFile.writeAsString(contents), - ); - } -} diff --git a/lib/app/models/storage/set_config.dart b/lib/app/models/storage/set_config.dart deleted file mode 100644 index 61962e9c..00000000 --- a/lib/app/models/storage/set_config.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'dart:io'; - -import 'package:file_picker_writable/file_picker_writable.dart'; -import 'package:file_selector/file_selector.dart'; -import 'package:taskwarrior/app/models/storage.dart'; - - -Future setConfig({required Storage storage, required String key}) async { - String? contents; - String? name; - if (Platform.isLinux || Platform.isMacOS || Platform.isWindows) { - var typeGroup = XTypeGroup(label: key, extensions: const []); - var file = await openFile(acceptedTypeGroups: [typeGroup]); - if (file != null) { - contents = await file.readAsString(); - name = file.name; - } - } else { - await FilePickerWritable().openFile((fileInfo, file) async { - contents = file.readAsStringSync(); - name = fileInfo.fileName ?? Uri.parse(fileInfo.uri).pathSegments.last; - }); - } - if (contents != null) { - if (key == 'TASKRC') { - storage.taskrc.addTaskrc(contents!); - } else { - storage.guiPemFiles.addPemFile( - key: key, - contents: contents!, - name: name, - ); - } - } -} diff --git a/lib/app/models/storage/tabs.dart b/lib/app/models/storage/tabs.dart deleted file mode 100644 index 9ca4eaad..00000000 --- a/lib/app/models/storage/tabs.dart +++ /dev/null @@ -1,81 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'dart:convert'; -import 'dart:io'; -import 'dart:math'; - -import 'package:path/path.dart'; -import 'package:uuid/uuid.dart'; - -class Tabs { - const Tabs(this.profile); - - final Directory profile; - - File get _initialTabIndex => File('${profile.path}/initialTabIndex'); - Directory get _tabs => Directory('${profile.path}/tabs'); - - Directory tab() { - var index = initialTabIndex(); - var tabUuid = tabUuids()[index]; - return Directory('${profile.path}/tabs/$tabUuid'); - } - - int initialTabIndex() { - if (!_initialTabIndex.existsSync()) { - setInitialTabIndex(0); - } - return json.decode(_initialTabIndex.readAsStringSync()); - } - - void setInitialTabIndex(int index) { - _initialTabIndex.writeAsStringSync(json.encode(index)); - } - - void addTab() { - var uuid = const Uuid().v1(); - var dir = '${_tabs.path}/$uuid'; - Directory(dir).createSync(recursive: true); - File('$dir/created').writeAsStringSync(DateTime.now().toIso8601String()); - } - - List tabUuids() { - _tabs.createSync(recursive: true); - if (_tabs.listSync().isEmpty) { - addTab(); - } - var dirs = _tabs.listSync() - ..sort((a, b) => DateTime.parse( - File('${a.path}/created').readAsStringSync(), - ).compareTo(DateTime.parse( - File('${b.path}/created').readAsStringSync(), - ))); - return dirs.map((dir) => basename(dir.path)).toList(); - } - - void removeTab(int index) { - var uuid = tabUuids()[index]; - Directory('${_tabs.path}/$uuid').deleteSync(recursive: true); - setInitialTabIndex(max(0, min(initialTabIndex(), tabUuids().length - 1))); - if (tabUuids().isEmpty) { - addTab(); - } - } - - void renameTab({ - required String tab, - required String name, - }) { - File('${_tabs.path}/$tab/alias').writeAsStringSync(name); - } - - String? alias(String tabUuid) { - if (File('${_tabs.path}/$tabUuid/alias').existsSync()) { - var result = File('${_tabs.path}/$tabUuid/alias').readAsStringSync(); - if (result.isNotEmpty) { - return result; - } - } - return null; - } -} diff --git a/lib/app/models/tag_meta_data.dart b/lib/app/models/tag_meta_data.dart deleted file mode 100644 index 6e2bdfb9..00000000 --- a/lib/app/models/tag_meta_data.dart +++ /dev/null @@ -1,20 +0,0 @@ -class TagMetadata { - TagMetadata({ - required this.lastModified, - required this.frequency, - required this.selected, - }); - - final DateTime lastModified; - final int frequency; - final bool selected; - - Map toJson() => { - 'lastModified': lastModified, - 'frequency': frequency, - 'selected': selected, - }; - - @override - String toString() => toJson().toString(); -} diff --git a/lib/app/modules/about/bindings/about_binding.dart b/lib/app/modules/about/bindings/about_binding.dart deleted file mode 100644 index 388e1fea..00000000 --- a/lib/app/modules/about/bindings/about_binding.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:get/get.dart'; - -import '../controllers/about_controller.dart'; - -class AboutBinding extends Bindings { - @override - void dependencies() { - Get.lazyPut( - () => AboutController(), - ); - } -} diff --git a/lib/app/modules/about/controllers/about_controller.dart b/lib/app/modules/about/controllers/about_controller.dart deleted file mode 100644 index 497fb004..00000000 --- a/lib/app/modules/about/controllers/about_controller.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:get/get.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; - -class AboutController extends GetxController { - final Rx selectedLanguage = SupportedLanguage.english.obs; - - @override - void onInit() { - super.onInit(); - initLanguage(); - } - - void initLanguage() { - selectedLanguage.value = AppSettings.selectedLanguage; - } -} diff --git a/lib/app/modules/about/views/about_page_app_bar.dart b/lib/app/modules/about/views/about_page_app_bar.dart deleted file mode 100644 index 1a20a113..00000000 --- a/lib/app/modules/about/views/about_page_app_bar.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/modules/about/controllers/about_controller.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; - -class AboutPageAppBar extends StatelessWidget implements PreferredSizeWidget { - final AboutController aboutController; - const AboutPageAppBar({required this.aboutController,super.key}); - - @override - Widget build(BuildContext context) { - return AppBar( - centerTitle: true, - backgroundColor: TaskWarriorColors.kprimaryBackgroundColor, - title: Text( - SentenceManager( - currentLanguage: aboutController.selectedLanguage.value) - .sentences - .aboutPageAppBarTitle, - // style: GoogleFonts.poppins(color: TaskWarriorColors.white), - style: TextStyle( - fontFamily: FontFamily.poppins, - color: TaskWarriorColors.white, - ), - ), - leading: GestureDetector( - onTap: () { - Navigator.pop(context); - }, - child: Icon( - Icons.chevron_left, - color: TaskWarriorColors.white, - ), - ), - ); - } - - @override - Size get preferredSize => AppBar().preferredSize; -} diff --git a/lib/app/modules/about/views/about_page_body.dart b/lib/app/modules/about/views/about_page_body.dart deleted file mode 100644 index 1483e892..00000000 --- a/lib/app/modules/about/views/about_page_body.dart +++ /dev/null @@ -1,267 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; - -import 'package:get/get.dart'; -import 'package:package_info_plus/package_info_plus.dart'; -import 'package:taskwarrior/app/modules/about/controllers/about_controller.dart'; -import 'package:taskwarrior/app/utils/gen/assets.gen.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:url_launcher/url_launcher.dart'; - -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; - -class AboutPageBody extends StatelessWidget { - final AboutController aboutController; - const AboutPageBody({required this.aboutController, super.key}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - String introduction = - SentenceManager(currentLanguage: aboutController.selectedLanguage.value) - .sentences - .aboutPageProjectDescription; - - return Padding( - padding: EdgeInsets.only( - top: Get.height * 0.01, - left: Get.width * 0.02, - right: Get.width * 0.02), - child: SingleChildScrollView( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - height: Get.height * 0.02, - ), - SizedBox( - child: SvgPicture.asset( - Assets.svg.logo.path, - height: Get.height * 0.2, - width: Get.width * 1, - )), - SizedBox( - height: Get.height * 0.02, - ), - Text( - "Taskwarrior", - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeExtraLarge, - color: tColors.primaryTextColor, - ), - ), - SizedBox( - height: Get.height * 0.02, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - FutureBuilder( - future: getAppInfo(), - builder: - (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { - return const CircularProgressIndicator(); - } else if (snapshot.hasError) { - return Text('Error: ${snapshot.error}'); - } else { - final appInfoLines = snapshot.data!.split(' '); - - return Column( - children: [ - RichText( - text: TextSpan( - children: [ - TextSpan( - text: SentenceManager( - currentLanguage: aboutController - .selectedLanguage.value) - .sentences - .version, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - TextSpan( - text: appInfoLines[1], - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - ], - ), - ), - SizedBox( - width: Get.width * 0.85, - child: FittedBox( - fit: BoxFit.fitWidth, - child: RichText( - text: TextSpan( - children: [ - TextSpan( - text: SentenceManager( - currentLanguage: aboutController - .selectedLanguage.value) - .sentences - .package, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: - TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - TextSpan( - text: appInfoLines[0], - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: - TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - ], - ), - ), - ), - ), - ], - ); - } - }, - ), - ], - ), - SizedBox( - height: Get.height * 0.05, - ), - Text( - introduction, - textAlign: TextAlign.center, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.medium, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - SizedBox( - height: Get.height * 0.06, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - SizedBox( - width: Get.width * 0.4, - height: Get.height * 0.05, - child: ElevatedButton.icon( - style: ElevatedButton.styleFrom( - backgroundColor: tColors.secondaryTextColor, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - ), - ), - onPressed: () async { - // Launch GitHub URL. - - String url = - "https://github.com/CCExtractor/taskwarrior-flutter"; - if (!await launchUrl(Uri.parse(url))) { - throw Exception('Could not launch $url'); - } - }, - icon: SvgPicture.asset(Assets.svg.github.path, - width: 20, - height: 20, - colorFilter: ColorFilter.mode( - tColors.secondaryBackgroundColor!, - BlendMode.srcIn)), - label: Text( - "GitHub", - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.medium, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.secondaryBackgroundColor, - ), - ), - ), - ), - SizedBox( - width: Get.width * 0.4, - height: Get.height * 0.05, - child: ElevatedButton.icon( - style: ElevatedButton.styleFrom( - backgroundColor: tColors.secondaryTextColor, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - ), - ), - onPressed: () async { - String url = "https://ccextractor.org/"; - if (!await launchUrl(Uri.parse(url))) { - throw Exception('Could not launch $url'); - } - }, - icon: SvgPicture.asset(Assets.svg.link.path, - width: 20, - height: 20, - colorFilter: ColorFilter.mode( - tColors.secondaryBackgroundColor!, - BlendMode.srcIn - ) - ), - label: Text( - "CCExtractor", - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.medium, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.secondaryBackgroundColor, - ), - ), - ), - ), - ], - ), - SizedBox( - height: Get.height * 0.04, - ), - Text( - SentenceManager( - currentLanguage: aboutController.selectedLanguage.value) - .sentences - .aboutPageGitHubLink, - textAlign: TextAlign.center, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.semiBold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - SizedBox( - height: Get.height * 0.02, - ), - ], - ), - ), - ); - } -} - -Future getAppInfo() async { - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - - return '${packageInfo.packageName} ${packageInfo.version}'; -} diff --git a/lib/app/modules/about/views/about_view.dart b/lib/app/modules/about/views/about_view.dart deleted file mode 100644 index d7e832f8..00000000 --- a/lib/app/modules/about/views/about_view.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; - -import 'package:taskwarrior/app/modules/about/views/about_page_app_bar.dart'; -import 'package:taskwarrior/app/modules/about/views/about_page_body.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -import '../controllers/about_controller.dart'; - -class AboutView extends GetView { - const AboutView({super.key}); - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return Scaffold( - appBar: AboutPageAppBar(aboutController: controller,), - backgroundColor: tColors.primaryBackgroundColor, - body: AboutPageBody( - aboutController: controller, - ), - ); - } -} diff --git a/lib/app/modules/detailRoute/bindings/detail_route_binding.dart b/lib/app/modules/detailRoute/bindings/detail_route_binding.dart deleted file mode 100644 index 41eebd1e..00000000 --- a/lib/app/modules/detailRoute/bindings/detail_route_binding.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:get/get.dart'; - -import '../controllers/detail_route_controller.dart'; - -class DetailRouteBinding extends Bindings { - @override - void dependencies() { - Get.lazyPut( - () => DetailRouteController(), - ); - } -} diff --git a/lib/app/modules/detailRoute/controllers/detail_route_controller.dart b/lib/app/modules/detailRoute/controllers/detail_route_controller.dart deleted file mode 100644 index 85c3712c..00000000 --- a/lib/app/modules/detailRoute/controllers/detail_route_controller.dart +++ /dev/null @@ -1,159 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'package:built_collection/built_collection.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/tour/details_page_tour.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/modify.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/urgency.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class DetailRouteController extends GetxController { - late String uuid; - late Modify modify; - var onEdit = false.obs; - var isReadOnly = false.obs; - - @override - void onInit() { - super.onInit(); - var arguments = Get.arguments; - uuid = arguments[1] as String; - // uuid = Get.arguments['uuid']; - var storageWidget = Get.find(); - modify = Modify( - getTask: storageWidget.getTask, - mergeTask: storageWidget.mergeTask, - uuid: uuid, - ); - initValues(); - - // Check if task is completed or deleted and set read-only state - isReadOnly.value = (modify.draft.status == 'completed' || - modify.draft.status == 'deleted'); - } - - void setAttribute(String name, dynamic newValue) { - if (isReadOnly.value && name != 'status') { - return; - } - - modify.set(name, newValue); - onEdit.value = true; - - // If status is being changed, update read-only state - if (name == 'status') { - isReadOnly.value = (newValue == 'completed' || newValue == 'deleted'); - } - - if (name == 'start') { - debugPrint('Start Value Changed to $newValue'); - startValue.value = newValue; - } - initValues(); - } - - Future saveChanges() async { - var now = DateTime.now().toUtc(); - modify.save(modified: () => now); - onEdit.value = false; - Get.back(); - Get.snackbar( - 'Task Updated', - '', - snackPosition: SnackPosition.BOTTOM, - ); - } - - // 'description': controller.modify.draft.description, - // 'status': controller.modify.draft.status, - // 'entry': controller.modify.draft.entry, - // 'modified': controller.modify.draft.modified, - // 'start': controller.modify.draft.start, - // 'end': controller.modify.draft.end, - // 'due': controller.dueValue.value, - // 'wait': controller.modify.draft.wait, - // 'until': controller.modify.draft.until, - // 'priority': controller.modify.draft.priority, - // 'project': controller.modify.draft.project, - // 'tags': controller.modify.draft.tags, - // 'urgency': urgency(controller.modify.draft - - late RxString descriptionValue = ''.obs; - late RxString statusValue = ''.obs; - late Rx entryValue = Rx(null); - late Rx modifiedValue = Rx(null); - late Rx startValue = Rx(null); - late Rx endValue = Rx(null); - late Rx dueValue = Rx(null); - late Rx waitValue = Rx(null); - late Rx untilValue = Rx(null); - late Rxn? priorityValue = Rxn(null); - late Rxn? projectValue = Rxn(null); - late Rxn>? tagsValue = Rxn>(null); - late RxDouble urgencyValue = 0.0.obs; - - void initValues() { - descriptionValue.value = modify.draft.description; - statusValue.value = modify.draft.status; - entryValue.value = modify.draft.entry; - modifiedValue.value = modify.draft.modified; - startValue.value ??= null; - endValue.value = modify.draft.end; - dueValue.value = modify.draft.due; - waitValue.value = modify.draft.wait; - untilValue.value = modify.draft.until; - priorityValue?.value = modify.draft.priority; - projectValue?.value = modify.draft.project; - tagsValue?.value = modify.draft.tags; - urgencyValue.value = urgency(modify.draft); - } - - late TutorialCoachMark tutorialCoachMark; - - final GlobalKey dueKey = GlobalKey(); - final GlobalKey untilKey = GlobalKey(); - - final GlobalKey waitKey = GlobalKey(); - final GlobalKey priorityKey = GlobalKey(); - - void initDetailsPageTour() { - tutorialCoachMark = TutorialCoachMark( - targets: addDetailsPage( - dueKey: dueKey, - waitKey: waitKey, - untilKey: untilKey, - priorityKey: priorityKey, - ), - colorShadow: TaskWarriorColors.black, - paddingFocus: 10, - opacityShadow: 1.00, - hideSkip: true, - onFinish: () { - SaveTourStatus.saveDetailsTourStatus(true); - }, - ); - } - - void showDetailsPageTour(BuildContext context) { - Future.delayed( - const Duration(milliseconds: 500), - () { - SaveTourStatus.getDetailsTourStatus().then((value) => { - if (value == false) - { - tutorialCoachMark.show(context: context), - } - else - { - // ignore: avoid_print - print('User has seen this page'), - } - }); - }, - ); - } -} diff --git a/lib/app/modules/detailRoute/views/dateTimePicker.dart b/lib/app/modules/detailRoute/views/dateTimePicker.dart deleted file mode 100644 index 5bda263f..00000000 --- a/lib/app/modules/detailRoute/views/dateTimePicker.dart +++ /dev/null @@ -1,294 +0,0 @@ -// ignore_for_file: file_names, use_build_context_synchronously - -import 'package:flutter/material.dart'; - -import 'package:intl/intl.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; - -class DateTimeWidget extends StatelessWidget { - const DateTimeWidget({ - super.key, - required this.name, - required this.value, - required this.callback, - required this.globalKey, - this.isEditable = true, - }); - - final String name; - - final dynamic value; - final void Function(dynamic) callback; - final GlobalKey globalKey; - final bool isEditable; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Card( - key: globalKey, - color: tColors.secondaryBackgroundColor, - child: ListTile( - enabled: isEditable, - textColor: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - title: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - RichText( - text: TextSpan( - children: [ - TextSpan( - text: '$name:'.padRight(13), - // style: GoogleFonts.poppins( - // fontWeight: TaskWarriorFonts.bold, - // fontSize: TaskWarriorFonts.fontSizeMedium, - // color: AppSettings.isDarkMode - // ? Colors.white - // : Colors.black, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - ), - ), - TextSpan( - text: value ?? - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences.notSelected, - // style: GoogleFonts.poppins( - // fontSize: TaskWarriorFonts.fontSizeMedium, - // color: AppSettings.isDarkMode - // ? Colors.white - // : Colors.black, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - ), - ), - ], - ), - ), - ], - ), - ), - // onTap: () async { - // var initialDate = DateFormat("E, M/d/y h:mm:ss a").parse( - // value?.replaceAll(RegExp(r'\s+'), ' ') ?? - // DateFormat("E, M/d/y h:mm:ss a").format(DateTime.now())); - - // var date = await showDatePicker( - // context: context, - // initialDate: initialDate, - // firstDate: DateTime - // .now(), // sets the earliest selectable date to the current date. This prevents the user from selecting a date in the past. - // lastDate: DateTime(2037, 12, 31), // < 2038-01-19T03:14:08.000Z - // ); - // if (date != null) { - // var time = await showTimePicker( - // context: context, - // initialTime: TimeOfDay.now(), - // ); - // if (time != null) { - // var dateTime = date.add( - // Duration( - // hours: time.hour, - // minutes: time.minute, - // ), - // ); - // dateTime = dateTime.add( - // Duration( - // hours: time.hour - dateTime.hour, - // ), - // ); - // // Check if the selected time is in the past - // if (dateTime.isBefore(DateTime.now())) { - // // Show a message that past times can't be set - // ScaffoldMessenger.of(context).showSnackBar( - // SnackBar( - // content: Text( - // "Can't set times in the past", - // style: TextStyle( - // color: AppSettings.isDarkMode - // ? TaskWarriorColors.kprimaryTextColor - // : TaskWarriorColors.kLightPrimaryTextColor, - // ), - // ), - // backgroundColor: AppSettings.isDarkMode - // ? TaskWarriorColors.ksecondaryBackgroundColor - // : TaskWarriorColors.kLightSecondaryBackgroundColor, - // duration: const Duration(seconds: 2), - // ), - // ); - // } else { - // // If the time is not in the past, proceed as usual - // return callback(dateTime.toUtc()); - // } - // } - // } - // }, - onTap: () async { - var parsedDate = DateFormat("E, M/d/y h:mm:ss a").parse( - value?.replaceAll(RegExp(r'\s+'), ' ') ?? - DateFormat("E, M/d/y h:mm:ss a").format(DateTime.now())); - - var now = DateTime.now(); - var initialDate = parsedDate.isBefore(now) ? now : parsedDate; - - var date = await showDatePicker( - context: context, - initialDate: initialDate, - firstDate: now, - lastDate: DateTime(2037, 12, 31), // < 2038-01-19T03:14:08.000Z - ); - - if (date != null) { - var time = await showTimePicker( - context: context, - initialTime: TimeOfDay.now(), - ); - if (time != null) { - var dateTime = date.add( - Duration( - hours: time.hour, - minutes: time.minute, - ), - ); - - if (dateTime.isBefore(DateTime.now())) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - content: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage, - ).sentences.cantSetTimeinPast, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.primaryBackgroundColor, - duration: const Duration(seconds: 2), - ), - ); - } else { - return callback(dateTime.toUtc()); - } - } - } - }, - onLongPress: () => callback(null), - ), - ); - } -} - -class StartWidget extends StatelessWidget { - const StartWidget({ - required this.name, - required this.value, - required this.callback, - this.isEditable = true, - super.key, - }); - - final String name; - final dynamic value; - final bool isEditable; - final void Function(dynamic) callback; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Card( - color: tColors.secondaryBackgroundColor, - child: ListTile( - enabled: isEditable, - textColor: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - title: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - RichText( - text: TextSpan( - children: [ - TextSpan( - text: '$name:'.padRight(13), - // style: GoogleFonts.poppins( - // fontWeight: TaskWarriorFonts.bold, - // fontSize: TaskWarriorFonts.fontSizeMedium, - // color: AppSettings.isDarkMode - // ? Colors.white - // : Colors.black, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - ), - ), - TextSpan( - text: value ?? SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences.notSelected, - // style: GoogleFonts.poppins( - // fontSize: TaskWarriorFonts.fontSizeMedium, - // color: AppSettings.isDarkMode - // ? Colors.white - // : Colors.black, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - ), - ), - ], - ), - ), - ], - ), - ), - onTap: () { - if (value != null) { - callback(null); - } else { - var now = DateTime.now().toUtc(); - callback(DateTime.utc( - now.year, - now.month, - now.day, - now.hour, - now.minute, - now.second, - )); - } - }, - ), - ); - } -} diff --git a/lib/app/modules/detailRoute/views/description_widget.dart b/lib/app/modules/detailRoute/views/description_widget.dart deleted file mode 100644 index 6c87f6ba..00000000 --- a/lib/app/modules/detailRoute/views/description_widget.dart +++ /dev/null @@ -1,297 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; - -import 'package:loggy/loggy.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; - -class DescriptionWidget extends StatelessWidget { - const DescriptionWidget({ - required this.name, - required this.value, - required this.callback, - this.isEditable = true, - super.key, - }); - - final String name; - final dynamic value; - final void Function(dynamic) callback; - final bool isEditable; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Card( - color: tColors.secondaryBackgroundColor, - child: ListTile( - enabled: isEditable, - textColor: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - title: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - RichText( - text: TextSpan( - children: [ - TextSpan( - text: '$name:'.padRight(13), - // style: GoogleFonts.poppins( - // fontWeight: TaskWarriorFonts.bold, - // fontSize: TaskWarriorFonts.fontSizeMedium, - // color: AppSettings.isDarkMode - // ? Colors.white - // : Colors.black, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - ), - ), - TextSpan( - text: value ?? - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .notSelected, - // style: GoogleFonts.poppins( - // fontSize: TaskWarriorFonts.fontSizeMedium, - // color: AppSettings.isDarkMode - // ? Colors.white - // : Colors.black, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - ), - ), - ], - ), - ), - ], - ), - ), - onTap: () { - var controller = TextEditingController( - text: value, - ); - showDialog( - context: context, - builder: (context) => Utils.showAlertDialog( - scrollable: true, - title: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .editDescription, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - content: TextField( - style: TextStyle( - color: tColors.primaryTextColor, - ), - autofocus: true, - maxLines: null, - controller: controller, - ), - actions: [ - TextButton( - onPressed: () { - Get.back(); - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .cancel, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - TextButton( - onPressed: () { - try { - callback(controller.text); - Get.back(); - } on FormatException catch (e, trace) { - logError(e, trace); - } - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .submit, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - ], - ), - ); - }, - ), - ); - } -} - -class ProjectWidget extends StatelessWidget { - const ProjectWidget({ - required this.name, - required this.value, - required this.callback, - this.isEditable = true, - super.key, - }); - - final String name; - final dynamic value; - final void Function(dynamic) callback; - final bool isEditable; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Card( - color: tColors.secondaryBackgroundColor, - child: ListTile( - enabled: isEditable, - textColor: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - title: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - RichText( - text: TextSpan( - children: [ - TextSpan( - text: '$name:'.padRight(13), - // style: GoogleFonts.poppins( - // fontWeight: TaskWarriorFonts.bold, - // fontSize: TaskWarriorFonts.fontSizeMedium, - // color: AppSettings.isDarkMode - // ? Colors.white - // : Colors.black, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - ), - ), - TextSpan( - text: value ?? - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .notSelected, - // style: GoogleFonts.poppins( - // fontSize: TaskWarriorFonts.fontSizeMedium, - // color: AppSettings.isDarkMode - // ? Colors.white - // : Colors.black, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor, - ), - ), - ], - ), - ), - ], - ), - ), - onTap: () { - var controller = TextEditingController( - text: value, - ); - showDialog( - context: context, - builder: (context) => Utils.showAlertDialog( - scrollable: true, - title: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .editProject, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - content: TextField( - style: TextStyle( - color: tColors.primaryTextColor, - ), - autofocus: true, - maxLines: null, - controller: controller, - ), - actions: [ - TextButton( - onPressed: () { - Get.back(); - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .cancel, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - TextButton( - onPressed: () { - try { - callback( - (controller.text == '') ? null : controller.text); - Get.back(); - } on FormatException catch (e, trace) { - logError(e, trace); - } - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .submit, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - ], - ), - ); - }, - ), - ); - } -} diff --git a/lib/app/modules/detailRoute/views/detail_route_view.dart b/lib/app/modules/detailRoute/views/detail_route_view.dart deleted file mode 100644 index 6fc0bb6d..00000000 --- a/lib/app/modules/detailRoute/views/detail_route_view.dart +++ /dev/null @@ -1,366 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages, deprecated_member_use - -import 'package:built_collection/built_collection.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:intl/intl.dart'; -import 'package:taskwarrior/app/modules/detailRoute/controllers/detail_route_controller.dart'; -import 'package:taskwarrior/app/modules/detailRoute/views/dateTimePicker.dart'; -import 'package:taskwarrior/app/modules/detailRoute/views/description_widget.dart'; -import 'package:taskwarrior/app/modules/detailRoute/views/priority_widget.dart'; -import 'package:taskwarrior/app/modules/detailRoute/views/status_widget.dart'; -import 'package:taskwarrior/app/modules/detailRoute/views/tags_widget.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class DetailRouteView extends GetView { - const DetailRouteView({super.key}); - - @override - Widget build(BuildContext context) { - controller.initDetailsPageTour(); - controller.showDetailsPageTour(context); - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return WillPopScope( - onWillPop: () async { - if (!controller.onEdit.value) { - // Get.offAll(() => const HomeView()); - Get.back(); - // Get.toNamed(Routes.HOME); - return false; - } - - bool? save = await showDialog( - context: context, - builder: (context) { - return AlertDialog( - backgroundColor: tColors.dialogBackgroundColor, - title: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .saveChangesConfirmation, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - actions: [ - TextButton( - onPressed: () { - controller.saveChanges(); - // Get.offAll(() => const HomeView()); - - Get.back(); - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .yes, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - TextButton( - onPressed: () { - // Get.offAll(() => const HomeView()); - - Get.back(); - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .no, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - TextButton( - onPressed: () { - Get.back(); - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .cancel, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - ], - ); - }, - ); - return save == true; - }, - child: Scaffold( - backgroundColor: tColors.primaryBackgroundColor, - appBar: AppBar( - leading: BackButton(color: TaskWarriorColors.white), - backgroundColor: Palette.kToDark, - title: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageID}: ${(controller.modify.id == 0) ? '-' : controller.modify.id}', - style: TextStyle( - color: TaskWarriorColors.white, - ), - )), - body: Padding( - padding: const EdgeInsets.only(left: 8.0, right: 8.0), - child: Obx( - () => ListView( - padding: - const EdgeInsets.symmetric(vertical: 4, horizontal: 2), - children: [ - for (var entry in { - 'description': controller.descriptionValue.value, - 'status': controller.statusValue.value, - 'entry': controller.entryValue.value, - 'modified': controller.modifiedValue.value, - 'start': controller.startValue.value, - 'end': controller.endValue.value, - 'due': controller.dueValue.value, - 'wait': controller.waitValue.value, - 'until': controller.untilValue.value, - 'priority': controller.priorityValue?.value, - 'project': controller.projectValue?.value, - 'tags': controller.tagsValue?.value, - 'urgency': controller.urgencyValue.value, - }.entries) - AttributeWidget( - name: entry.key, - value: entry.value, - callback: (newValue) => - controller.setAttribute(entry.key, newValue), - waitKey: controller.waitKey, - dueKey: controller.dueKey, - untilKey: controller.untilKey, - priorityKey: controller.priorityKey, - ), - ], - ), - )), - floatingActionButton: controller.modify.changes.isEmpty - ? const SizedBox.shrink() - : FloatingActionButton( - backgroundColor: tColors.primaryTextColor, - foregroundColor: tColors.secondaryBackgroundColor, - splashColor: tColors.primaryTextColor, - heroTag: "btn1", - onPressed: () { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - scrollable: true, - title: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reviewChanges}:', - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - content: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Text( - controller.modify.changes.entries - .map((entry) => '${entry.key}:\n' - ' ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.oldChanges}: ${entry.value['old']}\n' - ' ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.newChanges}: ${entry.value['new']}') - .toList() - .join('\n'), - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - actions: [ - TextButton( - onPressed: () { - Get.back(); - }, - child: Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .cancel, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - TextButton( - onPressed: () { - controller.saveChanges(); - }, - child: Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .submit, - style: TextStyle( - color: tColors.primaryBackgroundColor, - ), - ), - ), - ], - ); - }, - ); - }, - child: const Icon(Icons.save), - )), - ); - } -} - -class AttributeWidget extends StatelessWidget { - const AttributeWidget({ - required this.name, - required this.value, - required this.callback, - required this.waitKey, - required this.dueKey, - required this.priorityKey, - required this.untilKey, - super.key, - }); - - final String name; - final dynamic value; - final void Function(dynamic) callback; - final GlobalKey waitKey; - final GlobalKey dueKey; - final GlobalKey untilKey; - final GlobalKey priorityKey; - - @override - Widget build(BuildContext context) { - var localValue = (value is DateTime) - ? DateFormat.yMEd().add_jms().format(value.toLocal()) - : ((value is BuiltList) ? (value).toBuilder() : value); - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - // Get the controller to check if the task is read-only - final DetailRouteController controller = Get.find(); - - // Always allow status to be edited, but respect read-only for other attributes - final bool isEditable = !controller.isReadOnly.value || name == 'status'; - - switch (name) { - case 'description': - return DescriptionWidget( - name: name, - value: localValue, - callback: callback, - isEditable: isEditable, - ); - case 'status': - return StatusWidget( - name: name, - value: localValue, - callback: callback, - ); - case 'start': - return StartWidget( - name: name, - value: localValue, - callback: callback, - isEditable: isEditable, - ); - case 'due': - return DateTimeWidget( - name: name, - value: localValue, - callback: callback, - globalKey: dueKey, - isEditable: isEditable, - ); - case 'wait': - return DateTimeWidget( - name: name, - value: localValue, - callback: callback, - globalKey: waitKey, - isEditable: isEditable, - ); - case 'until': - return DateTimeWidget( - name: name, - value: localValue, - callback: callback, - globalKey: untilKey, - isEditable: isEditable, - ); - case 'priority': - return PriorityWidget( - name: name, - value: localValue, - callback: callback, - globalKey: priorityKey, - isEditable: isEditable, - ); - case 'project': - return ProjectWidget( - name: name, - value: localValue, - callback: callback, - isEditable: isEditable, - ); - case 'tags': - return TagsWidget( - name: name, - value: localValue, - callback: callback, - isEditable: isEditable, - ); - default: - final Color? textColor = (isEditable && !['entry', 'modified', 'urgency'].contains(name)) - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor; - - return Card( - color: tColors.secondaryBackgroundColor, - child: ListTile( - textColor: tColors.primaryTextColor, - title: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - Text( - '$name:'.padRight(13), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: textColor, - ), - ), - Text( - localValue?.toString() ?? - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .notSelected, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: textColor, - ), - ), - ], - ), - ), - ), - ); - } - } -} diff --git a/lib/app/modules/detailRoute/views/priority_widget.dart b/lib/app/modules/detailRoute/views/priority_widget.dart deleted file mode 100644 index 9835ff3c..00000000 --- a/lib/app/modules/detailRoute/views/priority_widget.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class PriorityWidget extends StatelessWidget { - const PriorityWidget({ - required this.name, - required this.value, - required this.callback, - required this.globalKey, - this.isEditable = true, - super.key, - }); - - final String name; - final dynamic value; - final void Function(dynamic) callback; - final GlobalKey globalKey; - final bool isEditable; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - final Color? textColor = isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor; - - return Card( - key: globalKey, - color: tColors.secondaryBackgroundColor, - child: ListTile( - enabled: isEditable, - textColor: tColors.primaryTextColor, - title: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - RichText( - text: TextSpan( - children: [ - TextSpan( - text: '$name:'.padRight(13), - style: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: textColor, - ), - ), - TextSpan( - text: value ?? "not selected", - style: GoogleFonts.poppins( - fontSize: TaskWarriorFonts.fontSizeMedium, - color: textColor, - ), - ), - ], - ), - ), - ], - ), - ), - onTap: () { - switch (value) { - case 'H': - return callback('M'); - case 'M': - return callback('L'); - case 'L': - return callback(null); - default: - return callback('H'); - } - }, - ), - ); - } -} diff --git a/lib/app/modules/detailRoute/views/status_widget.dart b/lib/app/modules/detailRoute/views/status_widget.dart deleted file mode 100644 index ac75f5b6..00000000 --- a/lib/app/modules/detailRoute/views/status_widget.dart +++ /dev/null @@ -1,81 +0,0 @@ -// ignore_for_file: unnecessary_getters_setters - -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; - - -class StatusWidget extends StatelessWidget { - const StatusWidget( - {required this.name, - required this.value, - required this.callback, - super.key}); - - final String name; - final dynamic value; - final void Function(dynamic) callback; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return Card( - color: tColors.secondaryBackgroundColor, - child: ListTile( - textColor: tColors.primaryTextColor, - title: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - RichText( - text: TextSpan( - children: [ - TextSpan( - text: '$name:'.padRight(13), - style: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - TextSpan( - text: value ?? SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.notSelected, - style: GoogleFonts.poppins( - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - ], - ), - ), - ], - ), - ), - onTap: () { - if (kDebugMode) { - print(value); - } - switch (value) { - case 'pending': - return callback('completed'); - case 'completed': - return callback('deleted'); - case 'deleted': - return callback('pending'); - } - }, - ), - ); - } -} - -class StatusWidgetData { - //for accessing the value of the status widget from another class or another dart file - static dynamic _value; - static dynamic get value => _value; - static set value(dynamic newValue) => _value = newValue; -} diff --git a/lib/app/modules/detailRoute/views/tags_widget.dart b/lib/app/modules/detailRoute/views/tags_widget.dart deleted file mode 100644 index 57cf681e..00000000 --- a/lib/app/modules/detailRoute/views/tags_widget.dart +++ /dev/null @@ -1,275 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'package:flutter/material.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:loggy/loggy.dart'; -import 'package:taskwarrior/app/models/tag_meta_data.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/validate.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class TagsWidget extends StatelessWidget { - const TagsWidget({ - required this.name, - required this.value, - required this.callback, - this.isEditable = true, - super.key, - }); - - final String name; - final dynamic value; - final void Function(dynamic) callback; - final bool isEditable; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - final Color? textColor = isEditable - ? tColors.primaryTextColor - : tColors.primaryDisabledTextColor; - - return Card( - color: tColors.primaryBackgroundColor, - child: ListTile( - enabled: isEditable, - tileColor: tColors.secondaryBackgroundColor, - textColor: textColor, - title: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - Text( - '${'$name:'.padRight(13)}${(value as ListBuilder?)?.build()}', - style: TextStyle( - color: textColor, - ), - ), - ], - ), - ), - onTap: () => Get.to( - TagsRoute( - value: value, - callback: callback, - ), - ), - ), - ); - } -} - -class TagsRoute extends StatefulWidget { - const TagsRoute({required this.value, required this.callback, super.key}); - - final ListBuilder? value; - final void Function(ListBuilder?) callback; - - @override - TagsRouteState createState() => TagsRouteState(); -} - -class TagsRouteState extends State { - Map? _pendingTags; - ListBuilder? draftTags; - - void _addTag(String tag) { - if (tag.isNotEmpty) { - // Add this condition to ensure the tag is not empty - if (draftTags == null) { - draftTags = ListBuilder([tag]); - } else { - draftTags!.add(tag); - } - widget.callback(draftTags); - setState(() {}); - } - } - - void _removeTag(String tag) { - if (draftTags!.length == 1) { - draftTags!.remove(tag); - draftTags = null; - } else { - draftTags!.remove(tag); - } - widget.callback(draftTags ?? ListBuilder([])); - setState(() {}); - } - - @override - void initState() { - super.initState(); - draftTags = widget.value; - } - - @override - void didChangeDependencies() { - super.didChangeDependencies(); - _initialize(); - } - - Future _initialize() async { - _pendingTags = Get.find().pendingTags; - setState(() {}); - } - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Scaffold( - appBar: AppBar( - backgroundColor: TaskWarriorColors.kprimaryBackgroundColor, - title: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .tags, - style: GoogleFonts.poppins(color: TaskWarriorColors.white), - ), - leading: BackButton( - color: TaskWarriorColors.white, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - body: SafeArea( - child: Padding( - padding: const EdgeInsets.all(4), - child: SingleChildScrollView( - padding: - const EdgeInsets.only(left: 10, top: 10, right: 10, bottom: 0), - child: Wrap( - spacing: 8, - runSpacing: 4, - children: [ - if (draftTags != null) - for (var tag in draftTags!.build()) - FilterChip( - backgroundColor: TaskWarriorColors.lightGrey, - onSelected: (_) => _removeTag(tag), - label: Text( - '+$tag ${_pendingTags?[tag]?.frequency ?? 0}', - ), - ), - if (draftTags == null) - Padding( - padding: const EdgeInsets.fromLTRB(15, 18, 0, 10), - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage, - ).sentences.addedTagsWillAppearHere, - style: GoogleFonts.poppins( - fontStyle: FontStyle.italic, - color: tColors.primaryTextColor), - ), - ), - Divider( - color: tColors.dividerColor, - ), - if (_pendingTags != null) - for (var tag in _pendingTags!.entries.where((tag) => - !(draftTags?.build().contains(tag.key) ?? false))) - FilterChip( - backgroundColor: TaskWarriorColors.grey, - onSelected: (_) => _addTag(tag.key), - label: Text( - '${tag.key} ${tag.value.frequency}', - ), - ), - ], - ), - ), - ), - ), - floatingActionButton: FloatingActionButton( - backgroundColor: tColors.primaryTextColor, - foregroundColor: tColors.secondaryBackgroundColor, - splashColor: tColors.primaryTextColor, - heroTag: "btn4", - onPressed: () { - final formKey = GlobalKey(); - var controller = TextEditingController(); - showDialog( - context: context, - builder: (context) => Utils.showAlertDialog( - scrollable: true, - title: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage, - ).sentences.addTag, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - content: Form( - key: formKey, - child: TextFormField( - style: TextStyle( - color: tColors.primaryTextColor, - ), - validator: (value) { - if (value != null) { - if (value.isNotEmpty && value.contains(" ")) { - return "Tags cannot contain spaces"; - } - } - return null; - }, - autofocus: true, - controller: controller, - ), - ), - actions: [ - TextButton( - onPressed: () { - // Navigator.of(context).pop(); - Get.back(); - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage, - ).sentences.cancel, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - TextButton( - onPressed: () { - if (formKey.currentState!.validate()) { - try { - validateTaskTags(controller.text); - _addTag(controller.text); - // Navigator.of(context).pop(); - Get.back(); - } on FormatException catch (e, trace) { - logError(e, trace); - } - } - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage, - ).sentences.submit, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - ], - ), - ); - }, - child: const Icon(Icons.add), - ), - ); - } -} diff --git a/lib/app/modules/home/bindings/home_binding.dart b/lib/app/modules/home/bindings/home_binding.dart deleted file mode 100644 index 4d78d594..00000000 --- a/lib/app/modules/home/bindings/home_binding.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; - -class HomeBinding extends Bindings { - @override - void dependencies() { - Get.put( - HomeController(), - ); - } -} diff --git a/lib/app/modules/home/controllers/home_controller.dart b/lib/app/modules/home/controllers/home_controller.dart deleted file mode 100644 index 715e1956..00000000 --- a/lib/app/modules/home/controllers/home_controller.dart +++ /dev/null @@ -1,749 +0,0 @@ -// ignore_for_file: use_build_context_synchronously, unrelated_type_equality_checks - -import 'dart:collection'; -import 'dart:io'; - -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:home_widget/home_widget.dart'; -import 'package:loggy/loggy.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/models/filters.dart'; - -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/models/storage.dart'; -import 'package:taskwarrior/app/models/storage/client.dart'; -import 'package:taskwarrior/app/models/tag_meta_data.dart'; -import 'package:taskwarrior/app/modules/home/controllers/widget.controller.dart'; -import 'package:taskwarrior/app/modules/home/views/add_task_bottom_sheet_new.dart'; -import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; -import 'package:taskwarrior/app/services/tag_filter.dart'; -import 'package:taskwarrior/app/tour/filter_drawer_tour.dart'; -import 'package:taskwarrior/app/tour/home_page_tour.dart'; -import 'package:taskwarrior/app/tour/task_swipe_tour.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; -import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/comparator.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/projects.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/query.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/tags.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; -import 'package:taskwarrior/app/v3/db/update.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; -import 'package:taskwarrior/app/v3/net/fetch.dart'; -import 'package:textfield_tags/textfield_tags.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class HomeController extends GetxController { - final SplashController splashController = Get.find(); - late Storage storage; - final RxBool pendingFilter = false.obs; - final RxBool waitingFilter = false.obs; - final RxString projectFilter = ''.obs; - final RxBool tagUnion = false.obs; - final RxString selectedSort = ''.obs; - final RxSet selectedTags = {}.obs; - final RxList queriedTasks = [].obs; - final RxList searchedTasks = [].obs; - final RxList selectedDates = List.filled(4, null).obs; - final RxMap pendingTags = {}.obs; - final RxMap projects = {}.obs; - final RxBool sortHeaderVisible = false.obs; - final RxBool searchVisible = false.obs; - final TextEditingController searchController = TextEditingController(); - final StringTagController stringTagController = StringTagController(); - late RxBool serverCertExists; - final Rx selectedLanguage = SupportedLanguage.english.obs; - final ScrollController scrollController = ScrollController(); - final RxBool showbtn = false.obs; - late TaskDatabase taskdb; - var tasks = [].obs; - final RxBool isRefreshing = false.obs; - - @override - void onInit() { - super.onInit(); - storage = Storage( - Directory( - '${splashController.baseDirectory.value.path}/profiles/${splashController.currentProfile.value}', - ), - ); - serverCertExists = RxBool(storage.guiPemFiles.serverCertExists()); - addListenerToScrollController(); - _profileSet(); - loadDelayTask(); - initLanguageAndDarkMode(); - taskdb = TaskDatabase(); - taskdb.open(); - getUniqueProjects(); - _loadTaskChampion(); - if (Platform.isAndroid) { - handleHomeWidgetClicked(); - } - fetchTasksFromDB(); - everAll([ - pendingFilter, - waitingFilter, - projectFilter, - tagUnion, - selectedSort, - selectedTags, - ], (_) { - if (Platform.isAndroid) { - WidgetController widgetController = Get.put(WidgetController()); - widgetController.fetchAllData(); - - widgetController.update(); - } - }); - } - - Future> getUniqueProjects() async { - var taskDatabase = TaskDatabase(); - List uniqueProjects = await taskDatabase.fetchUniqueProjects(); - debugPrint('Unique projects: $uniqueProjects'); - return uniqueProjects; - } - - Future deleteAllTasksInDB() async { - var taskDatabase = TaskDatabase(); - await taskDatabase.deleteAllTasksInDB(); - debugPrint('Deleted all tasks from db'); - } - - Future refreshTasks(String clientId, String encryptionSecret) async { - TaskDatabase taskDatabase = TaskDatabase(); - await taskDatabase.open(); - List tasksFromServer = - await fetchTasks(clientId, encryptionSecret); - await updateTasksInDatabase(tasksFromServer); - List fetchedTasks = await taskDatabase.fetchTasksFromDatabase(); - tasks.value = fetchedTasks; - } - - Future fetchTasksFromDB() async { - TaskDatabase taskDatabase = TaskDatabase(); - await taskDatabase.open(); - List fetchedTasks = await taskDatabase.fetchTasksFromDatabase(); - tasks.value = fetchedTasks; - } - - Future _loadTaskChampion() async { - final SharedPreferences prefs = await SharedPreferences.getInstance(); - taskchampion.value = prefs.getBool('settings_taskc') ?? false; - } - - void addListenerToScrollController() { - scrollController.addListener(() { - //scroll listener - double showoffset = - 10.0; //Back to top botton will show on scroll offset 10.0 - - if (scrollController.offset > showoffset) { - showbtn.value = true; - } else { - showbtn.value = false; - } - }); - } - - void _profileSet() { - pendingFilter.value = Query(storage.tabs.tab()).getPendingFilter(); - if (!Query(storage.tabs.tab()).getWaitingFilter()) { - waitingFilter.value = Query(storage.tabs.tab()).getWaitingFilter(); - } else { - Query(storage.tabs.tab()).toggleWaitingFilter(); - waitingFilter.value = Query(storage.tabs.tab()).getWaitingFilter(); - } - projectFilter.value = Query(storage.tabs.tab()).projectFilter(); - tagUnion.value = Query(storage.tabs.tab()).tagUnion(); - selectedSort.value = Query(storage.tabs.tab()).getSelectedSort(); - selectedTags.addAll(Query(storage.tabs.tab()).getSelectedTags()); - - _refreshTasks(); - pendingTags.value = _pendingTags(); - projects.value = _projects(); - if (searchVisible.value) { - toggleSearch(); - } - } - - void _refreshTasks() { - if (pendingFilter.value) { - queriedTasks.value = storage.data - .pendingData() - .where((task) => task.status == 'pending') - .toList(); - } else { - queriedTasks.value = storage.data.completedData(); - } - - if (waitingFilter.value) { - var currentTime = DateTime.now(); - queriedTasks.value = queriedTasks - .where((task) => task.wait != null && task.wait!.isAfter(currentTime)) - .toList(); - } - - if (projectFilter.value.isNotEmpty) { - queriedTasks.value = queriedTasks.where((task) { - if (task.project == null) { - return false; - } else { - return task.project!.startsWith(projectFilter.value); - } - }).toList(); - } - - queriedTasks.value = queriedTasks.where((task) { - var tags = task.tags?.toSet() ?? {}; - if (tagUnion.value) { - if (selectedTags.isEmpty) { - return true; - } - return selectedTags.any((tag) => (tag.startsWith('+')) - ? tags.contains(tag.substring(1)) - : !tags.contains(tag.substring(1))); - } else { - return selectedTags.every((tag) => (tag.startsWith('+')) - ? tags.contains(tag.substring(1)) - : !tags.contains(tag.substring(1))); - } - }).toList(); - - var sortColumn = - selectedSort.value.substring(0, selectedSort.value.length - 1); - var ascending = selectedSort.value.endsWith('+'); - queriedTasks.sort((a, b) { - int result; - if (sortColumn == 'id') { - result = a.id!.compareTo(b.id!); - } else { - result = compareTasks(sortColumn)(a, b); - } - return ascending ? result : -result; - }); - - searchedTasks.assignAll(queriedTasks); - var searchTerm = searchController.text; - if (searchVisible.value) { - searchedTasks.value = searchedTasks - .where((task) => - task.description.contains(searchTerm) || - (task.annotations?.asList() ?? []).any( - (annotation) => annotation.description.contains(searchTerm))) - .toList(); - } - pendingTags.value = _pendingTags(); - projects.value = _projects(); - } - - Map _pendingTags() { - var frequency = tagFrequencies(storage.data.pendingData()); - var modified = tagsLastModified(storage.data.pendingData()); - var setOfTags = tagSet(storage.data.pendingData()); - - return SplayTreeMap.of({ - for (var tag in setOfTags) - tag: TagMetadata( - frequency: frequency[tag] ?? 0, - lastModified: modified[tag]!, - selected: selectedTags.contains('+$tag'), - ), - }); - } - - Map _projects() { - var frequencies = {}; - for (var task in storage.data.pendingData()) { - if (task.project != null) { - if (frequencies.containsKey(task.project)) { - frequencies[task.project!] = (frequencies[task.project] ?? 0) + 1; - } else { - frequencies[task.project!] = 1; - } - } - } - return SplayTreeMap.of(sparseDecoratedProjectTree(frequencies)); - } - - void togglePendingFilter() { - Query(storage.tabs.tab()).togglePendingFilter(); - pendingFilter.value = Query(storage.tabs.tab()).getPendingFilter(); - _refreshTasks(); - } - - void toggleWaitingFilter() { - Query(storage.tabs.tab()).toggleWaitingFilter(); - waitingFilter.value = Query(storage.tabs.tab()).getWaitingFilter(); - _refreshTasks(); - } - - void toggleProjectFilter(String project) { - Query(storage.tabs.tab()).toggleProjectFilter(project); - projectFilter.value = Query(storage.tabs.tab()).projectFilter(); - _refreshTasks(); - } - - void toggleTagUnion() { - Query(storage.tabs.tab()).toggleTagUnion(); - tagUnion.value = Query(storage.tabs.tab()).tagUnion(); - _refreshTasks(); - } - - void selectSort(String sort) { - Query(storage.tabs.tab()).setSelectedSort(sort); - selectedSort.value = Query(storage.tabs.tab()).getSelectedSort(); - _refreshTasks(); - } - - void toggleTagFilter(String tag) { - if (selectedTags.contains('+$tag')) { - selectedTags - ..remove('+$tag') - ..add('-$tag'); - } else if (selectedTags.contains('-$tag')) { - selectedTags.remove('-$tag'); - } else { - selectedTags.add('+$tag'); - } - Query(storage.tabs.tab()).toggleTagFilter(tag); - selectedTags.addAll(Query(storage.tabs.tab()).getSelectedTags()); - _refreshTasks(); - } - - Task getTask(String uuid) { - return storage.data.getTask(uuid); - } - - void mergeTask(Task task) { - storage.data.mergeTask(task); - - _refreshTasks(); - } - - Future synchronize(BuildContext context, bool isDialogNeeded) async { - try { - final connectivityResult = await Connectivity().checkConnectivity(); - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - if (connectivityResult == ConnectivityResult.none) { - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - 'You are not connected to the internet. Please check your network connection.', - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2))); - } else { - if (isDialogNeeded) { - showDialog( - context: context, - barrierDismissible: false, - builder: (BuildContext context) { - return Dialog( - elevation: 5, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - child: Container( - padding: const EdgeInsets.all(16.0), - child: const Column( - mainAxisSize: MainAxisSize.min, - children: [ - CircularProgressIndicator(), - SizedBox(height: 16.0), - Text( - "Syncing", - // style: GoogleFonts.poppins( - // fontSize: TaskWarriorFonts.fontSizeLarge, - // fontWeight: TaskWarriorFonts.bold, - // ), - ), - SizedBox(height: 8.0), - Text( - "Please wait...", - // style: GoogleFonts.poppins( - // fontSize: TaskWarriorFonts.fontSizeSmall, - // fontWeight: TaskWarriorFonts.regular, - // ), - ), - ], - ), - ), - ); - }, - ); - } - - var header = await storage.home.synchronize(await client()); - _refreshTasks(); - pendingTags.value = _pendingTags(); - projects.value = _projects(); - - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - '${header['code']}: ${header['status']}', - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2))); - - if (isDialogNeeded) { - Get.back(closeOverlays: true); - return; - } - } - } catch (e, trace) { - if (isDialogNeeded) { - Get.back(closeOverlays: true); - } - logError(e, trace); - } - } - - void toggleSortHeader() { - sortHeaderVisible.value = !sortHeaderVisible.value; - } - - void toggleSearch() { - searchVisible.value = !searchVisible.value; - if (!searchVisible.value) { - searchedTasks.assignAll(queriedTasks); - searchController.text = ''; - } - } - - void search(String term) { - searchedTasks.assignAll( - queriedTasks - .where( - (task) => - task.description.toLowerCase().contains(term.toLowerCase()), - ) - .toList(), - ); - } - - void setInitialTabIndex(int index) { - storage.tabs.setInitialTabIndex(index); - pendingFilter.value = Query(storage.tabs.tab()).getPendingFilter(); - waitingFilter.value = Query(storage.tabs.tab()).getWaitingFilter(); - selectedSort.value = Query(storage.tabs.tab()).getSelectedSort(); - selectedTags.addAll(Query(storage.tabs.tab()).getSelectedTags()); - projectFilter.value = Query(storage.tabs.tab()).projectFilter(); - _refreshTasks(); - } - - void addTab() { - storage.tabs.addTab(); - } - - List tabUuids() { - return storage.tabs.tabUuids(); - } - - int initialTabIndex() { - return storage.tabs.initialTabIndex(); - } - - void removeTab(int index) { - storage.tabs.removeTab(index); - pendingFilter.value = Query(storage.tabs.tab()).getPendingFilter(); - waitingFilter.value = Query(storage.tabs.tab()).getWaitingFilter(); - selectedSort.value = Query(storage.tabs.tab()).getSelectedSort(); - selectedTags.addAll(Query(storage.tabs.tab()).getSelectedTags()); - _refreshTasks(); - } - - void renameTab({ - required String tab, - required String name, - }) { - storage.tabs.renameTab(tab: tab, name: name); - } - - String? tabAlias(String tabUuid) { - return storage.tabs.alias(tabUuid); - } - - RxBool isSyncNeeded = false.obs; - - void checkForSync(BuildContext context) { - if (!isSyncNeeded.value) { - isNeededtoSyncOnStart(context); - isSyncNeeded.value = true; - } - } - - isNeededtoSyncOnStart(BuildContext context) async { - final SharedPreferences prefs = await SharedPreferences.getInstance(); - bool? value; - value = prefs.getBool('sync-onStart') ?? false; - String? clientId, encryptionSecret; - clientId = await CredentialsStorage.getClientId(); - encryptionSecret = await CredentialsStorage.getEncryptionSecret(); - if (value) { - synchronize(context, false); - refreshTasks(clientId!, encryptionSecret!); - } else {} - } - - RxBool syncOnStart = false.obs; - RxBool syncOnTaskCreate = false.obs; - RxBool delaytask = false.obs; - RxBool change24hr = false.obs; - RxBool taskchampion = false.obs; - - // dialogue box - final formKey = GlobalKey(); - final namecontroller = TextEditingController(); - final projectcontroller = TextEditingController(); - var due = Rxn(); - RxString dueString = ''.obs; - final priorityList = ['L', 'X', 'M', 'H']; - final priorityColors = [ - TaskWarriorColors.green, - TaskWarriorColors.grey, - TaskWarriorColors.yellow, - TaskWarriorColors.red, - ]; - RxString priority = 'X'.obs; - - final tagcontroller = TextEditingController(); - RxList tags = [].obs; - RxBool inThePast = false.obs; - - Filters getFilters() { - var selectedTagsMap = { - for (var tag in selectedTags) tag.substring(1): tag, - }; - - var keys = (pendingTags.keys.toSet()..addAll(selectedTagsMap.keys)).toList() - ..sort(); - - var tags = { - for (var tag in keys) - tag: TagFilterMetadata( - display: - '${selectedTagsMap[tag] ?? tag} ${pendingTags[tag]?.frequency ?? 0}', - selected: selectedTagsMap.containsKey(tag), - ), - }; - - var tagFilters = TagFilters( - tagUnion: tagUnion.value, - toggleTagUnion: toggleTagUnion, - tags: tags, - toggleTagFilter: toggleTagFilter, - ); - var filters = Filters( - pendingFilter: pendingFilter.value, - waitingFilter: waitingFilter.value, - togglePendingFilter: togglePendingFilter, - toggleWaitingFilter: toggleWaitingFilter, - projects: projects, - projectFilter: projectFilter.value, - toggleProjectFilter: toggleProjectFilter, - tagFilters: tagFilters, - ); - return filters; - } - - // select profile - void refreshTaskWithNewProfile() { - storage = Storage( - Directory( - '${splashController.baseDirectory.value.path}/profiles/${splashController.currentProfile.value}', - ), - ); - _refreshTasks(); - } - - RxBool useDelayTask = false.obs; - - Future loadDelayTask() async { - final SharedPreferences prefs = await SharedPreferences.getInstance(); - useDelayTask.value = prefs.getBool('delaytask') ?? false; - } - - RxBool isDarkModeOn = false.obs; - - void initLanguageAndDarkMode() { - isDarkModeOn.value = AppSettings.isDarkMode; - selectedLanguage.value = AppSettings.selectedLanguage; - HomeWidget.saveWidgetData( - "themeMode", AppSettings.isDarkMode ? "dark" : "light"); - HomeWidget.updateWidget(androidName: "TaskWarriorWidgetProvider"); - // print("called and value is${isDarkModeOn.value}"); - } - - final addKey = GlobalKey(); - final searchKey1 = GlobalKey(); - final searchKey2 = GlobalKey(); - final filterKey = GlobalKey(); - final menuKey = GlobalKey(); - final refreshKey = GlobalKey(); - - late TutorialCoachMark tutorialCoachMark; - - void initInAppTour() { - tutorialCoachMark = TutorialCoachMark( - targets: addTargetsPage( - addKey: addKey, - searchKey: searchKey1, - filterKey: filterKey, - menuKey: menuKey, - refreshKey: refreshKey, - ), - colorShadow: TaskWarriorColors.black, - paddingFocus: 10, - opacityShadow: 0.8, - hideSkip: true, - onFinish: () { - SaveTourStatus.saveInAppTourStatus(true); - }); - } - - void showInAppTour(BuildContext context) { - Future.delayed( - const Duration(milliseconds: 500), - () { - SaveTourStatus.getInAppTourStatus().then((value) => { - if (value == false) - { - tutorialCoachMark.show(context: context), - } - else - { - // ignore: avoid_print - debugPrint('User has seen this page'), - // User has seen this page - } - }); - }, - ); - } - - final GlobalKey statusKey = GlobalKey(); - final GlobalKey projectsKey = GlobalKey(); - final GlobalKey projectsKeyTaskc = GlobalKey(); - final GlobalKey filterTagKey = GlobalKey(); - final GlobalKey sortByKey = GlobalKey(); - - void initFilterDrawerTour() { - tutorialCoachMark = TutorialCoachMark( - targets: filterDrawer( - statusKey: statusKey, - projectsKey: projectsKey, - projectsKeyTaskc: projectsKeyTaskc, - filterTagKey: filterTagKey, - sortByKey: sortByKey, - ), - colorShadow: TaskWarriorColors.black, - paddingFocus: 10, - opacityShadow: 1.00, - hideSkip: true, - onFinish: () { - SaveTourStatus.saveFilterTourStatus(true); - }, - ); - } - - void showFilterDrawerTour(BuildContext context) { - Future.delayed( - const Duration(milliseconds: 500), - () { - SaveTourStatus.getFilterTourStatus().then((value) => { - if (value == false) - { - tutorialCoachMark.show(context: context), - } - else - { - // ignore: avoid_print - print('User has seen this page'), - } - }); - }, - ); - } - - final taskItemKey = GlobalKey(); - - void initTaskSwipeTutorial() { - tutorialCoachMark = TutorialCoachMark( - targets: addTaskSwipeTutorialTargets(taskItemKey: taskItemKey), - colorShadow: TaskWarriorColors.black, - paddingFocus: 10, - opacityShadow: 1.00, - hideSkip: true, - onFinish: () { - SaveTourStatus.saveTaskSwipeTutorialStatus(true); - }, - ); - } - - void showTaskSwipeTutorial(BuildContext context) { - SaveTourStatus.getTaskSwipeTutorialStatus().then((value) { - print("value is $value"); - print("tasks is ${tasks.isNotEmpty}"); - if (value == false) { - initTaskSwipeTutorial(); - tutorialCoachMark.show(context: context); - } else { - debugPrint('User has already seen the task swipe tutorial'); - } - }); - } - - late RxString uuid = "".obs; - late RxBool isHomeWidgetTaskTapped = false.obs; - - void handleHomeWidgetClicked() async { - Uri? uri = await HomeWidget.initiallyLaunchedFromHomeWidget(); - if (uri != null) { - if (uri.host == "cardclicked") { - if (uri.queryParameters["uuid"] != null) { - uuid.value = uri.queryParameters["uuid"] as String; - isHomeWidgetTaskTapped.value = true; - Future.delayed(Duration.zero, () { - Get.toNamed(Routes.DETAIL_ROUTE, arguments: ["uuid", uuid.value]); - }); - } - } else if (uri.host == "addclicked") { - showAddDialogAfterWidgetClick(); - } - } - HomeWidget.widgetClicked.listen((uri) async { - if (uri != null) { - if (uri.host == "cardclicked") { - if (uri.queryParameters["uuid"] != null) { - uuid.value = uri.queryParameters["uuid"] as String; - isHomeWidgetTaskTapped.value = true; - } - debugPrint('uuid is $uuid'); - Get.toNamed(Routes.DETAIL_ROUTE, arguments: ["uuid", uuid.value]); - } else if (uri.host == "addclicked") { - showAddDialogAfterWidgetClick(); - } - } - }); - } - - void showAddDialogAfterWidgetClick() { - Widget showDialog = Material( - child: AddTaskBottomSheet( - homeController: this, forTaskC: taskchampion.value)); - Get.dialog(showDialog); - } -} diff --git a/lib/app/modules/home/controllers/widget.controller.dart b/lib/app/modules/home/controllers/widget.controller.dart deleted file mode 100644 index 5c17c844..00000000 --- a/lib/app/modules/home/controllers/widget.controller.dart +++ /dev/null @@ -1,154 +0,0 @@ -// ignore_for_file: file_names - -import 'dart:convert'; -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:get/get.dart'; -import 'package:home_widget/home_widget.dart'; -import 'package:syncfusion_flutter_charts/charts.dart'; -import 'package:taskwarrior/app/models/filters.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/models/storage.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/urgency.dart'; -// import 'package:taskwarrior/widgets/taskfunctions/datetime_differences.dart'; - -class WidgetController extends GetxController { - final HomeController storageWidget = Get.find(); - late Storage storage; - late final Filters filters; // Use RxList for observable list - List dailyBurnDown = []; - Directory? baseDirectory; - RxList allData = [].obs; // Use RxList for observable list - bool stopTraver = false; - - void fetchAllData() async { - if (Platform.isAndroid || Platform.isIOS) { - // storageWidget = StorageWidget.of(context!); // Use Get.context from GetX - // var currentProfile = ProfilesWidget.of(context!).currentProfile; - var currentProfile = Get.find().currentProfile.value; - baseDirectory = Get.find().baseDirectory(); - storage = - Storage(Directory('${baseDirectory!.path}/profiles/$currentProfile')); - allData.assignAll(storage.data.allData()); - sendAndUpdate(); - } - } - - Future sendAndUpdate() async { - await sendData(); - await updateWidget(); - } - - Future sendData() async { - final HomeController taskController = Get.find(); - int lengthBeforeFilters = allData.length; - List tasks = allData; - debugPrint( - 'Tasks: ${tasks.length}, ${taskController.projectFilter}, ${taskController.pendingFilter.value}, ${taskController.selectedSort.value}'); - if (taskController.projectFilter.value != 'All Projects' && - taskController.projectFilter.toString().isNotEmpty) { - tasks = tasks - .where((task) => task.project == taskController.projectFilter.value) - .toList(); - } else { - tasks = List.from(tasks); - } - - // Apply other filters and sorting - tasks.sort((a, b) => a.id!.compareTo(b.id!)); - - tasks = tasks.where((task) { - if (taskController.pendingFilter.value) { - return task.status == 'pending'; - } else { - return task.status == 'completed'; - } - }).toList(); - - tasks = tasks.where((task) { - var tags = task.tags?.toSet() ?? {}; - if (taskController.tagUnion.value) { - if (taskController.selectedTags.isEmpty) { - return true; - } - return taskController.selectedTags.any((tag) => (tag.startsWith('+')) - ? tags.contains(tag.substring(1)) - : !tags.contains(tag.substring(1))); - } else { - return taskController.selectedTags.every((tag) => (tag.startsWith('+')) - ? tags.contains(tag.substring(1)) - : !tags.contains(tag.substring(1))); - } - }).toList(); - - // Apply sorting based on selectedSort - tasks.sort((a, b) { - switch (taskController.selectedSort.value) { - case 'Created+': - return a.entry.compareTo(b.entry); - case 'Created-': - return b.entry.compareTo(a.entry); - case 'Modified+': - return a.modified!.compareTo(b.modified!); - case 'Modified-': - return b.modified!.compareTo(a.modified!); - case 'Due till+': - return a.due!.compareTo(b.due!); - case 'Due till-': - return b.due!.compareTo(a.due!); - case 'Priority-': - return a.priority!.compareTo(b.priority!); - case 'Priority+': - return b.priority!.compareTo(a.priority!); - case 'Project+': - return a.project!.compareTo(b.project!); - case 'Project-': - return b.project!.compareTo(a.project!); - case 'Urgency-': - return b.urgency!.compareTo(a.urgency!); - case 'Urgency+': - return a.urgency!.compareTo(b.urgency!); - default: - return 0; - } - }); - List> l = []; - for (var task in tasks) { - l.add({ - "description": task.description, - "urgency": 'urgencyLevel : ${urgency(task)}', - "uuid": task.uuid, - "priority": task.priority ?? "N" - }); - } - if (l.isEmpty && lengthBeforeFilters > 0) { - l.add({ - "description": "No tasks found because of filter", - "urgency": "urgencyLevel : 0", - "priority": "2", - "uuid": "NO_TASK" - }); - } else if (l.isEmpty && lengthBeforeFilters == 0) { - l.add({ - "description": "No tasks found", - "urgency": "urgencyLevel : 0", - "priority": "1", - "uuid": "NO_TASK" - }); - } - await HomeWidget.saveWidgetData("tasks", jsonEncode(l)); - } - - Future updateWidget() async { - try { - return HomeWidget.updateWidget( - name: 'TaskWarriorWidgetProvider', iOSName: 'HomeWidgetExample'); - } on PlatformException catch (exception) { - debugPrint('Error Updating Widget. $exception'); - } - } -} diff --git a/lib/app/modules/home/views/add_task_bottom_sheet_new.dart b/lib/app/modules/home/views/add_task_bottom_sheet_new.dart deleted file mode 100644 index 6449d389..00000000 --- a/lib/app/modules/home/views/add_task_bottom_sheet_new.dart +++ /dev/null @@ -1,435 +0,0 @@ -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/modules/home/controllers/widget.controller.dart'; -import 'package:taskwarrior/app/utils/add_task_dialogue/date_picker_input.dart'; -import 'package:taskwarrior/app/utils/add_task_dialogue/tags_input.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/add_task_dialog_utils.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/tags.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/taskparser.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; - -class AddTaskBottomSheet extends StatelessWidget { - final HomeController homeController; - final bool forTaskC; - const AddTaskBottomSheet( - {required this.homeController, super.key, this.forTaskC = false}); - - @override - Widget build(BuildContext context) { - const padding = 12.0; - return Padding( - padding: EdgeInsets.only( - bottom: MediaQuery.of(context).viewInsets.bottom, - ), - child: Form( - key: homeController.formKey, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.all(padding), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - TextButton( - onPressed: () { - Get.back(); - }, - child: Text(SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .cancel), - ), - Text( - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .addTaskTitle, - style: const TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - ), - ), - TextButton( - onPressed: () { - if (forTaskC) { - onSaveButtonClickedTaskC(context); - } else { - onSaveButtonClicked(context); - } - }, - child: Text(SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .save), - ), - ], - ), - ), - Flexible( - child: SingleChildScrollView( - child: Column( - children: [ - Padding( - padding: const EdgeInsets.all(padding), - child: TextFormField( - controller: homeController.namecontroller, - validator: (value) => value!.isEmpty - ? SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .descriprtionCannotBeEmpty - : null, - decoration: InputDecoration( - labelText: SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .enterTaskDescription, - border: OutlineInputBorder(), - ), - ), - ), - Padding( - padding: const EdgeInsets.all(padding), - child: buildProjectInput(context)), - Padding( - padding: const EdgeInsets.only( - left: padding, right: padding, top: padding), - child: buildDatePicker(context), - ), - Padding( - padding: const EdgeInsets.all(padding), - child: buildPriority(context), - ), - Padding( - padding: const EdgeInsets.all(padding), - child: buildTagsInput(context), - ), - const Padding(padding: EdgeInsets.all(20)), - ], - ), - ), - ), - ], - ), - ), - ); - } - - Widget buildProjectInput(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Autocomplete( - optionsBuilder: (textEditingValue) async { - Iterable projects = getProjects(); - return projects.where((String project) => - project - .toLowerCase() - .contains(textEditingValue.text.toLowerCase()) && - project != ''); - }, - optionsViewBuilder: (context, onAutoCompleteSelect, options) { - return Align( - alignment: Alignment.topLeft, - child: Material( - elevation: 4.0, - child: Container( - width: MediaQuery.of(context).size.width - 12 * 2, - decoration: BoxDecoration( - color: tColors.primaryBackgroundColor, - borderRadius: BorderRadius.circular(4.0), - ), - child: ListView.separated( - shrinkWrap: true, - padding: const EdgeInsets.symmetric(vertical: 8), - itemCount: options.length, - separatorBuilder: (context, i) => - Divider(height: 1, color: tColors.secondaryBackgroundColor), - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () { - onAutoCompleteSelect(options.elementAt(index)); - }, - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16.0, vertical: 12.0), - child: Text( - options.elementAt(index), - style: const TextStyle(fontSize: 16), - ), - ), - ); - }, - ), - ), - ), - ); - }, - fieldViewBuilder: - (context, textEditingController, focusNode, onFieldSubmitted) => - TextFormField( - controller: textEditingController, - decoration: InputDecoration( - labelText: SentenceManager( - currentLanguage: homeController.selectedLanguage.value) - .sentences - .enterProject, - border: OutlineInputBorder(), - ), - onChanged: (value) => homeController.projectcontroller.text = value, - focusNode: focusNode, - validator: (value) { - if (value != null && value.contains(" ")) { - return SentenceManager( - currentLanguage: homeController.selectedLanguage.value) - .sentences - .canNotHaveWhiteSpace; - } - return null; - }, - ), - ); - } - - Widget buildTagsInput(BuildContext context) => AddTaskTagsInput( - suggestions: tagSet(homeController.storage.data.allData()), - onTagsChanges: (p0) => homeController.tags.value = p0, - ); - - Widget buildDatePicker(BuildContext context) => AddTaskDatePickerInput( - onDateChanges: (List p0) { - homeController.selectedDates.value = p0; - }, - onlyDueDate: forTaskC, - ); - - Widget buildPriority(BuildContext context) => Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Obx( - () => TextField( - readOnly: true, // Make the field read-only - controller: TextEditingController( - text: getPriorityText(homeController - .priority.value), // Display the selected priority - ), - decoration: InputDecoration( - labelText: SentenceManager( - currentLanguage: homeController.selectedLanguage.value) - .sentences - .priority, - border: const OutlineInputBorder(), - suffixIcon: Padding( - padding: const EdgeInsets.only(right: 8.0), - child: GestureDetector( - onTap: () { - debugPrint("Open priority selection."); - }, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - for (int i = 0; - i < homeController.priorityList.length; - i++) - GestureDetector( - onTap: () { - homeController.priority.value = - homeController.priorityList[i]; - debugPrint(homeController.priority.value); - }, - child: AnimatedContainer( - margin: const EdgeInsets.only(right: 5), - padding: const EdgeInsets.symmetric( - horizontal: 10, vertical: 5), - duration: const Duration(milliseconds: 200), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: homeController.priority.value == - homeController.priorityList[i] - ? AppSettings.isDarkMode - ? TaskWarriorColors - .kLightPrimaryBackgroundColor - : TaskWarriorColors - .kprimaryBackgroundColor - : AppSettings.isDarkMode - ? TaskWarriorColors - .kprimaryBackgroundColor - : TaskWarriorColors - .kLightPrimaryBackgroundColor, - ), - ), - child: Center( - child: Text( - homeController.priorityList[i], - style: GoogleFonts.poppins( - fontWeight: FontWeight.bold, - fontSize: 16, - color: homeController.priorityColors[i], - ), - ), - ), - ), - ), - ], - ), - ), - ), - ), - ), - ) - ], - ); - - Set getProjects() { - Iterable tasks = homeController.storage.data.allData(); - return tasks - .where((task) => task.project != null) - .fold({}, (aggregate, task) => aggregate..add(task.project!)); - } - - void onSaveButtonClickedTaskC(BuildContext context) async { - if (homeController.formKey.currentState!.validate()) { - debugPrint("tags ${homeController.tags}"); - var task = TaskForC( - description: homeController.namecontroller.text, - status: 'pending', - priority: homeController.priority.value, - entry: DateTime.now().toIso8601String(), - id: 0, - project: homeController.projectcontroller.text != "" - ? homeController.projectcontroller.text - : null, - uuid: '', - urgency: 0, - due: getDueDate(homeController.selectedDates).toString(), - end: '', - modified: 'r', - tags: homeController.tags, - start: '', - wait: '', - rtype: '', - recur: '', - depends: [], - annotations: []); - await homeController.taskdb.insertTask(task); - homeController.namecontroller.text = ''; - homeController.due.value = null; - homeController.priority.value = 'M'; - homeController.projectcontroller.text = ''; - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - SentenceManager( - currentLanguage: homeController.selectedLanguage.value) - .sentences - .addTaskTaskAddedSuccessfully, - style: TextStyle( - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor, - ), - ), - backgroundColor: AppSettings.isDarkMode - ? TaskWarriorColors.ksecondaryBackgroundColor - : TaskWarriorColors.kLightSecondaryBackgroundColor, - duration: const Duration(seconds: 2))); - Navigator.of(context).pop(); - } - } - - void onSaveButtonClicked(BuildContext context) async { - // print(homeController.formKey.currentState); - if (homeController.formKey.currentState!.validate()) { - try { - var task = taskParser(homeController.namecontroller.text) - .rebuild((b) => - b..due = getDueDate(homeController.selectedDates)?.toUtc()) - .rebuild((p) => p..priority = homeController.priority.value) - .rebuild((t) => t..project = homeController.projectcontroller.text) - .rebuild((t) => - t..wait = getWaitDate(homeController.selectedDates)?.toUtc()) - .rebuild((t) => - t..until = getUntilDate(homeController.selectedDates)?.toUtc()) - .rebuild((t) => t - ..scheduled = - getSchedDate(homeController.selectedDates)?.toUtc()); - if (homeController.tags.isNotEmpty) { - task = task.rebuild((t) => t..tags.replace(homeController.tags)); - } - Get.find().mergeTask(task); - homeController.namecontroller.text = ''; - homeController.projectcontroller.text = ''; - homeController.dueString.value = ""; - homeController.priority.value = 'X'; - homeController.tagcontroller.text = ''; - homeController.tags.value = []; - homeController.update(); - Get.back(); - if (Platform.isAndroid) { - WidgetController widgetController = Get.put(WidgetController()); - widgetController.fetchAllData(); - widgetController.update(); - } - - homeController.update(); - - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - SentenceManager( - currentLanguage: homeController.selectedLanguage.value) - .sentences - .addTaskTaskAddedSuccessfully, - style: TextStyle( - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor, - ), - ), - backgroundColor: AppSettings.isDarkMode - ? TaskWarriorColors.ksecondaryBackgroundColor - : TaskWarriorColors.kLightSecondaryBackgroundColor, - duration: const Duration(seconds: 2))); - - final SharedPreferences prefs = await SharedPreferences.getInstance(); - bool? value; - value = prefs.getBool('sync-OnTaskCreate') ?? false; - // late InheritedStorage storageWidget; - // storageWidget = StorageWidget.of(context); - var storageWidget = Get.find(); - if (value) { - storageWidget.synchronize(context, true); - } - } on FormatException catch (e) { - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - e.message, - style: TextStyle( - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor, - ), - ), - backgroundColor: AppSettings.isDarkMode - ? TaskWarriorColors.ksecondaryBackgroundColor - : TaskWarriorColors.kLightSecondaryBackgroundColor, - duration: const Duration(seconds: 2))); - } - } - } -} diff --git a/lib/app/modules/home/views/filter_drawer_home_page.dart b/lib/app/modules/home/views/filter_drawer_home_page.dart deleted file mode 100644 index 91a85dda..00000000 --- a/lib/app/modules/home/views/filter_drawer_home_page.dart +++ /dev/null @@ -1,452 +0,0 @@ -// ignore_for_file: unrelated_type_equality_checks - -import 'package:flutter/material.dart'; -import 'package:get/get_state_manager/get_state_manager.dart'; -import 'package:taskwarrior/app/models/filters.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/modules/home/views/project_column_home_page.dart'; -import 'package:taskwarrior/app/modules/home/views/project_column_taskc.dart'; -import 'package:taskwarrior/app/services/tag_filter.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class FilterDrawer extends StatelessWidget { - final Filters filters; - final HomeController homeController; - const FilterDrawer( - {required this.filters, required this.homeController, super.key}); - - @override - Widget build(BuildContext context) { - homeController.initFilterDrawerTour(); - homeController.showFilterDrawerTour(context); - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - var tileColor = AppSettings.isDarkMode - ? TaskWarriorColors.ksecondaryBackgroundColor - : TaskWarriorColors.kLightPrimaryBackgroundColor; - return Drawer( - backgroundColor: tColors.dialogBackgroundColor, - surfaceTintColor: tColors.primaryBackgroundColor, - child: SafeArea( - child: Padding( - padding: const EdgeInsets.all(8), - child: ListView( - primary: false, - key: const PageStorageKey('tags-filter'), - children: [ - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - Container( - height: 45, - alignment: Alignment.center, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 0.0), - child: Text( - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerApplyFilters, - // style: GoogleFonts.poppins( - // fontWeight: TaskWarriorFonts.bold, - // color: (AppSettings.isDarkMode - // ? TaskWarriorColors.kprimaryTextColor - // : TaskWarriorColors.kLightPrimaryTextColor), - // fontSize: TaskWarriorFonts.fontSizeExtraLarge), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - color: tColors.primaryTextColor, - fontSize: TaskWarriorFonts.fontSizeExtraLarge, - ), - ), - ), - ), - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - Container( - // width: MediaQuery.of(context).size.width * 1, - // padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - color: tileColor, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: TaskWarriorColors.borderColor), - ), - child: ListTile( - contentPadding: const EdgeInsets.only( - left: 8, - ), - title: RichText( - key: homeController.statusKey, - maxLines: 2, - text: TextSpan( - children: [ - TextSpan( - text: - '${SentenceManager(currentLanguage: homeController.selectedLanguage.value).sentences.filterDrawerStatus} : ', - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - )), - TextSpan( - text: filters.pendingFilter - ? SentenceManager( - currentLanguage: homeController - .selectedLanguage.value) - .sentences - .filterDrawerPending - : SentenceManager( - currentLanguage: homeController - .selectedLanguage.value) - .sentences - .filterDrawerCompleted, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - )), - ], - ), - ), - onTap: filters.togglePendingFilter, - textColor: tColors.primaryTextColor, - ), - ), - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - Container( - decoration: BoxDecoration( - color: tileColor, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: TaskWarriorColors.borderColor), - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - !filters.waitingFilter - ? SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerShowWaiting - : SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerHideWaiting, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - )), - Switch( - value: filters.waitingFilter, - onChanged: (_) => filters.toggleWaitingFilter(), - ) - ], - ), - ), - ), - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - Visibility( - visible: !homeController.taskchampion.value, - child: Container( - key: homeController.projectsKey, - width: MediaQuery.of(context).size.width * 1, - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - color: tileColor, - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: TaskWarriorColors.borderColor, - ), - ), - child: ProjectsColumn( - projects: filters.projects, - projectFilter: filters.projectFilter, - callback: filters.toggleProjectFilter, - ), - ), - ), - Visibility( - visible: homeController.taskchampion.value, - child: FutureBuilder>( - future: homeController.getUniqueProjects(), - builder: (BuildContext context, - AsyncSnapshot> snapshot) { - if (snapshot.hasData) { - return Container( - key: homeController.projectsKeyTaskc, - width: MediaQuery.of(context).size.width * 1, - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - color: tileColor, - borderRadius: BorderRadius.circular(8), - border: - Border.all(color: TaskWarriorColors.borderColor), - ), - child: ProjectColumnTaskc( - callback: filters.toggleProjectFilter, - projects: snapshot.data!, - projectFilter: filters.projectFilter, - ), - ); - } else { - return Center( - child: Text(SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerNoProjectsAvailable)); - } - }, - ), - ), - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - Visibility( - visible: !homeController.taskchampion.value, - child: Container( - key: homeController.filterTagKey, - width: MediaQuery.of(context).size.width * 1, - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - color: tileColor, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: TaskWarriorColors.borderColor), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 0.0), - child: Text( - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerFilterTagBy, - // style: GoogleFonts.poppins( - // color: (AppSettings.isDarkMode - // ? TaskWarriorColors.kprimaryTextColor - // : TaskWarriorColors.kLightSecondaryTextColor), - // // - // fontSize: TaskWarriorFonts.fontSizeLarge), - //textAlign: TextAlign.right, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - ), - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: TagFiltersWrap(filters.tagFilters), - ), - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - ], - ), - ), - ), - Visibility( - visible: !homeController.taskchampion.value, - child: const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - ), - Container( - key: homeController.sortByKey, - width: MediaQuery.of(context).size.width * 1, - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - color: tileColor, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: TaskWarriorColors.borderColor), - ), - //height: 30, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 0.0), - child: Text( - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerSortBy, - // style: GoogleFonts.poppins( - // color: (AppSettings.isDarkMode - // ? TaskWarriorColors.kprimaryTextColor - // : TaskWarriorColors.kLightPrimaryTextColor), - // fontSize: TaskWarriorFonts.fontSizeLarge), - // textAlign: TextAlign.right, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - )), - ), - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: Wrap( - spacing: 8, - runSpacing: 4, - children: [ - for (var sort in [ - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerCreated, - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerModified, - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerStartTime, - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerDueTill, - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerPriority, - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerProject, - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerTags, - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerUrgency, - ]) - Obx( - () => ChoiceChip( - label: (homeController.selectedSort.value - .startsWith(sort)) - ? Text( - homeController.selectedSort.value, - ) - : Text(sort), - selected: false, - onSelected: (_) { - if (homeController.selectedSort == '$sort+') { - homeController.selectSort('$sort-'); - } else if (homeController.selectedSort == - '$sort-') { - homeController.selectSort(sort); - } else { - homeController.selectSort('$sort+'); - } - }, - // labelStyle: GoogleFonts.poppins( - // color: AppSettings.isDarkMode - // ? TaskWarriorColors.black - // : TaskWarriorColors.white), - // backgroundColor: AppSettings.isDarkMode - // ? TaskWarriorColors - // .kLightSecondaryBackgroundColor - // : TaskWarriorColors.ksecondaryBackgroundColor, - ), - ) - ], - ), - ), - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - Container( - width: 200, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - // color: AppSettings.isDarkMode - // ? TaskWarriorColors.kLightSecondaryBackgroundColor - // : TaskWarriorColors.ksecondaryBackgroundColor, - ), - child: TextButton( - onPressed: () { - if (homeController.selectedSort.value.endsWith('+') || - homeController.selectedSort.value.endsWith('-')) { - homeController.selectSort( - homeController.selectedSort.value.substring( - 0, - homeController.selectedSort.value.length - - 1)); - } - }, - child: Text( - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .filterDrawerResetSort, - // style: GoogleFonts.poppins( - // fontSize: TaskWarriorFonts.fontSizeMedium, - // color: AppSettings.isDarkMode - // ? TaskWarriorColors.kLightSecondaryTextColor - // : TaskWarriorColors.ksecondaryTextColor), - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - )), - ), - ), - const Divider( - color: Color.fromARGB(0, 48, 46, 46), - ), - ], - ), - ) - ], - ), - ), - ), - ); - } -} diff --git a/lib/app/modules/home/views/home_page_app_bar.dart b/lib/app/modules/home/views/home_page_app_bar.dart deleted file mode 100644 index f4b22218..00000000 --- a/lib/app/modules/home/views/home_page_app_bar.dart +++ /dev/null @@ -1,254 +0,0 @@ -// ignore_for_file: use_build_context_synchronously - -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart'; -import 'package:taskwarrior/app/utils/taskserver/taskserver.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -import '../controllers/home_controller.dart'; - -class HomePageAppBar extends StatelessWidget implements PreferredSizeWidget { - final HomeController controller; - final Server? server; - final Credentials? credentials; - const HomePageAppBar( - {required this.server, - required this.credentials, - required this.controller, - super.key}); - - void _showLoadingSnackBar(BuildContext context, String message) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - duration: const Duration(days: 1), - backgroundColor: tColors.secondaryBackgroundColor, - content: Row( - children: [ - SizedBox( - width: 20, - height: 20, - child: CircularProgressIndicator( - strokeWidth: 2, - color: tColors.primaryTextColor, - ), - ), - const SizedBox(width: 16), - Text( - message, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ], - ), - ), - ); - } - - void _showResultSnackBar(BuildContext context, String message, bool isError) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - backgroundColor: tColors.secondaryBackgroundColor, - content: Text( - message, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - action: isError - ? SnackBarAction( - label: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .homePageSetup, - onPressed: () { - if (controller.taskchampion.value) { - Get.toNamed(Routes.MANAGE_TASK_CHAMPION_CREDS); - } else { - Get.toNamed(Routes.MANAGE_TASK_SERVER); - } - }, - textColor: TaskWarriorColors.purple, - ) - : null, - ), - ); - } - - @override - Widget build(BuildContext context) { - return AppBar( - backgroundColor: TaskWarriorColors.kprimaryBackgroundColor, - surfaceTintColor: TaskWarriorColors.kprimaryBackgroundColor, - title: Center( - child: Obx( - () => Text( - SentenceManager(currentLanguage: controller.selectedLanguage.value) - .sentences - .homePageTitle, - style: TextStyle( - fontFamily: FontFamily.poppins, color: TaskWarriorColors.white), - ), - ), - ), - actions: [ - Obx( - () => IconButton( - key: controller.searchKey1, - icon: (controller.searchVisible.value) - ? Tooltip( - message: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .homePageCancelSearchTooltip, - child: Icon(Icons.cancel, color: TaskWarriorColors.white)) - : Tooltip( - message: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .homePageSearchTooltip, - child: Icon(Icons.search, color: TaskWarriorColors.white)), - onPressed: controller.toggleSearch, - ), - ), - Builder( - builder: (context) => Obx(() => IconButton( - key: controller.refreshKey, - icon: Icon(Icons.refresh, color: TaskWarriorColors.white), - onPressed: controller.isRefreshing.value - ? null - : () async { - if (controller.taskchampion.value) { - var c = await CredentialsStorage.getClientId(); - var e = - await CredentialsStorage.getEncryptionSecret(); - if (c != null && e != null) { - try { - controller.isRefreshing.value = true; - _showLoadingSnackBar( - context, - SentenceManager( - currentLanguage: - controller.selectedLanguage.value) - .sentences - .homePageFetchingTasks); - - await controller.refreshTasks(c, e); - - ScaffoldMessenger.of(context) - .hideCurrentSnackBar(); - - _showResultSnackBar( - context, - SentenceManager( - currentLanguage: - controller.selectedLanguage.value) - .sentences - .homePageFetchingTasks, - false); - } catch (e) { - debugPrint('Error refreshing tasks: $e'); - ScaffoldMessenger.of(context) - .hideCurrentSnackBar(); - _showResultSnackBar( - context, - SentenceManager( - currentLanguage: - controller.selectedLanguage.value) - .sentences - .homePageTaskWarriorNotConfigured, - true); - } finally { - controller.isRefreshing.value = false; - } - } else if (c == null || e == null) { - _showResultSnackBar( - context, - SentenceManager( - currentLanguage: - controller.selectedLanguage.value) - .sentences - .homePageTaskWarriorNotConfigured, - true); - } - } else { - if (server != null || credentials != null) { - controller.isRefreshing.value = true; - try { - await controller.synchronize(context, true); - ScaffoldMessenger.of(context) - .hideCurrentSnackBar(); - } catch (e) { - ScaffoldMessenger.of(context) - .hideCurrentSnackBar(); - _showResultSnackBar( - context, - SentenceManager( - currentLanguage: - controller.selectedLanguage.value) - .sentences - .homePageTaskWarriorNotConfigured, - true); - } finally { - controller.isRefreshing.value = false; - } - } else { - _showResultSnackBar( - context, - SentenceManager( - currentLanguage: - controller.selectedLanguage.value) - .sentences - .homePageTaskWarriorNotConfigured, - true); - } - } - }, - )), - ), - Builder( - builder: (context) => IconButton( - key: controller.filterKey, - icon: Obx( - () => Tooltip( - message: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .homePageFilter, - child: Icon(Icons.filter_list, color: TaskWarriorColors.white), - ), - ), - onPressed: () => Scaffold.of(context).openEndDrawer(), - ), - ), - ], - leading: Builder( - builder: (context) => IconButton( - key: controller.menuKey, - icon: Obx( - () => Tooltip( - message: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .homePageMenu, - child: Icon(Icons.menu, color: TaskWarriorColors.white)), - ), - onPressed: () => Scaffold.of(context).openDrawer(), - ), - ), - ); - } - - @override - Size get preferredSize => AppBar().preferredSize; -} diff --git a/lib/app/modules/home/views/home_page_body.dart b/lib/app/modules/home/views/home_page_body.dart deleted file mode 100644 index d9f3c314..00000000 --- a/lib/app/modules/home/views/home_page_body.dart +++ /dev/null @@ -1,132 +0,0 @@ -import 'package:double_back_to_close_app/double_back_to_close_app.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/home/views/show_tasks.dart'; -import 'package:taskwarrior/app/modules/home/views/tasks_builder.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import '../controllers/home_controller.dart'; - -class HomePageBody extends StatelessWidget { - final HomeController controller; - const HomePageBody({required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - controller.initInAppTour(); - controller.showInAppTour(context); - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return DoubleBackToCloseApp( - snackBar: SnackBar( - content: Text(SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .homePageTapBackToExit)), - child: Container( - color: tColors.dialogBackgroundColor, - child: Padding( - padding: const EdgeInsets.only(left: 8.0, right: 8.0), - child: Obx( - () => Column( - children: [ - if (controller.searchVisible.value) - Container( - margin: const EdgeInsets.symmetric( - horizontal: 10, vertical: 10), - child: SearchBar( - backgroundColor: WidgetStateProperty.all( - (tColors.primaryBackgroundColor!)), - surfaceTintColor: WidgetStateProperty.all( - (tColors.primaryBackgroundColor!)), - controller: controller.searchController, - // shape:, - onChanged: (value) { - controller.search(value); - }, - - shape: WidgetStateProperty.resolveWith( - (Set states) { - if (states.contains(WidgetState.focused)) { - return RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12.0), - side: BorderSide( - color: tColors.primaryTextColor!, - width: 2.0, - ), - ); - } else { - return RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12.0), - side: BorderSide( - color: tColors.primaryTextColor!, - width: 1.5, - ), - ); - } - }, - ), - leading: const Icon(Icons.search_rounded), - trailing: [ - (controller.searchController.text.isNotEmpty) - ? IconButton( - key: GlobalKey(), - icon: Icon(Icons.cancel, - color: TaskWarriorColors.black), - onPressed: () { - controller.searchController.clear(); - controller - .search(controller.searchController.text); - }, - ) - : const SizedBox( - width: 0, - height: 0, - ) - ], - - hintText: SentenceManager( - currentLanguage: - controller.selectedLanguage.value) - .sentences - .homePageSearchHint, - ), - ), - Visibility( - visible: !controller.taskchampion.value, - child: Expanded( - child: Scrollbar( - child: Obx( - () => TasksBuilder( - // darkmode: AppSettings.isDarkMode, - useDelayTask: controller.useDelayTask.value, - taskData: controller.searchedTasks, - pendingFilter: controller.pendingFilter.value, - waitingFilter: controller.waitingFilter.value, - searchVisible: controller.searchVisible.value, - selectedLanguage: controller.selectedLanguage.value, - scrollController: controller.scrollController, - showbtn: controller.showbtn.value, - ), - ), - ), - ), - ), - Visibility( - visible: controller.taskchampion.value, - child: Expanded( - child: Scrollbar( - child: TaskViewBuilder( - pendingFilter: controller.pendingFilter.value, - selectedSort: controller.selectedSort.value, - project: controller.projectFilter.value, - ), - ))) - ], - ), - ), - ), - ), - ); - } -} diff --git a/lib/app/modules/home/views/home_page_floating_action_button.dart b/lib/app/modules/home/views/home_page_floating_action_button.dart deleted file mode 100644 index d2730a23..00000000 --- a/lib/app/modules/home/views/home_page_floating_action_button.dart +++ /dev/null @@ -1,82 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:taskwarrior/app/modules/home/views/add_task_bottom_sheet_new.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import '../controllers/home_controller.dart'; - -class HomePageFloatingActionButton extends StatelessWidget { - final HomeController controller; - const HomePageFloatingActionButton({required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return FloatingActionButton( - key: controller.addKey, - heroTag: "btn3", - backgroundColor: tColors.primaryTextColor, - child: Tooltip( - message: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .homePageAddTaskTooltip, - child: Icon( - Icons.add, - color: tColors.secondaryBackgroundColor, - ), - ), - onPressed: () => (controller.taskchampion.value) - ? (showModalBottomSheet( - context: context, - isScrollControlled: true, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(0), - topRight: Radius.circular(0), - ), - ), - builder: (context) => AddTaskBottomSheet( - homeController: controller, - forTaskC: true, - ), - ).then((value) { - if (controller.isSyncNeeded.value && value != "cancel") { - controller.isNeededtoSyncOnStart(context); - } - })) - : (showModalBottomSheet( - context: context, - isScrollControlled: true, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(0), - topRight: Radius.circular(0), - ), - ), - builder: (context) => AddTaskBottomSheet( - homeController: controller, - ), - ).then((value) { - if (controller.isSyncNeeded.value && value != "cancel") { - controller.isNeededtoSyncOnStart(context); - } - })) - // .then((value) { - // // print(value); - - // //if auto sync is turned on - // if (isSyncNeeded) { - // //if user have not created any event then - // //we won't call sync method - // if (value == "cancel") { - // } else { - // //else we can sync new tasks - // isNeededtoSyncOnStart(); - // } - // } - // }), - ); - } -} diff --git a/lib/app/modules/home/views/home_page_nav_drawer_menu_item.dart b/lib/app/modules/home/views/home_page_nav_drawer_menu_item.dart deleted file mode 100644 index 435a54a6..00000000 --- a/lib/app/modules/home/views/home_page_nav_drawer_menu_item.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class NavDrawerMenuItem extends StatelessWidget { - final IconData icon; - final String text; - final VoidCallback onTap; - - const NavDrawerMenuItem({ - super.key, - required this.icon, - required this.text, - required this.onTap, - }); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return InkWell( - onTap: onTap, - child: Container( - color: tColors.dialogBackgroundColor, - padding: const EdgeInsets.symmetric(vertical: 18, horizontal: 10), - child: Row( - children: [ - Icon( - icon, - color: tColors.primaryTextColor, - ), - const SizedBox(width: 10), - Text( - text, - style: TextStyle( - color: tColors.primaryTextColor, - fontSize: TaskWarriorFonts.fontSizeMedium, - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/app/modules/home/views/home_view.dart b/lib/app/modules/home/views/home_view.dart deleted file mode 100644 index e2f62bb1..00000000 --- a/lib/app/modules/home/views/home_view.dart +++ /dev/null @@ -1,62 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; - -import 'package:taskwarrior/app/modules/home/views/filter_drawer_home_page.dart'; -import 'package:taskwarrior/app/modules/home/views/home_page_app_bar.dart'; -import 'package:taskwarrior/app/modules/home/views/home_page_body.dart'; -import 'package:taskwarrior/app/modules/home/views/home_page_floating_action_button.dart'; -import 'package:taskwarrior/app/modules/home/views/nav_drawer.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/taskserver/taskserver.dart'; -import 'package:taskwarrior/app/utils/home_path/home_path.dart' as rc; - -import '../controllers/home_controller.dart'; - -class HomeView extends GetView { - const HomeView({super.key}); - @override - Widget build(BuildContext context) { - Server? server; - Credentials? credentials; - - var contents = rc.Taskrc(controller.storage.home.home).readTaskrc(); - if (contents != null) { - server = Taskrc.fromString(contents).server; - credentials = Taskrc.fromString(contents).credentials; - } - - if (contents != null) { - server = Taskrc.fromString(contents).server; - credentials = Taskrc.fromString(contents).credentials; - } - - controller.checkForSync(context); - - return Obx( - () => Scaffold( - appBar: HomePageAppBar( - server: server, - credentials: credentials, - controller: controller, - ), - backgroundColor: controller.isDarkModeOn.value - ? TaskWarriorColors.kprimaryBackgroundColor - : TaskWarriorColors.kLightPrimaryBackgroundColor, - drawer: NavDrawer(homeController: controller), - body: HomePageBody( - controller: controller, - ), - endDrawer: Obx( - () => FilterDrawer( - filters: controller.getFilters(), - homeController: controller, - ), - ), - floatingActionButton: - HomePageFloatingActionButton(controller: controller), - resizeToAvoidBottomInset: false, - ), - ); - } -} diff --git a/lib/app/modules/home/views/nav_drawer.dart b/lib/app/modules/home/views/nav_drawer.dart deleted file mode 100644 index 396b81b7..00000000 --- a/lib/app/modules/home/views/nav_drawer.dart +++ /dev/null @@ -1,313 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:get/get.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/modules/home/views/home_page_nav_drawer_menu_item.dart'; -import 'package:taskwarrior/app/modules/home/views/theme_clipper.dart'; -import 'package:taskwarrior/app/modules/reports/views/reports_view_taskc.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/themes/dark_theme.dart'; -import 'package:taskwarrior/app/utils/themes/light_theme.dart'; - -class NavDrawer extends StatelessWidget { - final HomeController homeController; - const NavDrawer({super.key, required this.homeController}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Drawer( - backgroundColor: tColors.dialogBackgroundColor, - surfaceTintColor: tColors.dialogBackgroundColor, - child: Container( - color: tColors.dialogBackgroundColor, - child: ListView( - padding: EdgeInsets.zero, - children: [ - Container( - color: tColors.dialogBackgroundColor, - padding: const EdgeInsets.only(top: 50, left: 15, right: 10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value) - .sentences - .homePageMenu, - style: TextStyle( - fontSize: TaskWarriorFonts.fontSizeExtraLarge, - fontWeight: TaskWarriorFonts.bold, - color: tColors.primaryTextColor, - ), - ), - Padding( - padding: const EdgeInsets.only(right: 10), - child: ThemeSwitcherClipper( - isDarkMode: AppSettings.isDarkMode, - onTap: (bool newMode) async { - Get.changeThemeMode( - newMode ? ThemeMode.dark : ThemeMode.light); - AppSettings.isDarkMode = newMode; - await SelectedTheme.saveMode(AppSettings.isDarkMode); - // Get.back(); - homeController.initLanguageAndDarkMode(); - Get.changeTheme( - AppSettings.isDarkMode ? darkTheme : lightTheme); - }, - child: Icon( - tColors.icons, - color: tColors.primaryTextColor, - size: 15, - ), - ), - ), - ], - ), - ), - Container( - color: tColors.dialogBackgroundColor, - height: Get.height * 0.03, - ), - Visibility( - visible: homeController.taskchampion.value, - child: NavDrawerMenuItem( - icon: Icons.task_alt, - text: SentenceManager( - currentLanguage: homeController.selectedLanguage.value, - ).sentences.ccsyncCredentials, - onTap: () { - Get.toNamed(Routes.MANAGE_TASK_CHAMPION_CREDS); - }, - ), - ), - Visibility( - visible: homeController.taskchampion.value, - child: NavDrawerMenuItem( - icon: Icons.delete, - text: SentenceManager( - currentLanguage: homeController.selectedLanguage.value, - ).sentences.deleteTaskTitle, - onTap: () { - showDialog( - context: context, - builder: (BuildContext context) { - return Utils.showAlertDialog( - title: Text( - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value, - ).sentences.deleteTaskConfirmation, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - content: Text( - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value, - ).sentences.deleteTaskWarning, - style: TextStyle( - color: tColors.primaryDisabledTextColor, - ), - ), - actions: [ - TextButton( - child: Text( - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value, - ).sentences.homePageCancel, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - onPressed: () { - Navigator.of(context).pop(); // Close the dialog - }, - ), - TextButton( - child: Text( - SentenceManager( - currentLanguage: - homeController.selectedLanguage.value, - ).sentences.navDrawerConfirm, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - onPressed: () { - homeController.deleteAllTasksInDB(); - Navigator.of(context).pop(); // Close the dialog - }, - ), - ], - ); - }, - ); - }), - ), - Visibility( - visible: !homeController.taskchampion.value, - child: Obx( - () => NavDrawerMenuItem( - icon: Icons.person_rounded, - text: SentenceManager( - currentLanguage: homeController.selectedLanguage.value, - ).sentences.navDrawerProfile, - onTap: () { - Get.toNamed(Routes.PROFILE); - }, - ), - ), - ), - Visibility( - visible: !homeController.taskchampion.value, - child: Obx( - () => NavDrawerMenuItem( - icon: Icons.summarize, - text: SentenceManager( - currentLanguage: homeController.selectedLanguage.value, - ).sentences.navDrawerReports, - onTap: () { - Get.toNamed(Routes.REPORTS); - }, - ), - ), - ), - Visibility( - visible: homeController.taskchampion.value, - child: Obx( - () => NavDrawerMenuItem( - icon: Icons.summarize, - text: SentenceManager( - currentLanguage: homeController.selectedLanguage.value, - ).sentences.navDrawerReports, - onTap: () { - Get.to(() => ReportsHomeTaskc()); - }, - ), - ), - ), - Obx( - () => NavDrawerMenuItem( - icon: Icons.info, - text: SentenceManager( - currentLanguage: homeController.selectedLanguage.value, - ).sentences.navDrawerAbout, - onTap: () { - Get.toNamed(Routes.ABOUT); - }, - ), - ), - Obx( - () => NavDrawerMenuItem( - icon: Icons.settings, - text: SentenceManager( - currentLanguage: homeController.selectedLanguage.value, - ).sentences.navDrawerSettings, - onTap: () async { - final SharedPreferences prefs = - await SharedPreferences.getInstance(); - homeController.syncOnStart.value = - prefs.getBool('sync-onStart') ?? false; - homeController.syncOnTaskCreate.value = - prefs.getBool('sync-OnTaskCreate') ?? false; - homeController.delaytask.value = - prefs.getBool('delaytask') ?? false; - homeController.change24hr.value = - prefs.getBool('24hourformate') ?? false; - - Get.toNamed(Routes.SETTINGS); - }, - ), - ), - Obx( - () => NavDrawerMenuItem( - icon: Icons.exit_to_app, - text: SentenceManager( - currentLanguage: homeController.selectedLanguage.value, - ).sentences.navDrawerExit, - onTap: () { - _showExitConfirmationDialog(context); - }, - ), - ), - ], - ), - ), - ); - } - - Future _showExitConfirmationDialog(BuildContext context) async { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return showDialog( - context: context, - barrierDismissible: - false, // Prevents closing the dialog by tapping outside - builder: (BuildContext context) { - return Utils.showAlertDialog( - title: Text( - SentenceManager( - currentLanguage: homeController.selectedLanguage.value) - .sentences - .homePageExitApp, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - content: Text( - SentenceManager( - currentLanguage: homeController.selectedLanguage.value) - .sentences - .homePageAreYouSureYouWantToExit, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - actions: [ - TextButton( - child: Text( - SentenceManager( - currentLanguage: homeController.selectedLanguage.value) - .sentences - .homePageCancel, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - onPressed: () { - Navigator.of(context).pop(); // Close the dialog - }, - ), - TextButton( - child: Text( - SentenceManager( - currentLanguage: homeController.selectedLanguage.value) - .sentences - .homePageExit, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - onPressed: () { - Navigator.of(context).pop(); // Close the dialog - SystemNavigator.pop(); // Exit the app - }, - ), - ], - ); - }, - ); - } -} diff --git a/lib/app/modules/home/views/project_column_home_page.dart b/lib/app/modules/home/views/project_column_home_page.dart deleted file mode 100644 index 2247bb60..00000000 --- a/lib/app/modules/home/views/project_column_home_page.dart +++ /dev/null @@ -1,219 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; - -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/projects.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class ProjectsColumn extends StatelessWidget { - const ProjectsColumn({ - required this.projects, - required this.projectFilter, - required this.callback, - super.key, - }); - - final Map projects; - final String projectFilter; - final void Function(String) callback; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return Column( - children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.project} : ", - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - SizedBox( - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - projectFilter == "" ? SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.notSelected : projectFilter, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - ], - ), - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only(left: 10, right: 10, top: 10), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text(SentenceManager( - currentLanguage: AppSettings.selectedLanguage).sentences.allProjects, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - )), - ], - ), - ), - if (projects.isNotEmpty) - ...projects.entries - .where((entry) => entry.value.parent == null) - .map((entry) => ProjectTile( - project: entry.key, - projects: projects, - projectFilter: projectFilter, - callback: callback, - )) - else - Column( - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .noProjectsFound, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - SizedBox( - height: Get.height * 0.02, - ), - ], - ), - ], - ); - } -} - -class ProjectTile extends StatelessWidget { - const ProjectTile({ - required this.project, - required this.projects, - required this.projectFilter, - required this.callback, - super.key, - }); - - final String project; - final Map projects; - final String projectFilter; - final void Function(String) callback; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - - var node = projects[project]!; - - var title = Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Flexible( - child: Text( - project, - style: GoogleFonts.poppins( - color: tColors.primaryTextColor, - ), - ) - ), - Text( - (node.children.isEmpty) - ? '${node.subtasks}' - : '(${node.tasks}) ${node.subtasks}', - style: GoogleFonts.poppins( - color: tColors.primaryTextColor - ), - ) - ], - ); - - var radio = Radio( - activeColor: tColors.primaryTextColor, - focusColor: tColors.secondaryTextColor, - toggleable: true, - value: project, - groupValue: projectFilter, - onChanged: (_) => callback(project), - ); - - return (node.children.isEmpty) - ? GestureDetector( - onTap: () => callback(project), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - radio, - Text( - project, - maxLines: 3, - // style: GoogleFonts.poppins( - // color: AppSettings.isDarkMode - // ? TaskWarriorColors.white - // : TaskWarriorColors.black), - ), - const Spacer(), - Container( - padding: const EdgeInsets.symmetric(horizontal: 4), - margin: const EdgeInsets.only(right: 10), - decoration: const BoxDecoration( - // color: (AppSettings.isDarkMode - // ? TaskWarriorColors.white - // : TaskWarriorColors.ksecondaryBackgroundColor), - ), - child: Text( - (node.children.isEmpty) - ? '${node.subtasks}' - : '(${node.tasks}) ${node.subtasks}', - maxLines: 1, - style: GoogleFonts.poppins( - color: tColors.primaryTextColor, - ), - ), - ), - ], - ), - ) - : ExpansionTile( - controlAffinity: ListTileControlAffinity.leading, - key: PageStorageKey(project), - leading: radio, - title: title, - backgroundColor: tColors.primaryTextColor, - textColor: tColors.primaryTextColor, - children: node.children - .map((childProject) => ProjectTile( - project: childProject, - projects: projects, - projectFilter: projectFilter, - callback: callback, - )) - .toList(), - ); - } -} diff --git a/lib/app/modules/home/views/project_column_taskc.dart b/lib/app/modules/home/views/project_column_taskc.dart deleted file mode 100644 index 4c7cd774..00000000 --- a/lib/app/modules/home/views/project_column_taskc.dart +++ /dev/null @@ -1,139 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; - -class ProjectColumnTaskc extends StatelessWidget { - const ProjectColumnTaskc({ - super.key, - required this.projects, - required this.projectFilter, - required this.callback, - }); - - final List projects; - final String projectFilter; - final void Function(String) callback; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Column( - children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage, - ).sentences.project, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - const SizedBox( - width: 10, - ), - Expanded( - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Text( - projectFilter.isEmpty - ? SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .notSelected - : projectFilter, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - ), - ), - ], - ), - ), - ProjectTileTaskc( - project: SentenceManager( - currentLanguage: AppSettings.selectedLanguage, - ).sentences.allProjects, - projectFilter: projectFilter, - callback: callback), - if (projects.isNotEmpty) - ...projects.map((entry) => ProjectTileTaskc( - project: entry, - projectFilter: projectFilter, - callback: callback, - )) - else - Column( - children: [ - Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .noProjectsFound, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - const SizedBox( - height: 10, - ), - ], - ), - ], - ); - } -} - -class ProjectTileTaskc extends StatelessWidget { - const ProjectTileTaskc({ - super.key, - required this.project, - required this.projectFilter, - required this.callback, - }); - - final String project; - final String projectFilter; - final void Function(String) callback; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return GestureDetector( - onTap: () => callback(project), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Radio( - value: project, - groupValue: projectFilter, - onChanged: (_) => callback(project), - ), - Text( - project, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - const Spacer(), - ], - ), - ); - } -} diff --git a/lib/app/modules/home/views/show_tasks.dart b/lib/app/modules/home/views/show_tasks.dart deleted file mode 100644 index 7440043c..00000000 --- a/lib/app/modules/home/views/show_tasks.dart +++ /dev/null @@ -1,255 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_slidable/flutter_slidable.dart'; -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; -import 'package:taskwarrior/app/v3/net/complete.dart'; -import 'package:taskwarrior/app/v3/net/delete.dart'; - -class TaskViewBuilder extends StatelessWidget { - const TaskViewBuilder({ - super.key, - this.project, - required this.pendingFilter, - required this.selectedSort, - }); - - final String selectedSort; - final bool pendingFilter; - final String? project; - - @override - Widget build(BuildContext context) { - final HomeController taskController = Get.find(); - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - - return Obx(() { - List tasks = List.from(taskController.tasks); - // Filter tasks based on the selected project - if (project != 'All Projects') { - tasks = tasks.where((task) => task.project == project).toList(); - } else { - tasks = List.from(tasks); - } - - // Apply other filters and sorting - tasks.sort((a, b) => b.id.compareTo(a.id)); - - tasks = tasks.where((task) { - if (pendingFilter) { - return task.status == 'pending'; - } else { - return task.status == 'completed'; - } - }).toList(); - // Apply sorting based on selectedSort - tasks.sort((a, b) { - switch (selectedSort) { - case 'Created+': - return a.entry.compareTo(b.entry); - case 'Created-': - return b.entry.compareTo(a.entry); - case 'Modified+': - return a.modified!.compareTo(b.modified!); - case 'Modified-': - return b.modified!.compareTo(a.modified!); - case 'Due till+': - return a.due!.compareTo(b.due!); - case 'Due till-': - return b.due!.compareTo(a.due!); - case 'Priority-': - return b.priority!.compareTo(a.priority!); - case 'Priority+': - return a.priority!.compareTo(b.priority!); - case 'Project+': - return a.project!.compareTo(b.project!); - case 'Project-': - return b.project!.compareTo(a.project!); - case 'Urgency-': - return b.urgency!.compareTo(a.urgency!); - case 'Urgency+': - return a.urgency!.compareTo(b.urgency!); - default: - return 0; - } - }); - - return Scaffold( - backgroundColor: tColors.dialogBackgroundColor, - body: tasks.isEmpty - ? Padding( - padding: const EdgeInsets.all(16.0), - child: Center( - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .clickOnBottomRightButtonToStartAddingTasks, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - fontSize: TaskWarriorFonts.fontSizeLarge, - color: tColors.primaryTextColor, - ), - ), - ), - ) - : ListView.builder( - shrinkWrap: true, - padding: EdgeInsets.only( - top: 4, - left: 2, - right: 2, - bottom: MediaQuery.of(context).size.height * 0.1, - ), - itemCount: tasks.length, - itemBuilder: (context, index) { - TaskForC task = tasks[index]; - return Slidable( - startActionPane: ActionPane( - motion: const BehindMotion(), - children: [ - SlidableAction( - onPressed: (context) { - _markTaskAsCompleted(task.uuid!); - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - content: Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .taskMarkedAsCompleted, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - ); - }, - icon: Icons.done, - label: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .complete, - backgroundColor: TaskWarriorColors.green, - ), - ], - ), - endActionPane: ActionPane( - motion: const DrawerMotion(), - children: [ - SlidableAction( - onPressed: (context) { - _markTaskAsDeleted(task.uuid!); - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - content: Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .taskMarkedAsDeleted, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - ); - }, - icon: Icons.delete, - label: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .delete, - backgroundColor: TaskWarriorColors.red, - ), - ], - ), - child: Card( - color: tColors.secondaryBackgroundColor, - child: InkWell( - splashColor: tColors.primaryBackgroundColor, - onTap: () => - Get.toNamed(Routes.TASKC_DETAILS, arguments: task), - child: Container( - decoration: BoxDecoration( - border: Border.all( - color: tColors.primaryTextColor!, - ), - color: tColors.primaryBackgroundColor, - borderRadius: BorderRadius.circular(8.0), - boxShadow: const [ - BoxShadow( - color: Colors.black12, - blurRadius: 4.0, - offset: Offset(0, 2), - ), - ], - ), - child: ListTile( - leading: CircleAvatar( - backgroundColor: - _getPriorityColor(task.priority!), - radius: 8, - ), - title: Text( - task.description, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: GoogleFonts.poppins( - color: tColors.primaryTextColor, - ), - ), - subtitle: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageUrgency}: ${task.urgency!.floorToDouble()} | ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageStatus}: ${task.status}', - style: GoogleFonts.poppins( - color: tColors.secondaryTextColor, - ), - ), - ), - ), - ), - ), - ); - }, - ), - ); - }); - } - - void _markTaskAsCompleted(String uuid) async { - TaskDatabase taskDatabase = TaskDatabase(); - await taskDatabase.open(); - taskDatabase.markTaskAsCompleted(uuid); - completeTask('email', uuid); - } - - void _markTaskAsDeleted(String uuid) async { - TaskDatabase taskDatabase = TaskDatabase(); - await taskDatabase.open(); - taskDatabase.markTaskAsDeleted(uuid); - deleteTask('email', uuid); - } - - Color _getPriorityColor(String priority) { - switch (priority) { - case 'H': - return Colors.red; - case 'M': - return Colors.yellow; - case 'L': - return Colors.green; - default: - return Colors.grey; - } - } -} diff --git a/lib/app/modules/home/views/tag_filters_wrap.dart b/lib/app/modules/home/views/tag_filters_wrap.dart deleted file mode 100644 index c9024406..00000000 --- a/lib/app/modules/home/views/tag_filters_wrap.dart +++ /dev/null @@ -1,71 +0,0 @@ -import 'package:flutter/material.dart'; - - -class TagFilterMetadata { - const TagFilterMetadata({ - required this.display, - required this.selected, - }); - - final String display; - final bool selected; -} - -class TagFilters { - const TagFilters({ - required this.tagUnion, - required this.toggleTagUnion, - required this.tags, - required this.toggleTagFilter, - }); - - final bool tagUnion; - final void Function() toggleTagUnion; - final Map tags; - final void Function(String) toggleTagFilter; -} - -class TagFiltersWrap extends StatelessWidget { - const TagFiltersWrap(this.filters, {super.key}); - - final TagFilters filters; - - @override - Widget build(BuildContext context) { - return Wrap( - spacing: 4, - children: [ - FilterChip( - onSelected: (_) => filters.toggleTagUnion(), - label: Text( - filters.tagUnion ? 'OR' : 'AND', - // style: GoogleFonts.poppins( - // color: AppSettings.isDarkMode - // ? TaskWarriorColors.black - // : TaskWarriorColors.white, - // ), - ), - // backgroundColor: AppSettings.isDarkMode - // ? TaskWarriorColors.kLightSecondaryBackgroundColor - // : TaskWarriorColors.ksecondaryBackgroundColor, - ), - for (var entry in filters.tags.entries) - FilterChip( - onSelected: (_) => filters.toggleTagFilter(entry.key), - label: Text( - entry.value.display, - // style: GoogleFonts.poppins( - // fontWeight: entry.value.selected ? TaskWarriorFonts.bold : null, - // color: AppSettings.isDarkMode - // ? TaskWarriorColors.black - // : TaskWarriorColors.white, - // ), - ), - // backgroundColor: AppSettings.isDarkMode - // ? TaskWarriorColors.kLightSecondaryBackgroundColor - // : TaskWarriorColors.kprimaryBackgroundColor, - ), - ], - ); - } -} diff --git a/lib/app/modules/home/views/tas_list_item.dart b/lib/app/modules/home/views/tas_list_item.dart deleted file mode 100644 index 6c6041bc..00000000 --- a/lib/app/modules/home/views/tas_list_item.dart +++ /dev/null @@ -1,225 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/datetime_differences.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/modify.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/urgency.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class TaskListItem extends StatelessWidget { - const TaskListItem( - this.task, { - this.pendingFilter = false, - this.waitingFilter = false, - super.key, - required this.useDelayTask, - required this.modify, - required this.selectedLanguage, - }); - - final Task task; - final bool pendingFilter; - final bool waitingFilter; - final Modify modify; - final bool useDelayTask; - final SupportedLanguage selectedLanguage; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - // ignore: unused_element - void saveChanges() async { - var now = DateTime.now().toUtc(); - modify.save( - modified: () => now, - ); - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - SentenceManager(currentLanguage: selectedLanguage) - .sentences - .taskUpdated, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2))); - } - - bool isDueWithinOneDay(DateTime dueDate) { - DateTime now = DateTime.now(); - Duration difference = dueDate.difference(now); - return difference.inDays < 1 && difference.inMicroseconds > 0; - } - - bool isOverDue(DateTime dueDate) { - DateTime now = DateTime.now(); - Duration difference = dueDate.difference(now); - return difference.inMicroseconds < 0; - } - - MaterialColor colours = Colors.grey; - Color colour =tColors.primaryTextColor!; - Color dimColor = tColors.dimCol!; - if (task.priority == 'H') { - colours = Colors.red; - } else if (task.priority == 'M') { - colours = Colors.yellow; - } else if (task.priority == 'L') { - colours = Colors.green; - } - - if ((task.status[0].toUpperCase()) == 'P') { - // Pending tasks - return Container( - decoration: BoxDecoration( - border: Border.all( - color: (task.due != null && - isDueWithinOneDay(task.due!) && - useDelayTask) - ? Colors - .red // Set border color to red if due within 1 day and useDelayTask is true - : dimColor, // Set default border color - ), - borderRadius: BorderRadius.circular(8.0), - color: (task.due != null && isOverDue(task.due!) && useDelayTask) - ? Colors.red.withAlpha(50) - : tColors.primaryBackgroundColor, - ), - child: ListTile( - title: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - CircleAvatar( - backgroundColor: colours, - radius: 8, - ), - const SizedBox(width: 8), - SizedBox( - width: MediaQuery.of(context).size.width * 0.70, - child: Text( - '${(task.id == 0) ? '#' : task.id}. ${task.description}', - maxLines: 1, - overflow: TextOverflow.ellipsis, - // style: GoogleFonts.poppins( - // color: colour, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, color: colour), - ), - ), - ], - ), - Text( - (task.annotations != null) - ? ' [${task.annotations!.length}]' - : '', - // style: GoogleFonts.poppins( - // color: colour, - // ), - style: TextStyle(fontFamily: FontFamily.poppins, color: colour), - ), - ], - ), - subtitle: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Text( - '${pendingFilter ? '' : '${task.status[0].toUpperCase()}\n'}' - '${SentenceManager(currentLanguage: selectedLanguage).sentences.homePageLastModified} : ${(task.modified != null) ? age(task.modified!) : ((task.start != null) ? age(task.start!) : '-')} | ' - '${SentenceManager(currentLanguage: selectedLanguage).sentences.homePageDue} : ${(task.due != null) ? when(task.due!) : '-'}' - .replaceFirst(RegExp(r' \[\]$'), '') - .replaceAll(RegExp(r' +'), ' '), - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontFamily: FontFamily.poppins, - color: dimColor, - fontSize: TaskWarriorFonts.fontSizeSmall), - ), - ), - ), - Text( - formatUrgency(urgency(task)), - // style: GoogleFonts.poppins( - // color: colour, - // ), - style: TextStyle(fontFamily: FontFamily.poppins, color: colour), - ), - ], - ), - ), - ); - } else { - // Completed tasks - return ListTile( - title: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - CircleAvatar( - backgroundColor: colours, - radius: 8, - ), - const SizedBox(width: 8), - SizedBox( - width: MediaQuery.of(context).size.width * 0.65, - child: Text( - '${(task.id == 0) ? '#' : task.id}. ${task.description}', - maxLines: 1, - overflow: TextOverflow.ellipsis, - // style: GoogleFonts.poppins( - // color: colour, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, color: colour), - ), - ), - ], - ), - ], - ), - subtitle: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Text( - '${SentenceManager(currentLanguage: selectedLanguage).sentences.homePageLastModified} :${(task.modified != null) ? age(task.modified!) : ((task.start != null) ? age(task.start!) : '-')} | ' - '${SentenceManager(currentLanguage: selectedLanguage).sentences.homePageDue} : ${(task.due != null) ? when(task.due!) : '-'}' - .replaceFirst(RegExp(r' \[\]$'), '') - .replaceAll(RegExp(r' +'), ' '), - overflow: TextOverflow.ellipsis, - // style: GoogleFonts.poppins( - // color: dimColor, - // fontSize: TaskWarriorFonts.fontSizeSmall, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, - color: dimColor, - fontSize: TaskWarriorFonts.fontSizeSmall), - ), - ), - ), - Text( - formatUrgency(urgency(task)), - // style: GoogleFonts.poppins( - // color: colour, - // ), - style: TextStyle(fontFamily: FontFamily.poppins, color: colour), - ), - ], - ), - ); - } - } -} diff --git a/lib/app/modules/home/views/tasks_builder.dart b/lib/app/modules/home/views/tasks_builder.dart deleted file mode 100644 index 1584b349..00000000 --- a/lib/app/modules/home/views/tasks_builder.dart +++ /dev/null @@ -1,287 +0,0 @@ -// ignore_for_file: file_names - -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter_slidable/flutter_slidable.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/modules/home/controllers/widget.controller.dart'; -import 'package:taskwarrior/app/modules/home/views/tas_list_item.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; -import 'package:taskwarrior/app/services/notification_services.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/modify.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class TasksBuilder extends StatelessWidget { - const TasksBuilder({ - super.key, - required this.taskData, - required this.pendingFilter, - required this.waitingFilter, - required this.useDelayTask, - required this.searchVisible, - required this.selectedLanguage, - required this.scrollController, - required this.showbtn, - }); - - final List taskData; - final bool pendingFilter; - final bool waitingFilter; - final bool searchVisible; - final bool useDelayTask; - final SupportedLanguage selectedLanguage; - final ScrollController scrollController; - final bool showbtn; - void setStatus(BuildContext context, String newValue, String id) { - var storageWidget = Get.find(); - Modify modify = Modify( - getTask: storageWidget.getTask, - mergeTask: storageWidget.mergeTask, - uuid: id, - ); - modify.set('status', newValue); - saveChanges(context, modify, id, newValue); - } - - void saveChanges( - BuildContext context, Modify modify, String id, String newValue) async { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - var now = DateTime.now().toUtc(); - modify.save( - modified: () => now, - ); - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - SentenceManager(currentLanguage: selectedLanguage) - .sentences - .taskUpdated, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2), - action: SnackBarAction( - label: - SentenceManager(currentLanguage: selectedLanguage).sentences.undo, - onPressed: () { - undoChanges(context, id, 'pending'); - }, - ), - )); - } - - void undoChanges(BuildContext context, String id, String originalValue) { - var storageWidget = Get.find(); - Modify modify = Modify( - getTask: storageWidget.getTask, - mergeTask: storageWidget.mergeTask, - uuid: id, - ); - modify.set('status', originalValue); - modify.save( - modified: () => DateTime.now().toUtc(), - ); - storageWidget.update(); - } - - void cancelNotification(Task task) { - NotificationService notificationService = NotificationService(); - - int notificationId = notificationService.calculateNotificationId( - task.due!, task.description, false, task.entry); - notificationService.cancelNotification(notificationId); - - if (task.wait != null) { - notificationId = notificationService.calculateNotificationId( - task.wait!, task.description, true, task.entry); - notificationService.cancelNotification(notificationId); - } - } - - @override - Widget build(BuildContext context) { - // print(taskData); - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - var storageWidget = Get.find(); - return Scaffold( - floatingActionButtonLocation: - FloatingActionButtonLocation.miniStartFloat, - floatingActionButton: showbtn ? AnimatedOpacity( - duration: const Duration(milliseconds: 100), //show/hide animation - opacity: showbtn ? 1.0 : 0.0, //set obacity to 1 on visible, or hide - child: FloatingActionButton( - heroTag: "btn2", - onPressed: () { - scrollController.animateTo( - //go to top of scroll - 0, //scroll offset to go - duration: - const Duration(milliseconds: 500), //duration of scroll - curve: Curves.fastLinearToSlowEaseIn //scroll type - ); - }, - backgroundColor: tColors.primaryTextColor, - child: Icon( - Icons.arrow_upward, - color: tColors.secondaryBackgroundColor, - ), - ), - ) : null, - backgroundColor: Colors.transparent, - body: Obx( - () => taskData.isEmpty - ? Padding( - padding: const EdgeInsets.all(16.0), - child: Center( - child: Text( - (searchVisible) - ? '${SentenceManager(currentLanguage: selectedLanguage).sentences.homePageSearchNotFound} :(' - : SentenceManager(currentLanguage: selectedLanguage) - .sentences - .homePageClickOnTheBottomRightButtonToStartAddingTasks, - textAlign: TextAlign.center, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeLarge, - color: tColors.primaryTextColor - ), - // style: GoogleFonts.poppins( - // fontSize: TaskWarriorFonts.fontSizeLarge, - // color: AppSettings.isDarkMode - // ? TaskWarriorColors.kLightPrimaryBackgroundColor - // : TaskWarriorColors.kprimaryBackgroundColor, - // ), - ), - ), - ) - : ListView.builder( - padding: - const EdgeInsets.symmetric(vertical: 4, horizontal: 2), - itemCount: taskData.length, - controller: scrollController, - primary: false, - itemBuilder: (context, index) { - var task = taskData[index]; - final itemKey = index == 0 - ? storageWidget.taskItemKey - : ValueKey(task.uuid); - - return pendingFilter - ? Slidable( - key: itemKey, - startActionPane: ActionPane( - motion: const BehindMotion(), - children: [ - SlidableAction( - onPressed: (context) { - // Complete task without confirmation - setStatus(context, 'completed', task.uuid); - if (task.due != null) { - DateTime? dtb = task.due; - dtb = - dtb!.add(const Duration(minutes: 1)); - cancelNotification(task); - } - }, - icon: Icons.done, - label: SentenceManager(currentLanguage: selectedLanguage) - .sentences - .complete, - backgroundColor: TaskWarriorColors.green, - ), - ], - ), - endActionPane: ActionPane( - motion: const DrawerMotion(), - children: [ - SlidableAction( - onPressed: (context) { - // Delete task without confirmation - setStatus(context, 'deleted', task.uuid); - if (task.due != null) { - DateTime? dtb = task.due; - dtb = - dtb!.add(const Duration(minutes: 1)); - cancelNotification(task); - } - if (Platform.isAndroid) { - WidgetController widgetController = - Get.put(WidgetController()); - widgetController.fetchAllData(); - - widgetController.update(); - } - }, - icon: Icons.delete, - label: SentenceManager(currentLanguage: selectedLanguage) - .sentences - .delete, - backgroundColor: TaskWarriorColors.red, - ), - ], - ), - child: Card( - color: tColors.secondaryBackgroundColor, - child: InkWell( - splashColor: tColors.secondaryBackgroundColor, - onTap: () { - Get.toNamed(Routes.DETAIL_ROUTE, - arguments: ["uuid", task.uuid]); - }, - // child: Text(task.entry.toString()), - // onTap: () => Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => DetailRouteView(task.uuid), - // ), - // ), - child: TaskListItem( - task, - pendingFilter: pendingFilter, - useDelayTask: useDelayTask, - modify: Modify( - getTask: storageWidget.getTask, - mergeTask: storageWidget.mergeTask, - uuid: task.uuid, - ), - selectedLanguage: selectedLanguage, - ), - ), - ), - ) - : Card( - color: tColors.secondaryBackgroundColor, - child: InkWell( - splashColor: tColors.secondaryBackgroundColor, - onTap: () { - Get.toNamed(Routes.DETAIL_ROUTE, - arguments: ["uuid", task.uuid]); - }, - // child: Text(task.entry.toString()), - child: TaskListItem( - task, - pendingFilter: pendingFilter, - useDelayTask: useDelayTask, - modify: Modify( - getTask: storageWidget.getTask, - mergeTask: storageWidget.mergeTask, - uuid: task.uuid, - ), - selectedLanguage: selectedLanguage, - ), - ), - ); - }, - ), - )); - } -} diff --git a/lib/app/modules/home/views/theme_clipper.dart b/lib/app/modules/home/views/theme_clipper.dart deleted file mode 100644 index a00d9216..00000000 --- a/lib/app/modules/home/views/theme_clipper.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; - -class ThemeSwitcherClipper extends StatelessWidget { - final bool isDarkMode; - final Function(bool) onTap; - - const ThemeSwitcherClipper({ - super.key, - required this.isDarkMode, - required this.onTap, - required Icon child, - }); - - @override - Widget build(BuildContext context) { - return GestureDetector( - onTap: () async { - onTap(!isDarkMode); - }, - child: ClipOval( - child: Hero( - tag: 'theme_switcher', - child: SizedBox( - width: 60, - height: 60, - child: Center( - child: AnimatedSwitcher( - duration: const Duration(seconds: 2), - child: Icon( - isDarkMode ? Icons.dark_mode : Icons.light_mode, - key: UniqueKey(), - color: isDarkMode - ? TaskWarriorColors.white - : TaskWarriorColors.black, - size: 40, - ), - )), - ), - ), - ), - ); - } -} diff --git a/lib/app/modules/logs/bindings/logs_binding.dart b/lib/app/modules/logs/bindings/logs_binding.dart deleted file mode 100644 index 46a37ce8..00000000 --- a/lib/app/modules/logs/bindings/logs_binding.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:get/get.dart'; - -import '../controllers/logs_controller.dart'; - -class LogsBinding extends Bindings { - @override - void dependencies() { - Get.lazyPut( - () => LogsController(), - ); - } -} diff --git a/lib/app/modules/logs/controllers/logs_controller.dart b/lib/app/modules/logs/controllers/logs_controller.dart deleted file mode 100644 index c4873eb2..00000000 --- a/lib/app/modules/logs/controllers/logs_controller.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:get/get.dart'; -import 'package:taskwarrior/app/utils/debug_logger/log_databse_helper.dart'; - -class LogsController extends GetxController { - final LogDatabaseHelper _logDatabaseHelper = LogDatabaseHelper(); - var logs = >[].obs; - var isLoading = true.obs; - - @override - void onInit() { - super.onInit(); - loadLogs(); - } - - Future loadLogs() async { - isLoading.value = true; - final fetchedLogs = await _logDatabaseHelper.getLogs(); - logs.assignAll(fetchedLogs); // Update the RxList - isLoading.value = false; - } - - Future clearLogs() async { - await _logDatabaseHelper.clearLogs(); - loadLogs(); - } -} diff --git a/lib/app/modules/logs/views/logs_view.dart b/lib/app/modules/logs/views/logs_view.dart deleted file mode 100644 index b0096702..00000000 --- a/lib/app/modules/logs/views/logs_view.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/utils/debug_logger/log_databse_helper.dart'; -import '../controllers/logs_controller.dart'; - -class LogsView extends GetView { - const LogsView({super.key}); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Debug Logs'), - actions: [ - Obx( - () => IconButton( - icon: const Icon(Icons.refresh), - onPressed: - controller.isLoading.value ? null : controller.loadLogs, - tooltip: 'Refresh Logs', - ), - ), - Obx( - () => IconButton( - icon: const Icon(Icons.delete_forever), - onPressed: - controller.isLoading.value ? null : controller.clearLogs, - tooltip: 'Clear All Logs', - ), - ), - ], - ), - body: Obx( - () { - if (controller.isLoading.value) { - return const Center(child: CircularProgressIndicator()); - } else if (controller.logs.isEmpty) { - return const Center( - child: Text( - 'No debug logs found.', - style: TextStyle(fontSize: 16, color: Colors.grey), - ), - ); - } else { - return ListView.builder( - padding: const EdgeInsets.all(8.0), - itemCount: controller.logs.length, - itemBuilder: (context, index) { - final log = controller.logs[index]; - return Card( - margin: const EdgeInsets.symmetric(vertical: 4.0), - child: Padding( - padding: const EdgeInsets.all(12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - log[LogDatabaseHelper.columnMessage] ?? 'No message', - style: const TextStyle(fontSize: 15), - ), - const SizedBox(height: 4), - Text( - 'Timestamp: ${log[LogDatabaseHelper.columnTimestamp] ?? 'N/A'}', - style: - const TextStyle(fontSize: 12, color: Colors.grey), - ), - ], - ), - ), - ); - }, - ); - } - }, - ), - ); - } -} diff --git a/lib/app/modules/manageTaskServer/bindings/manage_task_server_binding.dart b/lib/app/modules/manageTaskServer/bindings/manage_task_server_binding.dart deleted file mode 100644 index e7a683fc..00000000 --- a/lib/app/modules/manageTaskServer/bindings/manage_task_server_binding.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:get/get.dart'; - -import '../controllers/manage_task_server_controller.dart'; - -class ManageTaskServerBinding extends Bindings { - @override - void dependencies() { - Get.lazyPut( - () => ManageTaskServerController(), - ); - } -} diff --git a/lib/app/modules/manageTaskServer/controllers/manage_task_server_controller.dart b/lib/app/modules/manageTaskServer/controllers/manage_task_server_controller.dart deleted file mode 100644 index 2fe75484..00000000 --- a/lib/app/modules/manageTaskServer/controllers/manage_task_server_controller.dart +++ /dev/null @@ -1,252 +0,0 @@ -// ignore_for_file: use_build_context_synchronously - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:get/get.dart'; -import 'package:loggy/loggy.dart'; -import 'package:taskwarrior/app/models/storage.dart'; -import 'package:taskwarrior/app/models/storage/set_config.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dart'; -import 'package:taskwarrior/app/tour/manage_task_server_page_tour.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/home_path/home_path.dart' as rc; -import 'package:taskwarrior/app/utils/taskserver/taskserver.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class ManageTaskServerController extends GetxController { - final HomeController homeController = Get.find(); - final SplashController splashController = Get.find(); - RxString profile = ''.obs; - late Storage storage; - late RxString alias; - Server? server; - Credentials? credentials; - final TextEditingController taskrcContentController = TextEditingController(); - RxBool isTaskDServerActive = true.obs; - RxBool hideKey = true.obs; - - @override - void onInit() { - super.onInit(); - storage = homeController.storage; - profile.value = storage.profile.uri.pathSegments - .lastWhere((segment) => segment.isNotEmpty); - alias = RxString(splashController.profilesMap[profile.value] ?? ''); - var contents = rc.Taskrc(storage.home.home).readTaskrc(); - if (contents != null) { - server = Taskrc.fromString(contents).server; - credentials = Taskrc.fromString(contents).credentials; - } - if (contents != null) { - server = Taskrc.fromString(contents).server; - credentials = Taskrc.fromString(contents).credentials; - } - configureCredentialString(); - update(); - } - - Future setConfigurationFromFixtureForDebugging() async { - try { - var contents = await rootBundle.loadString('assets/.taskrc'); - rc.Taskrc(storage.home.home).addTaskrc(contents); - var taskrc = Taskrc.fromString(contents); - server = taskrc.server; - credentials = taskrc.credentials; - for (var entry in { - 'taskd.certificate': '.task/first_last.cert.pem', - 'taskd.key': '.task/first_last.key.pem', - 'taskd.ca': '.task/ca.cert.pem', - // 'server.cert': '.task/server.cert.pem', - }.entries) { - var contents = await rootBundle.loadString('assets/${entry.value}'); - storage.guiPemFiles.addPemFile( - key: entry.key, - contents: contents, - name: entry.value.split('/').last, - ); - } - update(); - } catch (e) { - logError(e); - } - } - - /// The [setConfig] function is used to set the configuration of the TaskServer from the clipboard - void setContent(BuildContext context) async { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - final clipboardData = await Clipboard.getData(Clipboard.kTextPlain); - taskrcContentController.text = clipboardData?.text ?? ''; - - // Check if the clipboard data is not empty - if (taskrcContentController.text.isNotEmpty) { - // Add the clipboard data to the taskrc file - storage.taskrc.addTaskrc(taskrcContentController.text); - - // Read the contents of the taskrc file - var contents = rc.Taskrc(storage.home.home).readTaskrc(); - - // Check if the contents were successfully read - if (contents != null) { - // Parse the contents into a Taskrc object - var taskrc = Taskrc.fromString(contents); - - // Check if the server and credentials are present in the Taskrc object - if (taskrc.server != null && taskrc.credentials != null) { - // Update the server and credentials variables - - server = taskrc.server; - credentials = taskrc.credentials; - update(); - - // Handle the case when server or credentials are missing in the Taskrc object - Navigator.pop(context); - - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - 'Success: Server or credentials are verified in taskrc file', - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2))); - } else { - Navigator.pop(context); - // Handle the case when server or credentials are missing in the Taskrc object - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - 'Error: Server or credentials are missing in taskrc file', - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2))); - } - } else { - Navigator.pop(context); - - // Handle the case when there is an error reading the taskrc file - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - 'Error: Failed to read taskrc file', - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - // backgroundColor: AppSettings.isDarkMode - // ? TaskWarriorColors.ksecondaryBackgroundColor - // : TaskWarriorColors.kLightSecondaryBackgroundColor, - duration: const Duration(seconds: 2))); - } - } - } - - RxString? credentialsString = RxString(''); - - void configureCredentialString() { - if (credentials != null) { - String key; - if (hideKey.value) { - key = credentials!.key.replaceAll(RegExp(r'[0-9a-f]'), '*'); - } else { - key = credentials!.key; - } - - credentialsString!.value = - '${credentials!.org}/${credentials!.user}/$key'; - - if (credentialsString!.value.isNotEmpty && server.toString().isNotEmpty) { - //print(credentialsString.value); - taskrcContentController.text = - "taskd.server=$server\ntaskd.credentials=${credentials!.org}/${credentials!.user}/$key"; - - isTaskDServerActive.value = false; - } - } - } - - void onTapPEMWidget(String pem, Storage storagePem) async { - if (pem == 'server.cert') { - storagePem.guiPemFiles.removeServerCert(); - Get.find().update(); - } else { - await setConfig( - storage: storagePem, - key: pem, - ); - update(); - } - } - - void onLongPressPEMWidget(String pem, String? name) { - if (pem != 'server.cert' && name != null) { - storage.guiPemFiles.removePemFile(pem); - update(); - } else { - null; - } - } - - late TutorialCoachMark tutorialCoachMark; - - final GlobalKey configureTaskRC = GlobalKey(); - final GlobalKey configureServerCertificate = GlobalKey(); - - final GlobalKey configureTaskServerKey = GlobalKey(); - final GlobalKey configureYourCertificate = GlobalKey(); - - void initManageTaskServerPageTour() { - tutorialCoachMark = TutorialCoachMark( - targets: addManageTaskServerPage( - configureTaskRC: configureTaskRC, - configureYourCertificate: configureYourCertificate, - configureTaskServerKey: configureTaskServerKey, - configureServerCertificate: configureServerCertificate, - ), - colorShadow: TaskWarriorColors.black, - paddingFocus: 10, - opacityShadow: 1.00, - hideSkip: true, - onFinish: () { - SaveTourStatus.saveManageTaskServerTourStatus(true); - }, - ); - } - - void showManageTaskServerPageTour(BuildContext context) { - Future.delayed( - const Duration(milliseconds: 500), - () { - SaveTourStatus.getManageTaskServerTourStatus().then((value) => { - if (value == false) - { - tutorialCoachMark.show(context: context), - } - else - { - // ignore: avoid_print - print('User has seen this page'), - } - }); - }, - ); - } - - GlobalKey getGlobalKey(String pem) { - switch (pem) { - case 'taskd.ca': - return configureServerCertificate; - case 'taskd.certificate': - return configureYourCertificate; - case 'taskd.key': - return configureTaskServerKey; - default: - return configureServerCertificate; - } - } -} diff --git a/lib/app/modules/manageTaskServer/views/manage_task_server_page_app_bar.dart b/lib/app/modules/manageTaskServer/views/manage_task_server_page_app_bar.dart deleted file mode 100644 index a346930e..00000000 --- a/lib/app/modules/manageTaskServer/views/manage_task_server_page_app_bar.dart +++ /dev/null @@ -1,232 +0,0 @@ -// ignore_for_file: use_build_context_synchronously - -import 'dart:math'; - -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:loggy/loggy.dart'; -import 'package:taskwarrior/app/models/storage/client.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; - -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; - -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -import 'package:url_launcher/url_launcher.dart'; - -import '../controllers/manage_task_server_controller.dart'; - -class ManageTaskServerPageAppBar extends StatelessWidget - implements PreferredSizeWidget { - final ManageTaskServerController controller; - const ManageTaskServerPageAppBar({required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return AppBar( - backgroundColor: TaskWarriorColors.kprimaryBackgroundColor, - titleSpacing: 0, - title: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageConfigureTaskserver, - style: TextStyle( - fontFamily: FontFamily.poppins, - color: TaskWarriorColors.white, - fontSize: TaskWarriorFonts.fontSizeLarge, - ), - ), - Text( - controller.alias.value == '' - ? controller.profile.value - : controller.alias.value, - // style: GoogleFonts.poppins( - // color: TaskWarriorColors.white, - // fontSize: TaskWarriorFonts.fontSizeSmall, - // ), - style: TextStyle( - fontFamily: FontFamily.poppins, - color: TaskWarriorColors.white, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - ], - ), - actions: [ - IconButton( - icon: Icon( - Icons.info, - color: TaskWarriorColors.white, - ), - onPressed: () async { - String url = - "https://github.com/CCExtractor/taskwarrior-flutter?tab=readme-ov-file#taskwarrior-mobile-app"; - if (!await launchUrl(Uri.parse(url))) { - throw Exception('Could not launch $url'); - } - }, - ), - if (kDebugMode) - IconButton( - icon: Icon( - Icons.bug_report, - color: TaskWarriorColors.white, - ), - onPressed: controller.setConfigurationFromFixtureForDebugging, - ), - IconButton( - icon: Icon( - Icons.show_chart, - color: TaskWarriorColors.white, - ), - onPressed: () async { - showDialog( - context: context, - barrierDismissible: false, - builder: (context) { - return Utils.showAlertDialog( - title: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .fetchingStatistics, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const CircularProgressIndicator(), - const SizedBox(height: 16), - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .pleaseWait, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ], - ), - ); - }, - ); - - try { - // Fetch statistics header from storage - var header = - await controller.storage.home.statistics(await client()); - - // Determine the maximum key length for formatting purposes - var maxKeyLength = header.keys - .map((key) => (key as String).length) - .reduce(max); - - // Dismiss the loading dialog - // Navigator.of(context).pop(); - Get.back(); - - // Show statistics in a dialog - await showDialog( - context: context, - builder: (context) => Utils.showAlertDialog( - scrollable: true, - title: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .statistics, - style: const TextStyle(), - ), - content: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Display each key-value pair in the statistics header - for (var key in header.keys.toList()) - Text( - '${'$key:'.padRight(maxKeyLength + 1)} ${header[key]}', - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ], - ), - ], - ), - ), - actions: [ - ElevatedButton( - style: ButtonStyle( - backgroundColor: WidgetStateProperty.all( - tColors.secondaryTextColor!, - ), - ), - onPressed: () { - // Navigator.of(context).pop(); - Get.back(); - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .ok, - style: TextStyle( - color: tColors.secondaryBackgroundColor, - ), - ), - ), - ], - ), - ); - } on Exception catch (e, trace) { - // Dismiss the loading dialog - // Navigator.of(context).pop(); - Get.back(); - - //Displaying Error message. - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - trace.toString().startsWith("#0") - ? SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .pleaseSetupTaskServer - : e.toString(), - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2))); - // Log the error and trace - logError(e, trace); - // Refresh the state of ProfilesWidget - } - }, - ), - ], - leading: BackButton( - color: TaskWarriorColors.white, - ), - ); - } - - @override - Size get preferredSize => AppBar().preferredSize; -} diff --git a/lib/app/modules/manageTaskServer/views/manage_task_server_page_body.dart b/lib/app/modules/manageTaskServer/views/manage_task_server_page_body.dart deleted file mode 100644 index 24686c30..00000000 --- a/lib/app/modules/manageTaskServer/views/manage_task_server_page_body.dart +++ /dev/null @@ -1,496 +0,0 @@ -// ignore_for_file: use_build_context_synchronously -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/modules/manageTaskServer/controllers/manage_task_server_controller.dart'; - -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/models/storage/set_config.dart'; -import 'package:taskwarrior/app/modules/manageTaskServer/views/pem_widget.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; - -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class ManageTaskServerPageBody extends StatelessWidget { - final ManageTaskServerController controller; - const ManageTaskServerPageBody({required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - controller.initManageTaskServerPageTour(); - controller.showManageTaskServerPageTour(context); - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return Padding( - padding: const EdgeInsets.only(left: 20, right: 20), - child: ListView( - // mainAxisAlignment: MainAxisAlignment.start, - // crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - key: controller.configureTaskRC, - padding: const EdgeInsets.only( - top: 10, - bottom: 10, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageConfigureTASKRC, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - const SizedBox(height: 10), - GestureDetector( - onTap: () { - showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: tColors.dialogBackgroundColor, - builder: (context) { - return StatefulBuilder( - builder: - (BuildContext context, StateSetter setState) { - // double heightOfModalBottomSheet = - // MediaQuery.of(context).size.height * 0.6; - - return Padding( - padding: MediaQuery.of(context).viewInsets, - child: Wrap( - children: [ - Container( - // height: heightOfModalBottomSheet, - padding: const EdgeInsets.all(16.0), - decoration: const BoxDecoration( - // color: tileColor, - borderRadius: BorderRadius.vertical( - top: Radius.circular(16.0)), - ), - - child: Column( - crossAxisAlignment: - CrossAxisAlignment.center, - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings - .selectedLanguage) - .sentences - .manageTaskServerPageConfigureTaskRCDialogueBoxTitle, - style: TextStyle( - fontWeight: TaskWarriorFonts.bold, - color: tColors.primaryTextColor, - ), - ), - Text( - SentenceManager( - currentLanguage: AppSettings - .selectedLanguage) - .sentences - .manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - const SizedBox(height: 16.0), - Padding( - padding: const EdgeInsets.all(12.0), - child: SizedBox( - height: Get.height * 0.15, - child: TextField( - style: TextStyle( - color: tColors.primaryTextColor - ), - controller: controller - .taskrcContentController, - maxLines: 8, - decoration: InputDecoration( - counterStyle: TextStyle( - color: tColors.primaryTextColor - ), - suffixIconConstraints: - const BoxConstraints( - maxHeight: 24, - maxWidth: 24, - ), - isDense: true, - suffix: IconButton( - onPressed: () async { - controller - .setContent(context); - }, - icon: const Icon( - Icons.content_paste), - ), - border: - const OutlineInputBorder(), - labelStyle: GoogleFonts.poppins( - color:tColors.primaryTextColor, - ), - labelText: SentenceManager( - currentLanguage: - AppSettings - .selectedLanguage - ) - .sentences - .manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText, - ), - ), - ), - ), - Text( - SentenceManager( - currentLanguage: AppSettings - .selectedLanguage) - .sentences - .manageTaskServerPageConfigureTaskRCDialogueBoxOr, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - FilledButton.tonal( - style: ButtonStyle( - backgroundColor: WidgetStateProperty.all(tColors.secondaryBackgroundColor!) - ), - onPressed: () async { - await setConfig( - storage: controller.storage, - key: 'TASKRC', - ); - setState(() {}); - Get.back(); - }, - child: Text( - SentenceManager( - currentLanguage: AppSettings - .selectedLanguage) - .sentences - .manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - ], - ), - ), - ], - ), - ); - }, - ); - }, - ); - }, - child: Container( - width: MediaQuery.of(context).size.width * 1, - // height: MediaQuery.of(context).size.height * 0.05, - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - // color: tileColor, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: TaskWarriorColors.borderColor), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - controller.taskrcContentController.text.isEmpty - ? SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageSetTaskRC - : SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageTaskRCFileIsVerified, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - Container( - height: 30, - width: 30, - decoration: BoxDecoration( - color: tColors.secondaryTextColor, - shape: BoxShape.circle, - ), - child: Center( - child: controller - .taskrcContentController.text.isNotEmpty - ? Icon( - Icons.check, - color: TaskWarriorColors.green, - ) - : Icon( - Icons.chevron_right_rounded, - color: tColors.secondaryBackgroundColor, - ), - ), - ), - ], - ), - ), - ), - ], - ), - ), - Offstage( - offstage: controller.isTaskDServerActive.value, - child: Column( - children: [ - Padding( - padding: const EdgeInsets.only( - top: 10, - bottom: 10, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .taskServerInfo, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - const SizedBox(height: 10), - GestureDetector( - onTap: () {}, - child: Container( - width: MediaQuery.of(context).size.width * 1, - // height: MediaQuery.of(context).size.height * 0.05, - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - // color: tileColor, - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: TaskWarriorColors.borderColor, - ), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - controller.server == null - ? Text( - SentenceManager( - currentLanguage: AppSettings - .selectedLanguage) - .sentences - .notConfigured, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ) - : Text( - '${controller.server}', - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - Container( - height: 30, - width: 30, - decoration: BoxDecoration( - color: tColors.secondaryTextColor, - shape: BoxShape.circle, - ), - child: Center( - child: controller.server != null - ? Icon( - Icons.check, - color: TaskWarriorColors.green, - ) - : Icon( - Icons.chevron_right_rounded, - color: tColors.secondaryBackgroundColor, - ), - ), - ), - ], - ), - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only( - top: 10, - bottom: 10, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .taskServerCredentials, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - const SizedBox(height: 10), - GestureDetector( - onTap: () {}, - child: Container( - width: MediaQuery.of(context).size.width * 1, - // height: MediaQuery.of(context).size.height * 0.05, - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - // color: tileColor, - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: TaskWarriorColors.borderColor), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - controller.credentialsString == null - ? Text( - SentenceManager( - currentLanguage: AppSettings - .selectedLanguage) - .sentences - .notConfigured, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ) - : SizedBox( - width: - MediaQuery.of(context).size.width * - 0.7, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Text( - controller.credentialsString!.value, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - ), - GestureDetector( - onTap: () { - controller.hideKey.value = - !controller.hideKey.value; - }, - child: Container( - height: 30, - width: 30, - decoration: BoxDecoration( - color: tColors.primaryTextColor, - shape: BoxShape.circle, - ), - child: controller.credentials == null - ? Icon( - Icons.chevron_right_rounded, - color: tColors.primaryBackgroundColor, - ) - : Icon( - controller.hideKey.value - ? Icons.visibility_off - : Icons.visibility, - color: TaskWarriorColors.green, - ), - ), - ), - ], - ), - ), - ), - ], - ), - ), - ], - )), - GetBuilder( - builder: (controller) { - List pemWidgets = []; - for (var pem in [ - 'taskd.certificate', - 'taskd.key', - 'taskd.ca', - if (controller.homeController.serverCertExists.value) - 'server.cert', - ]) { - pemWidgets.add( - PemWidget( - storage: controller.storage, - pem: pem, - optionString: pem == "taskd.certificate" - ? SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageConfigureYourCertificate - : pem == "taskd.key" - ? SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageConfigureTaskserverKey - : pem == "taskd.ca" - ? SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageConfigureServerCertificate - : SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageConfigureServerCertificate, - listTileTitle: pem == "taskd.certificate" - ? SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageSelectCertificate - : pem == "taskd.key" - ? SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageSelectKey - : pem == "taskd.ca" - ? SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageSelectCertificate - : SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .manageTaskServerPageSelectCertificate, - onTapCallBack: controller.onTapPEMWidget, - onLongPressCallBack: controller.onLongPressPEMWidget, - globalKey: controller.getGlobalKey(pem), - ), - ); - } - return Column( - children: pemWidgets, - ); - }, - ) - ], - ), - ); - } -} diff --git a/lib/app/modules/manageTaskServer/views/manage_task_server_view.dart b/lib/app/modules/manageTaskServer/views/manage_task_server_view.dart deleted file mode 100644 index 4e2f5703..00000000 --- a/lib/app/modules/manageTaskServer/views/manage_task_server_view.dart +++ /dev/null @@ -1,24 +0,0 @@ -// ignore_for_file: use_build_context_synchronously - - -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/manageTaskServer/views/manage_task_server_page_app_bar.dart'; -import 'package:taskwarrior/app/modules/manageTaskServer/views/manage_task_server_page_body.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -import '../controllers/manage_task_server_controller.dart'; - -class ManageTaskServerView extends GetView { - const ManageTaskServerView({super.key}); - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return Scaffold( - appBar: ManageTaskServerPageAppBar(controller: controller), - backgroundColor: tColors.primaryBackgroundColor, - body: ManageTaskServerPageBody(controller: controller), - ); - } -} diff --git a/lib/app/modules/manageTaskServer/views/pem_widget.dart b/lib/app/modules/manageTaskServer/views/pem_widget.dart deleted file mode 100644 index 9806ffc0..00000000 --- a/lib/app/modules/manageTaskServer/views/pem_widget.dart +++ /dev/null @@ -1,179 +0,0 @@ -import 'package:crypto/crypto.dart'; -import 'package:flutter/material.dart'; -import 'package:pem/pem.dart'; -import 'package:taskwarrior/app/models/storage.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class PemWidget extends StatelessWidget { - const PemWidget({ - required this.storage, - required this.pem, - super.key, - required this.optionString, - required this.listTileTitle, - required this.onTapCallBack, - required this.onLongPressCallBack, - required this.globalKey, - // required this.manageTaskServerController, - }); - - final Storage storage; - final String pem; - final String optionString; - final String listTileTitle; - final Function(String pem, Storage storagePem) onTapCallBack; - final Function(String pem, String? name) onLongPressCallBack; - final GlobalKey globalKey; - // final ManageTaskServerController manageTaskServerController; - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - String fingerprint(String pemContents) { - var firstCertificateBlock = decodePemBlocks( - PemLabel.certificate, - pemContents, - ).first; - - return '${sha1.convert(firstCertificateBlock)}'; - } - - var contents = storage.guiPemFiles.pemContents(pem); - var name = storage.guiPemFiles.pemFilename(pem); - String identifier = ""; - try { - if (contents != null) { - identifier = fingerprint(contents).toUpperCase(); // Null check removed - } - } catch (e) { - debugPrint(e.toString()); - } - - var tileColor = tColors.primaryBackgroundColor; - return Padding( - key: globalKey, - padding: const EdgeInsets.only( - top: 10, - bottom: 10, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - optionString, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - const SizedBox( - height: 10, - ), - GestureDetector( - onTap: () { - onTapCallBack(pem, storage); - }, - // onTap: () { - // manageTaskServerController.onTapPEMWidget(pem, storage); - // }, - // onTap: (pem == 'server.cert') - // ? () { - // widget.storage.guiPemFiles.removeServerCert(); - // ProfilesWidget.of(context).setState( - // () {}, - // ); - // setState( - // () {}, - // ); - // } - // : () async { - // await setConfig( - // storage: widget.storage, - // key: widget.pem, - // ); - // setState( - // () {}, - // ); - // }, - // onLongPress: () { - // manageTaskServerController.onLongPressPEMWidget(pem, name); - // }, - onLongPress: () { - onLongPressCallBack(pem, name); - }, - // onLongPress: (widget.pem != 'server.cert' && name != null) - // ? () { - // widget.storage.guiPemFiles.removePemFile(widget.pem); - // setState(() {}); - // } - // : null, - child: Container( - width: MediaQuery.of(context).size.width * 1, - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - color: tileColor, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: TaskWarriorColors.borderColor), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - width: MediaQuery.of(context).size.width * 0.7, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - Text( - name == null - ? listTileTitle - : (pem == 'server.cert') - ? '' - : "$name = ", - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - Text( - pem == 'taskd.key' - ? name != null - ? "private.key.pem" - : "" - : identifier, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ], - ), - ), - ), - Container( - height: 30, - width: 30, - decoration: BoxDecoration( - color: tColors.secondaryTextColor, - shape: BoxShape.circle, - ), - child: Center( - child: name == null - ? Icon( - Icons.chevron_right_rounded, - color: tColors.secondaryBackgroundColor, - ) - : Icon( - Icons.check, - color: TaskWarriorColors.green, - ), - ), - ), - ], - ), - ), - ), - ], - ), - ); - } -} diff --git a/lib/app/modules/manage_task_champion_creds/bindings/manage_task_champion_creds_binding.dart b/lib/app/modules/manage_task_champion_creds/bindings/manage_task_champion_creds_binding.dart deleted file mode 100644 index 9f53578e..00000000 --- a/lib/app/modules/manage_task_champion_creds/bindings/manage_task_champion_creds_binding.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:get/get.dart'; - -import '../controllers/manage_task_champion_creds_controller.dart'; - -class ManageTaskChampionCredsBinding extends Bindings { - @override - void dependencies() { - Get.lazyPut( - () => ManageTaskChampionCredsController(), - ); - } -} diff --git a/lib/app/modules/manage_task_champion_creds/controllers/manage_task_champion_creds_controller.dart b/lib/app/modules/manage_task_champion_creds/controllers/manage_task_champion_creds_controller.dart deleted file mode 100644 index 3b658cfe..00000000 --- a/lib/app/modules/manage_task_champion_creds/controllers/manage_task_champion_creds_controller.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -class ManageTaskChampionCredsController extends GetxController { - final encryptionSecretController = TextEditingController(); - final clientIdController = TextEditingController(); - final ccsyncBackendUrlController = TextEditingController(); - - @override - void onInit() { - super.onInit(); - loadCredentials(); - } - - Future loadCredentials() async { - SharedPreferences prefs = await SharedPreferences.getInstance(); - encryptionSecretController.text = prefs.getString('encryptionSecret') ?? ''; - clientIdController.text = prefs.getString('clientId') ?? ''; - ccsyncBackendUrlController.text = prefs.getString('ccsyncBackendUrl') ?? ''; - } - - Future saveCredentials() async { - SharedPreferences prefs = await SharedPreferences.getInstance(); - await prefs.setString('encryptionSecret', encryptionSecretController.text); - await prefs.setString('clientId', clientIdController.text); - await prefs.setString('ccsyncBackendUrl', ccsyncBackendUrlController.text); - } - - @override - void onClose() { - encryptionSecretController.dispose(); - clientIdController.dispose(); - ccsyncBackendUrlController.dispose(); - super.onClose(); - } -} diff --git a/lib/app/modules/manage_task_champion_creds/views/manage_task_champion_creds_view.dart b/lib/app/modules/manage_task_champion_creds/views/manage_task_champion_creds_view.dart deleted file mode 100644 index 7580957b..00000000 --- a/lib/app/modules/manage_task_champion_creds/views/manage_task_champion_creds_view.dart +++ /dev/null @@ -1,144 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:url_launcher/url_launcher.dart'; -import '../controllers/manage_task_champion_creds_controller.dart'; - -class ManageTaskChampionCredsView - extends GetView { - const ManageTaskChampionCredsView({super.key}); - - @override - Widget build(BuildContext context) { - debugPrint("Built ManageTaskChampionCredsView"); - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - - return Scaffold( - appBar: AppBar( - backgroundColor: TaskWarriorColors.kprimaryBackgroundColor, - titleSpacing: 0, - title: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .configureTaskchampion, - style: GoogleFonts.poppins( - color: TaskWarriorColors.white, - fontSize: TaskWarriorFonts.fontSizeLarge, - ), - ), - ], - ), - actions: [ - IconButton( - icon: Icon( - Icons.info, - color: TaskWarriorColors.white, - ), - onPressed: () async { - String url = "https://github.com/its-me-abhishek/ccsync"; - if (!await launchUrl(Uri.parse(url))) { - throw Exception('Could not launch $url'); - } - }, - ), - ], - leading: IconButton( - icon: Icon(Icons.arrow_back, color: TaskWarriorColors.white), - onPressed: () => Get.back(), - ), - ), - backgroundColor: tColors.primaryBackgroundColor, - body: Padding( - padding: const EdgeInsets.only(left: 20, right: 20), - child: ListView( - children: [ - Padding( - padding: const EdgeInsets.only(top: 10, bottom: 10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - TextField( - style: TextStyle(color: tColors.primaryTextColor), - controller: controller.encryptionSecretController, - decoration: InputDecoration( - labelText: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .encryptionSecret, - labelStyle: TextStyle(color: tColors.primaryTextColor), - border: const OutlineInputBorder(), - ), - ), - const SizedBox(height: 10), - TextField( - style: TextStyle(color: tColors.primaryTextColor), - controller: controller.clientIdController, - decoration: InputDecoration( - labelText: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .ccsyncClientId, - labelStyle: TextStyle(color: tColors.primaryTextColor), - border: const OutlineInputBorder(), - ), - ), - const SizedBox(height: 10), - TextField( - style: TextStyle(color: tColors.primaryTextColor), - controller: controller.ccsyncBackendUrlController, - decoration: InputDecoration( - labelText: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .ccsyncBackendUrl, - labelStyle: TextStyle(color: tColors.primaryTextColor), - border: const OutlineInputBorder(), - ), - ), - const SizedBox(height: 20), - ElevatedButton( - onPressed: () async { - await controller.saveCredentials(); - Get.snackbar( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .success, - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .credentialsSavedSuccessfully, - snackPosition: SnackPosition.BOTTOM, - duration: Duration(seconds: 2), - ); - }, - child: const Text('Save Credentials'), - ), - const SizedBox(height: 10), - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tip, - style: TextStyle( - fontSize: 15, - color: tColors.primaryTextColor, - ), - ), - ], - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/app/modules/onboarding/bindings/onboarding_binding.dart b/lib/app/modules/onboarding/bindings/onboarding_binding.dart deleted file mode 100644 index d1eb1edf..00000000 --- a/lib/app/modules/onboarding/bindings/onboarding_binding.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/onboarding/controllers/onboarding_controller.dart'; - -class OnboardingBinding extends Bindings { - @override - void dependencies() { - Get.put( - OnboardingController(), - ); - } -} diff --git a/lib/app/modules/onboarding/controllers/onboarding_controller.dart b/lib/app/modules/onboarding/controllers/onboarding_controller.dart deleted file mode 100644 index fcde375c..00000000 --- a/lib/app/modules/onboarding/controllers/onboarding_controller.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:get/get.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -class OnboardingController extends GetxController { - RxInt currentPage = 0.obs; - int get getCurrentPage => currentPage.value; - - void setCurrentPage(int newCurrentPage) => currentPage.value = newCurrentPage; - // Might cause issue - Future markOnboardingAsCompleted() async { - SharedPreferences prefs = await SharedPreferences.getInstance(); - await prefs.setBool('onboarding_completed', true); - update(); - } -} diff --git a/lib/app/modules/onboarding/views/onboarding_page.dart b/lib/app/modules/onboarding/views/onboarding_page.dart deleted file mode 100644 index cdc1cda6..00000000 --- a/lib/app/modules/onboarding/views/onboarding_page.dart +++ /dev/null @@ -1,59 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; - -class OnboardingPage extends StatelessWidget { - final OnboardingModel onboardingModel; - const OnboardingPage({super.key, required this.onboardingModel}); - - @override - Widget build(BuildContext context) { - return SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(35.0), - child: Column( - children: [ - SizedBox( - height: (Get.height >= 840) ? 120 : 90, - ), - SvgPicture.asset( - onboardingModel.image, - height: Get.width / 100 * 30, - ), - SizedBox( - height: (Get.height >= 840) ? 60 : 30, - ), - Text( - onboardingModel.title, - textAlign: TextAlign.center, - style: TextStyle( - fontWeight: TaskWarriorFonts.semiBold, - fontFamily: FontFamily.poppins, - fontSize: (Get.width <= 550) ? 30 : 35, - color: Colors.black, - ), - ), - SizedBox( - height: Get.height * 2 / 100, - ), - Text( - onboardingModel.desc, - style: TextStyle( - fontWeight: TaskWarriorFonts.light, - fontSize: (Get.width <= 550) ? 17 : 17, - color: Colors.black, - ), - textAlign: TextAlign.center, - ), - SizedBox( - height: Get.height * 2 / 100, - ) - ], - ), - ), - ); - } -} diff --git a/lib/app/modules/onboarding/views/onboarding_page_bottom_section.dart b/lib/app/modules/onboarding/views/onboarding_page_bottom_section.dart deleted file mode 100644 index 4fd50daa..00000000 --- a/lib/app/modules/onboarding/views/onboarding_page_bottom_section.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/modules/onboarding/controllers/onboarding_controller.dart'; -import 'package:taskwarrior/app/modules/onboarding/views/onboarding_page_start_button.dart'; -import 'package:taskwarrior/app/modules/onboarding/views/onborading_page_animated_container.dart'; -import 'package:taskwarrior/app/modules/onboarding/views/onborading_page_next_button.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; - -class OnboardingPageBottomSection extends StatelessWidget { - final OnboardingController controller; - final PageController pageController; - const OnboardingPageBottomSection({super.key, required this.controller,required this.pageController}); - - @override - Widget build(BuildContext context) { - return Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: List.generate( - contents.length, - (int index) => OnboardingPageAnimatedContainer( - controller: controller, - index: index, - ), - ), - ), - controller.getCurrentPage + 1 == contents.length - ? OnboardingPageStartButton(controller: controller) - : OnboardingPageNextButton( - pageController: pageController, - ), - ], - ); - } -} diff --git a/lib/app/modules/onboarding/views/onboarding_page_start_button.dart b/lib/app/modules/onboarding/views/onboarding_page_start_button.dart deleted file mode 100644 index 4eaa7cb7..00000000 --- a/lib/app/modules/onboarding/views/onboarding_page_start_button.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/onboarding/controllers/onboarding_controller.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -class OnboardingPageStartButton extends StatelessWidget { - final OnboardingController controller; - const OnboardingPageStartButton({super.key, required this.controller}); - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.all(30), - child: ElevatedButton( - onPressed: () { - controller.markOnboardingAsCompleted(); - Get.offNamed(Routes.PERMISSION); - }, - style: ElevatedButton.styleFrom( - backgroundColor: TaskWarriorColors.black, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(50), - ), - padding: (Get.width <= 550) - ? const EdgeInsets.symmetric(horizontal: 100, vertical: 20) - : EdgeInsets.symmetric(horizontal: Get.width * 0.2, vertical: 25), - textStyle: TextStyle( - fontFamily: FontFamily.poppins, - fontSize: (Get.width <= 550) ? 13 : 17, - ), - ), - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .onboardingStart, - style: TextStyle( - fontWeight: TaskWarriorFonts.light, - fontSize: (Get.width <= 550) ? 17 : 17, - color: Colors.white, - ), - ), - ), - ); - } -} diff --git a/lib/app/modules/onboarding/views/onboarding_view.dart b/lib/app/modules/onboarding/views/onboarding_view.dart deleted file mode 100644 index 99478cb1..00000000 --- a/lib/app/modules/onboarding/views/onboarding_view.dart +++ /dev/null @@ -1,53 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/onboarding/views/onboarding_page.dart'; -import 'package:taskwarrior/app/modules/onboarding/views/onboarding_page_bottom_section.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; - -import '../controllers/onboarding_controller.dart'; - -class OnboardingView extends GetView { - const OnboardingView({super.key}); - @override - Widget build(BuildContext context) { - double height = Get.height; - - PageController pageController = PageController(); - return Obx(() => Scaffold( - backgroundColor: contents[controller.getCurrentPage].colors, - body: SafeArea( - child: Column( - children: [ - Expanded( - flex: 5, - child: PageView.builder( - physics: const BouncingScrollPhysics(), - controller: pageController, - onPageChanged: (value) { - controller.setCurrentPage(value); - }, - itemCount: contents.length, - itemBuilder: (context, i) { - return OnboardingPage(onboardingModel: contents[i]); - }, - ), - ), - SizedBox( - height: height * 5 / 100, - ), - Expanded( - flex: 1, - child: SingleChildScrollView( - child: OnboardingPageBottomSection( - controller: controller, - pageController: pageController, - ), - ), - ), - ], - ), - ), - ),); - } -} diff --git a/lib/app/modules/onboarding/views/onborading_page_animated_container.dart b/lib/app/modules/onboarding/views/onborading_page_animated_container.dart deleted file mode 100644 index d8f68768..00000000 --- a/lib/app/modules/onboarding/views/onborading_page_animated_container.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/modules/onboarding/controllers/onboarding_controller.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; - -class OnboardingPageAnimatedContainer extends StatelessWidget { - final OnboardingController controller; - final int index; - const OnboardingPageAnimatedContainer( - {super.key, required this.controller, required this.index}); - - @override - Widget build(BuildContext context) { - return AnimatedContainer( - duration: const Duration(milliseconds: 200), - decoration: BoxDecoration( - borderRadius: const BorderRadius.all(Radius.circular(50)), - color: TaskWarriorColors.black, - ), - margin: const EdgeInsets.only(right: 5), - height: 10, - curve: Curves.easeIn, - width: controller.getCurrentPage == index ? 20 : 10, - ); - } -} diff --git a/lib/app/modules/onboarding/views/onborading_page_next_button.dart b/lib/app/modules/onboarding/views/onborading_page_next_button.dart deleted file mode 100644 index ba5bd088..00000000 --- a/lib/app/modules/onboarding/views/onborading_page_next_button.dart +++ /dev/null @@ -1,76 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -class OnboardingPageNextButton extends StatelessWidget { - final PageController pageController; - const OnboardingPageNextButton({super.key, required this.pageController}); - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.all(30), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - TextButton( - onPressed: () { - pageController.jumpToPage(2); - }, - style: TextButton.styleFrom( - elevation: 0, - textStyle: TextStyle( - fontWeight: TaskWarriorFonts.semiBold, - fontSize: (Get.width <= 550) ? 13 : 17, - ), - ), - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .onboardingSkip, - style: TextStyle( - fontWeight: TaskWarriorFonts.bold, - color: TaskWarriorColors.black, - fontFamily: FontFamily.poppins, - fontSize: (Get.width <= 550) ? 12 : 12, - ), - ), - ), - ElevatedButton( - onPressed: () { - pageController.nextPage( - duration: const Duration(milliseconds: 200), - curve: Curves.easeIn, - ); - }, - style: ElevatedButton.styleFrom( - backgroundColor: TaskWarriorColors.black, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(50), - ), - elevation: 0, - padding: (Get.width <= 550) - ? const EdgeInsets.symmetric(horizontal: 30, vertical: 20) - : const EdgeInsets.symmetric(horizontal: 30, vertical: 25), - textStyle: TextStyle(fontSize: (Get.width <= 550) ? 13 : 17), - ), - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .onboardingNext, - style: TextStyle( - fontWeight: TaskWarriorFonts.light, - color: TaskWarriorColors.white, - fontFamily: FontFamily.poppins, - fontSize: (Get.width <= 550) ? 12 : 12, - ), - ), - ), - ], - ), - ); - } -} diff --git a/lib/app/modules/permission/bindings/permission_binding.dart b/lib/app/modules/permission/bindings/permission_binding.dart deleted file mode 100644 index f1aaa7da..00000000 --- a/lib/app/modules/permission/bindings/permission_binding.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:get/get.dart'; - -import '../controllers/permission_controller.dart'; - -class PermissionBinding extends Bindings { - @override - void dependencies() { - Get.lazyPut( - () => PermissionController(), - ); - } -} diff --git a/lib/app/modules/permission/controllers/permission_controller.dart b/lib/app/modules/permission/controllers/permission_controller.dart deleted file mode 100644 index 229656c1..00000000 --- a/lib/app/modules/permission/controllers/permission_controller.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:permission_handler/permission_handler.dart'; -import 'package:taskwarrior/app/utils/permissions/permissions_manager.dart'; - -class PermissionController extends GetxController { - final RxBool isStorageGranted = false.obs; - final RxBool isNotificationGranted = false.obs; - final RxBool isExteternalStorageGranted = false.obs; - final RxBool isLoading = false.obs; - - @override - void onInit() { - super.onInit(); - checkPermissions(); - } - - Future checkPermissions() async { - try { - isStorageGranted.value = await Permission.storage.status.isGranted; - isNotificationGranted.value = - await Permission.notification.status.isGranted; - isExteternalStorageGranted.value = - await Permission.manageExternalStorage.status.isGranted; - } catch (e) { - debugPrint('Error checking permissions: $e'); - } - } - - Future requestPermissions() async { - try { - isLoading.value = true; - - if (!isStorageGranted.value && - !isNotificationGranted.value && - !isExteternalStorageGranted.value) { - await PermissionsManager.requestAllPermissions(); - } - Get.offNamed('/home'); - } catch (e) { - debugPrint('Error requesting permissions: $e'); - } finally { - isLoading.value = false; - } - } - - void gotoHome() async { - try { - await Get.offNamed('/home'); - } catch (e) { - debugPrint('Error opening home screen: $e'); - } - } -} diff --git a/lib/app/modules/permission/views/permission_section.dart b/lib/app/modules/permission/views/permission_section.dart deleted file mode 100644 index f6f042b4..00000000 --- a/lib/app/modules/permission/views/permission_section.dart +++ /dev/null @@ -1,59 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class PermissionSection extends StatelessWidget { - final IconData icon; - final String title; - final String description; - - const PermissionSection({ - super.key, - required this.icon, - required this.title, - required this.description, - }); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Container( - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - border: Border.all( - color: tColors.secondaryBackgroundColor!, - ), - borderRadius: BorderRadius.circular(12), - color: tColors.dialogBackgroundColor, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Icon(icon, color: TaskWarriorColors.black), - const SizedBox(width: 12), - Expanded( - child: Text( - title, - style: Theme.of(context).textTheme.titleMedium?.copyWith( - fontWeight: FontWeight.bold, - color: tColors.primaryTextColor, - ), - ), - ), - ], - ), - const SizedBox(height: 8), - Text( - description, - style: Theme.of(context).textTheme.bodyMedium?.copyWith( - color: tColors.secondaryTextColor, - ), - ), - ], - ), - ); - } -} diff --git a/lib/app/modules/permission/views/permission_view.dart b/lib/app/modules/permission/views/permission_view.dart deleted file mode 100644 index c352001c..00000000 --- a/lib/app/modules/permission/views/permission_view.dart +++ /dev/null @@ -1,142 +0,0 @@ -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/permission/views/permission_section.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import '../controllers/permission_controller.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; - -class PermissionView extends GetView { - const PermissionView({super.key}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - if (Platform.isLinux || Platform.isMacOS || Platform.isWindows) { - WidgetsBinding.instance.addPostFrameCallback((_) { - Get.offAllNamed('/home'); - }); - return const SizedBox.shrink(); - } - - return Scaffold( - backgroundColor: tColors.primaryBackgroundColor, - body: SafeArea( - child: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(24.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const SizedBox(height: 24), - Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .permissionPageTitle, - style: Theme.of(context).textTheme.headlineMedium?.copyWith( - fontWeight: FontWeight.bold, - color: tColors.primaryTextColor, - ), - textAlign: TextAlign.center, - ), - const SizedBox(height: 32), - Icon( - Icons.security, - size: 64, - color: tColors.primaryTextColor, - ), - const SizedBox(height: 32), - PermissionSection( - icon: Icons.folder_outlined, - title: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .storagePermissionTitle, - description: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .storagePermissionDescription, - ), - const SizedBox(height: 24), - PermissionSection( - icon: Icons.notifications_outlined, - title: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .notificationPermissionTitle, - description: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .notificationPermissionDescription, - ), - const SizedBox(height: 24), - Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .privacyStatement, - style: Theme.of(context) - .textTheme - .bodyMedium - ?.copyWith(color: tColors.primaryTextColor), - textAlign: TextAlign.center, - ), - const SizedBox(height: 48), - Obx(() => ElevatedButton( - onPressed: controller.isLoading.value - ? null - : controller.requestPermissions, - style: ElevatedButton.styleFrom( - padding: const EdgeInsets.all(16), - backgroundColor: tColors.primaryBackgroundColor, - foregroundColor: tColors.primaryTextColor, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12), - ), - ), - child: controller.isLoading.value - ? CircularProgressIndicator( - color: tColors.primaryBackgroundColor, - ) - : Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .grantPermissions, - style: TextStyle( - color: tColors.primaryTextColor, - fontSize: 16, - ), - ), - )), - const SizedBox(height: 16), - TextButton( - onPressed: () => controller.gotoHome(), - style: ButtonStyle( - backgroundColor: - WidgetStateProperty.all(TaskWarriorColors.grey), - ), - child: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .managePermissionsLater, - style: Theme.of(context).textTheme.bodySmall?.copyWith( - color: tColors.primaryTextColor, - ), - textAlign: TextAlign.center, - ), - ), - const SizedBox(height: 24), - ], - ), - ), - ), - ), - ); - } -} diff --git a/lib/app/modules/profile/bindings/profile_binding.dart b/lib/app/modules/profile/bindings/profile_binding.dart deleted file mode 100644 index 92960891..00000000 --- a/lib/app/modules/profile/bindings/profile_binding.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dart'; - -import '../controllers/profile_controller.dart'; - -class ProfileBinding extends Bindings { - @override - void dependencies() { - Get.put( - ProfileController(), - ); - Get.put( - SplashController(), - ); - } -} diff --git a/lib/app/modules/profile/controllers/profile_controller.dart b/lib/app/modules/profile/controllers/profile_controller.dart deleted file mode 100644 index 50e6e5cd..00000000 --- a/lib/app/modules/profile/controllers/profile_controller.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dart'; -import 'package:taskwarrior/app/tour/profile_page_tour.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class ProfileController extends GetxController { - var profilesWidget = Get.find(); - late RxMap profilesMap; - late RxString currentProfile; - @override - void onInit() { - profilesMap = profilesWidget.profilesMap; - currentProfile = profilesWidget.currentProfile; - super.onInit(); - } - - late TutorialCoachMark tutorialCoachMark; - - final GlobalKey currentProfileKey = GlobalKey(); - - final GlobalKey addNewProfileKey = GlobalKey(); - final GlobalKey manageSelectedProfileKey = GlobalKey(); - - void initProfilePageTour() { - tutorialCoachMark = TutorialCoachMark( - targets: addProfilePage( - currentProfileKey: currentProfileKey, - - addNewProfileKey: addNewProfileKey, - manageSelectedProfileKey: manageSelectedProfileKey, - ), - colorShadow: TaskWarriorColors.black, - paddingFocus: 10, - opacityShadow: 1.00, - hideSkip: true, - onFinish: () { - SaveTourStatus.saveProfileTourStatus(true); - }, - ); - } - - void showProfilePageTour(BuildContext context) { - Future.delayed( - const Duration(milliseconds: 500), - () { - SaveTourStatus.getProfileTourStatus().then((value) => { - if (value == false) - { - tutorialCoachMark.show(context: context), - } - else - { - // ignore: avoid_print - print('User has seen this page'), - } - }); - }, - ); - } -} diff --git a/lib/app/modules/profile/views/deleteprofiledialog.dart b/lib/app/modules/profile/views/deleteprofiledialog.dart deleted file mode 100644 index e44b2f14..00000000 --- a/lib/app/modules/profile/views/deleteprofiledialog.dart +++ /dev/null @@ -1,99 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class DeleteProfileDialog extends StatelessWidget { - const DeleteProfileDialog({ - required this.profile, - required this.context, - required this.profiles, - required this.profileName, - super.key, - }); - - final String profile; - final BuildContext context; - final RxMap profiles; - final String? profileName; - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return Center( - child: SingleChildScrollView( - child: Center( - child: Utils.showAlertDialog( - scrollable: true, - title: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .profilePageDeleteProfile, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - // content: TextField(controller: controller), - actions: [ - TextButton( - onPressed: () { - debugPrint("PROFILE$profile${profileName!}"); - profiles[profile] = profileName; - Get.back(); - }, - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .cancel, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - TextButton( - onPressed: () { - try { - Get.find().deleteProfile(profile); - // Navigator.of(context).pop(); - Get.find().refreshTaskWithNewProfile(); - Get.back(); - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.profilePageProfile}: ${profile.characters} ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.profileDeletedSuccessfully}', - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2))); - } catch (e) { - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.profilePageProfile}: ${profile.characters} ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.profileDeletionFailed}', - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2))); - } - }, - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .profileDeleteConfirmation, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/app/modules/profile/views/profile_view.dart b/lib/app/modules/profile/views/profile_view.dart deleted file mode 100644 index 17c0ce5d..00000000 --- a/lib/app/modules/profile/views/profile_view.dart +++ /dev/null @@ -1,211 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/models/storage/savefile.dart'; -import 'package:taskwarrior/app/modules/profile/views/deleteprofiledialog.dart'; -import 'package:taskwarrior/app/modules/profile/views/profiles_list.dart'; -import 'package:taskwarrior/app/modules/profile/views/renameprofiledialog.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; - -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -import '../controllers/profile_controller.dart'; - -class ProfileView extends GetView { - const ProfileView({super.key}); - @override - Widget build(BuildContext context) { - debugPrint("Controller Value: ${controller.currentProfile.value}"); - controller.initProfilePageTour(); - controller.showProfilePageTour(context); - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Scaffold( - appBar: AppBar( - backgroundColor: TaskWarriorColors.appBarColor, - title: Obx(() => Text( - controller.profilesMap.length == 1 - ? SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .profilePageProfile - : SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .profilePageProfiles, - style: GoogleFonts.poppins( - color: TaskWarriorColors.white, - ), - )), - leading: IconButton( - onPressed: () { - Get.back(); - }, - icon: Icon( - Icons.chevron_left, - color: TaskWarriorColors.white, - size: 30, - ), - ), - actions: [ - TextButton( - onPressed: controller.profilesWidget.addProfile, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Icon( - Icons.add, - color: Colors.white, - ), - const SizedBox( - width: 10, - ), - Text('Add Profile', style: TextStyle(color: Colors.white)), - ], - ), - ), - ], - ), - backgroundColor: tColors.primaryBackgroundColor, - body: Obx(() => ProfilesList( - currentProfileKey: controller.currentProfileKey, - addNewProfileKey: controller.addNewProfileKey, - manageSelectedProfileKey: controller.manageSelectedProfileKey, - controller.profilesMap, - controller.currentProfile.value, - controller.profilesWidget.addProfile, - controller.profilesWidget.selectProfile, - (profile) => showDialog( - context: context, - builder: (context) => Center( - child: RenameProfileDialog( - profile: profile, - alias: - controller.profilesMap[controller.currentProfile.value], - context: context, - ), - ), - ), - () => Get.toNamed(Routes.MANAGE_TASK_SERVER), - (profile) { - var tasks = - controller.profilesWidget.getStorage(profile).data.export(); - var now = DateTime.now() - .toIso8601String() - .replaceAll(RegExp(r'[-:]'), '') - .replaceAll(RegExp(r'\..*'), ''); - - showDialog( - context: context, - builder: (BuildContext context) { - return Utils.showAlertDialog( - title: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .profilePageExportTasksDialogueTitle, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - content: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .profilePageExportTasksDialogueSubtitle, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - actions: [ - TextButton( - child: Text( - "JSON", - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - onPressed: () { - // Navigator.of(context).pop(); - Get.back(); - exportTasks( - contents: tasks, - suggestedName: 'tasks-$now.json', - ); - }, - ), - TextButton( - child: Text( - "TXT", - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - onPressed: () { - // Navigator.of(context).pop(); - Get.back(); - exportTasks( - contents: tasks, - suggestedName: 'tasks-$now.txt', - ); - }, - ), - ], - ); - }, - ); - }, - (profile) { - try { - controller.profilesWidget.copyConfigToNewProfile( - profile, - ); - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .profileConfigCopied, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2))); - } catch (e) { - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .profileConfigCopyFailed, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.primaryBackgroundColor, - duration: const Duration(seconds: 2))); - } - }, - (profile) { - String? profileName = controller.profilesMap[profile]; - controller.profilesMap.remove(profile); - showDialog( - context: context, - builder: (context) => DeleteProfileDialog( - profile: profile, - context: context, - profiles: controller.profilesMap, - profileName: profileName, - ), - ); - }, - )), - ); - } -} diff --git a/lib/app/modules/profile/views/profiles_list.dart b/lib/app/modules/profile/views/profiles_list.dart deleted file mode 100644 index 0f0c90f1..00000000 --- a/lib/app/modules/profile/views/profiles_list.dart +++ /dev/null @@ -1,137 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -class ProfilesList extends StatelessWidget { - const ProfilesList( - this.profilesMap, - this.currentProfile, - this.addProfile, - this.selectProfile, - this.rename, - this.configure, - this.export, - this.copy, - this.delete, { - required this.currentProfileKey, - required this.addNewProfileKey, - required this.manageSelectedProfileKey, - super.key, - }); - - final RxMap profilesMap; - final String currentProfile; - final void Function() addProfile; - final void Function(String) selectProfile; - final void Function(String) rename; - final void Function() configure; - final void Function(String) export; - final void Function(String) copy; - final void Function(dynamic) delete; - final GlobalKey currentProfileKey; - final GlobalKey addNewProfileKey; - final GlobalKey manageSelectedProfileKey; - - @override - Widget build(BuildContext context) { - return Obx(() => ListView.builder( - itemCount: profilesMap.values.toList().length, - itemBuilder: (context, index) { - List pnames = profilesMap.values.toList(); - List pid = profilesMap.keys.toList(); - final item = pnames[index]; - final profileId = - pid[index]; // Store pid[index] in a variable for clarity - - return Dismissible( - key: Key(profileId), - direction: DismissDirection.endToStart, - onDismissed: (direction) { - delete(profileId); - }, - background: Container( - color: Colors.red, - alignment: Alignment.centerRight, - padding: const EdgeInsets.only(right: 20.0), - child: const Icon(Icons.delete, color: Colors.white), - ), - child: ExpansionTile( - // Use ExpansionTile here - title: Text( - item, - style: TextStyle( - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor, - ), - ), - trailing: Row( - mainAxisSize: MainAxisSize.min, - children: [ - IconButton( - icon: Icon(Icons.edit, - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor), - onPressed: () => rename(profileId), - ), - // The settings icon will now trigger the ExpansionTile's expansion/collapse - // No need for a separate IconButton for settings if ExpansionTile handles it - currentProfile != profileId - ? IconButton( - onPressed: () { - selectProfile(profileId); - }, - icon: Icon(Icons.check, - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor), - ) - : IconButton( - onPressed: () { - configure(); - }, - icon: Icon(Icons.key, - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor), - ), - ], - ), - children: [ - ListTile( - leading: Icon(Icons.file_copy, - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor), - title: Text('Export Tasks', - style: TextStyle( - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor)), - onTap: () { - export(profileId); - }, - ), - ListTile( - leading: Icon(Icons.copy, - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor), - title: Text('Copy to new Profile', - style: TextStyle( - color: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryTextColor - : TaskWarriorColors.kLightPrimaryTextColor)), - onTap: () { - copy(profileId); - }, - ), - ], - ), - ); - }, - )); - } -} diff --git a/lib/app/modules/profile/views/renameprofiledialog.dart b/lib/app/modules/profile/views/renameprofiledialog.dart deleted file mode 100644 index 47ef5569..00000000 --- a/lib/app/modules/profile/views/renameprofiledialog.dart +++ /dev/null @@ -1,82 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; - -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class RenameProfileDialog extends StatelessWidget { - const RenameProfileDialog({ - required this.profile, - required this.alias, - required this.context, - super.key, - }); - - final String profile; - final String? alias; - final BuildContext context; - - @override - Widget build(BuildContext context) { - var controller = TextEditingController(text: alias); - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return SingleChildScrollView( - child: Center( - child: Utils.showAlertDialog( - scrollable: true, - title: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .profilePageRenameAliasDialogueBoxTitle, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - content: TextField( - style: TextStyle( - color: tColors.primaryTextColor, - ), - controller: controller), - actions: [ - TextButton( - onPressed: () { - // Navigator.of(context).pop(); - Get.back(); - }, - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .profilePageRenameAliasDialogueBoxCancel, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - TextButton( - onPressed: () { - Get.find().renameProfile( - profile: profile, - alias: controller.text, - ); - // Navigator.of(context).pop(); - Get.back(); - }, - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .profilePageRenameAliasDialogueBoxSubmit, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/app/modules/reports/bindings/reports_binding.dart b/lib/app/modules/reports/bindings/reports_binding.dart deleted file mode 100644 index 7fe60f9c..00000000 --- a/lib/app/modules/reports/bindings/reports_binding.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:get/get.dart'; - -import '../controllers/reports_controller.dart'; - -class ReportsBinding extends Bindings { - @override - void dependencies() { - Get.lazyPut( - () => ReportsController(), - ); - } -} diff --git a/lib/app/modules/reports/controllers/reports_controller.dart b/lib/app/modules/reports/controllers/reports_controller.dart deleted file mode 100644 index d46ee206..00000000 --- a/lib/app/modules/reports/controllers/reports_controller.dart +++ /dev/null @@ -1,518 +0,0 @@ -import 'dart:io'; -import 'package:home_widget/home_widget.dart'; -import 'dart:ui'; -import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; -import 'package:get/get.dart'; -import 'package:syncfusion_flutter_charts/charts.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/models/storage.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dart'; -import 'package:taskwarrior/app/tour/reports_page_tour.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:path_provider/path_provider.dart'; -import 'package:flutter/services.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class ReportsController extends GetxController - with GetTickerProviderStateMixin { - late TabController tabController; - final GlobalKey daily = GlobalKey(); - final GlobalKey weekly = GlobalKey(); - final GlobalKey monthly = GlobalKey(); - late TaskDatabase taskDatabase; - var isSaved = false.obs; - late TutorialCoachMark tutorialCoachMark; - - var selectedIndex = 0.obs; - var allData = [].obs; - late Storage storage; - var storageWidget; - - final GlobalKey _chartKey = GlobalKey(); - - GlobalKey get chartKey => _chartKey; - - Future captureChart() async { - try { - if (chartKey.currentContext == null) { - print('Error: chartKey.currentContext is null'); - return; - } - - RenderRepaintBoundary? boundary = - chartKey.currentContext!.findRenderObject() as RenderRepaintBoundary?; - - if (boundary == null) { - print('Error: boundary is null'); - return; - } - - final image = await boundary.toImage(); - final byteData = await image.toByteData(format: ImageByteFormat.png); - - if (byteData == null) { - print('Error: byteData is null'); - return; - } - - final pngBytes = byteData.buffer.asUint8List(); - - // Get the documents directory - final directory = await getApplicationDocumentsDirectory(); - final imagePath = '${directory.path}/daily_burndown_chart.png'; - - // Save the image to the documents directory - File imgFile = File(imagePath); - await imgFile.writeAsBytes(pngBytes); - print('Image saved to: $imagePath'); - - // Save the image path to HomeWidget - await HomeWidget.saveWidgetData('chart_image', imagePath); - - // Verify that the file exists - if (await imgFile.exists()) { - print('Image file exists!'); - } else { - print('Image file does not exist!'); - } - - // Add a delay before sending the broadcast - await Future.delayed(const Duration(milliseconds: 500)); - - // Send a broadcast to update the widget - const platform = MethodChannel('com.example.taskwarrior/widget'); - try { - await platform.invokeMethod('updateWidget'); - } on PlatformException catch (e) { - print("Failed to Invoke: '${e.message}'."); - } - } catch (e) { - print('Error capturing chart: $e'); - } - } - - // void _initReportsTour() { - // tutorialCoachMark = TutorialCoachMark( - // targets: reportsDrawer( - // daily: daily, - // weekly: weekly, - // monthly: monthly, - // ), - // colorShadow: TaskWarriorColors.black, - // paddingFocus: 10, - // opacityShadow: 0.8, - // hideSkip: true, - // onFinish: () { - // SaveReportsTour().saveReportsTourStatus(); - // }, - // ); - // } - - // void showReportsTour() { - // Future.delayed( - // const Duration(seconds: 2), - // () { - // SaveReportsTour().getReportsTourStatus().then((value) => { - // if (value == false) - // { - // tutorialCoachMark.show(context: Get.context!), - // } - // else - // { - // // ignore: avoid_print - // print('User has seen this page'), - // } - // }); - // }, - // ); - // } - - void initReportsTour() { - tutorialCoachMark = TutorialCoachMark( - targets: reportsDrawer( - daily: daily, - weekly: weekly, - monthly: monthly, - ), - colorShadow: TaskWarriorColors.black, - paddingFocus: 10, - opacityShadow: 0.8, - hideSkip: true, - onFinish: () { - SaveTourStatus.saveReportsTourStatus(true); - }, - ); - } - - void showReportsTour(BuildContext context) { - Future.delayed( - const Duration(milliseconds: 500), - () { - SaveTourStatus.getReportsTourStatus().then((value) => { - if (value == false) - { - tutorialCoachMark.show(context: context), - } - else - { - // ignore: avoid_print - print('User has seen this page'), - } - }); - }, - ); - } - - @override - void onInit() { - super.onInit(); - initDailyReports(); - initWeeklyReports(); - initMonthlyReports(); - - tabController = TabController(length: 3, vsync: this); - - Future.delayed(Duration.zero, () { - var currentProfile = Get.find().currentProfile; - Directory baseDirectory = Get.find().baseDirectory(); - storage = - Storage(Directory('${baseDirectory.path}/profiles/$currentProfile')); - - allData.value = storage.data.allData(); - }); - } - - /// This method is used to get the daily burn down data - late TooltipBehavior dailyBurndownTooltipBehaviour; - - ///this method is used to get the weekly burn down data - late TooltipBehavior weeklyBurndownTooltipBehaviour; - - // daily report - - void initDailyReports() { - ///initialize the _dailyBurndownTooltipBehaviour tooltip behavior - dailyBurndownTooltipBehaviour = TooltipBehavior( - enable: true, - builder: (dynamic data, dynamic point, dynamic series, int pointIndex, - int seriesIndex) { - final String date = data.x; - final int pendingCount = data.y1; - final int completedCount = data.y2; - - return Container( - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(5), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - 'Date: $date', - // style: GoogleFonts.poppins( - // fontWeight: TaskWarriorFonts.bold, - // ), - - style: const TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - color: Colors.black), - ), - Text( - 'Pending: $pendingCount', - style: const TextStyle( - fontWeight: TaskWarriorFonts.bold, color: Colors.black), - ), - Text( - 'Completed: $completedCount', - style: const TextStyle( - fontWeight: TaskWarriorFonts.bold, color: Colors.black), - ), - ], - ), - ); - }, - ); - - ///initialize the storage widget - Future.delayed(Duration.zero, () { - storageWidget = Get.find(); - var currentProfile = Get.find().currentProfile; - - Directory baseDirectory = Get.find().baseDirectory(); - storage = Storage( - Directory('${baseDirectory.path}/profiles/$currentProfile'), - ); - - ///fetch all data contains all the tasks - allData.value = storage.data.allData(); - - ///check if allData is not empty - if (allData.isNotEmpty) { - ///sort the data by daily burn down - sortBurnDownDaily(); - } - }); - } - - /// dailyInfo is a map that contains the daily burn down data - /// The key is the date (formatted as "MM-dd") and the value is a map - /// containing the pending and completed tasks count for that day. - RxMap> dailyInfo = >{}.obs; - - void sortBurnDownDaily() { - // Initialize dailyInfo map - dailyInfo.value = {}; - - // Sort allData by entry date in ascending order - allData.sort((a, b) => a.entry.compareTo(b.entry)); - - /// Loop through allData and get the date - for (int i = 0; i < allData.length; i++) { - final String date = Utils.formatDate(allData[i].entry, 'MM-dd'); - - /// Check if dailyInfo contains the date - if (dailyInfo.containsKey(date)) { - /// Check if the status is pending or completed - if (allData[i].status == 'pending') { - /// If the status is pending, then add 1 to the pending count - dailyInfo[date]!['pending'] = (dailyInfo[date]!['pending'] ?? 0) + 1; - } else if (allData[i].status == 'completed') { - /// If the status is completed, then add 1 to the completed count - dailyInfo[date]!['completed'] = - (dailyInfo[date]!['completed'] ?? 0) + 1; - } - } else { - /// If dailyInfo does not contain the date - dailyInfo[date] = { - 'pending': allData[i].status == 'pending' ? 1 : 0, - 'completed': allData[i].status == 'completed' ? 1 : 0, - }; - } - } - - debugPrint("dailyInfo $dailyInfo"); - } - - // weekly reports - - ///weeklyInfo is a map that contains the weekly burn down data - ///first int holds the week value - ///the second map holds the pending and completed tasks - ///the key is the status and the value is the count - RxMap> weeklyInfo = >{}.obs; - - void sortBurnDownWeekLy() { - // Initialize weeklyInfo map - weeklyInfo.value = {}; - - // Sort allData by entry date in ascending order - allData.sort((a, b) => a.entry.compareTo(b.entry)); - - ///loop through allData and get the week number - for (int i = 0; i < allData.length; i++) { - final int weekNumber = Utils.getWeekNumbertoInt(allData[i].entry); - - ///check if weeklyInfo contains the week number - if (weeklyInfo.containsKey(weekNumber)) { - ///check if the status is pending or completed - if (allData[i].status == 'pending') { - ///if the status is pending then add 1 to the pending count - weeklyInfo[weekNumber]!['pending'] = - (weeklyInfo[weekNumber]!['pending'] ?? 0) + 1; - } else if (allData[i].status == 'completed') { - ///if the status is completed then add 1 to the completed count - weeklyInfo[weekNumber]!['completed'] = - (weeklyInfo[weekNumber]!['completed'] ?? 0) + 1; - } - } else { - ///if weeklyInfo does not contain the week number - weeklyInfo[weekNumber] = { - 'pending': allData[i].status == 'pending' ? 1 : 0, - 'completed': allData[i].status == 'completed' ? 1 : 0, - }; - } - } - - debugPrint("weeklyInfo $weeklyInfo"); - } - - void initWeeklyReports() { - ///initialize the _weeklyBurndownTooltipBehaviour tooltip behavior - weeklyBurndownTooltipBehaviour = TooltipBehavior( - enable: true, - builder: (dynamic data, dynamic point, dynamic series, int pointIndex, - int seriesIndex) { - final String weekNumber = data.x; - final int pendingCount = data.y1; - final int completedCount = data.y2; - - return Container( - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(5), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - weekNumber, - style: const TextStyle( - fontWeight: TaskWarriorFonts.bold, color: Colors.black), - ), - Text( - 'Pending: $pendingCount', - style: const TextStyle( - fontWeight: TaskWarriorFonts.bold, color: Colors.black), - ), - Text( - 'Completed: $completedCount', - style: const TextStyle( - fontWeight: TaskWarriorFonts.bold, color: Colors.black), - ), - ], - ), - ); - }, - ); - - ///initialize the storage widget - Future.delayed(Duration.zero, () { - storageWidget = Get.find(); - var currentProfile = Get.find().currentProfile; - - Directory baseDirectory = Get.find().baseDirectory(); - storage = Storage( - Directory('${baseDirectory.path}/profiles/$currentProfile'), - ); - - ///fetch all data contains all the tasks - allData.value = storage.data.allData(); - - ///check if allData is not empty - if (allData.isNotEmpty) { - ///sort the data by weekly burn down - sortBurnDownWeekLy(); - } - }); - } - - Future> fetchTasks() async { - await taskDatabase.open(); - return await taskDatabase.fetchTasksFromDatabase(); - } - - // monthly report - late TooltipBehavior monthlyBurndownTooltipBehaviour; - RxMap> monthlyInfo = - >{}.obs; - - void sortBurnDownMonthly() { - monthlyInfo.value = {}; - - allData.sort((a, b) => a.entry.compareTo(b.entry)); - - for (int i = 0; i < allData.length; i++) { - final DateTime entryDate = allData[i].entry; - final String monthYear = - '${Utils.getMonthName(entryDate.month)} ${entryDate.year}'; - - if (monthlyInfo.containsKey(monthYear)) { - if (allData[i].status == 'pending') { - monthlyInfo[monthYear]!['pending'] = - (monthlyInfo[monthYear]!['pending'] ?? 0) + 1; - } else if (allData[i].status == 'completed') { - monthlyInfo[monthYear]!['completed'] = - (monthlyInfo[monthYear]!['completed'] ?? 0) + 1; - } - } else { - monthlyInfo[monthYear] = { - 'pending': allData[i].status == 'pending' ? 1 : 0, - 'completed': allData[i].status == 'completed' ? 1 : 0, - }; - } - } - - debugPrint("monthlyInfo: $monthlyInfo"); - } - - void initMonthlyReports() { - monthlyBurndownTooltipBehaviour = TooltipBehavior( - enable: true, - builder: (dynamic data, dynamic point, dynamic series, int pointIndex, - int seriesIndex) { - final String monthYear = data.x; - final int pendingCount = data.y1; - final int completedCount = data.y2; - - return Container( - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(5), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - 'Month-Year: $monthYear', - style: const TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - color: Colors.black), - ), - Text( - 'Pending: $pendingCount', - style: const TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - color: Colors.black), - ), - Text( - 'Completed: $completedCount', - style: const TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - color: Colors.black), - ), - ], - ), - ); - }, - ); - - ///initialize the storage widget - Future.delayed(Duration.zero, () { - storageWidget = Get.find(); - var currentProfile = Get.find().currentProfile; - - Directory baseDirectory = Get.find().baseDirectory(); - storage = Storage( - Directory('${baseDirectory.path}/profiles/$currentProfile'), - ); - - ///fetch all data contains all the tasks - allData.value = storage.data.allData(); - - ///check if allData is not empty - if (allData.isNotEmpty) { - ///sort the data by weekly burn down - sortBurnDownMonthly(); - } - }); - } -} diff --git a/lib/app/modules/reports/views/burn_down_daily.dart b/lib/app/modules/reports/views/burn_down_daily.dart deleted file mode 100644 index 2e4ed6c5..00000000 --- a/lib/app/modules/reports/views/burn_down_daily.dart +++ /dev/null @@ -1,139 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:syncfusion_flutter_charts/charts.dart'; -import 'package:taskwarrior/app/models/chart.dart'; -import 'package:taskwarrior/app/modules/reports/controllers/reports_controller.dart'; -import 'package:taskwarrior/app/modules/reports/views/common_chart_indicator.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class BurnDownDaily extends StatelessWidget { - final ReportsController reportsController; - const BurnDownDaily({super.key, required this.reportsController}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - double height = MediaQuery.of(context).size.height; - return Stack( - children: [ - Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: SizedBox( - height: height * 0.6, - child: RepaintBoundary( - key: reportsController.chartKey, - child: Obx( - () => SfCartesianChart( - primaryXAxis: CategoryAxis( - title: AxisTitle( - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageDailyDayMonth, - textStyle: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - color: tColors.primaryTextColor, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - ), - primaryYAxis: NumericAxis( - title: AxisTitle( - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageTasks, - textStyle: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - color: tColors.primaryTextColor, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - ), - tooltipBehavior: - reportsController.dailyBurndownTooltipBehaviour, - series: [ - /// This is the completed tasks - StackedColumnSeries( - groupName: 'Group A', - enableTooltip: true, - color: TaskWarriorColors.green, - dataSource: reportsController.dailyInfo.entries - .map((entry) => ChartData( - entry.key, - entry.value['pending'] ?? 0, - entry.value['completed'] ?? 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y2, - name: 'Completed', - ), - - /// This is the pending tasks - StackedColumnSeries( - groupName: 'Group A', - color: TaskWarriorColors.yellow, - enableTooltip: true, - dataSource: reportsController.dailyInfo.entries - .map((entry) => ChartData( - entry.key, - entry.value['pending'] ?? 0, - entry.value['completed'] ?? 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y1, - name: 'Pending', - ), - ], - ), - ), - ), - ), - ), - CommonChartIndicator( - title: - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageDailyBurnDownChart, - ), - ], - ), - Positioned( - bottom: 16, - right: 16, - child: InkWell( - onTap: () { - WidgetsBinding.instance.addPostFrameCallback((_) { - reportsController.captureChart(); - }); - }, - child: Container( - padding: const EdgeInsets.all(8), - decoration: BoxDecoration( - color: Colors.grey.withOpacity(0.3), // Adjust opacity as needed - borderRadius: BorderRadius.circular(8), - ), - child: const Icon( - Icons.refresh, - color: Colors.white, - ), - ), - ), - ), - ], - ); - } -} diff --git a/lib/app/modules/reports/views/burn_down_daily_taskc.dart b/lib/app/modules/reports/views/burn_down_daily_taskc.dart deleted file mode 100644 index d6f0cbc8..00000000 --- a/lib/app/modules/reports/views/burn_down_daily_taskc.dart +++ /dev/null @@ -1,178 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:syncfusion_flutter_charts/charts.dart'; -import 'package:taskwarrior/app/models/chart.dart'; -import 'package:taskwarrior/app/modules/reports/views/common_chart_indicator.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; - -class BurnDownDailyTaskc extends StatelessWidget { - BurnDownDailyTaskc({super.key}); - - final TooltipBehavior _dailyBurndownTooltipBehaviour = TooltipBehavior( - enable: true, - builder: (dynamic data, dynamic point, dynamic series, int pointIndex, - int seriesIndex) { - final String date = data.x; - final int pendingCount = data.y1; - final int completedCount = data.y2; - - return Container( - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(5), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsDate}: $date', - style: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.bold, - ), - ), - Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsPending}: $pendingCount'), - Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsCompleted}: $completedCount'), - ], - ), - ); - }, - ); - - Future>> fetchDailyInfo() async { - TaskDatabase taskDatabase = TaskDatabase(); - await taskDatabase.open(); - List tasks = await taskDatabase.fetchTasksFromDatabase(); - return _processData(tasks); - } - - Map> _processData(List tasks) { - Map> dailyInfo = {}; - - // Sort tasks by entry date in ascending order - tasks.sort((a, b) => a.entry.compareTo(b.entry)); - - for (var task in tasks) { - final String date = Utils.formatDate(DateTime.parse(task.entry), 'MM-dd'); - - if (dailyInfo.containsKey(date)) { - if (task.status == 'pending') { - dailyInfo[date]!['pending'] = (dailyInfo[date]!['pending'] ?? 0) + 1; - } else if (task.status == 'completed') { - dailyInfo[date]!['completed'] = - (dailyInfo[date]!['completed'] ?? 0) + 1; - } - } else { - dailyInfo[date] = { - 'pending': task.status == 'pending' ? 1 : 0, - 'completed': task.status == 'completed' ? 1 : 0, - }; - } - } - - return dailyInfo; - } - - @override - Widget build(BuildContext context) { - double height = MediaQuery.of(context).size.height; // Screen height - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return FutureBuilder>>( - future: fetchDailyInfo(), - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { - return const Center(child: CircularProgressIndicator()); - } - - if (snapshot.hasError) { - return Center( - child: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsError}: ${snapshot.error}')); - } - - Map> dailyInfo = snapshot.data ?? {}; - - return Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: SizedBox( - height: height * 0.6, - child: SfCartesianChart( - primaryXAxis: CategoryAxis( - title: AxisTitle( - text: 'Day - Month', - textStyle: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.bold, - color: tColors.primaryTextColor, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - ), - primaryYAxis: NumericAxis( - title: AxisTitle( - text: 'Tasks', - textStyle: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - ), - tooltipBehavior: _dailyBurndownTooltipBehaviour, - series: [ - StackedColumnSeries( - groupName: 'Group A', - enableTooltip: true, - color: TaskWarriorColors.green, - dataSource: dailyInfo.entries - .map((entry) => ChartData( - entry.key, - entry.value['pending'] ?? 0, - entry.value['completed'] ?? 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y2, - name: 'Completed', - ), - StackedColumnSeries( - groupName: 'Group A', - color: TaskWarriorColors.yellow, - enableTooltip: true, - dataSource: dailyInfo.entries - .map((entry) => ChartData( - entry.key, - entry.value['pending'] ?? 0, - entry.value['completed'] ?? 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y1, - name: 'Pending', - ), - ], - ), - ), - ), - const CommonChartIndicator( - title: 'Daily Burndown Chart', - ), - ], - ); - }, - ); - } -} diff --git a/lib/app/modules/reports/views/burn_down_monthly.dart b/lib/app/modules/reports/views/burn_down_monthly.dart deleted file mode 100644 index db1c2b55..00000000 --- a/lib/app/modules/reports/views/burn_down_monthly.dart +++ /dev/null @@ -1,102 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:syncfusion_flutter_charts/charts.dart'; -import 'package:taskwarrior/app/models/chart.dart'; -import 'package:taskwarrior/app/modules/reports/controllers/reports_controller.dart'; -import 'package:taskwarrior/app/modules/reports/views/common_chart_indicator.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class BurnDownMonthly extends StatelessWidget { - final ReportsController reportsController; - const BurnDownMonthly({super.key, required this.reportsController}); - - @override - Widget build(BuildContext context) { - var height = Get.height; - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: SizedBox( - height: height * 0.6, - child: SfCartesianChart( - primaryXAxis: CategoryAxis( - title: AxisTitle( - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageMonthlyMonthYear, - textStyle: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: - tColors.primaryTextColor, - )), - ), - primaryYAxis: NumericAxis( - title: AxisTitle( - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageTasks, - textStyle: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: - tColors.primaryTextColor, - )), - ), - tooltipBehavior: - reportsController.monthlyBurndownTooltipBehaviour, - series: [ - StackedColumnSeries( - groupName: 'Group A', - enableTooltip: true, - color: Colors.green, - dataSource: reportsController.monthlyInfo.entries - .map((entry) => ChartData( - entry.key, - entry.value['pending'] ?? 0, - entry.value['completed'] ?? 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y2, - name: 'Completed', - ), - StackedColumnSeries( - groupName: 'Group A', - color: Colors.yellow, - enableTooltip: true, - dataSource: reportsController.monthlyInfo.entries - .map((entry) => ChartData( - entry.key, - entry.value['pending'] ?? 0, - entry.value['completed'] ?? 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y1, - name: 'Pending', - ), - ], - ), - ), - ), - CommonChartIndicator( - title: SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageMonthlyBurnDownChart, - ), - ], - ); - } -} diff --git a/lib/app/modules/reports/views/burn_down_monthly_taskc.dart b/lib/app/modules/reports/views/burn_down_monthly_taskc.dart deleted file mode 100644 index 712bdd27..00000000 --- a/lib/app/modules/reports/views/burn_down_monthly_taskc.dart +++ /dev/null @@ -1,182 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:syncfusion_flutter_charts/charts.dart'; -import 'package:taskwarrior/app/models/chart.dart'; -import 'package:taskwarrior/app/modules/reports/views/common_chart_indicator.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; - -class BurnDownMonthlyTaskc extends StatelessWidget { - BurnDownMonthlyTaskc({super.key}); - - final _monthlyBurndownTooltipBehaviour = TooltipBehavior( - enable: true, - builder: (dynamic data, dynamic point, dynamic series, int pointIndex, - int seriesIndex) { - final String monthYear = data.x; - final int pendingCount = data.y1; - final int completedCount = data.y2; - - return Container( - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(5), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsMonthYear}: $monthYear', - style: const TextStyle( - fontWeight: TaskWarriorFonts.bold, - ), - ), - Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsPending}: $pendingCount', - ), - Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsCompleted}: $completedCount', - ), - ], - ), - ); - }, - ); - - Future>> fetchMonthlyInfo() async { - TaskDatabase taskDatabase = TaskDatabase(); - await taskDatabase.open(); - List tasks = await taskDatabase.fetchTasksFromDatabase(); - return sortBurnDownMonthly(tasks); - } - - Map> sortBurnDownMonthly(List allData) { - Map> monthlyInfo = {}; - - allData.sort((a, b) => a.entry.compareTo(b.entry)); - - for (int i = 0; i < allData.length; i++) { - final DateTime entryDate = DateTime.parse(allData[i].entry); - final String monthYear = - '${Utils.getMonthName(entryDate.month)} ${entryDate.year}'; - - if (monthlyInfo.containsKey(monthYear)) { - if (allData[i].status == 'pending') { - monthlyInfo[monthYear]!['pending'] = - (monthlyInfo[monthYear]!['pending'] ?? 0) + 1; - } else if (allData[i].status == 'completed') { - monthlyInfo[monthYear]!['completed'] = - (monthlyInfo[monthYear]!['completed'] ?? 0) + 1; - } - } else { - monthlyInfo[monthYear] = { - 'pending': allData[i].status == 'pending' ? 1 : 0, - 'completed': allData[i].status == 'completed' ? 1 : 0, - }; - } - } - - debugPrint("monthlyInfo: $monthlyInfo"); - return monthlyInfo; - } - - @override - Widget build(BuildContext context) { - final double height = MediaQuery.of(context).size.height; - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return FutureBuilder>>( - future: fetchMonthlyInfo(), - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { - return const Center(child: CircularProgressIndicator()); - } - - if (snapshot.hasError) { - return Center( - child: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsError}: ${snapshot.error}')); - } - - Map> monthlyInfo = snapshot.data ?? {}; - return Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: SizedBox( - height: height * 0.6, - child: SfCartesianChart( - primaryXAxis: CategoryAxis( - title: AxisTitle( - text: 'Month - Year', - textStyle: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - ), - primaryYAxis: NumericAxis( - title: AxisTitle( - text: 'Tasks', - textStyle: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - ), - tooltipBehavior: _monthlyBurndownTooltipBehaviour, - series: [ - StackedColumnSeries( - groupName: 'Group A', - enableTooltip: true, - color: TaskWarriorColors.green, - dataSource: monthlyInfo.entries - .map((entry) => ChartData( - entry.key, - entry.value['pending'] ?? 0, - entry.value['completed'] ?? 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y2, - name: 'Completed', - ), - StackedColumnSeries( - groupName: 'Group A', - color: TaskWarriorColors.yellow, - enableTooltip: true, - dataSource: monthlyInfo.entries - .map((entry) => ChartData( - entry.key, - entry.value['pending'] ?? 0, - entry.value['completed'] ?? 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y1, - name: 'Pending', - ), - ], - ), - ), - ), - const CommonChartIndicator( - title: 'Monthly Burndown Chart', - ), - ], - ); - }, - ); - } -} diff --git a/lib/app/modules/reports/views/burn_down_weekly.dart b/lib/app/modules/reports/views/burn_down_weekly.dart deleted file mode 100644 index 2eee2254..00000000 --- a/lib/app/modules/reports/views/burn_down_weekly.dart +++ /dev/null @@ -1,119 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:syncfusion_flutter_charts/charts.dart'; -import 'package:taskwarrior/app/models/chart.dart'; -import 'package:taskwarrior/app/modules/reports/controllers/reports_controller.dart'; -import 'package:taskwarrior/app/modules/reports/views/common_chart_indicator.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class BurnDownWeekly extends StatelessWidget { - final ReportsController reportsController; - const BurnDownWeekly({super.key, required this.reportsController}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - var height = Get.height; - return Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: SizedBox( - height: height * 0.6, - child: SfCartesianChart( - primaryXAxis: CategoryAxis( - title: AxisTitle( - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageWeeklyWeeksYear, - textStyle: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: - tColors.primaryTextColor, - )), - ), - primaryYAxis: NumericAxis( - title: AxisTitle( - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageTasks, - textStyle: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: - tColors.primaryTextColor, - )), - ), - tooltipBehavior: reportsController.weeklyBurndownTooltipBehaviour, - series: [ - ///this is the completed tasks - StackedColumnSeries( - groupName: 'Group A', - enableTooltip: true, - color: TaskWarriorColors.green, - dataSource: reportsController.allData - .map((task) => ChartData( - 'Week ${Utils.getWeekNumbertoInt(task.entry)}, ${task.entry.year}', - reportsController.weeklyInfo[ - Utils.getWeekNumbertoInt(task.entry)] - ?['pending'] ?? - 0, - reportsController.weeklyInfo[ - Utils.getWeekNumbertoInt(task.entry)] - ?['completed'] ?? - 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y2, - name: 'Completed', - ), - - ///this is the pending tasks - StackedColumnSeries( - groupName: 'Group A', - color: TaskWarriorColors.yellow, - enableTooltip: true, - dataSource: reportsController.allData - .map((task) => ChartData( - 'Week ${Utils.getWeekNumbertoInt(task.entry)}, ${task.entry.year}', - reportsController.weeklyInfo[ - Utils.getWeekNumbertoInt(task.entry)] - ?['pending'] ?? - 0, - reportsController.weeklyInfo[ - Utils.getWeekNumbertoInt(task.entry)] - ?['completed'] ?? - 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y1, - name: 'Pending', - ), - ], - ), - ), - ), - CommonChartIndicator( - title: SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageWeeklyBurnDownChart, - ), - ], - ); - } -} diff --git a/lib/app/modules/reports/views/burn_down_weekly_taskc.dart b/lib/app/modules/reports/views/burn_down_weekly_taskc.dart deleted file mode 100644 index bbbb7adb..00000000 --- a/lib/app/modules/reports/views/burn_down_weekly_taskc.dart +++ /dev/null @@ -1,193 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:syncfusion_flutter_charts/charts.dart'; -import 'package:taskwarrior/app/models/chart.dart'; -import 'package:taskwarrior/app/modules/reports/views/common_chart_indicator.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; - -class BurnDownWeeklyTask extends StatelessWidget { - BurnDownWeeklyTask({super.key}); - - final TooltipBehavior _weeklyBurndownTooltipBehaviour = TooltipBehavior( - enable: true, - builder: (dynamic data, dynamic point, dynamic series, int pointIndex, - int seriesIndex) { - final String weekNumber = data.x; - final int pendingCount = data.y1; - final int completedCount = data.y2; - - return Container( - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(5), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - weekNumber, - style: const TextStyle( - fontWeight: TaskWarriorFonts.bold, - ), - ), - Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsPending}: $pendingCount', - ), - Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsCompleted}: $completedCount', - ), - ], - ), - ); - }, - ); - - Future>> fetchWeeklyInfo() async { - TaskDatabase taskDatabase = TaskDatabase(); - await taskDatabase.open(); - List tasks = await taskDatabase.fetchTasksFromDatabase(); - return sortBurnDownWeekly(tasks); - } - - Map> sortBurnDownWeekly(List allData) { - // Initialize weeklyInfo map - Map> weeklyInfo = {}; - - // Sort allData by entry date in ascending order - allData.sort((a, b) => a.entry.compareTo(b.entry)); - - ///loop through allData and get the week number - for (int i = 0; i < allData.length; i++) { - final int weekNumber = - Utils.getWeekNumbertoInt(DateTime.parse(allData[i].entry)); - - ///check if weeklyInfo contains the week number - if (weeklyInfo.containsKey(weekNumber.toString())) { - ///check if the status is pending or completed - if (allData[i].status == 'pending') { - ///if the status is pending then add 1 to the pending count - weeklyInfo[weekNumber.toString()]!['pending'] = - (weeklyInfo[weekNumber.toString()]!['pending'] ?? 0) + 1; - } else if (allData[i].status == 'completed') { - ///if the status is completed then add 1 to the completed count - weeklyInfo[weekNumber.toString()]!['completed'] = - (weeklyInfo[weekNumber.toString()]!['completed'] ?? 0) + 1; - } - } else { - ///if weeklyInfo does not contain the week number - // ignore: collection_methods_unrelated_type - weeklyInfo[weekNumber.toString()] = { - 'pending': allData[i].status == 'pending' ? 1 : 0, - 'completed': allData[i].status == 'completed' ? 1 : 0, - }; - } - } - - debugPrint("weeklyInfo $weeklyInfo"); - return weeklyInfo; - } - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - double height = MediaQuery.of(context).size.height; // Screen height - return FutureBuilder>>( - future: fetchWeeklyInfo(), - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { - return const Center(child: CircularProgressIndicator()); - } - - if (snapshot.hasError) { - return Center( - child: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reportsError}: ${snapshot.error}')); - } - - Map> weeklyInfo = snapshot.data ?? {}; - - return Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: SizedBox( - height: height * 0.6, - child: SfCartesianChart( - primaryXAxis: CategoryAxis( - title: AxisTitle( - text: 'Weeks - Year', - textStyle: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.bold, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - ), - primaryYAxis: NumericAxis( - title: AxisTitle( - text: 'Tasks', - textStyle: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.bold, - color: tColors.primaryTextColor, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - ), - tooltipBehavior: _weeklyBurndownTooltipBehaviour, - series: [ - ///this is the completed tasks - StackedColumnSeries( - groupName: 'Group A', - enableTooltip: true, - color: TaskWarriorColors.green, - dataSource: weeklyInfo.entries - .map((entry) => ChartData( - 'Week ${entry.key}', - entry.value['pending'] ?? 0, - entry.value['completed'] ?? 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y2, - name: 'Completed', - ), - - ///this is the pending tasks - StackedColumnSeries( - groupName: 'Group A', - color: TaskWarriorColors.yellow, - enableTooltip: true, - dataSource: weeklyInfo.entries - .map((entry) => ChartData( - 'Week ${entry.key}', - entry.value['pending'] ?? 0, - entry.value['completed'] ?? 0, - )) - .toList(), - xValueMapper: (ChartData data, _) => data.x, - yValueMapper: (ChartData data, _) => data.y1, - name: 'Pending', - ), - ], - ), - ), - ), - const CommonChartIndicator( - title: 'Weekly Burndown Chart', - ), - ], - ); - }); - } -} diff --git a/lib/app/modules/reports/views/common_chart_indicator.dart b/lib/app/modules/reports/views/common_chart_indicator.dart deleted file mode 100644 index bd5b90f9..00000000 --- a/lib/app/modules/reports/views/common_chart_indicator.dart +++ /dev/null @@ -1,83 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class CommonChartIndicator extends StatelessWidget { - final String title; - const CommonChartIndicator({super.key, required this.title}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - title, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.bold, - color: tColors.primaryTextColor, - fontSize: TaskWarriorFonts.fontSizeMedium, - ), - ) - ], - ), - const SizedBox( - height: 20, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Column( - children: [ - Container( - height: 20, - width: 80, - decoration: BoxDecoration(color: TaskWarriorColors.green), - ), - Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageCompleted, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.regular, - color: tColors.primaryTextColor, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - ], - ), - Column( - children: [ - Container( - height: 20, - width: 80, - decoration: BoxDecoration(color: TaskWarriorColors.yellow), - ), - Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPagePending, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.regular, - color: tColors.primaryTextColor, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - ], - ) - ], - ), - ], - ); - } -} diff --git a/lib/app/modules/reports/views/reports_view.dart b/lib/app/modules/reports/views/reports_view.dart deleted file mode 100644 index 55c59608..00000000 --- a/lib/app/modules/reports/views/reports_view.dart +++ /dev/null @@ -1,152 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/modules/reports/views/burn_down_daily.dart'; -import 'package:taskwarrior/app/modules/reports/views/burn_down_monthly.dart'; -import 'package:taskwarrior/app/modules/reports/views/burn_down_weekly.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -import '../controllers/reports_controller.dart'; - -class ReportsView extends GetView { - const ReportsView({super.key}); - - @override - Widget build(BuildContext context) { - controller.initReportsTour(); - controller.showReportsTour(context); - double height = MediaQuery.of(context).size.height; - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return Scaffold( - appBar: AppBar( - backgroundColor: TaskWarriorColors.kprimaryBackgroundColor, - title: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageTitle, - style: GoogleFonts.poppins(color: TaskWarriorColors.white), - ), - leading: GestureDetector( - onTap: () { - Get.back(); - }, - child: Icon( - Icons.chevron_left, - color: TaskWarriorColors.white, - ), - ), - bottom: PreferredSize( - preferredSize: Size.fromHeight(height * 0.1), - child: TabBar( - controller: controller.tabController, - unselectedLabelStyle: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.light, - color: TaskWarriorColors.appBarUnSelectedIconsColorForReports - ), - indicatorColor: tColors.purpleShade, - labelColor: TaskWarriorColors.white, - onTap: (value) { - controller.selectedIndex.value = value; - }, - tabs: [ - Tab( - key: controller.daily, - icon: const Icon(Icons.schedule), - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageDaily, - iconMargin: const EdgeInsets.only(bottom: 0.0), - ), - Tab( - key: controller.weekly, - icon: const Icon(Icons.today), - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageWeekly, - iconMargin: const EdgeInsets.only(bottom: 0.0), - ), - Tab( - key: controller.monthly, - icon: const Icon(Icons.date_range), - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageMonthly, - iconMargin: const EdgeInsets.only(bottom: 0.0), - ), - ], - ), - ), - ), - backgroundColor: tColors.primaryBackgroundColor, - body: Obx( - () => controller.allData.isEmpty - ? Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Icon( - Icons.heart_broken, - color: tColors.primaryTextColor, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageNoTasksFound, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.medium, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageAddTasksToSeeReports, - style: TextStyle( - fontFamily: FontFamily.poppins, - fontWeight: TaskWarriorFonts.light, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - ], - ), - ], - ) - : IndexedStack( - index: controller.selectedIndex.value, - children: [ - BurnDownDaily( - reportsController: controller, - ), - BurnDownWeekly( - reportsController: controller, - ), - BurnDownMonthly( - reportsController: controller, - ), - ], - ), - ), - ); - } -} diff --git a/lib/app/modules/reports/views/reports_view_taskc.dart b/lib/app/modules/reports/views/reports_view_taskc.dart deleted file mode 100644 index bdb77374..00000000 --- a/lib/app/modules/reports/views/reports_view_taskc.dart +++ /dev/null @@ -1,165 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/reports/controllers/reports_controller.dart'; -import 'package:taskwarrior/app/modules/reports/views/burn_down_daily_taskc.dart'; -import 'package:taskwarrior/app/modules/reports/views/burn_down_monthly_taskc.dart'; -import 'package:taskwarrior/app/modules/reports/views/burn_down_weekly_taskc.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; - -class ReportsHomeTaskc extends StatelessWidget { - final ReportsController reportsController = Get.put(ReportsController()); - final TaskDatabase taskDatabase = TaskDatabase(); - - ReportsHomeTaskc({super.key}); - - Future> fetchTasks() async { - await taskDatabase.open(); - return await taskDatabase.fetchTasksFromDatabase(); - } - - @override - Widget build(BuildContext context) { - double height = MediaQuery.of(context).size.height; - reportsController.initReportsTour(); - reportsController.showReportsTour(context); - return FutureBuilder>( - future: fetchTasks(), - builder: (context, snapshot) { - List allTasks = snapshot.data ?? []; - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Scaffold( - appBar: AppBar( - backgroundColor: TaskWarriorColors.kprimaryBackgroundColor, - title: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageTitle, - style: GoogleFonts.poppins(color: TaskWarriorColors.white), - ), - leading: GestureDetector( - onTap: () { - Navigator.pop(context); - }, - child: Icon( - Icons.chevron_left, - color: TaskWarriorColors.white, - ), - ), - bottom: PreferredSize( - preferredSize: Size.fromHeight(height * 0.1), - child: TabBar( - controller: reportsController.tabController, - labelColor: TaskWarriorColors.white, - labelStyle: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.medium, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - unselectedLabelStyle: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.light, - ), - onTap: (value) { - reportsController.selectedIndex.value = value; - }, - tabs: [ - Tab( - key: reportsController.daily, - icon: const Icon(Icons.schedule), - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageDaily, - iconMargin: const EdgeInsets.only(bottom: 0.0), - ), - Tab( - key: reportsController.weekly, - icon: const Icon(Icons.today), - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageWeekly, - iconMargin: const EdgeInsets.only(bottom: 0.0), - ), - Tab( - key: reportsController.monthly, - icon: const Icon(Icons.date_range), - text: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .reportsPageMonthly, - iconMargin: const EdgeInsets.only(bottom: 0.0), - ), - ], - ), - ), - ), - backgroundColor: tColors.primaryBackgroundColor, - body: snapshot.connectionState == ConnectionState.waiting - ? const Center(child: CircularProgressIndicator()) - : allTasks.isEmpty - ? Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Icon( - Icons.heart_broken, - color: tColors.primaryTextColor, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .reportsPageNoTasksFound, - style: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.medium, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .reportsPageAddTasksToSeeReports, - style: GoogleFonts.poppins( - fontWeight: TaskWarriorFonts.light, - fontSize: TaskWarriorFonts.fontSizeSmall, - color: tColors.primaryTextColor, - ), - ), - ], - ), - ], - ) - : Obx( - () => IndexedStack( - index: reportsController.selectedIndex.value, - children: [ - BurnDownDailyTaskc(), - BurnDownWeeklyTask(), - BurnDownMonthlyTaskc(), - ], - ), - ), - ); - }, - ); - } -} diff --git a/lib/app/modules/settings/bindings/settings_binding.dart b/lib/app/modules/settings/bindings/settings_binding.dart deleted file mode 100644 index 9efb3069..00000000 --- a/lib/app/modules/settings/bindings/settings_binding.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:get/get.dart'; - -import '../controllers/settings_controller.dart'; - -class SettingsBinding extends Bindings { - @override - void dependencies() { - Get.put( - SettingsController(), - ); - } -} diff --git a/lib/app/modules/settings/controllers/settings_controller.dart b/lib/app/modules/settings/controllers/settings_controller.dart deleted file mode 100644 index bc111d89..00000000 --- a/lib/app/modules/settings/controllers/settings_controller.dart +++ /dev/null @@ -1,227 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'dart:io'; - -import 'package:file_picker/file_picker.dart'; -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; - -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; - -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:path/path.dart' as path; - -import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class SettingsController extends GetxController { - RxBool isMovingDirectory = false.obs; - - Rx selectedLanguage = AppSettings.selectedLanguage.obs; - RxString baseDirectory = "".obs; - - void setSelectedLanguage(SupportedLanguage language) async { - await SelectedLanguage.saveSelectedLanguage(language); - selectedLanguage.value = language; - AppSettings.selectedLanguage = language; - Get.find().selectedLanguage.value = language; - } - - Future getBaseDirectory() async { - SplashController profilesWidget = Get.find(); - Directory baseDir = profilesWidget.baseDirectory(); - Directory defaultDirectory = await profilesWidget.getDefaultDirectory(); - if (baseDir.path == defaultDirectory.path) { - return 'Default'; - } else { - return baseDir.path; - } - } - - void pickDirectory(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - FilePicker.platform.getDirectoryPath().then((value) async { - if (value != null) { - isMovingDirectory.value = true; - update(); - // InheritedProfiles profilesWidget = ProfilesWidget.of(context); - var profilesWidget = Get.find(); - Directory source = profilesWidget.baseDirectory(); - Directory destination = Directory(value); - moveDirectory(source.path, destination.path).then((value) async { - isMovingDirectory.value = false; - update(); - if (value == "same") { - return; - } else if (value == "success") { - profilesWidget.setBaseDirectory(destination); - SharedPreferences prefs = await SharedPreferences.getInstance(); - prefs.setString('baseDirectory', destination.path); - baseDirectory.value = destination.path; - Get.snackbar( - 'Success', - 'Base directory moved successfully', - snackPosition: SnackPosition.BOTTOM, - duration: const Duration(seconds: 2), - ); - } else { - Get.dialog( - Utils.showAlertDialog( - title: Text( - 'Error', - style: GoogleFonts.poppins( - fontWeight: FontWeight.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - content: Text( - value == "nested" - ? "Cannot move to a nested directory" - : value == "not-empty" - ? "Destination directory is not empty" - : value == "not-permitted" - ? "Selected folder can't be written to (Android SAF). Please choose a different folder." - : "An error occurred", - style: GoogleFonts.poppins( - color: TaskWarriorColors.grey, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - actions: [ - TextButton( - onPressed: () { - Get.back(); - }, - child: Text( - 'OK', - style: GoogleFonts.poppins( - color: tColors.primaryTextColor, - ), - ), - ) - ], - ), - ); - } - }); - } - }); - } - - Future moveDirectory(String fromDirectory, String toDirectory) async { - if (path.canonicalize(fromDirectory) == path.canonicalize(toDirectory)) { - return "same"; - } - - if (path.isWithin(fromDirectory, toDirectory)) { - return "nested"; - } - - Directory toDir = Directory(toDirectory); - // Ensure destination exists before checking contents - await toDir.create(recursive: true); - final length = await toDir.list().length; - if (length > 0) { - return "not-empty"; - } - - // Preflight: on Android, check that we can actually write to the chosen directory - // to avoid crashing with Operation not permitted when a SAF tree URI was selected. - try { - final testFile = File(path.join(toDirectory, ".tw_write_test")); - await toDir.create(recursive: true); - await testFile.writeAsString("ok"); - await testFile.delete(); - } on FileSystemException catch (e) { - // Map common permission error to a friendly status - if (e.osError?.errorCode == 1 || - (e.osError?.message.toLowerCase().contains("operation not permitted") ?? false)) { - return "not-permitted"; - } - return "error"; - } catch (_) { - return "error"; - } - - try { - await moveDirectoryRecurse(fromDirectory, toDirectory); - return "success"; - } on FileSystemException catch (e) { - if (e.osError?.errorCode == 1 || - (e.osError?.message.toLowerCase().contains("operation not permitted") ?? false)) { - return "not-permitted"; - } - return "error"; - } catch (_) { - return "error"; - } - } - - // ... no hardcoded SAF path mapping; rely on guard and proper APIs if enabled in future - - Future moveDirectoryRecurse( - String fromDirectory, String toDirectory) async { - Directory fromDir = Directory(fromDirectory); - Directory toDir = Directory(toDirectory); - - // Create the toDirectory if it doesn't exist - await toDir.create(recursive: true); - - // Loop through each file and directory and move it to the toDirectory - await for (final entity in fromDir.list()) { - // Skip flutter runtime assets – they should not be moved - final relativePath = path.relative(entity.path, from: fromDirectory); - if (relativePath.split(path.separator).contains('flutter_assets')) { - continue; - } - if (entity is File) { - // If it's a file, move it to the toDirectory - File file = entity; - String newPath = path.join(toDirectory, relativePath); - await File(newPath).writeAsBytes(await file.readAsBytes()); - await file.delete(); - } else if (entity is Directory) { - // If it's a directory, create it in the toDirectory and recursively move its contents - Directory dir = entity; - String newPath = path.join(toDirectory, relativePath); - Directory newDir = Directory(newPath); - await newDir.create(recursive: true); - await moveDirectoryRecurse(dir.path, newPath); - await dir.delete(); - } - } - } - - RxBool isSyncOnStartActivel = false.obs; - RxBool isSyncOnTaskCreateActivel = false.obs; - RxBool delaytask = false.obs; - RxBool change24hr = false.obs; - RxBool taskchampion = false.obs; - RxBool isDarkModeOn = false.obs; - - void initDarkMode() { - isDarkModeOn.value = AppSettings.isDarkMode; - } - - @override - void onInit() async { - final SharedPreferences prefs = await SharedPreferences.getInstance(); - isSyncOnStartActivel.value = prefs.getBool('sync-onStart') ?? false; - isSyncOnTaskCreateActivel.value = - prefs.getBool('sync-OnTaskCreate') ?? false; - delaytask.value = prefs.getBool('delaytask') ?? false; - change24hr.value = prefs.getBool('24hourformate') ?? false; - taskchampion.value = prefs.getBool('settings_taskc') ?? false; - initDarkMode(); - baseDirectory.value = await getBaseDirectory(); - super.onInit(); - } -} diff --git a/lib/app/modules/settings/views/settings_page_app_bar.dart b/lib/app/modules/settings/views/settings_page_app_bar.dart deleted file mode 100644 index a65fd51d..00000000 --- a/lib/app/modules/settings/views/settings_page_app_bar.dart +++ /dev/null @@ -1,73 +0,0 @@ -// ignore_for_file: use_build_context_synchronously - -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; - -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; - -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; - -import '../controllers/settings_controller.dart'; - -import 'package:taskwarrior/app/utils/constants/palette.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; - -class SettingsPageAppBar extends StatelessWidget - implements PreferredSizeWidget { - final SettingsController controller; - const SettingsPageAppBar({required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - return AppBar( - centerTitle: false, - backgroundColor: Palette.kToDark.shade200, - title: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Obx( - () => Text( - SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageTitle, - style: GoogleFonts.poppins( - color: TaskWarriorColors.white, - fontSize: TaskWarriorFonts.fontSizeLarge, - ), - ), - ), - Obx( - () => Text( - SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageSubtitle, - style: GoogleFonts.poppins( - color: TaskWarriorColors.white, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - ), - ], - ), - leading: GestureDetector( - onTap: () { - // Get.toNamed(Routes.b) - // ; - Get.back(); - }, - child: Icon( - Icons.chevron_left, - color: TaskWarriorColors.white, - ), - ), - ); - } - - @override - Size get preferredSize => AppBar().preferredSize; -} diff --git a/lib/app/modules/settings/views/settings_page_body.dart b/lib/app/modules/settings/views/settings_page_body.dart deleted file mode 100644 index e7ef440c..00000000 --- a/lib/app/modules/settings/views/settings_page_body.dart +++ /dev/null @@ -1,158 +0,0 @@ -// ignore_for_file: use_build_context_synchronously - -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; - -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_page_taskchampion.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import '../controllers/settings_controller.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_page_enable_24hr_format_list_tile_trailing.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_page_highlist_task_list_tile_trailing.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_page_list_tile.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_page_on_task_create_list_tile_trailing.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_page_on_task_start_list_tile_trailing.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_page_select_directory_list_tile.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_page_select_the_language_trailing.dart'; - -class SettingsPageBody extends StatelessWidget { - final SettingsController controller; - - const SettingsPageBody({required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Obx(() { - if (controller.isMovingDirectory.value) { - return Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const CircularProgressIndicator(), - const SizedBox(height: 10), - Text( - SentenceManager( - currentLanguage: controller.selectedLanguage.value, - ).sentences.settingsPageMovingDataToNewDirectory, - style: GoogleFonts.poppins( - fontWeight: FontWeight.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - ], - ), - ); - } else { - return ListView( - children: [ - Obx( - () => SettingsPageListTile( - title: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageSyncOnStartTitle, - subTitle: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageSyncOnStartDescription, - trailing: SettingsPageOnTaskStartListTileTrailing( - controller: controller, - ), - ), - ), - const Divider(), - Obx( - () => SettingsPageListTile( - title: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageEnableSyncOnTaskCreateTitle, - subTitle: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageEnableSyncOnTaskCreateDescription, - trailing: SettingsPageOnTaskCreateListTileTrailing( - controller: controller, - ), - ), - ), - const Divider(), - SettingsPageListTile( - title: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageHighlightTaskTitle, - subTitle: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageHighlightTaskDescription, - trailing: SettingsPageHighlistTaskListTileTrailing( - controller: controller, - ), - ), - const Divider(), - SettingsPageSelectDirectoryListTile(controller: controller), - const Divider(), - SettingsPageListTile( - title: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageEnable24hrFormatTitle, - subTitle: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageEnable24hrFormatDescription, - trailing: SettingsPageEnable24hrFormatListTileTrailing( - controller: controller, - ), - ), - const Divider(), - SettingsPageListTile( - title: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .taskchampionTileTitle, - subTitle: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .taskchampionTileDescription, - trailing: SettingsPageTaskchampionTileListTileTrailing( - controller: controller, - ), - ), - const Divider(), - SettingsPageListTile( - title: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageSelectLanguage, - subTitle: SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageToggleNativeLanguage, - trailing: SettingsPageSelectTheLanguageTrailing( - controller: controller, - ), - ), - const Divider(), - SettingsPageListTile( - title: "Logs ", - subTitle: "check all debug logs here", - trailing: IconButton( - onPressed: () { - Get.toNamed(Routes.LOGS); - }, - icon: const Icon(Icons.login)), - ) - ], - ); - } - }); - } -} diff --git a/lib/app/modules/settings/views/settings_page_enable_24hr_format_list_tile_trailing.dart b/lib/app/modules/settings/views/settings_page_enable_24hr_format_list_tile_trailing.dart deleted file mode 100644 index 19b44a58..00000000 --- a/lib/app/modules/settings/views/settings_page_enable_24hr_format_list_tile_trailing.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; - -import '../controllers/settings_controller.dart'; - - -class SettingsPageEnable24hrFormatListTileTrailing extends StatelessWidget { - final SettingsController controller; - const SettingsPageEnable24hrFormatListTileTrailing( - {required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - return Obx( - () => Switch( - value: controller.change24hr.value, - onChanged: (bool value) async { - controller.change24hr.value = value; - - final SharedPreferences prefs = await SharedPreferences.getInstance(); - await prefs.setBool('24hourformate', value); - Get.find().change24hr.value = value; - }, - ), - ); - } -} diff --git a/lib/app/modules/settings/views/settings_page_highlist_task_list_tile_trailing.dart b/lib/app/modules/settings/views/settings_page_highlist_task_list_tile_trailing.dart deleted file mode 100644 index 013e3fd6..00000000 --- a/lib/app/modules/settings/views/settings_page_highlist_task_list_tile_trailing.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; - -import '../controllers/settings_controller.dart'; - - -class SettingsPageHighlistTaskListTileTrailing extends StatelessWidget { - final SettingsController controller; - const SettingsPageHighlistTaskListTileTrailing( - {required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - return Obx( - () => Switch( - value: controller.delaytask.value, - onChanged: (bool value) async { - controller.delaytask.value = value; - final SharedPreferences prefs = await SharedPreferences.getInstance(); - await prefs.setBool('delaytask', value); - Get.find().useDelayTask.value = value; - }, - ), - ); - } -} diff --git a/lib/app/modules/settings/views/settings_page_list_tile.dart b/lib/app/modules/settings/views/settings_page_list_tile.dart deleted file mode 100644 index 9b01228a..00000000 --- a/lib/app/modules/settings/views/settings_page_list_tile.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; - - -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - - -class SettingsPageListTile extends StatelessWidget { - final String title; - final String subTitle; - final Widget? trailing; - - const SettingsPageListTile({ - super.key, - required this.title, - required this.subTitle, - this.trailing, - }); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return ListTile( - title: Text( - title, - style: GoogleFonts.poppins( - fontWeight: FontWeight.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - subtitle: Text( - subTitle, - style: GoogleFonts.poppins( - color: TaskWarriorColors.grey, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - trailing: trailing, - ); - } -} diff --git a/lib/app/modules/settings/views/settings_page_on_task_create_list_tile_trailing.dart b/lib/app/modules/settings/views/settings_page_on_task_create_list_tile_trailing.dart deleted file mode 100644 index 7b166f79..00000000 --- a/lib/app/modules/settings/views/settings_page_on_task_create_list_tile_trailing.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -import '../controllers/settings_controller.dart'; - - -class SettingsPageOnTaskCreateListTileTrailing extends StatelessWidget { - final SettingsController controller; - const SettingsPageOnTaskCreateListTileTrailing( - {required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - return Obx( - () => Switch( - value: controller.isSyncOnTaskCreateActivel.value, - onChanged: (bool value) async { - controller.isSyncOnTaskCreateActivel.value = value; - final SharedPreferences prefs = await SharedPreferences.getInstance(); - await prefs.setBool('sync-OnTaskCreate', value); - }, - ), - ); - } -} diff --git a/lib/app/modules/settings/views/settings_page_on_task_start_list_tile_trailing.dart b/lib/app/modules/settings/views/settings_page_on_task_start_list_tile_trailing.dart deleted file mode 100644 index 80fc423b..00000000 --- a/lib/app/modules/settings/views/settings_page_on_task_start_list_tile_trailing.dart +++ /dev/null @@ -1,29 +0,0 @@ - -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -import '../controllers/settings_controller.dart'; - - -class SettingsPageOnTaskStartListTileTrailing extends StatelessWidget { - final SettingsController controller; - const SettingsPageOnTaskStartListTileTrailing({required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - return Obx( - () => Switch( - value: controller.isSyncOnStartActivel.value, - onChanged: (bool value) async { - controller.isSyncOnStartActivel.value = value; - - final SharedPreferences prefs = - await SharedPreferences.getInstance(); - await prefs.setBool('sync-onStart', value); - }, - ), - ); - } -} diff --git a/lib/app/modules/settings/views/settings_page_select_directory_list_tile.dart b/lib/app/modules/settings/views/settings_page_select_directory_list_tile.dart deleted file mode 100644 index 05a62197..00000000 --- a/lib/app/modules/settings/views/settings_page_select_directory_list_tile.dart +++ /dev/null @@ -1,201 +0,0 @@ -// ignore_for_file: use_build_context_synchronously - -import 'dart:io'; - -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/modules/splash/controllers/splash_controller.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -import '../controllers/settings_controller.dart'; - -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; - -class SettingsPageSelectDirectoryListTile extends StatelessWidget { - final SettingsController controller; - const SettingsPageSelectDirectoryListTile( - {required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return ListTile( - title: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .settingsPageSelectDirectoryTitle, - style: GoogleFonts.poppins( - fontWeight: FontWeight.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - subtitle: Column( - children: [ - Obx( - () => Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.settingsPageSelectDirectoryTitle}: ${controller.baseDirectory.value}', - style: GoogleFonts.poppins( - color: TaskWarriorColors.grey, - fontSize: TaskWarriorFonts.fontSizeSmall, - ), - ), - ), - const SizedBox( - height: 10, - ), - Row( - children: [ - //Reset to default - TextButton( - style: ButtonStyle( - backgroundColor: WidgetStateProperty.all( - tColors.secondaryBackgroundColor!, - ), - ), - onPressed: () async { - if (await controller.getBaseDirectory() == "Default") { - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .settingsAlreadyDefault, - style: TextStyle( - color: tColors.primaryTextColor, - ), - ), - backgroundColor: tColors.secondaryBackgroundColor, - duration: const Duration(seconds: 2))); - } else { - showDialog( - context: context, - builder: (BuildContext context) { - return Utils.showAlertDialog( - title: Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .settingsResetToDefault, - style: GoogleFonts.poppins( - fontWeight: FontWeight.bold, - fontSize: TaskWarriorFonts.fontSizeMedium, - color: tColors.primaryTextColor, - ), - ), - content: Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .settingsConfirmReset, - style: GoogleFonts.poppins( - color: TaskWarriorColors.grey, - fontSize: TaskWarriorFonts.fontSizeMedium, - ), - ), - actions: [ - TextButton( - onPressed: () { - Navigator.pop(context); - }, - child: Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .settingsNoButton, - style: GoogleFonts.poppins( - color: tColors.primaryTextColor, - ), - ), - ), - TextButton( - onPressed: () async { - Navigator.pop(context); - controller.isMovingDirectory.value = true; - - // InheritedProfiles profilesWidget = - // ProfilesWidget.of(context); - var profilesWidget = - Get.find(); - - Directory source = - profilesWidget.baseDirectory(); - Directory destination = - await profilesWidget.getDefaultDirectory(); - controller - .moveDirectory( - source.path, destination.path) - .then((value) async { - profilesWidget.setBaseDirectory(destination); - SharedPreferences prefs = - await SharedPreferences.getInstance(); - await prefs.remove('baseDirectory'); - controller.isMovingDirectory.value = false; - controller.baseDirectory.value = "Default"; - }); - }, - child: Text( - SentenceManager( - currentLanguage: - AppSettings.selectedLanguage) - .sentences - .settingsYesButton, - style: GoogleFonts.poppins( - color: tColors.primaryTextColor, - ), - ), - ), - ], - ); - }, - ); - } - }, - child: Text( - SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageSetToDefault, - style: TextStyle( - color: tColors.purpleShade, - ), - ), - ), - const Spacer(), - //Change directory - TextButton( - style: ButtonStyle( - backgroundColor: WidgetStateProperty.all( - tColors.secondaryBackgroundColor!, - ), - ), - onPressed: () { - controller.pickDirectory(context); - }, - child: Text( - SentenceManager( - currentLanguage: controller.selectedLanguage.value) - .sentences - .settingsPageChangeDirectory, - style: TextStyle( - color: tColors.purpleShade, - ), - ), - ), - ], - ), - ], - ), - ); - } -} diff --git a/lib/app/modules/settings/views/settings_page_select_the_language_trailing.dart b/lib/app/modules/settings/views/settings_page_select_the_language_trailing.dart deleted file mode 100644 index da7e155b..00000000 --- a/lib/app/modules/settings/views/settings_page_select_the_language_trailing.dart +++ /dev/null @@ -1,62 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/settings/controllers/settings_controller.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class SettingsPageSelectTheLanguageTrailing extends StatelessWidget { - final SettingsController controller; - - const SettingsPageSelectTheLanguageTrailing( - {required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = Theme.of(context).extension()!; - return Obx( - () => DropdownButton( - value: controller.selectedLanguage.value, - onChanged: (value) { - controller.setSelectedLanguage(value!); - }, - items: SupportedLanguage.values.map((language) { - return DropdownMenuItem( - value: language, - child: Text( - _getLanguageName(language), - style: TextStyle( - fontFamily: FontFamily.poppins, - color: tColors.primaryTextColor, - ), - ), - ); - }).toList(), - dropdownColor: AppSettings.isDarkMode - ? TaskWarriorColors.kprimaryBackgroundColor - : TaskWarriorColors.kLightPrimaryBackgroundColor, - ), - ); - } - - String _getLanguageName(SupportedLanguage language) { - switch (language) { - case SupportedLanguage.english: - return 'English'; - case SupportedLanguage.hindi: - return 'Hindi'; - case SupportedLanguage.marathi: - return 'Marathi'; - case SupportedLanguage.french: - return 'Français'; - case SupportedLanguage.spanish: - return 'Español'; - case SupportedLanguage.bengali: - return 'বাংলা'; - default: - return ''; - } - } -} diff --git a/lib/app/modules/settings/views/settings_page_taskchampion.dart b/lib/app/modules/settings/views/settings_page_taskchampion.dart deleted file mode 100644 index 6441f7b2..00000000 --- a/lib/app/modules/settings/views/settings_page_taskchampion.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart'; - -import '../controllers/settings_controller.dart'; - -class SettingsPageTaskchampionTileListTileTrailing extends StatelessWidget { - final SettingsController controller; - const SettingsPageTaskchampionTileListTileTrailing( - {required this.controller, super.key}); - - @override - Widget build(BuildContext context) { - return Obx( - () => Switch( - value: controller.taskchampion.value, - onChanged: (bool value) async { - controller.taskchampion.value = value; - - final SharedPreferences prefs = await SharedPreferences.getInstance(); - await prefs.setBool('settings_taskc', value); - Get.find().taskchampion.value = value; - }, - ), - ); - } -} diff --git a/lib/app/modules/settings/views/settings_view.dart b/lib/app/modules/settings/views/settings_view.dart deleted file mode 100644 index 5a86136e..00000000 --- a/lib/app/modules/settings/views/settings_view.dart +++ /dev/null @@ -1,28 +0,0 @@ -// ignore_for_file: use_build_context_synchronously - -import 'package:flutter/material.dart'; - -import 'package:get/get.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_page_app_bar.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_page_body.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -import '../controllers/settings_controller.dart'; - -class SettingsView extends GetView { - const SettingsView({super.key}); - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Scaffold( - appBar: SettingsPageAppBar( - controller: controller, - ), - backgroundColor: tColors.primaryBackgroundColor, - body: SettingsPageBody( - controller: controller, - ), - ); - } -} diff --git a/lib/app/modules/splash/bindings/splash_binding.dart b/lib/app/modules/splash/bindings/splash_binding.dart deleted file mode 100644 index 7252c547..00000000 --- a/lib/app/modules/splash/bindings/splash_binding.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:get/get.dart'; - -import '../controllers/splash_controller.dart'; - -class SplashBinding extends Bindings { - @override - void dependencies() { - Get.put( - SplashController(), - permanent: true, - ); - } -} diff --git a/lib/app/modules/splash/controllers/splash_controller.dart b/lib/app/modules/splash/controllers/splash_controller.dart deleted file mode 100644 index ed798951..00000000 --- a/lib/app/modules/splash/controllers/splash_controller.dart +++ /dev/null @@ -1,131 +0,0 @@ -// ignore_for_file: body_might_complete_normally_catch_error, depend_on_referenced_packages - -import 'dart:io'; - -import 'package:flutter/foundation.dart'; -import 'package:get/get.dart'; -import 'package:in_app_update/in_app_update.dart'; -import 'package:path_provider/path_provider.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/models/storage.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/profiles.dart'; - -class SplashController extends GetxController { - late Rx baseDirectory = Directory('').obs; - late RxMap profilesMap = {}.obs; - late RxString currentProfile = ''.obs; - - Profiles get _profiles => Profiles(baseDirectory.value); - - @override - void onInit() async { - super.onInit(); - await checkForUpdate(); - initBaseDir().then((_) { - _checkProfiles(); - profilesMap.value = _profiles.profilesMap(); - currentProfile.value = _profiles.getCurrentProfile()!; - sendToNextPage(); - }); - } - - Future initBaseDir() async { - SharedPreferences prefs = await SharedPreferences.getInstance(); - String? directory = prefs.getString('baseDirectory'); - Directory dir = (directory != null) - ? Directory(directory) - : await getDefaultDirectory(); - baseDirectory.value = dir; - } - - void _checkProfiles() { - if (_profiles.profilesMap().isEmpty) { - _profiles.setCurrentProfile(_profiles.addProfile()); - } else if (!_profiles - .profilesMap() - .containsKey(_profiles.getCurrentProfile())) { - _profiles.setCurrentProfile(_profiles.profilesMap().keys.first); - } - } - - Future getDefaultDirectory() async { - return await getApplicationDocumentsDirectory(); - } - - void setBaseDirectory(Directory newBaseDirectory) { - baseDirectory.value = newBaseDirectory; - profilesMap.value = _profiles.profilesMap(); - } - - void addProfile() { - _profiles.addProfile(); - profilesMap.value = _profiles.profilesMap(); - } - - void copyConfigToNewProfile(String profile) { - _profiles.copyConfigToNewProfile(profile); - profilesMap.value = _profiles.profilesMap(); - } - - void deleteProfile(String profile) { - _profiles.deleteProfile(profile); - _checkProfiles(); - profilesMap.value = _profiles.profilesMap(); - currentProfile.value = _profiles.getCurrentProfile()!; - } - - void renameProfile({required String profile, required String? alias}) { - _profiles.setAlias(profile: profile, alias: alias!); - profilesMap.value = _profiles.profilesMap(); - } - - void selectProfile(String profile) { - _profiles.setCurrentProfile(profile); - currentProfile.value = _profiles.getCurrentProfile()!; - } - - Storage getStorage(String profile) { - return _profiles.getStorage(profile); - } - - RxBool hasCompletedOnboarding = false.obs; - - Future checkOnboardingStatus() async { - SharedPreferences prefs = await SharedPreferences.getInstance(); - hasCompletedOnboarding.value = - prefs.getBool('onboarding_completed') ?? false; - } - - void sendToNextPage() async { - await checkOnboardingStatus(); - if (hasCompletedOnboarding.value) { - Get.offNamed(Routes.HOME); - } else { - Get.offNamed(Routes.ONBOARDING); - } - } - - Future checkForUpdate() async { - try { - AppUpdateInfo updateInfo = await InAppUpdate.checkForUpdate(); - if (updateInfo.updateAvailability == UpdateAvailability.updateAvailable) { - if (updateInfo.immediateUpdateAllowed) { - InAppUpdate.performImmediateUpdate().catchError((e) { - debugPrint(e.toString()); - }); - } else if (updateInfo.flexibleUpdateAllowed) { - InAppUpdate.startFlexibleUpdate().then((_) { - InAppUpdate.completeFlexibleUpdate().catchError((e) { - debugPrint(e.toString()); - }); - }).catchError((e) { - debugPrint(e.toString()); - }); - } - } - } catch (e) { - debugPrint(e.toString()); - } - } -} diff --git a/lib/app/modules/splash/views/splash_view.dart b/lib/app/modules/splash/views/splash_view.dart deleted file mode 100644 index 3692f9ee..00000000 --- a/lib/app/modules/splash/views/splash_view.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; - -import 'package:get/get.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; -import 'package:taskwarrior/app/utils/gen/assets.gen.dart'; -import 'package:taskwarrior/app/utils/gen/fonts.gen.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -import '../controllers/splash_controller.dart'; - -class SplashView extends GetView { - const SplashView({super.key}); - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - child: SvgPicture.asset( - Assets.svg.logo.path, - height: 100, - width: double.infinity, - )), - const SizedBox(height: 30.0), - const CircularProgressIndicator(), - const SizedBox(height: 16.0), - Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .splashSettingUpApp, - style: const TextStyle( - fontFamily: FontFamily.poppins, - fontSize: TaskWarriorFonts.fontSizeLarge, - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/app/modules/taskc_details/bindings/taskc_details_binding.dart b/lib/app/modules/taskc_details/bindings/taskc_details_binding.dart deleted file mode 100644 index f0825aef..00000000 --- a/lib/app/modules/taskc_details/bindings/taskc_details_binding.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:get/get.dart'; - -import '../controllers/taskc_details_controller.dart'; - -class TaskcDetailsBinding extends Bindings { - @override - void dependencies() { - Get.lazyPut( - () => TaskcDetailsController(), - ); - } -} diff --git a/lib/app/modules/taskc_details/controllers/taskc_details_controller.dart b/lib/app/modules/taskc_details/controllers/taskc_details_controller.dart deleted file mode 100644 index dfec84da..00000000 --- a/lib/app/modules/taskc_details/controllers/taskc_details_controller.dart +++ /dev/null @@ -1,293 +0,0 @@ -// ignore_for_file: deprecated_member_use, use_build_context_synchronously - -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:intl/intl.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; -import 'package:taskwarrior/app/v3/models/annotation.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; -import 'package:taskwarrior/app/v3/net/modify.dart'; - -enum UnsavedChangesAction { save, discard, cancel } - -class TaskcDetailsController extends GetxController { - late final TaskForC initialTask; - late TaskDatabase taskDatabase; - - final hasChanges = false.obs; - - late RxString description; - late RxString project; - late RxString status; - late RxString priority; - late RxString due; - late RxString start; - late RxString wait; - late RxList tags; - late RxList depends; - late RxString rtype; - late RxString recur; - late RxList annotations; - late RxList previousTags = [].obs; - - @override - void onInit() { - super.onInit(); - initialTask = Get.arguments as TaskForC; - _initializeState(initialTask); - taskDatabase = TaskDatabase(); - taskDatabase.open(); - } - - void _initializeState(TaskForC task) { - description = task.description.obs; - project = (task.project ?? '-').obs; - status = task.status.obs; - priority = (task.priority ?? '-').obs; - due = formatDate(task.due).obs; - start = "".obs; - wait = "".obs; - tags = initialTask.tags != null - ? initialTask.tags!.map((e) => e.toString()).toList().obs - : [].obs; - previousTags = tags.toList().obs; - depends = "".split(",").obs; - rtype = "".obs; - recur = "".obs; - annotations = [].obs; - } - - String formatDate(String? dateString) { - if (dateString == null || dateString.isEmpty || dateString == '-') { - return '-'; - } - try { - DateTime parsedDate = DateTime.parse(dateString); - return DateFormat('yyyy-MM-dd HH:mm:ss').format(parsedDate); - } catch (e) { - debugPrint('Error parsing date: $dateString'); - return '-'; - } - } - - void updateField(Rx field, T value) { - if (field.value != value) { - field.value = value; - hasChanges.value = true; - } - } - - void updateListField(RxList field, String value) { - final newList = value.split(',').map((e) => e.trim()).toList(); - if (field.toList().toString() != newList.toString()) { - field.assignAll(newList); - hasChanges.value = true; - } - } - - void processTagsLists() { - final itemsToMove = previousTags.toSet().difference(tags.toSet()); - tags.addAll(itemsToMove.map((item) => '-$item')); - previousTags.removeWhere((item) => itemsToMove.contains(item)); - } - - Future saveTask() async { - if (tags.length == 1 && tags[0] == "") { - tags.clear(); - } - await taskDatabase.saveEditedTaskInDB( - initialTask.uuid!, - description.string, - project.string, - status.string, - priority.string, - DateTime.parse(due.string).toIso8601String(), - tags.toList(), - ); - hasChanges.value = false; - debugPrint('Task saved in local DB ${description.string}'); - processTagsLists(); - await modifyTaskOnTaskwarrior( - description.string, - project.string, - DateTime.parse(due.string).toIso8601String(), - priority.string, - status.string, - initialTask.uuid!, - initialTask.id.toString(), - tags.toList(), - ); - } - - Future handleWillPop() async { - if (hasChanges.value) { - final action = await _showUnsavedChangesDialog(); - if (action == UnsavedChangesAction.save) { - await saveTask(); - return true; - } else if (action == UnsavedChangesAction.discard) { - return true; - } else { - return false; - } - } - return true; - } - - Future pickDateTime(RxString field) async { - final BuildContext context = Get.context!; - final DateTime? pickedDate = await showDatePicker( - context: context, - initialDate: field.value != '-' - ? DateTime.tryParse(field.value) ?? DateTime.now() - : DateTime.now(), - firstDate: DateTime(2000), - lastDate: DateTime(2101), - ); - - if (pickedDate != null) { - final TimeOfDay? pickedTime = await showTimePicker( - context: context, - initialTime: TimeOfDay.fromDateTime(field.value != '-' - ? DateTime.tryParse(field.value) ?? DateTime.now() - : DateTime.now()), - ); - - DateTime fullDateTime; - if (pickedTime != null) { - fullDateTime = DateTime(pickedDate.year, pickedDate.month, - pickedDate.day, pickedTime.hour, pickedTime.minute); - } else { - fullDateTime = pickedDate; - } - updateField( - field, DateFormat('yyyy-MM-dd HH:mm:ss').format(fullDateTime)); - } - } - - Future showEditDialog(String label, String initialValue) async { - final BuildContext context = Get.context!; - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - final TextEditingController textController = - TextEditingController(text: initialValue); - - return await Get.dialog( - Utils.showAlertDialog( - title: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.edit} $label', - style: TextStyle(color: tColors.primaryTextColor), - ), - content: TextField( - style: TextStyle(color: tColors.primaryTextColor), - controller: textController, - decoration: InputDecoration( - hintText: - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.enterNew} $label', - hintStyle: TextStyle(color: tColors.primaryTextColor), - ), - ), - actions: [ - TextButton( - onPressed: () => Get.back(), - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .cancel, - style: TextStyle(color: tColors.primaryTextColor), - ), - ), - TextButton( - onPressed: () => Get.back(result: textController.text), - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .save, - style: TextStyle(color: tColors.primaryTextColor), - ), - ), - ], - ), - ); - } - - Future showSelectDialog( - String label, String initialValue, List options) async { - final BuildContext context = Get.context!; - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - - return await Get.dialog( - Utils.showAlertDialog( - title: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.select} $label', - style: TextStyle(color: tColors.primaryTextColor), - ), - content: Column( - mainAxisSize: MainAxisSize.min, - children: options.map((option) { - return RadioListTile( - title: Text( - option, - style: TextStyle(color: tColors.primaryTextColor), - ), - value: option, - groupValue: initialValue, - onChanged: (value) => Get.back(result: value), - ); - }).toList(), - ), - ), - ); - } - - Future _showUnsavedChangesDialog() async { - final BuildContext context = Get.context!; - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Get.dialog( - barrierDismissible: false, - Utils.showAlertDialog( - title: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .unsavedChanges, - style: TextStyle(color: tColors.primaryTextColor), - ), - content: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .unsavedChangesWarning, - style: TextStyle(color: tColors.primaryTextColor), - ), - actions: [ - TextButton( - onPressed: () => Get.back(result: UnsavedChangesAction.cancel), - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .cancel), - ), - TextButton( - onPressed: () => Get.back(result: UnsavedChangesAction.discard), - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .dontSave), - ), - TextButton( - onPressed: () => Get.back(result: UnsavedChangesAction.save), - child: Text( - SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .save), - ), - ], - ), - ); - } -} diff --git a/lib/app/modules/taskc_details/views/taskc_details_view.dart b/lib/app/modules/taskc_details/views/taskc_details_view.dart deleted file mode 100644 index 75e0dad5..00000000 --- a/lib/app/modules/taskc_details/views/taskc_details_view.dart +++ /dev/null @@ -1,211 +0,0 @@ -// ignore_for_file: deprecated_member_use, use_build_context_synchronously - -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import '../controllers/taskc_details_controller.dart'; - -class TaskcDetailsView extends GetView { - const TaskcDetailsView({super.key}); - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return WillPopScope( - onWillPop: controller.handleWillPop, - child: Scaffold( - backgroundColor: tColors.primaryBackgroundColor, - appBar: AppBar( - foregroundColor: TaskWarriorColors.lightGrey, - backgroundColor: TaskWarriorColors.kprimaryBackgroundColor, - title: Text( - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.task}: ${controller.initialTask.description}', - style: GoogleFonts.poppins(color: TaskWarriorColors.white), - ), - ), - body: Padding( - padding: const EdgeInsets.all(16.0), - child: Obx( - () => ListView( - children: [ - _buildEditableDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageDescription}:', - controller.description.value, - (value) => - controller.updateField(controller.description, value), - ), - _buildEditableDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.project}:', - controller.project.value, - (value) => controller.updateField(controller.project, value), - ), - _buildSelectableDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageStatus}:', - controller.status.value, - ['pending', 'completed'], - (value) => controller.updateField(controller.status, value), - ), - _buildSelectableDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPagePriority}:', - controller.priority.value, - ['H', 'M', 'L', '-'], - (value) => controller.updateField(controller.priority, value), - ), - _buildDatePickerDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.homePageDue}:', - controller.due.value, - () => controller.pickDateTime(controller.due), - ), - _buildDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageStart}:', - controller.start.value, - ), - _buildDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageWait}:', - controller.wait.value, - ), - _buildEditableDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageTags}:', - controller.tags.join(', '), - (value) => controller.updateListField(controller.tags, value), - ), - _buildDetail( - context, - 'Rtype:', - controller.rtype.value, - ), - _buildDetail( - context, - 'Recur:', - controller.recur.value, - ), - _buildDetail( - context, 'UUID:', controller.initialTask.uuid ?? '-'), - _buildDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageUrgency}:', - controller.initialTask.urgency?.toStringAsFixed(2) ?? '-', - ), - _buildDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageEnd}:', - controller.formatDate(controller.initialTask.end), - ), - _buildDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageEntry}:', - controller.formatDate(controller.initialTask.entry), - ), - _buildDetail( - context, - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.detailPageModified}:', - controller.formatDate(controller.initialTask.modified), - ), - ], - ), - ), - ), - floatingActionButton: Obx( - () => controller.hasChanges.value - ? FloatingActionButton( - onPressed: controller.saveTask, - child: const Icon(Icons.save), - ) - : const SizedBox.shrink(), - ), - ), - ); - } - - Widget _buildEditableDetail(BuildContext context, String label, String value, - Function(String) onChanged) { - return InkWell( - onTap: () async { - final result = await controller.showEditDialog(label, value); - if (result != null) { - onChanged(result); - } - }, - child: _buildDetail(context, label, value), - ); - } - - Widget _buildSelectableDetail(BuildContext context, String label, - String value, List options, Function(String) onChanged) { - return InkWell( - onTap: () async { - final result = await controller.showSelectDialog(label, value, options); - if (result != null) { - onChanged(result); - } - }, - child: _buildDetail(context, label, value), - ); - } - - Widget _buildDatePickerDetail( - BuildContext context, String label, String value, VoidCallback onTap) { - return InkWell( - onTap: onTap, - child: _buildDetail(context, label, value), - ); - } - - Widget _buildDetail(BuildContext context, String label, String value) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - return Container( - width: double.infinity, - decoration: BoxDecoration( - color: tColors.secondaryBackgroundColor, - borderRadius: BorderRadius.circular(8.0), - boxShadow: const [ - BoxShadow( - color: Colors.black12, - blurRadius: 4.0, - offset: Offset(0, 2), - ), - ], - ), - padding: const EdgeInsets.all(16.0), - margin: const EdgeInsets.symmetric(vertical: 8.0), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - label, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 18, - color: tColors.primaryTextColor, - ), - ), - const SizedBox(width: 8), - Expanded( - child: Text( - value, - style: TextStyle( - fontSize: 18, - color: tColors.primaryTextColor, - ), - ), - ), - ], - ), - ); - } -} diff --git a/lib/app/routes/app_pages.dart b/lib/app/routes/app_pages.dart deleted file mode 100644 index 90ace627..00000000 --- a/lib/app/routes/app_pages.dart +++ /dev/null @@ -1,106 +0,0 @@ -import 'package:get/get.dart'; - -import '../modules/about/bindings/about_binding.dart'; -import '../modules/about/views/about_view.dart'; -import '../modules/detailRoute/bindings/detail_route_binding.dart'; -import '../modules/detailRoute/views/detail_route_view.dart'; -import '../modules/home/bindings/home_binding.dart'; -import '../modules/home/views/home_view.dart'; -import '../modules/logs/bindings/logs_binding.dart'; -import '../modules/logs/views/logs_view.dart'; -import '../modules/manageTaskServer/bindings/manage_task_server_binding.dart'; -import '../modules/manageTaskServer/views/manage_task_server_view.dart'; -import '../modules/manage_task_champion_creds/bindings/manage_task_champion_creds_binding.dart'; -import '../modules/manage_task_champion_creds/views/manage_task_champion_creds_view.dart'; -import '../modules/onboarding/bindings/onboarding_binding.dart'; -import '../modules/onboarding/views/onboarding_view.dart'; -import '../modules/permission/bindings/permission_binding.dart'; -import '../modules/permission/views/permission_view.dart'; -import '../modules/profile/bindings/profile_binding.dart'; -import '../modules/profile/views/profile_view.dart'; -import '../modules/reports/bindings/reports_binding.dart'; -import '../modules/reports/views/reports_view.dart'; -import '../modules/settings/bindings/settings_binding.dart'; -import '../modules/settings/views/settings_view.dart'; -import '../modules/splash/bindings/splash_binding.dart'; -import '../modules/splash/views/splash_view.dart'; -import '../modules/taskc_details/bindings/taskc_details_binding.dart'; -import '../modules/taskc_details/views/taskc_details_view.dart'; - -// ignore_for_file: constant_identifier_names - -part 'app_routes.dart'; - -class AppPages { - AppPages._(); - - static const INITIAL = Routes.SPLASH; - - static final routes = [ - GetPage( - name: _Paths.HOME, - page: () => const HomeView(), - binding: HomeBinding(), - ), - GetPage( - name: _Paths.ONBOARDING, - page: () => const OnboardingView(), - binding: OnboardingBinding(), - ), - GetPage( - name: _Paths.SPLASH, - page: () => const SplashView(), - binding: SplashBinding(), - ), - GetPage( - name: _Paths.MANAGE_TASK_SERVER, - page: () => const ManageTaskServerView(), - binding: ManageTaskServerBinding(), - ), - GetPage( - name: _Paths.DETAIL_ROUTE, - page: () => const DetailRouteView(), - binding: DetailRouteBinding(), - ), - GetPage( - name: _Paths.PROFILE, - page: () => const ProfileView(), - binding: ProfileBinding(), - ), - GetPage( - name: _Paths.ABOUT, - page: () => const AboutView(), - binding: AboutBinding(), - ), - GetPage( - name: _Paths.REPORTS, - page: () => const ReportsView(), - binding: ReportsBinding(), - ), - GetPage( - name: _Paths.SETTINGS, - page: () => const SettingsView(), - binding: SettingsBinding(), - ), - GetPage( - name: _Paths.PERMISSION, - page: () => const PermissionView(), - binding: PermissionBinding(), - ), - GetPage( - name: _Paths.MANAGE_TASK_CHAMPION_CREDS, - page: () => const ManageTaskChampionCredsView(), - binding: ManageTaskChampionCredsBinding(), - ), - GetPage( - name: _Paths.LOGS, - page: () => const LogsView(), - binding: LogsBinding(), - ), - GetPage( - name: _Paths.TASKC_DETAILS, - page: () => const TaskcDetailsView(), - binding: TaskcDetailsBinding(), - ), - ]; -} diff --git a/lib/app/routes/app_routes.dart b/lib/app/routes/app_routes.dart deleted file mode 100644 index 04490f3f..00000000 --- a/lib/app/routes/app_routes.dart +++ /dev/null @@ -1,38 +0,0 @@ -// ignore_for_file: constant_identifier_names - -part of 'app_pages.dart'; -// DO NOT EDIT. This is code generated via package:get_cli/get_cli.dart - -abstract class Routes { - Routes._(); - static const HOME = _Paths.HOME; - static const ONBOARDING = _Paths.ONBOARDING; - static const SPLASH = _Paths.SPLASH; - static const MANAGE_TASK_SERVER = _Paths.MANAGE_TASK_SERVER; - static const DETAIL_ROUTE = _Paths.DETAIL_ROUTE; - static const PROFILE = _Paths.PROFILE; - static const ABOUT = _Paths.ABOUT; - static const REPORTS = _Paths.REPORTS; - static const SETTINGS = _Paths.SETTINGS; - static const PERMISSION = _Paths.PERMISSION; - static const MANAGE_TASK_CHAMPION_CREDS = _Paths.MANAGE_TASK_CHAMPION_CREDS; - static const LOGS = _Paths.LOGS; - static const TASKC_DETAILS = _Paths.TASKC_DETAILS; -} - -abstract class _Paths { - _Paths._(); - static const HOME = '/home'; - static const ONBOARDING = '/onboarding'; - static const SPLASH = '/splash'; - static const MANAGE_TASK_SERVER = '/manage-task-server'; - static const DETAIL_ROUTE = '/detail-route'; - static const PROFILE = '/profile'; - static const ABOUT = '/about'; - static const REPORTS = '/reports'; - static const SETTINGS = '/settings'; - static const PERMISSION = '/permission'; - static const MANAGE_TASK_CHAMPION_CREDS = '/manage-task-champion-creds'; - static const LOGS = '/logs'; - static const TASKC_DETAILS = '/taskc-details'; -} diff --git a/lib/app/services/notification_services.dart b/lib/app/services/notification_services.dart deleted file mode 100644 index 1b6c8a9b..00000000 --- a/lib/app/services/notification_services.dart +++ /dev/null @@ -1,129 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'dart:convert'; - -import 'package:crypto/crypto.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter_local_notifications/flutter_local_notifications.dart'; -import 'package:timezone/data/latest.dart' as tz; -import 'package:timezone/timezone.dart' as tz; - -class NotificationService { - final FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin = - FlutterLocalNotificationsPlugin(); - final AndroidInitializationSettings _androidInitializationSettings = - const AndroidInitializationSettings('taskwarrior'); - DarwinInitializationSettings iosSettings = const DarwinInitializationSettings( - requestAlertPermission: true, - requestBadgePermission: true, - requestCriticalPermission: true, - requestSoundPermission: true); - - DarwinInitializationSettings macSettings = const DarwinInitializationSettings( - requestAlertPermission: true, - requestBadgePermission: true, - requestCriticalPermission: true, - requestSoundPermission: true); - void initiliazeNotification() async { - InitializationSettings initializationSettings = InitializationSettings( - android: _androidInitializationSettings, - iOS: iosSettings, - macOS: macSettings, - ); - - await _flutterLocalNotificationsPlugin.initialize(initializationSettings); - } - - // Function to create a unique notification ID - int calculateNotificationId(DateTime scheduledTime, String taskname, - bool isWait, DateTime entryTime) { - String combinedString = - '${entryTime.toIso8601String().substring(0, 19)}$taskname'; - - // Calculate SHA-256 hash - var sha2561 = sha256.convert(utf8.encode(combinedString)); - - // Convert the first 8 characters of the hash to an integer - int notificationId = - int.parse(sha2561.toString().substring(0, 8), radix: 16) % 2147483647; - if (isWait) { - notificationId = (notificationId + 2) % 2147483647; - } - - return notificationId; - } - - void sendNotification( - DateTime dtb, String taskname, bool isWait, DateTime entryTime) async { - DateTime dateTime = DateTime.now(); - tz.initializeTimeZones(); - if (kDebugMode) { - print("date and time are:-$dateTime"); - print("date and time are:-$dtb"); - } - final tz.TZDateTime scheduledAt = - tz.TZDateTime.from(dtb.add(const Duration(minutes: 0)), tz.local); - - AndroidNotificationDetails androidNotificationDetails = - const AndroidNotificationDetails('channelId', 'TaskReminder', - icon: "taskwarrior", - importance: Importance.max, - priority: Priority.max); - - // iOS and macOS Notification Details - DarwinNotificationDetails iOSNotificationDetails = - const DarwinNotificationDetails( - presentAlert: true, - presentBadge: true, - presentSound: true, - ); - - DarwinNotificationDetails macOsNotificationDetails = - const DarwinNotificationDetails( - presentAlert: true, - presentBadge: true, - presentSound: true, - ); - - NotificationDetails notificationDetails = NotificationDetails( - android: androidNotificationDetails, - iOS: iOSNotificationDetails, - macOS: macOsNotificationDetails, - ); - - // Generate a unique notification ID based on the scheduled time and task name - int notificationId = - calculateNotificationId(dtb, taskname, isWait, entryTime); - - await _flutterLocalNotificationsPlugin - .zonedSchedule( - notificationId, - 'Taskwarrior Reminder', - isWait - ? "Hey! Don't forget your task of $taskname" - : 'Hey! Your task of $taskname is still pending', - scheduledAt, - notificationDetails, - uiLocalNotificationDateInterpretation: - UILocalNotificationDateInterpretation.absoluteTime, - androidScheduleMode: AndroidScheduleMode.alarmClock) - .then((value) { - if (kDebugMode) { - print('Notification scheduled successfully'); - } - }).catchError((error) { - if (kDebugMode) { - print('Error scheduling notification: $error'); - } - }); - - if (kDebugMode) { - print(scheduledAt.day * 100 + scheduledAt.hour * 10 + scheduledAt.minute); - } - } - - // Delete previously scheduled notification with a specific ID - void cancelNotification(int notificationId) async { - await _flutterLocalNotificationsPlugin.cancel(notificationId); - } -} diff --git a/lib/app/services/pushNotification_service.dart b/lib/app/services/pushNotification_service.dart deleted file mode 100644 index 567f80bf..00000000 --- a/lib/app/services/pushNotification_service.dart +++ /dev/null @@ -1,60 +0,0 @@ -// ignore_for_file: deprecated_member_use, file_names, prefer_typing_uninitialized_variables, avoid_print - -import 'dart:async'; -import 'dart:convert'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -import 'package:http/http.dart' as http; - -//import 'package:flutter_dotenv/flutter_dotenv.dart'; -// import 'package:shared_preferences/shared_preferences.dart'; - -//var serverUrl = dotenv.env['SERVER_URL']; - -Future createPushNotification( - String id, String token) async { - String uuid = UniqueKey().toString(); - - var serverUrl; //later remove - final response = await http.post( - Uri.parse(serverUrl! + 'push-notification'), - headers: { - 'Content-Type': 'application/json; charset=UTF-8', - }, - body: jsonEncode({ - 'uuid': uuid, - 'token': token, - 'platform': 'android', - }), - ); - - if (response.statusCode == 200) { - print(response.body); - return PushNotificationResponse.fromJson(jsonDecode(response.body)); - } else if (response.statusCode == 422) { - throw ('Unable to push notification'); - } else { - throw Exception('Network Error'); - } -} - -class PushNotificationResponse { - final String title; - final String description; - final DateTime expiredAt; - - PushNotificationResponse( - {required this.title, - required this.description, - required this.expiredAt}); - - factory PushNotificationResponse.fromJson(Map json) { - return PushNotificationResponse( - title: json['title'], - description: json['description'], - expiredAt: json['expiredAt'], - ); - } -} diff --git a/lib/app/services/tag_filter.dart b/lib/app/services/tag_filter.dart deleted file mode 100644 index 2eaa7a56..00000000 --- a/lib/app/services/tag_filter.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'package:flutter/material.dart'; - - -class TagFilterMetadata { - const TagFilterMetadata({ - required this.display, - required this.selected, - }); - - final String display; - final bool selected; -} - -class TagFilters { - const TagFilters({ - required this.tagUnion, - required this.toggleTagUnion, - required this.tags, - required this.toggleTagFilter, - }); - - final bool tagUnion; - final void Function() toggleTagUnion; - final Map tags; - final void Function(String) toggleTagFilter; -} - -class TagFiltersWrap extends StatelessWidget { - const TagFiltersWrap(this.filters, {super.key}); - - final TagFilters filters; - - @override - Widget build(BuildContext context) { - return Wrap( - spacing: 4, - children: [ - FilterChip( - onSelected: (_) => filters.toggleTagUnion(), - label: Text( - filters.tagUnion ? 'OR' : 'AND', - // style: GoogleFonts.poppins( - // color: AppSettings.isDarkMode - // ? TaskWarriorColors.black - // : TaskWarriorColors.white) - ), - // backgroundColor: AppSettings.isDarkMode - // ? TaskWarriorColors.kLightSecondaryBackgroundColor - // : TaskWarriorColors.ksecondaryBackgroundColor, - ), - for (var entry in filters.tags.entries) - FilterChip( - onSelected: (_) => filters.toggleTagFilter(entry.key), - label: Text( - entry.value.display, - // style: GoogleFonts.poppins( - // fontWeight: - // entry.value.selected ? TaskWarriorFonts.bold : null, - // color: AppSettings.isDarkMode - // ? TaskWarriorColors.black - // : TaskWarriorColors.white), - ), - // backgroundColor: AppSettings.isDarkMode - // ? TaskWarriorColors.kLightSecondaryBackgroundColor - // : TaskWarriorColors.kprimaryBackgroundColor, - ), - ], - ); - } -} diff --git a/lib/app/tour/details_page_tour.dart b/lib/app/tour/details_page_tour.dart deleted file mode 100644 index 56f95e13..00000000 --- a/lib/app/tour/details_page_tour.dart +++ /dev/null @@ -1,152 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -List addDetailsPage({ - required GlobalKey dueKey, - required GlobalKey waitKey, - required GlobalKey untilKey, - required GlobalKey priorityKey, -}) { - List targets = []; - - targets.add( - TargetFocus( - keyTarget: dueKey, - alignSkip: Alignment.topRight, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.top, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourDetailsDue, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - targets.add( - TargetFocus( - keyTarget: waitKey, - alignSkip: Alignment.topRight, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourDetailsWait, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - targets.add( - TargetFocus( - keyTarget: untilKey, - alignSkip: Alignment.topRight, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourDetailsUntil, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - targets.add( - TargetFocus( - keyTarget: priorityKey, - alignSkip: Alignment.topRight, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourDetailsPriority, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - return targets; -} diff --git a/lib/app/tour/filter_drawer_tour.dart b/lib/app/tour/filter_drawer_tour.dart deleted file mode 100644 index 9ad6913e..00000000 --- a/lib/app/tour/filter_drawer_tour.dart +++ /dev/null @@ -1,197 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -List filterDrawer({ - required GlobalKey statusKey, - required GlobalKey projectsKey, - required GlobalKey projectsKeyTaskc, - required GlobalKey filterTagKey, - required GlobalKey sortByKey, -}) { - List targets = []; - - // statusKey - targets.add( - TargetFocus( - keyTarget: statusKey, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.top, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourFilterStatus, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: TaskWarriorColors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - // projectsKey - targets.add( - TargetFocus( - keyTarget: projectsKey, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.top, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourFilterProjects, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: TaskWarriorColors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - // projectsKeyTaskc - targets.add( - TargetFocus( - keyTarget: projectsKeyTaskc, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.top, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourFilterProjects, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: TaskWarriorColors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - // filterTagByKey - targets.add( - TargetFocus( - keyTarget: filterTagKey, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.top, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourFilterTagUnion, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: TaskWarriorColors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - // sortByKey - targets.add( - TargetFocus( - keyTarget: sortByKey, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.top, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourFilterSort, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: TaskWarriorColors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - return targets; -} diff --git a/lib/app/tour/home_page_tour.dart b/lib/app/tour/home_page_tour.dart deleted file mode 100644 index 451463ca..00000000 --- a/lib/app/tour/home_page_tour.dart +++ /dev/null @@ -1,197 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -List addTargetsPage({ - required GlobalKey addKey, - required GlobalKey searchKey, - required GlobalKey filterKey, - required GlobalKey menuKey, - required GlobalKey refreshKey, -}) { - List targets = []; - - // add - targets.add( - TargetFocus( - keyTarget: addKey, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.Circle, - contents: [ - TargetContent( - align: ContentAlign.top, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourHomeAddTask, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - //search - targets.add( - TargetFocus( - keyTarget: searchKey, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.Circle, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourHomeSearch, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - //refresh - targets.add( - TargetFocus( - keyTarget: refreshKey, - alignSkip: Alignment.topCenter, - radius: 10, - shape: ShapeLightFocus.Circle, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourHomeRefresh, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - //filter - targets.add( - TargetFocus( - keyTarget: filterKey, - alignSkip: Alignment.topCenter, - radius: 10, - shape: ShapeLightFocus.Circle, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourHomeFilter, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - //menu - targets.add( - TargetFocus( - keyTarget: menuKey, - alignSkip: Alignment.bottomRight, - radius: 10, - shape: ShapeLightFocus.Circle, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourHomeMenu, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - return targets; -} diff --git a/lib/app/tour/manage_task_server_page_tour.dart b/lib/app/tour/manage_task_server_page_tour.dart deleted file mode 100644 index 7f9ed2f9..00000000 --- a/lib/app/tour/manage_task_server_page_tour.dart +++ /dev/null @@ -1,156 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -List addManageTaskServerPage({ - required GlobalKey configureTaskRC, - required GlobalKey configureYourCertificate, - required GlobalKey configureTaskServerKey, - required GlobalKey configureServerCertificate, -}) { - List targets = []; - - targets.add( - TargetFocus( - keyTarget: configureTaskRC, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourTaskServerTaskRC, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - targets.add( - TargetFocus( - keyTarget: configureYourCertificate, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourTaskServerCertificate, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - targets.add( - TargetFocus( - keyTarget: configureTaskServerKey, - alignSkip: Alignment.bottomCenter, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourTaskServerKey, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - targets.add( - TargetFocus( - keyTarget: configureServerCertificate, - alignSkip: Alignment.bottomCenter, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourTaskServerRootCert, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - return targets; -} diff --git a/lib/app/tour/profile_page_tour.dart b/lib/app/tour/profile_page_tour.dart deleted file mode 100644 index 33b6e604..00000000 --- a/lib/app/tour/profile_page_tour.dart +++ /dev/null @@ -1,119 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -List addProfilePage({ - required GlobalKey currentProfileKey, - required GlobalKey addNewProfileKey, - required GlobalKey manageSelectedProfileKey, -}) { - List targets = []; - - // currentProfile - targets.add( - TargetFocus( - keyTarget: currentProfileKey, - alignSkip: Alignment.topRight, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.top, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourProfileCurrent, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - //manage current profile - targets.add( - TargetFocus( - keyTarget: manageSelectedProfileKey, - alignSkip: Alignment.topRight, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourProfileManage, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - //addNewProfile - targets.add( - TargetFocus( - keyTarget: addNewProfileKey, - alignSkip: Alignment.topRight, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourProfileAddNew, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - return targets; -} diff --git a/lib/app/tour/reports_page_tour.dart b/lib/app/tour/reports_page_tour.dart deleted file mode 100644 index 1a23722a..00000000 --- a/lib/app/tour/reports_page_tour.dart +++ /dev/null @@ -1,123 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -List reportsDrawer({ - required GlobalKey daily, - required GlobalKey weekly, - required GlobalKey monthly, -}) { - List targets = []; - - // daily - targets.add( - TargetFocus( - keyTarget: daily, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourReportsDaily, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - // weekly - targets.add( - TargetFocus( - keyTarget: weekly, - alignSkip: Alignment.topRight, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourReportsWeekly, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - // monthly - targets.add( - TargetFocus( - keyTarget: monthly, - alignSkip: Alignment.bottomCenter, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .sentences - .tourReportsMonthly, - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - return targets; -} diff --git a/lib/app/tour/task_swipe_tour.dart b/lib/app/tour/task_swipe_tour.dart deleted file mode 100644 index 0cd16a86..00000000 --- a/lib/app/tour/task_swipe_tour.dart +++ /dev/null @@ -1,100 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -List addTaskSwipeTutorialTargets({ - required GlobalKey taskItemKey, -}) { - List targets = []; - - targets.add( - TargetFocus( - identify: "taskSwipeTutorial", - keyTarget: taskItemKey, - alignSkip: Alignment.bottomRight, - radius: 10, - shape: ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: ContentAlign.bottom, - builder: (context, controller) { - return Container( - alignment: Alignment.center, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - "Task Swipe Actions", - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 22.0, - ), - ), - const SizedBox(height: 8), - Text( - "This is how you manage your tasks quickly : ", - textAlign: TextAlign.center, - style: GoogleFonts.poppins( - color: Colors.white, - fontStyle: FontStyle.italic, - fontSize: 16.0, - ), - ), - Padding( - padding: const EdgeInsets.only(top: 16.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Icon(Icons.arrow_right_alt, - color: Colors.green, size: 28), - const SizedBox(width: 8), - Flexible( - child: Text( - "Swipe RIGHT to COMPLETE", - textAlign: TextAlign.left, - style: GoogleFonts.poppins( - color: Colors.white, - fontWeight: FontWeight.w500, - ), - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only(top: 10.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Icon(Icons.arrow_right_alt, - textDirection: TextDirection.rtl, - color: Colors.red, - size: 28), - const SizedBox(width: 8), - Flexible( - child: Text( - "Swipe LEFT to DELETE", - textAlign: TextAlign.left, - style: GoogleFonts.poppins( - color: Colors.white, - fontWeight: FontWeight.w500, - ), - ), - ), - ], - ), - ), - ], - ), - ); - }, - ), - ], - ), - ); - - return targets; -} diff --git a/lib/app/utils/add_task_dialogue/date_picker_input.dart b/lib/app/utils/add_task_dialogue/date_picker_input.dart deleted file mode 100644 index 50475052..00000000 --- a/lib/app/utils/add_task_dialogue/date_picker_input.dart +++ /dev/null @@ -1,177 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/add_task_dialog_utils.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class AddTaskDatePickerInput extends StatefulWidget { - final Function(List)? onDateChanges; - final bool onlyDueDate; - const AddTaskDatePickerInput( - {super.key, this.onDateChanges, this.onlyDueDate = false}); - - @override - _AddTaskDatePickerInputState createState() => _AddTaskDatePickerInputState(); -} - -class _AddTaskDatePickerInputState extends State { - final List _selectedDates = List.filled(4, null); - final List dateLabels = ['Due', 'Wait', 'Sched', 'Until']; - final List _controllers = - List.generate(4, (index) => TextEditingController()); - final int length = 4; - int currentIndex = 0; - - int getNextIndex() => (currentIndex + 1) % length; - - int getPreviousIndex() => (currentIndex - 1) % length; - - void _showNextItem() { - setState(() { - currentIndex = getNextIndex(); - }); - } - - void _showPreviousItem() { - setState(() { - currentIndex = getPreviousIndex(); - }); - } - - @override - void dispose() { - for (var controller in _controllers) { - controller.dispose(); - } - super.dispose(); - } - - @override - Widget build(BuildContext context) { - TaskwarriorColorTheme tColors = - Theme.of(context).extension()!; - bool isNextDateSelected = _selectedDates[getNextIndex()] != null; - bool isPreviousDateSelected = _selectedDates[getPreviousIndex()] != null; - String nextDateText = isNextDateSelected - ? "${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.change} ${dateLabels[getNextIndex()]} ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.date}" - : "${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.add} ${dateLabels[getNextIndex()]} ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.date}"; - - String prevDateText = isPreviousDateSelected - ? "${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.change} ${dateLabels[getPreviousIndex()]} ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.date}" - : "${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.add} ${dateLabels[getPreviousIndex()]} ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.date}"; - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - // Display the current input field - Flexible( - child: buildDatePicker(context, currentIndex), - ), - // Navigation buttons - Visibility( - visible: !widget.onlyDueDate, - child: Row( - children: [ - Expanded( - child: TextButton.icon( - onPressed: _showPreviousItem, - label: Text( - prevDateText, - style: TextStyle( - fontSize: 12, - decoration: isPreviousDateSelected - ? TextDecoration.none - : TextDecoration.underline, - decorationStyle: TextDecorationStyle.wavy, - ), - ), - icon: Icon( - Icons.arrow_back_ios_rounded, - size: 12, - color: tColors.primaryTextColor, - ), - iconAlignment: IconAlignment.start, - ), - ), - const SizedBox(width: 8), // Space between buttons - Expanded( - child: TextButton.icon( - onPressed: _showNextItem, - label: Text( - nextDateText, - style: TextStyle( - fontSize: 12, - decoration: isNextDateSelected - ? TextDecoration.none - : TextDecoration.underline, - decorationStyle: TextDecorationStyle.wavy, - ), - ), - icon: Icon( - Icons.arrow_forward_ios_rounded, - size: 12, - color: tColors.primaryTextColor, - ), - iconAlignment: IconAlignment.end, - ), - ), - ], - ), - ) - ], - ); - } - - Widget buildDatePicker(BuildContext context, int forIndex) { - _controllers[forIndex].text = _selectedDates[forIndex] == null - ? '' - : dateToStringForAddTask(_selectedDates[forIndex]!); - - return TextFormField( - controller: _controllers[forIndex], - decoration: InputDecoration( - labelText: - '${dateLabels[forIndex]} ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.date}', - hintText: - '${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.select} ${dateLabels[forIndex]}', - suffixIcon: const Icon(Icons.calendar_today), - border: const OutlineInputBorder(), - ), - validator: _validator, - readOnly: true, - onTap: () async { - final DateTime? picked = await showDatePicker( - context: context, - initialDate: _selectedDates[forIndex] ?? DateTime.now(), - firstDate: DateTime.now(), - lastDate: DateTime(2101), - ); - final TimeOfDay? time = await showTimePicker( - context: context, - initialTime: TimeOfDay.now(), - ); - if (picked == null || time == null) return; - setState(() { - _selectedDates[forIndex] = - picked.add(Duration(hours: time.hour, minutes: time.minute)); - // Update the controller text - _controllers[forIndex].text = - dateToStringForAddTask(_selectedDates[forIndex]!); - }); - if (widget.onDateChanges != null) { - widget.onDateChanges!(_selectedDates); - } - }, - ); - } - - String? _validator(value) { - for (var i = 0; i < length; i++) { - DateTime? dt = _selectedDates[i]; - String? label = dateLabels[i]; - if (dt != null && dt.isBefore(DateTime.now())) { - return "$label ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.dateCanNotBeInPast}"; - } - } - return null; - } -} diff --git a/lib/app/utils/add_task_dialogue/tags_input.dart b/lib/app/utils/add_task_dialogue/tags_input.dart deleted file mode 100644 index 21b9e8fb..00000000 --- a/lib/app/utils/add_task_dialogue/tags_input.dart +++ /dev/null @@ -1,147 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:textfield_tags/textfield_tags.dart'; - -class AddTaskTagsInput extends StatefulWidget { - final Iterable suggestions; - final Function(List)? onTagsChanges; - const AddTaskTagsInput( - {super.key, - this.suggestions = const Iterable.empty(), - this.onTagsChanges}); - - @override - _AddTaskTagsInputState createState() => _AddTaskTagsInputState(); -} - -class _AddTaskTagsInputState extends State { - late final StringTagController stringTagController; - - @override - void initState() { - super.initState(); - stringTagController = StringTagController(); - } - - @override - void dispose() { - stringTagController.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - const paddingX = 12; - stringTagController.addListener(() { - if (widget.onTagsChanges != null) { - widget.onTagsChanges!(stringTagController.getTags!); - } - }); - return Autocomplete( - onSelected: (String value) { - stringTagController.onTagSubmitted(value); - }, - optionsViewBuilder: (context, onAutoCompleteSelect, options) { - return Align( - alignment: Alignment.topLeft, - child: Material( - child: SizedBox( - width: MediaQuery.of(context).size.width - paddingX * 2, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - ...options.map((String tag) { - return Container( - margin: const EdgeInsets.only(left: 5), - child: InputChip( - label: Text(tag), - onPressed: () => - onAutoCompleteSelect(tag))); - }) - ], - ))))); - }, - optionsBuilder: (TextEditingValue textEditingValue) { - if (textEditingValue.text == '') { - return widget.suggestions; - } - return widget.suggestions.where((option) => - option.toLowerCase().contains(textEditingValue.text.toLowerCase())); - }, - fieldViewBuilder: - (context, textEditingController, focusNode, onFieldSubmitted) { - return TextFieldTags( - textEditingController: textEditingController, - focusNode: focusNode, - textfieldTagsController: stringTagController, - textSeparators: const [' ', ','], - validator: (tag) { - Iterable tags = stringTagController.getTags ?? const []; - if (tags.contains(tag)) { - stringTagController.onTagRemoved(tag); - stringTagController.onTagSubmitted(tag); - return SentenceManager( - currentLanguage: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .currentLanguage) - .sentences - .tagAlreadyExists; - } - for (String tag in tags) { - if (tag.contains(" ")) { - return SentenceManager( - currentLanguage: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .currentLanguage) - .sentences - .tagShouldNotContainSpaces; - } - } - return null; - }, - inputFieldBuilder: (context, inputFieldValues) { - return TextFormField( - controller: inputFieldValues.textEditingController, - focusNode: inputFieldValues.focusNode, - decoration: InputDecoration( - labelText: SentenceManager( - currentLanguage: SentenceManager( - currentLanguage: AppSettings.selectedLanguage) - .currentLanguage) - .sentences - .addTaskAddTags, - border: const OutlineInputBorder(), - prefixIconConstraints: BoxConstraints( - maxWidth: - (MediaQuery.of(context).size.width - paddingX) * 0.7), - prefixIcon: inputFieldValues.tags.isNotEmpty - ? Padding( - padding: const EdgeInsets.only(left: 5, right: 5), - child: SingleChildScrollView( - controller: inputFieldValues.tagScrollController, - scrollDirection: Axis.horizontal, - child: Row( - children: inputFieldValues.tags.map((String tag) { - return Container( - margin: const EdgeInsets.only(left: 5), - child: InputChip( - label: Text(tag), - onDeleted: () { - inputFieldValues.onTagRemoved(tag); - }, - )); - }).toList()), - )) - : null, - ), - onChanged: inputFieldValues.onTagChanged, - onFieldSubmitted: inputFieldValues.onTagSubmitted, - ); - }, - ); - }, - ); - } -} diff --git a/lib/app/utils/app_settings/app_settings.dart b/lib/app/utils/app_settings/app_settings.dart deleted file mode 100644 index 6c27b838..00000000 --- a/lib/app/utils/app_settings/app_settings.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; - -part 'save_tour_status.dart'; -part 'selected_theme.dart'; -part 'selected_language.dart'; - -class AppSettings { - static bool isDarkMode = true; - static SupportedLanguage selectedLanguage = SupportedLanguage.english; - - static Future init() async { - await SelectedTheme.init(); - await SelectedLanguage.init(); - await SaveTourStatus.init(); - - isDarkMode = SelectedTheme.getMode() ?? true; - - SupportedLanguage? userPreferredLanguage = - SelectedLanguage.getSelectedLanguage(); - - if (userPreferredLanguage != null) { - selectedLanguage = userPreferredLanguage; - } else { - // If no explicit preference, use the system language (if supported) - selectedLanguage = SupportedLanguageExtension.getSystemLanguage(); - // Save the system language as the user's preference - await SelectedLanguage.saveSelectedLanguage(selectedLanguage); - } - } - - static Future saveSettings( - bool isDarkMode, SupportedLanguage language) async { - await SelectedTheme.saveMode(isDarkMode); - await SelectedLanguage.saveSelectedLanguage(language); - } -} diff --git a/lib/app/utils/app_settings/save_tour_status.dart b/lib/app/utils/app_settings/save_tour_status.dart deleted file mode 100644 index 11b23689..00000000 --- a/lib/app/utils/app_settings/save_tour_status.dart +++ /dev/null @@ -1,65 +0,0 @@ -part of 'app_settings.dart'; - -class SaveTourStatus { - static SharedPreferences? _preferences; - - static Future init() async { - _preferences = await SharedPreferences.getInstance(); - } - - static Future saveReportsTourStatus(bool status) async { - await _preferences?.setBool('reports_tour', status); - } - - static Future getReportsTourStatus() async { - return _preferences?.getBool('reports_tour') ?? false; - } - - static Future saveInAppTourStatus(bool status) async { - await _preferences?.setBool('tour', status); - } - - static Future getInAppTourStatus() async { - return _preferences?.getBool('tour') ?? false; - } - - static Future saveFilterTourStatus(bool status) async { - await _preferences?.setBool('filter_tour', status); - } - - static Future getFilterTourStatus() async { - return _preferences?.getBool('filter_tour') ?? false; - } - - static Future saveProfileTourStatus(bool status) async { - await _preferences?.setBool('profile_tour', status); - } - - static Future getProfileTourStatus() async { - return _preferences?.getBool('profile_tour') ?? false; - } - - static Future saveDetailsTourStatus(bool status) async { - await _preferences?.setBool('details_tour', status); - } - - static Future getDetailsTourStatus() async { - return _preferences?.getBool('details_tour') ?? false; - } - - static Future saveManageTaskServerTourStatus(bool status) async { - await _preferences?.setBool('manage_task_server_tour', status); - } - - static Future getManageTaskServerTourStatus() async { - return _preferences?.getBool('manage_task_server_tour') ?? false; - } - - static Future saveTaskSwipeTutorialStatus(bool status) async { - await _preferences?.setBool('task_swipe_tutorial_completed', status); - } - - static Future getTaskSwipeTutorialStatus() async { - return _preferences?.getBool('task_swipe_tutorial_completed') ?? false; - } -} diff --git a/lib/app/utils/app_settings/selected_language.dart b/lib/app/utils/app_settings/selected_language.dart deleted file mode 100644 index aea3259a..00000000 --- a/lib/app/utils/app_settings/selected_language.dart +++ /dev/null @@ -1,18 +0,0 @@ -part of 'app_settings.dart'; - -class SelectedLanguage { - static SharedPreferences? _preferences; - - static Future init() async { - _preferences = await SharedPreferences.getInstance(); - } - - static Future saveSelectedLanguage(SupportedLanguage language) async { - await _preferences?.setString('_selectedLanguage', language.languageCode); - } - - static SupportedLanguage? getSelectedLanguage() { - String? languageCode = _preferences?.getString('_selectedLanguage'); - return SupportedLanguageExtension.fromCode(languageCode); - } -} diff --git a/lib/app/utils/app_settings/selected_theme.dart b/lib/app/utils/app_settings/selected_theme.dart deleted file mode 100644 index 908a835a..00000000 --- a/lib/app/utils/app_settings/selected_theme.dart +++ /dev/null @@ -1,17 +0,0 @@ -part of 'app_settings.dart'; - -class SelectedTheme { - static SharedPreferences? _preferences; - - static Future init() async { - _preferences = await SharedPreferences.getInstance(); - } - - static Future saveMode(bool mode) async { - await _preferences?.setBool('_isDark', mode); - } - - static bool? getMode() { - return _preferences?.getBool('_isDark'); - } -} diff --git a/lib/app/utils/constants/constants.dart b/lib/app/utils/constants/constants.dart deleted file mode 100644 index 3a8aed22..00000000 --- a/lib/app/utils/constants/constants.dart +++ /dev/null @@ -1,4 +0,0 @@ -export './onboarding_screen_content.dart'; -export './taskwarrior_fonts.dart'; -export './palette.dart'; -export './taskwarrior_colors.dart'; \ No newline at end of file diff --git a/lib/app/utils/constants/onboarding_screen_content.dart b/lib/app/utils/constants/onboarding_screen_content.dart deleted file mode 100644 index a0d2dd3a..00000000 --- a/lib/app/utils/constants/onboarding_screen_content.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/models/onboarding_model.dart'; -import 'package:taskwarrior/app/utils/gen/assets.gen.dart'; - -List contents = [ - OnboardingModel( - title: "Welcome to Taskwarrior", - image:Assets.svg.s1.path, - colors: const Color(0xffDAD3C8), - desc: - "Welcome to Taskwarrior, your ultimate task management solution. Manage your tasks, group them, and organize your work with ease.", - ), - OnboardingModel( - title: "Powerful Reporting", - image:Assets.svg.s2.path, - colors: const Color(0xffFFE5DE), - desc: - "Generate insightful reports to analyze your task data. Gain valuable insights into your productivity and make data-driven decisions.", - ), - OnboardingModel( - title: "Sync Across Devices", - image:Assets.svg.s3.path, - colors: const Color(0xffDCF6E6), - desc: - "Sync your tasks seamlessly across multiple Taskwarrior clients, ensuring you're always up to date and have access to your reports on any device.", - ), -]; diff --git a/lib/app/utils/constants/palette.dart b/lib/app/utils/constants/palette.dart deleted file mode 100644 index 53fa2dca..00000000 --- a/lib/app/utils/constants/palette.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:flutter/material.dart'; - -class Palette { - static const MaterialColor kToDark = MaterialColor( - 0xFF212121, // 0% comes in here, this will be color picked if no shade is selected when defining a Color property which doesn’t require a swatch. - { - 50: Color(0xff1e1e1e), //10% - 100: Color(0xff1a1a1a), //20% - 200: Color(0xff171717), //30% - 300: Color(0xff141414), //40% - 400: Color(0xff111111), //50% - 500: Color(0xff0d0d0d), //60% - 600: Color(0xff0a0a0a), //70% - 700: Color(0xff070707), //80% - 800: Color(0xff030303), //90% - 900: Color(0xff000000), //100% - }, - ); -} diff --git a/lib/app/utils/constants/permissions.dart b/lib/app/utils/constants/permissions.dart deleted file mode 100644 index 96bc05dc..00000000 --- a/lib/app/utils/constants/permissions.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:permission_handler/permission_handler.dart'; - -List permissions = [ - Permission.notification, - Permission.storage, - Permission.manageExternalStorage, -]; \ No newline at end of file diff --git a/lib/app/utils/constants/taskwarrior_colors.dart b/lib/app/utils/constants/taskwarrior_colors.dart deleted file mode 100644 index 19110e2f..00000000 --- a/lib/app/utils/constants/taskwarrior_colors.dart +++ /dev/null @@ -1,69 +0,0 @@ -// ignore_for_file: file_names - -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/constants/palette.dart'; -import 'package:taskwarrior/app/utils/themes/theme_extension.dart'; - -class TaskWarriorColors { - // Normal Colors - static Color red = Colors.red; - static Color green = Colors.green; - static Color yellow = Colors.yellow; - static Color white = Colors.white; - static Color black = Colors.black; - static Color grey = Colors.grey; - static Color? lightGrey = Colors.grey[600]; - static Color purple = Colors.purple; - static Color borderColor = Colors.grey.shade300; - static Color deepPurpleAccent = Colors.deepPurpleAccent; - static Color deepPurple = Colors.deepPurple; - - // colors irrespective of theme - static Color appBarColor = const Color(0xFF000000); - static Color appBarTextColor = white; - static Color appBarUnSelectedIconsColorForReports = const Color(0xFF48454E); - - // Dark Theme Color Palette - static Color kprimaryBackgroundColor = Palette.kToDark.shade200; - static Color ksecondaryBackgroundColor = - const Color.fromARGB(255, 48, 46, 46); - static Color kprimaryTextColor = Colors.white; - static Color ksecondaryTextColor = Colors.white; - static Color kprimaryDisabledTextColor = const Color(0xff595f6b); - static Color kdialogBackGroundColor = const Color.fromARGB(255, 25, 25, 25); - - // Light Theme Color Palette - static Color kLightPrimaryBackgroundColor = Colors.white; - static Color kLightSecondaryBackgroundColor = - const Color.fromARGB(255, 220, 216, 216); - static Color kLightPrimaryTextColor = Colors.black; - static Color kLightSecondaryTextColor = const Color.fromARGB(255, 48, 46, 46); - static Color kLightPrimaryDisabledTextColor = const Color(0xffACACAB); - static Color kLightDialogBackGroundColor = Colors.white; - static TaskwarriorColorTheme darkTheme = TaskwarriorColorTheme( - dialogBackgroundColor: kdialogBackGroundColor, - primaryBackgroundColor: kprimaryBackgroundColor, - primaryDisabledTextColor: kprimaryDisabledTextColor, - primaryTextColor: kprimaryTextColor, - secondaryBackgroundColor: ksecondaryBackgroundColor, - secondaryTextColor: ksecondaryTextColor, - dividerColor: const Color.fromARGB(255, 192, 192, 192), - purpleShade: deepPurpleAccent, - greyShade: grey, - icons: Icons.dark_mode, - dimCol: const Color.fromARGB(137, 248, 248, 248) - ); - static TaskwarriorColorTheme lightTheme = TaskwarriorColorTheme( - dialogBackgroundColor: kLightDialogBackGroundColor, - primaryBackgroundColor: kLightPrimaryBackgroundColor, - primaryDisabledTextColor: kLightPrimaryDisabledTextColor, - primaryTextColor: kLightPrimaryTextColor, - secondaryBackgroundColor: kLightSecondaryBackgroundColor, - secondaryTextColor: kLightSecondaryTextColor, - dividerColor: kprimaryBackgroundColor, - purpleShade: deepPurple, - greyShade: lightGrey, - icons: Icons.light_mode, - dimCol: const Color.fromARGB(136, 17, 17, 17) - ); -} diff --git a/lib/app/utils/constants/taskwarrior_fonts.dart b/lib/app/utils/constants/taskwarrior_fonts.dart deleted file mode 100644 index 1ce29ef2..00000000 --- a/lib/app/utils/constants/taskwarrior_fonts.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:flutter/material.dart'; - -class TaskWarriorFonts { - // Font weights - static const FontWeight thin = FontWeight.w100; - static const FontWeight extraLight = FontWeight.w200; - static const FontWeight light = FontWeight.w300; - static const FontWeight regular = FontWeight.w400; - static const FontWeight medium = FontWeight.w500; - static const FontWeight semiBold = FontWeight.w600; - static const FontWeight bold = FontWeight.w700; - static const FontWeight extraBold = FontWeight.w800; - static const FontWeight black = FontWeight.w900; - - // Font sizes - static const double fontSizeSmall = 12.0; - static const double fontSizeMedium = 16.0; - static const double fontSizeLarge = 20.0; - static const double fontSizeExtraLarge = 24.0; -} diff --git a/lib/app/utils/constants/utilites.dart b/lib/app/utils/constants/utilites.dart deleted file mode 100644 index 85b69bcc..00000000 --- a/lib/app/utils/constants/utilites.dart +++ /dev/null @@ -1,107 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -class Utils { - static String getWeekNumber(DateTime? date) { - int weekNumber = - ((date!.difference(DateTime(date.year, 1, 1)).inDays) / 7).ceil(); - return weekNumber.toString(); - } - - static int getWeekNumbertoInt(DateTime? date) { - int weekNumber = - ((date!.difference(DateTime(date.year, 1, 1)).inDays) / 7).ceil(); - return weekNumber; - } - - static String formatDate(DateTime date, String pattern) { - final formatter = DateFormat(pattern); - return formatter.format(date); - } - - static String getMonthName(int month) { - switch (month) { - case 1: - return 'January'; - case 2: - return 'February'; - case 3: - return 'March'; - case 4: - return 'April'; - case 5: - return 'May'; - case 6: - return 'June'; - case 7: - return 'July'; - case 8: - return 'August'; - case 9: - return 'September'; - case 10: - return 'October'; - case 11: - return 'November'; - case 12: - return 'December'; - default: - return ''; - } - } - - static AlertDialog showAlertDialog({ - Key? key, - Widget? icon, - EdgeInsetsGeometry? iconPadding, - Color? iconColor, - Widget? title, - EdgeInsetsGeometry? titlePadding, - TextStyle? titleTextStyle, - Widget? content, - EdgeInsetsGeometry? contentPadding, - TextStyle? contentTextStyle, - List? actions, - EdgeInsetsGeometry? actionsPadding, - MainAxisAlignment? actionsAlignment, - OverflowBarAlignment? actionsOverflowAlignment, - VerticalDirection? actionsOverflowDirection, - double? actionsOverflowButtonSpacing, - EdgeInsetsGeometry? buttonPadding, - Color? backgroundColor, - double? elevation, - Color? shadowColor, - Color? surfaceTintColor, - String? semanticLabel, - Clip clipBehavior = Clip.none, - ShapeBorder? shape, - AlignmentGeometry? alignment, - bool scrollable = false, - }) { - return AlertDialog( - key: key, - title: title, - titlePadding: titlePadding, - titleTextStyle: titleTextStyle, - content: content, - contentPadding: contentPadding, - contentTextStyle: contentTextStyle, - actions: actions, - actionsPadding: actionsPadding, - actionsAlignment: actionsAlignment, - actionsOverflowAlignment: actionsOverflowAlignment, - actionsOverflowDirection: actionsOverflowDirection, - actionsOverflowButtonSpacing: actionsOverflowButtonSpacing, - buttonPadding: buttonPadding, - elevation: elevation, - semanticLabel: semanticLabel, - clipBehavior: clipBehavior, - shape: shape, - alignment: alignment, - scrollable: scrollable, - backgroundColor:AppSettings.isDarkMode? TaskWarriorColors.kdialogBackGroundColor : TaskWarriorColors.kLightDialogBackGroundColor, - ); - } -} diff --git a/lib/app/utils/debug_logger/log_databse_helper.dart b/lib/app/utils/debug_logger/log_databse_helper.dart deleted file mode 100644 index f897ef7d..00000000 --- a/lib/app/utils/debug_logger/log_databse_helper.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'package:sqflite/sqflite.dart'; -import 'package:path/path.dart'; -import 'package:path_provider/path_provider.dart'; -import 'dart:io'; - -class LogDatabaseHelper { - static Database? _database; - static const String tableName = 'logs'; - static const String columnId = 'id'; - static const String columnMessage = 'message'; - static const String columnTimestamp = 'timestamp'; - - Future get database async { - if (_database != null) return _database!; - _database = await initDB(); - return _database!; - } - - Future initDB() async { - Directory documentsDirectory = await getApplicationDocumentsDirectory(); - String path = join(documentsDirectory.path, 'debug_logs.db'); - return await openDatabase( - path, - version: 1, - onCreate: (db, version) async { - await db.execute(''' - CREATE TABLE $tableName ( - $columnId INTEGER PRIMARY KEY AUTOINCREMENT, - $columnMessage TEXT NOT NULL, - $columnTimestamp TEXT NOT NULL - ) - '''); - }, - ); - } - - Future insertLog(String message) async { - final db = await database; - await db.insert( - tableName, - { - columnMessage: message, - columnTimestamp: DateTime.now().toIso8601String(), - }, - conflictAlgorithm: ConflictAlgorithm.replace, - ); - } - - Future>> getLogs() async { - final db = await database; - return await db.query(tableName, orderBy: '$columnTimestamp DESC'); - } - - Future clearLogs() async { - final db = await database; - await db.delete(tableName); - } -} diff --git a/lib/app/utils/gen/assets.gen.dart b/lib/app/utils/gen/assets.gen.dart deleted file mode 100644 index 39452eaa..00000000 --- a/lib/app/utils/gen/assets.gen.dart +++ /dev/null @@ -1,186 +0,0 @@ -/// GENERATED CODE - DO NOT MODIFY BY HAND -/// ***************************************************** -/// FlutterGen -/// ***************************************************** - -// coverage:ignore-file -// ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use - -import 'package:flutter/widgets.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:flutter/services.dart'; - -class $AssetsImagesGen { - const $AssetsImagesGen(); - - /// File path: assets/images/taskwarrior.png - AssetGenImage get taskwarrior => - const AssetGenImage('assets/images/taskwarrior.png'); - - /// File path: assets/images/taskwarrior_dark.png - AssetGenImage get taskwarriorDark => - const AssetGenImage('assets/images/taskwarrior_dark.png'); - - /// List of all assets - List get values => [taskwarrior, taskwarriorDark]; -} - -class $AssetsSvgGen { - const $AssetsSvgGen(); - - /// File path: assets/svg/github.svg - SvgGenImage get github => const SvgGenImage('assets/svg/github.svg'); - - /// File path: assets/svg/link.svg - SvgGenImage get link => const SvgGenImage('assets/svg/link.svg'); - - /// File path: assets/svg/logo.svg - SvgGenImage get logo => const SvgGenImage('assets/svg/logo.svg'); - - /// File path: assets/svg/s1.svg - SvgGenImage get s1 => const SvgGenImage('assets/svg/s1.svg'); - - /// File path: assets/svg/s2.svg - SvgGenImage get s2 => const SvgGenImage('assets/svg/s2.svg'); - - /// File path: assets/svg/s3.svg - SvgGenImage get s3 => const SvgGenImage('assets/svg/s3.svg'); - - /// List of all assets - List get values => [github, link, logo, s1, s2, s3]; -} - -class Assets { - Assets._(); - - static const $AssetsImagesGen images = $AssetsImagesGen(); - static const $AssetsSvgGen svg = $AssetsSvgGen(); -} - -class AssetGenImage { - const AssetGenImage(this._assetName); - - final String _assetName; - - Image image({ - Key? key, - AssetBundle? bundle, - ImageFrameBuilder? frameBuilder, - ImageErrorWidgetBuilder? errorBuilder, - String? semanticLabel, - bool excludeFromSemantics = false, - double? scale, - double? width, - double? height, - Color? color, - Animation? opacity, - BlendMode? colorBlendMode, - BoxFit? fit, - AlignmentGeometry alignment = Alignment.center, - ImageRepeat repeat = ImageRepeat.noRepeat, - Rect? centerSlice, - bool matchTextDirection = false, - bool gaplessPlayback = false, - bool isAntiAlias = false, - String? package, - FilterQuality filterQuality = FilterQuality.low, - int? cacheWidth, - int? cacheHeight, - }) { - return Image.asset( - _assetName, - key: key, - bundle: bundle, - frameBuilder: frameBuilder, - errorBuilder: errorBuilder, - semanticLabel: semanticLabel, - excludeFromSemantics: excludeFromSemantics, - scale: scale, - width: width, - height: height, - color: color, - opacity: opacity, - colorBlendMode: colorBlendMode, - fit: fit, - alignment: alignment, - repeat: repeat, - centerSlice: centerSlice, - matchTextDirection: matchTextDirection, - gaplessPlayback: gaplessPlayback, - isAntiAlias: isAntiAlias, - package: package, - filterQuality: filterQuality, - cacheWidth: cacheWidth, - cacheHeight: cacheHeight, - ); - } - - ImageProvider provider({ - AssetBundle? bundle, - String? package, - }) { - return AssetImage( - _assetName, - bundle: bundle, - package: package, - ); - } - - String get path => _assetName; - - String get keyName => _assetName; -} - -class SvgGenImage { - const SvgGenImage(this._assetName); - - final String _assetName; - - SvgPicture svg({ - Key? key, - bool matchTextDirection = false, - AssetBundle? bundle, - String? package, - double? width, - double? height, - BoxFit fit = BoxFit.contain, - AlignmentGeometry alignment = Alignment.center, - bool allowDrawingOutsideViewBox = false, - WidgetBuilder? placeholderBuilder, - String? semanticsLabel, - bool excludeFromSemantics = false, - SvgTheme theme = const SvgTheme(), - ColorFilter? colorFilter, - Clip clipBehavior = Clip.hardEdge, - @deprecated Color? color, - @deprecated BlendMode colorBlendMode = BlendMode.srcIn, - @deprecated bool cacheColorFilter = false, - }) { - return SvgPicture.asset( - _assetName, - key: key, - matchTextDirection: matchTextDirection, - bundle: bundle, - package: package, - width: width, - height: height, - fit: fit, - alignment: alignment, - allowDrawingOutsideViewBox: allowDrawingOutsideViewBox, - placeholderBuilder: placeholderBuilder, - semanticsLabel: semanticsLabel, - excludeFromSemantics: excludeFromSemantics, - theme: theme, - colorFilter: colorFilter, - color: color, - colorBlendMode: colorBlendMode, - clipBehavior: clipBehavior, - cacheColorFilter: cacheColorFilter, - ); - } - - String get path => _assetName; - - String get keyName => _assetName; -} diff --git a/lib/app/utils/gen/fonts.gen.dart b/lib/app/utils/gen/fonts.gen.dart deleted file mode 100644 index 4da254ad..00000000 --- a/lib/app/utils/gen/fonts.gen.dart +++ /dev/null @@ -1,24 +0,0 @@ -/// GENERATED CODE - DO NOT MODIFY BY HAND -/// ***************************************************** -/// FlutterGen -/// ***************************************************** - -// coverage:ignore-file -// ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use - -class FontFamily { - FontFamily._(); - - /// Font family: Poppins - static const String poppins = 'Poppins'; - - /// Font family: SFProDisplay - static const String sFProDisplay = 'SFProDisplay'; - - /// Font family: SegoeUI - static const String segoeUI = 'SegoeUI'; - - /// Font family: Ubuntu - static const String ubuntu = 'Ubuntu'; -} diff --git a/lib/app/utils/home_path/home_path.dart b/lib/app/utils/home_path/home_path.dart deleted file mode 100644 index 3ad5f6f0..00000000 --- a/lib/app/utils/home_path/home_path.dart +++ /dev/null @@ -1,5 +0,0 @@ -export './impl/data.dart'; -export './impl/taskd_client.dart'; -export './impl/home.dart'; -export './impl/gui_pem_file_paths.dart'; -export './impl/taskrc.dart'; \ No newline at end of file diff --git a/lib/app/utils/home_path/impl/data.dart b/lib/app/utils/home_path/impl/data.dart deleted file mode 100644 index d118f01b..00000000 --- a/lib/app/utils/home_path/impl/data.dart +++ /dev/null @@ -1,194 +0,0 @@ -// ignore_for_file: prefer_expression_function_bodies - -import 'dart:collection'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/utils/taskc/payload.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/urgency.dart'; - - -class Data { - Data(this.home); - - final Directory home; - - void updateWaitOrUntil(Iterable pendingData) { - var now = DateTime.now().toUtc(); - for (var task in pendingData) { - if (task.until != null && task.until!.isBefore(now)) { - mergeTask( - task.rebuild( - (b) => b - ..status = 'deleted' - ..end = now, - ), - ); - } else if (task.status == 'waiting' && - (task.wait == null || task.wait!.isBefore(now))) { - _mergeTasks( - [ - task.rebuild( - (b) => b - ..status = 'pending' - ..wait = null, - ), - ], - ); - } - } - } - - List pendingData() { - var data = _allData().where( - (task) => task.status != 'completed' && task.status != 'deleted'); - var now = DateTime.now(); - if (data.any((task) => - (task.until != null && task.until!.isBefore(now)) || - (task.status == 'waiting' && - (task.wait == null || task.wait!.isBefore(now))))) { - updateWaitOrUntil(data); - data = _allData().where( - (task) => task.status != 'completed' && task.status != 'deleted'); - } - return data - .toList() - .asMap() - .entries - .map((entry) => entry.value.rebuild((b) => b..id = entry.key + 1)) - .toList(); - } - - List _completedData() { - var data = _allData().where( - (task) => task.status == 'completed' || task.status == 'deleted'); - return [ - for (var task in data) task.rebuild((b) => b..id = 0), - ]; - } - - List allData() { - var data = pendingData()..addAll(_completedData()); - return data; - } - - List _allData() => [ - if (File('${home.path}/.task/all.data').existsSync()) - for (var line in File('${home.path}/.task/all.data') - .readAsStringSync() - .trim() - .split('\n')) - if (line.isNotEmpty) Task.fromJson(json.decode(line)), - ]; - - String export() { - var string = allData() - .map((task) { - var jsonTask = task.toJson(); - - jsonTask['urgency'] = num.parse(urgency(task) - .toStringAsFixed(1) - .replaceFirst(RegExp(r'.0$'), '')); - - var keyOrder = [ - 'id', - 'annotations', - 'depends', - 'description', - 'due', - 'end', - 'entry', - 'imask', - 'mask', - 'modified', - 'parent', - 'priority', - 'project', - 'recur', - 'scheduled', - 'start', - 'status', - 'tags', - 'until', - 'uuid', - 'wait', - 'urgency', - ].asMap().map((key, value) => MapEntry(value, key)); - - var fallbackOrder = jsonTask.keys - .toList() - .asMap() - .map((key, value) => MapEntry(value, key)); - - for (var entry in fallbackOrder.entries) { - keyOrder.putIfAbsent( - entry.key, - () => entry.value + keyOrder.length, - ); - } - - return json.encode(SplayTreeMap.of(jsonTask, (key1, key2) { - return keyOrder[key1]!.compareTo(keyOrder[key2]!); - })); - }) - .toList() - .join(',\n'); - return '[\n$string\n]\n'; - } - - void mergeTask(Task task) { - _mergeTasks([task]); - File('${home.path}/.task/backlog.data').writeAsStringSync( - '${json.encode(task.rebuild((b) => b..id = null).toJson())}\n', - mode: FileMode.append, - ); - } - - Task getTask(String uuid) { - return allData().firstWhere((task) => task.uuid == uuid); - } - - void _mergeTasks(List tasks) { - File('${home.path}/.task/all.data').createSync(recursive: true); - var lines = File('${home.path}/.task/all.data') - .readAsStringSync() - .trim() - .split('\n'); - var taskMap = { - for (var taskLine in lines) - if (taskLine.isNotEmpty) - (json.decode(taskLine) as Map)['uuid']: taskLine, - }; - for (var task in tasks) { - taskMap[task.uuid] = - json.encode(task.rebuild((b) => b..id = null).toJson()); - } - File('${home.path}/.task/all.data').writeAsStringSync(''); - for (var task in taskMap.values) { - File('${home.path}/.task/all.data').writeAsStringSync( - '$task\n', - mode: FileMode.append, - ); - } - } - - String payload() { - var payload = ''; - if (File('${home.path}/.task/backlog.data').existsSync()) { - payload = File('${home.path}/.task/backlog.data').readAsStringSync(); - } - return payload; - } - - void mergeSynchronizeResponse(Payload payload) { - var tasks = [ - for (var task in payload.tasks) - Task.fromJson( - (json.decode(task) as Map)..remove('id')), - ]; - _mergeTasks(tasks); - File('${home.path}/.task/backlog.data') - .writeAsStringSync('${payload.userKey}\n'); - } -} diff --git a/lib/app/utils/home_path/impl/gui_pem_file_paths.dart b/lib/app/utils/home_path/impl/gui_pem_file_paths.dart deleted file mode 100644 index 9805e177..00000000 --- a/lib/app/utils/home_path/impl/gui_pem_file_paths.dart +++ /dev/null @@ -1,81 +0,0 @@ -import 'dart:io'; - -import 'package:taskwarrior/app/utils/taskserver/pem_file_paths.dart'; - - - -class GUIPemFiles { - GUIPemFiles(this.home); - - final Directory home; - - PemFilePaths get pemFilePaths => PemFilePaths( - ca: '${home.path}/.task/ca.cert.pem', - certificate: '${home.path}/.task/first_last.cert.pem', - key: '${home.path}/.task/first_last.key.pem', - serverCert: '${home.path}/.task/server.cert.pem', - ); - - File fileByKey(String key) { - Directory('${home.path}/.task').createSync(recursive: true); - return File(pemFilePaths.map[key]!); - } - - String? pemName(String key) { - if (File('${home.path}/$key').existsSync()) { - return File('${home.path}/$key').readAsStringSync(); - } - return null; - } - - void removePemFile(String pemFileKey) { - if (fileByKey(pemFileKey).existsSync()) { - fileByKey(pemFileKey).deleteSync(); - } - if (File('${home.path}/$pemFileKey').existsSync()) { - File('${home.path}/$pemFileKey').deleteSync(); - } - } - - void removeServerCert() { - if (pemFilePaths.serverCert != null) { - if (File(pemFilePaths.serverCert!).existsSync()) { - File(pemFilePaths.serverCert!).deleteSync(); - } - } - } - - bool serverCertExists() { - return File(pemFilePaths.serverCert!).existsSync(); - } - - void addFileName({required String key, required String name}) { - File('${home.path}/$key').writeAsStringSync(name); - } - - void addFileContents({required String key, required String contents}) { - fileByKey(key).writeAsStringSync(contents); - } - - void addPemFile({ - required String key, - required String contents, - String? name, - }) { - addFileContents(key: key, contents: contents); - if (name != null) { - addFileName(key: key, name: name); - } - } - - String? pemContents(String key) { - if (fileByKey(key).existsSync()) { - return fileByKey(key).readAsStringSync(); - } - return null; - } - - String? pemFilename(String key) { - return pemName(key); - } -} diff --git a/lib/app/utils/home_path/impl/home.dart b/lib/app/utils/home_path/impl/home.dart deleted file mode 100644 index 3fd0c9cf..00000000 --- a/lib/app/utils/home_path/impl/home.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'dart:io'; - -import 'package:taskwarrior/app/models/data.dart'; -import 'package:taskwarrior/app/models/storage/exceptions/bad_certificate_exception.dart'; -import 'package:taskwarrior/app/utils/home_path/impl/taskd_client.dart'; -import 'package:taskwarrior/app/utils/taskserver/taskserver.dart' as rc; - -class Home { - const Home({ - required this.home, - this.pemFilePaths, - this.onBadCertificate, - }); - - final Directory home; - final rc.PemFilePaths? pemFilePaths; - final bool Function(X509Certificate)? onBadCertificate; - - Data get _data => Data(home); - File get _taskrc => File('${home.path}/.taskrc'); - - TaskdClient _taskdClient(client) { - return TaskdClient( - taskrc: (!_taskrc.existsSync()) - ? null - : rc.Taskrc.fromString(_taskrc.readAsStringSync()), - client: client, - pemFilePaths: pemFilePaths, - throwOnBadCertificate: (badCertificate) => throw BadCertificateException( - home: home, - certificate: badCertificate, - ), - ); - } - - Future statistics(String client) { - return _taskdClient(client).statistics(); - } - - Future synchronize(String client) async { - var payload = _data.payload(); - var response = await _taskdClient(client).synchronize( - payload, - ); - _data.mergeSynchronizeResponse(response.payload); - return response.header; - } -} diff --git a/lib/app/utils/home_path/impl/taskd_client.dart b/lib/app/utils/home_path/impl/taskd_client.dart deleted file mode 100644 index 8d6c0f40..00000000 --- a/lib/app/utils/home_path/impl/taskd_client.dart +++ /dev/null @@ -1,137 +0,0 @@ -// ignore_for_file: deprecated_export_use - -import 'dart:async'; -import 'dart:io'; - - - -import 'package:taskwarrior/app/models/storage/exceptions/taskserver_configuration_exception.dart'; -import 'package:taskwarrior/app/utils/taskc/impl/codec.dart'; -import 'package:taskwarrior/app/utils/taskc/impl/message.dart'; -import 'package:taskwarrior/app/utils/taskc/message.dart'; -import 'package:taskwarrior/app/utils/taskc/response.dart'; -import 'package:taskwarrior/app/utils/taskserver/pem_file_paths.dart'; -import 'package:taskwarrior/app/utils/taskserver/taskrc.dart'; - - -enum TaskserverProgress { - connecting, - securing, - sending, - waiting, - receiving, -} - -class TaskdClient { - TaskdClient({ - this.taskrc, - this.client, - this.pemFilePaths, - this.throwOnBadCertificate, - }) : progressController = StreamController(); - - final Taskrc? taskrc; - final String? client; - final PemFilePaths? pemFilePaths; - final void Function(X509Certificate)? throwOnBadCertificate; - final StreamController progressController; - - Stream get progress => progressController.stream; - - PemFilePaths _pemFilePaths() { - return pemFilePaths ?? - PemFilePaths.fromTaskrc( - taskrc?.pemFilePaths.map ?? {}, - ); - } - - bool _onBadCertificate(X509Certificate serverCert) { - if (_pemFilePaths().savedServerCertificateMatches(serverCert)) { - return true; - } else if (throwOnBadCertificate != null) { - throwOnBadCertificate!(serverCert); - return true; - } - return false; - } - - Future request({ - required String type, - String? payload, - }) async { - if (taskrc?.server == null) { - throw TaskserverConfigurationException( - 'Server cannot be null.', - ); - } - - progressController.add(TaskserverProgress.connecting); - - var socket = await Socket.connect( - taskrc!.server!.address, - taskrc!.server!.port, - ); - - progressController.add(TaskserverProgress.securing); - - var secureSocket = await SecureSocket.secure( - socket, - context: _pemFilePaths().securityContext(), - onBadCertificate: _onBadCertificate, - ); - - var messageString = message( - type: type, - client: client, - credentials: taskrc?.credentials, - payload: payload, - ); - - progressController.add(TaskserverProgress.sending); - - secureSocket.add(Codec.encode(messageString)); - - progressController.add(TaskserverProgress.waiting); - - var responseBytes = BytesBuilder(); - - await secureSocket.listen((event) { - if (responseBytes.isEmpty) { - progressController.add(TaskserverProgress.receiving); - } - responseBytes.add(event); - }).asFuture(); - - await secureSocket.close(); - await socket.close(); - - if (responseBytes.isEmpty) { - throw EmptyResponseException(); - } - - var response = Response.fromString(Codec.decode(responseBytes.takeBytes())); - - if (![ - '200', - '201', - '202', - ].contains(response.header['code'])) { - throw TaskserverResponseException(response.header); - } - - return response; - } - - Future statistics() { - return request( - type: 'statistics', - ).then((response) => response.header); - } - - Future synchronize(String payload) { - return request( - type: 'sync', - payload: payload, - ); - } -} diff --git a/lib/app/utils/home_path/impl/taskrc.dart b/lib/app/utils/home_path/impl/taskrc.dart deleted file mode 100644 index 1b8863e7..00000000 --- a/lib/app/utils/home_path/impl/taskrc.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'dart:io'; - -class Taskrc { - const Taskrc(this.home); - - final Directory home; - - File get _taskrc => File('${home.path}/.taskrc'); - - void addTaskrc(String taskrc) { - _taskrc.writeAsStringSync(taskrc); - } - - String? readTaskrc() { - if (_taskrc.existsSync()) { - return _taskrc.readAsStringSync(); - } - return null; - } -} diff --git a/lib/app/utils/language/bengali_sentences.dart b/lib/app/utils/language/bengali_sentences.dart deleted file mode 100644 index 3348fb78..00000000 --- a/lib/app/utils/language/bengali_sentences.dart +++ /dev/null @@ -1,654 +0,0 @@ -import 'package:taskwarrior/app/utils/language/sentences.dart'; - -class BengaliSentences extends Sentences { - @override - String get helloWorld => 'হ্যালো বিশ্ব!'; - @override - String get homePageTitle => 'হোম পেজ'; - @override - String get homePageLastModified => 'শেষবার পরিবর্তিত'; - @override - String get homePageDue => 'জরুরি'; - @override - String get homePageTaskWarriorNotConfigured => 'TaskServer কনফিগার করা হয়নি'; - @override - String get homePageSetup => 'সেটআপ'; - @override - String get homePageFilter => 'ফিল্টার'; - @override - String get homePageMenu => 'মেনু'; - @override - String get homePageExitApp => 'অ্যাপ বন্ধ করুন'; - @override - String get homePageAreYouSureYouWantToExit => - 'আপনি কি সত্যিই অ্যাপ বন্ধ করতে চান?'; - @override - String get homePageExit => 'বাহির যান'; - @override - String get homePageCancel => 'বাতিল করুন'; - @override - String get homePageClickOnTheBottomRightButtonToStartAddingTasks => - 'টাস্ক যোগ করা শুরু করতে নিচে ডানদিকে বোতামে ক্লিক করুন'; - @override - String get homePageSearchNotFound => 'অনুসন্ধানে কিছু পাওয়া যায়নি'; - @override - String get homePageFetchingTasks => 'টাস্ক আনা হচ্ছে'; - @override - String get settingsPageTitle => 'সেটিংস পেজ'; - @override - String get settingsPageSubtitle => 'আপনার পছন্দ সেট করুন'; - @override - String get settingsPageMovingDataToNewDirectory => - 'নতুন ডিরেক্টরিতে ডেটা স্থানান্তর করা হচ্ছে'; - @override - String get settingsPageSyncOnStartTitle => - 'অ্যাপ শুরুতে ডেটা স্বয়ংক্রিয়ভাবে সিঙ্ক করুন'; - @override - String get settingsPageSyncOnStartDescription => 'শুরুতে সিঙ্ক করুন'; - @override - String get settingsPageEnableSyncOnTaskCreateTitle => - 'নতুন টাস্ক তৈরি করার সময় স্বয়ংক্রিয় সিঙ্কিং সক্ষম করুন'; - @override - String get settingsPageEnableSyncOnTaskCreateDescription => - 'নতুন টাস্ক তৈরি করার সময় স্বয়ংক্রিয় সিঙ্কিং সক্ষম করুন'; - @override - String get settingsPageHighlightTaskTitle => 'জরুরি টাস্ক হাইলাইট করুন'; - @override - String get settingsPageHighlightTaskDescription => - '1 দিনের মধ্যে বা অতিক্রান্ত সময়ের টাস্ক হাইলাইট করুন'; - @override - String get settingsPageEnable24hrFormatTitle => - '24 ঘণ্টার ফর্ম্যাট সক্রিয় করুন'; - @override - String get settingsPageEnable24hrFormatDescription => - '24 ঘণ্টার ফর্ম্যাট সক্রিয় করুন'; - @override - String get settingsPageSelectLanguage => 'ভাষা নির্বাচন করুন'; - @override - String get settingsPageToggleNativeLanguage => - 'আপনার মাতৃভাষার মধ্যে টগল করুন'; - @override - String get settingsPageSelectDirectoryTitle => 'ডিরেক্টরি নির্বাচন করুন'; - @override - String get settingsPageSelectDirectoryDescription => - 'টাস্কওয়ারিয়র ডেটা যেখানে সংরক্ষিত হয় সেই ডিরেক্টরি নির্বাচন করুন\nবর্তমান ডিরেক্টরি: '; - @override - String get settingsPageChangeDirectory => 'ডিরেক্টরি পরিবর্তন করুন'; - @override - String get settingsPageSetToDefault => 'ডিফল্টে সেট করুন'; - @override - String get navDrawerProfile => 'প্রোফাইল'; - @override - String get navDrawerReports => 'রিপোর্টস'; - @override - String get navDrawerAbout => 'সম্পর্কে'; - @override - String get navDrawerSettings => 'সেটিংস'; - @override - String get navDrawerExit => 'বাহির যান'; - - @override - String get detailPageDescription => 'বর্ণনা'; - @override - String get detailPageStatus => 'অবস্থা'; - @override - String get detailPageEntry => 'এন্ট্রি'; - @override - String get detailPageModified => 'পরিবর্তিত'; - @override - String get detailPageStart => 'শুরু'; - @override - String get detailPageEnd => 'শেষ'; - @override - String get detailPageDue => 'জরুরি'; - @override - String get detailPageWait => 'অপেক্ষা করুন'; - @override - String get detailPageUntil => 'পর্যন্ত'; - @override - String get detailPagePriority => 'প্রাধান্য'; - @override - String get detailPageProject => 'প্রকল্প'; - @override - String get detailPageTags => 'ট্যাগ'; - @override - String get detailPageUrgency => 'জরুরি'; - @override - String get detailPageID => 'আইডি'; - - @override - String get filterDrawerApplyFilters => 'ফিল্টার প্রয়োগ করুন'; - @override - String get filterDrawerHideWaiting => 'অপেক্ষা লুকান'; - @override - String get filterDrawerShowWaiting => 'অপেক্ষা প্রদর্শন করুন'; - @override - String get filterDrawerPending => 'মুলতুবি'; - @override - String get filterDrawerCompleted => 'সম্পন্ন'; - @override - String get filterDrawerFilterTagBy => 'ট্যাগ দ্বারা ফিল্টার করুন'; - @override - String get filterDrawerAND => 'এবং'; - @override - String get filterDrawerOR => 'অথবা'; - @override - String get filterDrawerSortBy => 'এর দ্বারা সাজান'; - @override - String get filterDrawerCreated => 'সৃষ্ট'; - @override - String get filterDrawerModified => 'পরিবর্তিত'; - @override - String get filterDrawerStartTime => 'শুরুর সময়'; - @override - String get filterDrawerDueTill => 'জরুরি পর্যন্ত'; - @override - String get filterDrawerPriority => 'প্রাধান্য'; - @override - String get filterDrawerProject => 'প্রকল্প'; - @override - String get filterDrawerTags => 'ট্যাগস'; - @override - String get filterDrawerUrgency => 'জরুরি'; - @override - String get filterDrawerResetSort => 'সাজানো রিসেট করুন'; - @override - String get filterDrawerStatus => 'অবস্থা'; - @override - String get reportsPageTitle => 'রিপোর্টস'; - @override - String get reportsPageCompleted => 'সম্পন্ন'; - @override - String get reportsPagePending => 'মুলতুবি'; - @override - String get reportsPageTasks => 'টাস্ক'; - - @override - String get reportsPageDaily => 'দৈনিক'; - @override - String get reportsPageDailyBurnDownChart => 'দৈনিক বার্নডাউন চার্ট'; - @override - String get reportsPageDailyDayMonth => 'দিন - মাস'; - - @override - String get reportsPageWeekly => 'সাপ্তাহিক'; - @override - String get reportsPageWeeklyBurnDownChart => 'সাপ্তাহিক বার্নডাউন চার্ট'; - @override - String get reportsPageWeeklyWeeksYear => 'সপ্তাহ - বছর'; - - @override - String get reportsPageMonthly => 'মাসিক'; - @override - String get reportsPageMonthlyBurnDownChart => 'মাসিক বার্নডাউন চার্ট'; - @override - String get reportsPageMonthlyMonthYear => 'মাস - বছর'; - - @override - String get reportsPageNoTasksFound => 'কোনও টাস্ক পাওয়া যায়নি'; - @override - String get reportsPageAddTasksToSeeReports => 'রিপোর্ট দেখতে টাস্ক যোগ করুন'; - - @override - String get taskchampionTileDescription => - 'Taskwarrior সিঙ্কিং CCSync বা Taskchampion সিঙ্ক সার্ভারে পরিবর্তন করুন'; - - @override - String get taskchampionTileTitle => 'Taskchampion সিঙ্ক'; - - @override - String get ccsyncCredentials => 'CCSync ক্রেডেনশিয়াল'; - - @override - String get deleteTaskConfirmation => 'টাস্ক মুছুন'; - - @override - String get deleteTaskTitle => 'সব টাস্ক মুছুন?'; - - @override - String get deleteTaskWarning => - 'এই পদক্ষেপটি অপরিবর্তনীয় এবং সমস্ত স্থানীয়ভাবে সংরক্ষিত টাস্ক মুছে ফেলবে।'; - - @override - String get profilePageProfile => 'প্রোফাইল'; - @override - String get profilePageProfiles => 'প্রোফাইলস'; - @override - String get profilePageCurrentProfile => 'বর্তমান প্রোফাইল'; - @override - String get profilePageManageSelectedProfile => - 'নির্বাচিত প্রোফাইল পরিচালনা করুন'; - @override - String get profilePageRenameAlias => 'অ্যালিয়াস পরিবর্তন করুন'; - - @override - String get profilePageConfigureTaskserver => 'টাস্ক সার্ভার কনফিগার করুন'; - @override - String get profilePageExportTasks => 'টাস্ক রপ্তানী করুন'; - @override - String get profilePageCopyConfigToNewProfile => - 'নতুন প্রোফাইলে কনফিগারেশন কপি করুন'; - @override - String get profilePageDeleteProfile => 'প্রোফাইল মুছুন'; - @override - String get profilePageAddNewProfile => 'নতুন প্রোফাইল যোগ করুন'; - - @override - String get profilePageRenameAliasDialogueBoxTitle => - 'অ্যালিয়াস পরিবর্তন করুন'; - @override - String get profilePageRenameAliasDialogueBoxNewAlias => 'নতুন অ্যালিয়াস'; - @override - String get profilePageRenameAliasDialogueBoxCancel => 'বাতিল করুন'; - @override - String get profilePageRenameAliasDialogueBoxSubmit => 'জমা দিন'; - - @override - String get profilePageExportTasksDialogueTitle => 'রপ্তানি ফরম্যাট'; - @override - String get profilePageExportTasksDialogueSubtitle => - 'রপ্তানি ফরম্যাট নির্বাচন করুন'; - - @override - String get manageTaskServerPageConfigureTaskserver => - 'টাস্ক সার্ভার কনফিগার করুন'; - @override - String get manageTaskServerPageConfigureTASKRC => 'TASKRC কনফিগার করুন'; - @override - String get manageTaskServerPageSetTaskRC => 'TaskRC সেট করুন'; - @override - String get manageTaskServerPageConfigureYourCertificate => - 'আপনার সার্টিফিকেট কনফিগার করুন'; - @override - String get manageTaskServerPageSelectCertificate => - 'সার্টিফিকেট নির্বাচন করুন'; - @override - String get manageTaskServerPageConfigureTaskserverKey => - 'টাস্ক সার্ভার কনফিগার করুন কী'; - @override - String get manageTaskServerPageSelectKey => 'কী নির্বাচন করুন'; - @override - String get manageTaskServerPageConfigureServerCertificate => - 'সার্ভার সার্টিফিকেট কনফিগার করুন'; - @override - String get manageTaskServerPageTaskRCFileIsVerified => - 'Task RC ফাইল যাচাই করা হয়েছে'; - - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxTitle => - 'TaskRC কনফিগার করুন'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle => - 'TaskRC সামগ্রী পেস্ট করুন বা taskrc ফাইল নির্বাচন করুন'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText => - 'এখানে আপনার TaskRC সামগ্রী পেস্ট করুন'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxOr => 'অথবা'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC => - 'TaskRC ফাইল নির্বাচন করুন'; - - @override - String get addTaskTitle => "কার্য যোগ করুন"; - @override - String get addTaskEnterTask => "কার্য লিখুন"; - @override - String get addTaskDue => "শেষ সময়"; - @override - String get addTaskSelectDueDate => "শেষ সময় নির্বাচন করুন"; - @override - String get addTaskPriority => "অগ্রাধিকার"; - @override - String get addTaskAddTags => "ট্যাগ যোগ করুন"; - @override - String get addTaskCancel => "বাতিল করুন"; - @override - String get addTaskAdd => "যোগ করুন"; - @override - String get addTaskTimeInPast => "নির্বাচিত সময় অতীতে রয়েছে।"; - @override - String get addTaskFieldCannotBeEmpty => - "আপনি এই ক্ষেত্রটি খালি ছেড়ে দিতে পারবেন না!"; - @override - String get addTaskTaskAddedSuccessfully => - "কর্ম সফলভাবে যোগ করা হয়েছে। সম্পাদনার জন্য ট্যাপ করুন"; - - @override - String get aboutPageGitHubLink => - "এই প্রকল্পটিকে উন্নত করতে আগ্রহী? আমাদের GitHub রিপোজিটরিতে যান।"; - @override - String get aboutPageProjectDescription => - "এই প্রকল্পের লক্ষ্য Taskwarrior-এর জন্য একটি অ্যাপ তৈরি করা। এটি আপনার সকল প্ল্যাটফর্মে একটি টাস্ক ম্যানেজমেন্ট অ্যাপ। এটি আপনাকে আপনার কাজগুলি পরিচালনা করতে এবং আপনার প্রয়োজন অনুসারে সেগুলি ফিল্টার করতে সাহায্য করে।"; - @override - String get aboutPageAppBarTitle => "সম্পর্কিত"; - - @override - String get homePageSearchTooltip => 'অনুসন্ধান করুন'; - @override - String get homePageCancelSearchTooltip => 'বাতিল করুন'; - @override - String get homePageAddTaskTooltip => 'টাস্ক যোগ করুন'; - @override - String get homePageTapBackToExit => 'প্রস্থান করতে আবার ব্যাক চাপুন'; - @override - String get homePageSearchHint => 'অনুসন্ধান করুন'; - - @override - String get navDrawerConfirm => 'নিশ্চিত করুন'; - - @override - String get filterDrawerNoProjectsAvailable => 'কোনো প্রকল্প উপলব্ধ নেই।'; - - @override - String get version => "সংস্করণ"; - @override - String get package => "প্যাকেজ"; - - @override - String get notSelected => "নির্বাচিত নয়"; - @override - String get cantSetTimeinPast => "অতীতে সময় নির্ধারণ করা সম্ভব নয়"; - - @override - String get editDescription => "বিবরণ সম্পাদনা করুন"; - @override - String get editProject => "প্রকল্প সম্পাদনা করুন"; - @override - String get cancel => "বাতিল করুন"; - @override - String get submit => "জমা দিন"; - - @override - String get saveChangesConfirmation => - 'আপনি কি পরিবর্তনগুলি সংরক্ষণ করতে চান?'; - @override - String get yes => 'হ্যাঁ'; - @override - String get no => 'না'; - @override - String get reviewChanges => 'পরিবর্তন পর্যালোচনা করুন'; - @override - String get oldChanges => 'পুরানো'; - @override - String get newChanges => 'নতুন'; - - @override - String get tags => 'ট্যাগ'; - @override - String get addedTagsWillAppearHere => 'যোগ করা ট্যাগ এখানে প্রদর্শিত হবে'; - @override - String get addTag => 'ট্যাগ যোগ করুন'; - - @override - String get enterProject => 'প্রকল্প প্রবেশ করান'; - @override - String get allProjects => 'সমস্ত প্রকল্প'; - @override - String get noProjectsFound => 'কোনো প্রকল্প পাওয়া যায়নি'; - @override - String get project => 'প্রকল্প'; - - @override - String get select => 'নির্বাচন করুন'; - @override - String get save => 'সংরক্ষণ করুন'; - @override - String get dontSave => 'সংরক্ষণ করবেন না'; - @override - String get unsavedChanges => 'সংরক্ষিত নয় এমন পরিবর্তন'; - @override - String get unsavedChangesWarning => - 'আপনার পরিবর্তনগুলি সংরক্ষিত হয়নি। আপনি কি করতে চান?'; - @override - String get enterNew => 'নতুন লিখুন'; - @override - String get edit => 'সম্পাদনা করুন'; - @override - String get task => 'টাস্ক'; - -// task action strings - @override - String get confirmDeleteTask => 'মুছে ফেলার নিশ্চয়তা দিন'; - @override - String get taskUpdated => 'টাস্ক আপডেট হয়েছে'; - @override - String get undo => 'পূর্বাবস্থায় ফেরান'; - @override - String get taskMarkedAsCompleted => - 'টাস্ক সম্পন্ন হয়েছে। পরিবর্তন দেখতে রিফ্রেশ করুন!'; - @override - String get taskMarkedAsDeleted => - 'টাস্ক মুছে ফেলা হয়েছে। পরিবর্তন দেখতে রিফ্রেশ করুন!'; - @override - String get refreshToViewChanges => 'পরিবর্তন দেখতে রিফ্রেশ করুন'; - @override - String get clickOnBottomRightButtonToStartAddingTasks => - 'টাস্ক যোগ করতে নিচের ডানদিকের বোতামে ক্লিক করুন'; - @override - String get complete => 'সম্পন্ন'; - @override - String get delete => 'মুছে ফেলুন'; - -// task server management strings - @override - String get taskServerInfo => 'TaskD সার্ভারের তথ্য'; - @override - String get taskServerCredentials => 'TaskD সার্ভারের শংসাপত্র'; - @override - String get notConfigured => 'কনফিগার করা হয়নি'; - @override - String get fetchingStatistics => 'পরিসংখ্যান আনা হচ্ছে...'; - @override - String get pleaseWait => 'অনুগ্রহ করে অপেক্ষা করুন...'; - @override - String get statistics => 'পরিসংখ্যান:'; - @override - String get ok => 'ঠিক আছে'; - @override - String get pleaseSetupTaskServer => - 'অনুগ্রহ করে আপনার TaskD সার্ভার সেটআপ করুন।'; - -// onboarding strings - @override - String get onboardingSkip => 'এড়িয়ে যান'; - @override - String get onboardingNext => 'পরবর্তী'; - @override - String get onboardingStart => 'শুরু করুন'; - -// permission strings - @override - String get permissionPageTitle => 'আমাদের আপনার অনুমতি কেন দরকার'; - @override - String get storagePermissionTitle => 'সংগ্রহস্থল অনুমতি'; - @override - String get storagePermissionDescription => - 'আপনার ডিভাইসে টাস্ক, পছন্দ এবং অ্যাপের ডেটা নিরাপদে সংরক্ষণ করতে আমরা ' - 'সংগ্রহস্থল অ্যাক্সেস ব্যবহার করি। এটি নিশ্চিত করে যে আপনি অফলাইনে থাকলেও ' - 'আপনার কাজ অব্যাহত রাখতে পারবেন।'; - @override - String get notificationPermissionTitle => 'বিজ্ঞপ্তি অনুমতি'; - @override - String get notificationPermissionDescription => - 'বিজ্ঞপ্তি আপনাকে গুরুত্বপূর্ণ অনুস্মারক এবং আপডেটগুলির বিষয়ে অবহিত রাখে, ' - 'যাতে আপনি সহজেই আপনার কাজ পরিচালনা করতে পারেন।'; - @override - String get privacyStatement => - 'আপনার গোপনীয়তা আমাদের অগ্রাধিকার। আমরা আপনার ফাইল বা ব্যক্তিগত ডেটা ' - 'আপনার অনুমতি ছাড়া কখনও অ্যাক্সেস বা ভাগ করি না।'; - @override - String get grantPermissions => 'অনুমতি দিন'; - @override - String get managePermissionsLater => - 'আপনি পরে সেটিংস থেকে অনুমতিগুলি পরিচালনা করতে পারেন'; - -// Profile page strings - @override - String get profileAllProfiles => 'সমস্ত প্রোফাইল:'; - @override - String get profileSwitchedToProfile => 'প্রোফাইল পরিবর্তন করা হয়েছে'; - @override - String get profileAddedSuccessfully => 'প্রোফাইল সফলভাবে যোগ করা হয়েছে'; - @override - String get profileAdditionFailed => 'প্রোফাইল যোগ করা ব্যর্থ হয়েছে'; - @override - String get profileConfigCopied => 'প্রোফাইল কনফিগারেশন কপি করা হয়েছে'; - @override - String get profileConfigCopyFailed => 'প্রোফাইল কনফিগারেশন কপি ব্যর্থ হয়েছে'; - @override - String get profileDeletedSuccessfully => 'প্রোফাইল সফলভাবে মুছে ফেলা হয়েছে'; - @override - String get profileDeletionFailed => 'প্রোফাইল মুছে ফেলা ব্যর্থ হয়েছে'; - @override - String get profileDeleteConfirmation => 'আপনি কি প্রোফাইল মুছে ফেলতে চান?'; - -// Reports strings - @override - String get reportsDate => 'তারিখ'; - @override - String get reportsPending => 'অপেক্ষমান'; - @override - String get reportsCompleted => 'সম্পন্ন'; - @override - String get reportsMonthYear => 'মাস-বছর'; - @override - String get reportsWeek => 'সপ্তাহ'; - @override - String get reportsDay => 'দিন'; - @override - String get reportsYear => 'বছর'; - @override - String get reportsError => 'ত্রুটি'; - @override - String get reportsLoading => 'লোড হচ্ছে...'; - -// Settings strings - @override - String get settingsResetToDefault => 'ডিফল্টে রিসেট করুন'; - @override - String get settingsAlreadyDefault => 'ইতিমধ্যে ডিফল্ট অবস্থানে রয়েছে'; - @override - String get settingsConfirmReset => - 'আপনি কি নিশ্চিত যে আপনি সেটিংস ডিফল্টে রিসেট করতে চান?'; - @override - String get settingsNoButton => 'না'; - @override - String get settingsYesButton => 'হ্যাঁ'; - -// Splash screen strings - @override - String get splashSettingUpApp => "অ্যাপ সেটআপ করা হচ্ছে..."; - -// Tour strings - @override - String get tourHomeAddTask => "নতুন টাস্ক যোগ করুন"; - @override - String get tourHomeSearch => "টাস্ক অনুসন্ধান করুন"; - @override - String get tourHomeRefresh => "আপনার টাস্ক রিফ্রেশ বা সিঙ্ক করুন"; - @override - String get tourHomeFilter => "টাস্ক ও প্রকল্প ফিল্টার করুন"; - @override - String get tourHomeMenu => "অতিরিক্ত সেটিংস অ্যাক্সেস করুন"; - - @override - String get tourDetailsDue => "টাস্কের নির্ধারিত সময় দেখুন"; - - @override - String get tourDetailsPriority => "টাস্কের অগ্রাধিকার নির্ধারণ করুন"; - - @override - String get tourDetailsUntil => "টাস্কের শেষ তারিখ দেখুন"; - - @override - String get tourDetailsWait => "টাস্কের অপেক্ষার সময় দেখুন"; - - @override - String get tourFilterProjects => "আপনার প্রকল্প ফিল্টার করুন"; - - @override - String get tourFilterSort => "টাস্ক সাজানোর বিকল্প দেখুন"; - - @override - String get tourFilterStatus => "টাস্কের বর্তমান অবস্থা দেখুন"; - - @override - String get tourFilterTagUnion => "ট্যাগ ফিল্টার করার নিয়ম সেট করুন"; - - @override - String get tourProfileAddNew => "একটি নতুন প্রোফাইল যোগ করুন"; - - @override - String get tourProfileCurrent => "বর্তমান প্রোফাইল দেখুন"; - - @override - String get tourProfileManage => "আপনার প্রোফাইল পরিচালনা করুন"; - - @override - String get tourReportsDaily => "দৈনিক প্রতিবেদন দেখুন"; - - @override - String get tourReportsMonthly => "মাসিক প্রতিবেদন দেখুন"; - - @override - String get tourReportsWeekly => "সাপ্তাহিক প্রতিবেদন দেখুন"; - - @override - String get tourTaskServerCertificate => - "আপনার TaskD সার্ভারের সার্টিফিকেট যোগ করুন"; - - @override - String get tourTaskServerKey => "আপনার TaskD সার্ভারের কী সেট করুন"; - - @override - String get tourTaskServerRootCert => "Root সার্টিফিকেট কনফিগার করুন"; - - @override - String get tourTaskServerTaskRC => "আপনার TaskRC ফাইল সেট করুন"; - @override - String get descriprtionCannotBeEmpty => "বর্ণনা খালি হতে পারে না"; - @override - String get enterTaskDescription => "টাস্কের বর্ণনা লিখুন"; - @override - String get canNotHaveWhiteSpace => "সাদা স্থান থাকতে পারে না"; - @override - String get high => "উচ্চ"; - @override - String get medium => "মধ্যম"; - @override - String get low => "নিম্ন"; - @override - String get priority => "অগ্রাধিকার"; - @override - String get tagAlreadyExists => "ট্যাগ ইতিমধ্যে বিদ্যমান"; - @override - String get tagShouldNotContainSpaces => "ট্যাগে স্পেস থাকা উচিত নয়"; - @override - String get date => "তারিখ"; - @override - String get add => "যোগ করুন"; - @override - String get change => "পরিবর্তন করুন"; - @override - String get dateCanNotBeInPast => "তারিখ অতীতে থাকতে পারে না"; - @override - String get configureTaskchampion => 'Taskchampion সিঙ্ক কনফিগার করুন'; - @override - String get encryptionSecret => 'এনক্রিপশন সিক্রেট'; - @override - String get ccsyncBackendUrl => 'CCSync ব্যাকএন্ড URL'; - @override - String get ccsyncClientId => 'ক্লায়েন্ট আইডি'; - @override - String get success => 'সফল হয়েছে'; - @override - String get credentialsSavedSuccessfully => 'শংসাপত্র সফলভাবে সংরক্ষিত হয়েছে'; - @override - String get tip => - "টিপ: আপনার শংসাপত্র পেতে উপরের ডানদিকে তথ্য আইকনে ক্লিক করুন"; - @override - String get logs => 'লগস'; - @override - String get checkAllDebugLogsHere => 'এখানে সমস্ত ডিবাগ লগ পরীক্ষা করুন'; -} diff --git a/lib/app/utils/language/english_sentences.dart b/lib/app/utils/language/english_sentences.dart deleted file mode 100644 index 6179b44c..00000000 --- a/lib/app/utils/language/english_sentences.dart +++ /dev/null @@ -1,643 +0,0 @@ -import 'package:taskwarrior/app/utils/language/sentences.dart'; - -class EnglishSentences extends Sentences { - @override - String get helloWorld => 'Hello, World!'; - - @override - String get homePageTitle => 'Home Page'; - @override - String get homePageLastModified => 'Last Modified'; - @override - String get homePageDue => 'Due'; - @override - String get homePageTaskWarriorNotConfigured => 'TaskServer is not configured'; - @override - String get homePageSetup => 'Setup'; - @override - String get homePageFilter => 'Filter'; - @override - String get homePageMenu => 'Menu'; - @override - String get homePageExitApp => 'Exit App'; - @override - String get homePageAreYouSureYouWantToExit => - 'Are you sure you want to exit?'; - @override - String get homePageExit => 'Exit'; - @override - String get homePageCancel => 'Cancel'; - @override - String get homePageClickOnTheBottomRightButtonToStartAddingTasks => - 'Click on the bottom right button to start adding tasks'; - @override - String get homePageSearchNotFound => 'Search Not Found'; - @override - String get homePageFetchingTasks => 'Fetching Tasks'; - @override - String get homePageSearchTooltip => 'Search'; - @override - String get homePageCancelSearchTooltip => 'Cancel'; - @override - String get homePageAddTaskTooltip => 'Add Task'; - @override - String get homePageTapBackToExit => 'Tap back again to exit'; - @override - String get homePageSearchHint => 'Search'; - - @override - String get settingsPageTitle => 'Settings Page'; - @override - String get settingsPageSubtitle => 'Configure your preferences'; - @override - String get settingsPageMovingDataToNewDirectory => - 'Moving data to new directory'; - @override - String get settingsPageSyncOnStartTitle => 'Sync on Start'; - @override - String get settingsPageSyncOnStartDescription => - 'Automatically sync data on app start'; - @override - String get settingsPageEnableSyncOnTaskCreateTitle => 'Sync on task create'; - @override - String get settingsPageEnableSyncOnTaskCreateDescription => - 'Enable automatic syncing when creating a new task'; - @override - String get settingsPageHighlightTaskTitle => 'Highlight urgent tasks'; - @override - String get settingsPageHighlightTaskDescription => - 'Highlight tasks due within 1 day or already overdue'; - @override - String get settingsPageEnable24hrFormatTitle => 'Enable 24 hr format'; - @override - String get settingsPageEnable24hrFormatDescription => - 'Switch right to enable 24 hr format'; - @override - String get settingsPageSelectLanguage => 'Select the language'; - @override - String get settingsPageToggleNativeLanguage => - 'Toggle between your native language'; - @override - String get settingsPageSelectDirectoryTitle => 'Select the directory'; - @override - String get settingsPageSelectDirectoryDescription => - 'Select the directory where the Taskwarrior data is stored\nCurrent directory: '; - @override - String get settingsPageChangeDirectory => 'Change Directory'; - @override - String get settingsPageSetToDefault => 'Set To Default'; - - @override - String get navDrawerProfile => 'Profile'; - @override - String get navDrawerReports => 'Reports'; - @override - String get navDrawerAbout => 'About'; - @override - String get navDrawerSettings => 'Settings'; - @override - String get navDrawerExit => 'Exit'; - @override - String get navDrawerConfirm => 'Confirm'; - - @override - String get detailPageDescription => 'Description'; - @override - String get detailPageStatus => 'Status'; - @override - String get detailPageEntry => 'Entry'; - @override - String get detailPageModified => 'Modified'; - @override - String get detailPageStart => 'Start'; - @override - String get detailPageEnd => 'End'; - @override - String get detailPageDue => 'Due'; - @override - String get detailPageWait => 'Wait'; - @override - String get detailPageUntil => 'Until'; - @override - String get detailPagePriority => 'Priority'; - @override - String get detailPageProject => 'Project'; - @override - String get detailPageTags => 'Tags'; - @override - String get detailPageUrgency => 'Urgency'; - @override - String get detailPageID => 'ID'; - - @override - String get filterDrawerApplyFilters => 'Apply Filters'; - @override - String get filterDrawerHideWaiting => 'Hide Waiting'; - @override - String get filterDrawerShowWaiting => 'Show Waiting'; - @override - String get filterDrawerPending => 'Pending'; - @override - String get filterDrawerCompleted => 'Completed'; - @override - String get filterDrawerFilterTagBy => 'Filter Tag By'; - @override - String get filterDrawerAND => 'AND'; - @override - String get filterDrawerOR => 'OR'; - @override - String get filterDrawerSortBy => 'Sort By'; - @override - String get filterDrawerCreated => 'Created'; - @override - String get filterDrawerModified => 'Modified'; - @override - String get filterDrawerStartTime => 'Start Time'; - @override - String get filterDrawerDueTill => 'Due till'; - @override - String get filterDrawerPriority => 'Priority'; - @override - String get filterDrawerProject => 'Project'; - @override - String get filterDrawerTags => 'Tags'; - @override - String get filterDrawerUrgency => 'Urgency'; - @override - String get filterDrawerResetSort => 'Reset Sort'; - @override - String get filterDrawerStatus => 'Status'; - @override - String get filterDrawerNoProjectsAvailable => 'No projects available.'; - @override - String get reportsPageTitle => 'Reports'; - @override - String get reportsPageCompleted => 'Completed'; - @override - String get reportsPagePending => 'Pending'; - @override - String get reportsPageTasks => 'Tasks'; - - @override - String get reportsPageDaily => 'Daily'; - @override - String get reportsPageDailyBurnDownChart => 'Daily Burn Down Chart'; - @override - String get reportsPageDailyDayMonth => 'Day - Month'; - - @override - String get reportsPageWeekly => 'Weekly'; - @override - String get reportsPageWeeklyBurnDownChart => 'Weekly Burn Down Chart'; - @override - String get reportsPageWeeklyWeeksYear => 'Weeks - Year'; - - @override - String get reportsPageMonthly => 'Monthly'; - @override - String get reportsPageMonthlyBurnDownChart => 'Monthly Burn Down Chart'; - @override - String get reportsPageMonthlyMonthYear => 'Month - Year'; - - @override - String get reportsPageNoTasksFound => 'No Tasks Found'; - @override - String get reportsPageAddTasksToSeeReports => 'Add Tasks To See Reports'; - - @override - String get taskchampionTileDescription => - 'Switch to Taskwarrior sync with CCSync or Taskchampion Sync Server'; - @override - String get taskchampionTileTitle => 'Taskchampion sync'; - - @override - String get ccsyncCredentials => 'CCync credentials'; - - @override - String get deleteTaskConfirmation => 'Delete Tasks'; - - @override - String get deleteTaskTitle => 'Delete All Tasks?'; - - @override - String get deleteTaskWarning => - 'The action is irreversible and will delete all the tasks that are stored locally.'; - - @override - String get profilePageProfile => 'Profile'; - @override - String get profilePageProfiles => 'Profiles'; - @override - String get profilePageCurrentProfile => 'Current Profile'; - @override - String get profilePageManageSelectedProfile => 'Manage Selected Profile'; - @override - String get profilePageRenameAlias => 'Rename Alias'; - - @override - String get profilePageConfigureTaskserver => 'Configure Taskserver'; - @override - String get profilePageExportTasks => 'Export Tasks'; - @override - String get profilePageCopyConfigToNewProfile => 'Copy Config To New Profile'; - @override - String get profilePageDeleteProfile => 'Delete Profile'; - @override - String get profilePageAddNewProfile => 'Add New Profile'; - - @override - String get profilePageRenameAliasDialogueBoxTitle => 'Rename Alias'; - @override - String get profilePageRenameAliasDialogueBoxNewAlias => 'New Alias'; - @override - String get profilePageRenameAliasDialogueBoxCancel => 'Cancel'; - @override - String get profilePageRenameAliasDialogueBoxSubmit => 'Submit'; - - @override - String get profilePageExportTasksDialogueTitle => 'Export format'; - @override - String get profilePageExportTasksDialogueSubtitle => - 'Choose the export format'; - - @override - String get manageTaskServerPageConfigureTaskserver => 'Configure Task Server'; - @override - String get manageTaskServerPageConfigureTASKRC => 'Configure TASKRC'; - @override - String get manageTaskServerPageSetTaskRC => 'Set TaskRC'; - @override - String get manageTaskServerPageConfigureYourCertificate => - 'Configure Your Certificate'; - @override - String get manageTaskServerPageSelectCertificate => 'Select Certificate'; - @override - String get manageTaskServerPageConfigureTaskserverKey => - 'Configure Task Server Key'; - @override - String get manageTaskServerPageSelectKey => 'Select Key'; - @override - String get manageTaskServerPageConfigureServerCertificate => - 'Configure Server Certificate'; - - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxTitle => - 'Configure TaskRC'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle => - 'Paste the TaskRC content or select taskrc file'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText => - 'Paste your TaskRC content here'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxOr => 'Or'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC => - 'Select TaskRC file'; - @override - String get manageTaskServerPageTaskRCFileIsVerified => - 'Task RC File Is Verified'; - - @override - String get addTaskTitle => "Add Task"; - @override - String get addTaskEnterTask => "Enter Task"; - @override - String get addTaskDue => "Due"; - @override - String get addTaskSelectDueDate => "Select Due Date"; - @override - String get addTaskPriority => "Priority"; - @override - String get addTaskAddTags => "Add Tags"; - @override - String get addTaskCancel => "Cancel"; - @override - String get addTaskAdd => "Add"; - @override - String get addTaskTimeInPast => "The selected time is in the past."; - @override - String get addTaskFieldCannotBeEmpty => "You cannot leave this field empty!"; - @override - String get addTaskTaskAddedSuccessfully => - "Task Added Successfully. Tap to Edit"; - - @override - String get aboutPageGitHubLink => - "Eager to enhance this project? Visit our GitHub repository."; - @override - String get aboutPageProjectDescription => - "This project aims to build an app for Taskwarrior. It is your task management app across all platforms. It helps you manage your tasks and filter them as per your needs."; - @override - String get aboutPageAppBarTitle => "About"; - - @override - String get version => "Version"; - @override - String get package => "Package"; - - @override - String get notSelected => "Not Selected"; - @override - String get cantSetTimeinPast => "Can't set times in the past"; - - @override - String get editDescription => "Edit Description"; - @override - String get editProject => "Edit Project"; - @override - String get cancel => "Cancel"; - @override - String get submit => "Submit"; - - @override - String get saveChangesConfirmation => 'Do you want to save changes?'; - @override - String get yes => 'Yes'; - @override - String get no => 'No'; - @override - String get reviewChanges => 'Review Changes'; - @override - String get oldChanges => 'Old'; - @override - String get newChanges => 'New'; - - @override - String get tags => 'Tags'; - @override - String get addedTagsWillAppearHere => 'Added tags will appear here'; - @override - String get addTag => 'Add Tag'; - - @override - String get enterProject => 'Enter Project'; - @override - String get allProjects => 'All Projects'; - @override - String get noProjectsFound => 'No Projects Found'; - @override - String get project => 'Project'; - - @override - String get select => 'Select'; - @override - String get save => 'Save'; - @override - String get dontSave => 'Don\'t Save'; - @override - String get unsavedChanges => 'Unsaved Changes'; - @override - String get unsavedChangesWarning => - 'You have unsaved changes. What would you like to do?'; - @override - String get enterNew => 'Enter New'; - @override - String get edit => 'Edit'; - @override - String get task => 'Task'; - - // task action strings - @override - String get confirmDeleteTask => 'Confirm Delete'; - @override - String get taskUpdated => 'Task Updated'; - @override - String get undo => 'Undo'; - @override - String get taskMarkedAsCompleted => - 'Task Marked As Completed. Refresh to view changes!'; - @override - String get taskMarkedAsDeleted => - 'Task Marked As Deleted. Refresh to view changes!'; - @override - String get refreshToViewChanges => 'Refresh to view changes'; - @override - String get clickOnBottomRightButtonToStartAddingTasks => - 'Click on the bottom right button to start adding tasks'; - @override - String get complete => 'COMPLETE'; - @override - String get delete => 'DELETE'; - - // task server management strings - @override - String get taskServerInfo => 'TaskD Server Info'; - @override - String get taskServerCredentials => 'TaskD Server Credentials'; - @override - String get notConfigured => 'Not Configured'; - @override - String get fetchingStatistics => 'Fetching statistics...'; - @override - String get pleaseWait => 'Please wait...'; - @override - String get statistics => 'Statistics:'; - @override - String get ok => 'Ok'; - @override - String get pleaseSetupTaskServer => 'Please set up your TaskServer.'; - - // onboarding strings - @override - String get onboardingSkip => 'Skip'; - @override - String get onboardingNext => 'Next'; - @override - String get onboardingStart => 'Start'; - - // permission strings - @override - String get permissionPageTitle => 'Why We Need Your Permission'; - @override - String get storagePermissionTitle => 'Storage Permission'; - @override - String get storagePermissionDescription => - 'We use storage access to save your tasks, preferences, ' - 'and app data securely on your device. This ensures that you can ' - 'pick up where you left off seamlessly, even offline.'; - @override - String get notificationPermissionTitle => 'Notification Permission'; - @override - String get notificationPermissionDescription => - 'Notifications keep you updated with important reminders ' - 'and updates, ensuring you stay on top of your tasks effortlessly.'; - @override - String get privacyStatement => - 'Your privacy is our top priority. We never access or share your ' - 'personal files or data without your consent.'; - @override - String get grantPermissions => 'Grant Permissions'; - @override - String get managePermissionsLater => - 'You can manage your permissions anytime later in Settings'; - - // Profile page strings - @override - String get profileAllProfiles => 'All Profiles:'; - @override - String get profileSwitchedToProfile => 'Switched to Profile'; - @override - String get profileAddedSuccessfully => 'Profile Added Successfully'; - @override - String get profileAdditionFailed => 'Profile Addition Failed'; - @override - String get profileConfigCopied => 'Profile Config Copied'; - @override - String get profileConfigCopyFailed => 'Profile Config Copy Failed'; - @override - String get profileDeletedSuccessfully => 'Deleted Successfully'; - @override - String get profileDeletionFailed => 'Deletion Failed'; - @override - String get profileDeleteConfirmation => 'Confirm'; - - // Reports strings - @override - String get reportsDate => 'Date'; - @override - String get reportsPending => 'Pending'; - @override - String get reportsCompleted => 'Completed'; - @override - String get reportsMonthYear => 'Month-Year'; - @override - String get reportsWeek => 'Week'; - @override - String get reportsDay => 'Day'; - @override - String get reportsYear => 'Year'; - @override - String get reportsError => 'Error'; - @override - String get reportsLoading => 'Loading...'; - - // Settings strings - @override - String get settingsResetToDefault => 'Reset to default'; - @override - String get settingsAlreadyDefault => 'Already default'; - @override - String get settingsConfirmReset => - 'Are you sure you want to reset the directory to the default?'; - @override - String get settingsNoButton => 'No'; - @override - String get settingsYesButton => 'Yes'; - - // Splash screen strings - @override - String get splashSettingUpApp => "Setting up the app..."; - - // Tour strings - reports - @override - String get tourReportsDaily => "Access your daily task report here"; - @override - String get tourReportsWeekly => "Access your weekly task reports here"; - @override - String get tourReportsMonthly => "Access your monthly task reports here"; - - // Tour strings - profile - @override - String get tourProfileCurrent => "See your current profile here"; - @override - String get tourProfileManage => "Manage your current profile here"; - @override - String get tourProfileAddNew => "Add a new profile here"; - - // Tour strings - task server - @override - String get tourTaskServerTaskRC => - "Select the file named taskrc here or paste it's content"; - @override - String get tourTaskServerCertificate => - "Select file similarly named like .com.cert.pem here"; - @override - String get tourTaskServerKey => - "Select file similarly named like .key.pem here"; - @override - String get tourTaskServerRootCert => - "Select file similarly named like letsencrypt_root_cert.pem here"; - - // Tour strings - home page - @override - String get tourHomeAddTask => "Add a new task"; - @override - String get tourHomeSearch => "Search for tasks"; - @override - String get tourHomeRefresh => "Refresh or sync your tasks"; - @override - String get tourHomeFilter => "Add filters to sort your tasks and projects"; - @override - String get tourHomeMenu => "Access additional settings here"; - - // Tour strings - filter drawer - @override - String get tourFilterStatus => - "Filter tasks based on their completion status"; - @override - String get tourFilterProjects => "Filter tasks based on the projects"; - @override - String get tourFilterTagUnion => "Toggle between AND and OR tag union types"; - @override - String get tourFilterSort => - "Sort tasks based on time of creation, urgency, due date, start date, etc."; - - // Tour strings - details page - @override - String get tourDetailsDue => "This signifies the due date of the task"; - @override - String get tourDetailsWait => - "This signifies the waiting date of the task \n Task will be visible after this date"; - @override - String get tourDetailsUntil => "This shows the last date of the task"; - @override - String get tourDetailsPriority => - "This is the priority of the Tasks \n L -> Low \n M -> Medium \n H -> Hard"; - // Dialogue for adding new task - @override - String get descriprtionCannotBeEmpty => "Description cannot be empty"; - @override - String get enterTaskDescription => "Enter Task Description"; - @override - String get canNotHaveWhiteSpace => "Can not have white space"; - @override - String get high => "High"; - @override - String get medium => "Medium"; - @override - String get low => "Low"; - @override - String get priority => "Priority"; - @override - String get tagAlreadyExists => "Tag already exists"; - @override - String get tagShouldNotContainSpaces => "Tag should not contain spaces"; - @override - String get date => "Date"; - @override - String get add => "Add"; - @override - String get change => "Change"; - @override - String get dateCanNotBeInPast => "Date can not be in past"; - @override - String get configureTaskchampion => 'Configure Taskchampion'; - @override - String get encryptionSecret => 'Encryption Secret'; - @override - String get ccsyncBackendUrl => 'CCSync Backend URL'; - @override - String get ccsyncClientId => 'Client ID'; - @override - String get success => 'Success'; - @override - String get credentialsSavedSuccessfully => 'Credentials saved successfully'; - @override - String get tip => - "Tip: Click on the info icon in the top right corner to get your credentials"; - @override - String get logs => 'Logs'; - @override - String get checkAllDebugLogsHere => 'Check all debug logs here'; -} diff --git a/lib/app/utils/language/french_sentences.dart b/lib/app/utils/language/french_sentences.dart deleted file mode 100644 index 2a195d94..00000000 --- a/lib/app/utils/language/french_sentences.dart +++ /dev/null @@ -1,670 +0,0 @@ -import 'package:taskwarrior/app/utils/language/sentences.dart'; - -class FrenchSentences extends Sentences { - @override - String get helloWorld => 'Bonjour, le monde!'; - @override - String get homePageTitle => 'Page d\'accueil'; - @override - String get homePageLastModified => 'Dernière modification'; - @override - String get homePageDue => 'Échéance'; - @override - String get homePageTaskWarriorNotConfigured => 'TaskServer non configuré'; - @override - String get homePageSetup => 'Configuration'; - @override - String get homePageFilter => 'Filtre'; - @override - String get homePageMenu => 'Menu'; - @override - String get homePageExitApp => 'Quitter l\'application'; - @override - String get homePageAreYouSureYouWantToExit => - 'Êtes-vous sûr de vouloir quitter l\'application ?'; - @override - String get homePageExit => 'Quitter'; - @override - String get homePageCancel => 'Annuler'; - @override - String get homePageClickOnTheBottomRightButtonToStartAddingTasks => - 'Cliquez sur le bouton en bas à droite pour commencer à ajouter des tâches'; - @override - String get homePageSearchNotFound => 'Aucun résultat pour la recherche'; - @override - String get homePageFetchingTasks => 'Récupération de tâches'; - @override - String get settingsPageTitle => 'Page des paramètres'; - @override - String get settingsPageSubtitle => 'Configurez vos préférences'; - @override - String get settingsPageMovingDataToNewDirectory => - 'Déplacement des données vers un nouveau répertoire'; - @override - String get settingsPageSyncOnStartTitle => - 'Synchroniser les données automatiquement au démarrage'; - @override - String get settingsPageSyncOnStartDescription => 'Synchroniser au démarrage'; - @override - String get settingsPageEnableSyncOnTaskCreateTitle => - 'Activer la synchronisation automatique lors de la création de nouvelles tâches'; - @override - String get settingsPageEnableSyncOnTaskCreateDescription => - 'Activer la synchronisation automatique lors de la création de nouvelles tâches'; - @override - String get settingsPageHighlightTaskTitle => 'Surligner les tâches urgentes'; - @override - String get settingsPageHighlightTaskDescription => - 'Surligner les tâches dues dans 1 jour ou en retard'; - @override - String get settingsPageEnable24hrFormatTitle => 'Activer le format 24 heures'; - @override - String get settingsPageEnable24hrFormatDescription => - 'Activer le format 24 heures'; - @override - String get settingsPageSelectLanguage => 'Choisir la langue'; - @override - String get settingsPageToggleNativeLanguage => - 'Basculer entre les langues natives'; - @override - String get settingsPageSelectDirectoryTitle => 'Choisir un répertoire'; - @override - String get settingsPageSelectDirectoryDescription => - 'Choisissez le répertoire où les données Taskwarrior sont stockées\nRépertoire actuel : '; - @override - String get settingsPageChangeDirectory => 'Changer de répertoire'; - @override - String get settingsPageSetToDefault => 'Définir par défaut'; - @override - String get navDrawerProfile => 'Profil'; - @override - String get navDrawerReports => 'Rapports'; - @override - String get navDrawerAbout => 'À propos'; - @override - String get navDrawerSettings => 'Paramètres'; - @override - String get navDrawerExit => 'Quitter'; - - @override - String get detailPageDescription => 'Description'; - @override - String get detailPageStatus => 'Statut'; - @override - String get detailPageEntry => 'Entrée'; - @override - String get detailPageModified => 'Modifié'; - @override - String get detailPageStart => 'Début'; - @override - String get detailPageEnd => 'Fin'; - @override - String get detailPageDue => 'Échéance'; - @override - String get detailPageWait => 'Attendre'; - @override - String get detailPageUntil => 'Jusqu\'à'; - @override - String get detailPagePriority => 'Priorité'; - @override - String get detailPageProject => 'Projet'; - @override - String get detailPageTags => 'Tags'; - @override - String get detailPageUrgency => 'Urgence'; - @override - String get detailPageID => 'ID'; - - @override - String get filterDrawerApplyFilters => 'Appliquer les filtres'; - @override - String get filterDrawerHideWaiting => 'Masquer les en attente'; - @override - String get filterDrawerShowWaiting => 'Afficher les en attente'; - @override - String get filterDrawerPending => 'En attente'; - @override - String get filterDrawerCompleted => 'Complété'; - @override - String get filterDrawerFilterTagBy => 'Filtrer par tag'; - @override - String get filterDrawerAND => 'et'; - @override - String get filterDrawerOR => 'ou'; - @override - String get filterDrawerSortBy => 'Trier par'; - @override - String get filterDrawerCreated => 'Créé'; - @override - String get filterDrawerModified => 'Modifié'; - @override - String get filterDrawerStartTime => 'Heure de début'; - @override - String get filterDrawerDueTill => 'Jusqu\'à l\'échéance'; - @override - String get filterDrawerPriority => 'Priorité'; - @override - String get filterDrawerProject => 'Projet'; - @override - String get filterDrawerTags => 'Tags'; - @override - String get filterDrawerUrgency => 'Urgence'; - @override - String get filterDrawerResetSort => 'Réinitialiser le tri'; - @override - String get filterDrawerStatus => 'Statut'; - @override - String get reportsPageTitle => 'Rapports'; - @override - String get reportsPageCompleted => 'Complété'; - @override - String get reportsPagePending => 'En attente'; - @override - String get reportsPageTasks => 'Tâches'; - - @override - String get reportsPageDaily => 'Quotidien'; - @override - String get reportsPageDailyBurnDownChart => - 'Graphique de burn down quotidien'; - @override - String get reportsPageDailyDayMonth => 'Jour - Mois'; - - @override - String get reportsPageWeekly => 'Hebdomadaire'; - @override - String get reportsPageWeeklyBurnDownChart => - 'Graphique de burn down hebdomadaire'; - @override - String get reportsPageWeeklyWeeksYear => 'Semaine - Année'; - - @override - String get reportsPageMonthly => 'Mensuel'; - @override - String get reportsPageMonthlyBurnDownChart => - 'Graphique de burn down mensuel'; - @override - String get reportsPageMonthlyMonthYear => 'Mois - Année'; - - @override - String get reportsPageNoTasksFound => 'Aucune tâche trouvée'; - @override - String get reportsPageAddTasksToSeeReports => - 'Ajoutez des tâches pour voir les rapports'; - - @override - String get taskchampionTileDescription => - 'Basculez la synchronisation de Taskwarrior vers le serveur de synchronisation CCSync ou Taskchampion'; - - @override - String get taskchampionTileTitle => 'Synchronisation Taskchampion'; - - @override - String get ccsyncCredentials => 'Identifiants CCSync'; - - @override - String get deleteTaskConfirmation => 'Supprimer la tâche'; - - @override - String get deleteTaskTitle => 'Supprimer toutes les tâches ?'; - - @override - String get deleteTaskWarning => - 'Cette action est irréversible et supprimera toutes les tâches stockées localement.'; - - @override - String get profilePageProfile => 'Profil'; - @override - String get profilePageProfiles => 'Profils'; - @override - String get profilePageCurrentProfile => 'Profil actuel'; - @override - String get profilePageManageSelectedProfile => 'Gérer le profil sélectionné'; - @override - String get profilePageRenameAlias => 'Renommer l\'alias'; - - @override - String get profilePageConfigureTaskserver => - 'Configurer le serveur de tâches'; - @override - String get profilePageExportTasks => 'Exporter les tâches'; - @override - String get profilePageCopyConfigToNewProfile => - 'Copier la configuration vers un nouveau profil'; - @override - String get profilePageDeleteProfile => 'Supprimer le profil'; - @override - String get profilePageAddNewProfile => 'Ajouter un nouveau profil'; - - @override - String get profilePageRenameAliasDialogueBoxTitle => 'Renommer l\'alias'; - @override - String get profilePageRenameAliasDialogueBoxNewAlias => 'Nouvel alias'; - @override - String get profilePageRenameAliasDialogueBoxCancel => 'Annuler'; - @override - String get profilePageRenameAliasDialogueBoxSubmit => 'Soumettre'; - @override - String get profilePageExportTasksDialogueTitle => 'Format d\'exportation'; - @override - String get profilePageExportTasksDialogueSubtitle => - 'Choisissez le format d\'exportation'; - - @override - String get manageTaskServerPageConfigureTaskserver => - 'Configurer le serveur de tâches'; - @override - String get manageTaskServerPageConfigureTASKRC => 'Configurer TASKRC'; - @override - String get manageTaskServerPageSetTaskRC => 'Définir TaskRC'; - @override - String get manageTaskServerPageConfigureYourCertificate => - 'Configurer votre certificat'; - @override - String get manageTaskServerPageSelectCertificate => - 'Sélectionner un certificat'; - @override - String get manageTaskServerPageConfigureTaskserverKey => - 'Configurer la clé du serveur de tâches'; - @override - String get manageTaskServerPageSelectKey => 'Sélectionner une clé'; - @override - String get manageTaskServerPageConfigureServerCertificate => - 'Configurer le certificat du serveur'; - @override - String get manageTaskServerPageTaskRCFileIsVerified => - 'Le fichier Task RC est vérifié'; - - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxTitle => - 'Configurer TaskRC'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle => - 'Collez le contenu de TaskRC ou sélectionnez un fichier taskrc'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText => - 'Collez votre contenu TaskRC ici'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxOr => 'ou'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC => - 'Sélectionner un fichier TaskRC'; - - @override - String get addTaskTitle => "Ajouter une tâche"; - @override - String get addTaskEnterTask => "Entrer une tâche"; - @override - String get addTaskDue => "Échéance"; - @override - String get addTaskSelectDueDate => "Sélectionner la date d'échéance"; - @override - String get addTaskPriority => "Priorité"; - @override - String get addTaskAddTags => "Ajouter des tags"; - @override - String get addTaskCancel => "Annuler"; - @override - String get addTaskAdd => "Ajouter"; - @override - String get addTaskTimeInPast => "L'heure sélectionnée est dans le passé."; - @override - String get addTaskFieldCannotBeEmpty => - "Vous ne pouvez pas laisser ce champ vide !"; - @override - String get addTaskTaskAddedSuccessfully => - "Tâche ajoutée avec succès. Appuyez pour éditer"; - - @override - String get aboutPageGitHubLink => - "Enthousiaste à l'idée d'améliorer ce projet ? Visitez notre dépôt GitHub."; - @override - String get aboutPageProjectDescription => - "Ce projet vise à créer une application pour Taskwarrior. C'est votre application de gestion des tâches sur toutes les plateformes. Elle vous aide à gérer vos tâches et à les filtrer selon vos besoins."; - @override - String get aboutPageAppBarTitle => "À propos"; - - @override - String get homePageSearchTooltip => 'Rechercher'; - @override - String get homePageCancelSearchTooltip => 'Annuler'; - @override - String get homePageAddTaskTooltip => 'Ajouter une tâche'; - @override - String get homePageTapBackToExit => 'Appuyez de nouveau pour quitter'; - @override - String get homePageSearchHint => 'Rechercher'; - - @override - String get navDrawerConfirm => 'Confirmer'; - - @override - String get filterDrawerNoProjectsAvailable => 'Aucun projet disponible.'; - - @override - String get version => "Version"; - @override - String get package => "Package"; - - @override - String get notSelected => "Non sélectionné"; - @override - String get cantSetTimeinPast => "Impossible de définir une date passée"; - - @override - String get editDescription => "Modifier la description"; - @override - String get editProject => "Modifier le projet"; - @override - String get cancel => "Annuler"; - @override - String get submit => "Soumettre"; - - @override - String get saveChangesConfirmation => - 'Voulez-vous enregistrer les modifications ?'; - @override - String get yes => 'Oui'; - @override - String get no => 'Non'; - @override - String get reviewChanges => 'Revoir les modifications'; - @override - String get oldChanges => 'Ancien'; - @override - String get newChanges => 'Nouveau'; - - @override - String get tags => 'Tags'; - @override - String get addedTagsWillAppearHere => 'Les tags ajoutés apparaîtront ici'; - @override - String get addTag => 'Ajouter un tag'; - - @override - String get enterProject => 'Entrer un projet'; - @override - String get allProjects => 'Tous les projets'; - @override - String get noProjectsFound => 'Aucun projet trouvé'; - @override - String get project => 'Projet'; - - @override - String get select => 'Sélectionner'; - @override - String get save => 'Enregistrer'; - @override - String get dontSave => 'Ne pas enregistrer'; - @override - String get unsavedChanges => 'Modifications non enregistrées'; - @override - String get unsavedChangesWarning => - 'Vous avez des modifications non enregistrées. Que souhaitez-vous faire ?'; - @override - String get enterNew => 'Entrer une nouvelle'; - @override - String get edit => 'Modifier'; - @override - String get task => 'Tâche'; - -// Chaînes d'actions des tâches - @override - String get confirmDeleteTask => 'Confirmer la suppression'; - @override - String get taskUpdated => 'Tâche mise à jour'; - @override - String get undo => 'Annuler'; - @override - String get taskMarkedAsCompleted => - 'Tâche marquée comme terminée. Rafraîchissez pour voir les modifications !'; - @override - String get taskMarkedAsDeleted => - 'Tâche marquée comme supprimée. Rafraîchissez pour voir les modifications !'; - @override - String get refreshToViewChanges => 'Rafraîchir pour voir les modifications'; - @override - String get clickOnBottomRightButtonToStartAddingTasks => - 'Cliquez sur le bouton en bas à droite pour commencer à ajouter des tâches'; - @override - String get complete => 'TERMINER'; - @override - String get delete => 'SUPPRIMER'; - -// Gestion du serveur de tâches - @override - String get taskServerInfo => 'Informations du serveur TaskD'; - @override - String get taskServerCredentials => 'Identifiants du serveur TaskD'; - @override - String get notConfigured => 'Non configuré'; - @override - String get fetchingStatistics => 'Récupération des statistiques...'; - @override - String get pleaseWait => 'Veuillez patienter...'; - @override - String get statistics => 'Statistiques :'; - @override - String get ok => 'Ok'; - @override - String get pleaseSetupTaskServer => - 'Veuillez configurer votre serveur TaskD.'; - -// Chaînes d'intégration - @override - String get onboardingSkip => 'Passer'; - @override - String get onboardingNext => 'Suivant'; - @override - String get onboardingStart => 'Commencer'; - -// Chaînes des permissions - @override - String get permissionPageTitle => - 'Pourquoi avons-nous besoin de votre autorisation'; - @override - String get storagePermissionTitle => 'Autorisation de stockage'; - @override - String get storagePermissionDescription => - 'Nous utilisons l\'accès au stockage pour enregistrer vos tâches, ' - 'préférences et données de l\'application en toute sécurité sur votre appareil. ' - 'Cela vous permet de reprendre votre travail là où vous l\'avez laissé, même hors ligne.'; - @override - String get notificationPermissionTitle => 'Autorisation de notifications'; - @override - String get notificationPermissionDescription => - 'Les notifications vous tiennent informé des rappels importants et des mises à jour, ' - 'vous aidant à rester organisé sans effort.'; - @override - String get privacyStatement => - 'Votre vie privée est notre priorité. Nous n\'accédons jamais à vos fichiers personnels ' - 'ni ne partageons vos données sans votre consentement.'; - @override - String get grantPermissions => 'Accorder les autorisations'; - @override - String get managePermissionsLater => - 'Vous pouvez gérer vos autorisations plus tard dans les paramètres'; - -// Chaînes de la page de profil - @override - String get profileAllProfiles => 'Tous les profils :'; - @override - String get profileSwitchedToProfile => 'Changé de profil'; - @override - String get profileAddedSuccessfully => 'Profil ajouté avec succès'; - @override - String get profileAdditionFailed => 'Échec de l\'ajout du profil'; - @override - String get profileConfigCopied => 'Configuration du profil copiée'; - @override - String get profileConfigCopyFailed => - 'Échec de la copie de la configuration du profil'; - @override - String get profileDeletedSuccessfully => 'Supprimé avec succès'; - @override - String get profileDeletionFailed => 'Échec de la suppression'; - @override - String get profileDeleteConfirmation => 'Confirmer'; - -// Chaînes des rapports - @override - String get reportsDate => 'Date'; - @override - String get reportsPending => 'En attente'; - @override - String get reportsCompleted => 'Terminé'; - @override - String get reportsMonthYear => 'Mois-Année'; - @override - String get reportsWeek => 'Semaine'; - @override - String get reportsDay => 'Jour'; - @override - String get reportsYear => 'Année'; - @override - String get reportsError => 'Erreur'; - @override - String get reportsLoading => 'Chargement...'; - -// Chaînes des paramètres - @override - String get settingsResetToDefault => 'Réinitialiser par défaut'; - @override - String get settingsAlreadyDefault => 'Déjà par défaut'; - @override - String get settingsConfirmReset => - 'Êtes-vous sûr de vouloir réinitialiser le répertoire aux paramètres par défaut ?'; - @override - String get settingsNoButton => 'Non'; - @override - String get settingsYesButton => 'Oui'; - -// Chaînes de l'écran de démarrage - @override - String get splashSettingUpApp => "Configuration de l'application..."; - -// Chaînes du tour - rapports - @override - String get tourReportsDaily => - "Accédez à votre rapport quotidien des tâches ici"; - @override - String get tourReportsWeekly => - "Accédez à vos rapports hebdomadaires des tâches ici"; - @override - String get tourReportsMonthly => - "Accédez à vos rapports mensuels des tâches ici"; - -// Chaînes du tour - profil - @override - String get tourProfileCurrent => "Voir votre profil actuel ici"; - @override - String get tourProfileManage => "Gérez votre profil actuel ici"; - @override - String get tourProfileAddNew => "Ajoutez un nouveau profil ici"; - -// Chaînes du tour - serveur de tâches - @override - String get tourTaskServerTaskRC => - "Sélectionnez le fichier nommé taskrc ici ou collez son contenu"; - @override - String get tourTaskServerCertificate => - "Sélectionnez le fichier nommé comme .com.cert.pem ici"; - @override - String get tourTaskServerKey => - "Sélectionnez le fichier nommé comme .key.pem ici"; - @override - String get tourTaskServerRootCert => - "Sélectionnez le fichier nommé comme letsencrypt_root_cert.pem ici"; - -// Chaînes du tour - page d'accueil - @override - String get tourHomeAddTask => "Ajouter une nouvelle tâche"; - @override - String get tourHomeSearch => "Rechercher des tâches"; - @override - String get tourHomeRefresh => "Rafraîchir ou synchroniser vos tâches"; - @override - String get tourHomeFilter => - "Ajouter des filtres pour trier vos tâches et projets"; - @override - String get tourHomeMenu => "Accéder aux paramètres supplémentaires ici"; - - @override - String get tourDetailsDue => "Cela signifie la date d'échéance de la tâche"; - - @override - String get tourDetailsPriority => - "Ceci est la priorité des tâches \n L -> Faible \n M -> Moyenne \n H -> Élevée"; - - @override - String get tourDetailsUntil => "Cela montre la dernière date de la tâche"; - - @override - String get tourDetailsWait => - "Cela signifie la date d'attente de la tâche \n La tâche sera visible après cette date"; - - @override - String get tourFilterProjects => "Filtrer les tâches en fonction des projets"; - - @override - String get tourFilterSort => - "Trier les tâches en fonction de la date de création, de l'urgence, de la date d'échéance, de la date de début, etc."; - - @override - String get tourFilterStatus => - "Filtrer les tâches en fonction de leur état d'achèvement"; - - @override - String get tourFilterTagUnion => - "Basculer entre les types d'union de balises ET et OU"; - @override - String get descriprtionCannotBeEmpty => - "La description ne peut pas être vide"; - @override - String get enterTaskDescription => "Entrez la description de la tâche"; - @override - String get canNotHaveWhiteSpace => "Ne peut pas contenir d'espaces blancs"; - @override - String get high => "Élevée"; - @override - String get medium => "Moyenne"; - @override - String get low => "Faible"; - @override - String get priority => "Priorité"; - @override - String get tagAlreadyExists => "Le tag existe déjà"; - @override - String get tagShouldNotContainSpaces => - "Le tag ne doit pas contenir d'espaces"; - @override - String get date => "Date"; - @override - String get add => "Ajouter"; - @override - String get change => "Changer"; - @override - String get dateCanNotBeInPast => "La date ne peut pas être dans le passé"; - @override - String get configureTaskchampion => - "Configurer Taskchampion pour la synchronisation"; - @override - String get encryptionSecret => 'Secret de chiffrement'; - @override - String get ccsyncBackendUrl => 'URL du backend CCSync'; - @override - String get ccsyncClientId => 'ID client'; - @override - String get success => 'Succès'; - @override - String get credentialsSavedSuccessfully => - 'Identifiants enregistrés avec succès'; - @override - String get tip => - "Astuce : Cliquez sur l'icône d'information en haut à droite pour obtenir vos identifiants"; - @override - String get logs => 'Journaux'; - @override - String get checkAllDebugLogsHere => - 'Vérifiez tous les journaux de débogage ici'; -} diff --git a/lib/app/utils/language/hindi_sentences.dart b/lib/app/utils/language/hindi_sentences.dart deleted file mode 100644 index cbaff9ce..00000000 --- a/lib/app/utils/language/hindi_sentences.dart +++ /dev/null @@ -1,632 +0,0 @@ -import 'package:taskwarrior/app/utils/language/sentences.dart'; - -class HindiSentences extends Sentences { - @override - String get helloWorld => 'नमस्ते दुनिया!'; - @override - String get homePageTitle => 'होम पेज'; - @override - String get homePageLastModified => 'अंतिम बार संशोधित'; - @override - String get homePageDue => 'देय'; - @override - String get homePageTaskWarriorNotConfigured => 'TaskServer कॉन्फ़िगर नहीं है'; - @override - String get homePageSetup => 'सेटअप'; - @override - String get homePageFilter => 'फ़िल्टर'; - @override - String get homePageMenu => 'मेन्यू'; - @override - String get homePageExitApp => 'ऐप बंद करें'; - @override - String get homePageAreYouSureYouWantToExit => - 'क्या आप वाकई ऐप बंद करना चाहते हैं?'; - @override - String get homePageExit => 'बाहर जाओ'; - @override - String get homePageCancel => 'रद्द करें'; - @override - String get homePageClickOnTheBottomRightButtonToStartAddingTasks => - 'कार्यों को जोड़ना शुरू करने के लिए नीचे दाएं बटन पर क्लिक करें'; - @override - String get homePageSearchNotFound => 'खोजने पर नहीं मिला'; - @override - String get homePageFetchingTasks => 'कार्य लाये जा रहे हैं'; - @override - String get homePageSearchTooltip => 'खोजें'; - @override - String get homePageCancelSearchTooltip => 'रद्द करें'; - @override - String get homePageAddTaskTooltip => 'कार्य जोड़ें'; - @override - String get homePageTapBackToExit => 'बाहर निकलने के लिए फिर से वापस दबाएं'; - @override - String get homePageSearchHint => 'खोजें'; - - @override - String get settingsPageTitle => 'सेटिंग्स पेज'; - @override - String get settingsPageSubtitle => 'अपनी पसंद सेट करें'; - @override - String get settingsPageMovingDataToNewDirectory => - 'नए निर्देशिका में डेटा को ले जा रहा है'; - @override - String get settingsPageSyncOnStartTitle => - 'ऐप स्टार्ट पर डेटा स्वचालित सिंक करें'; - @override - String get settingsPageSyncOnStartDescription => 'स्टार्ट पर सिंक करें'; - @override - String get settingsPageEnableSyncOnTaskCreateTitle => - 'नई टास्क बनाते समय स्वचालित सिंकिंग सक्षम करें'; - @override - String get settingsPageEnableSyncOnTaskCreateDescription => - 'नई टास्क बनाते समय स्वचालित सिंकिंग सक्षम करें'; - @override - String get settingsPageHighlightTaskTitle => 'तत्काल कार्यों को हाइलाइट करें'; - @override - String get settingsPageHighlightTaskDescription => - '1 दिन के भीतर देय या अतिदेय कार्यों को हाइलाइट करें'; - @override - String get settingsPageEnable24hrFormatTitle => - '24 घंटे का प्रारूप सक्षम करें'; - @override - String get settingsPageEnable24hrFormatDescription => - '24 घंटे का प्रारूप सक्षम करें'; - @override - String get settingsPageSelectLanguage => 'भाषा चुनें'; - @override - String get settingsPageToggleNativeLanguage => - 'अपनी मातृभाषा के बीच टॉगल करें'; - @override - String get settingsPageSelectDirectoryTitle => 'निर्देशिका चुनें'; - @override - String get settingsPageSelectDirectoryDescription => - 'निर्देशिका चुनें जहां Taskwarrior डेटा स्टोर होता है\nवर्तमान निर्देशिका: '; - @override - String get settingsPageChangeDirectory => 'निर्देशिका बदलें'; - @override - String get settingsPageSetToDefault => 'डिफॉल्ट पर सेट करें'; - @override - String get navDrawerProfile => 'प्रोफ़ाइल'; - @override - String get navDrawerReports => 'रिपोर्ट्स'; - @override - String get navDrawerAbout => 'के बारे में'; - @override - String get navDrawerSettings => 'सेटिंग्स'; - @override - String get navDrawerExit => 'बाहर जाओ'; - @override - String get navDrawerConfirm => 'पुष्टि करें'; - - @override - String get detailPageDescription => 'विवरण'; - @override - String get detailPageStatus => 'स्थिति'; - @override - String get detailPageEntry => 'प्रवेश'; - @override - String get detailPageModified => 'संशोधित'; - @override - String get detailPageStart => 'प्रारंभ'; - @override - String get detailPageEnd => 'अंत'; - @override - String get detailPageDue => 'देय'; - @override - String get detailPageWait => 'प्रतीक्षा करें'; - @override - String get detailPageUntil => 'तक'; - @override - String get detailPagePriority => 'प्राथमिकता'; - @override - String get detailPageProject => 'परियोजना'; - @override - String get detailPageTags => 'टैग'; - @override - String get detailPageUrgency => 'तत्कालता'; - @override - String get detailPageID => 'आयडी'; - - @override - String get filterDrawerApplyFilters => 'फिल्टर लागू करें'; - @override - String get filterDrawerHideWaiting => 'इंतजार छिपाएं'; - @override - String get filterDrawerShowWaiting => 'इंतजार दिखाएं'; - @override - String get filterDrawerPending => 'अपूर्ण'; - @override - String get filterDrawerCompleted => 'पूर्ण'; - @override - String get filterDrawerFilterTagBy => 'टैग से फ़िल्टर करें'; - @override - String get filterDrawerAND => 'और'; - @override - String get filterDrawerOR => 'या'; - @override - String get filterDrawerSortBy => 'इसके आधार पर क्रमबद्ध करें'; - @override - String get filterDrawerCreated => 'निर्मित'; - @override - String get filterDrawerModified => 'संशोधित'; - @override - String get filterDrawerStartTime => 'शुरुआत समय'; - @override - String get filterDrawerDueTill => 'तक बकाया'; - @override - String get filterDrawerPriority => 'प्राथमिकता'; - @override - String get filterDrawerProject => 'परियोजना'; - @override - String get filterDrawerTags => 'टैग्स'; - @override - String get filterDrawerUrgency => 'तत्कालता'; - @override - String get filterDrawerResetSort => 'सॉर्ट रीसेट करें'; - @override - String get filterDrawerStatus => 'स्थिती'; - @override - String get filterDrawerNoProjectsAvailable => 'कोई परियोजना उपलब्ध नहीं।'; - @override - String get reportsPageTitle => 'रिपोर्ट्स'; - @override - String get reportsPageCompleted => 'पूर्ण'; - @override - String get reportsPagePending => 'अपूर्ण'; - @override - String get reportsPageTasks => 'कार्य'; - - @override - String get reportsPageDaily => 'दैनिक'; - @override - String get reportsPageDailyBurnDownChart => 'दैनिक बर्न डाउन चार्ट'; - @override - String get reportsPageDailyDayMonth => 'दिन - माह'; - - @override - String get reportsPageWeekly => 'साप्ताहिक'; - @override - String get reportsPageWeeklyBurnDownChart => 'साप्ताहिक बर्न डाउन चार्ट'; - @override - String get reportsPageWeeklyWeeksYear => 'सप्ताह - वर्ष'; - - @override - String get reportsPageMonthly => 'मासिक'; - @override - String get reportsPageMonthlyBurnDownChart => 'मासिक बर्न डाउन चार्ट'; - @override - String get reportsPageMonthlyMonthYear => 'माह - वर्ष'; - - @override - String get reportsPageNoTasksFound => 'कोई कार्य नहीं मिला'; - @override - String get reportsPageAddTasksToSeeReports => - 'रिपोर्ट देखने के लिए कार्य जोड़ें'; - - @override - String get taskchampionTileDescription => - 'CCSync या Taskchampion सिंक सर्वर के साथ Taskwarrior सिंक पर स्विच करें'; - - @override - String get taskchampionTileTitle => 'Taskchampion सिंक'; - - @override - String get ccsyncCredentials => 'CCync क्रेडेन्शियल'; - - @override - String get deleteTaskConfirmation => 'कार्य हटाएं'; - - @override - String get deleteTaskTitle => 'सभी कार्य हटाएं?'; - - @override - String get deleteTaskWarning => - 'यह क्रिया अपरिवर्तनीय है और यह सभी स्थानीय रूप से संग्रहीत कार्यों को हटा देगी।'; - - @override - String get profilePageProfile => 'प्रोफ़ाइल'; - @override - String get profilePageProfiles => 'प्रोफ़ाइल्स'; - @override - String get profilePageCurrentProfile => 'वर्तमान प्रोफ़ाइल'; - @override - String get profilePageManageSelectedProfile => - 'चुनी हुई प्रोफ़ाइल प्रबंधित करें'; - @override - String get profilePageRenameAlias => 'उपनाम बदलें'; - - @override - String get profilePageConfigureTaskserver => 'टास्क सर्वर कॉन्फ़िगर करें'; - @override - String get profilePageExportTasks => 'कार्य निर्यात करें'; - @override - String get profilePageCopyConfigToNewProfile => - 'नई प्रोफ़ाइल पर कॉन्फ़िगरेशन कॉपी करें'; - @override - String get profilePageDeleteProfile => 'प्रोफ़ाइल हटाएँ'; - @override - String get profilePageAddNewProfile => 'नई प्रोफ़ाइल जोड़ें'; - - @override - String get profilePageRenameAliasDialogueBoxTitle => 'उपनाम बदलें'; - @override - String get profilePageRenameAliasDialogueBoxNewAlias => 'नया उपनाम'; - @override - String get profilePageRenameAliasDialogueBoxCancel => 'रद्द करें'; - @override - String get profilePageRenameAliasDialogueBoxSubmit => 'प्रस्तुत करें'; - - @override - String get profilePageExportTasksDialogueTitle => 'निर्यात प्रारूप'; - @override - String get profilePageExportTasksDialogueSubtitle => 'निर्यात प्रारूप चुनें'; - - @override - String get manageTaskServerPageConfigureTaskserver => - 'टास्क सर्वर कॉन्फ़िगर करें'; - @override - String get manageTaskServerPageConfigureTASKRC => 'TASKRC कॉन्फ़िगर करें'; - @override - String get manageTaskServerPageSetTaskRC => 'TaskRC सेट करें'; - @override - String get manageTaskServerPageConfigureYourCertificate => - 'अपने सर्टिफिकेट को कॉन्फ़िगर करें'; - @override - String get manageTaskServerPageSelectCertificate => 'सर्टिफिकेट चुनें'; - @override - String get manageTaskServerPageConfigureTaskserverKey => - 'टास्क सर्वर की कॉन्फ़िगर करें'; - @override - String get manageTaskServerPageSelectKey => 'कुंजी चुनें'; - @override - String get manageTaskServerPageConfigureServerCertificate => - 'सर्वर सर्टिफिकेट कॉन्फ़िगर करें'; - @override - String get manageTaskServerPageTaskRCFileIsVerified => - 'Task RC फ़ाइल सत्यापित की गई है'; - - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxTitle => - 'TaskRC कॉन्फ़िगर करें'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle => - 'TaskRC सामग्री पेस्ट करें या taskrc फ़ाइल चुनें'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText => - 'यहाँ अपनी TaskRC सामग्री पेस्ट करें'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxOr => 'या'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC => - 'TaskRC फ़ाइल चुनें'; - - @override - String get addTaskTitle => "कार्य जोड़ें"; - @override - String get addTaskEnterTask => "कार्य दर्ज करें"; - @override - String get addTaskDue => "देय"; - @override - String get addTaskSelectDueDate => "नियत तिथि चुनें"; - @override - String get addTaskPriority => "प्राथमिकता"; - @override - String get addTaskAddTags => "टैग जोड़ें"; - @override - String get addTaskCancel => "रद्द करें"; - @override - String get addTaskAdd => "जोड़ें"; - @override - String get addTaskTimeInPast => "चुनी गई समय अतीत में है।"; - @override - String get addTaskFieldCannotBeEmpty => - "आप इस फ़ील्ड को खाली नहीं छोड़ सकते!"; - @override - String get addTaskTaskAddedSuccessfully => - "कार्य सफलतापूर्वक जोड़ा गया। संपादित करने के लिए टैप करें"; - - @override - String get aboutPageGitHubLink => - "इस परियोजना को बढ़ाने के लिए उत्सुक हैं? हमारे GitHub रिपॉज़िटरी पर जाएं।"; - @override - String get aboutPageProjectDescription => - "यह परियोजना Taskwarrior के लिए एक ऐप बनाने का लक्ष्य रखती है। यह आपके सभी प्लेटफार्मों पर कार्य प्रबंधन ऐप है। यह आपको अपने कार्यों को प्रबंधित करने और उन्हें अपनी आवश्यकताओं के अनुसार छानने में मदद करता है।"; - @override - String get aboutPageAppBarTitle => "के बारे में"; - - @override - String get version => "संस्करण"; - @override - String get package => "पैकेज"; - - @override - String get notSelected => "चयनित नहीं"; - @override - String get cantSetTimeinPast => "पिछले समय को सेट नहीं कर सकते"; - - @override - String get editDescription => "विवरण संपादित करें"; - @override - String get editProject => "परियोजना संपादित करें"; - @override - String get cancel => "रद्द करें"; - @override - String get submit => "जमा करें"; - - @override - String get saveChangesConfirmation => 'क्या आप परिवर्तन सहेजना चाहते हैं?'; - @override - String get yes => 'हाँ'; - @override - String get no => 'नहीं'; - @override - String get reviewChanges => 'परिवर्तनों की समीक्षा करें'; - @override - String get oldChanges => 'पुराना'; - @override - String get newChanges => 'नया'; - - @override - String get tags => 'टैग'; - @override - String get addedTagsWillAppearHere => 'जोड़े गए टैग यहाँ दिखाई देंगे'; - @override - String get addTag => 'टैग जोड़ें'; - - @override - String get enterProject => 'परियोजना दर्ज करें'; - @override - String get allProjects => 'सभी परियोजनाएँ'; - @override - String get noProjectsFound => 'कोई परियोजना नहीं मिली'; - @override - String get project => 'परियोजना'; - - @override - String get select => 'चुनें'; - @override - String get save => 'सहेजें'; - @override - String get dontSave => 'सहेजें नहीं'; - @override - String get unsavedChanges => 'असहेजित परिवर्तन'; - @override - String get unsavedChangesWarning => - 'आपके पास असहेजित परिवर्तन हैं। आप क्या करना चाहेंगे?'; - @override - String get enterNew => 'नया दर्ज करें'; - @override - String get edit => 'संपादित करें'; - @override - String get task => 'कार्य'; - - @override - String get confirmDeleteTask => 'हटाने की पुष्टि करें'; - @override - String get taskUpdated => 'कार्य अपडेट किया गया'; - @override - String get undo => 'पूर्ववत करें'; - @override - String get taskMarkedAsCompleted => - 'कार्य को पूर्ण रूप में चिह्नित किया गया। परिवर्तनों को देखने के लिए रिफ्रेश करें!'; - @override - String get taskMarkedAsDeleted => - 'कार्य को हटाए गए रूप में चिह्नित किया गया। परिवर्तनों को देखने के लिए रिफ्रेश करें!'; - @override - String get refreshToViewChanges => 'परिवर्तनों को देखने के लिए रिफ्रेश करें'; - @override - String get clickOnBottomRightButtonToStartAddingTasks => - 'कार्य जोड़ने के लिए नीचे दाईं ओर बटन पर क्लिक करें'; - @override - String get complete => 'पूर्ण'; - @override - String get delete => 'हटाएँ'; - - @override - String get taskServerInfo => 'टास्क सर्वर जानकारी'; - @override - String get taskServerCredentials => 'टास्क सर्वर क्रेडेंशियल'; - @override - String get notConfigured => 'कॉन्फ़िगर नहीं किया गया'; - @override - String get fetchingStatistics => 'सांख्यिकी लाया जा रहा है...'; - @override - String get pleaseWait => 'कृपया प्रतीक्षा करें...'; - @override - String get statistics => 'सांख्यिकी:'; - @override - String get ok => 'ठीक'; - @override - String get pleaseSetupTaskServer => 'कृपया अपना टास्क सर्वर सेट करें।'; - - @override - String get onboardingSkip => 'छोड़ें'; - @override - String get onboardingNext => 'अगला'; - @override - String get onboardingStart => 'शुरू करें'; - - @override - String get permissionPageTitle => 'हमें आपकी अनुमति की आवश्यकता क्यों है'; - @override - String get storagePermissionTitle => 'संग्रहण अनुमति'; - @override - String get storagePermissionDescription => - 'हम आपके कार्य, प्राथमिकताएँ, और ऐप डेटा सुरक्षित रूप से सहेजने के लिए ' - 'संग्रहण पहुँच का उपयोग करते हैं, जिससे आप किसी भी समय ऑफ़लाइन भी कार्य जारी रख सकते हैं।'; - @override - String get notificationPermissionTitle => 'सूचना अनुमति'; - @override - String get notificationPermissionDescription => - 'सूचनाएँ आपको महत्वपूर्ण अनुस्मारक और अपडेट देती हैं, जिससे आप अपने कार्यों को आसानी से प्रबंधित कर सकते हैं।'; - @override - String get privacyStatement => - 'आपकी गोपनीयता हमारी प्राथमिकता है। हम आपकी व्यक्तिगत फ़ाइलें या डेटा आपकी सहमति के बिना कभी भी एक्सेस या साझा नहीं करते।'; - @override - String get grantPermissions => 'अनुमतियाँ दें'; - @override - String get managePermissionsLater => - 'आप बाद में सेटिंग्स में अपनी अनुमतियाँ प्रबंधित कर सकते हैं'; - - @override - String get profileAllProfiles => 'सभी प्रोफाइल:'; - @override - String get profileSwitchedToProfile => 'प्रोफ़ाइल पर स्विच किया गया'; - @override - String get profileAddedSuccessfully => 'प्रोफ़ाइल सफलतापूर्वक जोड़ी गई'; - @override - String get profileAdditionFailed => 'प्रोफ़ाइल जोड़ना विफल रहा'; - @override - String get profileConfigCopied => 'प्रोफ़ाइल कॉन्फ़िग कॉपी किया गया'; - @override - String get profileConfigCopyFailed => 'प्रोफ़ाइल कॉन्फ़िग कॉपी विफल'; - @override - String get profileDeletedSuccessfully => 'सफलतापूर्वक हटाया गया'; - @override - String get profileDeletionFailed => 'हटाने में विफल'; - @override - String get profileDeleteConfirmation => 'पुष्टि करें'; - - @override - String get reportsDate => 'तारीख'; - @override - String get reportsPending => 'लंबित'; - @override - String get reportsCompleted => 'पूर्ण'; - @override - String get reportsMonthYear => 'महीना-वर्ष'; - @override - String get reportsWeek => 'सप्ताह'; - @override - String get reportsDay => 'दिन'; - @override - String get reportsYear => 'वर्ष'; - @override - String get reportsError => 'त्रुटि'; - @override - String get reportsLoading => 'लोड हो रहा है...'; - - @override - String get settingsResetToDefault => 'डिफ़ॉल्ट पर रीसेट करें'; - @override - String get settingsAlreadyDefault => 'पहले से डिफ़ॉल्ट'; - @override - String get settingsConfirmReset => - 'क्या आप वाकई निर्देशिका को डिफ़ॉल्ट पर रीसेट करना चाहते हैं?'; - @override - String get settingsNoButton => 'नहीं'; - @override - String get settingsYesButton => 'हाँ'; - - @override - String get splashSettingUpApp => "ऐप सेटअप किया जा रहा है..."; - - @override - String get tourReportsDaily => "यहाँ अपनी दैनिक कार्य रिपोर्ट देखें"; - @override - String get tourReportsWeekly => "यहाँ अपनी साप्ताहिक कार्य रिपोर्ट देखें"; - @override - String get tourReportsMonthly => "यहाँ अपनी मासिक कार्य रिपोर्ट देखें"; - - @override - String get tourProfileCurrent => "यहाँ अपनी वर्तमान प्रोफ़ाइल देखें"; - @override - String get tourProfileManage => "यहाँ अपनी वर्तमान प्रोफ़ाइल प्रबंधित करें"; - @override - String get tourProfileAddNew => "यहाँ नई प्रोफ़ाइल जोड़ें"; - - @override - String get tourHomeAddTask => "नया कार्य जोड़ें"; - @override - String get tourHomeSearch => "कार्य खोजें"; - @override - String get tourHomeRefresh => "अपने कार्यों को ताज़ा करें या सिंक करें"; - @override - String get tourHomeFilter => "कार्य और परियोजनाओं को फ़िल्टर करें"; - @override - String get tourHomeMenu => "यहाँ अतिरिक्त सेटिंग्स एक्सेस करें"; - - @override - String get tourFilterStatus => - "कार्य की पूर्णता स्थिति के आधार पर फ़िल्टर करें"; - @override - String get tourFilterProjects => "परियोजनाओं के आधार पर कार्य फ़िल्टर करें"; - @override - String get tourFilterTagUnion => - "AND और OR टैग यूनियन प्रकारों के बीच टॉगल करें"; - @override - String get tourFilterSort => - "निर्माण समय, तात्कालिकता, नियत तिथि, प्रारंभ तिथि आदि के आधार पर कार्यों को क्रमबद्ध करें।"; - - @override - String get tourDetailsDue => "यह कार्य की नियत तिथि को दर्शाता है"; - @override - String get tourDetailsWait => - "यह कार्य की प्रतीक्षा तिथि को दर्शाता है \n कार्य इस तिथि के बाद दिखाई देगा"; - @override - String get tourDetailsUntil => "यह कार्य की अंतिम तिथि को दर्शाता है"; - @override - String get tourDetailsPriority => - "यह कार्यों की प्राथमिकता है \n L -> निम्न \n M -> मध्यम \n H -> उच्च"; - - @override - String get tourTaskServerTaskRC => - "यहां 'taskrc' नामक फ़ाइल चुनें या इसकी सामग्री पेस्ट करें"; - @override - String get tourTaskServerCertificate => - "इसी तरह नामित फ़ाइल चुनें, जैसे .com.cert.pem"; - @override - String get tourTaskServerKey => - "इसी तरह नामित फ़ाइल चुनें, जैसे .key.pem"; - @override - String get tourTaskServerRootCert => - "इसी तरह नामित फ़ाइल चुनें, जैसे letsencrypt_root_cert.pem"; - @override - String get descriprtionCannotBeEmpty => "विवरण खाली नहीं हो सकता"; - @override - String get enterTaskDescription => "कार्य विवरण दर्ज करें"; - @override - String get canNotHaveWhiteSpace => "सफेद स्थान नहीं हो सकता"; - @override - String get high => "उच्च"; - @override - String get medium => "मध्यम"; - @override - String get low => "निम्न"; - @override - String get priority => "प्राथमिकता"; - @override - String get tagAlreadyExists => "टैग पहले से मौजूद है"; - @override - String get tagShouldNotContainSpaces => "टैग में स्पेस नहीं होना चाहिए"; - @override - String get date => "तारीख"; - @override - String get add => "जोड़ें"; - @override - String get change => "बदलें"; - @override - String get dateCanNotBeInPast => "तारीख अतीत में नहीं हो सकती"; - @override - String get configureTaskchampion => "Taskchampion कॉन्फ़िगर करें"; - @override - String get encryptionSecret => 'एन्क्रिप्शन सीक्रेट'; - @override - String get ccsyncBackendUrl => 'CCSync बैकएंड URL'; - @override - String get ccsyncClientId => 'क्लाइंट आईडी'; - @override - String get success => 'सफलता'; - @override - String get credentialsSavedSuccessfully => - 'क्रेडेंशियल्स सफलतापूर्वक सहेजे गए'; - @override - String get tip => - "टिप: अपनी क्रेडेंशियल्स प्राप्त करने के लिए ऊपर दाईं ओर स्थित जानकारी आइकन पर क्लिक करें"; - @override - String get logs => 'लॉग्स'; - @override - String get checkAllDebugLogsHere => 'यहाँ सभी डिबग लॉग्स देखें'; -} diff --git a/lib/app/utils/language/marathi_sentences.dart b/lib/app/utils/language/marathi_sentences.dart deleted file mode 100644 index b8d1b69d..00000000 --- a/lib/app/utils/language/marathi_sentences.dart +++ /dev/null @@ -1,655 +0,0 @@ -import 'package:taskwarrior/app/utils/language/sentences.dart'; - -class MarathiSentences extends Sentences { - @override - String get helloWorld => 'नमस्कार, जग!'; - @override - String get homePageTitle => 'होम पेज'; - @override - String get homePageLastModified => 'शेवटचा बदल'; - @override - String get homePageDue => 'द्यावे'; - @override - String get homePageTaskWarriorNotConfigured => 'TaskServer संरचीत नाही'; - @override - String get homePageSetup => 'सेटअप'; - @override - String get homePageFilter => 'फिल्टर'; - @override - String get homePageMenu => 'मेनू'; - @override - String get homePageExitApp => 'अ‍ॅप बंद करा'; - @override - String get homePageAreYouSureYouWantToExit => - 'आपण खात्री आहात की आपण अ‍ॅप बंद करू इच्छिता?'; - @override - String get homePageExit => 'बाहेर पडा'; - @override - String get homePageCancel => 'रद्द करा'; - @override - String get homePageClickOnTheBottomRightButtonToStartAddingTasks => - 'कार्ये जोडणे सुरू करण्यासाठी तळाशी उजव्या बटणावर क्लिक करा'; - @override - String get homePageSearchNotFound => 'शोध सापडला नाही'; - @override - String get homePageFetchingTasks => 'कार्ये आणत आहे'; - @override - String get settingsPageTitle => 'सेटिंग्स पेज'; - @override - String get settingsPageSubtitle => 'तुमची पसंती सेट करा'; - @override - String get settingsPageMovingDataToNewDirectory => - 'नवीन निर्देशिकेत डेटा हलवत आहे'; - @override - String get settingsPageSyncOnStartTitle => 'सुरू करण्यावर सिंक करा'; - @override - String get settingsPageSyncOnStartDescription => - 'अ‍ॅप सुरू करताना डेटा स्वयंसिंक करा'; - @override - String get settingsPageEnableSyncOnTaskCreateTitle => - 'नवीन कार्य तयार करताना स्वयंसिंकिंग सक्षम करा'; - @override - String get settingsPageEnableSyncOnTaskCreateDescription => - 'नवीन कार्य तयार करताना स्वयंसिंकिंग सक्षम करा'; - @override - String get settingsPageHighlightTaskTitle => - 'तातडीच्या कार्यांना हायलाईट करा'; - @override - String get settingsPageHighlightTaskDescription => - '1 दिवसाच्या आत देय किंवा मुदत संपलेल्या कार्यांना हायलाईट करा'; - @override - String get settingsPageEnable24hrFormatTitle => '24 तासाचा स्वरूप सक्षम करा'; - @override - String get settingsPageEnable24hrFormatDescription => - '24 तासाचा स्वरूप सक्षम करा'; - @override - String get settingsPageSelectLanguage => 'भाषा निवडा'; - @override - String get settingsPageToggleNativeLanguage => - 'तुमच्या मूल भाषेतर्फे टॉगल करा'; - @override - String get settingsPageSelectDirectoryTitle => 'निर्देशिका निवडा'; - @override - String get settingsPageSelectDirectoryDescription => - 'निर्देशिका निवडा जिथे Taskwarrior डेटा स्टोर केला जातो\nवर्तमान निर्देशिका: '; - @override - String get settingsPageChangeDirectory => 'डिरेक्टरी बदला'; - @override - String get settingsPageSetToDefault => 'डीफॉल्टवर सेट करा'; - @override - String get navDrawerProfile => 'प्रोफ़ाइल'; - @override - String get navDrawerReports => 'अहवाल'; - @override - String get navDrawerAbout => 'चरित्र'; - @override - String get navDrawerSettings => 'सेटिंग्स'; - @override - String get navDrawerExit => 'बाहेर पडा'; - - @override - String get detailPageDescription => 'वर्णन'; - @override - String get detailPageStatus => 'स्थिती'; - @override - String get detailPageEntry => 'प्रवेश'; - @override - String get detailPageModified => 'संशोधित'; - @override - String get detailPageStart => 'सुरूवात'; - @override - String get detailPageEnd => 'शेवट'; - @override - String get detailPageDue => 'देय'; - @override - String get detailPageWait => 'प्रतीक्षा'; - @override - String get detailPageUntil => 'पर्यंत'; - @override - String get detailPagePriority => 'प्राधान्य'; - @override - String get detailPageProject => 'प्रकल्प'; - @override - String get detailPageTags => 'टॅग'; - @override - String get detailPageUrgency => 'तातडी'; - @override - String get detailPageID => 'आयडी'; - - @override - String get filterDrawerApplyFilters => 'फिल्टर लागू करा'; - @override - String get filterDrawerHideWaiting => 'वाट लपवा'; - @override - String get filterDrawerShowWaiting => 'वाट दाखवा'; - @override - String get filterDrawerPending => 'प्रलंबित'; - @override - String get filterDrawerCompleted => 'पूर्ण'; - @override - String get filterDrawerFilterTagBy => 'टॅगवर फिल्टर करा'; - @override - String get filterDrawerAND => 'आणि'; - @override - String get filterDrawerOR => 'किंवा'; - @override - String get filterDrawerSortBy => 'यानुसार क्रमबद्ध करा'; - @override - String get filterDrawerCreated => 'सृष्ट'; - @override - String get filterDrawerModified => 'संशोधित'; - @override - String get filterDrawerStartTime => 'सुरूवातीचा वेळ'; - @override - String get filterDrawerDueTill => 'पर्यंतचा देय'; - @override - String get filterDrawerPriority => 'प्राधान्य'; - @override - String get filterDrawerProject => 'प्रकल्प'; - @override - String get filterDrawerTags => 'टॅग्ज'; - @override - String get filterDrawerUrgency => 'तातडी'; - @override - String get filterDrawerResetSort => 'क्रमवारी रीसेट करा'; - @override - String get filterDrawerStatus => 'स्थिति'; - - @override - String get reportsPageTitle => 'अहवाल'; - @override - String get reportsPageCompleted => 'पूर्ण'; - @override - String get reportsPagePending => 'प्रलंबित'; - @override - String get reportsPageTasks => 'काम'; - - @override - String get reportsPageDaily => 'दैनिक'; - @override - String get reportsPageDailyBurnDownChart => 'दैनिक बर्न डाउन चार्ट'; - @override - String get reportsPageDailyDayMonth => 'दिवस - महिना'; - - @override - String get reportsPageWeekly => 'साप्ताहिक'; - @override - String get reportsPageWeeklyBurnDownChart => 'साप्ताहिक बर्न डाउन चार्ट'; - @override - String get reportsPageWeeklyWeeksYear => 'सप्ताह - वर्ष'; - - @override - String get reportsPageMonthly => 'मासिक'; - @override - String get reportsPageMonthlyBurnDownChart => 'मासिक बर्न डाउन चार्ट'; - @override - String get reportsPageMonthlyMonthYear => 'महिना - वर्ष'; - - @override - String get reportsPageNoTasksFound => 'कोणतेही काम सापडले नाहीत'; - @override - String get reportsPageAddTasksToSeeReports => 'अहवाल पाहण्यासाठी काम जोडा'; - - @override - String get taskchampionTileDescription => - 'CCSync किंवा Taskchampion Sync Server सह Taskwarrior सिंक वर स्विच करा'; - - @override - String get taskchampionTileTitle => 'Taskchampion सिंक'; - - @override - String get ccsyncCredentials => 'CCync क्रेडेन्शियल'; - - @override - String get deleteTaskConfirmation => 'कार्य हटवा'; - - @override - String get deleteTaskTitle => 'सर्व कार्य हटवायचे का?'; - - @override - String get deleteTaskWarning => - 'ही क्रिया अपरिवर्तनीय आहे आणि हे सर्व स्थानिक पातळीवर संग्रहित केलेले कार्य हटवेल.'; - - @override - String get profilePageProfile => 'प्रोफाइल'; - @override - String get profilePageProfiles => 'प्रोफाइल्स'; - @override - String get profilePageCurrentProfile => 'सद्याचा प्रोफाइल'; - @override - String get profilePageManageSelectedProfile => - 'चयनित प्रोफाइल व्यवस्थापित करा'; - @override - String get profilePageRenameAlias => 'उपनाम पुनर्नामित करा'; - - @override - String get profilePageConfigureTaskserver => 'टास्क सर्व्हर कॉन्फिगर करा'; - @override - String get profilePageExportTasks => 'टास्क निर्यात करा'; - @override - String get profilePageCopyConfigToNewProfile => - 'नवीन प्रोफाइलवर कॉन्फिगरेशन कॉपी करा'; - @override - String get profilePageDeleteProfile => 'प्रोफाइल हटवा'; - @override - String get profilePageAddNewProfile => 'नवीन प्रोफाइल जोडा'; - - @override - String get profilePageRenameAliasDialogueBoxTitle => 'उपनाम पुनर्नामित करा'; - @override - String get profilePageRenameAliasDialogueBoxNewAlias => 'नवा उपनाम'; - @override - String get profilePageRenameAliasDialogueBoxCancel => 'रद्द करा'; - @override - String get profilePageRenameAliasDialogueBoxSubmit => 'सादर करा'; - - @override - String get profilePageExportTasksDialogueTitle => 'निर्यात प्रारूप'; - @override - String get profilePageExportTasksDialogueSubtitle => 'निर्यात प्रारूप निवडा'; - - @override - String get manageTaskServerPageConfigureTaskserver => - 'टास्क सर्व्हर कॉन्फिगर करा'; - @override - String get manageTaskServerPageConfigureTASKRC => 'TASKRC कॉन्फिगर करा'; - @override - String get manageTaskServerPageSetTaskRC => 'TaskRC सेट करा'; - @override - String get manageTaskServerPageConfigureYourCertificate => - 'आपला सर्टिफिकेट कॉन्फिगर करा'; - @override - String get manageTaskServerPageSelectCertificate => 'सर्टिफिकेट निवडा'; - @override - String get manageTaskServerPageConfigureTaskserverKey => - 'टास्क सर्व्हर की कॉन्फिगर करा'; - @override - String get manageTaskServerPageSelectKey => 'की निवडा'; - @override - String get manageTaskServerPageConfigureServerCertificate => - 'सर्व्हर सर्टिफिकेट कॉन्फिगर करा'; - @override - String get manageTaskServerPageTaskRCFileIsVerified => - 'Task RC फाइल पडताळली गेली आहे'; - - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxTitle => - 'TaskRC कॉन्फिगर करा'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle => - 'TaskRC सामग्री पेस्ट करा किंवा taskrc फाइल निवडा'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText => - 'येथे आपली TaskRC सामग्री पेस्ट करा'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxOr => 'किंवा'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC => - 'TaskRC फाइल निवडा'; - - @override - String get addTaskTitle => "काम जोडा"; - @override - String get addTaskEnterTask => "काम प्रविष्ट करा"; - @override - String get addTaskDue => "अखेर"; - @override - String get addTaskSelectDueDate => "अखेरची तारीख निवडा"; - @override - String get addTaskPriority => "प्राथमिकता"; - @override - String get addTaskAddTags => "टॅग जोडा"; - @override - String get addTaskCancel => "रद्द करा"; - @override - String get addTaskAdd => "जोडा"; - @override - String get addTaskTimeInPast => "निवडलेला वेळ भूतकाळात आहे."; - @override - String get addTaskFieldCannotBeEmpty => - "तुम्ही हा फील्ड रिकामा सोडू शकत नाही!"; - @override - String get addTaskTaskAddedSuccessfully => - "काम यशस्वीपणे जोडले गेले. संपादित करण्यासाठी टॅप करा"; - - @override - String get aboutPageGitHubLink => - "या प्रकल्पाला सुधारण्यासाठी उत्सुक आहात का? आमच्या GitHub रिपॉझिटरीला भेट द्या."; - @override - String get aboutPageProjectDescription => - "या प्रकल्पाचे उद्दिष्ट Taskwarrior साठी एक अॅप तयार करणे आहे. हे आपल्या सर्व प्लॅटफॉर्मवरील कार्य व्यवस्थापन अॅप आहे. हे आपल्याला आपल्या कार्यांचे व्यवस्थापन करण्यात आणि त्यांना आपल्या गरजेनुसार फिल्टर करण्यात मदत करते."; - @override - String get aboutPageAppBarTitle => "विषयक"; - - // मुख्य पृष्ठ - @override - String get homePageSearchTooltip => 'शोधा'; - @override - String get homePageCancelSearchTooltip => 'रद्द करा'; - @override - String get homePageAddTaskTooltip => 'कार्य जोडा'; - @override - String get homePageTapBackToExit => 'बाहेर पडण्यासाठी पुन्हा मागे टॅप करा'; - @override - String get homePageSearchHint => 'शोधा'; - -// नेव्हिगेशन ड्रॉवर - @override - String get navDrawerConfirm => 'निश्चित करा'; - -// फिल्टर ड्रॉवर - @override - String get filterDrawerNoProjectsAvailable => 'कोणतेही प्रकल्प उपलब्ध नाहीत.'; - -// सामान्य सेटिंग्ज - @override - String get version => "आवृत्ती"; - @override - String get package => "पॅकेज"; - - @override - String get notSelected => "निवडलेले नाही"; - @override - String get cantSetTimeinPast => "मागील वेळ सेट करू शकत नाही"; - - @override - String get editDescription => "वर्णन संपादित करा"; - @override - String get editProject => "प्रकल्प संपादित करा"; - @override - String get cancel => "रद्द करा"; - @override - String get submit => "सबमिट करा"; - - @override - String get saveChangesConfirmation => 'तुम्हाला बदल जतन करायचे आहेत का?'; - @override - String get yes => 'होय'; - @override - String get no => 'नाही'; - @override - String get reviewChanges => 'बदल पहा'; - @override - String get oldChanges => 'जुने'; - @override - String get newChanges => 'नवीन'; - - @override - String get tags => 'टॅग्स'; - @override - String get addedTagsWillAppearHere => 'जोडलेले टॅग येथे दिसतील'; - @override - String get addTag => 'टॅग जोडा'; - - @override - String get enterProject => 'प्रकल्प प्रविष्ट करा'; - @override - String get allProjects => 'सर्व प्रकल्प'; - @override - String get noProjectsFound => 'प्रकल्प सापडले नाहीत'; - @override - String get project => 'प्रकल्प'; - - @override - String get select => 'निवडा'; - @override - String get save => 'जतन करा'; - @override - String get dontSave => 'जतन करू नका'; - @override - String get unsavedChanges => 'जतन न केलेले बदल'; - @override - String get unsavedChangesWarning => - 'तुमच्याकडे जतन न केलेले बदल आहेत. तुम्हाला काय करायचे आहे?'; - @override - String get enterNew => 'नवीन प्रविष्ट करा'; - @override - String get edit => 'संपादित करा'; - @override - String get task => 'कार्य'; - -// कार्य क्रिया - @override - String get confirmDeleteTask => 'हटवण्याची खात्री करा'; - @override - String get taskUpdated => 'कार्य अद्यतनित झाले'; - @override - String get undo => 'पूर्ववत करा'; - @override - String get taskMarkedAsCompleted => - 'कार्य पूर्ण म्हणून चिन्हांकित केले. बदल पाहण्यासाठी रीफ्रेश करा!'; - @override - String get taskMarkedAsDeleted => 'कार्य हटवले. बदल पाहण्यासाठी रीफ्रेश करा!'; - @override - String get refreshToViewChanges => 'बदल पाहण्यासाठी रीफ्रेश करा'; - @override - String get clickOnBottomRightButtonToStartAddingTasks => - 'कार्ये जोडण्यास सुरुवात करण्यासाठी खालील उजव्या कोपऱ्यातील बटणावर क्लिक करा'; - @override - String get complete => 'पूर्ण'; - @override - String get delete => 'हटवा'; - -// कार्य सर्व्हर व्यवस्थापन - @override - String get taskServerInfo => 'TaskD सर्व्हर माहिती'; - @override - String get taskServerCredentials => 'TaskD सर्व्हर क्रेडेन्शियल्स'; - @override - String get notConfigured => 'संयोजित नाही'; - @override - String get fetchingStatistics => 'आकडेवारी मिळवत आहोत...'; - @override - String get pleaseWait => 'कृपया प्रतीक्षा करा...'; - @override - String get statistics => 'आकडेवारी:'; - @override - String get ok => 'ठीक आहे'; - @override - String get pleaseSetupTaskServer => 'कृपया TaskServer सेटअप करा.'; - -// ऑनबोर्डिंग - @override - String get onboardingSkip => 'वगळा'; - @override - String get onboardingNext => 'पुढे'; - @override - String get onboardingStart => 'सुरु करा'; - -// परवानगी सेटिंग्ज - @override - String get permissionPageTitle => 'आम्हाला तुमच्या परवानगीची गरज का आहे'; - @override - String get storagePermissionTitle => 'साठवण परवानगी'; - @override - String get storagePermissionDescription => - 'तुमचे कार्य, प्राधान्ये आणि अ‍ॅप डेटा सुरक्षित ठेवण्यासाठी आम्ही स्टोरेज प्रवेशाचा उपयोग करतो.'; - @override - String get notificationPermissionTitle => 'सूचना परवानगी'; - @override - String get notificationPermissionDescription => - 'महत्वाच्या आठवणी आणि अद्यतनांसाठी सूचना आवश्यक आहेत.'; - @override - String get privacyStatement => - 'तुमचा गोपनीयता आमच्यासाठी महत्त्वाची आहे. आम्ही तुमचा डेटा शेअर करत नाही.'; - @override - String get grantPermissions => 'परवानगी द्या'; - @override - String get managePermissionsLater => - 'तुम्ही नंतर सेटिंग्जमध्ये परवानग्या व्यवस्थापित करू शकता'; - -// प्रोफाइल पृष्ठ - @override - String get profileAllProfiles => 'सर्व प्रोफाइल:'; - @override - String get profileSwitchedToProfile => 'प्रोफाइल स्विच केले'; - @override - String get profileAddedSuccessfully => 'प्रोफाइल यशस्वीरित्या जोडले'; - @override - String get profileAdditionFailed => 'प्रोफाइल जोडण्यात अयशस्वी'; - @override - String get profileConfigCopied => 'प्रोफाइल कॉन्फिगरेशन कॉपी केले'; - @override - String get profileConfigCopyFailed => - 'प्रोफाइल कॉन्फिगरेशन कॉपी करण्यात अयशस्वी'; - @override - String get profileDeletedSuccessfully => 'प्रोफाइल हटवले'; - @override - String get profileDeletionFailed => 'प्रोफाइल हटवण्यात अयशस्वी'; - @override - String get profileDeleteConfirmation => 'खात्री करा'; - -// अहवाल - @override - String get reportsDate => 'तारीख'; - @override - String get reportsPending => 'प्रलंबित'; - @override - String get reportsCompleted => 'पूर्ण झाले'; - @override - String get reportsMonthYear => 'महिना-वर्ष'; - @override - String get reportsWeek => 'आठवडा'; - @override - String get reportsDay => 'दिवस'; - @override - String get reportsYear => 'वर्ष'; - @override - String get reportsError => 'त्रुटी'; - @override - String get reportsLoading => 'लोड करत आहे...'; - -// सेटिंग्ज - @override - String get settingsResetToDefault => 'मूळ सेटिंग्जवर पुनर्स्थित करा'; - @override - String get settingsAlreadyDefault => 'मूळ सेटिंग्जमध्ये आधीच आहेत'; - @override - String get settingsConfirmReset => - 'तुम्हाला सेटिंग्ज डिफॉल्टवर रीसेट करायच्या आहेत का?'; - @override - String get settingsNoButton => 'नाही'; - @override - String get settingsYesButton => 'होय'; - -// स्प्लॅश स्क्रीन - @override - String get splashSettingUpApp => "अ‍ॅप सेटअप करत आहे..."; - -// टूर - अहवाल - @override - String get tourReportsDaily => "येथे तुमचा दैनंदिन अहवाल पहा"; - @override - String get tourReportsWeekly => "येथे तुमचा साप्ताहिक अहवाल पहा"; - @override - String get tourReportsMonthly => "येथे तुमचा मासिक अहवाल पहा"; - -// टूर - प्रोफाइल - @override - String get tourProfileCurrent => "सध्याचे प्रोफाइल पहा"; - @override - String get tourProfileManage => "तुमचे प्रोफाइल व्यवस्थापित करा"; - @override - String get tourProfileAddNew => "नवीन प्रोफाइल जोडा"; - -// टूर - मुख्य पृष्ठ - @override - String get tourHomeAddTask => "नवीन कार्य जोडा"; - @override - String get tourHomeSearch => "कार्य शोधा"; - @override - String get tourHomeRefresh => "तुमची कार्ये रीफ्रेश किंवा समक्रमित करा"; - @override - String get tourHomeFilter => "कार्ये आणि प्रकल्प फिल्टर करा"; - @override - String get tourHomeMenu => "अतिरिक्त सेटिंग्ज पहा"; - -// टूर - कार्य तपशील - @override - String get tourDetailsDue => "हे कार्याची अंतिम मुदत दर्शवते"; - @override - String get tourDetailsPriority => "हे कार्याची प्राधान्यता दर्शवते"; - - @override - String get tourDetailsUntil => "ही कार्याची अंतिम तारीख दर्शवते"; - - @override - String get tourDetailsWait => - "ही कार्याची प्रतीक्षा तारीख दर्शवते \n हे कार्य या तारखेनंतर दिसेल"; - - @override - String get tourFilterProjects => "प्रकल्पांवर आधारित कार्य फिल्टर करा"; - - @override - String get tourFilterSort => - "निर्मिती वेळ, तातडी, मुदत, प्रारंभ तारीख इत्यादीवर आधारित कार्य क्रमवारी लावा"; - - @override - String get tourFilterStatus => "पूर्णता स्थितीनुसार कार्य फिल्टर करा"; - - @override - String get tourFilterTagUnion => - "AND आणि OR टॅग युनियन प्रकारांमध्ये टॉगल करा"; - - @override - String get tourTaskServerCertificate => - "येथे तुमच्या ईमेलसह नाव असलेली फाईल निवडा (उदा. <तुमचा ईमेल>.com.cert.pem)"; - - @override - String get tourTaskServerKey => - "येथे तुमच्या ईमेलसह नाव असलेली फाईल निवडा (उदा. <तुमचा ईमेल>.key.pem)"; - - @override - String get tourTaskServerRootCert => - "येथे letsencrypt_root_cert.pem नाव असलेली फाईल निवडा"; - - @override - String get tourTaskServerTaskRC => - "येथे taskrc नावाची फाईल निवडा किंवा तिची सामग्री पेस्ट करा"; - @override - String get descriprtionCannotBeEmpty => "वर्णन रिक्त असू शकत नाही"; - @override - String get enterTaskDescription => "कार्याचे वर्णन प्रविष्ट करा"; - @override - String get canNotHaveWhiteSpace => "रिक्त जागा असू शकत नाही"; - @override - String get high => "उच्च"; - @override - String get medium => "मध्यम"; - @override - String get low => "कमी"; - @override - String get priority => "प्राधान्य"; - @override - String get tagAlreadyExists => "टॅग आधीच अस्तित्वात आहे"; - @override - String get tagShouldNotContainSpaces => "टॅगमध्ये रिक्त जागा असू शकत नाही"; - @override - String get date => 'तारीख'; - @override - String get add => 'जोडा'; - @override - String get change => 'बदल'; - @override - String get dateCanNotBeInPast => "तारीख भूतकाळात असू शकत नाही"; - @override - String get configureTaskchampion => "Taskchampion कॉन्फिगर करा"; - @override - String get encryptionSecret => 'एन्क्रिप्शन गुपित'; - @override - String get ccsyncBackendUrl => 'CCSync बॅकएंड URL'; - @override - String get ccsyncClientId => 'क्लायंट आयडी'; - @override - String get success => 'यशस्वी'; - @override - String get credentialsSavedSuccessfully => - 'क्रेडेन्शियल्स यशस्वीरित्या जतन केले'; - @override - String get tip => - "टीप: तुमची क्रेडेन्शियल्स मिळवण्यासाठी वरच्या उजव्या कोपऱ्यातील माहिती चिन्हावर क्लिक करा"; - @override - String get logs => 'लॉग्ज'; - @override - String get checkAllDebugLogsHere => 'येथे सर्व डीबग लॉग्ज तपासा'; -} diff --git a/lib/app/utils/language/sentence_manager.dart b/lib/app/utils/language/sentence_manager.dart deleted file mode 100644 index 4a8a10a3..00000000 --- a/lib/app/utils/language/sentence_manager.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:taskwarrior/app/utils/language/english_sentences.dart'; -import 'package:taskwarrior/app/utils/language/hindi_sentences.dart'; -import 'package:taskwarrior/app/utils/language/marathi_sentences.dart'; -import 'package:taskwarrior/app/utils/language/french_sentences.dart'; -import 'package:taskwarrior/app/utils/language/spanish_sentences.dart'; -import 'package:taskwarrior/app/utils/language/bengali_sentences.dart'; -import 'package:taskwarrior/app/utils/language/sentences.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; - -class SentenceManager { - final SupportedLanguage currentLanguage; - - SentenceManager({required this.currentLanguage}); - - Sentences get sentences { - switch (currentLanguage) { - case SupportedLanguage.hindi: - return HindiSentences(); - case SupportedLanguage.marathi: - return MarathiSentences(); - case SupportedLanguage.french: - return FrenchSentences(); - case SupportedLanguage.spanish: - return SpanishSentences(); - case SupportedLanguage.bengali: - return BengaliSentences(); - case SupportedLanguage.english: - default: - return EnglishSentences(); - } - } -} diff --git a/lib/app/utils/language/sentences.dart b/lib/app/utils/language/sentences.dart deleted file mode 100644 index 57f881d5..00000000 --- a/lib/app/utils/language/sentences.dart +++ /dev/null @@ -1,345 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart'; - -abstract class Sentences { - String get helloWorld; - - String get homePageTitle; - String get homePageLastModified; - String get homePageDue; - String get homePageTaskWarriorNotConfigured; - String get homePageSetup; - String get homePageFilter; - String get homePageMenu; - String get homePageExitApp; - String get homePageAreYouSureYouWantToExit; - String get homePageExit; - String get homePageCancel; - String get homePageClickOnTheBottomRightButtonToStartAddingTasks; - String get homePageSearchNotFound; - String get homePageFetchingTasks; - - // app bar tooltips - String get homePageSearchTooltip; - String get homePageCancelSearchTooltip; - - // floating action button & home page texts - String get homePageAddTaskTooltip; - String get homePageTapBackToExit; - String get homePageSearchHint; - - String get settingsPageTitle; - String get settingsPageSubtitle; - String get settingsPageMovingDataToNewDirectory; - String get settingsPageChangeDirectory; - String get settingsPageSetToDefault; - - String get settingsPageSyncOnStartTitle; - String get settingsPageSyncOnStartDescription; - - String get settingsPageEnableSyncOnTaskCreateTitle; - String get settingsPageEnableSyncOnTaskCreateDescription; - - String get settingsPageHighlightTaskTitle; - String get settingsPageHighlightTaskDescription; - - String get settingsPageEnable24hrFormatTitle; - String get settingsPageEnable24hrFormatDescription; - - String get taskchampionTileTitle; - String get taskchampionTileDescription; - - String get settingsPageSelectLanguage; - String get settingsPageToggleNativeLanguage; - - String get settingsPageSelectDirectoryTitle; - String get settingsPageSelectDirectoryDescription; - - String get navDrawerProfile; - String get navDrawerReports; - String get navDrawerAbout; - String get navDrawerSettings; - String get ccsyncCredentials; - String get deleteTaskTitle; - String get deleteTaskConfirmation; - String get deleteTaskWarning; - String get navDrawerExit; - String get navDrawerConfirm; - - String get detailPageDescription; - String get detailPageStatus; - String get detailPageEntry; - String get detailPageModified; - String get detailPageStart; - String get detailPageEnd; - String get detailPageDue; - String get detailPageWait; - String get detailPageUntil; - String get detailPagePriority; - String get detailPageProject; - String get detailPageTags; - String get detailPageUrgency; - String get detailPageID; - - String get filterDrawerApplyFilters; - String get filterDrawerHideWaiting; - String get filterDrawerShowWaiting; - String get filterDrawerPending; - String get filterDrawerCompleted; - String get filterDrawerFilterTagBy; - String get filterDrawerAND; - String get filterDrawerOR; - String get filterDrawerSortBy; - String get filterDrawerCreated; - String get filterDrawerModified; - String get filterDrawerStartTime; - String get filterDrawerDueTill; - String get filterDrawerPriority; - String get filterDrawerProject; - String get filterDrawerTags; - String get filterDrawerUrgency; - String get filterDrawerResetSort; - String get filterDrawerStatus; - String get filterDrawerNoProjectsAvailable; - - String get reportsPageTitle; - String get reportsPageCompleted; - String get reportsPagePending; - String get reportsPageTasks; - - String get reportsPageDaily; - String get reportsPageDailyBurnDownChart; - String get reportsPageDailyDayMonth; - - String get reportsPageWeekly; - String get reportsPageWeeklyBurnDownChart; - String get reportsPageWeeklyWeeksYear; - - String get reportsPageMonthly; - String get reportsPageMonthlyBurnDownChart; - String get reportsPageMonthlyMonthYear; - - String get reportsPageNoTasksFound; - String get reportsPageAddTasksToSeeReports; - - String get profilePageProfile; - String get profilePageProfiles; - String get profilePageCurrentProfile; - String get profilePageManageSelectedProfile; - String get profilePageRenameAlias; - String get profilePageConfigureTaskserver; - String get profilePageExportTasks; - String get profilePageCopyConfigToNewProfile; - String get profilePageDeleteProfile; - String get profilePageAddNewProfile; - - String get profilePageExportTasksDialogueTitle; - String get profilePageExportTasksDialogueSubtitle; - - String get profilePageRenameAliasDialogueBoxTitle; - String get profilePageRenameAliasDialogueBoxNewAlias; - String get profilePageRenameAliasDialogueBoxCancel; - String get profilePageRenameAliasDialogueBoxSubmit; - - String get manageTaskServerPageConfigureTaskserver; - String get manageTaskServerPageConfigureTASKRC; - String get manageTaskServerPageSetTaskRC; - String get manageTaskServerPageConfigureYourCertificate; - String get manageTaskServerPageSelectCertificate; - String get manageTaskServerPageConfigureTaskserverKey; - String get manageTaskServerPageSelectKey; - String get manageTaskServerPageConfigureServerCertificate; - String get manageTaskServerPageTaskRCFileIsVerified; - - String get manageTaskServerPageConfigureTaskRCDialogueBoxTitle; - String get manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle; - String get manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText; - String get manageTaskServerPageConfigureTaskRCDialogueBoxOr; - String get manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC; - - String get addTaskTitle; - String get addTaskEnterTask; - String get addTaskDue; - String get addTaskSelectDueDate; - String get addTaskPriority; - String get addTaskAddTags; - String get addTaskCancel; - String get addTaskAdd; - String get addTaskTimeInPast; - String get addTaskFieldCannotBeEmpty; - String get addTaskTaskAddedSuccessfully; - - String get aboutPageGitHubLink; - String get aboutPageProjectDescription; - String get aboutPageAppBarTitle; - - // about page - String get version; - String get package; - - // date time picker - String get notSelected; - String get cantSetTimeinPast; - - //description widget - String get editDescription; - String get editProject; - String get cancel; - String get submit; - - //detail view - String get saveChangesConfirmation; - String get yes; - String get no; - String get reviewChanges; - String get oldChanges; - String get newChanges; - - //tags widget - String get tags; - String get addedTagsWillAppearHere; - String get addTag; - - String get enterProject; - - String get allProjects; - String get noProjectsFound; - String get project; - - String get select; - String get save; - String get dontSave; - String get unsavedChanges; - String get unsavedChangesWarning; - String get enterNew; - String get edit; - String get task; - - // task action strings - String get confirmDeleteTask; - String get taskUpdated; - String get undo; - String get taskMarkedAsCompleted; - String get taskMarkedAsDeleted; - String get refreshToViewChanges; - String get clickOnBottomRightButtonToStartAddingTasks; - String get complete; - String get delete; - - // task server management strings - String get taskServerInfo; - String get taskServerCredentials; - String get notConfigured; - String get fetchingStatistics; - String get pleaseWait; - String get statistics; - String get ok; - String get pleaseSetupTaskServer; - - // onboarding strings - String get onboardingSkip; - String get onboardingNext; - String get onboardingStart; - - // permission strings - String get permissionPageTitle; - String get storagePermissionTitle; - String get storagePermissionDescription; - String get notificationPermissionTitle; - String get notificationPermissionDescription; - String get privacyStatement; - String get grantPermissions; - String get managePermissionsLater; - - // Profile page strings - String get profileAllProfiles; - String get profileSwitchedToProfile; - String get profileAddedSuccessfully; - String get profileAdditionFailed; - String get profileConfigCopied; - String get profileConfigCopyFailed; - String get profileDeletedSuccessfully; - String get profileDeletionFailed; - String get profileDeleteConfirmation; - - // Reports strings - String get reportsDate; - String get reportsPending; - String get reportsCompleted; - String get reportsMonthYear; - String get reportsWeek; - String get reportsDay; - String get reportsYear; - String get reportsError; - String get reportsLoading; - - // Settings strings - String get settingsResetToDefault; - String get settingsAlreadyDefault; - String get settingsConfirmReset; - String get settingsNoButton; - String get settingsYesButton; - String get logs; - String get checkAllDebugLogsHere; - - // Splash screen strings - String get splashSettingUpApp; - - // Tour strings - reports - String get tourReportsDaily; - String get tourReportsWeekly; - String get tourReportsMonthly; - - // Tour strings - profile - String get tourProfileCurrent; - String get tourProfileManage; - String get tourProfileAddNew; - - // Tour strings - task server - String get tourTaskServerTaskRC; - String get tourTaskServerCertificate; - String get tourTaskServerKey; - String get tourTaskServerRootCert; - - // Tour strings - home page - String get tourHomeAddTask; - String get tourHomeSearch; - String get tourHomeRefresh; - String get tourHomeFilter; - String get tourHomeMenu; - - // Tour strings - filter drawer - String get tourFilterStatus; - String get tourFilterProjects; - String get tourFilterTagUnion; - String get tourFilterSort; - - // Tour strings - details page - String get tourDetailsDue; - String get tourDetailsWait; - String get tourDetailsUntil; - String get tourDetailsPriority; - - // Dialogue for adding new task - String get descriprtionCannotBeEmpty; - String get enterTaskDescription; - String get canNotHaveWhiteSpace; - String get high; - String get medium; - String get low; - String get priority; - String get tagAlreadyExists; - String get tagShouldNotContainSpaces; - String get date; - String get add; - String get change; - String get dateCanNotBeInPast; - // ccsync credentials page - String get configureTaskchampion; - String get encryptionSecret; - String get ccsyncBackendUrl; - String get ccsyncClientId; - String get success; - String get credentialsSavedSuccessfully; - String get tip; -} diff --git a/lib/app/utils/language/spanish_sentences.dart b/lib/app/utils/language/spanish_sentences.dart deleted file mode 100644 index e45c1e6d..00000000 --- a/lib/app/utils/language/spanish_sentences.dart +++ /dev/null @@ -1,658 +0,0 @@ -import 'package:taskwarrior/app/utils/language/sentences.dart'; - -class SpanishSentences extends Sentences { - @override - String get helloWorld => '¡Hola, mundo!'; - @override - String get homePageTitle => 'Página de inicio'; - @override - String get homePageLastModified => 'Última modificación'; - @override - String get homePageDue => 'Vencimiento'; - @override - String get homePageTaskWarriorNotConfigured => 'TaskServer no configurado'; - @override - String get homePageSetup => 'Configuración'; - @override - String get homePageFilter => 'Filtro'; - @override - String get homePageMenu => 'Menú'; - @override - String get homePageExitApp => 'Salir de la aplicación'; - @override - String get homePageAreYouSureYouWantToExit => - '¿Estás seguro de que quieres salir de la aplicación?'; - @override - String get homePageExit => 'Salir'; - @override - String get homePageCancel => 'Cancelar'; - @override - String get homePageClickOnTheBottomRightButtonToStartAddingTasks => - 'Haz clic en el botón en la parte inferior derecha para comenzar a agregar tareas'; - @override - String get homePageSearchNotFound => - 'No se encontraron resultados para la búsqueda'; - @override - String get homePageFetchingTasks => 'Obteniendo tareas'; - @override - String get settingsPageTitle => 'Página de configuración'; - @override - String get settingsPageSubtitle => 'Configura tus preferencias'; - @override - String get settingsPageMovingDataToNewDirectory => - 'Moviendo datos a un nuevo directorio'; - @override - String get settingsPageSyncOnStartTitle => - 'Sincronizar datos automáticamente al inicio'; - @override - String get settingsPageSyncOnStartDescription => 'Sincronizar al iniciar'; - @override - String get settingsPageEnableSyncOnTaskCreateTitle => - 'Habilitar sincronización automática al crear nuevas tareas'; - @override - String get settingsPageEnableSyncOnTaskCreateDescription => - 'Habilitar sincronización automática al crear nuevas tareas'; - @override - String get settingsPageHighlightTaskTitle => 'Resaltar tareas urgentes'; - @override - String get settingsPageHighlightTaskDescription => - 'Resaltar tareas que vencen en 1 día o están vencidas'; - @override - String get settingsPageEnable24hrFormatTitle => - 'Habilitar formato de 24 horas'; - @override - String get settingsPageEnable24hrFormatDescription => - 'Habilitar formato de 24 horas'; - @override - String get settingsPageSelectLanguage => 'Seleccionar idioma'; - @override - String get settingsPageToggleNativeLanguage => - 'Alternar entre idiomas nativos'; - @override - String get settingsPageSelectDirectoryTitle => 'Seleccionar directorio'; - @override - String get settingsPageSelectDirectoryDescription => - 'Selecciona el directorio donde se almacenan los datos de Taskwarrior\nDirectorio actual: '; - @override - String get settingsPageChangeDirectory => 'Cambiar directorio'; - @override - String get settingsPageSetToDefault => 'Restablecer a predeterminado'; - @override - String get navDrawerProfile => 'Perfil'; - @override - String get navDrawerReports => 'Informes'; - @override - String get navDrawerAbout => 'Acerca de'; - @override - String get navDrawerSettings => 'Configuración'; - @override - String get navDrawerExit => 'Salir'; - - @override - String get detailPageDescription => 'Descripción'; - @override - String get detailPageStatus => 'Estado'; - @override - String get detailPageEntry => 'Entrada'; - @override - String get detailPageModified => 'Modificado'; - @override - String get detailPageStart => 'Inicio'; - @override - String get detailPageEnd => 'Fin'; - @override - String get detailPageDue => 'Vencimiento'; - @override - String get detailPageWait => 'Esperar'; - @override - String get detailPageUntil => 'Hasta'; - @override - String get detailPagePriority => 'Prioridad'; - @override - String get detailPageProject => 'Proyecto'; - @override - String get detailPageTags => 'Etiquetas'; - @override - String get detailPageUrgency => 'Urgencia'; - @override - String get detailPageID => 'ID'; - - @override - String get filterDrawerApplyFilters => 'Aplicar filtros'; - @override - String get filterDrawerHideWaiting => 'Ocultar pendientes'; - @override - String get filterDrawerShowWaiting => 'Mostrar pendientes'; - @override - String get filterDrawerPending => 'Pendiente'; - @override - String get filterDrawerCompleted => 'Completado'; - @override - String get filterDrawerFilterTagBy => 'Filtrar por etiqueta'; - @override - String get filterDrawerAND => 'y'; - @override - String get filterDrawerOR => 'o'; - @override - String get filterDrawerSortBy => 'Ordenar por'; - @override - String get filterDrawerCreated => 'Creado'; - @override - String get filterDrawerModified => 'Modificado'; - @override - String get filterDrawerStartTime => 'Hora de inicio'; - @override - String get filterDrawerDueTill => 'Hasta vencimiento'; - @override - String get filterDrawerPriority => 'Prioridad'; - @override - String get filterDrawerProject => 'Proyecto'; - @override - String get filterDrawerTags => 'Etiquetas'; - @override - String get filterDrawerUrgency => 'Urgencia'; - @override - String get filterDrawerResetSort => 'Restablecer orden'; - @override - String get filterDrawerStatus => 'Estado'; - @override - String get reportsPageTitle => 'Informes'; - @override - String get reportsPageCompleted => 'Completado'; - @override - String get reportsPagePending => 'Pendiente'; - @override - String get reportsPageTasks => 'Tareas'; - - @override - String get reportsPageDaily => 'Diario'; - @override - String get reportsPageDailyBurnDownChart => 'Gráfico de quema diario'; - @override - String get reportsPageDailyDayMonth => 'Día - Mes'; - - @override - String get reportsPageWeekly => 'Semanal'; - @override - String get reportsPageWeeklyBurnDownChart => 'Gráfico de quema semanal'; - @override - String get reportsPageWeeklyWeeksYear => 'Semana - Año'; - - @override - String get reportsPageMonthly => 'Mensual'; - @override - String get reportsPageMonthlyBurnDownChart => 'Gráfico de quema mensual'; - @override - String get reportsPageMonthlyMonthYear => 'Mes - Año'; - - @override - String get reportsPageNoTasksFound => 'No se encontraron tareas'; - @override - String get reportsPageAddTasksToSeeReports => - 'Agrega tareas para ver informes'; - - @override - String get taskchampionTileDescription => - 'Cambia la sincronización de Taskwarrior al servidor de sincronización CCSync o Taskchampion'; - - @override - String get taskchampionTileTitle => 'Sincronización Taskchampion'; - - @override - String get ccsyncCredentials => 'Credenciales de CCSync'; - - @override - String get deleteTaskConfirmation => 'Eliminar tarea'; - - @override - String get deleteTaskTitle => '¿Eliminar todas las tareas?'; - - @override - String get deleteTaskWarning => - 'Esta acción es irreversible y eliminará todas las tareas almacenadas localmente.'; - - @override - String get profilePageProfile => 'Perfil'; - @override - String get profilePageProfiles => 'Perfiles'; - @override - String get profilePageCurrentProfile => 'Perfil actual'; - @override - String get profilePageManageSelectedProfile => - 'Gestionar perfil seleccionado'; - @override - String get profilePageRenameAlias => 'Renombrar alias'; - - @override - String get profilePageConfigureTaskserver => 'Configurar servidor de tareas'; - @override - String get profilePageExportTasks => 'Exportar tareas'; - @override - String get profilePageCopyConfigToNewProfile => - 'Copiar configuración a un nuevo perfil'; - @override - String get profilePageDeleteProfile => 'Eliminar perfil'; - @override - String get profilePageAddNewProfile => 'Agregar nuevo perfil'; - - @override - String get profilePageRenameAliasDialogueBoxTitle => 'Renombrar alias'; - @override - String get profilePageRenameAliasDialogueBoxNewAlias => 'Nuevo alias'; - @override - String get profilePageRenameAliasDialogueBoxCancel => 'Cancelar'; - @override - String get profilePageRenameAliasDialogueBoxSubmit => 'Enviar'; - - @override - String get profilePageExportTasksDialogueTitle => 'Formato de exportación'; - @override - String get profilePageExportTasksDialogueSubtitle => - 'Selecciona el formato de exportación'; - - @override - String get manageTaskServerPageConfigureTaskserver => - 'Configurar servidor de tareas'; - @override - String get manageTaskServerPageConfigureTASKRC => 'Configurar TASKRC'; - @override - String get manageTaskServerPageSetTaskRC => 'Establecer TaskRC'; - @override - String get manageTaskServerPageConfigureYourCertificate => - 'Configura tu certificado'; - @override - String get manageTaskServerPageSelectCertificate => 'Seleccionar certificado'; - @override - String get manageTaskServerPageConfigureTaskserverKey => - 'Configurar clave del servidor de tareas'; - @override - String get manageTaskServerPageSelectKey => 'Seleccionar clave'; - @override - String get manageTaskServerPageConfigureServerCertificate => - 'Configurar certificado del servidor'; - @override - String get manageTaskServerPageTaskRCFileIsVerified => - 'El archivo Task RC ha sido verificado'; - - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxTitle => - 'Configurar TaskRC'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle => - 'Pega el contenido de TaskRC o selecciona un archivo taskrc'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText => - 'Pega tu contenido TaskRC aquí'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxOr => 'o'; - @override - String get manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC => - 'Seleccionar archivo TaskRC'; - - @override - String get addTaskTitle => "Agregar tarea"; - @override - String get addTaskEnterTask => "Ingresar tarea"; - @override - String get addTaskDue => "Vencimiento"; - @override - String get addTaskSelectDueDate => "Seleccionar fecha de vencimiento"; - @override - String get addTaskPriority => "Prioridad"; - @override - String get addTaskAddTags => "Agregar etiquetas"; - @override - String get addTaskCancel => "Cancelar"; - @override - String get addTaskAdd => "Agregar"; - @override - String get addTaskTimeInPast => "La hora seleccionada está en el pasado."; - @override - String get addTaskFieldCannotBeEmpty => "¡No puedes dejar este campo vacío!"; - @override - String get addTaskTaskAddedSuccessfully => - "Tarea añadida con éxito. Toca para editar"; - - @override - String get aboutPageGitHubLink => - "¿Desea mejorar este proyecto? Visite nuestro repositorio en GitHub."; - @override - String get aboutPageProjectDescription => - "Este proyecto tiene como objetivo construir una aplicación para Taskwarrior. Es su aplicación de gestión de tareas en todas las plataformas. Le ayuda a gestionar sus tareas y a filtrarlas según sus necesidades."; - @override - String get aboutPageAppBarTitle => "Acerca de"; - - @override - String get homePageSearchTooltip => 'Buscar'; - @override - String get homePageCancelSearchTooltip => 'Cancelar'; - @override - String get homePageAddTaskTooltip => 'Agregar tarea'; - @override - String get homePageTapBackToExit => 'Toca atrás nuevamente para salir'; - @override - String get homePageSearchHint => 'Buscar'; - - @override - String get navDrawerConfirm => 'Confirmar'; - - @override - String get filterDrawerNoProjectsAvailable => 'No hay proyectos disponibles.'; - - @override - String get version => "Versión"; - @override - String get package => "Paquete"; - - @override - String get notSelected => "No seleccionado"; - @override - String get cantSetTimeinPast => - "No se pueden establecer horarios en el pasado"; - - @override - String get editDescription => "Editar descripción"; - @override - String get editProject => "Editar proyecto"; - @override - String get cancel => "Cancelar"; - @override - String get submit => "Enviar"; - - @override - String get saveChangesConfirmation => '¿Quieres guardar los cambios?'; - @override - String get yes => 'Sí'; - @override - String get no => 'No'; - @override - String get reviewChanges => 'Revisar cambios'; - @override - String get oldChanges => 'Antiguo'; - @override - String get newChanges => 'Nuevo'; - - @override - String get tags => 'Etiquetas'; - @override - String get addedTagsWillAppearHere => - 'Las etiquetas añadidas aparecerán aquí'; - @override - String get addTag => 'Agregar etiqueta'; - - @override - String get enterProject => 'Ingresar proyecto'; - @override - String get allProjects => 'Todos los proyectos'; - @override - String get noProjectsFound => 'No se encontraron proyectos'; - @override - String get project => 'Proyecto'; - - @override - String get select => 'Seleccionar'; - @override - String get save => 'Guardar'; - @override - String get dontSave => 'No guardar'; - @override - String get unsavedChanges => 'Cambios no guardados'; - @override - String get unsavedChangesWarning => - 'Tienes cambios no guardados. ¿Qué deseas hacer?'; - @override - String get enterNew => 'Ingresar nuevo'; - @override - String get edit => 'Editar'; - @override - String get task => 'Tarea'; - -// task action strings - @override - String get confirmDeleteTask => 'Confirmar eliminación'; - @override - String get taskUpdated => 'Tarea actualizada'; - @override - String get undo => 'Deshacer'; - @override - String get taskMarkedAsCompleted => - 'Tarea marcada como completada. ¡Actualiza para ver los cambios!'; - @override - String get taskMarkedAsDeleted => - 'Tarea marcada como eliminada. ¡Actualiza para ver los cambios!'; - @override - String get refreshToViewChanges => 'Actualizar para ver cambios'; - @override - String get clickOnBottomRightButtonToStartAddingTasks => - 'Haz clic en el botón inferior derecho para comenzar a agregar tareas'; - @override - String get complete => 'COMPLETADO'; - @override - String get delete => 'ELIMINAR'; - -// task server management strings - @override - String get taskServerInfo => 'Información del servidor TaskD'; - @override - String get taskServerCredentials => 'Credenciales del servidor TaskD'; - @override - String get notConfigured => 'No configurado'; - @override - String get fetchingStatistics => 'Obteniendo estadísticas...'; - @override - String get pleaseWait => 'Por favor, espera...'; - @override - String get statistics => 'Estadísticas:'; - @override - String get ok => 'Ok'; - @override - String get pleaseSetupTaskServer => 'Por favor, configura tu servidor TaskD.'; - -// onboarding strings - @override - String get onboardingSkip => 'Omitir'; - @override - String get onboardingNext => 'Siguiente'; - @override - String get onboardingStart => 'Comenzar'; - -// permission strings - @override - String get permissionPageTitle => 'Por qué necesitamos tu permiso'; - @override - String get storagePermissionTitle => 'Permiso de almacenamiento'; - @override - String get storagePermissionDescription => - 'Utilizamos el acceso al almacenamiento para guardar tus tareas, ' - 'preferencias y datos de la aplicación de forma segura en tu dispositivo. ' - 'Esto garantiza que puedas continuar donde lo dejaste, incluso sin conexión.'; - @override - String get notificationPermissionTitle => 'Permiso de notificaciones'; - @override - String get notificationPermissionDescription => - 'Las notificaciones te mantienen al tanto de recordatorios importantes ' - 'y actualizaciones, asegurando que gestiones tus tareas sin esfuerzo.'; - @override - String get privacyStatement => - 'Tu privacidad es nuestra máxima prioridad. Nunca accedemos ni compartimos ' - 'tus archivos o datos personales sin tu consentimiento.'; - @override - String get grantPermissions => 'Conceder permisos'; - @override - String get managePermissionsLater => - 'Puedes administrar tus permisos más tarde en Configuración'; - -// Profile page strings - @override - String get profileAllProfiles => 'Todos los perfiles:'; - @override - String get profileSwitchedToProfile => 'Cambiado al perfil'; - @override - String get profileAddedSuccessfully => 'Perfil agregado con éxito'; - @override - String get profileAdditionFailed => 'Error al agregar perfil'; - @override - String get profileConfigCopied => 'Configuración del perfil copiada'; - @override - String get profileConfigCopyFailed => - 'Error al copiar la configuración del perfil'; - @override - String get profileDeletedSuccessfully => 'Eliminado con éxito'; - @override - String get profileDeletionFailed => 'Error al eliminar'; - @override - String get profileDeleteConfirmation => 'Confirmar'; - -// Reports strings - @override - String get reportsDate => 'Fecha'; - @override - String get reportsPending => 'Pendiente'; - @override - String get reportsCompleted => 'Completado'; - @override - String get reportsMonthYear => 'Mes-Año'; - @override - String get reportsWeek => 'Semana'; - @override - String get reportsDay => 'Día'; - @override - String get reportsYear => 'Año'; - @override - String get reportsError => 'Error'; - @override - String get reportsLoading => 'Cargando...'; - -// Settings strings - @override - String get settingsResetToDefault => 'Restablecer a predeterminado'; - @override - String get settingsAlreadyDefault => 'Ya está predeterminado'; - @override - String get settingsConfirmReset => - '¿Estás seguro de que deseas restablecer el directorio a los valores predeterminados?'; - @override - String get settingsNoButton => 'No'; - @override - String get settingsYesButton => 'Sí'; - -// Splash screen strings - @override - String get splashSettingUpApp => "Configurando la aplicación..."; - -// Tour strings - reports - @override - String get tourReportsDaily => "Accede a tu informe de tareas diarias aquí"; - @override - String get tourReportsWeekly => "Accede a tus informes semanales aquí"; - @override - String get tourReportsMonthly => "Accede a tus informes mensuales aquí"; - -// Tour strings - profile - @override - String get tourProfileCurrent => "Consulta tu perfil actual aquí"; - @override - String get tourProfileManage => "Administra tu perfil actual aquí"; - @override - String get tourProfileAddNew => "Agrega un nuevo perfil aquí"; - -// Tour strings - task server - @override - String get tourTaskServerTaskRC => - "Selecciona el archivo llamado taskrc aquí o pega su contenido"; - @override - String get tourTaskServerCertificate => - "Selecciona un archivo con un nombre similar a .com.cert.pem aquí"; - @override - String get tourTaskServerKey => - "Selecciona un archivo con un nombre similar a .key.pem aquí"; - @override - String get tourTaskServerRootCert => - "Selecciona un archivo con un nombre similar a letsencrypt_root_cert.pem aquí"; - -// Tour strings - home page - @override - String get tourHomeAddTask => "Agregar una nueva tarea"; - @override - String get tourHomeSearch => "Buscar tareas"; - @override - String get tourHomeRefresh => "Actualizar o sincronizar tus tareas"; - @override - String get tourHomeFilter => - "Agregar filtros para ordenar tus tareas y proyectos"; - @override - String get tourHomeMenu => "Acceder a configuraciones adicionales aquí"; - -// Tour strings - filter drawer - @override - String get tourFilterStatus => - "Filtrar tareas según su estado de finalización"; - @override - String get tourFilterProjects => "Filtrar tareas según los proyectos"; - @override - String get tourFilterTagUnion => - "Alternar entre los tipos de unión de etiquetas AND y OR"; - @override - String get tourFilterSort => - "Ordenar tareas según el tiempo de creación, urgencia, fecha de vencimiento, fecha de inicio, etc."; - -// Tour strings - details page - @override - String get tourDetailsDue => - "Esto indica la fecha de vencimiento de la tarea"; - @override - String get tourDetailsWait => - "Esto indica la fecha de espera de la tarea\nLa tarea será visible después de esta fecha"; - @override - String get tourDetailsUntil => "Esto muestra la última fecha de la tarea"; - @override - String get tourDetailsPriority => - "Esta es la prioridad de las tareas\nL -> Baja\nM -> Media\nH -> Alta"; - @override - String get descriprtionCannotBeEmpty => "La descripción no puede estar vacía"; - @override - String get enterTaskDescription => "Ingresar descripción de la tarea"; - @override - String get canNotHaveWhiteSpace => "No puede tener espacios en blanco"; - @override - String get high => "Alta"; - @override - String get medium => "Media"; - @override - String get low => "Baja"; - @override - String get priority => "Prioridad"; - @override - String get tagAlreadyExists => "¡La etiqueta ya existe!"; - @override - String get tagShouldNotContainSpaces => - "¡La etiqueta no debe contener espacios!"; - @override - String get date => "Fecha"; - @override - String get add => "Agregar"; - @override - String get change => "Cambiar"; - @override - String get dateCanNotBeInPast => "La fecha no puede estar en el pasado"; - @override - String get configureTaskchampion => "Configurar Taskchampion"; - @override - String get encryptionSecret => 'Secreto de cifrado'; - @override - String get ccsyncBackendUrl => 'URL del backend de CCSync'; - @override - String get ccsyncClientId => 'ID de cliente'; - @override - String get success => 'Éxito'; - @override - String get credentialsSavedSuccessfully => 'Credenciales guardadas con éxito'; - @override - String get tip => - "Consejo: Haz clic en el ícono de información en la esquina superior derecha para obtener tus credenciales"; - @override - String get logs => 'Registros'; - @override - String get checkAllDebugLogsHere => - 'Consulta todos los registros de depuración aquí'; -} diff --git a/lib/app/utils/language/supported_language.dart b/lib/app/utils/language/supported_language.dart deleted file mode 100644 index 404f9553..00000000 --- a/lib/app/utils/language/supported_language.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:flutter/widgets.dart'; - -enum SupportedLanguage { - english, - hindi, - marathi, - french, - spanish, - bengali, -} - -extension SupportedLanguageExtension on SupportedLanguage { - String get languageCode { - switch (this) { - case SupportedLanguage.english: - return 'en'; - case SupportedLanguage.hindi: - return 'hi'; - case SupportedLanguage.marathi: - return 'mr'; - case SupportedLanguage.french: - return 'fr'; - case SupportedLanguage.spanish: - return 'es'; - case SupportedLanguage.bengali: - return 'bn'; - default: - return ''; - } - } - - static SupportedLanguage? fromCode(String? code) { - switch (code) { - case 'en': - return SupportedLanguage.english; - case 'hi': - return SupportedLanguage.hindi; - case 'mr': - return SupportedLanguage.marathi; - case 'fr': - return SupportedLanguage.french; - case 'es': - return SupportedLanguage.spanish; - case 'bn': - return SupportedLanguage.bengali; - default: - return null; - } - } - - static SupportedLanguage getSystemLanguage() { - // Get the current system locale - final String systemLocale = - WidgetsBinding.instance.window.locale.languageCode; - debugPrint('System Locale: $systemLocale'); - - final supportedLanguage = fromCode(systemLocale); - // Return the supported language or default to English - return supportedLanguage ?? SupportedLanguage.english; - } -} diff --git a/lib/app/utils/permissions/permissions_manager.dart b/lib/app/utils/permissions/permissions_manager.dart deleted file mode 100644 index d137a3da..00000000 --- a/lib/app/utils/permissions/permissions_manager.dart +++ /dev/null @@ -1,27 +0,0 @@ -// ignore_for_file: avoid_print - -import 'package:permission_handler/permission_handler.dart'; -import 'package:taskwarrior/app/utils/constants/permissions.dart'; - -class PermissionsManager { - static Future requestAllPermissions() async { - try { - for (var permission in permissions) { - final status = await _requestPermission(permission); - - if (status) { - print("Permission '${permission.toString().split('.').last}' granted."); - } else { - print("Permission '${permission.toString().split('.').last}' denied."); - } - } - } catch (e) { - print("Error requesting permissions: $e"); - } - } - - static Future _requestPermission(Permission permission) async { - final status = await permission.request(); - return status.isGranted; - } -} \ No newline at end of file diff --git a/lib/app/utils/taskc/impl/codec.dart b/lib/app/utils/taskc/impl/codec.dart deleted file mode 100644 index d05b0239..00000000 --- a/lib/app/utils/taskc/impl/codec.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'dart:convert'; -import 'dart:math'; -import 'dart:typed_data'; - -// ignore: avoid_classes_with_only_static_members -class Codec { - static int fold(Iterable bytes) => - bytes.reduce((x, y) => x * pow(2, 8) + y as int); - - static Iterable unfold(int n) => [ - for (var i in [3, 2, 1, 0]) (n ~/ pow(256, i)) % 256 - ]; - - static String decode(Uint8List bytes) { - assert(fold(bytes.take(4)) == bytes.length, - 'ensure first four bytes represent the length of the message'); - return utf8.decode(bytes.sublist(4)); - } - - static Uint8List encode(String string) { - var utf8Encoded = utf8.encode(string); - var byteLength = utf8Encoded.length + 4; - return Uint8List.fromList( - unfold(byteLength).followedBy(utf8Encoded).toList()); - } -} diff --git a/lib/app/utils/taskc/impl/message.dart b/lib/app/utils/taskc/impl/message.dart deleted file mode 100644 index e70e899a..00000000 --- a/lib/app/utils/taskc/impl/message.dart +++ /dev/null @@ -1,24 +0,0 @@ -// ignore_for_file: always_put_required_named_parameters_first - -import 'dart:convert'; - -class TaskserverResponseException implements Exception { - TaskserverResponseException(this.header); - - final Map header; - - @override - String toString() => - 'response.header = ${const JsonEncoder.withIndent(' ').convert(header)}'; -} - -class EmptyResponseException implements Exception { - @override - String toString() => 'The server returned an empty response. ' - 'Please review the server logs or contact administrator.\n' - '\n' - 'This may be an issue with the triple:\n' - '- taskd.certificate\n' - '- taskd.key\n' - '- \$TASKDDATA/ca.cert.pem'; -} diff --git a/lib/app/utils/taskc/message.dart b/lib/app/utils/taskc/message.dart deleted file mode 100644 index d492e485..00000000 --- a/lib/app/utils/taskc/message.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:taskwarrior/app/utils/taskserver/credentials.dart'; - -String message({ - String? client, - // ignore: always_put_required_named_parameters_first - required String type, - Credentials? credentials, - String? payload, -}) { - return ''' -${(client != null) ? 'client: $client\n' : ''}type: $type -org: ${credentials?.org ?? ''} -user: ${credentials?.user ?? ''} -key: ${credentials?.key ?? ''} -protocol: v1 - -$payload'''; -} diff --git a/lib/app/utils/taskc/payload.dart b/lib/app/utils/taskc/payload.dart deleted file mode 100644 index 348a874c..00000000 --- a/lib/app/utils/taskc/payload.dart +++ /dev/null @@ -1,18 +0,0 @@ -class Payload { - Payload({required this.tasks, this.userKey}); - - factory Payload.fromString(String string) { - var lines = string.trim().split('\n'); - var userKey = lines.removeLast(); - return Payload( - tasks: lines, - userKey: userKey, - ); - } - - final List tasks; - final String? userKey; - - @override - String toString() => tasks.followedBy([userKey ?? '']).join('\n').trim(); -} diff --git a/lib/app/utils/taskc/response.dart b/lib/app/utils/taskc/response.dart deleted file mode 100644 index 5e5edf7e..00000000 --- a/lib/app/utils/taskc/response.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:taskwarrior/app/utils/taskc/payload.dart'; - -class Response { - Response({required this.header, required this.payload}); - - factory Response.fromString(String string) { - var firstPart = string.split('\n\n').first; - var lastPart = string.split('\n\n').sublist(1).join('\n\n'); - var header = { - for (var pair in firstPart.split('\n').map((line) => line.split(': '))) - pair.first: pair.sublist(1).join(': '), - }; - var payload = Payload.fromString(lastPart.trim()); - return Response( - header: header, - payload: payload, - ); - } - - final Map header; - final Payload payload; -} diff --git a/lib/app/utils/taskchampion/credentials_storage.dart b/lib/app/utils/taskchampion/credentials_storage.dart deleted file mode 100644 index bc0b0e83..00000000 --- a/lib/app/utils/taskchampion/credentials_storage.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:shared_preferences/shared_preferences.dart'; - -class CredentialsStorage { - static const String _encryptionSecretKey = 'encryptionSecret'; - static const String _clientIdKey = 'clientId'; - static const String _apiUrlKey = 'ccsyncBackendUrl'; - static Future getEncryptionSecret() async { - SharedPreferences prefs = await SharedPreferences.getInstance(); - return prefs.getString(_encryptionSecretKey); - } - - static Future getClientId() async { - SharedPreferences prefs = await SharedPreferences.getInstance(); - return prefs.getString(_clientIdKey); - } - - static Future getApiUrl() async { - SharedPreferences prefs = await SharedPreferences.getInstance(); - return prefs.getString(_apiUrlKey); - } - -} diff --git a/lib/app/utils/taskfunctions/add_task_dialog_utils.dart b/lib/app/utils/taskfunctions/add_task_dialog_utils.dart deleted file mode 100644 index b79242ce..00000000 --- a/lib/app/utils/taskfunctions/add_task_dialog_utils.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:intl/intl.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; - -String dateToStringForAddTask(DateTime dt) { - return 'On ${DateFormat('yyyy-MM-dd').format(dt)} at ${DateFormat('hh:mm:ss').format(dt)}'; -} - -String getPriorityText(String priority) { - switch (priority) { - case 'H': - return SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .high; - case 'M': - return SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .medium; - case 'L': - return SentenceManager(currentLanguage: AppSettings.selectedLanguage) - .sentences - .low; - default: - return 'None'; - } -} - -DateTime? getDueDate(List dates) { - return dates[0]; -} - -DateTime? getWaitDate(List dates) { - return dates[1]; -} - -DateTime? getSchedDate(List dates) { - return dates[2]; -} - -DateTime? getUntilDate(List dates) { - return dates[3]; -} diff --git a/lib/app/utils/taskfunctions/comparator.dart b/lib/app/utils/taskfunctions/comparator.dart deleted file mode 100644 index a20300e2..00000000 --- a/lib/app/utils/taskfunctions/comparator.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'dart:math'; - -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/urgency.dart'; - - -int Function(Task, Task) compareTasks(String column) { - return (a, b) { - int? result; - switch (column) { - case 'Created': - result = a.entry.compareTo(b.entry); - break; - case 'Modified': - if (a.modified == null && b.modified == null) { - result = 0; - } else if (a.modified == null) { - return 1; - } else if (b.modified == null) { - return -1; - } else { - result = a.modified!.compareTo(b.modified!); - } - break; - case 'Start Time': - if (a.start == null && b.start == null) { - result = 0; - } else if (a.start == null) { - return 1; - } else if (b.start == null) { - return -1; - } else { - result = a.start!.compareTo(b.start!); - } - break; - case 'Due till': - if (a.due == null && b.due == null) { - result = 0; - } else if (a.due == null) { - return 1; - } else if (b.due == null) { - return -1; - } else { - result = a.due!.compareTo(b.due!); - } - break; - case 'Priority': - var compare = {'H': 2, 'M': 1, 'L': 0}; - result = - (compare[a.priority] ?? -1).compareTo(compare[b.priority] ?? -1); - break; - case 'Project': - result = (a.project ?? '').compareTo(b.project ?? ''); - break; - case 'Tags': - for (var i = 0; - i < min(a.tags?.length ?? 0, b.tags?.length ?? 0); - i++) { - if (result == null || result == 0) { - result = a.tags![i].compareTo(b.tags![i]); - } - } - if (result == null || result == 0) { - result = (a.tags?.length ?? 0).compareTo(b.tags?.length ?? 0); - } - break; - case 'Urgency': - result = -urgency(a).compareTo(urgency(b)); - break; - default: - result = 1; - } - return result; - }; -} diff --git a/lib/app/utils/taskfunctions/datetime_differences.dart b/lib/app/utils/taskfunctions/datetime_differences.dart deleted file mode 100644 index 94b4aeb9..00000000 --- a/lib/app/utils/taskfunctions/datetime_differences.dart +++ /dev/null @@ -1,25 +0,0 @@ -String age(DateTime dt) => difference(DateTime.now().difference(dt)); - -String when(DateTime dt) => difference(dt.difference(DateTime.now())); - -String difference(Duration difference) { - String result; - var days = difference.abs().inDays; - if (days > 365) { - result = - '${(days / 365).toStringAsFixed(1).replaceFirst(RegExp(r'\.0$'), '')}y'; - } else if (days > 30) { - result = '${days ~/ 30}mo'; - } else if (days > 7) { - result = '${days ~/ 7}w'; - } else if (days > 0) { - result = '${days}d'; - } else if (difference.abs().inHours > 0) { - result = '${difference.abs().inHours}h'; - } else if (difference.abs().inMinutes > 0) { - result = '${difference.abs().inMinutes}min'; - } else { - result = '${difference.abs().inSeconds}s'; - } - return '$result ${(difference.isNegative) ? 'ago ' : ''}'; -} diff --git a/lib/app/utils/taskfunctions/draft.dart b/lib/app/utils/taskfunctions/draft.dart deleted file mode 100644 index ce6db637..00000000 --- a/lib/app/utils/taskfunctions/draft.dart +++ /dev/null @@ -1,27 +0,0 @@ - -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/patch.dart'; - -class Draft { - Draft( - Task original, - ) : _original = original, - _draft = original.rebuild((b) => b); - - final Task _original; - Task _draft; - - Task get original => _original; - Task get draft => _draft; - - // ignore: avoid_annotating_with_dynamic - void set(String key, dynamic value) { - _draft = patch(_draft, { - key: value, - if (key == 'status') ...{ - 'start': (value == 'completed') ? _draft.start : _original.start, - 'end': (value == 'pending') ? null : DateTime.now().toUtc(), - }, - }); - } -} diff --git a/lib/app/utils/taskfunctions/modify.dart b/lib/app/utils/taskfunctions/modify.dart deleted file mode 100644 index 8ff98855..00000000 --- a/lib/app/utils/taskfunctions/modify.dart +++ /dev/null @@ -1,83 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'package:collection/collection.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/draft.dart'; - -class Modify { - Modify({ - required Task Function(String) getTask, - required void Function(Task) mergeTask, - required String uuid, - }) : _getTask = getTask, - _mergeTask = mergeTask, - _uuid = uuid { - _draft = Draft(_getTask(_uuid)); - } - - final Task Function(String) _getTask; - final void Function(Task) _mergeTask; - final String _uuid; - late Draft _draft; - - Task get draft => _draft.draft; - int get id => _draft.original.id!; - - Map get changes { - var result = {}; - var savedJson = _draft.original.toJson(); - var draftJson = _draft.draft.toJson(); - - for (var entry in { - for (var key in [ - 'description', - 'status', - 'start', - 'end', - 'due', - 'wait', - 'until', - 'priority', - 'project', - 'tags', - 'annotations', - ]) - key: (value) { - if (value != null && - ['start', 'end', 'due', 'wait', 'until'].contains(key)) { - return DateTime.parse(value).toLocal(); - } else if (key == 'annotations') { - return (value as List?)?.length ?? 0; - } - return value; - }, - }.entries) { - var key = entry.key; - var savedValue = savedJson[key]; - var draftValue = draftJson[key]; - - if (draftValue != savedValue && - !(key == 'tags' && - const ListEquality().equals(draftValue, savedValue)) && - !(key == 'annotations' && - const DeepCollectionEquality().equals(draftValue, savedValue))) { - result[key] = { - 'old': entry.value(savedValue), - 'new': entry.value(draftValue), - }; - } - } - return result; - } - - // ignore: avoid_annotating_with_dynamic - void set(String key, dynamic value) { - _draft.set(key, value); - } - - void save({required DateTime Function() modified}) { - _draft.set('modified', modified()); - _mergeTask(_draft.draft); - _draft = Draft(_getTask(_uuid)); - } -} diff --git a/lib/app/utils/taskfunctions/patch.dart b/lib/app/utils/taskfunctions/patch.dart deleted file mode 100644 index 7f7e3aba..00000000 --- a/lib/app/utils/taskfunctions/patch.dart +++ /dev/null @@ -1,65 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'package:built_collection/built_collection.dart'; -import 'package:taskwarrior/app/models/models.dart'; - -Task patch(Task task, Map updates) { - return updates.entries.fold( - task, - (result, entry) => _patch( - result, - entry.key, - entry.value, - ), - ); -} - -// ignore: avoid_annotating_with_dynamic -Task _patch(Task task, String key, dynamic value) { - return task.rebuild( - (b) { - switch (key) { - case 'description': - b.description = value; - break; - case 'status': - b.status = value; - break; - case 'start': - b.start = value; - break; - case 'end': - b.end = value; - break; - case 'due': - b.due = value; - break; - case 'wait': - b.wait = value; - break; - case 'until': - b.until = value; - break; - case 'modified': - b.modified = value; - break; - case 'priority': - b.priority = value; - break; - case 'project': - b.project = value; - break; - case 'tags': - b.tags = BuiltList( - (value as ListBuilder).build().toList().cast()) - .toBuilder(); - break; - // case 'annotations': - // b.annotations = BuiltList( - // (value as ListBuilder).build().toList().cast()) - // .toBuilder(); - // break; - } - }, - ); -} diff --git a/lib/app/utils/taskfunctions/profiles.dart b/lib/app/utils/taskfunctions/profiles.dart deleted file mode 100644 index c8d85ff7..00000000 --- a/lib/app/utils/taskfunctions/profiles.dart +++ /dev/null @@ -1,134 +0,0 @@ -// ignore_for_file: prefer_expression_function_bodies - -import 'dart:collection'; -import 'dart:io'; - -import 'package:taskwarrior/app/models/storage.dart'; -import 'package:uuid/uuid.dart'; - -class Profiles { - Profiles(this.base); - - final Directory base; - - String addProfile() { - var uuid = const Uuid().v1(); - - Directory('${base.path}/profiles/$uuid').createSync(recursive: true); - File('${base.path}/profiles/$uuid/created') - .writeAsStringSync('${DateTime.now().toUtc()}'); - File('${base.path}/profiles/$uuid/alias').createSync(); - const alias = 'New Alias'; - setAlias(profile: uuid, alias: alias); - return uuid; - } - - void copyConfigToNewProfile(String profile) { - var newProfile = addProfile(); - Directory('${base.path}/profiles/$newProfile/.task') - .createSync(recursive: true); - for (var file in [ - '.taskrc', - '.task/ca.cert.pem', - '.task/first_last.cert.pem', - '.task/first_last.key.pem', - '.task/server.cert.pem', - 'taskd.ca', - 'taskd.certificate', - 'taskd.key', - ]) { - if (File('${base.path}/profiles/$profile/$file').existsSync()) { - File('${base.path}/profiles/$profile/$file').copySync( - '${base.path}/profiles/$newProfile/$file', - ); - } - } - } - - List listProfiles() { - var dir = Directory('${base.path}/profiles')..createSync(); - var dirs = dir - .listSync() - .map((entity) => - entity.uri.pathSegments.lastWhere((segment) => segment.isNotEmpty)) - .toList() - ..sort(comparator); - return dirs; - } - - int comparator(String a, String b) { - if (a.isEmpty || b.isEmpty) { - return 0; - } - DateTime created(String profile) { - if (!File('${base.path}/profiles/$profile/created').existsSync()) { - File('${base.path}/profiles/$profile/created') - .writeAsStringSync('${DateTime.now().toUtc()}'); - } - return DateTime.parse( - File('${base.path}/profiles/$profile/created').readAsStringSync()); - } - - var aCreated = created(a); - var bCreated = created(b); - if (aCreated.isBefore(bCreated)) { - return -1; - } else if (aCreated.isAfter(bCreated)) { - return 1; - } else { - return 0; - } - } - - Map profilesMap() { - return SplayTreeMap.of({ - for (var profile in listProfiles()) profile: getAlias(profile), - }, comparator); - } - - void deleteProfile(String profile) { - Directory('${base.path}/profiles/$profile').deleteSync(recursive: true); - if (File('${base.path}/current-profile').existsSync()) { - if (profile == File('${base.path}/current-profile').readAsStringSync()) { - File('${base.path}/current-profile').deleteSync(); - } - } - } - - void setAlias({required String profile, required String alias}) { - File('${base.path}/profiles/$profile/alias').writeAsStringSync(alias); - } - - String? getAlias(String profile) { - String? result; - if (File('${base.path}/profiles/$profile/alias').existsSync()) { - var contents = - File('${base.path}/profiles/$profile/alias').readAsStringSync(); - result = (contents.isEmpty) ? null : contents; - } - return result; - } - - void setCurrentProfile(String? profile) { - File('${base.path}/current-profile').writeAsStringSync(profile ?? ''); - } - - String? getCurrentProfile() { - if (File('${base.path}/current-profile').existsSync()) { - return File('${base.path}/current-profile').readAsStringSync(); - } - return null; - } - - Storage? getCurrentStorage() { - var currentProfile = getCurrentProfile(); - if (currentProfile != null) { - return getStorage(currentProfile); - } - return null; - } - - Storage getStorage(String profile) { - return Storage(Directory('${base.path}/profiles/$profile')); - } -} diff --git a/lib/app/utils/taskfunctions/projects.dart b/lib/app/utils/taskfunctions/projects.dart deleted file mode 100644 index 239648ae..00000000 --- a/lib/app/utils/taskfunctions/projects.dart +++ /dev/null @@ -1,87 +0,0 @@ -List projectPath(String project) { - var result = []; - var depth = project.split('.').length; - for (var i = 0; i < depth; i++) { - result.add(ancestor(project, i)!); - } - return result; -} - -String? ancestor(String project, int distance) { - var parts = project.split('.'); - if (distance > parts.length - 1) { - return null; - } - return parts.sublist(0, parts.length - distance).join('.'); -} - -class ProjectNode { - ProjectNode([ - this.tasks = 0, - ]) : children = {}, - subtasks = 0; - - String? parent; - Set children; - int tasks; - int subtasks; - - Map toMap() => { - 'parent': parent, - 'children': children.toList(), - 'tasks': tasks, - 'subtasks': subtasks, - }; -} - -Map sparseDecoratedProjectTree(Map projects) { - var result = {}; - - for (var entry in projects.entries) { - var path = projectPath(entry.key); - var steps = path.asMap(); - - result[entry.key] = ProjectNode(entry.value); - - for (var i = 0; i < path.length; i++) { - var next = steps[i]!; - - result.putIfAbsent(next, ProjectNode.new); - - result[next]!.parent = steps[i + 1]; - - if (i > 0) { - result[next]!.children.add(steps[i - 1]!); - } - } - } - - for (var entry in projects.entries) { - var path = projectPath(entry.key); - for (var project in path) { - result[project]!.subtasks += entry.value; - } - } - - var toRemove = { - for (var entry in result.entries) - if ((entry.value.children.length == 1) && (entry.value.tasks == 0)) - entry.key, - }; - - for (var project in toRemove) { - var middle = result[project]!; - result.remove(project); - - var below = middle.children.first; - var above = middle.parent; - - result[below]!.parent = above; - - if (above != null) { - result[above]!.children.remove(project); - result[above]!.children.add(below); - } - } - return result; -} diff --git a/lib/app/utils/taskfunctions/query.dart b/lib/app/utils/taskfunctions/query.dart deleted file mode 100644 index 3040830c..00000000 --- a/lib/app/utils/taskfunctions/query.dart +++ /dev/null @@ -1,112 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -class Query { - const Query(this._queryStorage); - - final Directory _queryStorage; - - File get _selectedSort => File('${_queryStorage.path}/selectedSort'); - File get _pendingFilter => File('${_queryStorage.path}/pendingFilter'); - File get _waitingFilter => File('${_queryStorage.path}/waitingFilter'); - File get _projectFilter => File('${_queryStorage.path}/projectFilter'); - File get _tagUnion => File('${_queryStorage.path}/tagUnion'); - File get _selectedTags => File('${_queryStorage.path}/selectedTags'); - - void setSelectedSort(String selectedSort) { - if (!_selectedSort.existsSync()) { - _selectedSort.createSync(recursive: true); - } - _selectedSort.writeAsStringSync(selectedSort); - } - - String getSelectedSort() { - if (!_selectedSort.existsSync()) { - _selectedSort - ..createSync(recursive: true) - ..writeAsStringSync('urgency+'); - } - return _selectedSort.readAsStringSync(); - } - - void togglePendingFilter() { - _pendingFilter.writeAsStringSync( - json.encode(!getPendingFilter()), - ); - } - - bool getPendingFilter() { - if (!_pendingFilter.existsSync()) { - _pendingFilter - ..createSync(recursive: true) - ..writeAsStringSync('true'); - } - return json.decode(_pendingFilter.readAsStringSync()); - } - - void toggleWaitingFilter() { - _waitingFilter.writeAsStringSync( - json.encode(!getWaitingFilter()), - ); - } - - bool getWaitingFilter() { - if (!_waitingFilter.existsSync()) { - _waitingFilter - ..createSync(recursive: true) - ..writeAsStringSync('true'); - } - return json.decode(_waitingFilter.readAsStringSync()); - } - - void toggleProjectFilter(String project) { - _projectFilter.writeAsStringSync( - (project == projectFilter()) ? '' : project, - ); - } - - String projectFilter() { - if (!_projectFilter.existsSync()) { - _projectFilter.createSync(recursive: true); - } - return _projectFilter.readAsStringSync(); - } - - void toggleTagUnion() { - _tagUnion.writeAsStringSync( - json.encode(!tagUnion()), - ); - } - - bool tagUnion() { - if (!_tagUnion.existsSync()) { - _tagUnion - ..createSync(recursive: true) - ..writeAsStringSync('false'); - } - return json.decode(_tagUnion.readAsStringSync()); - } - - void toggleTagFilter(String tag) { - var tags = getSelectedTags(); - if (tags.contains('+$tag')) { - tags - ..remove('+$tag') - ..add('-$tag'); - } else if (tags.contains('-$tag')) { - tags.remove('-$tag'); - } else { - tags.add('+$tag'); - } - _selectedTags.writeAsStringSync(json.encode(tags.toList())); - } - - Set getSelectedTags() { - if (!_selectedTags.existsSync()) { - _selectedTags - ..createSync(recursive: true) - ..writeAsStringSync(json.encode([])); - } - return (json.decode(_selectedTags.readAsStringSync()) as List).cast().toSet(); - } -} diff --git a/lib/app/utils/taskfunctions/tags.dart b/lib/app/utils/taskfunctions/tags.dart deleted file mode 100644 index 338255e9..00000000 --- a/lib/app/utils/taskfunctions/tags.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'dart:math'; - -import 'package:taskwarrior/app/models/models.dart'; - - - -Set tagSet(Iterable tasks) { - return tasks.where((task) => task.tags != null).fold( - {}, (aggregate, task) => aggregate..addAll(task.tags!.toList())); -} - -Map tagFrequencies(Iterable tasks) { - var frequency = {}; - for (var task in tasks) { - for (var tag in task.tags?.asList() ?? []) { - if (frequency.containsKey(tag)) { - frequency[tag] = (frequency[tag] ?? 0) + 1; - } else { - frequency[tag] = 1; - } - } - } - return frequency; -} - -Map tagsLastModified(Iterable tasks) { - var modifiedMap = {}; - for (var task in tasks) { - var modified = task.modified ?? task.start ?? task.entry; - for (var tag in task.tags?.asList() ?? []) { - if (modifiedMap.containsKey(tag)) { - modifiedMap[tag] = DateTime.fromMicrosecondsSinceEpoch( - max( - modified.microsecondsSinceEpoch, - modifiedMap[tag]!.microsecondsSinceEpoch, - ), - isUtc: true, - ); - } else { - modifiedMap[tag] = modified; - } - } - } - return modifiedMap; -} diff --git a/lib/app/utils/taskfunctions/taskparser.dart b/lib/app/utils/taskfunctions/taskparser.dart deleted file mode 100644 index b83fea81..00000000 --- a/lib/app/utils/taskfunctions/taskparser.dart +++ /dev/null @@ -1,140 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages, deprecated_member_use - -import 'package:petitparser/petitparser.dart'; -import 'package:taskwarrior/app/models/models.dart'; - -import 'package:uuid/uuid.dart'; - - - -class Tag { - const Tag(this.tag); - - final String tag; - - // @override - // String toString() => 'Tag($tag)'; -} - -class Attribute { - const Attribute( - this.key, - this.value, - ); - - final String key; - final String? value; - - // @override - // String toString() => 'Attribute($key, $value)'; -} - -Parser wordPrimitive() => (char(' ').not() & any()).plus().flatten(); - -Parser attributeNamePrimitive() => - string('status') | - string('statu') | - string('stat') | - string('project') | - string('projec') | - string('proje') | - string('proj') | - string('pro') | - string('priority') | - string('priorit') | - string('priori') | - string('prior') | - string('prio') | - string('pri') | - string('scheduled') | - string('schedule') | - string('schedul') | - string('schedu') | - string('sched') | - string('sche') | - string('sch') | - string('sc') | - string('due') | - string('wait') | - string('until'); - -Parser tagPrimitive() => - (char('+') & wordPrimitive()).pick(1).cast().map(Tag.new); -Parser attributePrimitive() => - (attributeNamePrimitive() & char(':') & wordPrimitive().optional()) - .map((value) => Attribute(value[0], value[2])); -Parser descriptionWordPrimitive() => wordPrimitive(); - -final add = (epsilon() & endOfInput()) | - (tagPrimitive() | attributePrimitive() | descriptionWordPrimitive()) - .separatedBy( - char(' '), - includeSeparators: false, - ); - -Task taskParser(String task) { - var now = DateTime.now().toUtc(); - var uuid = const Uuid().v1(); - var description = - (add.parse(task).value as Iterable).whereType().join(' '); - var draft = Task( - (b) => b - ..description = description - ..status = 'pending' - ..uuid = uuid - ..entry = now - ..start = now - ..modified = now, - ); - for (var match in add.parse(task).value) { - if (match is Attribute) { - var value = match.value; - value = (value != null && value.startsWith('\'') && value.endsWith('\'')) - ? value.substring(1, value.length - 1) - : value; - switch (match.key) { - case 'stat': - case 'statu': - case 'status': - draft = draft.rebuild((b) => b..status = value); - break; - case 'pro': - case 'proj': - case 'proje': - case 'projec': - case 'project': - draft = draft.rebuild((b) => b..project = value); - break; - case 'pri': - case 'prio': - case 'prior': - case 'priori': - case 'priorit': - case 'priority': - draft = draft.rebuild((b) => b..priority = value); - break; - case 'due': - draft = draft.rebuild( - (b) => - b..due = (value == null) ? null : DateTime.parse(value).toUtc(), - ); - break; - case 'wait': - draft = draft.rebuild( - (b) => b - ..wait = (value == null) ? null : DateTime.parse(value).toUtc(), - ); - break; - case 'until': - draft = draft.rebuild( - (b) => b - ..until = (value == null) ? null : DateTime.parse(value).toUtc(), - ); - break; - } - } else if (match is Tag) { - draft = draft.rebuild((b) => b..tags = (b.tags..add(match.tag))); - } - } - return draft; -} diff --git a/lib/app/utils/taskfunctions/urgency.dart b/lib/app/utils/taskfunctions/urgency.dart deleted file mode 100644 index 4a03ae3d..00000000 --- a/lib/app/utils/taskfunctions/urgency.dart +++ /dev/null @@ -1,134 +0,0 @@ - - -import 'package:taskwarrior/app/models/models.dart'; - -String formatUrgency(double urgency) { - var result = urgency.toStringAsFixed(2); - if (result.length > 4) { - result = urgency.toStringAsFixed(1); - } - if (result.contains('.')) { - result = result.replaceFirst(RegExp(r'\.?0+$'), ''); - } - return result; -} - -double urgency(Task task) { - // https://github.com/GothenburgBitFactory/taskwarrior/blob/v2.5.3/src/Task.cpp#L1912-L2031 - // https://github.com/GothenburgBitFactory/taskwarrior/blob/v2.5.3/src/Context.cpp#L146-L160 - - // % task show coefficient - // - // Config Variable Value - // urgency.active.coefficient 4.0 - // urgency.age.coefficient 2.0 - // urgency.annotations.coefficient 1.0 - // urgency.blocked.coefficient -5.0 - // urgency.blocking.coefficient 8.0 - // urgency.due.coefficient 12.0 - // urgency.project.coefficient 1.0 - // urgency.scheduled.coefficient 5.0 - // urgency.tags.coefficient 1.0 - // urgency.uda.priority.H.coefficient 6.0 - // urgency.uda.priority.L.coefficient 1.8 - // urgency.uda.priority.M.coefficient 3.9 - // urgency.user.tag.next.coefficient 15.0 - // urgency.waiting.coefficient -3.0 - - var result = 0.0; - - if (task.tags?.contains('next') ?? false) { - result += 15; - } - - if (task.start != null) { - result += 4; - } - - switch (task.priority) { - case 'H': - result += 6; - break; - case 'M': - result += 3.9; - break; - case 'L': - result += 1.8; - break; - default: - } - - result += 1.0 * urgencyProject(task); - result += 5.0 * urgencyScheduled(task); - result += -3.0 * urgencyWaiting(task); - result += 1.0 * urgencyAnnotations(task); - result += 1.0 * urgencyTags(task); - result += 12.0 * urgencyDue(task); - result += 2.0 * urgencyAge(task); - - return double.parse(result.toStringAsFixed(3)); -} - -double urgencyProject(Task task) => (task.project != null) ? 1 : 0; - -double urgencyScheduled(Task task) => - (task.scheduled != null && task.scheduled!.isBefore(DateTime.now())) - ? 1 - : 0; - -double urgencyWaiting(Task task) => (task.status == 'waiting' || - (task.wait != null && task.wait!.isAfter(DateTime.now()))) - ? 1 - : 0; - -double urgencyAnnotations(Task task) { - if (task.annotations?.isNotEmpty ?? false) { - if (task.annotations!.length == 1) { - return 0.8; - } else if (task.annotations!.length == 2) { - return 0.9; - } else if (task.annotations!.length > 2) { - return 1; - } - } - return 0; -} - -double urgencyTags(Task task) { - if (task.tags?.isNotEmpty ?? false) { - if (task.tags!.length == 1) { - return 0.8; - } else if (task.tags!.length == 2) { - return 0.9; - } else if (task.tags!.length > 2) { - return 1; - } - } - return 0; -} - -double urgencyDue(Task task) { - if (task.due != null) { - var daysOverdue = DateTime.now().difference(task.due!).inSeconds / 86400; - - if (daysOverdue >= 7.0) { - return 1; - } else if (daysOverdue >= -14.0) { - return double.parse( - ((daysOverdue + 14) * 0.8 / 21 + 0.2).toStringAsFixed(3)); - } - - return 0.2; - } - return 0; -} - -double urgencyAge(Task task) { - var entryAge = - DateTime.now().difference(task.entry).inMilliseconds / 86400000; - if (entryAge >= 365) { - return 1; - } else { - return double.parse((entryAge / 365).toStringAsFixed(3)); - } -} diff --git a/lib/app/utils/taskfunctions/validate.dart b/lib/app/utils/taskfunctions/validate.dart deleted file mode 100644 index ee644382..00000000 --- a/lib/app/utils/taskfunctions/validate.dart +++ /dev/null @@ -1,36 +0,0 @@ -void validateTaskDescription(String description) { - if (description.isEmpty) { - throw FormatException( - 'Empty description will provoke a server error.', - description, - 0, - ); - } else if (description.endsWith(r'\')) { - throw FormatException( - 'Trailing backslashes may corrupt your Taskserver account.', - description, - description.length - 1, - ); - } -} - -void validateTaskProject(String project) { - if (project.endsWith(r'\')) { - throw FormatException( - 'Trailing backslashes may corrupt your Taskserver account.', - project, - project.length - 1, - ); - } -} - -void validateTaskTags(String tag) { - if (tag.contains(' ')) { - throw FormatException( - 'Taskwarrior documentation on JSON format indicates your task tag ' - 'should not contain spaces.', - tag, - tag.indexOf(' '), - ); - } -} diff --git a/lib/app/utils/taskserver/credentials.dart b/lib/app/utils/taskserver/credentials.dart deleted file mode 100644 index c0220be4..00000000 --- a/lib/app/utils/taskserver/credentials.dart +++ /dev/null @@ -1,17 +0,0 @@ -class Credentials { - const Credentials({ - required this.org, - required this.user, - required this.key, - }); - - factory Credentials.fromString(String credentials) => Credentials( - org: credentials.split('/')[0], - user: credentials.split('/')[1], - key: credentials.split('/')[2], - ); - - final String org; - final String user; - final String key; -} diff --git a/lib/app/utils/taskserver/parse_taskrc.dart b/lib/app/utils/taskserver/parse_taskrc.dart deleted file mode 100644 index ce30302c..00000000 --- a/lib/app/utils/taskserver/parse_taskrc.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// Parses a taskrc file into a Dart [Map]. -Map parseTaskrc(String contents) => { - for (var pair in contents - .split('\n') - .where((line) => line.contains('=') && line[0] != '#') - .map((line) => line.replaceAll('\\/', '/')) // ignore: use_raw_strings - .map((line) => line.split('='))) - pair[0].trim(): pair[1].trim(), - }; diff --git a/lib/app/utils/taskserver/pem_file_paths.dart b/lib/app/utils/taskserver/pem_file_paths.dart deleted file mode 100644 index d72ae821..00000000 --- a/lib/app/utils/taskserver/pem_file_paths.dart +++ /dev/null @@ -1,52 +0,0 @@ -import 'dart:io'; - -class PemFilePaths { - const PemFilePaths({ - this.ca, - this.certificate, - this.key, - this.serverCert, - }); - - factory PemFilePaths.fromTaskrc(Map taskrc) { - return PemFilePaths( - ca: taskrc['taskd.ca'], - certificate: taskrc['taskd.certificate'], - key: taskrc['taskd.key'], - ); - } - - final String? ca; - final String? certificate; - final String? key; - final String? serverCert; - - SecurityContext securityContext() { - var context = (ca != null && File(ca!).existsSync()) - ? (SecurityContext()..setTrustedCertificates(ca!)) - : SecurityContext(withTrustedRoots: true); - if (certificate != null && File(certificate!).existsSync()) { - context.useCertificateChain(certificate!); - } - if (key != null && File(key!).existsSync()) { - context.usePrivateKey(key!); - } - return context; - } - - bool savedServerCertificateMatches(X509Certificate badServerCert) { - if (serverCert != null) { - if (File(serverCert!).existsSync()) { - return File(serverCert!).readAsStringSync() == badServerCert.pem; - } - } - return false; - } - - Map get map => { - 'taskd.ca': ca, - 'taskd.certificate': certificate, - 'taskd.key': key, - 'server.cert': serverCert, - }..removeWhere((_, value) => value == null); -} diff --git a/lib/app/utils/taskserver/server.dart b/lib/app/utils/taskserver/server.dart deleted file mode 100644 index fec6752b..00000000 --- a/lib/app/utils/taskserver/server.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:taskwarrior/app/utils/taskserver/taskrc_exception.dart'; - -class Server { - const Server({ - required this.address, - required this.port, - }); - - factory Server.fromString(String server) { - var split = server.split(':'); - if (split.length != 2) { - throw TaskrcException( - 'Ensure your TASKRC\'s taskd.server contains one colon (:).', - ); - } - var address = split[0]; - var port = int.tryParse(split[1]); - - if (port == null) { - throw TaskrcException( - 'Ensure your TASKRC\'s taskd.server has the form :, ' - 'where port is an integer.'); - } - - return Server( - address: address, - port: port, - ); - } - - final String address; - final int port; - - @override - String toString() { - return '$address:$port'; - } -} diff --git a/lib/app/utils/taskserver/taskrc.dart b/lib/app/utils/taskserver/taskrc.dart deleted file mode 100644 index 36348b9a..00000000 --- a/lib/app/utils/taskserver/taskrc.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:taskwarrior/app/utils/taskserver/credentials.dart'; -import 'package:taskwarrior/app/utils/taskserver/parse_taskrc.dart'; -import 'package:taskwarrior/app/utils/taskserver/pem_file_paths.dart'; -import 'package:taskwarrior/app/utils/taskserver/server.dart'; - -class Taskrc { - Taskrc({ - this.server, - this.credentials, - // ignore: always_put_required_named_parameters_first - required this.pemFilePaths, - }); - - factory Taskrc.fromString(String taskrc) { - return Taskrc.fromMap( - parseTaskrc(taskrc), - ); - } - - factory Taskrc.fromMap(Map taskrc) { - var server = taskrc['taskd.server']; - var credentials = taskrc['taskd.credentials']; - return Taskrc( - server: (server == null) ? null : Server.fromString(server), - credentials: - (credentials == null) ? null : Credentials.fromString(credentials), - pemFilePaths: PemFilePaths.fromTaskrc(taskrc), - ); - } - - final Server? server; - final Credentials? credentials; - final PemFilePaths pemFilePaths; -} diff --git a/lib/app/utils/taskserver/taskrc_exception.dart b/lib/app/utils/taskserver/taskrc_exception.dart deleted file mode 100644 index 6d6f55f5..00000000 --- a/lib/app/utils/taskserver/taskrc_exception.dart +++ /dev/null @@ -1,8 +0,0 @@ -class TaskrcException implements Exception { - TaskrcException(this.message); - - String message; - - @override - String toString() => message; -} diff --git a/lib/app/utils/taskserver/taskserver.dart b/lib/app/utils/taskserver/taskserver.dart deleted file mode 100644 index db5cfa49..00000000 --- a/lib/app/utils/taskserver/taskserver.dart +++ /dev/null @@ -1,6 +0,0 @@ -export 'credentials.dart'; -export 'parse_taskrc.dart'; -export 'pem_file_paths.dart'; -export 'server.dart'; -export 'taskrc.dart'; -export 'taskrc_exception.dart'; diff --git a/lib/app/utils/themes/dark_theme.dart b/lib/app/utils/themes/dark_theme.dart deleted file mode 100644 index b9685067..00000000 --- a/lib/app/utils/themes/dark_theme.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/constants/constants.dart'; - -ThemeData darkTheme = ThemeData( - brightness: Brightness.dark, - dialogBackgroundColor: TaskWarriorColors.kdialogBackGroundColor, - colorScheme: ColorScheme( - brightness: Brightness.dark, - primary: TaskWarriorColors.white, - onPrimary: TaskWarriorColors.black, - secondary: TaskWarriorColors.grey, - onSecondary: TaskWarriorColors.white, - error: TaskWarriorColors.red, - onError: TaskWarriorColors.black, - surface: TaskWarriorColors.black, - onSurface: TaskWarriorColors.white, - ), - timePickerTheme: TimePickerThemeData( - dayPeriodColor: TaskWarriorColors.lightGrey - ), - extensions: [ - TaskWarriorColors.darkTheme - ] -); \ No newline at end of file diff --git a/lib/app/utils/themes/light_theme.dart b/lib/app/utils/themes/light_theme.dart deleted file mode 100644 index bd90fe09..00000000 --- a/lib/app/utils/themes/light_theme.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; - -ThemeData lightTheme = ThemeData( - brightness: Brightness.light, - dialogBackgroundColor: TaskWarriorColors.kLightDialogBackGroundColor, - colorScheme: ColorScheme( - brightness: Brightness.light, - primary: TaskWarriorColors.black, - onPrimary: TaskWarriorColors.white, - secondary: TaskWarriorColors.white, - onSecondary: TaskWarriorColors.black, - error: TaskWarriorColors.red, - onError: TaskWarriorColors.white, - surface: TaskWarriorColors.white, - onSurface: TaskWarriorColors.black, - ), - timePickerTheme: TimePickerThemeData( - dayPeriodColor: TaskWarriorColors.grey - ), - extensions: [ - TaskWarriorColors.lightTheme - ] -); diff --git a/lib/app/utils/themes/theme_extension.dart b/lib/app/utils/themes/theme_extension.dart deleted file mode 100644 index 3c9c7e79..00000000 --- a/lib/app/utils/themes/theme_extension.dart +++ /dev/null @@ -1,85 +0,0 @@ -import 'package:flutter/material.dart'; - - -class TaskwarriorColorTheme extends ThemeExtension{ - final Color? dialogBackgroundColor; - final Color? primaryBackgroundColor; - final Color? secondaryBackgroundColor; - final Color? primaryTextColor; - final Color? secondaryTextColor; - final Color? primaryDisabledTextColor; - final Color? dividerColor; - final Color? purpleShade; - final Color? greyShade; - final Color? dimCol; - final IconData? icons; - - const TaskwarriorColorTheme({ - required this.dialogBackgroundColor, - required this.primaryBackgroundColor, - required this.primaryDisabledTextColor, - required this.primaryTextColor, - required this.secondaryBackgroundColor, - required this.secondaryTextColor, - required this.dividerColor, - required this.purpleShade, - required this.greyShade, - required this.icons, - required this.dimCol - }); - - @override - ThemeExtension copyWith({ - Color? dialogBackgroundColor, - Color? primaryBackgroundColor, - Color? secondaryBackgroundColor, - Color? primaryTextColor, - Color? secondaryTextColor, - Color? primaryDisabledTextColor, - Color? dividerColor, - Color? greyShade, - Color? dimCol, - IconData? icons, - }) { - return TaskwarriorColorTheme( - dialogBackgroundColor: dialogBackgroundColor ?? dialogBackgroundColor, - primaryBackgroundColor: primaryBackgroundColor ?? primaryBackgroundColor, - primaryDisabledTextColor: primaryDisabledTextColor ?? primaryDisabledTextColor, - primaryTextColor: primaryTextColor ?? primaryTextColor, - secondaryBackgroundColor: secondaryBackgroundColor ?? secondaryBackgroundColor, - secondaryTextColor: secondaryTextColor ?? secondaryTextColor, - dividerColor: dividerColor ?? dividerColor, - purpleShade: purpleShade ?? purpleShade, - greyShade: greyShade ?? greyShade, - icons: icons ?? icons, - dimCol: dimCol ?? dimCol - ); - } - - @override - ThemeExtension lerp( - covariant ThemeExtension? other, double t) { - if (other is! TaskwarriorColorTheme) { - return this; - } - return TaskwarriorColorTheme( - dialogBackgroundColor: Color.lerp( - dialogBackgroundColor, other.dialogBackgroundColor, t), - primaryBackgroundColor: Color.lerp( - primaryBackgroundColor, other.primaryBackgroundColor, t), - primaryDisabledTextColor: Color.lerp( - primaryDisabledTextColor, other.primaryDisabledTextColor, t), - primaryTextColor: - Color.lerp(primaryTextColor, other.primaryTextColor, t), - secondaryBackgroundColor: Color.lerp( - secondaryBackgroundColor, other.secondaryBackgroundColor, t), - secondaryTextColor: - Color.lerp(secondaryTextColor, other.secondaryTextColor, t), - dividerColor: Color.lerp(dividerColor, other.dividerColor, t), - purpleShade: Color.lerp(purpleShade, other.purpleShade, t), - greyShade: Color.lerp(greyShade, other.greyShade, t), - dimCol: Color.lerp(dimCol, other.dimCol, t), - icons: icons - ); - } -} \ No newline at end of file diff --git a/lib/app/utils/themes/themes.dart b/lib/app/utils/themes/themes.dart deleted file mode 100644 index a72656ca..00000000 --- a/lib/app/utils/themes/themes.dart +++ /dev/null @@ -1,2 +0,0 @@ -export 'dark_theme.dart'; -export 'light_theme.dart'; \ No newline at end of file diff --git a/lib/app/v3/db/task_database.dart b/lib/app/v3/db/task_database.dart deleted file mode 100644 index 6928da9a..00000000 --- a/lib/app/v3/db/task_database.dart +++ /dev/null @@ -1,481 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:sqflite/sqflite.dart'; -import 'package:path/path.dart'; -import 'package:taskwarrior/app/v3/models/annotation.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; - -class TaskDatabase { - Database? _database; - - Future open() async { - var databasesPath = await getDatabasesPath(); - String path = join(databasesPath, 'tasks.db'); - - _database = await openDatabase(path, version: 2, - onCreate: (Database db, version) async { - await db.execute(''' - CREATE TABLE Tasks ( - uuid TEXT PRIMARY KEY, - id INTEGER, - description TEXT, - project TEXT, - status TEXT, - urgency REAL, - priority TEXT, - due TEXT, - end TEXT, - entry TEXT, - modified TEXT, - start TEXT, - wait TEXT, - rtype TEXT, - recur TEXT - ) - '''); - await db.execute(''' - CREATE TABLE Tags ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - task_uuid TEXT NOT NULL, - task_id INTEGER NOT NULL, - FOREIGN KEY (task_uuid, task_id) - REFERENCES Tasks (uuid, id) - ON DELETE CASCADE - ON UPDATE CASCADE - ) - '''); - await db.execute(''' - CREATE TABLE Annotations ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - entry TEXT NOT NULL, - description TEXT NOT NULL, - task_uuid TEXT NOT NULL, - task_id INTEGER NOT NULL, - FOREIGN KEY (task_uuid, task_id) - REFERENCES Tasks (uuid, id) - ON DELETE CASCADE - ON UPDATE CASCADE - ) - '''); - await db.execute(''' - CREATE TABLE Depends ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - d_uuid TEXT NOT NULL, - task_uuid TEXT NOT NULL, - task_id INTEGER NOT NULL, - FOREIGN KEY (task_uuid, task_id) - REFERENCES Tasks (uuid, id) - ON DELETE CASCADE - ON UPDATE CASCADE - ) - '''); - }); - debugPrint("Database opened at $path"); - } - - Future ensureDatabaseIsOpen() async { - if (_database == null) { - await open(); - } - } - - Future> fetchTasksFromDatabase() async { - await ensureDatabaseIsOpen(); - - final List> maps = await _database!.query('Tasks'); - List a = await Future.wait( - maps.map((mapItem) => getObjectForTask(mapItem)).toList(), - ); - debugPrint("Database fetch ${maps.last}"); - for (int i = 0; i < maps.length; i++) { - debugPrint("Database fetch ${maps[i]}"); - } - debugPrint('Tasks from db'); - debugPrint(a.toString()); - return a; - } - - Future deleteAllTasksInDB() async { - await ensureDatabaseIsOpen(); - await _database!.delete( - 'Tasks', - ); - } - - Future printDatabaseContents() async { - await ensureDatabaseIsOpen(); - - List> maps = await _database!.query('Tasks'); - for (var map in maps) { - map.forEach((key, value) { - debugPrint('Key: $key, Value: $value, Type: ${value.runtimeType}'); - }); - } - } - - Future insertTask(TaskForC task) async { - await ensureDatabaseIsOpen(); - List taskTags = task.tags ?? []; - List taskDepends = task.depends ?? []; - List> taskAnnotations = task.annotations != null - ? task.annotations! - .map((a) => {"entry": a.entry, "description": a.description}) - .toList() - : []; - debugPrint( - "Database insert ${task.description} for task tags are $taskTags"); - var map = task.toJson(); - map.remove("tags"); - map.remove("depends"); - map.remove("annotations"); - await _database!.insert( - 'Tasks', - map, - conflictAlgorithm: ConflictAlgorithm.replace, - ); - if (taskTags.isNotEmpty) { - // Use the ID from the task object itself for consistency - await setTagsForTask(task.uuid ?? '', task.id, taskTags.toList()); - } - if (taskDepends.isNotEmpty) { - await setDependsForTask(task.uuid ?? '', task.id, taskDepends.toList()); - } - if (taskAnnotations.isNotEmpty) { - await setAnnotationsForTask( - task.uuid ?? '', task.id, taskAnnotations.toList()); - } - } - - Future updateTask(TaskForC task) async { - await ensureDatabaseIsOpen(); - debugPrint("Database update"); - List taskTags = task.tags?.map((e) => e.toString()).toList() ?? []; - debugPrint("Database update $taskTags"); - List taskDepends = - task.tags?.map((e) => e.toString()).toList() ?? []; - debugPrint("Database update $taskDepends"); - List> taskAnnotations = task.annotations != null - ? task.annotations! - .map((a) => {"entry": a.entry, "description": a.description}) - .toList() - : []; - var map = task.toJson(); - map.remove("tags"); - map.remove("depends"); - map.remove("annotations"); - await _database!.update( - 'Tasks', - map, - where: 'uuid = ?', - whereArgs: [task.uuid], - ); - if (taskTags.isNotEmpty) { - await setTagsForTask(task.uuid ?? '', task.id, taskTags.toList()); - } - if (taskDepends.isNotEmpty) { - await setDependsForTask(task.uuid ?? '', task.id, taskDepends.toList()); - } - if (taskAnnotations.isNotEmpty) { - await setAnnotationsForTask( - task.uuid ?? '', task.id, taskAnnotations.toList()); - } - } - - Future getTaskByUuid(String uuid) async { - await ensureDatabaseIsOpen(); - - List> maps = await _database!.query( - 'Tasks', - where: 'uuid = ?', - whereArgs: [uuid], - ); - - if (maps.isNotEmpty) { - return await getObjectForTask(maps.first); - } else { - return null; - } - } - - Future markTaskAsCompleted(String uuid) async { - await ensureDatabaseIsOpen(); - - await _database!.update( - 'Tasks', - {'modified': (DateTime.now()).toIso8601String(), 'status': 'completed'}, - where: 'uuid = ?', - whereArgs: [uuid], - ); - debugPrint('task${uuid}completed'); - debugPrint({DateTime.now().toIso8601String()}.toString()); - } - - Future markTaskAsDeleted(String uuid) async { - await ensureDatabaseIsOpen(); - - await _database!.update( - 'Tasks', - {'status': 'deleted'}, - where: 'uuid = ?', - whereArgs: [uuid], - ); - debugPrint('task${uuid}deleted'); - } - - Future saveEditedTaskInDB( - String uuid, - String newDescription, - String newProject, - String newStatus, - String newPriority, - String newDue, - List newTags, - ) async { - await ensureDatabaseIsOpen(); - - debugPrint('task in saveEditedTaskInDB: $uuid with due $newDue'); - await _database!.update( - 'Tasks', - { - 'description': newDescription, - 'project': newProject, - 'status': newStatus, - 'priority': newPriority, - 'due': newDue, - 'modified': DateTime.now().toIso8601String(), - }, - where: 'uuid = ?', - whereArgs: [uuid], - ); - debugPrint('task${uuid}edited'); - if (newTags.isNotEmpty) { - TaskForC? task = await getTaskByUuid(uuid); - await setTagsForTask(uuid, task?.id ?? 0, newTags.toList()); - } - } - - Future> findTasksWithoutUUIDs() async { - await ensureDatabaseIsOpen(); - - List> maps = await _database!.query( - 'Tasks', - where: 'uuid IS NULL OR uuid = ?', - whereArgs: [''], - ); - - return await Future.wait( - maps.map((mapItem) => getObjectForTask(mapItem)).toList(), - ); - } - - Future> getTasksByProject(String project) async { - List> maps = await _database!.query( - 'Tasks', - where: 'project = ?', - whereArgs: [project], - ); - debugPrint("DB Stored for $maps"); - return await Future.wait( - maps.map((mapItem) => getObjectForTask(mapItem)).toList(), - ); - } - - Future> fetchUniqueProjects() async { - var taskDatabase = TaskDatabase(); - await taskDatabase.open(); - await taskDatabase.ensureDatabaseIsOpen(); - - final List> result = await taskDatabase._database! - .rawQuery( - 'SELECT DISTINCT project FROM Tasks WHERE project IS NOT NULL'); - - return result.map((row) => row['project'] as String).toList(); - } - - Future> searchTasks(String query) async { - final List> maps = await _database!.query( - 'tasks', - where: 'description LIKE ? OR project LIKE ?', - whereArgs: ['%$query%', '%$query%'], - ); - return await Future.wait( - maps.map((mapItem) => getObjectForTask(mapItem)).toList(), - ); - } - - Future close() async { - await _database!.close(); - } - - Future deleteTask({description, due, project, priority}) async { - await _database!.delete( - 'Tasks', - where: 'description = ? AND due = ? AND project = ? AND priority = ?', - whereArgs: [description, due, project, priority], - ); - } - -// Get tags using a composite key - Future> getTagsForTask(String uuid, int id) async { - ensureDatabaseIsOpen(); - final db = _database; - if (db == null) { - return []; - } - final List> maps = await db.query( - 'Tags', - columns: ['name'], - where: 'task_uuid = ? AND task_id = ?', - whereArgs: [uuid, id], - ); - return List.generate(maps.length, (i) { - return maps[i]['name'] as String; - }); - } - - // Set tags using a composite key - Future setTagsForTask(String uuid, int id, List tags) async { - debugPrint('Setting tags for task $uuid: $tags'); - try { - ensureDatabaseIsOpen(); - final db = _database; - if (db == null) { - return; - } - await db.transaction((txn) async { - // Delete existing tags for the task - await txn.delete( - 'Tags', - where: 'task_uuid = ? AND task_id = ?', - whereArgs: [uuid, id], - ); - // Insert new tags - for (String tag in tags) { - if (tag.trim().isNotEmpty) { - await txn.insert( - 'Tags', - {'name': tag, 'task_uuid': uuid, 'task_id': id}, - ); - } - } - }); - } catch (e) { - debugPrint('Error setting tags for task $uuid: $e'); - } - } - - // depends methods - Future> getDependsForTask(String uuid, int id) async { - ensureDatabaseIsOpen(); - final db = _database; - if (db == null) { - return []; - } - final List> maps = await db.query( - 'Depends', - columns: ['d_uuid'], - where: 'task_uuid = ? AND task_id = ?', - whereArgs: [uuid, id], - ); - return List.generate(maps.length, (i) { - return maps[i]['d_uuid'] as String; - }); - } - - Future setDependsForTask( - String uuid, int id, List depends) async { - try { - ensureDatabaseIsOpen(); - final db = _database; - if (db == null) { - return; - } - await db.transaction((txn) async { - await txn.delete( - 'Depends', - where: 'task_uuid = ? AND task_id = ?', - whereArgs: [uuid, id], - ); - for (String dUuid in depends) { - if (dUuid.trim().isNotEmpty) { - await txn.insert( - 'Depends', - {'d_uuid': dUuid, 'task_uuid': uuid, 'task_id': id}, - ); - } - } - }); - } catch (e) { - debugPrint('Error setting depends for task $uuid: $e'); - } - } - - // annotations methods - Future>> getAnnotationsForTask( - String uuid, int id) async { - ensureDatabaseIsOpen(); - final db = _database; - if (db == null) { - return >[]; - } - final List> maps = await db.query( - 'Annotations', - columns: ['entry', 'description'], - where: 'task_uuid = ? AND task_id = ?', - whereArgs: [uuid, id], - ); - return List.generate(maps.length, (i) { - return { - 'entry': maps[i]['entry'] as String, - 'description': maps[i]['description'] as String, - }; - }); - } - - Future setAnnotationsForTask( - String uuid, int id, List> annotations) async { - try { - ensureDatabaseIsOpen(); - final db = _database; - if (db == null) { - return; - } - await db.transaction((txn) async { - await txn.delete( - 'Annotations', - where: 'task_uuid = ? AND task_id = ?', - whereArgs: [uuid, id], - ); - for (Map annotation in annotations) { - if (annotation['entry'] != null && - annotation['description'] != null) { - await txn.insert( - 'Annotations', - { - 'entry': annotation['entry'], - 'description': annotation['description'], - 'task_uuid': uuid, - 'task_id': id - }, - ); - } - } - }); - } catch (e) { - debugPrint('Error setting annotations for task $uuid: $e'); - } - } - - // Assemble TaskForC object - Future getObjectForTask(Map map) async { - final mutableMap = Map.from(map); - mutableMap['tags'] = - await getTagsForTask(mutableMap['uuid'], mutableMap['id']); - mutableMap['depends'] = - await getDependsForTask(mutableMap['uuid'], mutableMap['id']); - mutableMap['annotations'] = - await getAnnotationsForTask(mutableMap['uuid'], mutableMap['id']); - TaskForC task = TaskForC.fromJson(mutableMap); - return task; - } -} diff --git a/lib/app/v3/db/update.dart b/lib/app/v3/db/update.dart deleted file mode 100644 index 7d0f549f..00000000 --- a/lib/app/v3/db/update.dart +++ /dev/null @@ -1,87 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; -import 'package:taskwarrior/app/v3/net/add_task.dart'; -import 'package:taskwarrior/app/v3/net/complete.dart'; -import 'package:taskwarrior/app/v3/net/delete.dart'; -import 'package:taskwarrior/app/v3/net/modify.dart'; -import 'package:timezone/timezone.dart'; - -Future updateTasksInDatabase(List tasks) async { - debugPrint( - "Updating tasks in database... Total tasks from server: ${tasks.length}"); - var taskDatabase = TaskDatabase(); - await taskDatabase.open(); - // find tasks without UUID - List tasksWithoutUUID = await taskDatabase.findTasksWithoutUUIDs(); - - //add tasks without UUID to the server and delete them from database - for (var task in tasksWithoutUUID) { - try { - await addTaskAndDeleteFromDatabase( - task.description, - task.project != null ? task.project! : '', - task.due!, - task.priority!, - task.tags != null ? task.tags! : []); - } catch (e) { - debugPrint( - 'Failed to add task without UUID to server: $e ${task.tags} ${task.project}'); - } - } - - // update existing tasks in db - for (var task in tasks) { - var existingTask = await taskDatabase.getTaskByUuid(task.uuid!); - if (existingTask != null) { - if (task.modified!.compareTo(existingTask.modified!) > 0) { - await taskDatabase.updateTask(task); - } - } else { - // add new tasks to db - await taskDatabase.insertTask(task); - } - } - - var localTasks = await taskDatabase.fetchTasksFromDatabase(); - var localTasksMap = {for (var task in localTasks) task.uuid: task}; - - for (var serverTask in tasks) { - var localTask = localTasksMap[serverTask.uuid]; - - if (localTask == null) { - // Task doesn't exist in the local database, insert it - debugPrint( - 'Inserting new task from server: ${serverTask.description}, modified: ${serverTask.modified}'); - await taskDatabase.insertTask(serverTask); - } else { - var serverTaskModifiedDate = DateTime.parse(serverTask.modified!); - var localTaskModifiedDate = DateTime.parse(localTask.modified!); - - if (serverTaskModifiedDate.isAfter(localTaskModifiedDate)) { - // Server task is newer, update local database - await taskDatabase.updateTask(serverTask); - } else if (serverTaskModifiedDate.isBefore(localTaskModifiedDate)) { - // local task is newer, update server - debugPrint( - 'Updating task on server: ${localTask.description}, modified: ${localTask.modified}'); - await modifyTaskOnTaskwarrior( - localTask.description, - localTask.project!, - localTask.due!, - localTask.priority!, - localTask.status, - localTask.uuid!, - localTask.id.toString(), - localTask.tags != null - ? localTask.tags!.map((e) => e.toString()).toList() - : []); - if (localTask.status == 'completed') { - completeTask('email', localTask.uuid!); - } else if (localTask.status == 'deleted') { - deleteTask('email', localTask.uuid!); - } - } - } - } -} diff --git a/lib/app/v3/models/annotation.dart b/lib/app/v3/models/annotation.dart deleted file mode 100644 index e312b393..00000000 --- a/lib/app/v3/models/annotation.dart +++ /dev/null @@ -1,17 +0,0 @@ -class Annotation { - final String? entry; - final String? description; - Annotation({this.entry, this.description}); - factory Annotation.fromJson(Map json) { - return Annotation( - entry: json['entry'], - description: json['description'], - ); - } - Map toJson() { - return { - 'entry': entry, - 'description': description, - }; - } -} diff --git a/lib/app/v3/models/task.dart b/lib/app/v3/models/task.dart deleted file mode 100644 index 19503c58..00000000 --- a/lib/app/v3/models/task.dart +++ /dev/null @@ -1,95 +0,0 @@ -import 'package:flutter/material.dart'; -import "./annotation.dart"; - -class TaskForC { - final int id; - final String description; - final String? project; - final String status; - final String? uuid; - final double? urgency; - final String? priority; - final String? due; - final String? end; - final String entry; - final String? modified; - final List? tags; - // newer feilds in CCSync Model - final String? start; - final String? wait; - final String? rtype; - final String? recur; - final List? depends; - final List? annotations; - - TaskForC({ - required this.id, - required this.description, - required this.project, - required this.status, - required this.uuid, - required this.urgency, - required this.priority, - required this.due, - required this.end, - required this.entry, - required this.modified, - required this.tags, - required this.start, - required this.wait, - required this.rtype, - required this.recur, - required this.depends, - required this.annotations, - }); - - factory TaskForC.fromJson(Map json) { - debugPrint("Annotation fromJson: ${json['annotations'] == null}"); - return TaskForC( - id: json['id'], - description: json['description'], - project: json['project'], - status: json['status'], - uuid: json['uuid'], - urgency: json['urgency'].toDouble(), - priority: json['priority'], - due: json['due'], - end: json['end'], - entry: json['entry'], - modified: json['modified'], - tags: json['tags']?.map((tag) => tag.toString()).toList() ?? [], - start: json['start'], - wait: json['wait'], - rtype: json['rtype'], - recur: json['recur'], - depends: - json['depends']?.map((d) => d.toString()).toList() ?? [], - annotations: []); - } - - Map toJson() { - debugPrint("TAGS: $tags"); - return { - 'id': id, - 'description': description, - 'project': project, - 'status': status, - 'uuid': uuid, - 'urgency': urgency, - 'priority': priority, - 'due': due, - 'end': end, - 'entry': entry, - 'modified': modified, - 'tags': tags, - 'start': start, - 'wait': wait, - 'rtype': rtype, - 'recur': recur, - 'depends': depends, - 'annotations': annotations != null - ? annotations?.map((a) => a.toJson()).toList() - : >[], - }; - } -} diff --git a/lib/app/v3/net/add_task.dart b/lib/app/v3/net/add_task.dart deleted file mode 100644 index 370a5c27..00000000 --- a/lib/app/v3/net/add_task.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'dart:convert'; -import 'package:http/http.dart' as http; -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; - -Future addTaskAndDeleteFromDatabase(String description, String project, - String due, String priority, List tags) async { - var baseUrl = await CredentialsStorage.getApiUrl(); - String apiUrl = '$baseUrl/add-task'; - var c = await CredentialsStorage.getClientId(); - var e = await CredentialsStorage.getEncryptionSecret(); - debugPrint("Database Adding Tags $tags $description"); - debugPrint(c); - debugPrint(e); - var res = await http.post( - Uri.parse(apiUrl), - headers: { - 'Content-Type': 'text/plain', - }, - body: jsonEncode({ - 'email': 'email', - 'encryptionSecret': e, - 'UUID': c, - 'description': description, - 'project': project, - 'due': due, - 'priority': priority, - 'tags': tags - }), - ); - debugPrint('Database res ${res.body}'); - var taskDatabase = TaskDatabase(); - await taskDatabase.open(); - await taskDatabase.deleteTask( - description: description, due: due, project: project, priority: priority); -} diff --git a/lib/app/v3/net/complete.dart b/lib/app/v3/net/complete.dart deleted file mode 100644 index b3718146..00000000 --- a/lib/app/v3/net/complete.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'dart:convert'; -import 'package:http/http.dart' as http; -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart'; -import 'package:path/path.dart'; - -Future completeTask(String email, String taskUuid) async { - var c = await CredentialsStorage.getClientId(); - var e = await CredentialsStorage.getEncryptionSecret(); - var baseUrl = await CredentialsStorage.getApiUrl(); - final url = Uri.parse('$baseUrl/complete-task'); - final body = jsonEncode({ - 'email': email, - 'encryptionSecret': e, - 'UUID': c, - 'taskuuid': taskUuid, - }); - - try { - final response = await http.post( - url, - headers: { - 'Content-Type': 'application/json', - }, - body: body, - ); - - if (response.statusCode == 200) { - debugPrint('Task completed successfully on server'); - } else { - debugPrint('Failed to complete task: ${response.statusCode}'); - ScaffoldMessenger.of(context as BuildContext).showSnackBar(const SnackBar( - content: Text( - "Failed to complete task!", - style: TextStyle(color: Colors.red), - ))); - } - } catch (e) { - debugPrint('Error completing task: $e'); - } -} diff --git a/lib/app/v3/net/delete.dart b/lib/app/v3/net/delete.dart deleted file mode 100644 index 8873377b..00000000 --- a/lib/app/v3/net/delete.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'dart:convert'; -import 'package:http/http.dart' as http; -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart'; - -Future deleteTask(String email, String taskUuid) async { - var baseUrl = await CredentialsStorage.getApiUrl(); - var c = await CredentialsStorage.getClientId(); - var e = await CredentialsStorage.getEncryptionSecret(); - final url = Uri.parse('$baseUrl/delete-task'); - final body = jsonEncode({ - 'email': email, - 'encryptionSecret': e, - 'UUID': c, - 'taskuuid': taskUuid, - }); - - try { - final response = await http.post( - url, - headers: { - 'Content-Type': 'application/json', - }, - body: body, - ); - - if (response.statusCode == 200) { - debugPrint('Task deleted successfully on server'); - } else { - debugPrint('Failed to delete task: ${response.statusCode}'); - } - } catch (e) { - debugPrint('Error deleting task: $e'); - } -} diff --git a/lib/app/v3/net/fetch.dart b/lib/app/v3/net/fetch.dart deleted file mode 100644 index c38ef639..00000000 --- a/lib/app/v3/net/fetch.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; -import 'package:taskwarrior/app/v3/net/origin.dart'; -import 'package:http/http.dart' as http; - -Future> fetchTasks(String uuid, String encryptionSecret) async { - var baseUrl = await CredentialsStorage.getApiUrl(); - try { - String url = - '$baseUrl/tasks?email=email&origin=$origin&UUID=$uuid&encryptionSecret=$encryptionSecret'; - - var response = await http.get(Uri.parse(url), headers: { - "Content-Type": "application/json", - }).timeout(const Duration(seconds: 10000)); - debugPrint("Fetch tasks response: ${response.statusCode}"); - debugPrint("Fetch tasks body: ${response.body}"); - if (response.statusCode == 200) { - List allTasks = jsonDecode(response.body); - debugPrint(allTasks.toString()); - return allTasks.map((task) => TaskForC.fromJson(task)).toList(); - } else { - throw Exception('Failed to load tasks'); - } - } catch (e, s) { - debugPrint('Error fetching tasks: $e\n $s'); - - return []; - } -} diff --git a/lib/app/v3/net/modify.dart b/lib/app/v3/net/modify.dart deleted file mode 100644 index 1d32976a..00000000 --- a/lib/app/v3/net/modify.dart +++ /dev/null @@ -1,73 +0,0 @@ -import 'dart:convert'; -import 'package:get/get.dart'; -import 'package:http/http.dart' as http; -import 'package:path/path.dart'; -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; - -Future modifyTaskOnTaskwarrior( - String description, - String project, - String due, - String priority, - String status, - String taskuuid, - String id, - List newTags) async { - var baseUrl = await CredentialsStorage.getApiUrl(); - var c = await CredentialsStorage.getClientId(); - var e = await CredentialsStorage.getEncryptionSecret(); - String apiUrl = '$baseUrl/modify-task'; - debugPrint(c); - debugPrint(e); - debugPrint("modifyTaskOnTaskwarrior called"); - debugPrint("description: $description project: $project due: $due " - "priority: $priority status: $status taskuuid: $taskuuid id: $id tags: $newTags" - "body: ${jsonEncode({ - "email": "e", - "encryptionSecret": e, - "UUID": c, - "description": description, - "priority": priority, - "project": project, - "due": due, - "status": status, - "taskuuid": taskuuid, - "taskId": id, - "tags": newTags.isNotEmpty ? newTags : null - })}"); - final response = await http.post( - Uri.parse(apiUrl), - headers: { - 'Content-Type': 'text/plain', - }, - body: jsonEncode({ - "email": "e", - "encryptionSecret": e, - "UUID": c, - "description": description, - "priority": priority, - "project": project, - "due": due, - "status": status, - "taskuuid": taskuuid, - "taskId": id, - "tags": newTags.isNotEmpty ? newTags : null - }), - ); - debugPrint('Modify task response body: ${response.body}'); - if (response.statusCode < 200 || response.statusCode >= 300) { - Get.showSnackbar(GetSnackBar( - title: 'Error', - message: - 'Failed to modify task on Taskwarrior server. ${response.statusCode}', - duration: Duration(seconds: 3), - )); - } - - var taskDatabase = TaskDatabase(); - await taskDatabase.open(); - await taskDatabase.deleteTask( - description: description, due: due, project: project, priority: priority); -} diff --git a/lib/app/v3/net/origin.dart b/lib/app/v3/net/origin.dart deleted file mode 100644 index 4cc70540..00000000 --- a/lib/app/v3/net/origin.dart +++ /dev/null @@ -1 +0,0 @@ -String origin = 'http://localhost:8080'; diff --git a/lib/main.dart b/lib/main.dart deleted file mode 100644 index 8fb861a2..00000000 --- a/lib/main.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/debug_logger/log_databse_helper.dart'; -import 'package:taskwarrior/app/utils/themes/dark_theme.dart'; -import 'package:taskwarrior/app/utils/themes/light_theme.dart'; -import 'app/routes/app_pages.dart'; - -LogDatabaseHelper _logDatabaseHelper = LogDatabaseHelper(); - -void main() async { - debugPrint = (String? message, {int? wrapWidth}) { - if (message != null) { - debugPrintSynchronously(message, wrapWidth: wrapWidth); - _logDatabaseHelper.insertLog(message); - } - }; - - WidgetsFlutterBinding.ensureInitialized(); - await AppSettings.init(); - - runApp( - GetMaterialApp( - darkTheme: darkTheme, - theme: lightTheme, - title: "Application", - initialRoute: AppPages.INITIAL, - getPages: AppPages.routes, - themeMode: AppSettings.isDarkMode ? ThemeMode.dark : ThemeMode.light, - ), - ); -} diff --git a/linux/.gitignore b/linux/.gitignore deleted file mode 100644 index d3896c98..00000000 --- a/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -flutter/ephemeral diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt deleted file mode 100644 index 3e5728a9..00000000 --- a/linux/CMakeLists.txt +++ /dev/null @@ -1,145 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.10) -project(runner LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "taskwarrior") -# The unique GTK application identifier for this application. See: -# https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.ccextractor.taskwarrior") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(SET CMP0063 NEW) - -# Load bundled libraries from the lib/ directory relative to the binary. -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Root filesystem for cross-building. -if(FLUTTER_TARGET_PLATFORM_SYSROOT) - set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -endif() - -# Define build configuration options. -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() - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_14) - target_compile_options(${TARGET} PRIVATE -Wall -Werror) - target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") - target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) - -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") - -# Define the application target. To change its name, change BINARY_NAME above, -# not the value here, or `flutter run` will no longer work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add dependency libraries. Add any application-specific dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) - -# Only the install-generated bundle's copy of the executable will launch -# correctly, since the resources must in the right relative locations. To avoid -# people trying to run the unbundled copy, put it in a subdirectory instead of -# the default top-level location. -set_target_properties(${BINARY_NAME} - PROPERTIES - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" -) - - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# By default, "installing" just makes a relocatable bundle in the build -# directory. -set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -# Start with a clean build bundle directory every time. -install(CODE " - file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") - " COMPONENT Runtime) - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") - -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) - -foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) - install(FILES "${bundled_library}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endforeach(bundled_library) - -# Copy the native assets provided by the build.dart from all packages. -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") -install(DIRECTORY "${NATIVE_ASSETS_DIR}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -# 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. -if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") - install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() diff --git a/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt deleted file mode 100644 index d5bd0164..00000000 --- a/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.10) - -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. - -# Serves the same purpose as list(TRANSFORM ... PREPEND ...), -# which isn't available in 3.10. -function(list_prepend LIST_NAME PREFIX) - set(NEW_LIST "") - foreach(element ${${LIST_NAME}}) - list(APPEND NEW_LIST "${PREFIX}${element}") - endforeach(element) - set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) -endfunction() - -# === Flutter Library === -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) -pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) - -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") - -# 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/lib/libapp.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "fl_basic_message_channel.h" - "fl_binary_codec.h" - "fl_binary_messenger.h" - "fl_dart_project.h" - "fl_engine.h" - "fl_json_message_codec.h" - "fl_json_method_codec.h" - "fl_message_codec.h" - "fl_method_call.h" - "fl_method_channel.h" - "fl_method_codec.h" - "fl_method_response.h" - "fl_plugin_registrar.h" - "fl_plugin_registry.h" - "fl_standard_message_codec.h" - "fl_standard_method_codec.h" - "fl_string_codec.h" - "fl_value.h" - "fl_view.h" - "flutter_linux.h" -) -list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") -target_link_libraries(flutter INTERFACE - PkgConfig::GTK - PkgConfig::GLIB - PkgConfig::GIO -) -add_dependencies(flutter 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. -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CMAKE_CURRENT_BINARY_DIR}/_phony_ - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" - ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} -) diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 13807bb2..00000000 --- a/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,23 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include -#include -#include - -void fl_register_plugins(FlPluginRegistry* registry) { - g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); - file_selector_plugin_register_with_registrar(file_selector_linux_registrar); - g_autoptr(FlPluginRegistrar) flutter_timezone_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterTimezonePlugin"); - flutter_timezone_plugin_register_with_registrar(flutter_timezone_registrar); - g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); - url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); -} diff --git a/linux/flutter/generated_plugin_registrant.h b/linux/flutter/generated_plugin_registrant.h deleted file mode 100644 index e0f0a47b..00000000 --- a/linux/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void fl_register_plugins(FlPluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake deleted file mode 100644 index b01d1fd9..00000000 --- a/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,26 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - file_selector_linux - flutter_timezone - url_launcher_linux -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux 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) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/linux/main.cc b/linux/main.cc deleted file mode 100644 index e7c5c543..00000000 --- a/linux/main.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "my_application.h" - -int main(int argc, char** argv) { - g_autoptr(MyApplication) app = my_application_new(); - return g_application_run(G_APPLICATION(app), argc, argv); -} diff --git a/linux/my_application.cc b/linux/my_application.cc deleted file mode 100644 index 6ce40ec6..00000000 --- a/linux/my_application.cc +++ /dev/null @@ -1,124 +0,0 @@ -#include "my_application.h" - -#include -#ifdef GDK_WINDOWING_X11 -#include -#endif - -#include "flutter/generated_plugin_registrant.h" - -struct _MyApplication { - GtkApplication parent_instance; - char** dart_entrypoint_arguments; -}; - -G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) - -// Implements GApplication::activate. -static void my_application_activate(GApplication* application) { - MyApplication* self = MY_APPLICATION(application); - GtkWindow* window = - GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); - - // Use a header bar when running in GNOME as this is the common style used - // by applications and is the setup most users will be using (e.g. Ubuntu - // desktop). - // If running on X and not using GNOME then just use a traditional title bar - // in case the window manager does more exotic layout, e.g. tiling. - // If running on Wayland assume the header bar will work (may need changing - // if future cases occur). - gboolean use_header_bar = TRUE; -#ifdef GDK_WINDOWING_X11 - GdkScreen* screen = gtk_window_get_screen(window); - if (GDK_IS_X11_SCREEN(screen)) { - const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); - if (g_strcmp0(wm_name, "GNOME Shell") != 0) { - use_header_bar = FALSE; - } - } -#endif - if (use_header_bar) { - GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); - gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "taskwarrior"); - gtk_header_bar_set_show_close_button(header_bar, TRUE); - gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); - } else { - gtk_window_set_title(window, "taskwarrior"); - } - - gtk_window_set_default_size(window, 1280, 720); - gtk_widget_show(GTK_WIDGET(window)); - - g_autoptr(FlDartProject) project = fl_dart_project_new(); - fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); - - FlView* view = fl_view_new(project); - gtk_widget_show(GTK_WIDGET(view)); - gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); - - fl_register_plugins(FL_PLUGIN_REGISTRY(view)); - - gtk_widget_grab_focus(GTK_WIDGET(view)); -} - -// Implements GApplication::local_command_line. -static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { - MyApplication* self = MY_APPLICATION(application); - // Strip out the first argument as it is the binary name. - self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); - - g_autoptr(GError) error = nullptr; - if (!g_application_register(application, nullptr, &error)) { - g_warning("Failed to register: %s", error->message); - *exit_status = 1; - return TRUE; - } - - g_application_activate(application); - *exit_status = 0; - - return TRUE; -} - -// Implements GApplication::startup. -static void my_application_startup(GApplication* application) { - //MyApplication* self = MY_APPLICATION(object); - - // Perform any actions required at application startup. - - G_APPLICATION_CLASS(my_application_parent_class)->startup(application); -} - -// Implements GApplication::shutdown. -static void my_application_shutdown(GApplication* application) { - //MyApplication* self = MY_APPLICATION(object); - - // Perform any actions required at application shutdown. - - G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); -} - -// Implements GObject::dispose. -static void my_application_dispose(GObject* object) { - MyApplication* self = MY_APPLICATION(object); - g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); - G_OBJECT_CLASS(my_application_parent_class)->dispose(object); -} - -static void my_application_class_init(MyApplicationClass* klass) { - G_APPLICATION_CLASS(klass)->activate = my_application_activate; - G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; - G_APPLICATION_CLASS(klass)->startup = my_application_startup; - G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; - G_OBJECT_CLASS(klass)->dispose = my_application_dispose; -} - -static void my_application_init(MyApplication* self) {} - -MyApplication* my_application_new() { - return MY_APPLICATION(g_object_new(my_application_get_type(), - "application-id", APPLICATION_ID, - "flags", G_APPLICATION_NON_UNIQUE, - nullptr)); -} diff --git a/linux/my_application.h b/linux/my_application.h deleted file mode 100644 index 72271d5e..00000000 --- a/linux/my_application.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef FLUTTER_MY_APPLICATION_H_ -#define FLUTTER_MY_APPLICATION_H_ - -#include - -G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, - GtkApplication) - -/** - * my_application_new: - * - * Creates a new Flutter-based application. - * - * Returns: a new #MyApplication. - */ -MyApplication* my_application_new(); - -#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/macos/.gitignore b/macos/.gitignore deleted file mode 100644 index 746adbb6..00000000 --- a/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/dgph -**/xcuserdata/ diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index 4b81f9b2..00000000 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index 5caa9d15..00000000 --- a/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index cb98b370..00000000 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - -import connectivity_plus -import file_picker -import file_picker_writable -import file_selector_macos -import flutter_local_notifications -import flutter_timezone -import package_info_plus -import path_provider_foundation -import shared_preferences_foundation -import sqflite_darwin -import url_launcher_macos - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) - FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) - FilePickerWritablePlugin.register(with: registry.registrar(forPlugin: "FilePickerWritablePlugin")) - FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) - FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) - FlutterTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterTimezonePlugin")) - FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) - PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) - SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) - UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) -} diff --git a/macos/Podfile b/macos/Podfile deleted file mode 100644 index c795730d..00000000 --- a/macos/Podfile +++ /dev/null @@ -1,43 +0,0 @@ -platform :osx, '10.14' - -# 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', 'ephemeral', '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 Flutter-Generated.xcconfig, then run \"flutter pub get\"" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_macos_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) - target 'RunnerTests' do - inherit! :search_paths - end -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_macos_build_settings(target) - end -end diff --git a/macos/Podfile.lock b/macos/Podfile.lock deleted file mode 100644 index 4e4f915c..00000000 --- a/macos/Podfile.lock +++ /dev/null @@ -1,85 +0,0 @@ -PODS: - - connectivity_plus (0.0.1): - - FlutterMacOS - - file_picker (0.0.1): - - FlutterMacOS - - file_picker_writable (0.0.1): - - FlutterMacOS - - file_selector_macos (0.0.1): - - FlutterMacOS - - flutter_local_notifications (0.0.1): - - FlutterMacOS - - flutter_timezone (0.1.0): - - FlutterMacOS - - FlutterMacOS (1.0.0) - - package_info_plus (0.0.1): - - FlutterMacOS - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - - shared_preferences_foundation (0.0.1): - - Flutter - - FlutterMacOS - - sqflite_darwin (0.0.4): - - Flutter - - FlutterMacOS - - url_launcher_macos (0.0.1): - - FlutterMacOS - -DEPENDENCIES: - - connectivity_plus (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos`) - - file_picker (from `Flutter/ephemeral/.symlinks/plugins/file_picker/macos`) - - file_picker_writable (from `Flutter/ephemeral/.symlinks/plugins/file_picker_writable/macos`) - - file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`) - - flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`) - - flutter_timezone (from `Flutter/ephemeral/.symlinks/plugins/flutter_timezone/macos`) - - FlutterMacOS (from `Flutter/ephemeral`) - - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - - sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`) - - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) - -EXTERNAL SOURCES: - connectivity_plus: - :path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos - file_picker: - :path: Flutter/ephemeral/.symlinks/plugins/file_picker/macos - file_picker_writable: - :path: Flutter/ephemeral/.symlinks/plugins/file_picker_writable/macos - file_selector_macos: - :path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos - flutter_local_notifications: - :path: Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos - flutter_timezone: - :path: Flutter/ephemeral/.symlinks/plugins/flutter_timezone/macos - FlutterMacOS: - :path: Flutter/ephemeral - package_info_plus: - :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos - path_provider_foundation: - :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin - shared_preferences_foundation: - :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin - sqflite_darwin: - :path: Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin - url_launcher_macos: - :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos - -SPEC CHECKSUMS: - connectivity_plus: 4adf20a405e25b42b9c9f87feff8f4b6fde18a4e - file_picker: 7584aae6fa07a041af2b36a2655122d42f578c1a - file_picker_writable: 016b61062ce0bfdd9f4e6cc43109a9d12c5023e7 - file_selector_macos: 6280b52b459ae6c590af5d78fc35c7267a3c4b31 - flutter_local_notifications: 13862b132e32eb858dea558a86d45d08daeacfe7 - flutter_timezone: d59eea86178cbd7943cd2431cc2eaa9850f935d8 - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - package_info_plus: f0052d280d17aa382b932f399edf32507174e870 - path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 - shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 - sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0 - url_launcher_macos: 0fba8ddabfc33ce0a9afe7c5fef5aab3d8d2d673 - -PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 - -COCOAPODS: 1.16.2 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 0c0079a0..00000000 --- a/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,801 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXAggregateTarget section */ - 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; - buildPhases = ( - 33CC111E2044C6BF0003C045 /* ShellScript */, - ); - dependencies = ( - ); - name = "Flutter Assemble"; - productName = FLX; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 27C525DBC73356ACD42A9E53 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A10071A838AFFDE1DC6CFA82 /* Pods_Runner.framework */; }; - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - DC4B7B83B7803BEDE7B2678D /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08D91DE580BDB610D00D5E59 /* Pods_RunnerTests.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC10EC2044A3C60003C045; - remoteInfo = Runner; - }; - 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC111A2044C6BA0003C045; - remoteInfo = FLX; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 33CC110E2044A8840003C045 /* Bundle Framework */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 08D91DE580BDB610D00D5E59 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 215CF82755E4CD0770153392 /* 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 = ""; }; - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* taskwarrior.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = taskwarrior.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; - 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; - 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; - 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; - 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; - 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 4DDCC88C0E1D6F9D445CE756 /* 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 = ""; }; - 52FE70A48FE42CBA88069E64 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - 9A5FCE63F67458C3E82D5AFC /* 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 = ""; }; - A10071A838AFFDE1DC6CFA82 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BB7100FD5D8A8E4062128BB2 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - D476CD08624C6C7F31DB3D9B /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 331C80D2294CF70F00263BE5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DC4B7B83B7803BEDE7B2678D /* Pods_RunnerTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 27C525DBC73356ACD42A9E53 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 331C80D6294CF71000263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C80D7294CF71000263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; - 33BA886A226E78AF003329D5 /* Configs */ = { - isa = PBXGroup; - children = ( - 33E5194F232828860026EE4D /* AppInfo.xcconfig */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, - ); - path = Configs; - sourceTree = ""; - }; - 33CC10E42044A3C60003C045 = { - isa = PBXGroup; - children = ( - 33FAB671232836740065AC1E /* Runner */, - 33CEB47122A05771004F2AC0 /* Flutter */, - 331C80D6294CF71000263BE5 /* RunnerTests */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - 4446E564A3B9906D8A03DAD4 /* Pods */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* taskwarrior.app */, - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 33CC11242044D66E0003C045 /* Resources */ = { - isa = PBXGroup; - children = ( - 33CC10F22044A3C60003C045 /* Assets.xcassets */, - 33CC10F42044A3C60003C045 /* MainMenu.xib */, - 33CC10F72044A3C60003C045 /* Info.plist */, - ); - name = Resources; - path = ..; - sourceTree = ""; - }; - 33CEB47122A05771004F2AC0 /* Flutter */ = { - isa = PBXGroup; - children = ( - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, - ); - path = Flutter; - sourceTree = ""; - }; - 33FAB671232836740065AC1E /* Runner */ = { - isa = PBXGroup; - children = ( - 33CC10F02044A3C60003C045 /* AppDelegate.swift */, - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, - 33E51913231747F40026EE4D /* DebugProfile.entitlements */, - 33E51914231749380026EE4D /* Release.entitlements */, - 33CC11242044D66E0003C045 /* Resources */, - 33BA886A226E78AF003329D5 /* Configs */, - ); - path = Runner; - sourceTree = ""; - }; - 4446E564A3B9906D8A03DAD4 /* Pods */ = { - isa = PBXGroup; - children = ( - 4DDCC88C0E1D6F9D445CE756 /* Pods-Runner.debug.xcconfig */, - 215CF82755E4CD0770153392 /* Pods-Runner.release.xcconfig */, - 9A5FCE63F67458C3E82D5AFC /* Pods-Runner.profile.xcconfig */, - 52FE70A48FE42CBA88069E64 /* Pods-RunnerTests.debug.xcconfig */, - BB7100FD5D8A8E4062128BB2 /* Pods-RunnerTests.release.xcconfig */, - D476CD08624C6C7F31DB3D9B /* Pods-RunnerTests.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - A10071A838AFFDE1DC6CFA82 /* Pods_Runner.framework */, - 08D91DE580BDB610D00D5E59 /* Pods_RunnerTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 331C80D4294CF70F00263BE5 /* RunnerTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; - buildPhases = ( - 8B39648B4370CE53C407CDDE /* [CP] Check Pods Manifest.lock */, - 331C80D1294CF70F00263BE5 /* Sources */, - 331C80D2294CF70F00263BE5 /* Frameworks */, - 331C80D3294CF70F00263BE5 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 331C80DA294CF71000263BE5 /* PBXTargetDependency */, - ); - name = RunnerTests; - productName = RunnerTests; - productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 32602EC495716637807DE574 /* [CP] Check Pods Manifest.lock */, - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - 57127D9BFB21B6F0C92D052B /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* taskwarrior.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 331C80D4294CF70F00263BE5 = { - CreatedOnToolsVersion = 14.0; - TestTargetID = 33CC10EC2044A3C60003C045; - }; - 33CC10EC2044A3C60003C045 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.Sandbox = { - enabled = 1; - }; - }; - }; - 33CC111A2044C6BA0003C045 = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 33CC10E42044A3C60003C045; - productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 33CC10EC2044A3C60003C045 /* Runner */, - 331C80D4294CF70F00263BE5 /* RunnerTests */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 331C80D3294CF70F00263BE5 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 32602EC495716637807DE574 /* [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; - }; - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; - }; - 33CC111E2044C6BF0003C045 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - Flutter/ephemeral/FlutterInputs.xcfilelist, - ); - inputPaths = ( - Flutter/ephemeral/tripwire, - ); - outputFileListPaths = ( - Flutter/ephemeral/FlutterOutputs.xcfilelist, - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; - }; - 57127D9BFB21B6F0C92D052B /* [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; - }; - 8B39648B4370CE53C407CDDE /* [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-RunnerTests-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 */ - 331C80D1294CF70F00263BE5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10E92044A3C60003C045 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC10EC2044A3C60003C045 /* Runner */; - targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; - }; - 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; - targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 33CC10F52044A3C60003C045 /* Base */, - ); - name = MainMenu.xib; - path = Runner; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 331C80DB294CF71000263BE5 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 52FE70A48FE42CBA88069E64 /* Pods-RunnerTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.ccextractor.taskwarrior.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/taskwarrior.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/taskwarrior"; - }; - name = Debug; - }; - 331C80DC294CF71000263BE5 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BB7100FD5D8A8E4062128BB2 /* Pods-RunnerTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.ccextractor.taskwarrior.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/taskwarrior.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/taskwarrior"; - }; - name = Release; - }; - 331C80DD294CF71000263BE5 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D476CD08624C6C7F31DB3D9B /* Pods-RunnerTests.profile.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.ccextractor.taskwarrior.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/taskwarrior.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/taskwarrior"; - }; - name = Profile; - }; - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - 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_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - 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_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Profile; - }; - 338D0CEA231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Profile; - }; - 338D0CEB231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Profile; - }; - 33CC10F92044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - 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_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - 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_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - 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_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 33CC10FA2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - 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_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - 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_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 33CC10FC2044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 33CC10FD2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 33CC111C2044C6BA0003C045 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 33CC111D2044C6BA0003C045 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 331C80DB294CF71000263BE5 /* Debug */, - 331C80DC294CF71000263BE5 /* Release */, - 331C80DD294CF71000263BE5 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10F92044A3C60003C045 /* Debug */, - 33CC10FA2044A3C60003C045 /* Release */, - 338D0CE9231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10FC2044A3C60003C045 /* Debug */, - 33CC10FD2044A3C60003C045 /* Release */, - 338D0CEA231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC111C2044C6BA0003C045 /* Debug */, - 33CC111D2044C6BA0003C045 /* Release */, - 338D0CEB231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 33CC10E52044A3C60003C045 /* Project object */; -} diff --git a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 5bce9b45..00000000 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift deleted file mode 100644 index b3c17614..00000000 --- a/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import Cocoa -import FlutterMacOS - -@main -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } - - override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { - return true - } -} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f1..00000000 --- a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_16.png", - "scale" : "1x" - }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_128.png", - "scale" : "1x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "1x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 82b6f9d9..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index 13b35eba..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 0a3f5fa4..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bdb57226..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index f083318e..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index 326c0e72..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 2f1632cf..00000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 80e867a4..00000000 --- a/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 4a8c5a8d..00000000 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// Application-level settings for the Runner target. -// -// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the -// future. If not, the values below would default to using the project name when this becomes a -// 'flutter create' template. - -// The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = taskwarrior - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.ccextractor.taskwarrior - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2024 com.ccextractor. All rights reserved. diff --git a/macos/Runner/Configs/Debug.xcconfig b/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd94..00000000 --- a/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Release.xcconfig b/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f495..00000000 --- a/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Warnings.xcconfig b/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf47..00000000 --- a/macos/Runner/Configs/Warnings.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings -GCC_WARN_UNDECLARED_SELECTOR = YES -CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES -CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_PRAGMA_PACK = YES -CLANG_WARN_STRICT_PROTOTYPES = YES -CLANG_WARN_COMMA = YES -GCC_WARN_STRICT_SELECTOR_MATCH = YES -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES -CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES -GCC_WARN_SHADOW = YES -CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dbb44cbc..00000000 --- a/macos/Runner/DebugProfile.entitlements +++ /dev/null @@ -1,16 +0,0 @@ - - - - - com.apple.security.network.client - - com.apple.security.app-sandbox - - com.apple.security.cs.allow-jit - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - - diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist deleted file mode 100644 index 4789daa6..00000000 --- a/macos/Runner/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - $(PRODUCT_COPYRIGHT) - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 3cc05eb2..00000000 --- a/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a4..00000000 --- a/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/macos/RunnerTests/RunnerTests.swift b/macos/RunnerTests/RunnerTests.swift deleted file mode 100644 index 61f3bd1f..00000000 --- a/macos/RunnerTests/RunnerTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Cocoa -import FlutterMacOS -import XCTest - -class RunnerTests: XCTestCase { - - func testExample() { - // If you add code to the Runner application, consider adding tests here. - // See https://developer.apple.com/documentation/xctest for more information about using XCTest. - } - -} diff --git a/metadata/com.ccextractor.taskwarrior.nightly.yml b/metadata/com.ccextractor.taskwarrior.nightly.yml new file mode 100644 index 00000000..7d87857b --- /dev/null +++ b/metadata/com.ccextractor.taskwarrior.nightly.yml @@ -0,0 +1,9 @@ +AuthorName: 'CCExtractor Development' +Categories: +- taskwarrior-flutter +CurrentVersionCode: 2147483647 +IssueTracker: 'https://github.com/CCExtractor/taskwarrior-flutter/issues' +Name: Taskwarrior Nightly +SourceCode: 'https://github.com/CCExtractor/taskwarrior-flutter' +Summary: 'Taskwarrior is Free and Open Source Software that manages your TODO list from the command line. It is flexible, fast, and unobtrusive. It does its job then gets out of your way. The CLI tool and other relevant documentation can be found at Taskwarrior. This project aims to build an app for Taskwarrior. It is your task management app across all platforms. It helps you manage your tasks and filter them as per your needs.' +WebSite: 'https://github.com/CCExtractor/taskwarrior-flutter' diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index a3cb1127..00000000 --- a/pubspec.lock +++ /dev/null @@ -1,1603 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57 - url: "https://pub.dev" - source: hosted - version: "80.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e" - url: "https://pub.dev" - source: hosted - version: "7.3.0" - ansicolor: - dependency: transitive - description: - name: ansicolor - sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" - url: "https://pub.dev" - source: hosted - version: "2.0.3" - archive: - dependency: transitive - description: - name: archive - sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742" - url: "https://pub.dev" - source: hosted - version: "4.0.4" - args: - dependency: transitive - description: - name: args - sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 - url: "https://pub.dev" - source: hosted - version: "2.7.0" - async: - dependency: transitive - description: - name: async - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 - url: "https://pub.dev" - source: hosted - version: "2.12.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - build: - dependency: transitive - description: - name: build - sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 - url: "https://pub.dev" - source: hosted - version: "2.4.2" - build_config: - dependency: transitive - description: - name: build_config - sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" - url: "https://pub.dev" - source: hosted - version: "1.1.2" - build_daemon: - dependency: transitive - description: - name: build_daemon - sha256: "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa" - url: "https://pub.dev" - source: hosted - version: "4.0.4" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0 - url: "https://pub.dev" - source: hosted - version: "2.4.4" - build_runner: - dependency: "direct dev" - description: - name: build_runner - sha256: "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99" - url: "https://pub.dev" - source: hosted - version: "2.4.15" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021" - url: "https://pub.dev" - source: hosted - version: "8.0.0" - built_collection: - dependency: "direct main" - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 - url: "https://pub.dev" - source: hosted - version: "8.9.5" - characters: - dependency: transitive - description: - name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff - url: "https://pub.dev" - source: hosted - version: "2.0.3" - cli_util: - dependency: transitive - description: - name: cli_util - sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c - url: "https://pub.dev" - source: hosted - version: "0.4.2" - clock: - dependency: transitive - description: - name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" - url: "https://pub.dev" - source: hosted - version: "4.10.1" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - color: - dependency: transitive - description: - name: color - sha256: ddcdf1b3badd7008233f5acffaf20ca9f5dc2cd0172b75f68f24526a5f5725cb - url: "https://pub.dev" - source: hosted - version: "3.0.0" - connectivity_plus: - dependency: "direct main" - description: - name: connectivity_plus - sha256: "04bf81bb0b77de31557b58d052b24b3eee33f09a6e7a8c68a3e247c7df19ec27" - url: "https://pub.dev" - source: hosted - version: "6.1.3" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - sha256: "42657c1715d48b167930d5f34d00222ac100475f73d10162ddf43e714932f204" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - convert: - dependency: transitive - description: - name: convert - sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 - url: "https://pub.dev" - source: hosted - version: "3.1.2" - coverage: - dependency: transitive - description: - name: coverage - sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 - url: "https://pub.dev" - source: hosted - version: "1.11.1" - cross_file: - dependency: transitive - description: - name: cross_file - sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" - url: "https://pub.dev" - source: hosted - version: "0.3.4+2" - crypto: - dependency: "direct main" - description: - name: crypto - sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" - url: "https://pub.dev" - source: hosted - version: "3.0.6" - csslib: - dependency: transitive - description: - name: csslib - sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" - url: "https://pub.dev" - source: hosted - version: "1.0.2" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://pub.dev" - source: hosted - version: "1.0.8" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - dartx: - dependency: transitive - description: - name: dartx - sha256: "8b25435617027257d43e6508b5fe061012880ddfdaa75a71d607c3de2a13d244" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - date_format: - dependency: "direct main" - description: - name: date_format - sha256: a48254e60bdb7f1d5a15cac7f86e37491808056c0a99dbdc850841def4754ddc - url: "https://pub.dev" - source: hosted - version: "2.0.9" - dbus: - dependency: transitive - description: - name: dbus - sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" - url: "https://pub.dev" - source: hosted - version: "0.7.11" - dio: - dependency: transitive - description: - name: dio - sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9" - url: "https://pub.dev" - source: hosted - version: "5.8.0+1" - dio_web_adapter: - dependency: transitive - description: - name: dio_web_adapter - sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - double_back_to_close_app: - dependency: "direct main" - description: - name: double_back_to_close_app - sha256: d19ce4e2f8d2cb9f35bdbc90eecd5c731cc0e6216f5e8f14e7d1e076dafb344a - url: "https://pub.dev" - source: hosted - version: "2.1.0" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" - url: "https://pub.dev" - source: hosted - version: "1.3.2" - ffi: - dependency: transitive - description: - name: ffi - sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - file: - dependency: transitive - description: - name: file - sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://pub.dev" - source: hosted - version: "7.0.1" - file_picker: - dependency: "direct main" - description: - name: file_picker - sha256: "7423298f08f6fc8cce05792bae329f9a93653fc9c08712831b1a55540127995d" - url: "https://pub.dev" - source: hosted - version: "9.0.2" - file_picker_writable: - dependency: "direct main" - description: - path: "." - ref: "feature/fix-kotlin-issue" - resolved-ref: ff1a0715872058707cbe1fe00ca76d234a986845 - url: "https://github.com/amake/file_picker_writable.git" - source: git - version: "2.1.0+1" - file_selector: - dependency: "direct main" - description: - name: file_selector - sha256: "5019692b593455127794d5718304ff1ae15447dea286cdda9f0db2a796a1b828" - url: "https://pub.dev" - source: hosted - version: "1.0.3" - file_selector_android: - dependency: transitive - description: - name: file_selector_android - sha256: f3a3d48a36d1640b4dca22a086f26b426c246925a80eddc2953120775fbcf86a - url: "https://pub.dev" - source: hosted - version: "0.5.1+13" - file_selector_ios: - dependency: transitive - description: - name: file_selector_ios - sha256: "94b98ad950b8d40d96fee8fa88640c2e4bd8afcdd4817993bd04e20310f45420" - url: "https://pub.dev" - source: hosted - version: "0.5.3+1" - file_selector_linux: - dependency: transitive - description: - name: file_selector_linux - sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" - url: "https://pub.dev" - source: hosted - version: "0.9.3+2" - file_selector_macos: - dependency: transitive - description: - name: file_selector_macos - sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" - url: "https://pub.dev" - source: hosted - version: "0.9.4+2" - file_selector_platform_interface: - dependency: transitive - description: - name: file_selector_platform_interface - sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b - url: "https://pub.dev" - source: hosted - version: "2.6.2" - file_selector_web: - dependency: transitive - description: - name: file_selector_web - sha256: c4c0ea4224d97a60a7067eca0c8fd419e708ff830e0c83b11a48faf566cec3e7 - url: "https://pub.dev" - source: hosted - version: "0.9.4+2" - file_selector_windows: - dependency: transitive - description: - name: file_selector_windows - sha256: "320fcfb6f33caa90f0b58380489fc5ac05d99ee94b61aa96ec2bff0ba81d3c2b" - url: "https://pub.dev" - source: hosted - version: "0.9.3+4" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be - url: "https://pub.dev" - source: hosted - version: "1.1.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_gen: - dependency: "direct main" - description: - name: flutter_gen - sha256: "4117a3ea6b26a910c715bd58abcc5a90447e70930a5b98249e94c41da9e849bb" - url: "https://pub.dev" - source: hosted - version: "5.10.0" - flutter_gen_core: - dependency: transitive - description: - name: flutter_gen_core - sha256: "3eaa2d3d8be58267ac4cd5e215ac965dd23cae0410dc073de2e82e227be32bfc" - url: "https://pub.dev" - source: hosted - version: "5.10.0" - flutter_gen_runner: - dependency: "direct dev" - description: - name: flutter_gen_runner - sha256: e74b4ead01df3e8f02e73a26ca856759dbbe8cb3fd60941ba9f4005cd0cd19c9 - url: "https://pub.dev" - source: hosted - version: "5.10.0" - flutter_launcher_icons: - dependency: "direct main" - description: - name: flutter_launcher_icons - sha256: bfa04787c85d80ecb3f8777bde5fc10c3de809240c48fa061a2c2bf15ea5211c - url: "https://pub.dev" - source: hosted - version: "0.14.3" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - flutter_local_notifications: - dependency: "direct main" - description: - name: flutter_local_notifications - sha256: ef41ae901e7529e52934feba19ed82827b11baa67336829564aeab3129460610 - url: "https://pub.dev" - source: hosted - version: "18.0.1" - flutter_local_notifications_linux: - dependency: transitive - description: - name: flutter_local_notifications_linux - sha256: "8f685642876742c941b29c32030f6f4f6dacd0e4eaecb3efbb187d6a3812ca01" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - flutter_local_notifications_platform_interface: - dependency: transitive - description: - name: flutter_local_notifications_platform_interface - sha256: "6c5b83c86bf819cdb177a9247a3722067dd8cc6313827ce7c77a4b238a26fd52" - url: "https://pub.dev" - source: hosted - version: "8.0.0" - flutter_native_splash: - dependency: "direct main" - description: - name: flutter_native_splash - sha256: edb09c35ee9230c4b03f13dd45bb3a276d0801865f0a4650b7e2a3bba61a803a - url: "https://pub.dev" - source: hosted - version: "2.4.5" - flutter_platform_widgets: - dependency: "direct main" - description: - name: flutter_platform_widgets - sha256: ba28f1a1ee7e46e2b7315405868c2d7126ba67e74e83e9a80538f8d5b5df7b21 - url: "https://pub.dev" - source: hosted - version: "8.0.0" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - sha256: "5a1e6fb2c0561958d7e4c33574674bda7b77caaca7a33b758876956f2902eea3" - url: "https://pub.dev" - source: hosted - version: "2.0.27" - flutter_slidable: - dependency: "direct main" - description: - name: flutter_slidable - sha256: ab7dbb16f783307c9d7762ede2593ce32c220ba2ba0fd540a3db8e9a3acba71a - url: "https://pub.dev" - source: hosted - version: "4.0.0" - flutter_svg: - dependency: "direct main" - description: - name: flutter_svg - sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b - url: "https://pub.dev" - source: hosted - version: "2.0.17" - flutter_test: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_timezone: - dependency: "direct main" - description: - name: flutter_timezone - sha256: bc286cecb0366d88e6c4644e3962ebd1ce1d233abc658eb1e0cd803389f84b64 - url: "https://pub.dev" - source: hosted - version: "4.1.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - get: - dependency: "direct main" - description: - name: get - sha256: c79eeb4339f1f3deffd9ec912f8a923834bec55f7b49c9e882b8fef2c139d425 - url: "https://pub.dev" - source: hosted - version: "4.7.2" - get_test: - dependency: "direct main" - description: - name: get_test - sha256: "558c39cb35fb37bd501f337dc143de60a4314d5ef3b75f4b0551d6741634995b" - url: "https://pub.dev" - source: hosted - version: "4.0.1" - glob: - dependency: transitive - description: - name: glob - sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de - url: "https://pub.dev" - source: hosted - version: "2.1.3" - google_fonts: - dependency: "direct main" - description: - name: google_fonts - sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 - url: "https://pub.dev" - source: hosted - version: "6.2.1" - graphs: - dependency: transitive - description: - name: graphs - sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - hashcodes: - dependency: transitive - description: - name: hashcodes - sha256: "80f9410a5b3c8e110c4b7604546034749259f5d6dcca63e0d3c17c9258f1a651" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - hive: - dependency: "direct main" - description: - name: hive - sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" - url: "https://pub.dev" - source: hosted - version: "2.2.3" - hive_flutter: - dependency: "direct main" - description: - name: hive_flutter - sha256: dca1da446b1d808a51689fb5d0c6c9510c0a2ba01e22805d492c73b68e33eecc - url: "https://pub.dev" - source: hosted - version: "1.1.0" - home_widget: - dependency: "direct main" - description: - name: home_widget - sha256: "7430f7549d42cef2e729bd3c779de748b93f1eb78b1abfe6bca8fffd1cfce3e9" - url: "https://pub.dev" - source: hosted - version: "0.7.0+1" - html: - dependency: transitive - description: - name: html - sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" - url: "https://pub.dev" - source: hosted - version: "0.15.5" - http: - dependency: "direct main" - description: - name: http - sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f - url: "https://pub.dev" - source: hosted - version: "1.3.0" - http_mock_adapter: - dependency: "direct dev" - description: - name: http_mock_adapter - sha256: "46399c78bd4a0af071978edd8c502d7aeeed73b5fb9860bca86b5ed647a63c1b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 - url: "https://pub.dev" - source: hosted - version: "3.2.2" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" - url: "https://pub.dev" - source: hosted - version: "4.1.2" - image: - dependency: transitive - description: - name: image - sha256: "13d3349ace88f12f4a0d175eb5c12dcdd39d35c4c109a8a13dfeb6d0bd9e31c3" - url: "https://pub.dev" - source: hosted - version: "4.5.3" - image_size_getter: - dependency: transitive - description: - name: image_size_getter - sha256: "9a299e3af2ebbcfd1baf21456c3c884037ff524316c97d8e56035ea8fdf35653" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - import_sorter: - dependency: "direct main" - description: - name: import_sorter - sha256: eb15738ccead84e62c31e0208ea4e3104415efcd4972b86906ca64a1187d0836 - url: "https://pub.dev" - source: hosted - version: "4.6.0" - in_app_update: - dependency: "direct main" - description: - name: in_app_update - sha256: "489572accaa55b51518b2d64676ca8c3c6d4c989fa53cf718001882237691a3c" - url: "https://pub.dev" - source: hosted - version: "4.2.3" - intl: - dependency: "direct main" - description: - name: intl - sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" - url: "https://pub.dev" - source: hosted - version: "0.20.2" - io: - dependency: transitive - description: - name: io - sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b - url: "https://pub.dev" - source: hosted - version: "1.0.5" - js: - dependency: transitive - description: - name: js - sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" - url: "https://pub.dev" - source: hosted - version: "0.7.2" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec - url: "https://pub.dev" - source: hosted - version: "10.0.8" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 - url: "https://pub.dev" - source: hosted - version: "3.0.9" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - lints: - dependency: transitive - description: - name: lints - sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 - url: "https://pub.dev" - source: hosted - version: "5.1.1" - logger: - dependency: transitive - description: - name: logger - sha256: be4b23575aac7ebf01f225a241eb7f6b5641eeaf43c6a8613510fc2f8cf187d1 - url: "https://pub.dev" - source: hosted - version: "2.5.0" - logging: - dependency: transitive - description: - name: logging - sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - loggy: - dependency: "direct main" - description: - name: loggy - sha256: "981e03162bbd3a5a843026f75f73d26e4a0d8aa035ae060456ca7b30dfd1e339" - url: "https://pub.dev" - source: hosted - version: "2.0.3" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.dev" - source: hosted - version: "0.12.17" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: transitive - description: - name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c - url: "https://pub.dev" - source: hosted - version: "1.16.0" - mime: - dependency: transitive - description: - name: mime - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - mockito: - dependency: "direct main" - description: - name: mockito - sha256: f99d8d072e249f719a5531735d146d8cf04c580d93920b04de75bef6dfb2daf6 - url: "https://pub.dev" - source: hosted - version: "5.4.5" - nm: - dependency: transitive - description: - name: nm - sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - node_preamble: - dependency: transitive - description: - name: node_preamble - sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" - url: "https://pub.dev" - source: hosted - version: "2.0.2" - package_config: - dependency: transitive - description: - name: package_config - sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc - url: "https://pub.dev" - source: hosted - version: "2.2.0" - package_info_plus: - dependency: "direct main" - description: - name: package_info_plus - sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191" - url: "https://pub.dev" - source: hosted - version: "8.3.0" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c" - url: "https://pub.dev" - source: hosted - version: "3.2.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - path_parsing: - dependency: transitive - description: - name: path_parsing - sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - path_provider: - dependency: "direct main" - description: - name: path_provider - sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" - url: "https://pub.dev" - source: hosted - version: "2.1.5" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - sha256: "0ca7359dad67fd7063cb2892ab0c0737b2daafd807cf1acecd62374c8fae6c12" - url: "https://pub.dev" - source: hosted - version: "2.2.16" - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - pem: - dependency: "direct main" - description: - name: pem - sha256: "3dfb24524f805ad694ba3cdbb6387ab31ab661fdb8ea873052ed88487fcfef86" - url: "https://pub.dev" - source: hosted - version: "2.0.5" - permission_handler: - dependency: "direct main" - description: - name: permission_handler - sha256: "59adad729136f01ea9e35a48f5d1395e25cba6cea552249ddbe9cf950f5d7849" - url: "https://pub.dev" - source: hosted - version: "11.4.0" - permission_handler_android: - dependency: transitive - description: - name: permission_handler_android - sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc - url: "https://pub.dev" - source: hosted - version: "12.1.0" - permission_handler_apple: - dependency: transitive - description: - name: permission_handler_apple - sha256: f84a188e79a35c687c132a0a0556c254747a08561e99ab933f12f6ca71ef3c98 - url: "https://pub.dev" - source: hosted - version: "9.4.6" - permission_handler_html: - dependency: transitive - description: - name: permission_handler_html - sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" - url: "https://pub.dev" - source: hosted - version: "0.1.3+5" - permission_handler_platform_interface: - dependency: transitive - description: - name: permission_handler_platform_interface - sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878 - url: "https://pub.dev" - source: hosted - version: "4.3.0" - permission_handler_windows: - dependency: transitive - description: - name: permission_handler_windows - sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" - url: "https://pub.dev" - source: hosted - version: "0.2.1" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" - url: "https://pub.dev" - source: hosted - version: "6.1.0" - platform: - dependency: transitive - description: - name: platform - sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" - url: "https://pub.dev" - source: hosted - version: "3.1.6" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" - source: hosted - version: "1.5.1" - posix: - dependency: transitive - description: - name: posix - sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a - url: "https://pub.dev" - source: hosted - version: "6.0.1" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - quiver: - dependency: transitive - description: - name: quiver - sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 - url: "https://pub.dev" - source: hosted - version: "3.2.2" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - sha256: "846849e3e9b68f3ef4b60c60cf4b3e02e9321bc7f4d8c4692cf87ffa82fc8a3a" - url: "https://pub.dev" - source: hosted - version: "2.5.2" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - sha256: "3ec7210872c4ba945e3244982918e502fa2bfb5230dff6832459ca0e1879b7ad" - url: "https://pub.dev" - source: hosted - version: "2.4.8" - shared_preferences_foundation: - dependency: transitive - description: - name: shared_preferences_foundation - sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" - url: "https://pub.dev" - source: hosted - version: "2.5.4" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_web: - dependency: "direct main" - description: - name: shared_preferences_web - sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 - url: "https://pub.dev" - source: hosted - version: "2.4.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shelf: - dependency: transitive - description: - name: shelf - sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 - url: "https://pub.dev" - source: hosted - version: "1.4.2" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 - url: "https://pub.dev" - source: hosted - version: "1.1.3" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" - url: "https://pub.dev" - source: hosted - version: "3.0.0" - sizer: - dependency: "direct main" - description: - name: sizer - sha256: "6f68f574b6dd052e87c4abf67fe4feb316651fab02430ef7e53e991c15acfcb7" - url: "https://pub.dev" - source: hosted - version: "3.0.5" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b - url: "https://pub.dev" - source: hosted - version: "2.1.2" - source_maps: - dependency: transitive - description: - name: source_maps - sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" - url: "https://pub.dev" - source: hosted - version: "0.10.13" - source_span: - dependency: transitive - description: - name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.dev" - source: hosted - version: "1.10.1" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - sqflite: - dependency: "direct main" - description: - name: sqflite - sha256: e2297b1da52f127bc7a3da11439985d9b536f75070f3325e62ada69a5c585d03 - url: "https://pub.dev" - source: hosted - version: "2.4.2" - sqflite_android: - dependency: transitive - description: - name: sqflite_android - sha256: "2b3070c5fa881839f8b402ee4a39c1b4d561704d4ebbbcfb808a119bc2a1701b" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - sha256: "84731e8bfd8303a3389903e01fb2141b6e59b5973cacbb0929021df08dddbe8b" - url: "https://pub.dev" - source: hosted - version: "2.5.5" - sqflite_common_ffi: - dependency: "direct dev" - description: - name: sqflite_common_ffi - sha256: "1f3ef3888d3bfbb47785cc1dda0dc7dd7ebd8c1955d32a9e8e9dae1e38d1c4c1" - url: "https://pub.dev" - source: hosted - version: "2.3.5" - sqflite_darwin: - dependency: transitive - description: - name: sqflite_darwin - sha256: "279832e5cde3fe99e8571879498c9211f3ca6391b0d818df4e17d9fff5c6ccb3" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - sqflite_platform_interface: - dependency: transitive - description: - name: sqflite_platform_interface - sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - sqlite3: - dependency: transitive - description: - name: sqlite3 - sha256: "310af39c40dd0bb2058538333c9d9840a2725ae0b9f77e4fd09ad6696aa8f66e" - url: "https://pub.dev" - source: hosted - version: "2.7.5" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 - url: "https://pub.dev" - source: hosted - version: "2.1.1" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" - source: hosted - version: "1.4.1" - syncfusion_flutter_calendar: - dependency: "direct main" - description: - name: syncfusion_flutter_calendar - sha256: "11b01bc7ad1d240d7c644081bda79e61c0a8d26eec7eba67bfc7274310562897" - url: "https://pub.dev" - source: hosted - version: "28.2.11" - syncfusion_flutter_charts: - dependency: "direct main" - description: - name: syncfusion_flutter_charts - sha256: fcf18f63274430e73d5ea05534c8117205ed57e55314776b793568c71a8fc528 - url: "https://pub.dev" - source: hosted - version: "28.2.11" - syncfusion_flutter_core: - dependency: transitive - description: - name: syncfusion_flutter_core - sha256: "59b6d2a7deacade6129d2f15615ca49ed56278fea055cd2e52cace78a343dd5e" - url: "https://pub.dev" - source: hosted - version: "28.2.11" - syncfusion_flutter_datepicker: - dependency: transitive - description: - name: syncfusion_flutter_datepicker - sha256: "73ece73742f123c750d674461c6902cbdf32fbd695c15fdf7e8487d290bb7179" - url: "https://pub.dev" - source: hosted - version: "28.2.11+1" - synchronized: - dependency: transitive - description: - name: synchronized - sha256: "0669c70faae6270521ee4f05bffd2919892d42d1276e6c495be80174b6bc0ef6" - url: "https://pub.dev" - source: hosted - version: "3.3.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" - source: hosted - version: "1.2.2" - test: - dependency: "direct main" - description: - name: test - sha256: "301b213cd241ca982e9ba50266bd3f5bd1ea33f1455554c5abb85d1be0e2d87e" - url: "https://pub.dev" - source: hosted - version: "1.25.15" - test_api: - dependency: transitive - description: - name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd - url: "https://pub.dev" - source: hosted - version: "0.7.4" - test_core: - dependency: transitive - description: - name: test_core - sha256: "84d17c3486c8dfdbe5e12a50c8ae176d15e2a771b96909a9442b40173649ccaa" - url: "https://pub.dev" - source: hosted - version: "0.6.8" - textfield_tags: - dependency: "direct main" - description: - name: textfield_tags - sha256: d1f2204114157a1296bb97c20d7f8c8c7fd036212812afb2e19de7bb34acc55b - url: "https://pub.dev" - source: hosted - version: "3.0.1" - time: - dependency: transitive - description: - name: time - sha256: "370572cf5d1e58adcb3e354c47515da3f7469dac3a95b447117e728e7be6f461" - url: "https://pub.dev" - source: hosted - version: "2.1.5" - timezone: - dependency: "direct main" - description: - name: timezone - sha256: ffc9d5f4d1193534ef051f9254063fa53d588609418c84299956c3db9383587d - url: "https://pub.dev" - source: hosted - version: "0.10.0" - timing: - dependency: transitive - description: - name: timing - sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" - url: "https://pub.dev" - source: hosted - version: "1.0.2" - tint: - dependency: transitive - description: - name: tint - sha256: "9652d9a589f4536d5e392cf790263d120474f15da3cf1bee7f1fdb31b4de5f46" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - tuple: - dependency: "direct main" - description: - name: tuple - sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 - url: "https://pub.dev" - source: hosted - version: "2.0.2" - tutorial_coach_mark: - dependency: "direct main" - description: - name: tutorial_coach_mark - sha256: "2c77c0b00bbe7d5b8a6d31cb9e03d44bf77dfe7ba6514cc2b546886d024a9945" - url: "https://pub.dev" - source: hosted - version: "1.2.13" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - universal_io: - dependency: transitive - description: - name: universal_io - sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" - url: "https://pub.dev" - source: hosted - version: "2.2.2" - url_launcher: - dependency: "direct main" - description: - name: url_launcher - sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" - url: "https://pub.dev" - source: hosted - version: "6.3.1" - url_launcher_android: - dependency: transitive - description: - name: url_launcher_android - sha256: "1d0eae19bd7606ef60fe69ef3b312a437a16549476c42321d5dc1506c9ca3bf4" - url: "https://pub.dev" - source: hosted - version: "6.3.15" - url_launcher_ios: - dependency: transitive - description: - name: url_launcher_ios - sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" - url: "https://pub.dev" - source: hosted - version: "6.3.2" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" - url: "https://pub.dev" - source: hosted - version: "3.2.2" - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - sha256: "3ba963161bd0fe395917ba881d320b9c4f6dd3c4a233da62ab18a5025c85f1e9" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77" - url: "https://pub.dev" - source: hosted - version: "3.1.4" - uuid: - dependency: "direct main" - description: - name: uuid - sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff - url: "https://pub.dev" - source: hosted - version: "4.5.1" - vector_graphics: - dependency: transitive - description: - name: vector_graphics - sha256: "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de" - url: "https://pub.dev" - source: hosted - version: "1.1.18" - vector_graphics_codec: - dependency: transitive - description: - name: vector_graphics_codec - sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" - url: "https://pub.dev" - source: hosted - version: "1.1.13" - vector_graphics_compiler: - dependency: transitive - description: - name: vector_graphics_compiler - sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" - url: "https://pub.dev" - source: hosted - version: "1.1.16" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" - url: "https://pub.dev" - source: hosted - version: "14.3.1" - watcher: - dependency: transitive - description: - name: watcher - sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - web: - dependency: transitive - description: - name: web - sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - web_socket: - dependency: transitive - description: - name: web_socket - sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" - url: "https://pub.dev" - source: hosted - version: "0.1.6" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - win32: - dependency: transitive - description: - name: win32 - sha256: dc6ecaa00a7c708e5b4d10ee7bec8c270e9276dfcab1783f57e9962d7884305f - url: "https://pub.dev" - source: hosted - version: "5.12.0" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - xml: - dependency: transitive - description: - name: xml - sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 - url: "https://pub.dev" - source: hosted - version: "6.5.0" - yaml: - dependency: transitive - description: - name: yaml - sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce - url: "https://pub.dev" - source: hosted - version: "3.1.3" -sdks: - dart: ">=3.7.0 <4.0.0" - flutter: ">=3.29.0" diff --git a/pubspec.yaml b/pubspec.yaml deleted file mode 100644 index 6ab9fbf1..00000000 --- a/pubspec.yaml +++ /dev/null @@ -1,102 +0,0 @@ -name: taskwarrior -description: A new Flutter project. -version: 2.0.0+2 -publish_to: "none" # Remove this line if you wish to publish to pub.dev - -environment: - sdk: ">=3.0.5 <4.0.0" - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. -dependencies: - connectivity_plus: ^6.1.3 - crypto: ^3.0.1 - cupertino_icons: ^1.0.5 - date_format: ^2.0.6 - double_back_to_close_app: ^2.1.0 - file_picker: ^9.0.2 - file_picker_writable: - git: - url: https://github.com/amake/file_picker_writable.git - ref: feature/fix-kotlin-issue - file_selector: ^1.0.3 - flutter: - sdk: flutter - flutter_gen: ^5.4.0 - flutter_launcher_icons: ^0.14.3 - flutter_local_notifications: ^18.0.1 - flutter_native_splash: ^2.1.2+1 - flutter_timezone: ^4.1.0 - flutter_platform_widgets: ^8.0.0 - flutter_slidable: ^4.0.0 - flutter_svg: ^2.0.7 - flutter_test: - sdk: flutter - get: ^4.6.5 - get_test: ^4.0.1 - google_fonts: ^6.1.0 - hive: ^2.2.1 - hive_flutter: ^1.1.0 - home_widget: ^0.7.0+1 - http: ^1.1.0 - import_sorter: ^4.6.0 - in_app_update: ^4.2.3 - intl: ^0.20.2 - loggy: ^2.0.1+1 - mockito: ^5.4.4 - package_info_plus: ^8.3.0 - pem: ^2.0.1 - permission_handler: ^11.4.0 - shared_preferences: ^2.5.2 - shared_preferences_web: ^2.0.3 - sizer: ^3.0.5 - sqflite: ^2.3.3+1 - syncfusion_flutter_calendar: ^28.1.37 - syncfusion_flutter_charts: ^28.2.11 - test: ^1.25.2 - timezone: ^0.10.0 - tuple: ^2.0.0 - tutorial_coach_mark: ^1.2.11 - url_launcher: ^6.3.1 - uuid: ^4.2.2 - built_collection: ^5.1.1 - textfield_tags: ^3.0.1 - path_provider: ^2.1.5 - -dev_dependencies: - build_runner: null - flutter_gen_runner: null - flutter_lints: ^5.0.0 - http_mock_adapter: ^0.6.1 - sqflite_common_ffi: ^2.0.0 - -flutter_gen: - output: lib/app/utils/gen/ - integrations: - flutter_svg: true - -flutter: - uses-material-design: true - assets: - - assets/svg/ - - assets/images/ - fonts: - - family: SFProDisplay - fonts: - - asset: assets/fonts/SFProDisplay-Regular.ttf - - family: SegoeUI - fonts: - - asset: assets/fonts/SegoeUI.ttf - - family: Ubuntu - fonts: - - asset: assets/fonts/Ubuntu-Light.ttf - - family: Poppins - fonts: - - asset: assets/fonts/Poppins-Regular.ttf - - asset: assets/fonts/Poppins-Bold.ttf - - asset: assets/fonts/Poppins-ExtraBold.ttf - weight: 900 diff --git a/repo/categories.txt b/repo/categories.txt new file mode 100644 index 00000000..e1fe5e7d --- /dev/null +++ b/repo/categories.txt @@ -0,0 +1 @@ +taskwarrior-flutter diff --git a/repo/entry.jar b/repo/entry.jar new file mode 100644 index 00000000..9fdc9f3e Binary files /dev/null and b/repo/entry.jar differ diff --git a/repo/entry.json b/repo/entry.json new file mode 100644 index 00000000..ed9278a8 --- /dev/null +++ b/repo/entry.json @@ -0,0 +1 @@ +{"timestamp": 1756788765000, "version": 20002, "index": {"name": "/index-v2.json", "sha256": "7c7dc70ff11de5d0a8a70e2b89c33085a6124a0bae0f5c21fba96acee1f2d0cb", "size": 7329, "numPackages": 1}, "diffs": {}} \ No newline at end of file diff --git a/repo/icons/icon.png b/repo/icons/icon.png new file mode 100644 index 00000000..9b520389 Binary files /dev/null and b/repo/icons/icon.png differ diff --git a/repo/index-v1.jar b/repo/index-v1.jar new file mode 100644 index 00000000..3a87a3fc Binary files /dev/null and b/repo/index-v1.jar differ diff --git a/repo/index-v1.json b/repo/index-v1.json new file mode 100644 index 00000000..14d4d0bc --- /dev/null +++ b/repo/index-v1.json @@ -0,0 +1 @@ +{"repo": {"timestamp": 1756788765000, "version": 20002, "name": "Taskwarrior Flutter Nightly Builds Repo", "icon": "icon.png", "address": "https://ccextractor.github.io/taskwarrior-flutter/repo", "webBaseUrl": "https://ccextractor.github.io/taskwarrior-flutter", "description": "This repo is for nightly builds of the Taskwarrior Flutter app. It is not meant for production use, but for testing the latest changes."}, "requests": {"install": [], "uninstall": []}, "apps": [{"authorName": "CCExtractor Development", "categories": ["taskwarrior-flutter"], "suggestedVersionCode": "2147483647", "issueTracker": "https://github.com/CCExtractor/taskwarrior-flutter/issues", "license": "Unknown", "name": "Taskwarrior Nightly", "sourceCode": "https://github.com/CCExtractor/taskwarrior-flutter", "summary": "Taskwarrior is Free and Open Source Software that manages your TODO list from the command line. It is flexible, fast, and unobtrusive. It does its job then gets out of your way. The CLI tool and other relevant documentation can be found at Taskwarrior. This project aims to build an app for Taskwarrior. It is your task management app across all platforms. It helps you manage your tasks and filter them as per your needs.", "webSite": "https://github.com/CCExtractor/taskwarrior-flutter", "added": 1756788761000, "packageName": "com.ccextractor.taskwarrior.nightly", "lastUpdated": 1756788765000}], "packages": {"com.ccextractor.taskwarrior.nightly": [{"added": 1756788765000, "apkName": "nightly.9.apk", "hash": "ab7708cce4fe98739856a58d569d77f6982ef8761714ffd97d6dedba5a22d695", "hashType": "sha256", "minSdkVersion": 21, "nativecode": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"], "packageName": "com.ccextractor.taskwarrior.nightly", "sig": "1478ed41a8b1b1d449c82db07179da0a", "signer": "a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3", "size": 33203929, "targetSdkVersion": 33, "uses-permission": [["android.permission.INTERNET", null], ["android.permission.READ_EXTERNAL_STORAGE", null], ["android.permission.POST_NOTIFICATIONS", null], ["android.permission.WRITE_EXTERNAL_STORAGE", null], ["android.permission.MANAGE_EXTERNAL_STORAGE", null], ["android.permission.RECEIVE_BOOT_COMPLETED", null], ["android.permission.USE_EXACT_ALARM", null], ["android.permission.VIBRATE", null], ["android.permission.ACCESS_NETWORK_STATE", null], ["android.permission.WAKE_LOCK", null], ["android.permission.FOREGROUND_SERVICE", null], ["com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION", null]], "versionCode": 9, "versionName": "2.0.0-nightly"}, {"added": 1756788764000, "apkName": "nightly.8.apk", "hash": "2088fac41fb7b7fe82579a9aeabce0c64d5956c1fd241cff9dc8f16272061ce3", "hashType": "sha256", "minSdkVersion": 21, "nativecode": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"], "packageName": "com.ccextractor.taskwarrior.nightly", "sig": "1478ed41a8b1b1d449c82db07179da0a", "signer": "a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3", "size": 33201129, "targetSdkVersion": 33, "uses-permission": [["android.permission.INTERNET", null], ["android.permission.READ_EXTERNAL_STORAGE", null], ["android.permission.POST_NOTIFICATIONS", null], ["android.permission.WRITE_EXTERNAL_STORAGE", null], ["android.permission.MANAGE_EXTERNAL_STORAGE", null], ["android.permission.RECEIVE_BOOT_COMPLETED", null], ["android.permission.USE_EXACT_ALARM", null], ["android.permission.VIBRATE", null], ["android.permission.ACCESS_NETWORK_STATE", null], ["android.permission.WAKE_LOCK", null], ["android.permission.FOREGROUND_SERVICE", null], ["com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION", null]], "versionCode": 8, "versionName": "2.0.0-nightly"}, {"added": 1756788763000, "apkName": "nightly.7.apk", "hash": "379e16385e4e4e2adbe8c50398cc6613d4861f0cd110286239c576023c871670", "hashType": "sha256", "minSdkVersion": 21, "nativecode": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"], "packageName": "com.ccextractor.taskwarrior.nightly", "sig": "1478ed41a8b1b1d449c82db07179da0a", "signer": "a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3", "size": 33201125, "targetSdkVersion": 33, "uses-permission": [["android.permission.INTERNET", null], ["android.permission.READ_EXTERNAL_STORAGE", null], ["android.permission.POST_NOTIFICATIONS", null], ["android.permission.WRITE_EXTERNAL_STORAGE", null], ["android.permission.MANAGE_EXTERNAL_STORAGE", null], ["android.permission.RECEIVE_BOOT_COMPLETED", null], ["android.permission.USE_EXACT_ALARM", null], ["android.permission.VIBRATE", null], ["android.permission.ACCESS_NETWORK_STATE", null], ["android.permission.WAKE_LOCK", null], ["android.permission.FOREGROUND_SERVICE", null], ["com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION", null]], "versionCode": 7, "versionName": "2.0.0-nightly"}, {"added": 1756788762000, "apkName": "nightly.6.apk", "hash": "3c3148e9e4a02b05fb5144cdcdc74e10c2c9f42d86014f270f54d32aef4ced24", "hashType": "sha256", "minSdkVersion": 21, "nativecode": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"], "packageName": "com.ccextractor.taskwarrior.nightly", "sig": "1478ed41a8b1b1d449c82db07179da0a", "signer": "a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3", "size": 33192279, "targetSdkVersion": 33, "uses-permission": [["android.permission.INTERNET", null], ["android.permission.READ_EXTERNAL_STORAGE", null], ["android.permission.POST_NOTIFICATIONS", null], ["android.permission.WRITE_EXTERNAL_STORAGE", null], ["android.permission.MANAGE_EXTERNAL_STORAGE", null], ["android.permission.RECEIVE_BOOT_COMPLETED", null], ["android.permission.USE_EXACT_ALARM", null], ["android.permission.VIBRATE", null], ["android.permission.ACCESS_NETWORK_STATE", null], ["android.permission.WAKE_LOCK", null], ["android.permission.FOREGROUND_SERVICE", null], ["com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION", null]], "versionCode": 6, "versionName": "2.0.0-nightly"}, {"added": 1756788761000, "apkName": "nightly.5.apk", "hash": "09476f412ae9b4a6297c2c3997bae88afdb917d95b1a08ba3ac67c82036ae861", "hashType": "sha256", "minSdkVersion": 21, "nativecode": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"], "packageName": "com.ccextractor.taskwarrior.nightly", "sig": "1478ed41a8b1b1d449c82db07179da0a", "signer": "a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3", "size": 33192280, "targetSdkVersion": 33, "uses-permission": [["android.permission.INTERNET", null], ["android.permission.READ_EXTERNAL_STORAGE", null], ["android.permission.POST_NOTIFICATIONS", null], ["android.permission.WRITE_EXTERNAL_STORAGE", null], ["android.permission.MANAGE_EXTERNAL_STORAGE", null], ["android.permission.RECEIVE_BOOT_COMPLETED", null], ["android.permission.USE_EXACT_ALARM", null], ["android.permission.VIBRATE", null], ["android.permission.ACCESS_NETWORK_STATE", null], ["android.permission.WAKE_LOCK", null], ["android.permission.FOREGROUND_SERVICE", null], ["com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION", null]], "versionCode": 5, "versionName": "2.0.0-nightly"}]}} \ No newline at end of file diff --git a/repo/index-v2.json b/repo/index-v2.json new file mode 100644 index 00000000..4c8875aa --- /dev/null +++ b/repo/index-v2.json @@ -0,0 +1 @@ +{"repo": {"name": {"en-US": "Taskwarrior Flutter Nightly Builds Repo"}, "description": {"en-US": "This repo is for nightly builds of the Taskwarrior Flutter app. It is not meant for production use, but for testing the latest changes."}, "icon": {"en-US": {"name": "/icons/icon.png", "sha256": "acebdd2cc57cf05d97b43076f429161ade27ce8a746c224d8960d07decfbcd0b", "size": 833}}, "address": "https://ccextractor.github.io/taskwarrior-flutter/repo", "webBaseUrl": "https://ccextractor.github.io/taskwarrior-flutter", "timestamp": 1756788765000}, "packages": {"com.ccextractor.taskwarrior.nightly": {"metadata": {"added": 1756788761000, "categories": ["taskwarrior-flutter"], "issueTracker": "https://github.com/CCExtractor/taskwarrior-flutter/issues", "lastUpdated": 1756788765000, "sourceCode": "https://github.com/CCExtractor/taskwarrior-flutter", "webSite": "https://github.com/CCExtractor/taskwarrior-flutter", "authorName": "CCExtractor Development", "name": {"en-US": "Taskwarrior Nightly"}, "summary": {"en-US": "Taskwarrior is Free and Open Source Software that manages your TODO list from the command line. It is flexible, fast, and unobtrusive. It does its job then gets out of your way. The CLI tool and other relevant documentation can be found at Taskwarrior. This project aims to build an app for Taskwarrior. It is your task management app across all platforms. It helps you manage your tasks and filter them as per your needs."}, "preferredSigner": "a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3"}, "versions": {"ab7708cce4fe98739856a58d569d77f6982ef8761714ffd97d6dedba5a22d695": {"added": 1756788765000, "file": {"name": "/nightly.9.apk", "sha256": "ab7708cce4fe98739856a58d569d77f6982ef8761714ffd97d6dedba5a22d695", "size": 33203929}, "manifest": {"nativecode": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"], "versionName": "2.0.0-nightly", "versionCode": 9, "usesSdk": {"minSdkVersion": 21, "targetSdkVersion": 33}, "signer": {"sha256": ["a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3"]}, "usesPermission": [{"name": "android.permission.INTERNET"}, {"name": "android.permission.READ_EXTERNAL_STORAGE"}, {"name": "android.permission.POST_NOTIFICATIONS"}, {"name": "android.permission.WRITE_EXTERNAL_STORAGE"}, {"name": "android.permission.MANAGE_EXTERNAL_STORAGE"}, {"name": "android.permission.RECEIVE_BOOT_COMPLETED"}, {"name": "android.permission.USE_EXACT_ALARM"}, {"name": "android.permission.VIBRATE"}, {"name": "android.permission.ACCESS_NETWORK_STATE"}, {"name": "android.permission.WAKE_LOCK"}, {"name": "android.permission.FOREGROUND_SERVICE"}, {"name": "com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"}]}}, "2088fac41fb7b7fe82579a9aeabce0c64d5956c1fd241cff9dc8f16272061ce3": {"added": 1756788764000, "file": {"name": "/nightly.8.apk", "sha256": "2088fac41fb7b7fe82579a9aeabce0c64d5956c1fd241cff9dc8f16272061ce3", "size": 33201129}, "manifest": {"nativecode": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"], "versionName": "2.0.0-nightly", "versionCode": 8, "usesSdk": {"minSdkVersion": 21, "targetSdkVersion": 33}, "signer": {"sha256": ["a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3"]}, "usesPermission": [{"name": "android.permission.INTERNET"}, {"name": "android.permission.READ_EXTERNAL_STORAGE"}, {"name": "android.permission.POST_NOTIFICATIONS"}, {"name": "android.permission.WRITE_EXTERNAL_STORAGE"}, {"name": "android.permission.MANAGE_EXTERNAL_STORAGE"}, {"name": "android.permission.RECEIVE_BOOT_COMPLETED"}, {"name": "android.permission.USE_EXACT_ALARM"}, {"name": "android.permission.VIBRATE"}, {"name": "android.permission.ACCESS_NETWORK_STATE"}, {"name": "android.permission.WAKE_LOCK"}, {"name": "android.permission.FOREGROUND_SERVICE"}, {"name": "com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"}]}}, "379e16385e4e4e2adbe8c50398cc6613d4861f0cd110286239c576023c871670": {"added": 1756788763000, "file": {"name": "/nightly.7.apk", "sha256": "379e16385e4e4e2adbe8c50398cc6613d4861f0cd110286239c576023c871670", "size": 33201125}, "manifest": {"nativecode": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"], "versionName": "2.0.0-nightly", "versionCode": 7, "usesSdk": {"minSdkVersion": 21, "targetSdkVersion": 33}, "signer": {"sha256": ["a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3"]}, "usesPermission": [{"name": "android.permission.INTERNET"}, {"name": "android.permission.READ_EXTERNAL_STORAGE"}, {"name": "android.permission.POST_NOTIFICATIONS"}, {"name": "android.permission.WRITE_EXTERNAL_STORAGE"}, {"name": "android.permission.MANAGE_EXTERNAL_STORAGE"}, {"name": "android.permission.RECEIVE_BOOT_COMPLETED"}, {"name": "android.permission.USE_EXACT_ALARM"}, {"name": "android.permission.VIBRATE"}, {"name": "android.permission.ACCESS_NETWORK_STATE"}, {"name": "android.permission.WAKE_LOCK"}, {"name": "android.permission.FOREGROUND_SERVICE"}, {"name": "com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"}]}}, "3c3148e9e4a02b05fb5144cdcdc74e10c2c9f42d86014f270f54d32aef4ced24": {"added": 1756788762000, "file": {"name": "/nightly.6.apk", "sha256": "3c3148e9e4a02b05fb5144cdcdc74e10c2c9f42d86014f270f54d32aef4ced24", "size": 33192279}, "manifest": {"nativecode": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"], "versionName": "2.0.0-nightly", "versionCode": 6, "usesSdk": {"minSdkVersion": 21, "targetSdkVersion": 33}, "signer": {"sha256": ["a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3"]}, "usesPermission": [{"name": "android.permission.INTERNET"}, {"name": "android.permission.READ_EXTERNAL_STORAGE"}, {"name": "android.permission.POST_NOTIFICATIONS"}, {"name": "android.permission.WRITE_EXTERNAL_STORAGE"}, {"name": "android.permission.MANAGE_EXTERNAL_STORAGE"}, {"name": "android.permission.RECEIVE_BOOT_COMPLETED"}, {"name": "android.permission.USE_EXACT_ALARM"}, {"name": "android.permission.VIBRATE"}, {"name": "android.permission.ACCESS_NETWORK_STATE"}, {"name": "android.permission.WAKE_LOCK"}, {"name": "android.permission.FOREGROUND_SERVICE"}, {"name": "com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"}]}}, "09476f412ae9b4a6297c2c3997bae88afdb917d95b1a08ba3ac67c82036ae861": {"added": 1756788761000, "file": {"name": "/nightly.5.apk", "sha256": "09476f412ae9b4a6297c2c3997bae88afdb917d95b1a08ba3ac67c82036ae861", "size": 33192280}, "manifest": {"nativecode": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"], "versionName": "2.0.0-nightly", "versionCode": 5, "usesSdk": {"minSdkVersion": 21, "targetSdkVersion": 33}, "signer": {"sha256": ["a56227052da647b836c0152da7aa02b184b473013c886593e064611bd72982d3"]}, "usesPermission": [{"name": "android.permission.INTERNET"}, {"name": "android.permission.READ_EXTERNAL_STORAGE"}, {"name": "android.permission.POST_NOTIFICATIONS"}, {"name": "android.permission.WRITE_EXTERNAL_STORAGE"}, {"name": "android.permission.MANAGE_EXTERNAL_STORAGE"}, {"name": "android.permission.RECEIVE_BOOT_COMPLETED"}, {"name": "android.permission.USE_EXACT_ALARM"}, {"name": "android.permission.VIBRATE"}, {"name": "android.permission.ACCESS_NETWORK_STATE"}, {"name": "android.permission.WAKE_LOCK"}, {"name": "android.permission.FOREGROUND_SERVICE"}, {"name": "com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"}]}}}}}} \ No newline at end of file diff --git a/repo/index.css b/repo/index.css new file mode 100644 index 00000000..6255e28a --- /dev/null +++ b/repo/index.css @@ -0,0 +1,228 @@ +/* auto-generated - fdroid index updates will overwrite this file */ +BODY { + font-family : Arial, Helvetica, Sans-Serif; + color : #0000ee; + background-color : #ffffff; +} +p { + text-align : justify; +} +p.center { + text-align : center; +} +TD { + font-family : Arial, Helvetica, Sans-Serif; + color : #0000ee; +} +body,td { + font-size : 14px; +} +TH { + font-family : Arial, Helvetica, Sans-Serif; + color : #0000ee; + background-color : #F5EAD4; +} +a:link { + color : #bb0000; +} +a:visited { + color : #ff0000; +} +.zitat { + margin-left : 1cm; + margin-right : 1cm; + font-style : italic; +} +#intro { + border-spacing : 1em; + border : 1px solid gray; + border-radius : 0.5em; + box-shadow : 10px 10px 5px #888; + margin : 1.5em; + font-size : .9em; + width : 600px; + max-width : 90%; + display : table; + margin-left : auto; + margin-right : auto; + font-size : .8em; + color : #555555; +} +#intro > p { + margin-top : 0; +} +#intro p:last-child { + margin-bottom : 0; +} +.last { + border-bottom : 1px solid black; + padding-bottom : .5em; + text-align : center; +} +table { + border-collapse : collapse; +} +h2 { + text-align : center; +} +.perms { + font-family : monospace; + font-size : .8em; +} +.repoapplist { + display : table; + border-collapse : collapse; + margin-left : auto; + margin-right : auto; + width : 600px; + max-width : 90%; +} +.approw, appdetailrow { + display : table-row; +} +.appdetailrow { + display : flex; + padding : .5em; +} +.appiconbig, .appdetailblock, .appdetailcell { + display : table-cell +} +.appiconbig { + vertical-align : middle; + text-align : center; +} +.appdetailinner { + width : 100%; +} +.applinkcell { + text-align : center; + float : right; + width : 100%; + margin-bottom : .1em; +} +.paddedlink { + margin : 1em; +} +.approw { + border-spacing : 1em; + border : 1px solid gray; + border-radius : 0.5em; + padding : 0.5em; + margin : 1.5em; +} +.appdetailinner .appdetailrow:first-child { + background-color : #d5d5d5; +} +.appdetailinner .appdetailrow:first-child .appdetailcell { + min-width : 33%; + flex : 1 33%; + text-align : center; +} +.appdetailinner .appdetailrow:first-child .appdetailcell:first-child { + text-align : left; +} +.appdetailinner .appdetailrow:first-child .appdetailcell:last-child { + float : none; + text-align : right; +} +.minor-details { + font-size : .8em; + color : #555555; +} +.boldname { + font-weight : bold; +} +#appcount { + text-align : center; + margin-bottom : .5em; +} +kbd { + padding : 0.1em 0.6em; + border : 1px solid #CCC; + background-color : #F7F7F7; + color : #333; + box-shadow : 0px 1px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 2px #FFF inset; + border-radius : 3px; + display : inline-block; + margin : 0px 0.1em; + text-shadow : 0px 1px 0px #FFF; + white-space : nowrap; +} +div.filterline, div.repoline { + display : table; + margin-left : auto; + margin-right : auto; + margin-bottom : 1em; + vertical-align : middle; + display : table; + font-size : .8em; +} +.filterline form { + display : table-row; +} +.filterline .filtercell { + display : table-cell; + vertical-align : middle; +} +fieldset { + float : left; +} +fieldset select, fieldset input, #reposelect select, #reposelect input { + font-size : .9em; +} +.pager { + display : table; + margin-left : auto; + margin-right : auto; + width : 600px; + max-width : 90%; + padding-top : .6em; +} +/* should correspond to .repoapplist */ +.pagerrow { + display : table-row; +} +.pagercell { + display : table-cell; +} +.pagercell.left { + text-align : left; + padding-right : 1em; +} +.pagercell.middle { + text-align : center; + font-size : .9em; + color : #555; +} +.pagercell.right { + text-align : right; + padding-left : 1em; +} +.anti { + color : peru; +} +.antibold { + color : crimson; +} +#footer { + text-align : center; + margin-top : 1em; + font-size : 11px; + color : #555; +} +#footer img { + vertical-align : middle; +} +@media (max-width: 600px) { + .repoapplist { + display : block; + } + .appdetailinner, .appdetailrow { + display : block; + } + .appdetailcell { + display : block; + float : left; + line-height : 1.5em; + } +} \ No newline at end of file diff --git a/repo/index.html b/repo/index.html new file mode 100644 index 00000000..d8454d11 --- /dev/null +++ b/repo/index.html @@ -0,0 +1,56 @@ + + + + + + + Codestin Search App + + + + + + + + + + + +

+ Taskwarrior Flutter Nightly Builds Repo +

+
+

+ + + QR: test + + + This repo is for nightly builds of the Taskwarrior Flutter app. It is not meant for production use, but for testing the latest changes. +
+
+ Currently it serves + + 1 + + apps. To add it to your F-Droid client, scan the QR code (click it to enlarge) or use this URL: +

+

+ + + https://ccextractor.github.io/taskwarrior-flutter/repo + + +

+

+ If you would like to manually verify the fingerprint (SHA-256) of the repository signing key, here it is: +
+ + 08 31 0C AC 5B 39 1A 99 00 65 CA 40 D2 AB 92 AC F0 E6 2C 16 19 70 1B 05 D3 0D 6C D7 7F AE C3 4B + +

+
+ + diff --git a/repo/index.jar b/repo/index.jar new file mode 100644 index 00000000..b9faa392 Binary files /dev/null and b/repo/index.jar differ diff --git a/repo/index.png b/repo/index.png new file mode 100644 index 00000000..f856ed43 Binary files /dev/null and b/repo/index.png differ diff --git a/repo/index.xml b/repo/index.xml new file mode 100644 index 00000000..b30d2b2f --- /dev/null +++ b/repo/index.xml @@ -0,0 +1 @@ +This repo is for nightly builds of the Taskwarrior Flutter app. It is not meant for production use, but for testing the latest changes.com.ccextractor.taskwarrior.nightly2025-09-022025-09-02Taskwarrior NightlyTaskwarrior is Free and Open Source Software that manages your TODO list from the command line. It is flexible, fast, and unobtrusive. It does its job then gets out of your way. The CLI tool and other relevant documentation can be found at Taskwarrior. This project aims to build an app for Taskwarrior. It is your task management app across all platforms. It helps you manage your tasks and filter them as per your needs.No description availableUnknowntaskwarrior-fluttertaskwarrior-flutterhttps://github.com/CCExtractor/taskwarrior-flutterhttps://github.com/CCExtractor/taskwarrior-flutterhttps://github.com/CCExtractor/taskwarrior-flutter/issuesCCExtractor Development21474836472.0.0-nightly9nightly.9.apkab7708cce4fe98739856a58d569d77f6982ef8761714ffd97d6dedba5a22d6953320392921332025-09-021478ed41a8b1b1d449c82db07179da0aACCESS_NETWORK_STATE,FOREGROUND_SERVICE,INTERNET,MANAGE_EXTERNAL_STORAGE,POST_NOTIFICATIONS,READ_EXTERNAL_STORAGE,RECEIVE_BOOT_COMPLETED,USE_EXACT_ALARM,VIBRATE,WAKE_LOCK,WRITE_EXTERNAL_STORAGE,com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSIONarm64-v8a,armeabi-v7a,x86,x86_642.0.0-nightly8nightly.8.apk2088fac41fb7b7fe82579a9aeabce0c64d5956c1fd241cff9dc8f16272061ce33320112921332025-09-021478ed41a8b1b1d449c82db07179da0aACCESS_NETWORK_STATE,FOREGROUND_SERVICE,INTERNET,MANAGE_EXTERNAL_STORAGE,POST_NOTIFICATIONS,READ_EXTERNAL_STORAGE,RECEIVE_BOOT_COMPLETED,USE_EXACT_ALARM,VIBRATE,WAKE_LOCK,WRITE_EXTERNAL_STORAGE,com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSIONarm64-v8a,armeabi-v7a,x86,x86_642.0.0-nightly7nightly.7.apk379e16385e4e4e2adbe8c50398cc6613d4861f0cd110286239c576023c8716703320112521332025-09-021478ed41a8b1b1d449c82db07179da0aACCESS_NETWORK_STATE,FOREGROUND_SERVICE,INTERNET,MANAGE_EXTERNAL_STORAGE,POST_NOTIFICATIONS,READ_EXTERNAL_STORAGE,RECEIVE_BOOT_COMPLETED,USE_EXACT_ALARM,VIBRATE,WAKE_LOCK,WRITE_EXTERNAL_STORAGE,com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSIONarm64-v8a,armeabi-v7a,x86,x86_642.0.0-nightly6nightly.6.apk3c3148e9e4a02b05fb5144cdcdc74e10c2c9f42d86014f270f54d32aef4ced243319227921332025-09-021478ed41a8b1b1d449c82db07179da0aACCESS_NETWORK_STATE,FOREGROUND_SERVICE,INTERNET,MANAGE_EXTERNAL_STORAGE,POST_NOTIFICATIONS,READ_EXTERNAL_STORAGE,RECEIVE_BOOT_COMPLETED,USE_EXACT_ALARM,VIBRATE,WAKE_LOCK,WRITE_EXTERNAL_STORAGE,com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSIONarm64-v8a,armeabi-v7a,x86,x86_642.0.0-nightly5nightly.5.apk09476f412ae9b4a6297c2c3997bae88afdb917d95b1a08ba3ac67c82036ae8613319228021332025-09-021478ed41a8b1b1d449c82db07179da0aACCESS_NETWORK_STATE,FOREGROUND_SERVICE,INTERNET,MANAGE_EXTERNAL_STORAGE,POST_NOTIFICATIONS,READ_EXTERNAL_STORAGE,RECEIVE_BOOT_COMPLETED,USE_EXACT_ALARM,VIBRATE,WAKE_LOCK,WRITE_EXTERNAL_STORAGE,com.ccextractor.taskwarrior.nightly.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSIONarm64-v8a,armeabi-v7a,x86,x86_64 \ No newline at end of file diff --git a/repo/nightly.5.apk b/repo/nightly.5.apk new file mode 100644 index 00000000..9aa33c47 Binary files /dev/null and b/repo/nightly.5.apk differ diff --git a/repo/nightly.6.apk b/repo/nightly.6.apk new file mode 100644 index 00000000..dce01153 Binary files /dev/null and b/repo/nightly.6.apk differ diff --git a/repo/nightly.7.apk b/repo/nightly.7.apk new file mode 100644 index 00000000..f9b54fd2 Binary files /dev/null and b/repo/nightly.7.apk differ diff --git a/repo/nightly.8.apk b/repo/nightly.8.apk new file mode 100644 index 00000000..c890aabc Binary files /dev/null and b/repo/nightly.8.apk differ diff --git a/repo/nightly.9.apk b/repo/nightly.9.apk new file mode 100644 index 00000000..a32223a8 Binary files /dev/null and b/repo/nightly.9.apk differ diff --git a/repo/status/running.json b/repo/status/running.json new file mode 100644 index 00000000..4e8d2243 --- /dev/null +++ b/repo/status/running.json @@ -0,0 +1 @@ +{"/etc/issue.net":"Ubuntu 24.04.3 LTS","antiFeatures":{},"apksigner":"/usr/bin/apksigner","archivePolicy0":[],"commandLine":["/usr/bin/fdroid update","-c"],"disabled":[],"endTimestamp":1756788768691,"failedBuilds":{},"fdroiddata":{"commitId":"ad5747365b9a9c38eed4e0f266c2f752e6ffe28a","isDirty":true,"modifiedFiles":["repo/entry.jar","repo/entry.json","repo/index-v1.jar","repo/index-v1.json","repo/index-v2.json","repo/index.jar","repo/index.xml"],"untrackedFiles":[]},"jarsigner":"/usr/lib/jvm/default-java/bin/jarsigner","keytool":"/usr/lib/jvm/default-java/bin/keytool","needsUpdate":["com.ccextractor.taskwarrior.nightly"],"noPackages":["com.ccextractor.taskwarrior.nightly"],"noUpdateCheck":["com.ccextractor.taskwarrior.nightly"],"startTimestamp":1756788760000,"subcommand":"update"} \ No newline at end of file diff --git a/repo/status/update.json b/repo/status/update.json new file mode 100644 index 00000000..4e8d2243 --- /dev/null +++ b/repo/status/update.json @@ -0,0 +1 @@ +{"/etc/issue.net":"Ubuntu 24.04.3 LTS","antiFeatures":{},"apksigner":"/usr/bin/apksigner","archivePolicy0":[],"commandLine":["/usr/bin/fdroid update","-c"],"disabled":[],"endTimestamp":1756788768691,"failedBuilds":{},"fdroiddata":{"commitId":"ad5747365b9a9c38eed4e0f266c2f752e6ffe28a","isDirty":true,"modifiedFiles":["repo/entry.jar","repo/entry.json","repo/index-v1.jar","repo/index-v1.json","repo/index-v2.json","repo/index.jar","repo/index.xml"],"untrackedFiles":[]},"jarsigner":"/usr/lib/jvm/default-java/bin/jarsigner","keytool":"/usr/lib/jvm/default-java/bin/keytool","needsUpdate":["com.ccextractor.taskwarrior.nightly"],"noPackages":["com.ccextractor.taskwarrior.nightly"],"noUpdateCheck":["com.ccextractor.taskwarrior.nightly"],"startTimestamp":1756788760000,"subcommand":"update"} \ No newline at end of file diff --git a/test/api_service_test.dart b/test/api_service_test.dart deleted file mode 100644 index cfa115f8..00000000 --- a/test/api_service_test.dart +++ /dev/null @@ -1,186 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; -import 'package:mockito/mockito.dart'; -import 'package:http/http.dart' as http; -import 'package:sqflite_common_ffi/sqflite_ffi.dart'; -import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart'; -import 'package:taskwarrior/app/v3/db/task_database.dart'; -import 'package:taskwarrior/app/v3/models/task.dart'; -import 'package:taskwarrior/app/v3/net/fetch.dart'; -import 'package:taskwarrior/app/v3/net/origin.dart'; - -import 'api_service_test.mocks.dart'; - -class MockCredentialsStorage extends Mock implements CredentialsStorage {} - -class MockMethodChannel extends Mock implements MethodChannel {} - -@GenerateMocks([MockMethodChannel, http.Client]) -void main() { - TestWidgetsFlutterBinding.ensureInitialized(); - - databaseFactory = databaseFactoryFfi; - MockClient mockClient = MockClient(); - - setUpAll(() { - sqfliteFfiInit(); - }); - - group('Tasks model', () { - test('fromJson creates Tasks object', () { - final json = { - 'id': 1, - 'description': 'Task 1', - 'project': 'Project 1', - 'status': 'pending', - 'uuid': '123', - 'urgency': 5.0, - 'priority': 'H', - 'due': '2024-12-31', - 'end': null, - 'entry': '2024-01-01', - 'modified': '2024-11-01', - }; - - final task = TaskForC.fromJson(json); - - expect(task.id, 1); - expect(task.description, 'Task 1'); - expect(task.project, 'Project 1'); - expect(task.status, 'pending'); - expect(task.uuid, '123'); - expect(task.urgency, 5.0); - expect(task.priority, 'H'); - expect(task.due, '2024-12-31'); - expect(task.entry, '2024-01-01'); - expect(task.modified, '2024-11-01'); - }); - - test('toJson converts Tasks object to JSON', () { - final task = TaskForC( - id: 1, - description: 'Task 1', - project: 'Project 1', - status: 'pending', - uuid: '123', - urgency: 5.0, - priority: 'H', - due: '2024-12-31', - end: null, - entry: '2024-01-01', - modified: '2024-11-01', - tags: ['t1'], - start: '', - wait: '', - rtype: '', - recur: '', - depends: [], - annotations: []); - - final json = task.toJson(); - - expect(json['id'], 1); - expect(json['description'], 'Task 1'); - expect(json['project'], 'Project 1'); - expect(json['status'], 'pending'); - expect(json['uuid'], '123'); - expect(json['urgency'], 5.0); - expect(json['priority'], 'H'); - expect(json['due'], '2024-12-31'); - }); - }); - - group('fetchTasks', () { - test('Fetch data successfully', () async { - final responseJson = jsonEncode({'data': 'Mock data'}); - var baseUrl = await CredentialsStorage.getApiUrl(); - when(mockClient.get( - Uri.parse( - '$baseUrl/tasks?email=email&origin=$origin&UUID=123&encryptionSecret=secret'), - headers: { - "Content-Type": "application/json", - })).thenAnswer((_) async => http.Response(responseJson, 200)); - - final result = await fetchTasks('123', 'secret'); - - expect(result, isA>()); - }); - - test('fetchTasks returns empty array', () async { - const uuid = '123'; - const encryptionSecret = 'secret'; - - expect(await fetchTasks(uuid, encryptionSecret), isEmpty); - }); - }); - - group('TaskDatabase', () { - late TaskDatabase taskDatabase; - - setUp(() async { - taskDatabase = TaskDatabase(); - await taskDatabase.open(); - }); - - test('insertTask adds a task to the database', () async { - final task = TaskForC( - id: 1, - description: 'Task 1', - project: 'Project 1', - status: 'pending', - uuid: '123', - urgency: 5.0, - priority: 'H', - due: '2024-12-31', - end: '', - entry: '2024-01-01', - modified: '2024-11-01', - tags: ['t1'], - start: '', - wait: '', - rtype: '', - recur: '', - depends: [], - annotations: []); - - await taskDatabase.insertTask(task); - - final tasks = await taskDatabase.fetchTasksFromDatabase(); - - expect(tasks.length, 1); - expect(tasks[0].description, 'Task 1'); - }); - - test('deleteAllTasksInDB removes all tasks', () async { - final task = TaskForC( - id: 1, - description: 'Task 1', - project: 'Project 1', - status: 'pending', - uuid: '123', - urgency: 5.0, - priority: 'H', - due: '2024-12-31', - end: null, - entry: '2024-01-01', - modified: '2024-11-01', - tags: ['t1'], - start: '', - wait: '', - rtype: '', - recur: '', - depends: [], - annotations: []); - - await taskDatabase.insertTask(task); - await taskDatabase.deleteAllTasksInDB(); - - final tasks = await taskDatabase.fetchTasksFromDatabase(); - - expect(tasks.length, 0); - }); - }); -} diff --git a/test/api_service_test.mocks.dart b/test/api_service_test.mocks.dart deleted file mode 100644 index c23b5109..00000000 --- a/test/api_service_test.mocks.dart +++ /dev/null @@ -1,401 +0,0 @@ -// Mocks generated by Mockito 5.4.4 from annotations -// in taskwarrior/test/api_service_test.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:convert' as _i7; -import 'dart:typed_data' as _i8; - -import 'package:flutter/services.dart' as _i2; -import 'package:http/http.dart' as _i3; -import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i5; - -import 'api_service_test.dart' as _i4; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types -// ignore_for_file: subtype_of_sealed_class - -class _FakeMethodCodec_0 extends _i1.SmartFake implements _i2.MethodCodec { - _FakeMethodCodec_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeBinaryMessenger_1 extends _i1.SmartFake - implements _i2.BinaryMessenger { - _FakeBinaryMessenger_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeResponse_2 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeStreamedResponse_3 extends _i1.SmartFake - implements _i3.StreamedResponse { - _FakeStreamedResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -/// A class which mocks [MockMethodChannel]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockMockMethodChannel extends _i1.Mock implements _i4.MockMethodChannel { - MockMockMethodChannel() { - _i1.throwOnMissingStub(this); - } - - @override - String get name => (super.noSuchMethod( - Invocation.getter(#name), - returnValue: _i5.dummyValue( - this, - Invocation.getter(#name), - ), - ) as String); - - @override - _i2.MethodCodec get codec => (super.noSuchMethod( - Invocation.getter(#codec), - returnValue: _FakeMethodCodec_0( - this, - Invocation.getter(#codec), - ), - ) as _i2.MethodCodec); - - @override - _i2.BinaryMessenger get binaryMessenger => (super.noSuchMethod( - Invocation.getter(#binaryMessenger), - returnValue: _FakeBinaryMessenger_1( - this, - Invocation.getter(#binaryMessenger), - ), - ) as _i2.BinaryMessenger); - - @override - _i6.Future invokeMethod( - String? method, [ - dynamic arguments, - ]) => - (super.noSuchMethod( - Invocation.method( - #invokeMethod, - [ - method, - arguments, - ], - ), - returnValue: _i6.Future.value(), - ) as _i6.Future); - - @override - _i6.Future?> invokeListMethod( - String? method, [ - dynamic arguments, - ]) => - (super.noSuchMethod( - Invocation.method( - #invokeListMethod, - [ - method, - arguments, - ], - ), - returnValue: _i6.Future?>.value(), - ) as _i6.Future?>); - - @override - _i6.Future?> invokeMapMethod( - String? method, [ - dynamic arguments, - ]) => - (super.noSuchMethod( - Invocation.method( - #invokeMapMethod, - [ - method, - arguments, - ], - ), - returnValue: _i6.Future?>.value(), - ) as _i6.Future?>); - - @override - void setMethodCallHandler( - _i6.Future Function(_i2.MethodCall)? handler) => - super.noSuchMethod( - Invocation.method( - #setMethodCallHandler, - [handler], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [Client]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockClient extends _i1.Mock implements _i3.Client { - MockClient() { - _i1.throwOnMissingStub(this); - } - - @override - _i6.Future<_i3.Response> head( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - )), - ) as _i6.Future<_i3.Response>); - - @override - _i6.Future<_i3.Response> get( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - )), - ) as _i6.Future<_i3.Response>); - - @override - _i6.Future<_i3.Response> post( - Uri? url, { - Map? headers, - Object? body, - _i7.Encoding? encoding, - }) => - (super.noSuchMethod( - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i6.Future<_i3.Response>); - - @override - _i6.Future<_i3.Response> put( - Uri? url, { - Map? headers, - Object? body, - _i7.Encoding? encoding, - }) => - (super.noSuchMethod( - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i6.Future<_i3.Response>); - - @override - _i6.Future<_i3.Response> patch( - Uri? url, { - Map? headers, - Object? body, - _i7.Encoding? encoding, - }) => - (super.noSuchMethod( - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i6.Future<_i3.Response>); - - @override - _i6.Future<_i3.Response> delete( - Uri? url, { - Map? headers, - Object? body, - _i7.Encoding? encoding, - }) => - (super.noSuchMethod( - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i6.Future<_i3.Response>); - - @override - _i6.Future read( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i6.Future.value(_i5.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - )), - ) as _i6.Future); - - @override - _i6.Future<_i8.Uint8List> readBytes( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), - returnValue: _i6.Future<_i8.Uint8List>.value(_i8.Uint8List(0)), - ) as _i6.Future<_i8.Uint8List>); - - @override - _i6.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) => - (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: - _i6.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_3( - this, - Invocation.method( - #send, - [request], - ), - )), - ) as _i6.Future<_i3.StreamedResponse>); - - @override - void close() => super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValueForMissingStub: null, - ); -} diff --git a/test/main_test.dart b/test/main_test.dart deleted file mode 100644 index 00fb9c1f..00000000 --- a/test/main_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:get/get.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; - -void main() { - group('Main App Initialization', () { - testWidgets('App initializes with the correct route', - (WidgetTester tester) async { - await tester.pumpWidget(GetMaterialApp( - title: "Application", - initialRoute: AppPages.INITIAL, - getPages: AppPages.routes, - )); - - // Check if the app starts at the correct initial route - expect(Get.currentRoute, equals(AppPages.INITIAL)); - }); - - testWidgets('Splash screen displays the correct content', - (WidgetTester tester) async { - await tester.pumpWidget(GetMaterialApp( - title: "Application", - initialRoute: AppPages.INITIAL, - getPages: AppPages.routes, - )); - - // Check if the splash screen contains the expected text - expect(find.text("Setting up the app..."), findsOneWidget); - }); - }); -} diff --git a/test/models/chart_test.dart b/test/models/chart_test.dart deleted file mode 100644 index b6cda046..00000000 --- a/test/models/chart_test.dart +++ /dev/null @@ -1,30 +0,0 @@ - import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/chart.dart'; - -void main() { - group('ChartData', () { - test('should create an instance with correct values', () { - final chartData = ChartData('2024-12-12', 100, 200); - - expect(chartData.x, '2024-12-12'); - expect(chartData.y1, 100); - expect(chartData.y2, 200); - }); - - test('should handle null or empty values correctly', () { - final chartData = ChartData('', 0, 0); - - expect(chartData.x, ''); - expect(chartData.y1, 0); - expect(chartData.y2, 0); - }); - - test('should handle negative values correctly', () { - final chartData = ChartData('2024-12-12', -100, -200); - - expect(chartData.x, '2024-12-12'); - expect(chartData.y1, -100); - expect(chartData.y2, -200); - }); - }); -} diff --git a/test/models/data_test.dart b/test/models/data_test.dart deleted file mode 100644 index 567b0166..00000000 --- a/test/models/data_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:taskwarrior/app/models/data.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/services/notification_services.dart'; -import 'package:flutter/widgets.dart'; -import 'dart:io'; - -class MockNotificationService extends Mock implements NotificationService {} - -void main() { - TestWidgetsFlutterBinding.ensureInitialized(); - - group('Data', () { - late Data data; - late Directory home; - late MockNotificationService mockNotificationService; - - setUp(() { - WidgetsFlutterBinding.ensureInitialized(); - home = Directory.systemTemp.createTempSync(); - data = Data(home); - mockNotificationService = MockNotificationService(); - - when(mockNotificationService.initiliazeNotification()) - .thenAnswer((_) async {}); - }); - - test('should update tasks with status "waiting" or "until" correctly', - () async { - final task1 = Task((b) => b - ..uuid = '1' - ..status = 'pending' - ..wait = DateTime.now().toUtc().subtract(const Duration(days: 1)) - ..description = 'Test Task' - ..entry = DateTime.now().toUtc()); - final task2 = Task((b) => b - ..uuid = '2' - ..status = 'deleted' - ..until = DateTime.now().toUtc().subtract(const Duration(days: 1)) - ..description = 'Test Task' - ..entry = DateTime.now().toUtc()); - - final updatedTasks = data.pendingData(); - expect( - updatedTasks.any( - (task) => task.uuid == task1.uuid && task.status == task1.status), - isFalse); - expect( - updatedTasks.any( - (task) => task.uuid == task2.uuid && task.status == task2.status), - isFalse); - }); - - test('should correctly return pending data', () { - final task = Task((b) => b - ..uuid = '1' - ..status = 'pending' - ..description = 'Test Task' - ..entry = DateTime.now().toUtc()); - - data.updateWaitOrUntil([task]); - final tasks = data.pendingData(); - expect(tasks.any((t) => t.uuid == '1' && t.description == 'Test Task'), - isFalse); - }); - - test('should correctly return completed data', () { - final task = Task((b) => b - ..uuid = '1' - ..status = 'completed' - ..description = 'Test Task' - ..entry = DateTime.now().toUtc()); - - data.updateWaitOrUntil([task]); - final tasks = data.completedData(); - expect(tasks.any((t) => t.uuid == '1' && t.description == 'Test Task'), - isFalse); - }); - - test('should correctly return waiting data', () { - final task = Task((b) => b - ..uuid = '1' - ..status = 'waiting' - ..description = 'Test Task' - ..entry = DateTime.now().toUtc()); - - data.updateWaitOrUntil([task]); - final tasks = data.waitingData(); - expect(tasks.any((t) => t.uuid == '1' && t.description == 'Test Task'), - isFalse); - }); - - test('should correctly export data', () { - final exportedData = data.export(); - expect(exportedData, isNotNull); - }); - - tearDown(() { - home.deleteSync(recursive: true); - }); - }); -} diff --git a/test/models/filters_test.dart b/test/models/filters_test.dart deleted file mode 100644 index 8d577349..00000000 --- a/test/models/filters_test.dart +++ /dev/null @@ -1,104 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/filters.dart'; -import 'package:taskwarrior/app/services/tag_filter.dart'; - -void main() { - group('Filters', () { - late Filters filters; - late bool pendingFilter; - late bool waitingFilter; - late String projectFilter; - late bool tagUnion; - late Map tags; - - setUp(() { - pendingFilter = false; - waitingFilter = false; - projectFilter = 'TestProject'; - tagUnion = false; - tags = { - 'tag1': const TagFilterMetadata(display: 'Tag 1', selected: false), - 'tag2': const TagFilterMetadata(display: 'Tag 2', selected: true), - }; - - filters = Filters( - pendingFilter: pendingFilter, - waitingFilter: waitingFilter, - togglePendingFilter: () { - pendingFilter = !pendingFilter; - }, - toggleWaitingFilter: () { - waitingFilter = !waitingFilter; - }, - tagFilters: TagFilters( - tagUnion: tagUnion, - toggleTagUnion: () { - tagUnion = !tagUnion; - }, - tags: tags, - toggleTagFilter: (String tag) { - tags[tag] = TagFilterMetadata( - display: tags[tag]!.display, - selected: !tags[tag]!.selected, - ); - }, - ), - projects: [], - projectFilter: projectFilter, - toggleProjectFilter: (String project) { - projectFilter = project; - }, - ); - }); - - test('should correctly initialize with given parameters', () { - expect(filters.pendingFilter, pendingFilter); - expect(filters.waitingFilter, waitingFilter); - expect(filters.projectFilter, projectFilter); - expect(filters.tagFilters.tagUnion, tagUnion); - expect(filters.tagFilters.tags, tags); - }); - - test('should correctly toggle pending filter', () { - filters.togglePendingFilter(); - expect(pendingFilter, isTrue); - - filters.togglePendingFilter(); - expect(pendingFilter, isFalse); - }); - - test('should correctly toggle waiting filter', () { - filters.toggleWaitingFilter(); - expect(waitingFilter, isTrue); - - filters.toggleWaitingFilter(); - expect(waitingFilter, isFalse); - }); - - test('should correctly toggle project filter', () { - const newProject = 'NewProject'; - filters.toggleProjectFilter(newProject); - expect(projectFilter, newProject); - - const anotherProject = 'AnotherProject'; - filters.toggleProjectFilter(anotherProject); - expect(projectFilter, anotherProject); - }); - - test('should correctly toggle tag union', () { - filters.tagFilters.toggleTagUnion(); - expect(tagUnion, isTrue); - - filters.tagFilters.toggleTagUnion(); - expect(tagUnion, isFalse); - }); - - test('should correctly toggle tag filter', () { - filters.tagFilters.toggleTagFilter('tag1'); - expect(tags['tag1']!.selected, isTrue); - - filters.tagFilters.toggleTagFilter('tag1'); - expect(tags['tag1']!.selected, isFalse); - }); - }); -} diff --git a/test/models/json/annotation_test.dart b/test/models/json/annotation_test.dart deleted file mode 100644 index 6d2ee948..00000000 --- a/test/models/json/annotation_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// test/annotation_test.dart - -import 'package:flutter_test/flutter_test.dart'; -import 'package:intl/intl.dart'; -import 'package:taskwarrior/app/models/json/annotation.dart'; - -void main() { - group('Annotation', () { - late Annotation annotation; - late DateTime entry; - late String description; - - setUp(() { - entry = DateTime.now().toUtc(); // Ensure the DateTime is in UTC - description = 'Test description'; - - annotation = Annotation((b) => b - ..entry = entry - ..description = description); - }); - - test('should correctly initialize with given parameters', () { - expect(annotation.entry, entry); - expect(annotation.description, description); - }); - - test('should correctly convert to JSON', () { - final json = annotation.toJson(); - expect(DateFormat("yyyyMMdd'T'HH").format(DateTime.parse(json['entry'])), - DateFormat("yyyyMMdd'T'HH").format(entry)); - expect(json['description'], description); - }); - - test('should correctly create from JSON', () { - final json = { - 'entry': entry.toIso8601String(), - 'description': description, - }; - final newAnnotation = Annotation.fromJson(json); - expect(newAnnotation.entry, entry); - expect(newAnnotation.description, description); - }); - }); -} diff --git a/test/models/json/iso_8601_basic_test.dart b/test/models/json/iso_8601_basic_test.dart deleted file mode 100644 index 07d05f9b..00000000 --- a/test/models/json/iso_8601_basic_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:intl/intl.dart'; -import 'package:taskwarrior/app/models/json/iso_8601_basic.dart'; -import 'package:taskwarrior/app/models/json/serializers.dart'; - -void main() { - group('Iso8601BasicDateTimeSerializer', () { - late Iso8601BasicDateTimeSerializer serializer; - late DateTime dateTime; - late DateFormat dateFormat; - - setUp(() { - serializer = Iso8601BasicDateTimeSerializer(); - dateTime = DateTime.utc(2024, 12, 12, 13, 30, 40, 495); - dateFormat = DateFormat('yMMddTHHmmss\'Z\''); - }); - - test('should throw ArgumentError if dateTime is not in UTC', () { - expect( - () => serializer.serialize(serializers, dateTime.toLocal()), - throwsArgumentError, - ); - }); - - test('should correctly serialize UTC dateTime', () { - final serialized = serializer.serialize(serializers, dateTime); - expect(serialized, dateFormat.format(dateTime)); - }); - }); -} diff --git a/test/models/json/serializer_test.dart b/test/models/json/serializer_test.dart deleted file mode 100644 index 9b2f73fe..00000000 --- a/test/models/json/serializer_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:intl/intl.dart'; -import 'package:taskwarrior/app/models/json/serializers.dart'; -import 'package:taskwarrior/app/models/json/annotation.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; - -void main() { - group('Serializers', () { - test('should correctly serialize and deserialize Annotation', () { - final annotation = Annotation((b) => b - ..entry = DateTime.now().toUtc() - ..description = 'Test description'); - - final serialized = - serializers.serializeWith(Annotation.serializer, annotation); - final deserialized = - serializers.deserializeWith(Annotation.serializer, serialized!); - - expect(DateFormat("yyyyMMdd'T'HH").format(deserialized!.entry), - DateFormat("yyyyMMdd'T'HH").format(annotation.entry)); - expect(deserialized.description, annotation.description); - }); - - test('should correctly serialize and deserialize Task', () { - final task = Task((b) => b - ..uuid = '1' - ..status = 'pending' - ..description = 'Test Task' - ..entry = DateTime.now().toUtc()); - - final serialized = serializers.serializeWith(Task.serializer, task); - final deserialized = - serializers.deserializeWith(Task.serializer, serialized!); - - expect(DateFormat("yyyyMMdd'T'HH").format(deserialized!.entry), - DateFormat("yyyyMMdd'T'HH").format(task.entry)); - expect(deserialized.uuid, task.uuid); - expect(deserialized.status, task.status); - expect(deserialized.description, task.description); - }); - }); -} diff --git a/test/models/json/task_test.dart b/test/models/json/task_test.dart deleted file mode 100644 index 2660b527..00000000 --- a/test/models/json/task_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:intl/intl.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; - -void main() { - group('Task', () { - late Task task; - late DateTime entry; - late String uuid; - late String description; - - setUp(() { - entry = DateTime.now().toUtc(); - uuid = '123e4567-e89b-12d3-a456-426614174000'; - description = 'Test task'; - - task = Task((b) => b - ..entry = entry - ..uuid = uuid - ..status = 'pending' - ..description = description); - }); - - test('should correctly initialize with given parameters', () { - expect(task.entry, entry); - expect(task.uuid, uuid); - expect(task.description, description); - }); - - test('should correctly convert to JSON', () { - final json = task.toJson(); - expect(DateFormat("yyyyMMdd'T'HH").format(DateTime.parse(json['entry'])), - DateFormat("yyyyMMdd'T'HH").format(entry)); - expect(json['uuid'], uuid); - expect(json['description'], description); - }); - - test('should correctly create from JSON', () { - final json = { - 'entry': entry.toIso8601String(), - 'uuid': uuid, - 'status': 'pending', - 'description': description, - }; - final newTask = Task.fromJson(json); - expect(newTask.entry, entry); - expect(newTask.uuid, uuid); - expect(newTask.description, description); - }); - }); -} diff --git a/test/models/onboarding_model_test.dart b/test/models/onboarding_model_test.dart deleted file mode 100644 index d43db085..00000000 --- a/test/models/onboarding_model_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/onboarding_model.dart'; - -void main() { - group('OnboardingModel', () { - late OnboardingModel model; - - setUp(() { - model = OnboardingModel( - title: 'Welcome', - image: 'assets/images/welcome.png', - desc: 'Welcome to the app!', - colors: Colors.blue, - ); - }); - - test('should correctly initialize with given parameters', () { - expect(model.title, 'Welcome'); - expect(model.image, 'assets/images/welcome.png'); - expect(model.desc, 'Welcome to the app!'); - expect(model.colors, Colors.blue); - }); - }); -} diff --git a/test/models/size_config_model_test.dart b/test/models/size_config_model_test.dart deleted file mode 100644 index 7dfcdc66..00000000 --- a/test/models/size_config_model_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/size_config_model.dart'; - -void main() { - group('SizeConfig', () { - late SizeConfig sizeConfig; - - setUp(() { - sizeConfig = SizeConfig(); - }); - - testWidgets('should initialize screen dimensions correctly', - (WidgetTester tester) async { - await tester.pumpWidget( - MaterialApp( - home: Builder( - builder: (BuildContext context) { - sizeConfig.init(context); - return Container(); - }, - ), - ), - ); - - final mediaQueryData = - MediaQuery.of(tester.element(find.byType(Container))); - - expect(sizeConfig.screenW, mediaQueryData.size.width); - expect(sizeConfig.screenH, mediaQueryData.size.height); - expect(sizeConfig.blockH, mediaQueryData.size.width / 100); - expect(sizeConfig.blockV, mediaQueryData.size.height / 100); - }); - }); -} diff --git a/test/models/storage/client_test.dart b/test/models/storage/client_test.dart deleted file mode 100644 index d4bbbf28..00000000 --- a/test/models/storage/client_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:package_info_plus/package_info_plus.dart'; -import 'package:taskwarrior/app/models/storage/client.dart'; - -class MockPackageInfo extends Mock implements PackageInfo {} - -void main() { - group('client', () { - test('should return package name and version', () async { - PackageInfo.setMockInitialValues( - appName: 'App', - packageName: 'com.example.app', - version: '1.0.0', - buildNumber: '1', - buildSignature: '', - ); - - final result = await client(); - - expect(result, 'com.example.app 1.0.0'); - }); - }); -} diff --git a/test/models/storage/exceptions/bad_certificate_exception_test.dart b/test/models/storage/exceptions/bad_certificate_exception_test.dart deleted file mode 100644 index ad0c4f85..00000000 --- a/test/models/storage/exceptions/bad_certificate_exception_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; -import 'package:taskwarrior/app/models/storage/exceptions/bad_certificate_exception.dart'; -import 'bad_certificate_exception_test.mocks.dart'; - -@GenerateMocks([X509Certificate]) -void main() { - group('BadCertificateException', () { - test('should create an instance with correct properties', () { - final home = Directory('/mock/home'); - final mockCertificate = MockX509Certificate(); - - final exception = - BadCertificateException(home: home, certificate: mockCertificate); - - expect(exception.home, home); - expect(exception.certificate, mockCertificate); - }); - }); -} diff --git a/test/models/storage/exceptions/bad_certificate_exception_test.mocks.dart b/test/models/storage/exceptions/bad_certificate_exception_test.mocks.dart deleted file mode 100644 index b7bf410e..00000000 --- a/test/models/storage/exceptions/bad_certificate_exception_test.mocks.dart +++ /dev/null @@ -1,99 +0,0 @@ -// Mocks generated by Mockito 5.4.4 from annotations -// in taskwarrior/test/models/storage/exceptions/bad_certificate_exception_test.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:io' as _i2; -import 'dart:typed_data' as _i3; - -import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i4; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types -// ignore_for_file: subtype_of_sealed_class - -class _FakeDateTime_0 extends _i1.SmartFake implements DateTime { - _FakeDateTime_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -/// A class which mocks [X509Certificate]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockX509Certificate extends _i1.Mock implements _i2.X509Certificate { - MockX509Certificate() { - _i1.throwOnMissingStub(this); - } - - @override - _i3.Uint8List get der => (super.noSuchMethod( - Invocation.getter(#der), - returnValue: _i3.Uint8List(0), - ) as _i3.Uint8List); - - @override - String get pem => (super.noSuchMethod( - Invocation.getter(#pem), - returnValue: _i4.dummyValue( - this, - Invocation.getter(#pem), - ), - ) as String); - - @override - _i3.Uint8List get sha1 => (super.noSuchMethod( - Invocation.getter(#sha1), - returnValue: _i3.Uint8List(0), - ) as _i3.Uint8List); - - @override - String get subject => (super.noSuchMethod( - Invocation.getter(#subject), - returnValue: _i4.dummyValue( - this, - Invocation.getter(#subject), - ), - ) as String); - - @override - String get issuer => (super.noSuchMethod( - Invocation.getter(#issuer), - returnValue: _i4.dummyValue( - this, - Invocation.getter(#issuer), - ), - ) as String); - - @override - DateTime get startValidity => (super.noSuchMethod( - Invocation.getter(#startValidity), - returnValue: _FakeDateTime_0( - this, - Invocation.getter(#startValidity), - ), - ) as DateTime); - - @override - DateTime get endValidity => (super.noSuchMethod( - Invocation.getter(#endValidity), - returnValue: _FakeDateTime_0( - this, - Invocation.getter(#endValidity), - ), - ) as DateTime); -} diff --git a/test/models/storage/exceptions/taskserver_configuration_exception_test.dart b/test/models/storage/exceptions/taskserver_configuration_exception_test.dart deleted file mode 100644 index d8eb8d15..00000000 --- a/test/models/storage/exceptions/taskserver_configuration_exception_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/storage/exceptions/taskserver_configuration_exception.dart'; - -void main() { - group('TaskserverConfigurationException', () { - test('should create an instance with correct message', () { - const message = 'Configuration error'; - final exception = TaskserverConfigurationException(message); - - expect(exception.message, message); - expect(exception.toString(), message); - }); - }); -} diff --git a/test/models/storage/tabs_test.dart b/test/models/storage/tabs_test.dart deleted file mode 100644 index baf5a20b..00000000 --- a/test/models/storage/tabs_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/storage/tabs.dart'; -import 'package:uuid/uuid.dart'; - -void main() { - late Directory testProfile; - late Tabs tabs; - - setUp(() { - testProfile = Directory( - '${Directory.systemTemp.path}/test_profile_${const Uuid().v1()}'); - testProfile.createSync(); - tabs = Tabs(testProfile); - }); - - tearDown(() { - if (testProfile.existsSync()) { - testProfile.deleteSync(recursive: true); - } - }); - group("Tabs test", () { - test('Initial tab index defaults to 0', () { - expect(tabs.initialTabIndex(), 0); - }); - - test('Can set and get initial tab index', () { - tabs.setInitialTabIndex(2); - expect(tabs.initialTabIndex(), 2); - }); - - test('Can add a new tab', () { - var initialTabCount = tabs.tabUuids().length; - tabs.addTab(); - expect(tabs.tabUuids().length, initialTabCount + 1); - }); - - test('Can remove a tab', () { - var initialTabCount = tabs.tabUuids().length; - tabs.addTab(); - tabs.removeTab(0); - expect(tabs.tabUuids().length, initialTabCount); - }); - - test('Removing a tab updates the initial index', () { - tabs.addTab(); - tabs.addTab(); - tabs.setInitialTabIndex(1); - tabs.removeTab(1); - expect(tabs.initialTabIndex(), 0); - }); - - test('Can rename a tab and retrieve its alias', () { - tabs.addTab(); - var tabUuid = tabs.tabUuids().first; - tabs.renameTab(tab: tabUuid, name: 'New Tab Name'); - expect(tabs.alias(tabUuid), 'New Tab Name'); - }); - - test('Alias returns null for non-existent alias files', () { - tabs.addTab(); - var tabUuid = tabs.tabUuids().first; - expect(tabs.alias(tabUuid), isNull); - }); - }); -} diff --git a/test/models/storage_test.dart b/test/models/storage_test.dart deleted file mode 100644 index d32213f3..00000000 --- a/test/models/storage_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/data.dart'; -import 'package:taskwarrior/app/models/storage.dart'; -import 'package:taskwarrior/app/models/storage/tabs.dart'; -import 'package:taskwarrior/app/utils/home_path/impl/gui_pem_file_paths.dart'; -import 'package:taskwarrior/app/utils/home_path/impl/home.dart'; -import 'package:taskwarrior/app/utils/home_path/impl/taskrc.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/query.dart'; - -void main() { - group('Storage', () { - late Directory profile; - late Storage storage; - - setUp(() { - profile = Directory.systemTemp.createTempSync(); - storage = Storage(profile); - }); - - tearDown(() { - profile.deleteSync(recursive: true); - }); - - test('should correctly initialize with given directory', () { - expect(storage.profile, profile); - }); - - test('should correctly initialize Data with profile directory', () { - expect(storage.data, isA()); - expect(storage.profile, profile); - }); - - test('should correctly initialize GUIPemFiles with profile directory', () { - expect(storage.guiPemFiles, isA()); - expect(storage.profile, profile); - }); - - test('should correctly initialize Home with profile directory', () { - expect(storage.home, isA()); - expect(storage.home.home, profile); - expect( - storage.home.pemFilePaths?.key, storage.guiPemFiles.pemFilePaths.key); - }); - - test('should correctly initialize Query with profile directory', () { - expect(storage.query, isA()); - expect(storage.profile, profile); - }); - - test('should correctly initialize Tabs with profile directory', () { - expect(storage.tabs, isA()); - expect(storage.tabs.profile, profile); - }); - - test('should correctly initialize Taskrc with profile directory', () { - expect(storage.taskrc, isA()); - expect(storage.profile, profile); - }); - }); -} diff --git a/test/models/tag_mets_data_test.dart b/test/models/tag_mets_data_test.dart deleted file mode 100644 index e6887814..00000000 --- a/test/models/tag_mets_data_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/tag_meta_data.dart'; - -void main() { - group('TagMetadata', () { - late TagMetadata tagMetadata; - late DateTime lastModified; - late int frequency; - late bool selected; - - setUp(() { - lastModified = DateTime.now(); - frequency = 5; - selected = true; - - tagMetadata = TagMetadata( - lastModified: lastModified, - frequency: frequency, - selected: selected, - ); - }); - - test('should correctly initialize with given parameters', () { - expect(tagMetadata.lastModified, lastModified); - expect(tagMetadata.frequency, frequency); - expect(tagMetadata.selected, selected); - }); - - test('should correctly convert to JSON', () { - final json = tagMetadata.toJson(); - expect(json['lastModified'], lastModified); - expect(json['frequency'], frequency); - expect(json['selected'], selected); - }); - - test('should correctly convert to string', () { - final string = tagMetadata.toString(); - expect(string, tagMetadata.toJson().toString()); - }); - }); -} diff --git a/test/modules/home/task_list_item_test.dart b/test/modules/home/task_list_item_test.dart deleted file mode 100644 index b8a60720..00000000 --- a/test/modules/home/task_list_item_test.dart +++ /dev/null @@ -1,133 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/modules/home/views/tas_list_item.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/modify.dart'; - -class MockModify extends Mock implements Modify {} - -void main() { - group('TaskListItem', () { - late Task normalTask; - late Task dueSoonTask; - late Task overdueTask; - late MockModify mockModify; - - setUp(() { - mockModify = MockModify(); - - normalTask = Task((b) => b - ..id = 1 - ..uuid = 'uuid1' - ..description = 'Task without urgency' - ..status = 'pending' - ..entry = DateTime.now() - ..due = DateTime.now().add(const Duration(days: 5))); - - dueSoonTask = Task((b) => b - ..id = 2 - ..uuid = 'uuid2' - ..description = 'Task due soon' - ..status = 'pending' - ..entry = DateTime.now() - ..due = DateTime.now().add(const Duration(hours: 23))); - - overdueTask = Task((b) => b - ..id = 3 - ..uuid = 'uuid3' - ..description = 'Overdue task' - ..status = 'pending' - ..entry = DateTime.now() - ..due = DateTime.now().subtract(const Duration(days: 1))); - }); - - testWidgets('renders normal task without highlight', - (WidgetTester tester) async { - await tester.pumpWidget(MaterialApp( - home: Scaffold( - body: TaskListItem( - normalTask, - useDelayTask: true, - modify: mockModify, - selectedLanguage: SupportedLanguage.english, - ), - ), - )); - - expect(find.text('1. Task without urgency'), findsOneWidget); - - final containerFinder = find.byType(Container).first; - final Container container = tester.widget(containerFinder); - final BoxDecoration decoration = container.decoration as BoxDecoration; - expect(decoration.border!.top.color, isNot(Colors.red)); - expect((decoration.color as Color).alpha, isNot(50)); - }); - - testWidgets('renders due soon task with red border', - (WidgetTester tester) async { - await tester.pumpWidget(MaterialApp( - home: Scaffold( - body: TaskListItem( - dueSoonTask, - useDelayTask: true, - modify: mockModify, - selectedLanguage: SupportedLanguage.english, - ), - ), - )); - - expect(find.text('2. Task due soon'), findsOneWidget); - - final containerFinder = find.byType(Container).first; - final Container container = tester.widget(containerFinder); - final BoxDecoration decoration = container.decoration as BoxDecoration; - expect(decoration.border!.top.color, Colors.red); - }); - - testWidgets('renders overdue task with red background', - (WidgetTester tester) async { - await tester.pumpWidget(MaterialApp( - home: Scaffold( - body: TaskListItem( - overdueTask, - useDelayTask: true, - modify: mockModify, - selectedLanguage: SupportedLanguage.english, - ), - ), - )); - - expect(find.text('3. Overdue task'), findsOneWidget); - - final containerFinder = find.byType(Container).first; - final Container container = tester.widget(containerFinder); - final BoxDecoration decoration = container.decoration as BoxDecoration; - expect((decoration.color as Color).red, Colors.red.red); - expect((decoration.color as Color).alpha, 50); - }); - - testWidgets('does not highlight tasks when useDelayTask is false', - (WidgetTester tester) async { - await tester.pumpWidget(MaterialApp( - home: Scaffold( - body: TaskListItem( - overdueTask, - useDelayTask: false, - modify: mockModify, - selectedLanguage: SupportedLanguage.english, - ), - ), - )); - - expect(find.text('3. Overdue task'), findsOneWidget); - - final containerFinder = find.byType(Container).first; - final Container container = tester.widget(containerFinder); - final BoxDecoration decoration = container.decoration as BoxDecoration; - expect(decoration.border!.top.color, isNot(Colors.red)); - expect((decoration.color as Color).alpha, isNot(50)); - }); - }); -} diff --git a/test/routes/app_pages_test.dart b/test/routes/app_pages_test.dart deleted file mode 100644 index 58d8fd91..00000000 --- a/test/routes/app_pages_test.dart +++ /dev/null @@ -1,109 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/modules/about/bindings/about_binding.dart'; -import 'package:taskwarrior/app/modules/about/views/about_view.dart'; -import 'package:taskwarrior/app/modules/home/bindings/home_binding.dart'; -import 'package:taskwarrior/app/modules/splash/bindings/splash_binding.dart'; - -import 'package:taskwarrior/app/routes/app_pages.dart'; -import 'package:taskwarrior/app/modules/home/views/home_view.dart'; -import 'package:taskwarrior/app/modules/splash/views/splash_view.dart'; - -import 'package:taskwarrior/app/modules/detailRoute/views/detail_route_view.dart'; -import 'package:taskwarrior/app/modules/detailRoute/bindings/detail_route_binding.dart'; -import 'package:taskwarrior/app/modules/manageTaskServer/views/manage_task_server_view.dart'; -import 'package:taskwarrior/app/modules/manageTaskServer/bindings/manage_task_server_binding.dart'; -import 'package:taskwarrior/app/modules/onboarding/views/onboarding_view.dart'; -import 'package:taskwarrior/app/modules/onboarding/bindings/onboarding_binding.dart'; -import 'package:taskwarrior/app/modules/profile/views/profile_view.dart'; -import 'package:taskwarrior/app/modules/profile/bindings/profile_binding.dart'; -import 'package:taskwarrior/app/modules/reports/views/reports_view.dart'; -import 'package:taskwarrior/app/modules/reports/bindings/reports_binding.dart'; -import 'package:taskwarrior/app/modules/settings/views/settings_view.dart'; -import 'package:taskwarrior/app/modules/settings/bindings/settings_binding.dart'; - -void main() { - group('AppPages Test', () { - test('Initial route is correct', () { - expect(AppPages.INITIAL, Routes.SPLASH); - }); - - test('All routes should be defined correctly', () { - final routes = AppPages.routes; - - expect(routes.length, 10); - - expect( - routes.any((route) => - route.name == Routes.HOME && - route.page() is HomeView && - route.binding is HomeBinding), - true, - ); - expect( - routes.any((route) => - route.name == Routes.SPLASH && - route.page() is SplashView && - route.binding is SplashBinding), - true, - ); - expect( - routes.any((route) => - route.name == Routes.ABOUT && - route.page() is AboutView && - route.binding is AboutBinding), - true, - ); - expect( - routes.any((route) => - route.name == Routes.DETAIL_ROUTE && - route.page() is DetailRouteView && - route.binding is DetailRouteBinding), - true, - ); - expect( - routes.any((route) => - route.name == Routes.MANAGE_TASK_SERVER && - route.page() is ManageTaskServerView && - route.binding is ManageTaskServerBinding), - true, - ); - expect( - routes.any((route) => - route.name == Routes.ONBOARDING && - route.page() is OnboardingView && - route.binding is OnboardingBinding), - true, - ); - expect( - routes.any((route) => - route.name == Routes.PROFILE && - route.page() is ProfileView && - route.binding is ProfileBinding), - true, - ); - expect( - routes.any((route) => - route.name == Routes.REPORTS && - route.page() is ReportsView && - route.binding is ReportsBinding), - true, - ); - expect( - routes.any((route) => - route.name == Routes.SETTINGS && - route.page() is SettingsView && - route.binding is SettingsBinding), - true, - ); - }); - - test('All routes are accessible without crashing', () { - final routes = AppPages.routes; - - for (var route in routes) { - expect(() => route.page(), returnsNormally, - reason: 'Route ${route.name} should not throw errors'); - } - }); - }); -} diff --git a/test/routes/app_routes_test.dart b/test/routes/app_routes_test.dart deleted file mode 100644 index dd644bf8..00000000 --- a/test/routes/app_routes_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/routes/app_pages.dart'; - -void main() { - test('Routes should be defined correctly', () { - expect(Routes.HOME, '/home'); - expect(Routes.ONBOARDING, '/onboarding'); - expect(Routes.SPLASH, '/splash'); - expect(Routes.MANAGE_TASK_SERVER, '/manage-task-server'); - expect(Routes.DETAIL_ROUTE, '/detail-route'); - expect(Routes.PROFILE, '/profile'); - expect(Routes.ABOUT, '/about'); - expect(Routes.REPORTS, '/reports'); - expect(Routes.SETTINGS, '/settings'); - }); -} diff --git a/test/sentence_manager/sentence_manager_test.dart b/test/sentence_manager/sentence_manager_test.dart deleted file mode 100644 index dec8c2ad..00000000 --- a/test/sentence_manager/sentence_manager_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:test/test.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; - -void main() { - group('SentenceManager Tests', () { - test('Should return "Hello, World!" for English', () { - final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.english); - expect(sentenceManager.sentences.helloWorld, 'Hello, World!'); - }); - - test('Should return "হ্যালো বিশ্ব!" for Bengali', () { - final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.bengali); - expect(sentenceManager.sentences.helloWorld, 'হ্যালো বিশ্ব!'); - }); - - test('Should return "नमस्ते दुनिया!" for Hindi', () { - final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.hindi); - expect(sentenceManager.sentences.helloWorld, 'नमस्ते दुनिया!'); - }); - test('Should return "Bonjour, le monde!" for French', () { - final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.french); - expect(sentenceManager.sentences.helloWorld, 'Bonjour, le monde!'); - }); - - test('Should return "¡Hola, Mundo!" for Spanish', () { - final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.spanish); - expect(sentenceManager.sentences.helloWorld, '¡Hola, mundo!'); - }); - - test('Should return "नमस्ते दुनिया!" for Marathi', () { - final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.marathi); - expect(sentenceManager.sentences.helloWorld, 'नमस्कार, जग!'); - }); - }); -} diff --git a/test/taskfunctions/comparator_test.dart b/test/taskfunctions/comparator_test.dart deleted file mode 100644 index 38e87122..00000000 --- a/test/taskfunctions/comparator_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:test/test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/comparator.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; - -void main() { - final task1 = Task((builder) => builder - ..entry = DateTime(2024, 7, 20) - ..modified = DateTime(2024, 7, 21) - ..start = DateTime(2024, 7, 22) - ..due = DateTime(2024, 7, 23) - ..priority = 'H' - ..project = 'Project A' - ..tags.replace(['tag1', 'tag2']) - ..status = 'pending' - ..uuid = 'uuid1' - ..description = 'Task 1 Description' - ); - - final task2 = Task((builder) => builder - ..entry = DateTime(2024, 7, 19) - ..modified = DateTime(2024, 7, 18) - ..start = DateTime(2024, 7, 21) - ..due = DateTime(2024, 7, 22) - ..priority = 'L' - ..project = 'Project B' - ..tags.replace(['tag1']) - ..status = 'pending' - ..uuid = 'uuid2' - ..description = 'Task 2 Description' - ); - - test('Test compareTasks for Created column', () { - final compare = compareTasks('Created'); - expect(compare(task1, task2), greaterThan(0)); - }); - - test('Test compareTasks for Modified column', () { - final compare = compareTasks('Modified'); - expect(compare(task1, task2), greaterThan(0)); - }); - - test('Test compareTasks for Start Time column', () { - final compare = compareTasks('Start Time'); - expect(compare(task1, task2), greaterThan(0)); - }); - - test('Test compareTasks for Priority column', () { - final compare = compareTasks('Priority'); - expect(compare(task1, task2), greaterThan(0)); - }); - - test('Test compareTasks for Project column', () { - final compare = compareTasks('Project'); - expect(compare(task1, task2), lessThan(0)); - }); - - test('Test compareTasks for Tags column', () { - final compare = compareTasks('Tags'); - expect(compare(task1, task2), greaterThan(0)); - }); - - test('Test compareTasks for Urgency column', () { - final compare = compareTasks('Urgency'); - expect(compare(task1, task2), lessThan(0)); - }); -} diff --git a/test/taskfunctions/datetime_differences_test.dart b/test/taskfunctions/datetime_differences_test.dart deleted file mode 100644 index 434771e9..00000000 --- a/test/taskfunctions/datetime_differences_test.dart +++ /dev/null @@ -1,96 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/datetime_differences.dart'; - -void main() { - group('DateTime Functions Tests', () { - test('Test age function', () { - DateTime dt = DateTime.now().subtract(const Duration(days: 365)); - String result = age(dt); - expect(result, contains('12mo ')); - - dt = DateTime.now().subtract(const Duration(days: 60)); - result = age(dt); - expect(result, contains('2mo ')); - - dt = DateTime.now().subtract(const Duration(days: 21)); - result = age(dt); - expect(result, contains('3w ')); - - dt = DateTime.now().subtract(const Duration(days: 4)); - result = age(dt); - expect(result, contains('4d ')); - - dt = DateTime.now().subtract(const Duration(hours: 5)); - result = age(dt); - expect(result, contains('5h ')); - - dt = DateTime.now().subtract(const Duration(minutes: 10)); - result = age(dt); - expect(result, contains('10min ')); - - dt = DateTime.now().subtract(const Duration(seconds: 30)); - result = age(dt); - expect(result, contains('30s ')); - }); - - test('Test when function', () { - DateTime dt = DateTime.now().add(const Duration(days: 365)); - String result = when(dt); - expect(result, contains('12mo')); - - dt = DateTime.now().add(const Duration(days: 60)); - result = when(dt); - expect(result, contains('1mo')); - - dt = DateTime.now().add(const Duration(days: 21)); - result = when(dt); - expect(result, contains('2w')); - - dt = DateTime.now().add(const Duration(days: 4)); - result = when(dt); - expect(result, contains('3d')); - - dt = DateTime.now().add(const Duration(hours: 5)); - result = when(dt); - expect(result, contains('4h')); - - dt = DateTime.now().add(const Duration(minutes: 10)); - result = when(dt); - expect(result, contains('9min')); - - dt = DateTime.now().add(const Duration(seconds: 30)); - result = when(dt); - expect(result, contains('29s')); - }); - - test('Test difference function', () { - DateTime dt = DateTime.now().subtract(const Duration(days: 365)); - String result = difference(DateTime.now().difference(dt)); - expect(result, contains('12mo ')); - - dt = DateTime.now().subtract(const Duration(days: 60)); - result = difference(DateTime.now().difference(dt)); - expect(result, contains('2mo ')); - - dt = DateTime.now().subtract(const Duration(days: 21)); - result = difference(DateTime.now().difference(dt)); - expect(result, contains('3w ')); - - dt = DateTime.now().subtract(const Duration(days: 4)); - result = difference(DateTime.now().difference(dt)); - expect(result, contains('4d ')); - - dt = DateTime.now().subtract(const Duration(hours: 5)); - result = difference(DateTime.now().difference(dt)); - expect(result, contains('5h ')); - - dt = DateTime.now().subtract(const Duration(minutes: 10)); - result = difference(DateTime.now().difference(dt)); - expect(result, contains('10min ')); - - dt = DateTime.now().subtract(const Duration(seconds: 30)); - result = difference(DateTime.now().difference(dt)); - expect(result, contains('30s ')); - }); - }); -} diff --git a/test/taskfunctions/draft_test.dart b/test/taskfunctions/draft_test.dart deleted file mode 100644 index debe15ab..00000000 --- a/test/taskfunctions/draft_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/draft.dart'; - -void main() { - group('Draft Tests', () { - test('Setting status to completed updates end date', () { - Task original = Task( - (b) => b - ..id = 1 - ..description = 'Task 1' - ..status = 'pending' - ..start = DateTime.utc(2023, 1, 1) - ..priority = 'H' - ..project = 'Project A' - ..tags.replace(['tag1', 'tag2']) - ..uuid = 'uuid1' - ..description = 'Task 1 Description' - ..entry = DateTime(2024, 7, 20) - ..modified = DateTime(2024, 7, 21) - ..start = DateTime(2024, 7, 22) - ..due = DateTime(2024, 7, 23), - ); - - Draft draft = Draft(original); - - draft.set('status', 'completed'); - - expect(draft.draft.status, 'completed'); - - expect(draft.draft.end, isNotNull); - }); - - test('Setting status to pending does not update end date', () { - Task original = Task( - (b) => b - ..id = 2 - ..description = 'Task 2' - ..status = 'completed' - ..start = DateTime.utc(2023, 1, 1) - ..priority = 'H' - ..project = 'Project A' - ..tags.replace(['tag1', 'tag2']) - ..uuid = 'uuid2' - ..description = 'Task 2 Description' - ..entry = DateTime(2024, 7, 20) - ..modified = DateTime(2024, 7, 21) - ..start = DateTime(2024, 7, 22) - ..due = DateTime(2024, 7, 23), - ); - - Draft draft = Draft(original); - - draft.set('status', 'pending'); - - expect(draft.draft.status, 'pending'); - - expect(draft.draft.end, isNull); - }); - - test('Setting other properties updates correctly', () { - Task original = Task( - (b) => b - ..id = 1 - ..description = 'Task 3' - ..status = 'pending' - ..start = DateTime.utc(2023, 1, 1) - ..priority = 'H' - ..project = 'Project A' - ..tags.replace(['tag1', 'tag2']) - ..uuid = 'uuid3' - ..description = 'Task 3 Description' - ..entry = DateTime(2024, 7, 20) - ..modified = DateTime(2024, 7, 21) - ..start = DateTime(2024, 7, 22) - ..due = DateTime(2024, 7, 23), - ); - - Draft draft = Draft(original); - - draft.set('priority', 'L'); - - expect(draft.draft.priority, 'L'); - - expect(draft.draft.id, original.id); - - expect(draft.draft.description, original.description); - - expect(draft.draft.status, original.status); - }); - }); -} diff --git a/test/taskfunctions/patch_test.dart b/test/taskfunctions/patch_test.dart deleted file mode 100644 index f262265c..00000000 --- a/test/taskfunctions/patch_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/patch.dart'; - -void main() { - group('patch function', () { - test('should patch description', () { - Task initialTask = Task( - (b) => b - ..id = 1 - ..description = 'Task 3' - ..status = 'pending' - ..start = DateTime.utc(2023, 1, 1) - ..priority = 'H' - ..project = 'Project A' - ..tags.replace(['tag1', 'tag2']) - ..uuid = 'uuid3' - ..description = 'Task 3 Description' - ..entry = DateTime(2024, 7, 20) - ..modified = DateTime(2024, 7, 21) - ..start = DateTime(2024, 7, 22) - ..due = DateTime(2024, 7, 23), - ); - Map updates = {'description': 'Updated description'}; - - Task patchedTask = patch(initialTask, updates); - - expect(patchedTask.description, 'Updated description'); - }); - - test('should handle unknown keys gracefully', () { - Task initialTask = Task( - (b) => b - ..id = 1 - ..description = 'Task 3' - ..status = 'pending' - ..start = DateTime.utc(2023, 1, 1) - ..priority = 'H' - ..project = 'Project A' - ..tags.replace(['tag1', 'tag2']) - ..uuid = 'uuid3' - ..description = 'Task 3 Description' - ..entry = DateTime(2024, 7, 20) - ..modified = DateTime(2024, 7, 21) - ..start = DateTime(2024, 7, 22) - ..due = DateTime(2024, 7, 23), - ); - Map updates = {'unknownField': 'some value'}; - - Task patchedTask = patch(initialTask, updates); - - expect(patchedTask, initialTask); - }); - }); -} diff --git a/test/taskfunctions/profiles_test.dart b/test/taskfunctions/profiles_test.dart deleted file mode 100644 index c8c34e1a..00000000 --- a/test/taskfunctions/profiles_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/profiles.dart'; - -void main() { - late Directory testDirectory; - late Profiles profiles; - - setUp(() async { - testDirectory = await Directory.systemTemp.createTemp('test_directory'); - profiles = Profiles(testDirectory); - }); - - tearDown(() { - testDirectory.deleteSync(recursive: true); - }); - - test('Add and list profiles', () { - var profileId = profiles.addProfile(); - - expect(profiles.listProfiles(), contains(profileId)); - }); - - test('Set and get alias', () { - var profileId = profiles.addProfile(); - - profiles.setAlias(profile: profileId, alias: 'Test Alias'); - - var alias = profiles.getAlias(profileId); - expect(alias, 'Test Alias'); - }); - - test('Set and get current profile', () { - var profileId = profiles.addProfile(); - - profiles.setCurrentProfile(profileId); - - var currentProfile = profiles.getCurrentProfile(); - expect(currentProfile, profileId); - }); - - test('Delete profile', () { - var profileId = profiles.addProfile(); - - profiles.deleteProfile(profileId); - - expect(profiles.listProfiles(), isNot(contains(profileId))); - }); - - test('Copy configuration to new profile', () { - var profileId = profiles.addProfile(); - - profiles.copyConfigToNewProfile(profileId); - - expect(Directory('${testDirectory.path}/profiles').listSync(), - hasLength(greaterThan(1))); - }); - - test('Get current storage', () { - var profileId = profiles.addProfile(); - profiles.setCurrentProfile(profileId); - - var storage = profiles.getCurrentStorage(); - - expect(storage, isNotNull); - }); -} diff --git a/test/taskfunctions/projects_test.dart b/test/taskfunctions/projects_test.dart deleted file mode 100644 index b25288e2..00000000 --- a/test/taskfunctions/projects_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/projects.dart'; - -void main() { - test('sparseDecoratedProjectTree test', () { - var projects1 = { - 'projectA': 5, - 'projectA.subprojectB': 3, - 'projectA.subprojectC': 2, - 'projectA.subprojectC.subsubprojectD': 1, - }; - var result1 = sparseDecoratedProjectTree(projects1); - expect(result1.keys.toSet(), { - 'projectA', - 'projectA.subprojectB', - 'projectA.subprojectC', - 'projectA.subprojectC.subsubprojectD', - }); - expect(result1['projectA']!.children, { - 'projectA.subprojectB', - 'projectA.subprojectC', - }); - expect(result1['projectA.subprojectC']!.children, { - 'projectA.subprojectC.subsubprojectD', - }); - - var projects2 = { - 'projectX': 10, - 'projectX.subprojectY': 5, - 'projectX.subprojectZ': 3, - 'projectX.subprojectZ.subsubprojectA': 2, - 'projectX.subprojectZ.subsubprojectB': 1, - 'projectX.subprojectZ.subsubprojectC': 4, - }; - var result2 = sparseDecoratedProjectTree(projects2); - expect(result2.keys.toSet(), { - 'projectX', - 'projectX.subprojectY', - 'projectX.subprojectZ', - 'projectX.subprojectZ.subsubprojectA', - 'projectX.subprojectZ.subsubprojectB', - 'projectX.subprojectZ.subsubprojectC', - }); - expect(result2['projectX.subprojectZ.subsubprojectA']!.parent, 'projectX.subprojectZ'); - expect(result2['projectX.subprojectZ.subsubprojectC']!.parent, 'projectX.subprojectZ'); - - var projects3 = { - 'rootProject': 0, - }; - var result3 = sparseDecoratedProjectTree(projects3); - expect(result3.keys, ['rootProject']); - expect(result3['rootProject']!.children.isEmpty, true); - expect(result3['rootProject']!.parent, null); - - var projects4 = { - 'projectP': 2, - 'projectP.subprojectQ': 3, - 'projectP.subprojectQ.subsubprojectR': 1, - }; - var result4 = sparseDecoratedProjectTree(projects4); - expect(result4.keys.toSet(), { - 'projectP', - 'projectP.subprojectQ', - 'projectP.subprojectQ.subsubprojectR', - }); - expect(result4['projectP.subprojectQ.subsubprojectR']!.parent, 'projectP.subprojectQ'); - - - }); -} diff --git a/test/taskfunctions/query_test.dart b/test/taskfunctions/query_test.dart deleted file mode 100644 index 93396ef0..00000000 --- a/test/taskfunctions/query_test.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'dart:io'; -import 'package:taskwarrior/app/utils/taskfunctions/query.dart'; -import 'package:test/test.dart'; - -void main() { - late Directory tempDir; - late Query query; - - setUp(() { - tempDir = Directory.systemTemp.createTempSync('query_test'); - query = Query(tempDir); - }); - - tearDown(() { - tempDir.deleteSync(recursive: true); - }); - - test('setSelectedSort and getSelectedSort', () { - const selectedSort = 'priority-'; - query.setSelectedSort(selectedSort); - expect(query.getSelectedSort(), selectedSort); - }); - - test('togglePendingFilter and getPendingFilter', () { - expect(query.getPendingFilter(), true); - query.togglePendingFilter(); - expect(query.getPendingFilter(), false); - query.togglePendingFilter(); - expect(query.getPendingFilter(), true); - }); - - test('toggleWaitingFilter and getWaitingFilter', () { - expect(query.getWaitingFilter(), true); - query.toggleWaitingFilter(); - expect(query.getWaitingFilter(), false); - query.toggleWaitingFilter(); - expect(query.getWaitingFilter(), true); - }); - - test('toggleProjectFilter and projectFilter', () { - const project = 'Work'; - query.toggleProjectFilter(project); - expect(query.projectFilter(), project); - query.toggleProjectFilter(project); - expect(query.projectFilter(), ''); - }); - - test('toggleTagUnion and tagUnion', () { - expect(query.tagUnion(), false); - query.toggleTagUnion(); - expect(query.tagUnion(), true); - query.toggleTagUnion(); - expect(query.tagUnion(), false); - }); - - test('toggleTagFilter and getSelectedTags', () { - const tag1 = 'important'; - const tag2 = 'urgent'; - - query.toggleTagFilter(tag1); - var tags = query.getSelectedTags(); - expect(tags.contains('+$tag1'), true); - - query.toggleTagFilter(tag1); - tags = query.getSelectedTags(); - expect(tags.contains('+$tag1'), false); - - query.toggleTagFilter(tag2); - tags = query.getSelectedTags(); - expect(tags.contains('+$tag2'), true); - }); -} diff --git a/test/taskfunctions/tags_test.dart b/test/taskfunctions/tags_test.dart deleted file mode 100644 index c2067b21..00000000 --- a/test/taskfunctions/tags_test.dart +++ /dev/null @@ -1,318 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/tags.dart'; - -void main() { - group('tagSet', () { - test('should return all unique tags from tasks', () { - final tasks = [ - Task((b) => b - ..id = 1 - ..description = 'Task 1' - ..status = 'pending' - ..tags.replace(['tag1', 'tag2']) - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project A' - ..uuid = 'uuid1'), - Task((b) => b - ..id = 2 - ..description = 'Task 2' - ..status = 'pending' - ..tags.replace(['tag2', 'tag3']) - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project B' - ..uuid = 'uuid2'), - ]; - - final result = tagSet(tasks); - expect(result, {'tag1', 'tag2', 'tag3'}); - }); - - test('should return an empty set if no tasks', () { - final tasks = []; - - final result = tagSet(tasks); - expect(result, {}); - }); - - test('should return an empty set if tasks have no tags', () { - final tasks = [ - Task((b) => b - ..id = 1 - ..description = 'Task 1' - ..status = 'pending' - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project A' - ..uuid = 'uuid1'), - Task((b) => b - ..id = 2 - ..description = 'Task 2' - ..status = 'pending' - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project B' - ..uuid = 'uuid2'), - ]; - - final result = tagSet(tasks); - expect(result, {}); - }); - }); - - group('tagFrequencies', () { - test('should count the frequency of each tag correctly', () { - final tasks = [ - Task((b) => b - ..id = 1 - ..description = 'Task 1' - ..status = 'pending' - ..tags.replace(['tag1', 'tag2']) - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project A' - ..uuid = 'uuid1'), - Task((b) => b - ..id = 2 - ..description = 'Task 2' - ..status = 'pending' - ..tags.replace(['tag2', 'tag3']) - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project B' - ..uuid = 'uuid2'), - Task((b) => b - ..id = 3 - ..description = 'Task 3' - ..status = 'pending' - ..tags.replace(['tag2']) - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project C' - ..uuid = 'uuid3'), - ]; - - final result = tagFrequencies(tasks); - expect(result, {'tag1': 1, 'tag2': 3, 'tag3': 1}); - }); - - test('should return an empty map if no tasks', () { - final tasks = []; - - final result = tagFrequencies(tasks); - expect(result, {}); - }); - - test('should return an empty map if tasks have no tags', () { - final tasks = [ - Task((b) => b - ..id = 1 - ..description = 'Task 1' - ..status = 'pending' - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project A' - ..uuid = 'uuid1'), - Task((b) => b - ..id = 2 - ..description = 'Task 2' - ..status = 'pending' - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project B' - ..uuid = 'uuid2'), - ]; - - final result = tagFrequencies(tasks); - expect(result, {}); - }); - - test('should count tags correctly with overlapping tasks', () { - final tasks = [ - Task((b) => b - ..id = 1 - ..description = 'Task 1' - ..status = 'pending' - ..tags.replace(['tag1', 'tag2']) - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project A' - ..uuid = 'uuid1'), - Task((b) => b - ..id = 2 - ..description = 'Task 2' - ..status = 'pending' - ..tags.replace(['tag1', 'tag2', 'tag3']) - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project B' - ..uuid = 'uuid2'), - Task((b) => b - ..id = 3 - ..description = 'Task 3' - ..status = 'pending' - ..tags.replace(['tag2', 'tag3']) - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project C' - ..uuid = 'uuid3'), - ]; - - final result = tagFrequencies(tasks); - expect(result, {'tag1': 2, 'tag2': 3, 'tag3': 2}); - }); - }); - - group('tagsLastModified', () { - test('should return the latest modification date for each tag', () { - final tasks = [ - Task((b) => b - ..id = 1 - ..description = 'Task 1' - ..status = 'pending' - ..tags.replace(['tag1']) - ..modified = DateTime.utc(2024, 1, 1) - ..start = DateTime.now() - ..entry = DateTime.now() - ..due = DateTime.now() - ..project = 'Project A' - ..uuid = 'uuid1'), - Task((b) => b - ..id = 2 - ..description = 'Task 2' - ..status = 'pending' - ..tags.replace(['tag2']) - ..modified = DateTime.utc(2024, 2, 1) - ..start = DateTime.now() - ..entry = DateTime.now() - ..due = DateTime.now() - ..project = 'Project B' - ..uuid = 'uuid2'), - Task((b) => b - ..id = 3 - ..description = 'Task 3' - ..status = 'pending' - ..tags.replace(['tag1', 'tag3']) - ..modified = DateTime.utc(2024, 3, 1) - ..start = DateTime.now() - ..entry = DateTime.now() - ..due = DateTime.now() - ..project = 'Project C' - ..uuid = 'uuid3'), - ]; - - final result = tagsLastModified(tasks); - expect(result, { - 'tag1': DateTime.utc(2024, 3, 1), - 'tag2': DateTime.utc(2024, 2, 1), - 'tag3': DateTime.utc(2024, 3, 1), - }); - }); - - test('should return an empty map if no tasks', () { - final tasks = []; - - final result = tagsLastModified(tasks); - expect(result, {}); - }); - - test('should return an empty map if tasks have no tags', () { - final tasks = [ - Task((b) => b - ..id = 1 - ..description = 'Task 1' - ..status = 'pending' - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project A' - ..uuid = 'uuid1'), - Task((b) => b - ..id = 2 - ..description = 'Task 2' - ..status = 'pending' - ..start = DateTime.now() - ..entry = DateTime.now() - ..modified = DateTime.now() - ..due = DateTime.now() - ..project = 'Project B' - ..uuid = 'uuid2'), - ]; - - final result = tagsLastModified(tasks); - expect(result, {}); - }); - - test('should return correct modification dates with overlapping tags', () { - final tasks = [ - Task((b) => b - ..id = 1 - ..description = 'Task 1' - ..status = 'pending' - ..tags.replace(['tag1', 'tag2']) - ..modified = DateTime.utc(2024, 1, 1) - ..start = DateTime.now() - ..entry = DateTime.now() - ..due = DateTime.now() - ..project = 'Project A' - ..uuid = 'uuid1'), - Task((b) => b - ..id = 2 - ..description = 'Task 2' - ..status = 'pending' - ..tags.replace(['tag2', 'tag3']) - ..modified = DateTime.utc(2024, 2, 1) - ..start = DateTime.now() - ..entry = DateTime.now() - ..due = DateTime.now() - ..project = 'Project B' - ..uuid = 'uuid2'), - Task((b) => b - ..id = 3 - ..description = 'Task 3' - ..status = 'pending' - ..tags.replace(['tag3']) - ..modified = DateTime.utc(2024, 3, 1) - ..start = DateTime.now() - ..entry = DateTime.now() - ..due = DateTime.now() - ..project = 'Project C' - ..uuid = 'uuid3'), - ]; - - final result = tagsLastModified(tasks); - expect(result, { - 'tag1': DateTime.utc(2024, 1, 1), - 'tag2': DateTime.utc(2024, 2, 1), - 'tag3': DateTime.utc(2024, 3, 1), - }); - }); - }); -} diff --git a/test/taskfunctions/taskparser_test.dart b/test/taskfunctions/taskparser_test.dart deleted file mode 100644 index 4f1973b7..00000000 --- a/test/taskfunctions/taskparser_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -import 'package:taskwarrior/app/utils/taskfunctions/taskparser.dart'; -import 'package:test/test.dart'; - -void main() { - group('taskParser', () { - test('parses a task with multiple attributes and tags', () { - const taskString = - '+tag1 status:completed project:work priority:high due:2024-12-31T23:59:59Z This is a complex task'; - final task = taskParser(taskString); - expect(task.description, 'This is a complex task'); - expect(task.status, 'completed'); - expect(task.project, 'work'); - expect(task.priority, 'high'); - expect(task.due, DateTime.parse('2024-12-31T23:59:59Z').toUtc()); - expect(task.wait, isNull); - expect(task.until, isNull); - expect(task.tags, ['tag1']); - }); - - test('parses a task with long description and tags', () { - const taskString = '+longtag1 +longtag2 ' - 'This is a very long description that goes on and on, potentially including special characters and a very long string to test how the parser handles such cases'; - final task = taskParser(taskString); - expect(task.description, - 'This is a very long description that goes on and on, potentially including special characters and a very long string to test how the parser handles such cases'); - expect(task.status, 'pending'); - expect(task.project, isNull); - expect(task.priority, isNull); - expect(task.due, isNull); - expect(task.wait, isNull); - expect(task.until, isNull); - expect(task.tags, ['longtag1', 'longtag2']); - }); - - test('parses a task with mixed attribute formats', () { - const taskString = - 'status:completed prio:high project:work +tag1 This is a task with mixed attribute formats'; - final task = taskParser(taskString); - expect(task.description, 'This is a task with mixed attribute formats'); - expect(task.status, 'completed'); - expect(task.project, 'work'); - expect(task.priority, 'high'); - expect(task.due, isNull); - expect(task.wait, isNull); - expect(task.until, isNull); - expect(task.tags, ['tag1']); - }); - - test('parses a task with overlapping attributes and tags', () { - const taskString = - '+tag1 status:completed project:work +tag2 This is a task with overlapping attributes and tags'; - final task = taskParser(taskString); - expect(task.description, - 'This is a task with overlapping attributes and tags'); - expect(task.status, 'completed'); - expect(task.project, 'work'); - expect(task.priority, isNull); - expect(task.due, isNull); - expect(task.wait, isNull); - expect(task.until, isNull); - expect(task.tags, ['tag1', 'tag2']); - }); - }); -} diff --git a/test/taskfunctions/validate_test.dart b/test/taskfunctions/validate_test.dart deleted file mode 100644 index 03c2c5aa..00000000 --- a/test/taskfunctions/validate_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/validate.dart'; - -void main() { - test('validateTaskDescription', () { - expect(() => validateTaskDescription('Write test cases'), returnsNormally); - - expect(() => validateTaskDescription(''), throwsFormatException); - - expect(() => validateTaskDescription('Do something\\'), throwsFormatException); - }); - - test('validateTaskProject', () { - expect(() => validateTaskProject('Personal'), returnsNormally); - - expect(() => validateTaskProject('Work\\'), throwsFormatException); - }); - - test('validateTaskTags', () { - expect(() => validateTaskTags('important'), returnsNormally); - - expect(() => validateTaskTags('urgent tasks'), throwsFormatException); - }); -} diff --git a/test/tour/details_page_tour_test.dart b/test/tour/details_page_tour_test.dart deleted file mode 100644 index 1f31272f..00000000 --- a/test/tour/details_page_tour_test.dart +++ /dev/null @@ -1,141 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:taskwarrior/app/tour/details_page_tour.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class MockTutorialCoachMarkController extends Mock - implements TutorialCoachMarkController {} - -void main() { - group('Details Page Tour', () { - late GlobalKey dueKey; - late GlobalKey waitKey; - late GlobalKey untilKey; - late GlobalKey priorityKey; - final controller = MockTutorialCoachMarkController(); - - setUp(() { - dueKey = GlobalKey(); - waitKey = GlobalKey(); - untilKey = GlobalKey(); - priorityKey = GlobalKey(); - }); - - test('should return a list of TargetFocus with correct properties', () { - final targets = addDetailsPage( - dueKey: dueKey, - waitKey: waitKey, - untilKey: untilKey, - priorityKey: priorityKey, - ); - - expect(targets.length, 4); - - expect(targets[0].keyTarget, dueKey); - expect(targets[0].alignSkip, Alignment.topRight); - expect(targets[0].shape, ShapeLightFocus.RRect); - - expect(targets[1].keyTarget, waitKey); - expect(targets[1].alignSkip, Alignment.topRight); - expect(targets[1].shape, ShapeLightFocus.RRect); - - expect(targets[2].keyTarget, untilKey); - expect(targets[2].alignSkip, Alignment.topRight); - expect(targets[2].shape, ShapeLightFocus.RRect); - - expect(targets[3].keyTarget, priorityKey); - expect(targets[3].alignSkip, Alignment.topRight); - expect(targets[3].shape, ShapeLightFocus.RRect); - }); - - testWidgets('should render correct text for dueKey TargetContent', - (WidgetTester tester) async { - final targets = addDetailsPage( - dueKey: dueKey, - waitKey: waitKey, - untilKey: untilKey, - priorityKey: priorityKey, - ); - - final content = targets[0].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect( - find.text("This signifies the due date of the task"), findsOneWidget); - }); - - testWidgets('should render correct text for waitKey TargetContent', - (WidgetTester tester) async { - final targets = addDetailsPage( - dueKey: dueKey, - waitKey: waitKey, - untilKey: untilKey, - priorityKey: priorityKey, - ); - - final content = targets[1].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect( - find.text( - "This signifies the waiting date of the task \n Task will be visible after this date"), - findsOneWidget, - ); - }); - - testWidgets('should render correct text for untilKey TargetContent', - (WidgetTester tester) async { - final targets = addDetailsPage( - dueKey: dueKey, - waitKey: waitKey, - untilKey: untilKey, - priorityKey: priorityKey, - ); - - final content = targets[2].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("This shows the last date of the task"), findsOneWidget); - }); - - testWidgets('should render correct text for priorityKey TargetContent', - (WidgetTester tester) async { - final targets = addDetailsPage( - dueKey: dueKey, - waitKey: waitKey, - untilKey: untilKey, - priorityKey: priorityKey, - ); - - final content = targets[3].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect( - find.text( - "This is the priority of the Tasks \n L -> Low \n M -> Medium \n H -> Hard"), - findsOneWidget, - ); - }); - }); -} diff --git a/test/tour/filter_drawer_tour_test.dart b/test/tour/filter_drawer_tour_test.dart deleted file mode 100644 index e04fed92..00000000 --- a/test/tour/filter_drawer_tour_test.dart +++ /dev/null @@ -1,170 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:taskwarrior/app/tour/filter_drawer_tour.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class MockTutorialCoachMarkController extends Mock - implements TutorialCoachMarkController {} - -void main() { - group('Filter Drawer Page Tour', () { - late GlobalKey statusKey; - late GlobalKey projectsKey; - late GlobalKey projectsKeyTaskc; - late GlobalKey filterTagKey; - late GlobalKey sortByKey; - final controller = MockTutorialCoachMarkController(); - - setUp(() { - statusKey = GlobalKey(); - projectsKey = GlobalKey(); - projectsKeyTaskc = GlobalKey(); - filterTagKey = GlobalKey(); - sortByKey = GlobalKey(); - }); - - test('should return a list of TargetFocus with correct properties', () { - final targets = filterDrawer( - statusKey: statusKey, - projectsKey: projectsKey, - projectsKeyTaskc: projectsKeyTaskc, - filterTagKey: filterTagKey, - sortByKey: sortByKey, - ); - - expect(targets.length, 5); - - expect(targets[0].keyTarget, statusKey); - expect(targets[0].alignSkip, Alignment.topRight); - expect(targets[0].shape, ShapeLightFocus.RRect); - - expect(targets[1].keyTarget, projectsKey); - expect(targets[1].alignSkip, Alignment.topRight); - expect(targets[1].shape, ShapeLightFocus.RRect); - - expect(targets[2].keyTarget, projectsKeyTaskc); - expect(targets[2].alignSkip, Alignment.topRight); - expect(targets[2].shape, ShapeLightFocus.RRect); - - expect(targets[3].keyTarget, filterTagKey); - expect(targets[3].alignSkip, Alignment.topRight); - expect(targets[3].shape, ShapeLightFocus.RRect); - - expect(targets[4].keyTarget, sortByKey); - expect(targets[4].alignSkip, Alignment.topRight); - expect(targets[4].shape, ShapeLightFocus.RRect); - }); - - testWidgets('should render correct text for statusKey TargetContent', - (WidgetTester tester) async { - final targets = filterDrawer( - statusKey: statusKey, - projectsKey: projectsKey, - projectsKeyTaskc: projectsKeyTaskc, - filterTagKey: filterTagKey, - sortByKey: sortByKey, - ); - - final content = targets[0].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Filter tasks based on their completion status"), - findsOneWidget); - }); - - testWidgets('should render correct text for projectsKey TargetContent', - (WidgetTester tester) async { - final targets = filterDrawer( - statusKey: statusKey, - projectsKey: projectsKey, - projectsKeyTaskc: projectsKeyTaskc, - filterTagKey: filterTagKey, - sortByKey: sortByKey, - ); - - final content = targets[1].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Filter tasks based on the projects"), findsOneWidget); - }); - - testWidgets('should render correct text for projectsKeyTaskc TargetContent', - (WidgetTester tester) async { - final targets = filterDrawer( - statusKey: statusKey, - projectsKey: projectsKey, - projectsKeyTaskc: projectsKeyTaskc, - filterTagKey: filterTagKey, - sortByKey: sortByKey, - ); - - final content = targets[2].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Filter tasks based on the projects"), findsOneWidget); - }); - - testWidgets('should render correct text for filterTagKey TargetContent', - (WidgetTester tester) async { - final targets = filterDrawer( - statusKey: statusKey, - projectsKey: projectsKey, - projectsKeyTaskc: projectsKeyTaskc, - filterTagKey: filterTagKey, - sortByKey: sortByKey, - ); - - final content = targets[3].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Toggle between AND and OR tag union types"), - findsOneWidget); - }); - - testWidgets('should render correct text for sortByKey TargetContent', - (WidgetTester tester) async { - final targets = filterDrawer( - statusKey: statusKey, - projectsKey: projectsKey, - projectsKeyTaskc: projectsKeyTaskc, - filterTagKey: filterTagKey, - sortByKey: sortByKey, - ); - - final content = targets[4].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect( - find.text( - "Sort tasks based on time of creation, urgency, due date, start date, etc."), - findsOneWidget, - ); - }); - }); -} diff --git a/test/tour/home_page_tour_test.dart b/test/tour/home_page_tour_test.dart deleted file mode 100644 index 6a360e9f..00000000 --- a/test/tour/home_page_tour_test.dart +++ /dev/null @@ -1,165 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:taskwarrior/app/tour/home_page_tour.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class MockTutorialCoachMarkController extends Mock - implements TutorialCoachMarkController {} - -void main() { - group('Home Page Tour', () { - late GlobalKey addKey; - late GlobalKey searchKey; - late GlobalKey filterKey; - late GlobalKey menuKey; - late GlobalKey refreshKey; - final controller = MockTutorialCoachMarkController(); - - setUp(() { - addKey = GlobalKey(); - searchKey = GlobalKey(); - filterKey = GlobalKey(); - menuKey = GlobalKey(); - refreshKey = GlobalKey(); - }); - - test('should return a list of TargetFocus with correct properties', () { - final targets = addTargetsPage( - addKey: addKey, - searchKey: searchKey, - filterKey: filterKey, - menuKey: menuKey, - refreshKey: refreshKey, - ); - - expect(targets.length, 5); - - expect(targets[0].keyTarget, addKey); - expect(targets[0].alignSkip, Alignment.topRight); - expect(targets[0].shape, ShapeLightFocus.Circle); - - expect(targets[1].keyTarget, searchKey); - expect(targets[1].alignSkip, Alignment.topRight); - expect(targets[1].shape, ShapeLightFocus.Circle); - - expect(targets[2].keyTarget, refreshKey); - expect(targets[2].alignSkip, Alignment.topCenter); - expect(targets[2].shape, ShapeLightFocus.Circle); - - expect(targets[3].keyTarget, filterKey); - expect(targets[3].alignSkip, Alignment.topCenter); - expect(targets[3].shape, ShapeLightFocus.Circle); - - expect(targets[4].keyTarget, menuKey); - expect(targets[4].alignSkip, Alignment.bottomRight); - expect(targets[4].shape, ShapeLightFocus.Circle); - }); - - testWidgets('should render correct text for addKey TargetContent', - (WidgetTester tester) async { - final targets = addTargetsPage( - addKey: addKey, - searchKey: searchKey, - filterKey: filterKey, - menuKey: menuKey, - refreshKey: refreshKey, - ); - - final content = targets[0].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Add a new task"), findsOneWidget); - }); - - testWidgets('should render correct text for searchKey TargetContent', - (WidgetTester tester) async { - final targets = addTargetsPage( - addKey: addKey, - searchKey: searchKey, - filterKey: filterKey, - menuKey: menuKey, - refreshKey: refreshKey, - ); - - final content = targets[1].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Search for tasks"), findsOneWidget); - }); - - testWidgets('should render correct text for refreshKey TargetContent', - (WidgetTester tester) async { - final targets = addTargetsPage( - addKey: addKey, - searchKey: searchKey, - filterKey: filterKey, - menuKey: menuKey, - refreshKey: refreshKey, - ); - - final content = targets[2].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Refresh or sync your tasks"), findsOneWidget); - }); - - testWidgets('should render correct text for filterKey TargetContent', - (WidgetTester tester) async { - final targets = addTargetsPage( - addKey: addKey, - searchKey: searchKey, - filterKey: filterKey, - menuKey: menuKey, - refreshKey: refreshKey, - ); - - final content = targets[3].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Add filters to sort your tasks and projects"), - findsOneWidget); - }); - - testWidgets('should render correct text for menuKey TargetContent', - (WidgetTester tester) async { - final targets = addTargetsPage( - addKey: addKey, - searchKey: searchKey, - filterKey: filterKey, - menuKey: menuKey, - refreshKey: refreshKey, - ); - - final content = targets[4].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Access additional settings here"), findsOneWidget); - }); - }); -} diff --git a/test/tour/manage_task_server_page_tour_test.dart b/test/tour/manage_task_server_page_tour_test.dart deleted file mode 100644 index 117a7b2f..00000000 --- a/test/tour/manage_task_server_page_tour_test.dart +++ /dev/null @@ -1,146 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:taskwarrior/app/tour/manage_task_server_page_tour.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class MockTutorialCoachMarkController extends Mock - implements TutorialCoachMarkController {} - -void main() { - group('Manage Task Server Page Tour', () { - late GlobalKey configureTaskRC; - late GlobalKey configureYourCertificate; - late GlobalKey configureTaskServerKey; - late GlobalKey configureServerCertificate; - final controller = MockTutorialCoachMarkController(); - - setUp(() { - configureTaskRC = GlobalKey(); - configureYourCertificate = GlobalKey(); - configureTaskServerKey = GlobalKey(); - configureServerCertificate = GlobalKey(); - }); - - test('should return a list of TargetFocus with correct properties', () { - final targets = addManageTaskServerPage( - configureTaskRC: configureTaskRC, - configureYourCertificate: configureYourCertificate, - configureTaskServerKey: configureTaskServerKey, - configureServerCertificate: configureServerCertificate, - ); - - expect(targets.length, 4); - - expect(targets[0].keyTarget, configureTaskRC); - expect(targets[0].alignSkip, Alignment.topRight); - expect(targets[0].shape, ShapeLightFocus.RRect); - - expect(targets[1].keyTarget, configureYourCertificate); - expect(targets[1].alignSkip, Alignment.topRight); - expect(targets[1].shape, ShapeLightFocus.RRect); - - expect(targets[2].keyTarget, configureTaskServerKey); - expect(targets[2].alignSkip, Alignment.bottomCenter); - expect(targets[2].shape, ShapeLightFocus.RRect); - - expect(targets[3].keyTarget, configureServerCertificate); - expect(targets[3].alignSkip, Alignment.bottomCenter); - expect(targets[3].shape, ShapeLightFocus.RRect); - }); - - testWidgets('should render correct text for configureTaskRC TargetContent', - (WidgetTester tester) async { - final targets = addManageTaskServerPage( - configureTaskRC: configureTaskRC, - configureYourCertificate: configureYourCertificate, - configureTaskServerKey: configureTaskServerKey, - configureServerCertificate: configureServerCertificate, - ); - - final content = targets[0].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect( - find.text("Select the file named taskrc here or paste it's content"), - findsOneWidget); - }); - - testWidgets( - 'should render correct text for configureYourCertificate TargetContent', - (WidgetTester tester) async { - final targets = addManageTaskServerPage( - configureTaskRC: configureTaskRC, - configureYourCertificate: configureYourCertificate, - configureTaskServerKey: configureTaskServerKey, - configureServerCertificate: configureServerCertificate, - ); - - final content = targets[1].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect( - find.text( - "Select file similarly named like .com.cert.pem here"), - findsOneWidget); - }); - - testWidgets( - 'should render correct text for configureTaskServerKey TargetContent', - (WidgetTester tester) async { - final targets = addManageTaskServerPage( - configureTaskRC: configureTaskRC, - configureYourCertificate: configureYourCertificate, - configureTaskServerKey: configureTaskServerKey, - configureServerCertificate: configureServerCertificate, - ); - - final content = targets[2].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect( - find.text( - "Select file similarly named like .key.pem here"), - findsOneWidget); - }); - - testWidgets( - 'should render correct text for configureServerCertificate TargetContent', - (WidgetTester tester) async { - final targets = addManageTaskServerPage( - configureTaskRC: configureTaskRC, - configureYourCertificate: configureYourCertificate, - configureTaskServerKey: configureTaskServerKey, - configureServerCertificate: configureServerCertificate, - ); - - final content = targets[3].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect( - find.text( - "Select file similarly named like letsencrypt_root_cert.pem here"), - findsOneWidget); - }); - }); -} diff --git a/test/tour/profile_page_tour_test.dart b/test/tour/profile_page_tour_test.dart deleted file mode 100644 index 35a6e305..00000000 --- a/test/tour/profile_page_tour_test.dart +++ /dev/null @@ -1,104 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:taskwarrior/app/tour/profile_page_tour.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class MockTutorialCoachMarkController extends Mock - implements TutorialCoachMarkController {} - -void main() { - group('Profile Page Tour', () { - late GlobalKey currentProfileKey; - late GlobalKey addNewProfileKey; - late GlobalKey manageSelectedProfileKey; - final controller = MockTutorialCoachMarkController(); - - setUp(() { - currentProfileKey = GlobalKey(); - addNewProfileKey = GlobalKey(); - manageSelectedProfileKey = GlobalKey(); - }); - - test('should return a list of TargetFocus with correct properties', () { - final targets = addProfilePage( - currentProfileKey: currentProfileKey, - addNewProfileKey: addNewProfileKey, - manageSelectedProfileKey: manageSelectedProfileKey, - ); - - expect(targets.length, 3); - - expect(targets[0].keyTarget, currentProfileKey); - expect(targets[0].alignSkip, Alignment.topRight); - expect(targets[0].shape, ShapeLightFocus.RRect); - - expect(targets[1].keyTarget, manageSelectedProfileKey); - expect(targets[1].alignSkip, Alignment.topRight); - expect(targets[1].shape, ShapeLightFocus.RRect); - - expect(targets[2].keyTarget, addNewProfileKey); - expect(targets[2].alignSkip, Alignment.topRight); - expect(targets[2].shape, ShapeLightFocus.RRect); - }); - - testWidgets( - 'should render correct text for currentProfileKey TargetContent', - (WidgetTester tester) async { - final targets = addProfilePage( - currentProfileKey: currentProfileKey, - addNewProfileKey: addNewProfileKey, - manageSelectedProfileKey: manageSelectedProfileKey, - ); - - final content = targets[0].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("See your current profile here"), findsOneWidget); - }); - - testWidgets( - 'should render correct text for manageSelectedProfileKey TargetContent', - (WidgetTester tester) async { - final targets = addProfilePage( - currentProfileKey: currentProfileKey, - addNewProfileKey: addNewProfileKey, - manageSelectedProfileKey: manageSelectedProfileKey, - ); - - final content = targets[1].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Manage your current profile here"), findsOneWidget); - }); - - testWidgets('should render correct text for addNewProfileKey TargetContent', - (WidgetTester tester) async { - final targets = addProfilePage( - currentProfileKey: currentProfileKey, - addNewProfileKey: addNewProfileKey, - manageSelectedProfileKey: manageSelectedProfileKey, - ); - - final content = targets[2].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Add a new profile here"), findsOneWidget); - }); - }); -} diff --git a/test/tour/reports_page_tour_test.dart b/test/tour/reports_page_tour_test.dart deleted file mode 100644 index 60edb1e2..00000000 --- a/test/tour/reports_page_tour_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:taskwarrior/app/tour/reports_page_tour.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class MockTutorialCoachMarkController extends Mock - implements TutorialCoachMarkController {} - -void main() { - group('Reports Page Tour', () { - late GlobalKey dailyKey; - late GlobalKey weeklyKey; - late GlobalKey monthlyKey; - final controller = MockTutorialCoachMarkController(); - - setUp(() { - dailyKey = GlobalKey(); - weeklyKey = GlobalKey(); - monthlyKey = GlobalKey(); - }); - - test('should return a list of TargetFocus with correct properties', () { - final targets = reportsDrawer( - daily: dailyKey, - weekly: weeklyKey, - monthly: monthlyKey, - ); - - expect(targets.length, 3); - - expect(targets[0].keyTarget, dailyKey); - expect(targets[0].alignSkip, Alignment.topRight); - expect(targets[0].shape, ShapeLightFocus.RRect); - expect(targets[0].radius, 10); - - expect(targets[1].keyTarget, weeklyKey); - expect(targets[1].alignSkip, Alignment.topRight); - expect(targets[1].shape, ShapeLightFocus.RRect); - expect(targets[1].radius, 10); - - expect(targets[2].keyTarget, monthlyKey); - expect(targets[2].alignSkip, Alignment.bottomCenter); - expect(targets[2].shape, ShapeLightFocus.RRect); - expect(targets[2].radius, 10); - }); - - testWidgets('should render correct text for dailyKey TargetContent', - (WidgetTester tester) async { - final targets = reportsDrawer( - daily: dailyKey, - weekly: weeklyKey, - monthly: monthlyKey, - ); - - final content = targets[0].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Access your daily task report here"), findsOneWidget); - }); - - testWidgets('should render correct text for weeklyKey TargetContent', - (WidgetTester tester) async { - final targets = reportsDrawer( - daily: dailyKey, - weekly: weeklyKey, - monthly: monthlyKey, - ); - - final content = targets[1].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Access your weekly task reports here"), findsOneWidget); - }); - - testWidgets('should render correct text for monthlyKey TargetContent', - (WidgetTester tester) async { - final targets = reportsDrawer( - daily: dailyKey, - weekly: weeklyKey, - monthly: monthlyKey, - ); - - final content = targets[2].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect( - find.text("Access your monthly task reports here"), findsOneWidget); - }); - }); -} diff --git a/test/tour/task_swipe_tour_test.dart b/test/tour/task_swipe_tour_test.dart deleted file mode 100644 index 6d2a75ec..00000000 --- a/test/tour/task_swipe_tour_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:taskwarrior/app/tour/task_swipe_tour.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class MockTutorialCoachMarkController extends Mock - implements TutorialCoachMarkController {} - -void main() { - group('Task Swipe Tour', () { - late GlobalKey taskItemKey; - final controller = MockTutorialCoachMarkController(); - - setUp(() { - taskItemKey = GlobalKey(); - }); - - test('should return a list of TargetFocus with correct properties', () { - final targets = addTaskSwipeTutorialTargets( - taskItemKey: taskItemKey, - ); - - expect(targets.length, 1); - - expect(targets[0].keyTarget, taskItemKey); - expect(targets[0].identify, "taskSwipeTutorial"); - expect(targets[0].alignSkip, Alignment.bottomRight); - expect(targets[0].shape, ShapeLightFocus.RRect); - expect(targets[0].radius, 10); - }); - - testWidgets('should render correct text for task swipe TargetContent', - (WidgetTester tester) async { - final targets = addTaskSwipeTutorialTargets( - taskItemKey: taskItemKey, - ); - - final content = targets[0].contents!.first; - - await tester.pumpWidget(MaterialApp( - home: Builder( - builder: (context) => content.builder!(context, controller), - ), - )); - - expect(find.text("Task Swipe Actions"), findsOneWidget); - expect(find.text("This is how you manage your tasks quickly : "), - findsOneWidget); - expect(find.text("Swipe RIGHT to COMPLETE"), findsOneWidget); - expect(find.text("Swipe LEFT to DELETE"), findsOneWidget); - }); - }); -} diff --git a/test/utils/app_settings/app_settings_test.dart b/test/utils/app_settings/app_settings_test.dart deleted file mode 100644 index 592de7a1..00000000 --- a/test/utils/app_settings/app_settings_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; - -void main() { - group('AppSettings', () { - setUp(() async { - SharedPreferences.setMockInitialValues({}); - await AppSettings.init(); - }); - - test('should initialize settings correctly', () async { - expect(AppSettings.isDarkMode, true); - expect(AppSettings.selectedLanguage, SupportedLanguage.english); - }); - - test('should save settings correctly', () async { - await AppSettings.saveSettings(false, SupportedLanguage.english); - expect(AppSettings.isDarkMode, true); - expect(AppSettings.selectedLanguage, SupportedLanguage.english); - }); - }); - - group('SelectedTheme', () { - setUp(() async { - SharedPreferences.setMockInitialValues({}); - await SelectedTheme.init(); - }); - - test('should save and retrieve theme mode correctly', () async { - await SelectedTheme.saveMode(false); - expect(SelectedTheme.getMode(), false); - - await SelectedTheme.saveMode(true); - expect(SelectedTheme.getMode(), true); - }); - }); -} diff --git a/test/utils/app_settings/save_tour_status_test.dart b/test/utils/app_settings/save_tour_status_test.dart deleted file mode 100644 index 0716a44a..00000000 --- a/test/utils/app_settings/save_tour_status_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -void main() { - group('SaveTourStatus', () { - setUp(() async { - SharedPreferences.setMockInitialValues({}); - await SaveTourStatus.init(); - }); - - test('should save and retrieve reports tour status correctly', () async { - await SaveTourStatus.saveReportsTourStatus(true); - expect(await SaveTourStatus.getReportsTourStatus(), true); - - await SaveTourStatus.saveReportsTourStatus(false); - expect(await SaveTourStatus.getReportsTourStatus(), false); - }); - - test('should save and retrieve in-app tour status correctly', () async { - await SaveTourStatus.saveInAppTourStatus(true); - expect(await SaveTourStatus.getInAppTourStatus(), true); - - await SaveTourStatus.saveInAppTourStatus(false); - expect(await SaveTourStatus.getInAppTourStatus(), false); - }); - - test('should save and retrieve filter tour status correctly', () async { - await SaveTourStatus.saveFilterTourStatus(true); - expect(await SaveTourStatus.getFilterTourStatus(), true); - - await SaveTourStatus.saveFilterTourStatus(false); - expect(await SaveTourStatus.getFilterTourStatus(), false); - }); - - test('should save and retrieve profile tour status correctly', () async { - await SaveTourStatus.saveProfileTourStatus(true); - expect(await SaveTourStatus.getProfileTourStatus(), true); - - await SaveTourStatus.saveProfileTourStatus(false); - expect(await SaveTourStatus.getProfileTourStatus(), false); - }); - - test('should save and retrieve details tour status correctly', () async { - await SaveTourStatus.saveDetailsTourStatus(true); - expect(await SaveTourStatus.getDetailsTourStatus(), true); - - await SaveTourStatus.saveDetailsTourStatus(false); - expect(await SaveTourStatus.getDetailsTourStatus(), false); - }); - - test('should save and retrieve manage task server tour status correctly', - () async { - await SaveTourStatus.saveManageTaskServerTourStatus(true); - expect(await SaveTourStatus.getManageTaskServerTourStatus(), true); - - await SaveTourStatus.saveManageTaskServerTourStatus(false); - expect(await SaveTourStatus.getManageTaskServerTourStatus(), false); - }); - }); -} diff --git a/test/utils/app_settings/selected_language_test.dart b/test/utils/app_settings/selected_language_test.dart deleted file mode 100644 index a82c227b..00000000 --- a/test/utils/app_settings/selected_language_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; - -void main() { - group('SelectedLanguage', () { - setUp(() async { - SharedPreferences.setMockInitialValues({}); - await SelectedLanguage.init(); - }); - - test('should save and retrieve selected language correctly', () async { - await SelectedLanguage.saveSelectedLanguage(SupportedLanguage.spanish); - expect(SelectedLanguage.getSelectedLanguage(), SupportedLanguage.spanish); - - await SelectedLanguage.saveSelectedLanguage(SupportedLanguage.english); - expect(SelectedLanguage.getSelectedLanguage(), SupportedLanguage.english); - }); - }); -} diff --git a/test/utils/app_settings/selected_theme_test.dart b/test/utils/app_settings/selected_theme_test.dart deleted file mode 100644 index bd1239e9..00000000 --- a/test/utils/app_settings/selected_theme_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/utils/app_settings/app_settings.dart'; - -void main() { - group('SelectedTheme', () { - setUp(() async { - SharedPreferences.setMockInitialValues({}); - await SelectedTheme.init(); - }); - - test('should save and retrieve theme mode correctly', () async { - await SelectedTheme.saveMode(false); - expect(SelectedTheme.getMode(), false); - - await SelectedTheme.saveMode(true); - expect(SelectedTheme.getMode(), true); - }); - }); -} diff --git a/test/utils/constants/onboarding_screen_content_test.dart b/test/utils/constants/onboarding_screen_content_test.dart deleted file mode 100644 index 3023fb43..00000000 --- a/test/utils/constants/onboarding_screen_content_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/constants/onboarding_screen_content.dart'; - -void main() { - group('Onboarding Screen Content', () { - test('should contain three onboarding items', () { - expect(contents.length, 3); - }); - - test('should have valid content for each onboarding item', () { - for (var content in contents) { - expect(content.title.isNotEmpty, true); - expect(content.image.isNotEmpty, true); - expect(content.colors, isA()); - expect(content.desc.isNotEmpty, true); - } - }); - - test('should match the expected titles', () { - expect(contents[0].title, "Welcome to Taskwarrior"); - expect(contents[1].title, "Powerful Reporting"); - expect(contents[2].title, "Sync Across Devices"); - }); - }); -} diff --git a/test/utils/constants/pallette_test.dart b/test/utils/constants/pallette_test.dart deleted file mode 100644 index 81a825f2..00000000 --- a/test/utils/constants/pallette_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/constants/palette.dart'; -import 'package:flutter/material.dart'; - -void main() { - group('Palette', () { - test('kToDark should be a MaterialColor', () { - expect(Palette.kToDark, isA()); - }); - - test('kToDark should contain the correct color values', () { - expect(Palette.kToDark[50], const Color(0xff1e1e1e)); - expect(Palette.kToDark[100], const Color(0xff1a1a1a)); - expect(Palette.kToDark[200], const Color(0xff171717)); - expect(Palette.kToDark[300], const Color(0xff141414)); - expect(Palette.kToDark[400], const Color(0xff111111)); - expect(Palette.kToDark[500], const Color(0xff0d0d0d)); - expect(Palette.kToDark[600], const Color(0xff0a0a0a)); - expect(Palette.kToDark[700], const Color(0xff070707)); - expect(Palette.kToDark[800], const Color(0xff030303)); - expect(Palette.kToDark[900], const Color(0xff000000)); - }); - }); -} diff --git a/test/utils/constants/permissions_test.dart b/test/utils/constants/permissions_test.dart deleted file mode 100644 index e1cdabcd..00000000 --- a/test/utils/constants/permissions_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:permission_handler/permission_handler.dart'; -import 'package:taskwarrior/app/utils/constants/permissions.dart'; - -void main() { - group('Permissions', () { - test('should contain the correct permissions', () { - expect(permissions, [ - Permission.notification, - Permission.storage, - Permission.manageExternalStorage, - ]); - }); - }); -} diff --git a/test/utils/constants/taskwarrior_colors_test.dart b/test/utils/constants/taskwarrior_colors_test.dart deleted file mode 100644 index a7fea38d..00000000 --- a/test/utils/constants/taskwarrior_colors_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/constants/palette.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart'; - -void main() { - group('TaskWarriorColors', () { - test('should contain the correct normal colors', () { - expect(TaskWarriorColors.red, Colors.red); - expect(TaskWarriorColors.green, Colors.green); - expect(TaskWarriorColors.yellow, Colors.yellow); - expect(TaskWarriorColors.white, Colors.white); - expect(TaskWarriorColors.black, Colors.black); - expect(TaskWarriorColors.grey, Colors.grey); - expect(TaskWarriorColors.lightGrey, Colors.grey[600]); - expect(TaskWarriorColors.purple, Colors.purple); - expect(TaskWarriorColors.borderColor, Colors.grey.shade300); - expect(TaskWarriorColors.deepPurpleAccent, Colors.deepPurpleAccent); - expect(TaskWarriorColors.deepPurple, Colors.deepPurple); - }); - - test('should contain the correct dark theme colors', () { - expect( - TaskWarriorColors.kprimaryBackgroundColor, Palette.kToDark.shade200); - expect(TaskWarriorColors.ksecondaryBackgroundColor, - const Color.fromARGB(255, 48, 46, 46)); - expect(TaskWarriorColors.kprimaryTextColor, Colors.white); - expect(TaskWarriorColors.ksecondaryTextColor, Colors.white); - expect( - TaskWarriorColors.kprimaryDisabledTextColor, const Color(0xff595f6b)); - expect(TaskWarriorColors.kdialogBackGroundColor, - const Color.fromARGB(255, 25, 25, 25)); - }); - - test('should contain the correct light theme colors', () { - expect(TaskWarriorColors.kLightPrimaryBackgroundColor, Colors.white); - expect(TaskWarriorColors.kLightSecondaryBackgroundColor, - const Color.fromARGB(255, 220, 216, 216)); - expect(TaskWarriorColors.kLightPrimaryTextColor, Colors.black); - expect(TaskWarriorColors.kLightSecondaryTextColor, - const Color.fromARGB(255, 48, 46, 46)); - expect(TaskWarriorColors.kLightPrimaryDisabledTextColor, - const Color(0xffACACAB)); - expect(TaskWarriorColors.kLightDialogBackGroundColor, Colors.white); - }); - }); -} diff --git a/test/utils/constants/taskwarrior_fonts_test.dart b/test/utils/constants/taskwarrior_fonts_test.dart deleted file mode 100644 index 0dc72d4c..00000000 --- a/test/utils/constants/taskwarrior_fonts_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart'; - -void main() { - group('TaskWarriorFonts', () { - test('should contain the correct font weights', () { - expect(TaskWarriorFonts.thin, FontWeight.w100); - expect(TaskWarriorFonts.extraLight, FontWeight.w200); - expect(TaskWarriorFonts.light, FontWeight.w300); - expect(TaskWarriorFonts.regular, FontWeight.w400); - expect(TaskWarriorFonts.medium, FontWeight.w500); - expect(TaskWarriorFonts.semiBold, FontWeight.w600); - expect(TaskWarriorFonts.bold, FontWeight.w700); - expect(TaskWarriorFonts.extraBold, FontWeight.w800); - expect(TaskWarriorFonts.black, FontWeight.w900); - }); - - test('should contain the correct font sizes', () { - expect(TaskWarriorFonts.fontSizeSmall, 12.0); - expect(TaskWarriorFonts.fontSizeMedium, 16.0); - expect(TaskWarriorFonts.fontSizeLarge, 20.0); - expect(TaskWarriorFonts.fontSizeExtraLarge, 24.0); - }); - }); -} diff --git a/test/utils/constants/utilities_test.dart b/test/utils/constants/utilities_test.dart deleted file mode 100644 index c58da03d..00000000 --- a/test/utils/constants/utilities_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:flutter/material.dart'; -import 'package:taskwarrior/app/utils/constants/utilites.dart'; - -void main() { - group('Utils', () { - test('should return the correct week number as string', () { - DateTime date = DateTime(2024, 12, 15); - expect(Utils.getWeekNumber(date), '50'); - }); - - test('should return the correct week number as integer', () { - DateTime date = DateTime(2024, 12, 15); - expect(Utils.getWeekNumbertoInt(date), 50); - }); - - test('should format date correctly', () { - DateTime date = DateTime(2024, 12, 15); - String pattern = 'yyyy-MM-dd'; - expect(Utils.formatDate(date, pattern), '2024-12-15'); - }); - - test('should return the correct month name', () { - expect(Utils.getMonthName(1), 'January'); - expect(Utils.getMonthName(2), 'February'); - expect(Utils.getMonthName(3), 'March'); - expect(Utils.getMonthName(4), 'April'); - expect(Utils.getMonthName(5), 'May'); - expect(Utils.getMonthName(6), 'June'); - expect(Utils.getMonthName(7), 'July'); - expect(Utils.getMonthName(8), 'August'); - expect(Utils.getMonthName(9), 'September'); - expect(Utils.getMonthName(10), 'October'); - expect(Utils.getMonthName(11), 'November'); - expect(Utils.getMonthName(12), 'December'); - expect(Utils.getMonthName(0), ''); - }); - - testWidgets('should create an AlertDialog', (WidgetTester tester) async { - await tester.pumpWidget(MaterialApp( - home: Scaffold( - body: Builder( - builder: (context) { - return ElevatedButton( - onPressed: () { - showDialog( - context: context, - builder: (BuildContext context) { - return Utils.showAlertDialog( - title: const Text('Test Dialog'), - content: const Text('This is a test dialog'), - ); - }, - ); - }, - child: const Text('Show Dialog'), - ); - }, - ), - ), - )); - - await tester.tap(find.text('Show Dialog')); - await tester.pump(); - - expect(find.text('Test Dialog'), findsOneWidget); - expect(find.text('This is a test dialog'), findsOneWidget); - }); - }); -} diff --git a/test/utils/language/bengali_sentences_test.dart b/test/utils/language/bengali_sentences_test.dart deleted file mode 100644 index 413c587c..00000000 --- a/test/utils/language/bengali_sentences_test.dart +++ /dev/null @@ -1,178 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/language/bengali_sentences.dart'; - -void main() { - final bengali = BengaliSentences(); - - test('should provide correct Bengali translations', () { - expect(bengali.helloWorld, 'হ্যালো বিশ্ব!'); - expect(bengali.homePageTitle, 'হোম পেজ'); - expect(bengali.homePageLastModified, 'শেষবার পরিবর্তিত'); - expect(bengali.homePageDue, 'জরুরি'); - expect(bengali.homePageTaskWarriorNotConfigured, - 'TaskServer কনফিগার করা হয়নি'); - expect(bengali.homePageSetup, 'সেটআপ'); - expect(bengali.homePageFilter, 'ফিল্টার'); - expect(bengali.homePageMenu, 'মেনু'); - expect(bengali.homePageExitApp, 'অ্যাপ বন্ধ করুন'); - expect(bengali.homePageAreYouSureYouWantToExit, - 'আপনি কি সত্যিই অ্যাপ বন্ধ করতে চান?'); - expect(bengali.homePageExit, 'বাহির যান'); - expect(bengali.homePageCancel, 'বাতিল করুন'); - expect(bengali.homePageClickOnTheBottomRightButtonToStartAddingTasks, - 'টাস্ক যোগ করা শুরু করতে নিচে ডানদিকে বোতামে ক্লিক করুন'); - expect(bengali.homePageSearchNotFound, 'অনুসন্ধানে কিছু পাওয়া যায়নি'); - expect(bengali.settingsPageTitle, 'সেটিংস পেজ'); - expect(bengali.settingsPageSubtitle, 'আপনার পছন্দ সেট করুন'); - expect(bengali.settingsPageMovingDataToNewDirectory, - 'নতুন ডিরেক্টরিতে ডেটা স্থানান্তর করা হচ্ছে'); - expect(bengali.settingsPageSyncOnStartTitle, - 'অ্যাপ শুরুতে ডেটা স্বয়ংক্রিয়ভাবে সিঙ্ক করুন'); - expect(bengali.settingsPageSyncOnStartDescription, 'শুরুতে সিঙ্ক করুন'); - expect(bengali.settingsPageEnableSyncOnTaskCreateTitle, - 'নতুন টাস্ক তৈরি করার সময় স্বয়ংক্রিয় সিঙ্কিং সক্ষম করুন'); - expect(bengali.settingsPageEnableSyncOnTaskCreateDescription, - 'নতুন টাস্ক তৈরি করার সময় স্বয়ংক্রিয় সিঙ্কিং সক্ষম করুন'); - expect(bengali.settingsPageHighlightTaskTitle, 'জরুরি টাস্ক হাইলাইট করুন'); - expect(bengali.settingsPageHighlightTaskDescription, - '1 দিনের মধ্যে বা অতিক্রান্ত সময়ের টাস্ক হাইলাইট করুন'); - expect(bengali.settingsPageEnable24hrFormatTitle, - '24 ঘণ্টার ফর্ম্যাট সক্রিয় করুন'); - expect(bengali.settingsPageEnable24hrFormatDescription, - '24 ঘণ্টার ফর্ম্যাট সক্রিয় করুন'); - expect(bengali.settingsPageSelectLanguage, 'ভাষা নির্বাচন করুন'); - expect(bengali.settingsPageToggleNativeLanguage, - 'আপনার মাতৃভাষার মধ্যে টগল করুন'); - expect(bengali.settingsPageSelectDirectoryTitle, 'ডিরেক্টরি নির্বাচন করুন'); - expect(bengali.settingsPageSelectDirectoryDescription, - 'টাস্কওয়ারিয়র ডেটা যেখানে সংরক্ষিত হয় সেই ডিরেক্টরি নির্বাচন করুন\nবর্তমান ডিরেক্টরি: '); - expect(bengali.settingsPageChangeDirectory, 'ডিরেক্টরি পরিবর্তন করুন'); - expect(bengali.settingsPageSetToDefault, 'ডিফল্টে সেট করুন'); - expect(bengali.navDrawerProfile, 'প্রোফাইল'); - expect(bengali.navDrawerReports, 'রিপোর্টস'); - expect(bengali.navDrawerAbout, 'সম্পর্কে'); - expect(bengali.navDrawerSettings, 'সেটিংস'); - expect(bengali.navDrawerExit, 'বাহির যান'); - expect(bengali.detailPageDescription, 'বর্ণনা'); - expect(bengali.detailPageStatus, 'অবস্থা'); - expect(bengali.detailPageEntry, 'এন্ট্রি'); - expect(bengali.detailPageModified, 'পরিবর্তিত'); - expect(bengali.detailPageStart, 'শুরু'); - expect(bengali.detailPageEnd, 'শেষ'); - expect(bengali.detailPageDue, 'জরুরি'); - expect(bengali.detailPageWait, 'অপেক্ষা করুন'); - expect(bengali.detailPageUntil, 'পর্যন্ত'); - expect(bengali.detailPagePriority, 'প্রাধান্য'); - expect(bengali.detailPageProject, 'প্রকল্প'); - expect(bengali.detailPageTags, 'ট্যাগ'); - expect(bengali.detailPageUrgency, 'জরুরি'); - expect(bengali.detailPageID, 'আইডি'); - expect(bengali.filterDrawerApplyFilters, 'ফিল্টার প্রয়োগ করুন'); - expect(bengali.filterDrawerHideWaiting, 'অপেক্ষা লুকান'); - expect(bengali.filterDrawerShowWaiting, 'অপেক্ষা প্রদর্শন করুন'); - expect(bengali.filterDrawerPending, 'মুলতুবি'); - expect(bengali.filterDrawerCompleted, 'সম্পন্ন'); - expect(bengali.filterDrawerFilterTagBy, 'ট্যাগ দ্বারা ফিল্টার করুন'); - expect(bengali.filterDrawerAND, 'এবং'); - expect(bengali.filterDrawerOR, 'অথবা'); - expect(bengali.filterDrawerSortBy, 'এর দ্বারা সাজান'); - expect(bengali.filterDrawerCreated, 'সৃষ্ট'); - expect(bengali.filterDrawerModified, 'পরিবর্তিত'); - expect(bengali.filterDrawerStartTime, 'শুরুর সময়'); - expect(bengali.filterDrawerDueTill, 'জরুরি পর্যন্ত'); - expect(bengali.filterDrawerPriority, 'প্রাধান্য'); - expect(bengali.filterDrawerProject, 'প্রকল্প'); - expect(bengali.filterDrawerTags, 'ট্যাগস'); - expect(bengali.filterDrawerUrgency, 'জরুরি'); - expect(bengali.filterDrawerResetSort, 'সাজানো রিসেট করুন'); - expect(bengali.filterDrawerStatus, 'অবস্থা'); - expect(bengali.reportsPageTitle, 'রিপোর্টস'); - expect(bengali.reportsPageCompleted, 'সম্পন্ন'); - expect(bengali.reportsPagePending, 'মুলতুবি'); - expect(bengali.reportsPageTasks, 'টাস্ক'); - expect(bengali.reportsPageDaily, 'দৈনিক'); - expect(bengali.reportsPageDailyBurnDownChart, 'দৈনিক বার্নডাউন চার্ট'); - expect(bengali.reportsPageDailyDayMonth, 'দিন - মাস'); - expect(bengali.reportsPageWeekly, 'সাপ্তাহিক'); - expect(bengali.reportsPageWeeklyBurnDownChart, 'সাপ্তাহিক বার্নডাউন চার্ট'); - expect(bengali.reportsPageWeeklyWeeksYear, 'সপ্তাহ - বছর'); - expect(bengali.reportsPageMonthly, 'মাসিক'); - expect(bengali.reportsPageMonthlyBurnDownChart, 'মাসিক বার্নডাউন চার্ট'); - expect(bengali.reportsPageMonthlyMonthYear, 'মাস - বছর'); - expect(bengali.reportsPageNoTasksFound, 'কোনও টাস্ক পাওয়া যায়নি'); - expect(bengali.reportsPageAddTasksToSeeReports, - 'রিপোর্ট দেখতে টাস্ক যোগ করুন'); - expect(bengali.taskchampionTileDescription, - 'Taskwarrior সিঙ্কিং CCSync বা Taskchampion সিঙ্ক সার্ভারে পরিবর্তন করুন'); - expect(bengali.taskchampionTileTitle, 'Taskchampion সিঙ্ক'); - expect(bengali.ccsyncCredentials, 'CCSync ক্রেডেনশিয়াল'); - expect(bengali.deleteTaskConfirmation, 'টাস্ক মুছুন'); - expect(bengali.deleteTaskTitle, 'সব টাস্ক মুছুন?'); - expect(bengali.deleteTaskWarning, - 'এই পদক্ষেপটি অপরিবর্তনীয় এবং সমস্ত স্থানীয়ভাবে সংরক্ষিত টাস্ক মুছে ফেলবে।'); - expect(bengali.profilePageProfile, 'প্রোফাইল'); - expect(bengali.profilePageProfiles, 'প্রোফাইলস'); - expect(bengali.profilePageCurrentProfile, 'বর্তমান প্রোফাইল'); - expect(bengali.profilePageManageSelectedProfile, - 'নির্বাচিত প্রোফাইল পরিচালনা করুন'); - expect(bengali.profilePageRenameAlias, 'অ্যালিয়াস পরিবর্তন করুন'); - expect( - bengali.profilePageConfigureTaskserver, 'টাস্ক সার্ভার কনফিগার করুন'); - expect(bengali.profilePageExportTasks, 'টাস্ক রপ্তানী করুন'); - expect(bengali.profilePageCopyConfigToNewProfile, - 'নতুন প্রোফাইলে কনফিগারেশন কপি করুন'); - expect(bengali.profilePageDeleteProfile, 'প্রোফাইল মুছুন'); - expect(bengali.profilePageAddNewProfile, 'নতুন প্রোফাইল যোগ করুন'); - expect(bengali.profilePageRenameAliasDialogueBoxTitle, - 'অ্যালিয়াস পরিবর্তন করুন'); - expect( - bengali.profilePageRenameAliasDialogueBoxNewAlias, 'নতুন অ্যালিয়াস'); - expect(bengali.profilePageRenameAliasDialogueBoxCancel, 'বাতিল করুন'); - expect(bengali.profilePageRenameAliasDialogueBoxSubmit, 'জমা দিন'); - expect(bengali.profilePageExportTasksDialogueTitle, 'রপ্তানি ফরম্যাট'); - expect(bengali.profilePageExportTasksDialogueSubtitle, - 'রপ্তানি ফরম্যাট নির্বাচন করুন'); - expect(bengali.manageTaskServerPageConfigureTaskserver, - 'টাস্ক সার্ভার কনফিগার করুন'); - expect(bengali.manageTaskServerPageConfigureTASKRC, 'TASKRC কনফিগার করুন'); - expect(bengali.manageTaskServerPageSetTaskRC, 'TaskRC সেট করুন'); - expect(bengali.manageTaskServerPageConfigureYourCertificate, - 'আপনার সার্টিফিকেট কনফিগার করুন'); - expect(bengali.manageTaskServerPageSelectCertificate, - 'সার্টিফিকেট নির্বাচন করুন'); - expect(bengali.manageTaskServerPageConfigureTaskserverKey, - 'টাস্ক সার্ভার কনফিগার করুন কী'); - expect(bengali.manageTaskServerPageSelectKey, 'কী নির্বাচন করুন'); - expect(bengali.manageTaskServerPageConfigureServerCertificate, - 'সার্ভার সার্টিফিকেট কনফিগার করুন'); - expect(bengali.manageTaskServerPageTaskRCFileIsVerified, - 'Task RC ফাইল যাচাই করা হয়েছে'); - expect(bengali.manageTaskServerPageConfigureTaskRCDialogueBoxTitle, - 'TaskRC কনফিগার করুন'); - expect(bengali.manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle, - 'TaskRC সামগ্রী পেস্ট করুন বা taskrc ফাইল নির্বাচন করুন'); - expect(bengali.manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText, - 'এখানে আপনার TaskRC সামগ্রী পেস্ট করুন'); - expect(bengali.manageTaskServerPageConfigureTaskRCDialogueBoxOr, 'অথবা'); - expect(bengali.manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC, - 'TaskRC ফাইল নির্বাচন করুন'); - expect(bengali.addTaskTitle, 'কার্য যোগ করুন'); - expect(bengali.addTaskEnterTask, 'কার্য লিখুন'); - expect(bengali.addTaskDue, 'শেষ সময়'); - expect(bengali.addTaskSelectDueDate, 'শেষ সময় নির্বাচন করুন'); - expect(bengali.addTaskPriority, 'অগ্রাধিকার'); - expect(bengali.addTaskAddTags, 'ট্যাগ যোগ করুন'); - expect(bengali.addTaskCancel, 'বাতিল করুন'); - expect(bengali.addTaskAdd, 'যোগ করুন'); - expect(bengali.addTaskTimeInPast, 'নির্বাচিত সময় অতীতে রয়েছে।'); - expect(bengali.addTaskFieldCannotBeEmpty, - 'আপনি এই ক্ষেত্রটি খালি ছেড়ে দিতে পারবেন না!'); - expect(bengali.addTaskTaskAddedSuccessfully, - 'কর্ম সফলভাবে যোগ করা হয়েছে। সম্পাদনার জন্য ট্যাপ করুন'); - expect(bengali.aboutPageGitHubLink, - 'এই প্রকল্পটিকে উন্নত করতে আগ্রহী? আমাদের GitHub রিপোজিটরিতে যান।'); - expect(bengali.aboutPageProjectDescription, - 'এই প্রকল্পের লক্ষ্য Taskwarrior-এর জন্য একটি অ্যাপ তৈরি করা। এটি আপনার সকল প্ল্যাটফর্মে একটি টাস্ক ম্যানেজমেন্ট অ্যাপ। এটি আপনাকে আপনার কাজগুলি পরিচালনা করতে এবং আপনার প্রয়োজন অনুসারে সেগুলি ফিল্টার করতে সাহায্য করে।'); - expect(bengali.aboutPageAppBarTitle, 'সম্পর্কিত'); - }); -} diff --git a/test/utils/language/english_sentences_test.dart b/test/utils/language/english_sentences_test.dart deleted file mode 100644 index a2e14071..00000000 --- a/test/utils/language/english_sentences_test.dart +++ /dev/null @@ -1,169 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/language/english_sentences.dart'; - -void main() { - final english = EnglishSentences(); - - test('should provide correct English translations', () { - expect(english.helloWorld, 'Hello, World!'); - expect(english.homePageTitle, 'Home Page'); - expect(english.homePageLastModified, 'Last Modified'); - expect(english.homePageDue, 'Due'); - expect(english.homePageTaskWarriorNotConfigured, - 'TaskServer is not configured'); - expect(english.homePageSetup, 'Setup'); - expect(english.homePageFilter, 'Filter'); - expect(english.homePageMenu, 'Menu'); - expect(english.homePageExitApp, 'Exit App'); - expect(english.homePageAreYouSureYouWantToExit, - 'Are you sure you want to exit?'); - expect(english.homePageExit, 'Exit'); - expect(english.homePageCancel, 'Cancel'); - expect(english.homePageClickOnTheBottomRightButtonToStartAddingTasks, - 'Click on the bottom right button to start adding tasks'); - expect(english.homePageSearchNotFound, 'Search Not Found'); - expect(english.settingsPageTitle, 'Settings Page'); - expect(english.settingsPageSubtitle, 'Configure your preferences'); - expect(english.settingsPageMovingDataToNewDirectory, - 'Moving data to new directory'); - expect(english.settingsPageSyncOnStartTitle, 'Sync on Start'); - expect(english.settingsPageSyncOnStartDescription, - 'Automatically sync data on app start'); - expect( - english.settingsPageEnableSyncOnTaskCreateTitle, 'Sync on task create'); - expect(english.settingsPageEnableSyncOnTaskCreateDescription, - 'Enable automatic syncing when creating a new task'); - expect(english.settingsPageHighlightTaskTitle, 'Highlight urgent tasks'); - expect(english.settingsPageHighlightTaskDescription, - 'Highlight tasks due within 1 day or already overdue'); - expect(english.settingsPageEnable24hrFormatTitle, 'Enable 24 hr format'); - expect(english.settingsPageEnable24hrFormatDescription, - 'Switch right to enable 24 hr format'); - expect(english.settingsPageSelectLanguage, 'Select the language'); - expect(english.settingsPageToggleNativeLanguage, - 'Toggle between your native language'); - expect(english.settingsPageSelectDirectoryTitle, 'Select the directory'); - expect(english.settingsPageSelectDirectoryDescription, - 'Select the directory where the Taskwarrior data is stored\nCurrent directory: '); - expect(english.settingsPageChangeDirectory, 'Change Directory'); - expect(english.settingsPageSetToDefault, 'Set To Default'); - expect(english.navDrawerProfile, 'Profile'); - expect(english.navDrawerReports, 'Reports'); - expect(english.navDrawerAbout, 'About'); - expect(english.navDrawerSettings, 'Settings'); - expect(english.navDrawerExit, 'Exit'); - expect(english.detailPageDescription, 'Description'); - expect(english.detailPageStatus, 'Status'); - expect(english.detailPageEntry, 'Entry'); - expect(english.detailPageModified, 'Modified'); - expect(english.detailPageStart, 'Start'); - expect(english.detailPageEnd, 'End'); - expect(english.detailPageDue, 'Due'); - expect(english.detailPageWait, 'Wait'); - expect(english.detailPageUntil, 'Until'); - expect(english.detailPagePriority, 'Priority'); - expect(english.detailPageProject, 'Project'); - expect(english.detailPageTags, 'Tags'); - expect(english.detailPageUrgency, 'Urgency'); - expect(english.detailPageID, 'ID'); - expect(english.filterDrawerApplyFilters, 'Apply Filters'); - expect(english.filterDrawerHideWaiting, 'Hide Waiting'); - expect(english.filterDrawerShowWaiting, 'Show Waiting'); - expect(english.filterDrawerPending, 'Pending'); - expect(english.filterDrawerCompleted, 'Completed'); - expect(english.filterDrawerFilterTagBy, 'Filter Tag By'); - expect(english.filterDrawerAND, 'AND'); - expect(english.filterDrawerOR, 'OR'); - expect(english.filterDrawerSortBy, 'Sort By'); - expect(english.filterDrawerCreated, 'Created'); - expect(english.filterDrawerModified, 'Modified'); - expect(english.filterDrawerStartTime, 'Start Time'); - expect(english.filterDrawerDueTill, 'Due till'); - expect(english.filterDrawerPriority, 'Priority'); - expect(english.filterDrawerProject, 'Project'); - expect(english.filterDrawerTags, 'Tags'); - expect(english.filterDrawerUrgency, 'Urgency'); - expect(english.filterDrawerResetSort, 'Reset Sort'); - expect(english.filterDrawerStatus, 'Status'); - expect(english.reportsPageTitle, 'Reports'); - expect(english.reportsPageCompleted, 'Completed'); - expect(english.reportsPagePending, 'Pending'); - expect(english.reportsPageTasks, 'Tasks'); - expect(english.reportsPageDaily, 'Daily'); - expect(english.reportsPageDailyBurnDownChart, 'Daily Burn Down Chart'); - expect(english.reportsPageDailyDayMonth, 'Day - Month'); - expect(english.reportsPageWeekly, 'Weekly'); - expect(english.reportsPageWeeklyBurnDownChart, 'Weekly Burn Down Chart'); - expect(english.reportsPageWeeklyWeeksYear, 'Weeks - Year'); - expect(english.reportsPageMonthly, 'Monthly'); - expect(english.reportsPageMonthlyBurnDownChart, 'Monthly Burn Down Chart'); - expect(english.reportsPageMonthlyMonthYear, 'Month - Year'); - expect(english.reportsPageNoTasksFound, 'No Tasks Found'); - expect(english.reportsPageAddTasksToSeeReports, 'Add Tasks To See Reports'); - expect(english.taskchampionTileDescription, - 'Switch to Taskwarrior sync with CCSync or Taskchampion Sync Server'); - expect(english.taskchampionTileTitle, 'Taskchampion sync'); - expect(english.ccsyncCredentials, 'CCync credentials'); - expect(english.deleteTaskConfirmation, 'Delete Tasks'); - expect(english.deleteTaskTitle, 'Delete All Tasks?'); - expect(english.deleteTaskWarning, - 'The action is irreversible and will delete all the tasks that are stored locally.'); - expect(english.profilePageProfile, 'Profile'); - expect(english.profilePageProfiles, 'Profiles'); - expect(english.profilePageCurrentProfile, 'Current Profile'); - expect(english.profilePageManageSelectedProfile, 'Manage Selected Profile'); - expect(english.profilePageRenameAlias, 'Rename Alias'); - expect(english.profilePageConfigureTaskserver, 'Configure Taskserver'); - expect(english.profilePageExportTasks, 'Export Tasks'); - expect(english.profilePageCopyConfigToNewProfile, - 'Copy Config To New Profile'); - expect(english.profilePageDeleteProfile, 'Delete Profile'); - expect(english.profilePageAddNewProfile, 'Add New Profile'); - expect(english.profilePageRenameAliasDialogueBoxTitle, 'Rename Alias'); - expect(english.profilePageRenameAliasDialogueBoxNewAlias, 'New Alias'); - expect(english.profilePageRenameAliasDialogueBoxCancel, 'Cancel'); - expect(english.profilePageRenameAliasDialogueBoxSubmit, 'Submit'); - expect(english.profilePageExportTasksDialogueTitle, 'Export format'); - expect(english.profilePageExportTasksDialogueSubtitle, - 'Choose the export format'); - expect(english.manageTaskServerPageConfigureTaskserver, - 'Configure Task Server'); - expect(english.manageTaskServerPageConfigureTASKRC, 'Configure TASKRC'); - expect(english.manageTaskServerPageSetTaskRC, 'Set TaskRC'); - expect(english.manageTaskServerPageConfigureYourCertificate, - 'Configure Your Certificate'); - expect(english.manageTaskServerPageSelectCertificate, 'Select Certificate'); - expect(english.manageTaskServerPageConfigureTaskserverKey, - 'Configure Task Server Key'); - expect(english.manageTaskServerPageSelectKey, 'Select Key'); - expect(english.manageTaskServerPageConfigureServerCertificate, - 'Configure Server Certificate'); - expect(english.manageTaskServerPageConfigureTaskRCDialogueBoxTitle, - 'Configure TaskRC'); - expect(english.manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle, - 'Paste the TaskRC content or select taskrc file'); - expect(english.manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText, - 'Paste your TaskRC content here'); - expect(english.manageTaskServerPageConfigureTaskRCDialogueBoxOr, 'Or'); - expect(english.manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC, - 'Select TaskRC file'); - expect(english.addTaskTitle, 'Add Task'); - expect(english.addTaskEnterTask, 'Enter Task'); - expect(english.addTaskDue, 'Due'); - expect(english.addTaskSelectDueDate, 'Select Due Date'); - expect(english.addTaskPriority, 'Priority'); - expect(english.addTaskAddTags, 'Add Tags'); - expect(english.addTaskCancel, 'Cancel'); - expect(english.addTaskAdd, 'Add'); - expect(english.addTaskTimeInPast, 'The selected time is in the past.'); - expect(english.addTaskFieldCannotBeEmpty, - 'You cannot leave this field empty!'); - expect(english.addTaskTaskAddedSuccessfully, - 'Task Added Successfully. Tap to Edit'); - expect(english.aboutPageGitHubLink, - 'Eager to enhance this project? Visit our GitHub repository.'); - expect(english.aboutPageProjectDescription, - 'This project aims to build an app for Taskwarrior. It is your task management app across all platforms. It helps you manage your tasks and filter them as per your needs.'); - expect(english.aboutPageAppBarTitle, 'About'); - }); -} diff --git a/test/utils/language/french_sentences_test.dart b/test/utils/language/french_sentences_test.dart deleted file mode 100644 index 023647ac..00000000 --- a/test/utils/language/french_sentences_test.dart +++ /dev/null @@ -1,181 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/language/french_sentences.dart'; - -void main() { - final french = FrenchSentences(); - - test('should provide correct French translations', () { - expect(french.helloWorld, 'Bonjour, le monde!'); - expect(french.homePageTitle, 'Page d\'accueil'); - expect(french.homePageLastModified, 'Dernière modification'); - expect(french.homePageDue, 'Échéance'); - expect(french.homePageTaskWarriorNotConfigured, 'TaskServer non configuré'); - expect(french.homePageSetup, 'Configuration'); - expect(french.homePageFilter, 'Filtre'); - expect(french.homePageMenu, 'Menu'); - expect(french.homePageExitApp, 'Quitter l\'application'); - expect(french.homePageAreYouSureYouWantToExit, - 'Êtes-vous sûr de vouloir quitter l\'application ?'); - expect(french.homePageExit, 'Quitter'); - expect(french.homePageCancel, 'Annuler'); - expect(french.homePageClickOnTheBottomRightButtonToStartAddingTasks, - 'Cliquez sur le bouton en bas à droite pour commencer à ajouter des tâches'); - expect(french.homePageSearchNotFound, 'Aucun résultat pour la recherche'); - expect(french.settingsPageTitle, 'Page des paramètres'); - expect(french.settingsPageSubtitle, 'Configurez vos préférences'); - expect(french.settingsPageMovingDataToNewDirectory, - 'Déplacement des données vers un nouveau répertoire'); - expect(french.settingsPageSyncOnStartTitle, - 'Synchroniser les données automatiquement au démarrage'); - expect( - french.settingsPageSyncOnStartDescription, 'Synchroniser au démarrage'); - expect(french.settingsPageEnableSyncOnTaskCreateTitle, - 'Activer la synchronisation automatique lors de la création de nouvelles tâches'); - expect(french.settingsPageEnableSyncOnTaskCreateDescription, - 'Activer la synchronisation automatique lors de la création de nouvelles tâches'); - expect( - french.settingsPageHighlightTaskTitle, 'Surligner les tâches urgentes'); - expect(french.settingsPageHighlightTaskDescription, - 'Surligner les tâches dues dans 1 jour ou en retard'); - expect(french.settingsPageEnable24hrFormatTitle, - 'Activer le format 24 heures'); - expect(french.settingsPageEnable24hrFormatDescription, - 'Activer le format 24 heures'); - expect(french.settingsPageSelectLanguage, 'Choisir la langue'); - expect(french.settingsPageToggleNativeLanguage, - 'Basculer entre les langues natives'); - expect(french.settingsPageSelectDirectoryTitle, 'Choisir un répertoire'); - expect(french.settingsPageSelectDirectoryDescription, - 'Choisissez le répertoire où les données Taskwarrior sont stockées\nRépertoire actuel : '); - expect(french.settingsPageChangeDirectory, 'Changer de répertoire'); - expect(french.settingsPageSetToDefault, 'Définir par défaut'); - expect(french.navDrawerProfile, 'Profil'); - expect(french.navDrawerReports, 'Rapports'); - expect(french.navDrawerAbout, 'À propos'); - expect(french.navDrawerSettings, 'Paramètres'); - expect(french.navDrawerExit, 'Quitter'); - expect(french.detailPageDescription, 'Description'); - expect(french.detailPageStatus, 'Statut'); - expect(french.detailPageEntry, 'Entrée'); - expect(french.detailPageModified, 'Modifié'); - expect(french.detailPageStart, 'Début'); - expect(french.detailPageEnd, 'Fin'); - expect(french.detailPageDue, 'Échéance'); - expect(french.detailPageWait, 'Attendre'); - expect(french.detailPageUntil, 'Jusqu\'à'); - expect(french.detailPagePriority, 'Priorité'); - expect(french.detailPageProject, 'Projet'); - expect(french.detailPageTags, 'Tags'); - expect(french.detailPageUrgency, 'Urgence'); - expect(french.detailPageID, 'ID'); - expect(french.filterDrawerApplyFilters, 'Appliquer les filtres'); - expect(french.filterDrawerHideWaiting, 'Masquer les en attente'); - expect(french.filterDrawerShowWaiting, 'Afficher les en attente'); - expect(french.filterDrawerPending, 'En attente'); - expect(french.filterDrawerCompleted, 'Complété'); - expect(french.filterDrawerFilterTagBy, 'Filtrer par tag'); - expect(french.filterDrawerAND, 'et'); - expect(french.filterDrawerOR, 'ou'); - expect(french.filterDrawerSortBy, 'Trier par'); - expect(french.filterDrawerCreated, 'Créé'); - expect(french.filterDrawerModified, 'Modifié'); - expect(french.filterDrawerStartTime, 'Heure de début'); - expect(french.filterDrawerDueTill, 'Jusqu\'à l\'échéance'); - expect(french.filterDrawerPriority, 'Priorité'); - expect(french.filterDrawerProject, 'Projet'); - expect(french.filterDrawerTags, 'Tags'); - expect(french.filterDrawerUrgency, 'Urgence'); - expect(french.filterDrawerResetSort, 'Réinitialiser le tri'); - expect(french.filterDrawerStatus, 'Statut'); - expect(french.reportsPageTitle, 'Rapports'); - expect(french.reportsPageCompleted, 'Complété'); - expect(french.reportsPagePending, 'En attente'); - expect(french.reportsPageTasks, 'Tâches'); - expect(french.reportsPageDaily, 'Quotidien'); - expect(french.reportsPageDailyBurnDownChart, - 'Graphique de burn down quotidien'); - expect(french.reportsPageDailyDayMonth, 'Jour - Mois'); - expect(french.reportsPageWeekly, 'Hebdomadaire'); - expect(french.reportsPageWeeklyBurnDownChart, - 'Graphique de burn down hebdomadaire'); - expect(french.reportsPageWeeklyWeeksYear, 'Semaine - Année'); - expect(french.reportsPageMonthly, 'Mensuel'); - expect(french.reportsPageMonthlyBurnDownChart, - 'Graphique de burn down mensuel'); - expect(french.reportsPageMonthlyMonthYear, 'Mois - Année'); - expect(french.reportsPageNoTasksFound, 'Aucune tâche trouvée'); - expect(french.reportsPageAddTasksToSeeReports, - 'Ajoutez des tâches pour voir les rapports'); - expect(french.taskchampionTileDescription, - 'Basculez la synchronisation de Taskwarrior vers le serveur de synchronisation CCSync ou Taskchampion'); - expect(french.taskchampionTileTitle, 'Synchronisation Taskchampion'); - expect(french.ccsyncCredentials, 'Identifiants CCSync'); - expect(french.deleteTaskConfirmation, 'Supprimer la tâche'); - expect(french.deleteTaskTitle, 'Supprimer toutes les tâches ?'); - expect(french.deleteTaskWarning, - 'Cette action est irréversible et supprimera toutes les tâches stockées localement.'); - expect(french.profilePageProfile, 'Profil'); - expect(french.profilePageProfiles, 'Profils'); - expect(french.profilePageCurrentProfile, 'Profil actuel'); - expect( - french.profilePageManageSelectedProfile, 'Gérer le profil sélectionné'); - expect(french.profilePageRenameAlias, 'Renommer l\'alias'); - expect(french.profilePageConfigureTaskserver, - 'Configurer le serveur de tâches'); - expect(french.profilePageExportTasks, 'Exporter les tâches'); - expect(french.profilePageCopyConfigToNewProfile, - 'Copier la configuration vers un nouveau profil'); - expect(french.profilePageDeleteProfile, 'Supprimer le profil'); - expect(french.profilePageAddNewProfile, 'Ajouter un nouveau profil'); - expect(french.profilePageRenameAliasDialogueBoxTitle, 'Renommer l\'alias'); - expect(french.profilePageRenameAliasDialogueBoxNewAlias, 'Nouvel alias'); - expect(french.profilePageRenameAliasDialogueBoxCancel, 'Annuler'); - expect(french.profilePageRenameAliasDialogueBoxSubmit, 'Soumettre'); - expect(french.profilePageExportTasksDialogueTitle, 'Format d\'exportation'); - expect(french.profilePageExportTasksDialogueSubtitle, - 'Choisissez le format d\'exportation'); - expect(french.manageTaskServerPageConfigureTaskserver, - 'Configurer le serveur de tâches'); - expect(french.manageTaskServerPageConfigureTASKRC, 'Configurer TASKRC'); - expect(french.manageTaskServerPageSetTaskRC, 'Définir TaskRC'); - expect(french.manageTaskServerPageConfigureYourCertificate, - 'Configurer votre certificat'); - expect(french.manageTaskServerPageSelectCertificate, - 'Sélectionner un certificat'); - expect(french.manageTaskServerPageConfigureTaskserverKey, - 'Configurer la clé du serveur de tâches'); - expect(french.manageTaskServerPageSelectKey, 'Sélectionner une clé'); - expect(french.manageTaskServerPageConfigureServerCertificate, - 'Configurer le certificat du serveur'); - expect(french.manageTaskServerPageTaskRCFileIsVerified, - 'Le fichier Task RC est vérifié'); - expect(french.manageTaskServerPageConfigureTaskRCDialogueBoxTitle, - 'Configurer TaskRC'); - expect(french.manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle, - 'Collez le contenu de TaskRC ou sélectionnez un fichier taskrc'); - expect(french.manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText, - 'Collez votre contenu TaskRC ici'); - expect(french.manageTaskServerPageConfigureTaskRCDialogueBoxOr, 'ou'); - expect(french.manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC, - 'Sélectionner un fichier TaskRC'); - expect(french.addTaskTitle, 'Ajouter une tâche'); - expect(french.addTaskEnterTask, 'Entrer une tâche'); - expect(french.addTaskDue, 'Échéance'); - expect(french.addTaskSelectDueDate, 'Sélectionner la date d\'échéance'); - expect(french.addTaskPriority, 'Priorité'); - expect(french.addTaskAddTags, 'Ajouter des tags'); - expect(french.addTaskCancel, 'Annuler'); - expect(french.addTaskAdd, 'Ajouter'); - expect( - french.addTaskTimeInPast, 'L\'heure sélectionnée est dans le passé.'); - expect(french.addTaskFieldCannotBeEmpty, - 'Vous ne pouvez pas laisser ce champ vide !'); - expect(french.addTaskTaskAddedSuccessfully, - 'Tâche ajoutée avec succès. Appuyez pour éditer'); - expect(french.aboutPageGitHubLink, - 'Enthousiaste à l\'idée d\'améliorer ce projet ? Visitez notre dépôt GitHub.'); - expect(french.aboutPageProjectDescription, - 'Ce projet vise à créer une application pour Taskwarrior. C\'est votre application de gestion des tâches sur toutes les plateformes. Elle vous aide à gérer vos tâches et à les filtrer selon vos besoins.'); - expect(french.aboutPageAppBarTitle, 'À propos'); - }); -} diff --git a/test/utils/language/hindi_sentences_test.dart b/test/utils/language/hindi_sentences_test.dart deleted file mode 100644 index 45c41702..00000000 --- a/test/utils/language/hindi_sentences_test.dart +++ /dev/null @@ -1,175 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/language/hindi_sentences.dart'; - -void main() { - final hindi = HindiSentences(); - - test('should provide correct Hindi translations', () { - expect(hindi.helloWorld, 'नमस्ते दुनिया!'); - expect(hindi.homePageTitle, 'होम पेज'); - expect(hindi.homePageLastModified, 'अंतिम बार संशोधित'); - expect(hindi.homePageDue, 'देय'); - expect( - hindi.homePageTaskWarriorNotConfigured, 'TaskServer कॉन्फ़िगर नहीं है'); - expect(hindi.homePageSetup, 'सेटअप'); - expect(hindi.homePageFilter, 'फ़िल्टर'); - expect(hindi.homePageMenu, 'मेन्यू'); - expect(hindi.homePageExitApp, 'ऐप बंद करें'); - expect(hindi.homePageAreYouSureYouWantToExit, - 'क्या आप वाकई ऐप बंद करना चाहते हैं?'); - expect(hindi.homePageExit, 'बाहर जाओ'); - expect(hindi.homePageCancel, 'रद्द करें'); - expect(hindi.homePageClickOnTheBottomRightButtonToStartAddingTasks, - 'कार्यों को जोड़ना शुरू करने के लिए नीचे दाएं बटन पर क्लिक करें'); - expect(hindi.homePageSearchNotFound, 'खोजने पर नहीं मिला'); - expect(hindi.settingsPageTitle, 'सेटिंग्स पेज'); - expect(hindi.settingsPageSubtitle, 'अपनी पसंद सेट करें'); - expect(hindi.settingsPageMovingDataToNewDirectory, - 'नए निर्देशिका में डेटा को ले जा रहा है'); - expect(hindi.settingsPageSyncOnStartTitle, - 'ऐप स्टार्ट पर डेटा स्वचालित सिंक करें'); - expect(hindi.settingsPageSyncOnStartDescription, 'स्टार्ट पर सिंक करें'); - expect(hindi.settingsPageEnableSyncOnTaskCreateTitle, - 'नई टास्क बनाते समय स्वचालित सिंकिंग सक्षम करें'); - expect(hindi.settingsPageEnableSyncOnTaskCreateDescription, - 'नई टास्क बनाते समय स्वचालित सिंकिंग सक्षम करें'); - expect( - hindi.settingsPageHighlightTaskTitle, 'तत्काल कार्यों को हाइलाइट करें'); - expect(hindi.settingsPageHighlightTaskDescription, - '1 दिन के भीतर देय या अतिदेय कार्यों को हाइलाइट करें'); - expect(hindi.settingsPageEnable24hrFormatTitle, - '24 घंटे का प्रारूप सक्षम करें'); - expect(hindi.settingsPageEnable24hrFormatDescription, - '24 घंटे का प्रारूप सक्षम करें'); - expect(hindi.settingsPageSelectLanguage, 'भाषा चुनें'); - expect(hindi.settingsPageToggleNativeLanguage, - 'अपनी मातृभाषा के बीच टॉगल करें'); - expect(hindi.settingsPageSelectDirectoryTitle, 'निर्देशिका चुनें'); - expect(hindi.settingsPageSelectDirectoryDescription, - 'निर्देशिका चुनें जहां Taskwarrior डेटा स्टोर होता है\nवर्तमान निर्देशिका: '); - expect(hindi.settingsPageChangeDirectory, 'निर्देशिका बदलें'); - expect(hindi.settingsPageSetToDefault, 'डिफॉल्ट पर सेट करें'); - expect(hindi.navDrawerProfile, 'प्रोफ़ाइल'); - expect(hindi.navDrawerReports, 'रिपोर्ट्स'); - expect(hindi.navDrawerAbout, 'के बारे में'); - expect(hindi.navDrawerSettings, 'सेटिंग्स'); - expect(hindi.navDrawerExit, 'बाहर जाओ'); - expect(hindi.detailPageDescription, 'विवरण'); - expect(hindi.detailPageStatus, 'स्थिति'); - expect(hindi.detailPageEntry, 'प्रवेश'); - expect(hindi.detailPageModified, 'संशोधित'); - expect(hindi.detailPageStart, 'प्रारंभ'); - expect(hindi.detailPageEnd, 'अंत'); - expect(hindi.detailPageDue, 'देय'); - expect(hindi.detailPageWait, 'प्रतीक्षा करें'); - expect(hindi.detailPageUntil, 'तक'); - expect(hindi.detailPagePriority, 'प्राथमिकता'); - expect(hindi.detailPageProject, 'परियोजना'); - expect(hindi.detailPageTags, 'टैग'); - expect(hindi.detailPageUrgency, 'तत्कालता'); - expect(hindi.detailPageID, 'आयडी'); - expect(hindi.filterDrawerApplyFilters, 'फिल्टर लागू करें'); - expect(hindi.filterDrawerHideWaiting, 'इंतजार छिपाएं'); - expect(hindi.filterDrawerShowWaiting, 'इंतजार दिखाएं'); - expect(hindi.filterDrawerPending, 'अपूर्ण'); - expect(hindi.filterDrawerCompleted, 'पूर्ण'); - expect(hindi.filterDrawerFilterTagBy, 'टैग से फ़िल्टर करें'); - expect(hindi.filterDrawerAND, 'और'); - expect(hindi.filterDrawerOR, 'या'); - expect(hindi.filterDrawerSortBy, 'इसके आधार पर क्रमबद्ध करें'); - expect(hindi.filterDrawerCreated, 'निर्मित'); - expect(hindi.filterDrawerModified, 'संशोधित'); - expect(hindi.filterDrawerStartTime, 'शुरुआत समय'); - expect(hindi.filterDrawerDueTill, 'तक बकाया'); - expect(hindi.filterDrawerPriority, 'प्राथमिकता'); - expect(hindi.filterDrawerProject, 'परियोजना'); - expect(hindi.filterDrawerTags, 'टैग्स'); - expect(hindi.filterDrawerUrgency, 'तत्कालता'); - expect(hindi.filterDrawerResetSort, 'सॉर्ट रीसेट करें'); - expect(hindi.filterDrawerStatus, 'स्थिती'); - expect(hindi.reportsPageTitle, 'रिपोर्ट्स'); - expect(hindi.reportsPageCompleted, 'पूर्ण'); - expect(hindi.reportsPagePending, 'अपूर्ण'); - expect(hindi.reportsPageTasks, 'कार्य'); - expect(hindi.reportsPageDaily, 'दैनिक'); - expect(hindi.reportsPageDailyBurnDownChart, 'दैनिक बर्न डाउन चार्ट'); - expect(hindi.reportsPageDailyDayMonth, 'दिन - माह'); - expect(hindi.reportsPageWeekly, 'साप्ताहिक'); - expect(hindi.reportsPageWeeklyBurnDownChart, 'साप्ताहिक बर्न डाउन चार्ट'); - expect(hindi.reportsPageWeeklyWeeksYear, 'सप्ताह - वर्ष'); - expect(hindi.reportsPageMonthly, 'मासिक'); - expect(hindi.reportsPageMonthlyBurnDownChart, 'मासिक बर्न डाउन चार्ट'); - expect(hindi.reportsPageMonthlyMonthYear, 'माह - वर्ष'); - expect(hindi.reportsPageNoTasksFound, 'कोई कार्य नहीं मिला'); - expect(hindi.reportsPageAddTasksToSeeReports, - 'रिपोर्ट देखने के लिए कार्य जोड़ें'); - expect(hindi.taskchampionTileDescription, - 'CCSync या Taskchampion सिंक सर्वर के साथ Taskwarrior सिंक पर स्विच करें'); - expect(hindi.taskchampionTileTitle, 'Taskchampion सिंक'); - expect(hindi.ccsyncCredentials, 'CCync क्रेडेन्शियल'); - expect(hindi.deleteTaskConfirmation, 'कार्य हटाएं'); - expect(hindi.deleteTaskTitle, 'सभी कार्य हटाएं?'); - expect(hindi.deleteTaskWarning, - 'यह क्रिया अपरिवर्तनीय है और यह सभी स्थानीय रूप से संग्रहीत कार्यों को हटा देगी।'); - expect(hindi.profilePageProfile, 'प्रोफ़ाइल'); - expect(hindi.profilePageProfiles, 'प्रोफ़ाइल्स'); - expect(hindi.profilePageCurrentProfile, 'वर्तमान प्रोफ़ाइल'); - expect(hindi.profilePageManageSelectedProfile, - 'चुनी हुई प्रोफ़ाइल प्रबंधित करें'); - expect(hindi.profilePageRenameAlias, 'उपनाम बदलें'); - expect(hindi.profilePageConfigureTaskserver, 'टास्क सर्वर कॉन्फ़िगर करें'); - expect(hindi.profilePageExportTasks, 'कार्य निर्यात करें'); - expect(hindi.profilePageCopyConfigToNewProfile, - 'नई प्रोफ़ाइल पर कॉन्फ़िगरेशन कॉपी करें'); - expect(hindi.profilePageDeleteProfile, 'प्रोफ़ाइल हटाएँ'); - expect(hindi.profilePageAddNewProfile, 'नई प्रोफ़ाइल जोड़ें'); - expect(hindi.profilePageRenameAliasDialogueBoxTitle, 'उपनाम बदलें'); - expect(hindi.profilePageRenameAliasDialogueBoxNewAlias, 'नया उपनाम'); - expect(hindi.profilePageRenameAliasDialogueBoxCancel, 'रद्द करें'); - expect(hindi.profilePageRenameAliasDialogueBoxSubmit, 'प्रस्तुत करें'); - expect(hindi.profilePageExportTasksDialogueTitle, 'निर्यात प्रारूप'); - expect( - hindi.profilePageExportTasksDialogueSubtitle, 'निर्यात प्रारूप चुनें'); - expect(hindi.manageTaskServerPageConfigureTaskserver, - 'टास्क सर्वर कॉन्फ़िगर करें'); - expect(hindi.manageTaskServerPageConfigureTASKRC, 'TASKRC कॉन्फ़िगर करें'); - expect(hindi.manageTaskServerPageSetTaskRC, 'TaskRC सेट करें'); - expect(hindi.manageTaskServerPageConfigureYourCertificate, - 'अपने सर्टिफिकेट को कॉन्फ़िगर करें'); - expect(hindi.manageTaskServerPageSelectCertificate, 'सर्टिफिकेट चुनें'); - expect(hindi.manageTaskServerPageConfigureTaskserverKey, - 'टास्क सर्वर की कॉन्फ़िगर करें'); - expect(hindi.manageTaskServerPageSelectKey, 'कुंजी चुनें'); - expect(hindi.manageTaskServerPageConfigureServerCertificate, - 'सर्वर सर्टिफिकेट कॉन्फ़िगर करें'); - expect(hindi.manageTaskServerPageTaskRCFileIsVerified, - 'Task RC फ़ाइल सत्यापित की गई है'); - expect(hindi.manageTaskServerPageConfigureTaskRCDialogueBoxTitle, - 'TaskRC कॉन्फ़िगर करें'); - expect(hindi.manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle, - 'TaskRC सामग्री पेस्ट करें या taskrc फ़ाइल चुनें'); - expect(hindi.manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText, - 'यहाँ अपनी TaskRC सामग्री पेस्ट करें'); - expect(hindi.manageTaskServerPageConfigureTaskRCDialogueBoxOr, 'या'); - expect(hindi.manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC, - 'TaskRC फ़ाइल चुनें'); - expect(hindi.addTaskTitle, 'कार्य जोड़ें'); - expect(hindi.addTaskEnterTask, 'कार्य दर्ज करें'); - expect(hindi.addTaskDue, 'देय'); - expect(hindi.addTaskSelectDueDate, 'नियत तिथि चुनें'); - expect(hindi.addTaskPriority, 'प्राथमिकता'); - expect(hindi.addTaskAddTags, 'टैग जोड़ें'); - expect(hindi.addTaskCancel, 'रद्द करें'); - expect(hindi.addTaskAdd, 'जोड़ें'); - expect(hindi.addTaskTimeInPast, 'चुनी गई समय अतीत में है।'); - expect(hindi.addTaskFieldCannotBeEmpty, - 'आप इस फ़ील्ड को खाली नहीं छोड़ सकते!'); - expect(hindi.addTaskTaskAddedSuccessfully, - 'कार्य सफलतापूर्वक जोड़ा गया। संपादित करने के लिए टैप करें'); - expect(hindi.aboutPageGitHubLink, - 'इस परियोजना को बढ़ाने के लिए उत्सुक हैं? हमारे GitHub रिपॉज़िटरी पर जाएं।'); - expect(hindi.aboutPageProjectDescription, - 'यह परियोजना Taskwarrior के लिए एक ऐप बनाने का लक्ष्य रखती है। यह आपके सभी प्लेटफार्मों पर कार्य प्रबंधन ऐप है। यह आपको अपने कार्यों को प्रबंधित करने और उन्हें अपनी आवश्यकताओं के अनुसार छानने में मदद करता है।'); - expect(hindi.aboutPageAppBarTitle, 'के बारे में'); - }); -} diff --git a/test/utils/language/marathi_sentences_test.dart b/test/utils/language/marathi_sentences_test.dart deleted file mode 100644 index 57e8104c..00000000 --- a/test/utils/language/marathi_sentences_test.dart +++ /dev/null @@ -1,176 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/language/marathi_sentences.dart'; - -void main() { - final marathi = MarathiSentences(); - - test('should provide correct Marathi translations', () { - expect(marathi.helloWorld, 'नमस्कार, जग!'); - expect(marathi.homePageTitle, 'होम पेज'); - expect(marathi.homePageLastModified, 'शेवटचा बदल'); - expect(marathi.homePageDue, 'द्यावे'); - expect(marathi.homePageTaskWarriorNotConfigured, 'TaskServer संरचीत नाही'); - expect(marathi.homePageSetup, 'सेटअप'); - expect(marathi.homePageFilter, 'फिल्टर'); - expect(marathi.homePageMenu, 'मेनू'); - expect(marathi.homePageExitApp, 'अ‍ॅप बंद करा'); - expect(marathi.homePageAreYouSureYouWantToExit, - 'आपण खात्री आहात की आपण अ‍ॅप बंद करू इच्छिता?'); - expect(marathi.homePageExit, 'बाहेर पडा'); - expect(marathi.homePageCancel, 'रद्द करा'); - expect(marathi.homePageClickOnTheBottomRightButtonToStartAddingTasks, - 'कार्ये जोडणे सुरू करण्यासाठी तळाशी उजव्या बटणावर क्लिक करा'); - expect(marathi.homePageSearchNotFound, 'शोध सापडला नाही'); - expect(marathi.settingsPageTitle, 'सेटिंग्स पेज'); - expect(marathi.settingsPageSubtitle, 'तुमची पसंती सेट करा'); - expect(marathi.settingsPageMovingDataToNewDirectory, - 'नवीन निर्देशिकेत डेटा हलवत आहे'); - expect(marathi.settingsPageSyncOnStartTitle, 'सुरू करण्यावर सिंक करा'); - expect(marathi.settingsPageSyncOnStartDescription, - 'अ‍ॅप सुरू करताना डेटा स्वयंसिंक करा'); - expect(marathi.settingsPageEnableSyncOnTaskCreateTitle, - 'नवीन कार्य तयार करताना स्वयंसिंकिंग सक्षम करा'); - expect(marathi.settingsPageEnableSyncOnTaskCreateDescription, - 'नवीन कार्य तयार करताना स्वयंसिंकिंग सक्षम करा'); - expect(marathi.settingsPageHighlightTaskTitle, - 'तातडीच्या कार्यांना हायलाईट करा'); - expect(marathi.settingsPageHighlightTaskDescription, - '1 दिवसाच्या आत देय किंवा मुदत संपलेल्या कार्यांना हायलाईट करा'); - expect(marathi.settingsPageEnable24hrFormatTitle, - '24 तासाचा स्वरूप सक्षम करा'); - expect(marathi.settingsPageEnable24hrFormatDescription, - '24 तासाचा स्वरूप सक्षम करा'); - expect(marathi.settingsPageSelectLanguage, 'भाषा निवडा'); - expect(marathi.settingsPageToggleNativeLanguage, - 'तुमच्या मूल भाषेतर्फे टॉगल करा'); - expect(marathi.settingsPageSelectDirectoryTitle, 'निर्देशिका निवडा'); - expect(marathi.settingsPageSelectDirectoryDescription, - 'निर्देशिका निवडा जिथे Taskwarrior डेटा स्टोर केला जातो\nवर्तमान निर्देशिका: '); - expect(marathi.settingsPageChangeDirectory, 'डिरेक्टरी बदला'); - expect(marathi.settingsPageSetToDefault, 'डीफॉल्टवर सेट करा'); - expect(marathi.navDrawerProfile, 'प्रोफ़ाइल'); - expect(marathi.navDrawerReports, 'अहवाल'); - expect(marathi.navDrawerAbout, 'चरित्र'); - expect(marathi.navDrawerSettings, 'सेटिंग्स'); - expect(marathi.navDrawerExit, 'बाहेर पडा'); - expect(marathi.detailPageDescription, 'वर्णन'); - expect(marathi.detailPageStatus, 'स्थिती'); - expect(marathi.detailPageEntry, 'प्रवेश'); - expect(marathi.detailPageModified, 'संशोधित'); - expect(marathi.detailPageStart, 'सुरूवात'); - expect(marathi.detailPageEnd, 'शेवट'); - expect(marathi.detailPageDue, 'देय'); - expect(marathi.detailPageWait, 'प्रतीक्षा'); - expect(marathi.detailPageUntil, 'पर्यंत'); - expect(marathi.detailPagePriority, 'प्राधान्य'); - expect(marathi.detailPageProject, 'प्रकल्प'); - expect(marathi.detailPageTags, 'टॅग'); - expect(marathi.detailPageUrgency, 'तातडी'); - expect(marathi.detailPageID, 'आयडी'); - expect(marathi.filterDrawerApplyFilters, 'फिल्टर लागू करा'); - expect(marathi.filterDrawerHideWaiting, 'वाट लपवा'); - expect(marathi.filterDrawerShowWaiting, 'वाट दाखवा'); - expect(marathi.filterDrawerPending, 'प्रलंबित'); - expect(marathi.filterDrawerCompleted, 'पूर्ण'); - expect(marathi.filterDrawerFilterTagBy, 'टॅगवर फिल्टर करा'); - expect(marathi.filterDrawerAND, 'आणि'); - expect(marathi.filterDrawerOR, 'किंवा'); - expect(marathi.filterDrawerSortBy, 'यानुसार क्रमबद्ध करा'); - expect(marathi.filterDrawerCreated, 'सृष्ट'); - expect(marathi.filterDrawerModified, 'संशोधित'); - expect(marathi.filterDrawerStartTime, 'सुरूवातीचा वेळ'); - expect(marathi.filterDrawerDueTill, 'पर्यंतचा देय'); - expect(marathi.filterDrawerPriority, 'प्राधान्य'); - expect(marathi.filterDrawerProject, 'प्रकल्प'); - expect(marathi.filterDrawerTags, 'टॅग्ज'); - expect(marathi.filterDrawerUrgency, 'तातडी'); - expect(marathi.filterDrawerResetSort, 'क्रमवारी रीसेट करा'); - expect(marathi.filterDrawerStatus, 'स्थिति'); - expect(marathi.reportsPageTitle, 'अहवाल'); - expect(marathi.reportsPageCompleted, 'पूर्ण'); - expect(marathi.reportsPagePending, 'प्रलंबित'); - expect(marathi.reportsPageTasks, 'काम'); - expect(marathi.reportsPageDaily, 'दैनिक'); - expect(marathi.reportsPageDailyBurnDownChart, 'दैनिक बर्न डाउन चार्ट'); - expect(marathi.reportsPageDailyDayMonth, 'दिवस - महिना'); - expect(marathi.reportsPageWeekly, 'साप्ताहिक'); - expect(marathi.reportsPageWeeklyBurnDownChart, 'साप्ताहिक बर्न डाउन चार्ट'); - expect(marathi.reportsPageWeeklyWeeksYear, 'सप्ताह - वर्ष'); - expect(marathi.reportsPageMonthly, 'मासिक'); - expect(marathi.reportsPageMonthlyBurnDownChart, 'मासिक बर्न डाउन चार्ट'); - expect(marathi.reportsPageMonthlyMonthYear, 'महिना - वर्ष'); - expect(marathi.reportsPageNoTasksFound, 'कोणतेही काम सापडले नाहीत'); - expect( - marathi.reportsPageAddTasksToSeeReports, 'अहवाल पाहण्यासाठी काम जोडा'); - expect(marathi.taskchampionTileDescription, - 'CCSync किंवा Taskchampion Sync Server सह Taskwarrior सिंक वर स्विच करा'); - expect(marathi.taskchampionTileTitle, 'Taskchampion सिंक'); - expect(marathi.ccsyncCredentials, 'CCync क्रेडेन्शियल'); - expect(marathi.deleteTaskConfirmation, 'कार्य हटवा'); - expect(marathi.deleteTaskTitle, 'सर्व कार्य हटवायचे का?'); - expect(marathi.deleteTaskWarning, - 'ही क्रिया अपरिवर्तनीय आहे आणि हे सर्व स्थानिक पातळीवर संग्रहित केलेले कार्य हटवेल.'); - expect(marathi.profilePageProfile, 'प्रोफाइल'); - expect(marathi.profilePageProfiles, 'प्रोफाइल्स'); - expect(marathi.profilePageCurrentProfile, 'सद्याचा प्रोफाइल'); - expect(marathi.profilePageManageSelectedProfile, - 'चयनित प्रोफाइल व्यवस्थापित करा'); - expect(marathi.profilePageRenameAlias, 'उपनाम पुनर्नामित करा'); - expect( - marathi.profilePageConfigureTaskserver, 'टास्क सर्व्हर कॉन्फिगर करा'); - expect(marathi.profilePageExportTasks, 'टास्क निर्यात करा'); - expect(marathi.profilePageCopyConfigToNewProfile, - 'नवीन प्रोफाइलवर कॉन्फिगरेशन कॉपी करा'); - expect(marathi.profilePageDeleteProfile, 'प्रोफाइल हटवा'); - expect(marathi.profilePageAddNewProfile, 'नवीन प्रोफाइल जोडा'); - expect( - marathi.profilePageRenameAliasDialogueBoxTitle, 'उपनाम पुनर्नामित करा'); - expect(marathi.profilePageRenameAliasDialogueBoxNewAlias, 'नवा उपनाम'); - expect(marathi.profilePageRenameAliasDialogueBoxCancel, 'रद्द करा'); - expect(marathi.profilePageRenameAliasDialogueBoxSubmit, 'सादर करा'); - expect(marathi.profilePageExportTasksDialogueTitle, 'निर्यात प्रारूप'); - expect(marathi.profilePageExportTasksDialogueSubtitle, - 'निर्यात प्रारूप निवडा'); - expect(marathi.manageTaskServerPageConfigureTaskserver, - 'टास्क सर्व्हर कॉन्फिगर करा'); - expect(marathi.manageTaskServerPageConfigureTASKRC, 'TASKRC कॉन्फिगर करा'); - expect(marathi.manageTaskServerPageSetTaskRC, 'TaskRC सेट करा'); - expect(marathi.manageTaskServerPageConfigureYourCertificate, - 'आपला सर्टिफिकेट कॉन्फिगर करा'); - expect(marathi.manageTaskServerPageSelectCertificate, 'सर्टिफिकेट निवडा'); - expect(marathi.manageTaskServerPageConfigureTaskserverKey, - 'टास्क सर्व्हर की कॉन्फिगर करा'); - expect(marathi.manageTaskServerPageSelectKey, 'की निवडा'); - expect(marathi.manageTaskServerPageConfigureServerCertificate, - 'सर्व्हर सर्टिफिकेट कॉन्फिगर करा'); - expect(marathi.manageTaskServerPageTaskRCFileIsVerified, - 'Task RC फाइल पडताळली गेली आहे'); - expect(marathi.manageTaskServerPageConfigureTaskRCDialogueBoxTitle, - 'TaskRC कॉन्फिगर करा'); - expect(marathi.manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle, - 'TaskRC सामग्री पेस्ट करा किंवा taskrc फाइल निवडा'); - expect(marathi.manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText, - 'येथे आपली TaskRC सामग्री पेस्ट करा'); - expect(marathi.manageTaskServerPageConfigureTaskRCDialogueBoxOr, 'किंवा'); - expect(marathi.manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC, - 'TaskRC फाइल निवडा'); - expect(marathi.addTaskTitle, 'काम जोडा'); - expect(marathi.addTaskEnterTask, 'काम प्रविष्ट करा'); - expect(marathi.addTaskDue, 'अखेर'); - expect(marathi.addTaskSelectDueDate, 'अखेरची तारीख निवडा'); - expect(marathi.addTaskPriority, 'प्राथमिकता'); - expect(marathi.addTaskAddTags, 'टॅग जोडा'); - expect(marathi.addTaskCancel, 'रद्द करा'); - expect(marathi.addTaskAdd, 'जोडा'); - expect(marathi.addTaskTimeInPast, 'निवडलेला वेळ भूतकाळात आहे.'); - expect(marathi.addTaskFieldCannotBeEmpty, - 'तुम्ही हा फील्ड रिकामा सोडू शकत नाही!'); - expect(marathi.addTaskTaskAddedSuccessfully, - 'काम यशस्वीपणे जोडले गेले. संपादित करण्यासाठी टॅप करा'); - expect(marathi.aboutPageGitHubLink, - 'या प्रकल्पाला सुधारण्यासाठी उत्सुक आहात का? आमच्या GitHub रिपॉझिटरीला भेट द्या.'); - expect(marathi.aboutPageProjectDescription, - 'या प्रकल्पाचे उद्दिष्ट Taskwarrior साठी एक अॅप तयार करणे आहे. हे आपल्या सर्व प्लॅटफॉर्मवरील कार्य व्यवस्थापन अॅप आहे. हे आपल्याला आपल्या कार्यांचे व्यवस्थापन करण्यात आणि त्यांना आपल्या गरजेनुसार फिल्टर करण्यात मदत करते.'); - expect(marathi.aboutPageAppBarTitle, 'विषयक'); - }); -} diff --git a/test/utils/language/sentence_manager_test.dart b/test/utils/language/sentence_manager_test.dart deleted file mode 100644 index bdfe5575..00000000 --- a/test/utils/language/sentence_manager_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/language/sentence_manager.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; -import 'package:taskwarrior/app/utils/language/english_sentences.dart'; -import 'package:taskwarrior/app/utils/language/hindi_sentences.dart'; -import 'package:taskwarrior/app/utils/language/marathi_sentences.dart'; -import 'package:taskwarrior/app/utils/language/french_sentences.dart'; -import 'package:taskwarrior/app/utils/language/spanish_sentences.dart'; -import 'package:taskwarrior/app/utils/language/bengali_sentences.dart'; - -void main() { - group('SentenceManager', () { - test('should return EnglishSentences when currentLanguage is English', () { - final manager = - SentenceManager(currentLanguage: SupportedLanguage.english); - expect(manager.sentences, isA()); - }); - - test('should return HindiSentences when currentLanguage is Hindi', () { - final manager = SentenceManager(currentLanguage: SupportedLanguage.hindi); - expect(manager.sentences, isA()); - }); - - test('should return MarathiSentences when currentLanguage is Marathi', () { - final manager = - SentenceManager(currentLanguage: SupportedLanguage.marathi); - expect(manager.sentences, isA()); - }); - - test('should return FrenchSentences when currentLanguage is French', () { - final manager = - SentenceManager(currentLanguage: SupportedLanguage.french); - expect(manager.sentences, isA()); - }); - - test('should return SpanishSentences when currentLanguage is Spanish', () { - final manager = - SentenceManager(currentLanguage: SupportedLanguage.spanish); - expect(manager.sentences, isA()); - }); - - test('should return BengaliSentences when currentLanguage is Bengali', () { - final manager = - SentenceManager(currentLanguage: SupportedLanguage.bengali); - expect(manager.sentences, isA()); - }); - }); -} diff --git a/test/utils/language/sentences_test.dart b/test/utils/language/sentences_test.dart deleted file mode 100644 index 7c073bdf..00000000 --- a/test/utils/language/sentences_test.dart +++ /dev/null @@ -1,180 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/language/english_sentences.dart'; -import 'package:taskwarrior/app/utils/language/hindi_sentences.dart'; -import 'package:taskwarrior/app/utils/language/marathi_sentences.dart'; -import 'package:taskwarrior/app/utils/language/french_sentences.dart'; -import 'package:taskwarrior/app/utils/language/spanish_sentences.dart'; -import 'package:taskwarrior/app/utils/language/bengali_sentences.dart'; - -void main() { - group('Sentences subclass implementations', () { - final sentenceClasses = [ - EnglishSentences(), - HindiSentences(), - MarathiSentences(), - FrenchSentences(), - SpanishSentences(), - BengaliSentences(), - ]; - - for (var sentences in sentenceClasses) { - test('should have all required getters for ${sentences.runtimeType}', () { - expect(sentences.helloWorld, isA()); - expect(sentences.homePageTitle, isA()); - expect(sentences.homePageLastModified, isA()); - expect(sentences.homePageDue, isA()); - expect(sentences.homePageTaskWarriorNotConfigured, isA()); - expect(sentences.homePageSetup, isA()); - expect(sentences.homePageFilter, isA()); - expect(sentences.homePageMenu, isA()); - expect(sentences.homePageExitApp, isA()); - expect(sentences.homePageAreYouSureYouWantToExit, isA()); - expect(sentences.homePageExit, isA()); - expect(sentences.homePageCancel, isA()); - expect(sentences.homePageClickOnTheBottomRightButtonToStartAddingTasks, - isA()); - expect(sentences.homePageSearchNotFound, isA()); - expect(sentences.settingsPageTitle, isA()); - expect(sentences.settingsPageSubtitle, isA()); - expect(sentences.settingsPageMovingDataToNewDirectory, isA()); - expect(sentences.settingsPageChangeDirectory, isA()); - expect(sentences.settingsPageSetToDefault, isA()); - expect(sentences.settingsPageSyncOnStartTitle, isA()); - expect(sentences.settingsPageSyncOnStartDescription, isA()); - expect( - sentences.settingsPageEnableSyncOnTaskCreateTitle, isA()); - expect(sentences.settingsPageEnableSyncOnTaskCreateDescription, - isA()); - expect(sentences.settingsPageHighlightTaskTitle, isA()); - expect(sentences.settingsPageHighlightTaskDescription, isA()); - expect(sentences.settingsPageEnable24hrFormatTitle, isA()); - expect( - sentences.settingsPageEnable24hrFormatDescription, isA()); - expect(sentences.taskchampionTileTitle, isA()); - expect(sentences.taskchampionTileDescription, isA()); - expect(sentences.settingsPageSelectLanguage, isA()); - expect(sentences.settingsPageToggleNativeLanguage, isA()); - expect(sentences.settingsPageSelectDirectoryTitle, isA()); - expect(sentences.settingsPageSelectDirectoryDescription, isA()); - expect(sentences.navDrawerProfile, isA()); - expect(sentences.navDrawerReports, isA()); - expect(sentences.navDrawerAbout, isA()); - expect(sentences.navDrawerSettings, isA()); - expect(sentences.ccsyncCredentials, isA()); - expect(sentences.deleteTaskTitle, isA()); - expect(sentences.deleteTaskConfirmation, isA()); - expect(sentences.deleteTaskWarning, isA()); - expect(sentences.navDrawerExit, isA()); - expect(sentences.detailPageDescription, isA()); - expect(sentences.detailPageStatus, isA()); - expect(sentences.detailPageEntry, isA()); - expect(sentences.detailPageModified, isA()); - expect(sentences.detailPageStart, isA()); - expect(sentences.detailPageEnd, isA()); - expect(sentences.detailPageDue, isA()); - expect(sentences.detailPageWait, isA()); - expect(sentences.detailPageUntil, isA()); - expect(sentences.detailPagePriority, isA()); - expect(sentences.detailPageProject, isA()); - expect(sentences.detailPageTags, isA()); - expect(sentences.detailPageUrgency, isA()); - expect(sentences.detailPageID, isA()); - expect(sentences.filterDrawerApplyFilters, isA()); - expect(sentences.filterDrawerHideWaiting, isA()); - expect(sentences.filterDrawerShowWaiting, isA()); - expect(sentences.filterDrawerPending, isA()); - expect(sentences.filterDrawerCompleted, isA()); - expect(sentences.filterDrawerFilterTagBy, isA()); - expect(sentences.filterDrawerAND, isA()); - expect(sentences.filterDrawerOR, isA()); - expect(sentences.filterDrawerSortBy, isA()); - expect(sentences.filterDrawerCreated, isA()); - expect(sentences.filterDrawerModified, isA()); - expect(sentences.filterDrawerStartTime, isA()); - expect(sentences.filterDrawerDueTill, isA()); - expect(sentences.filterDrawerPriority, isA()); - expect(sentences.filterDrawerProject, isA()); - expect(sentences.filterDrawerTags, isA()); - expect(sentences.filterDrawerUrgency, isA()); - expect(sentences.filterDrawerResetSort, isA()); - expect(sentences.filterDrawerStatus, isA()); - expect(sentences.reportsPageTitle, isA()); - expect(sentences.reportsPageCompleted, isA()); - expect(sentences.reportsPagePending, isA()); - expect(sentences.reportsPageTasks, isA()); - expect(sentences.reportsPageDaily, isA()); - expect(sentences.reportsPageDailyBurnDownChart, isA()); - expect(sentences.reportsPageDailyDayMonth, isA()); - expect(sentences.reportsPageWeekly, isA()); - expect(sentences.reportsPageWeeklyBurnDownChart, isA()); - expect(sentences.reportsPageWeeklyWeeksYear, isA()); - expect(sentences.reportsPageMonthly, isA()); - expect(sentences.reportsPageMonthlyBurnDownChart, isA()); - expect(sentences.reportsPageMonthlyMonthYear, isA()); - expect(sentences.reportsPageNoTasksFound, isA()); - expect(sentences.reportsPageAddTasksToSeeReports, isA()); - expect(sentences.profilePageProfile, isA()); - expect(sentences.profilePageProfiles, isA()); - expect(sentences.profilePageCurrentProfile, isA()); - expect(sentences.profilePageManageSelectedProfile, isA()); - expect(sentences.profilePageRenameAlias, isA()); - expect(sentences.profilePageConfigureTaskserver, isA()); - expect(sentences.profilePageExportTasks, isA()); - expect(sentences.profilePageCopyConfigToNewProfile, isA()); - expect(sentences.profilePageDeleteProfile, isA()); - expect(sentences.profilePageAddNewProfile, isA()); - expect(sentences.profilePageExportTasksDialogueTitle, isA()); - expect(sentences.profilePageExportTasksDialogueSubtitle, isA()); - expect(sentences.profilePageRenameAliasDialogueBoxTitle, isA()); - expect( - sentences.profilePageRenameAliasDialogueBoxNewAlias, isA()); - expect( - sentences.profilePageRenameAliasDialogueBoxCancel, isA()); - expect( - sentences.profilePageRenameAliasDialogueBoxSubmit, isA()); - expect( - sentences.manageTaskServerPageConfigureTaskserver, isA()); - expect(sentences.manageTaskServerPageConfigureTASKRC, isA()); - expect(sentences.manageTaskServerPageSetTaskRC, isA()); - expect(sentences.manageTaskServerPageConfigureYourCertificate, - isA()); - expect(sentences.manageTaskServerPageSelectCertificate, isA()); - expect(sentences.manageTaskServerPageConfigureTaskserverKey, - isA()); - expect(sentences.manageTaskServerPageSelectKey, isA()); - expect(sentences.manageTaskServerPageConfigureServerCertificate, - isA()); - expect( - sentences.manageTaskServerPageTaskRCFileIsVerified, isA()); - expect(sentences.manageTaskServerPageConfigureTaskRCDialogueBoxTitle, - isA()); - expect(sentences.manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle, - isA()); - expect( - sentences - .manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText, - isA()); - expect(sentences.manageTaskServerPageConfigureTaskRCDialogueBoxOr, - isA()); - expect( - sentences - .manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC, - isA()); - expect(sentences.addTaskTitle, isA()); - expect(sentences.addTaskEnterTask, isA()); - expect(sentences.addTaskDue, isA()); - expect(sentences.addTaskSelectDueDate, isA()); - expect(sentences.addTaskPriority, isA()); - expect(sentences.addTaskAddTags, isA()); - expect(sentences.addTaskCancel, isA()); - expect(sentences.addTaskAdd, isA()); - expect(sentences.addTaskTimeInPast, isA()); - expect(sentences.addTaskFieldCannotBeEmpty, isA()); - expect(sentences.addTaskTaskAddedSuccessfully, isA()); - expect(sentences.aboutPageGitHubLink, isA()); - expect(sentences.aboutPageProjectDescription, isA()); - expect(sentences.aboutPageAppBarTitle, isA()); - }); - } - }); -} diff --git a/test/utils/language/spanish_sentences_test.dart b/test/utils/language/spanish_sentences_test.dart deleted file mode 100644 index f51722c4..00000000 --- a/test/utils/language/spanish_sentences_test.dart +++ /dev/null @@ -1,178 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/language/spanish_sentences.dart'; - -void main() { - final spanish = SpanishSentences(); - - test('should provide correct Spanish translations', () { - expect(spanish.helloWorld, '¡Hola, mundo!'); - expect(spanish.homePageTitle, 'Página de inicio'); - expect(spanish.homePageLastModified, 'Última modificación'); - expect(spanish.homePageDue, 'Vencimiento'); - expect( - spanish.homePageTaskWarriorNotConfigured, 'TaskServer no configurado'); - expect(spanish.homePageSetup, 'Configuración'); - expect(spanish.homePageFilter, 'Filtro'); - expect(spanish.homePageMenu, 'Menú'); - expect(spanish.homePageExitApp, 'Salir de la aplicación'); - expect(spanish.homePageAreYouSureYouWantToExit, - '¿Estás seguro de que quieres salir de la aplicación?'); - expect(spanish.homePageExit, 'Salir'); - expect(spanish.homePageCancel, 'Cancelar'); - expect(spanish.homePageClickOnTheBottomRightButtonToStartAddingTasks, - 'Haz clic en el botón en la parte inferior derecha para comenzar a agregar tareas'); - expect(spanish.homePageSearchNotFound, - 'No se encontraron resultados para la búsqueda'); - expect(spanish.settingsPageTitle, 'Página de configuración'); - expect(spanish.settingsPageSubtitle, 'Configura tus preferencias'); - expect(spanish.settingsPageMovingDataToNewDirectory, - 'Moviendo datos a un nuevo directorio'); - expect(spanish.settingsPageSyncOnStartTitle, - 'Sincronizar datos automáticamente al inicio'); - expect( - spanish.settingsPageSyncOnStartDescription, 'Sincronizar al iniciar'); - expect(spanish.settingsPageEnableSyncOnTaskCreateTitle, - 'Habilitar sincronización automática al crear nuevas tareas'); - expect(spanish.settingsPageEnableSyncOnTaskCreateDescription, - 'Habilitar sincronización automática al crear nuevas tareas'); - expect(spanish.settingsPageHighlightTaskTitle, 'Resaltar tareas urgentes'); - expect(spanish.settingsPageHighlightTaskDescription, - 'Resaltar tareas que vencen en 1 día o están vencidas'); - expect(spanish.settingsPageEnable24hrFormatTitle, - 'Habilitar formato de 24 horas'); - expect(spanish.settingsPageEnable24hrFormatDescription, - 'Habilitar formato de 24 horas'); - expect(spanish.settingsPageSelectLanguage, 'Seleccionar idioma'); - expect(spanish.settingsPageToggleNativeLanguage, - 'Alternar entre idiomas nativos'); - expect(spanish.settingsPageSelectDirectoryTitle, 'Seleccionar directorio'); - expect(spanish.settingsPageSelectDirectoryDescription, - 'Selecciona el directorio donde se almacenan los datos de Taskwarrior\nDirectorio actual: '); - expect(spanish.settingsPageChangeDirectory, 'Cambiar directorio'); - expect(spanish.settingsPageSetToDefault, 'Restablecer a predeterminado'); - expect(spanish.navDrawerProfile, 'Perfil'); - expect(spanish.navDrawerReports, 'Informes'); - expect(spanish.navDrawerAbout, 'Acerca de'); - expect(spanish.navDrawerSettings, 'Configuración'); - expect(spanish.navDrawerExit, 'Salir'); - expect(spanish.detailPageDescription, 'Descripción'); - expect(spanish.detailPageStatus, 'Estado'); - expect(spanish.detailPageEntry, 'Entrada'); - expect(spanish.detailPageModified, 'Modificado'); - expect(spanish.detailPageStart, 'Inicio'); - expect(spanish.detailPageEnd, 'Fin'); - expect(spanish.detailPageDue, 'Vencimiento'); - expect(spanish.detailPageWait, 'Esperar'); - expect(spanish.detailPageUntil, 'Hasta'); - expect(spanish.detailPagePriority, 'Prioridad'); - expect(spanish.detailPageProject, 'Proyecto'); - expect(spanish.detailPageTags, 'Etiquetas'); - expect(spanish.detailPageUrgency, 'Urgencia'); - expect(spanish.detailPageID, 'ID'); - expect(spanish.filterDrawerApplyFilters, 'Aplicar filtros'); - expect(spanish.filterDrawerHideWaiting, 'Ocultar pendientes'); - expect(spanish.filterDrawerShowWaiting, 'Mostrar pendientes'); - expect(spanish.filterDrawerPending, 'Pendiente'); - expect(spanish.filterDrawerCompleted, 'Completado'); - expect(spanish.filterDrawerFilterTagBy, 'Filtrar por etiqueta'); - expect(spanish.filterDrawerAND, 'y'); - expect(spanish.filterDrawerOR, 'o'); - expect(spanish.filterDrawerSortBy, 'Ordenar por'); - expect(spanish.filterDrawerCreated, 'Creado'); - expect(spanish.filterDrawerModified, 'Modificado'); - expect(spanish.filterDrawerStartTime, 'Hora de inicio'); - expect(spanish.filterDrawerDueTill, 'Hasta vencimiento'); - expect(spanish.filterDrawerPriority, 'Prioridad'); - expect(spanish.filterDrawerProject, 'Proyecto'); - expect(spanish.filterDrawerTags, 'Etiquetas'); - expect(spanish.filterDrawerUrgency, 'Urgencia'); - expect(spanish.filterDrawerResetSort, 'Restablecer orden'); - expect(spanish.filterDrawerStatus, 'Estado'); - expect(spanish.reportsPageTitle, 'Informes'); - expect(spanish.reportsPageCompleted, 'Completado'); - expect(spanish.reportsPagePending, 'Pendiente'); - expect(spanish.reportsPageTasks, 'Tareas'); - expect(spanish.reportsPageDaily, 'Diario'); - expect(spanish.reportsPageDailyBurnDownChart, 'Gráfico de quema diario'); - expect(spanish.reportsPageDailyDayMonth, 'Día - Mes'); - expect(spanish.reportsPageWeekly, 'Semanal'); - expect(spanish.reportsPageWeeklyBurnDownChart, 'Gráfico de quema semanal'); - expect(spanish.reportsPageWeeklyWeeksYear, 'Semana - Año'); - expect(spanish.reportsPageMonthly, 'Mensual'); - expect(spanish.reportsPageMonthlyBurnDownChart, 'Gráfico de quema mensual'); - expect(spanish.reportsPageMonthlyMonthYear, 'Mes - Año'); - expect(spanish.reportsPageNoTasksFound, 'No se encontraron tareas'); - expect(spanish.reportsPageAddTasksToSeeReports, - 'Agrega tareas para ver informes'); - expect(spanish.taskchampionTileDescription, - 'Cambia la sincronización de Taskwarrior al servidor de sincronización CCSync o Taskchampion'); - expect(spanish.taskchampionTileTitle, 'Sincronización Taskchampion'); - expect(spanish.ccsyncCredentials, 'Credenciales de CCSync'); - expect(spanish.deleteTaskConfirmation, 'Eliminar tarea'); - expect(spanish.deleteTaskTitle, '¿Eliminar todas las tareas?'); - expect(spanish.deleteTaskWarning, - 'Esta acción es irreversible y eliminará todas las tareas almacenadas localmente.'); - expect(spanish.profilePageProfile, 'Perfil'); - expect(spanish.profilePageProfiles, 'Perfiles'); - expect(spanish.profilePageCurrentProfile, 'Perfil actual'); - expect(spanish.profilePageManageSelectedProfile, - 'Gestionar perfil seleccionado'); - expect(spanish.profilePageRenameAlias, 'Renombrar alias'); - expect(spanish.profilePageConfigureTaskserver, - 'Configurar servidor de tareas'); - expect(spanish.profilePageExportTasks, 'Exportar tareas'); - expect(spanish.profilePageCopyConfigToNewProfile, - 'Copiar configuración a un nuevo perfil'); - expect(spanish.profilePageDeleteProfile, 'Eliminar perfil'); - expect(spanish.profilePageAddNewProfile, 'Agregar nuevo perfil'); - expect(spanish.profilePageRenameAliasDialogueBoxTitle, 'Renombrar alias'); - expect(spanish.profilePageRenameAliasDialogueBoxNewAlias, 'Nuevo alias'); - expect(spanish.profilePageRenameAliasDialogueBoxCancel, 'Cancelar'); - expect(spanish.profilePageRenameAliasDialogueBoxSubmit, 'Enviar'); - expect( - spanish.profilePageExportTasksDialogueTitle, 'Formato de exportación'); - expect(spanish.profilePageExportTasksDialogueSubtitle, - 'Selecciona el formato de exportación'); - expect(spanish.manageTaskServerPageConfigureTaskserver, - 'Configurar servidor de tareas'); - expect(spanish.manageTaskServerPageConfigureTASKRC, 'Configurar TASKRC'); - expect(spanish.manageTaskServerPageSetTaskRC, 'Establecer TaskRC'); - expect(spanish.manageTaskServerPageConfigureYourCertificate, - 'Configura tu certificado'); - expect(spanish.manageTaskServerPageSelectCertificate, - 'Seleccionar certificado'); - expect(spanish.manageTaskServerPageConfigureTaskserverKey, - 'Configurar clave del servidor de tareas'); - expect(spanish.manageTaskServerPageSelectKey, 'Seleccionar clave'); - expect(spanish.manageTaskServerPageConfigureServerCertificate, - 'Configurar certificado del servidor'); - expect(spanish.manageTaskServerPageTaskRCFileIsVerified, - 'El archivo Task RC ha sido verificado'); - expect(spanish.manageTaskServerPageConfigureTaskRCDialogueBoxTitle, - 'Configurar TaskRC'); - expect(spanish.manageTaskServerPageConfigureTaskRCDialogueBoxSubtitle, - 'Pega el contenido de TaskRC o selecciona un archivo taskrc'); - expect(spanish.manageTaskServerPageConfigureTaskRCDialogueBoxInputFieldText, - 'Pega tu contenido TaskRC aquí'); - expect(spanish.manageTaskServerPageConfigureTaskRCDialogueBoxOr, 'o'); - expect(spanish.manageTaskServerPageConfigureTaskRCDialogueBoxSelectTaskRC, - 'Seleccionar archivo TaskRC'); - expect(spanish.addTaskTitle, 'Agregar tarea'); - expect(spanish.addTaskEnterTask, 'Ingresar tarea'); - expect(spanish.addTaskDue, 'Vencimiento'); - expect(spanish.addTaskSelectDueDate, 'Seleccionar fecha de vencimiento'); - expect(spanish.addTaskPriority, 'Prioridad'); - expect(spanish.addTaskAddTags, 'Agregar etiquetas'); - expect(spanish.addTaskCancel, 'Cancelar'); - expect(spanish.addTaskAdd, 'Agregar'); - expect( - spanish.addTaskTimeInPast, 'La hora seleccionada está en el pasado.'); - expect(spanish.addTaskFieldCannotBeEmpty, - '¡No puedes dejar este campo vacío!'); - expect(spanish.addTaskTaskAddedSuccessfully, - 'Tarea añadida con éxito. Toca para editar'); - expect(spanish.aboutPageGitHubLink, - '¿Desea mejorar este proyecto? Visite nuestro repositorio en GitHub.'); - expect(spanish.aboutPageAppBarTitle, 'Acerca de'); - }); -} diff --git a/test/utils/language/supported_language_test.dart b/test/utils/language/supported_language_test.dart deleted file mode 100644 index 070546db..00000000 --- a/test/utils/language/supported_language_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/language/supported_language.dart'; - -void main() { - group('SupportedLanguageExtension', () { - test('should return correct language code', () { - expect(SupportedLanguage.english.languageCode, 'en'); - expect(SupportedLanguage.hindi.languageCode, 'hi'); - expect(SupportedLanguage.marathi.languageCode, 'mr'); - expect(SupportedLanguage.french.languageCode, 'fr'); - expect(SupportedLanguage.spanish.languageCode, 'es'); - expect(SupportedLanguage.bengali.languageCode, 'bn'); - }); - - test('should return correct SupportedLanguage from code', () { - expect( - SupportedLanguageExtension.fromCode('en'), SupportedLanguage.english); - expect( - SupportedLanguageExtension.fromCode('hi'), SupportedLanguage.hindi); - expect( - SupportedLanguageExtension.fromCode('mr'), SupportedLanguage.marathi); - expect( - SupportedLanguageExtension.fromCode('fr'), SupportedLanguage.french); - expect( - SupportedLanguageExtension.fromCode('es'), SupportedLanguage.spanish); - expect( - SupportedLanguageExtension.fromCode('bn'), SupportedLanguage.bengali); - expect(SupportedLanguageExtension.fromCode('unknown'), null); - }); - }); -} diff --git a/test/utils/permissions/permissions_manager_test.dart b/test/utils/permissions/permissions_manager_test.dart deleted file mode 100644 index a4ce130f..00000000 --- a/test/utils/permissions/permissions_manager_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; -import 'package:mockito/mockito.dart'; -import 'package:permission_handler/permission_handler.dart'; -import 'package:taskwarrior/app/utils/permissions/permissions_manager.dart'; -import 'package:taskwarrior/app/utils/constants/permissions.dart'; - -import 'permissions_manager_test.mocks.dart'; - -@GenerateMocks([Permission]) -void main() { - group('PermissionsManager', () { - late MockPermission mockPermission; - - setUp(() { - WidgetsFlutterBinding.ensureInitialized(); - mockPermission = MockPermission(); - permissions.clear(); - permissions.add(mockPermission); - }); - test('requestAllPermissions handles permission denied', () async { - when(mockPermission.request()) - .thenAnswer((_) async => PermissionStatus.denied); - - await PermissionsManager.requestAllPermissions(); - - verify(mockPermission.request()).called(1); - }); - }); -} diff --git a/test/utils/permissions/permissions_manager_test.mocks.dart b/test/utils/permissions/permissions_manager_test.mocks.dart deleted file mode 100644 index 5b72aa54..00000000 --- a/test/utils/permissions/permissions_manager_test.mocks.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Mocks generated by Mockito 5.4.4 from annotations -// in taskwarrior/test/utils/permissions/permissions_manager_test.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:mockito/mockito.dart' as _i1; -import 'package:permission_handler_platform_interface/permission_handler_platform_interface.dart' - as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types -// ignore_for_file: subtype_of_sealed_class - -/// A class which mocks [Permission]. -/// -/// See the documentation for Mockito's code generation for more information. -// ignore: must_be_immutable -class MockPermission extends _i1.Mock implements _i2.Permission { - MockPermission() { - _i1.throwOnMissingStub(this); - } - - @override - int get value => (super.noSuchMethod( - Invocation.getter(#value), - returnValue: 0, - ) as int); -} diff --git a/test/utils/taskc/impl/codec_test.dart b/test/utils/taskc/impl/codec_test.dart deleted file mode 100644 index 835fb8db..00000000 --- a/test/utils/taskc/impl/codec_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'dart:typed_data'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskc/impl/codec.dart'; - -void main() { - group('Codec', () { - test('fold should combine bytes into an integer', () { - final bytes = [0, 0, 1, 2]; - final result = Codec.fold(bytes); - expect(result, 258); - }); - - test('unfold should split an integer into bytes', () { - const n = 258; - final result = Codec.unfold(n); - expect(result, [0, 0, 1, 2]); - }); - - test('decode should decode Uint8List to string', () { - final bytes = Uint8List.fromList([0, 0, 0, 9, 104, 101, 108, 108, 111]); - final result = Codec.decode(bytes); - expect(result, 'hello'); - }); - - test('decode should throw assertion error for invalid length', () { - final bytes = Uint8List.fromList([0, 0, 0, 4, 104, 101, 108, 108, 111]); - expect(() => Codec.decode(bytes), throwsAssertionError); - }); - - test('encode should encode string to Uint8List', () { - const string = 'hello'; - final result = Codec.encode(string); - expect(result, Uint8List.fromList([0, 0, 0, 9, 104, 101, 108, 108, 111])); - }); - - test('encode should handle empty string', () { - const string = ''; - final result = Codec.encode(string); - expect(result, Uint8List.fromList([0, 0, 0, 4])); - }); - }); -} diff --git a/test/utils/taskc/impl/message_test.dart b/test/utils/taskc/impl/message_test.dart deleted file mode 100644 index 327a4af0..00000000 --- a/test/utils/taskc/impl/message_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskc/impl/message.dart'; - -void main() { - group('TaskserverResponseException', () { - test('should create TaskserverResponseException with header', () { - final header = { - 'type': 'error', - 'code': '404', - }; - final exception = TaskserverResponseException(header); - expect(exception.header, header); - }); - - test( - 'should return formatted string representation of TaskserverResponseException', - () { - final header = { - 'type': 'error', - 'code': '404', - }; - final exception = TaskserverResponseException(header); - const expectedString = 'response.header = {\n' - ' "type": "error",\n' - ' "code": "404"\n' - '}'; - expect(exception.toString(), expectedString); - }); - }); - - group('EmptyResponseException', () { - test( - 'should return formatted string representation of EmptyResponseException', - () { - final exception = EmptyResponseException(); - const expectedString = 'The server returned an empty response. ' - 'Please review the server logs or contact administrator.\n' - '\n' - 'This may be an issue with the triple:\n' - '- taskd.certificate\n' - '- taskd.key\n' - '- \$TASKDDATA/ca.cert.pem'; - expect(exception.toString(), expectedString); - }); - }); -} diff --git a/test/utils/taskc/message_test.dart b/test/utils/taskc/message_test.dart deleted file mode 100644 index f7c69330..00000000 --- a/test/utils/taskc/message_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskc/message.dart'; -import 'package:taskwarrior/app/utils/taskserver/credentials.dart'; - -void main() { - group('message function', () { - test('should construct message with all parameters', () { - const credentials = - Credentials(org: 'TestOrg', user: 'TestUser', key: 'TestKey'); - final result = message( - client: 'TestClient', - type: 'TestType', - credentials: credentials, - payload: 'TestPayload', - ); - - expect(result, - 'client: TestClient\ntype: TestType\norg: TestOrg\nuser: TestUser\nkey: TestKey\nprotocol: v1\n\nTestPayload'); - }); - - test('should construct message without optional parameters', () { - final result = message( - type: 'TestType', - ); - - expect( - result, 'type: TestType\norg: \nuser: \nkey: \nprotocol: v1\n\nnull'); - }); - - test('should handle null client', () { - const credentials = - Credentials(org: 'TestOrg', user: 'TestUser', key: 'TestKey'); - final result = message( - type: 'TestType', - credentials: credentials, - payload: 'TestPayload', - ); - - expect(result, - 'type: TestType\norg: TestOrg\nuser: TestUser\nkey: TestKey\nprotocol: v1\n\nTestPayload'); - }); - - test('should handle null credentials', () { - final result = message( - client: 'TestClient', - type: 'TestType', - payload: 'TestPayload', - ); - - expect(result, - 'client: TestClient\ntype: TestType\norg: \nuser: \nkey: \nprotocol: v1\n\nTestPayload'); - }); - - test('should handle null payload', () { - const credentials = - Credentials(org: 'TestOrg', user: 'TestUser', key: 'TestKey'); - final result = message( - client: 'TestClient', - type: 'TestType', - credentials: credentials, - ); - - expect(result, - 'client: TestClient\ntype: TestType\norg: TestOrg\nuser: TestUser\nkey: TestKey\nprotocol: v1\n\nnull'); - }); - }); -} diff --git a/test/utils/taskc/payload_test.dart b/test/utils/taskc/payload_test.dart deleted file mode 100644 index c6ebfc01..00000000 --- a/test/utils/taskc/payload_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskc/payload.dart'; - -void main() { - group('Payload', () { - test('should create Payload instance with tasks and userKey', () { - final payload = Payload(tasks: ['task1', 'task2'], userKey: 'userKey123'); - expect(payload.tasks, ['task1', 'task2']); - expect(payload.userKey, 'userKey123'); - }); - - test('should create Payload instance from string', () { - const payloadString = 'task1\ntask2\nuserKey123'; - final payload = Payload.fromString(payloadString); - expect(payload.tasks, ['task1', 'task2']); - expect(payload.userKey, 'userKey123'); - }); - - test('should convert Payload instance to string', () { - final payload = Payload(tasks: ['task1', 'task2'], userKey: 'userKey123'); - final payloadString = payload.toString(); - expect(payloadString, 'task1\ntask2\nuserKey123'); - }); - - test('should handle Payload instance with null userKey', () { - final payload = Payload(tasks: ['task1', 'task2']); - expect(payload.userKey, isNull); - final payloadString = payload.toString(); - expect(payloadString, 'task1\ntask2'); - }); - - test('should handle Payload.fromString with empty userKey', () { - const payloadString = 'task1\ntask2\n'; - final payload = Payload.fromString(payloadString); - expect(payload.tasks, ['task1']); - expect(payload.userKey, 'task2'); - }); - - test('should handle Payload.toString with empty userKey', () { - final payload = Payload(tasks: ['task1', 'task2'], userKey: ''); - final payloadString = payload.toString(); - expect(payloadString, 'task1\ntask2'); - }); - }); -} diff --git a/test/utils/taskc/response_test.dart b/test/utils/taskc/response_test.dart deleted file mode 100644 index e2c694d4..00000000 --- a/test/utils/taskc/response_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskc/response.dart'; -import 'package:taskwarrior/app/utils/taskc/payload.dart'; - -void main() { - group('Response', () { - test('should create Response instance with header and payload', () { - final payload = Payload(tasks: ['task1', 'task2'], userKey: 'userKey123'); - final header = {'type': 'response', 'version': '1.0'}; - final response = Response(header: header, payload: payload); - - expect(response.header, header); - expect(response.payload, payload); - }); - - test('should create Response instance from string', () { - const responseString = - 'type: response\nversion: 1.0\n\n' 'task1\ntask2\nuserKey123'; - final response = Response.fromString(responseString); - - expect(response.header, { - 'type': 'response', - 'version': '1.0', - }); - expect(response.payload.tasks, ['task1', 'task2']); - expect(response.payload.userKey, 'userKey123'); - }); - - test('should handle Response.fromString with missing payload', () { - const responseString = 'type: response\nversion: 1.0\n\n'; - final response = Response.fromString(responseString); - - expect(response.header, { - 'type': 'response', - 'version': '1.0', - }); - expect(response.payload.tasks, []); - expect(response.payload.userKey, ''); - }); - - test('should handle Response.fromString with complex header', () { - const responseString = 'type: response\nversion: 1.0\nextra: info\n\n' - 'task1\ntask2\nuserKey123'; - final response = Response.fromString(responseString); - - expect(response.header, { - 'type': 'response', - 'version': '1.0', - 'extra': 'info', - }); - expect(response.payload.tasks, ['task1', 'task2']); - expect(response.payload.userKey, 'userKey123'); - }); - - test('should handle Response.fromString with empty header', () { - const responseString = '\n\n' 'task1\ntask2\nuserKey123'; - final response = Response.fromString(responseString); - - expect(response.header, {'': ''}); - expect(response.payload.tasks, ['task1', 'task2']); - expect(response.payload.userKey, 'userKey123'); - }); - }); -} diff --git a/test/utils/taskchampion/credentials_storage_test.dart b/test/utils/taskchampion/credentials_storage_test.dart deleted file mode 100644 index edf6e7f6..00000000 --- a/test/utils/taskchampion/credentials_storage_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; -import 'package:mockito/mockito.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart'; - -import 'credentials_storage_test.mocks.dart'; - -@GenerateMocks([SharedPreferences]) -void main() { - group('CredentialsStorage', () { - late MockSharedPreferences mockSharedPreferences; - - setUp(() { - mockSharedPreferences = MockSharedPreferences(); - }); - - test('should return null when encryption secret is not set', () async { - when(mockSharedPreferences.getString('encryptionSecret')) - .thenReturn(null); - SharedPreferences.setMockInitialValues({}); - - final encryptionSecret = await CredentialsStorage.getEncryptionSecret(); - expect(encryptionSecret, isNull); - }); - - test('should return encryption secret when it is set', () async { - when(mockSharedPreferences.getString('encryptionSecret')) - .thenReturn('secret123'); - SharedPreferences.setMockInitialValues({ - 'encryptionSecret': 'secret123', - }); - - final encryptionSecret = await CredentialsStorage.getEncryptionSecret(); - expect(encryptionSecret, 'secret123'); - }); - - test('should return null when client ID is not set', () async { - when(mockSharedPreferences.getString('clientId')).thenReturn(null); - SharedPreferences.setMockInitialValues({}); - - final clientId = await CredentialsStorage.getClientId(); - expect(clientId, isNull); - }); - - test('should return client ID when it is set', () async { - when(mockSharedPreferences.getString('clientId')).thenReturn('client123'); - SharedPreferences.setMockInitialValues({ - 'clientId': 'client123', - }); - - final clientId = await CredentialsStorage.getClientId(); - expect(clientId, 'client123'); - }); - }); -} diff --git a/test/utils/taskchampion/credentials_storage_test.mocks.dart b/test/utils/taskchampion/credentials_storage_test.mocks.dart deleted file mode 100644 index 46fb4569..00000000 --- a/test/utils/taskchampion/credentials_storage_test.mocks.dart +++ /dev/null @@ -1,203 +0,0 @@ -// Mocks generated by Mockito 5.4.4 from annotations -// in taskwarrior/test/utils/taskchampion/credentials_storage_test.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; - -import 'package:mockito/mockito.dart' as _i1; -import 'package:shared_preferences/shared_preferences.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types -// ignore_for_file: subtype_of_sealed_class - -/// A class which mocks [SharedPreferences]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockSharedPreferences extends _i1.Mock implements _i2.SharedPreferences { - MockSharedPreferences() { - _i1.throwOnMissingStub(this); - } - - @override - Set getKeys() => (super.noSuchMethod( - Invocation.method( - #getKeys, - [], - ), - returnValue: {}, - ) as Set); - - @override - Object? get(String? key) => (super.noSuchMethod(Invocation.method( - #get, - [key], - )) as Object?); - - @override - bool? getBool(String? key) => (super.noSuchMethod(Invocation.method( - #getBool, - [key], - )) as bool?); - - @override - int? getInt(String? key) => (super.noSuchMethod(Invocation.method( - #getInt, - [key], - )) as int?); - - @override - double? getDouble(String? key) => (super.noSuchMethod(Invocation.method( - #getDouble, - [key], - )) as double?); - - @override - String? getString(String? key) => (super.noSuchMethod(Invocation.method( - #getString, - [key], - )) as String?); - - @override - bool containsKey(String? key) => (super.noSuchMethod( - Invocation.method( - #containsKey, - [key], - ), - returnValue: false, - ) as bool); - - @override - List? getStringList(String? key) => - (super.noSuchMethod(Invocation.method( - #getStringList, - [key], - )) as List?); - - @override - _i3.Future setBool( - String? key, - bool? value, - ) => - (super.noSuchMethod( - Invocation.method( - #setBool, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); - - @override - _i3.Future setInt( - String? key, - int? value, - ) => - (super.noSuchMethod( - Invocation.method( - #setInt, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); - - @override - _i3.Future setDouble( - String? key, - double? value, - ) => - (super.noSuchMethod( - Invocation.method( - #setDouble, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); - - @override - _i3.Future setString( - String? key, - String? value, - ) => - (super.noSuchMethod( - Invocation.method( - #setString, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); - - @override - _i3.Future setStringList( - String? key, - List? value, - ) => - (super.noSuchMethod( - Invocation.method( - #setStringList, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); - - @override - _i3.Future remove(String? key) => (super.noSuchMethod( - Invocation.method( - #remove, - [key], - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); - - @override - _i3.Future commit() => (super.noSuchMethod( - Invocation.method( - #commit, - [], - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); - - @override - _i3.Future clear() => (super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); - - @override - _i3.Future reload() => (super.noSuchMethod( - Invocation.method( - #reload, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); -} diff --git a/test/utils/taskchampion/taskchampion_test.dart b/test/utils/taskchampion/taskchampion_test.dart deleted file mode 100644 index 0e0fddb1..00000000 --- a/test/utils/taskchampion/taskchampion_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:taskwarrior/app/modules/manage_task_champion_creds/controllers/manage_task_champion_creds_controller.dart'; - -void main() { - TestWidgetsFlutterBinding.ensureInitialized(); - - group('ManageTaskChampionCredsController Test', () { - late ManageTaskChampionCredsController controller; - - setUp(() { - // Start with empty SharedPreferences - SharedPreferences.setMockInitialValues({}); - controller = ManageTaskChampionCredsController(); - }); - - test('should load empty credentials initially', () async { - // Wait for onInit() to complete - await Future.delayed(Duration(milliseconds: 10)); - - expect(controller.encryptionSecretController.text, ''); - expect(controller.clientIdController.text, ''); - expect(controller.ccsyncBackendUrlController.text, ''); - }); - - test('should load existing credentials', () async { - SharedPreferences.setMockInitialValues({ - 'encryptionSecret': 'mysecret', - 'clientId': 'client123', - 'ccsyncBackendUrl': 'https://example.com', - }); - - controller = ManageTaskChampionCredsController(); - await controller.loadCredentials(); - expect(controller.encryptionSecretController.text, 'mysecret'); - expect(controller.clientIdController.text, 'client123'); - expect(controller.ccsyncBackendUrlController.text, 'https://example.com'); - }); - - test('should save credentials', () async { - controller.encryptionSecretController.text = 'secret123'; - controller.clientIdController.text = 'clientABC'; - controller.ccsyncBackendUrlController.text = 'https://backend.url'; - - await controller.saveCredentials(); - - final prefs = await SharedPreferences.getInstance(); - - expect(prefs.getString('encryptionSecret'), 'secret123'); - expect(prefs.getString('clientId'), 'clientABC'); - expect(prefs.getString('ccsyncBackendUrl'), 'https://backend.url'); - }); - }); -} diff --git a/test/utils/taskfunctions/comparator_test.dart b/test/utils/taskfunctions/comparator_test.dart deleted file mode 100644 index 5957beee..00000000 --- a/test/utils/taskfunctions/comparator_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/json/task.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/comparator.dart'; - -void main() { - group('compareTasks', () { - Task createTask( - {DateTime? entry, - DateTime? modified, - DateTime? start, - DateTime? due, - String? priority, - String? project, - List? tags}) { - return Task((b) => b - ..uuid = '1' - ..description = 'Task' - ..entry = entry ?? DateTime.now() - ..modified = modified - ..start = start - ..due = due - ..priority = priority - ..project = project - ..status = 'pending'); - } - - test('should compare tasks by Created date', () { - final task1 = createTask(entry: DateTime(2022, 1, 1)); - final task2 = createTask(entry: DateTime(2023, 1, 1)); - - final comparator = compareTasks('Created'); - expect(comparator(task1, task2), lessThan(0)); - expect(comparator(task2, task1), greaterThan(0)); - }); - - test('should compare tasks by Modified date', () { - final task1 = createTask(modified: DateTime(2022, 1, 1)); - final task2 = createTask(modified: DateTime(2023, 1, 1)); - - final comparator = compareTasks('Modified'); - expect(comparator(task1, task2), lessThan(0)); - expect(comparator(task2, task1), greaterThan(0)); - expect(comparator(task1, task1), equals(0)); - }); - - test('should compare tasks by Start Time', () { - final task1 = createTask(start: DateTime(2022, 1, 1)); - final task2 = createTask(start: DateTime(2023, 1, 1)); - - final comparator = compareTasks('Start Time'); - expect(comparator(task1, task2), lessThan(0)); - expect(comparator(task2, task1), greaterThan(0)); - }); - - test('should compare tasks by Due till', () { - final task1 = createTask(due: DateTime(2022, 1, 1)); - final task2 = createTask(due: DateTime(2023, 1, 1)); - - final comparator = compareTasks('Due till'); - expect(comparator(task1, task2), lessThan(0)); - expect(comparator(task2, task1), greaterThan(0)); - }); - - test('should compare tasks by Priority', () { - final task1 = createTask(priority: 'H'); - final task2 = createTask(priority: 'L'); - - final comparator = compareTasks('Priority'); - expect(comparator(task1, task2), greaterThan(0)); - expect(comparator(task2, task1), lessThan(0)); - }); - - test('should compare tasks by Project', () { - final task1 = createTask(project: 'ProjectA'); - final task2 = createTask(project: 'ProjectB'); - - final comparator = compareTasks('Project'); - expect(comparator(task1, task2), lessThan(0)); - expect(comparator(task2, task1), greaterThan(0)); - }); - - test('should compare tasks by Tags', () { - final task1 = createTask(tags: ['Tag1', 'Tag2']); - final task2 = createTask(tags: ['Tag1', 'Tag3']); - - final comparator = compareTasks('Tags'); - expect(comparator(task1, task2), 0); - }); - - test('should compare tasks by Urgency', () { - final task1 = createTask(); - final task2 = createTask(); - - final comparator = compareTasks('Urgency'); - expect(comparator(task1, task2), equals(0)); - }); - - test('should return 1 for unknown column', () { - final task1 = createTask(); - final task2 = createTask(); - - final comparator = compareTasks('Unknown'); - expect(comparator(task1, task2), equals(1)); - }); - }); -} diff --git a/test/utils/taskfunctions/datetime_differences_test.dart b/test/utils/taskfunctions/datetime_differences_test.dart deleted file mode 100644 index 9e47a0c0..00000000 --- a/test/utils/taskfunctions/datetime_differences_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/datetime_differences.dart'; - -void main() { - group('DateTime Differences', () { - test('age function should return correct string for years', () { - final now = DateTime.now(); - final dt = now.subtract(const Duration(days: 2 * 365)); - expect(age(dt), '2y '); - }); - - test('age function should return correct string for months', () { - final now = DateTime.now(); - final dt = now.subtract(const Duration(days: 2 * 30)); - expect(age(dt), '2mo '); - }); - - test('age function should return correct string for weeks', () { - final now = DateTime.now(); - final dt = now.subtract(const Duration(days: 2 * 7)); - expect(age(dt), '2w '); - }); - - test('age function should return correct string for days', () { - final now = DateTime.now(); - final dt = now.subtract(const Duration(days: 2)); // 2 days - expect(age(dt), '2d '); - }); - - test('age function should return correct string for hours', () { - final now = DateTime.now(); - final dt = now.subtract(const Duration(hours: 2)); // 2 hours - expect(age(dt), '2h '); - }); - - test('age function should return correct string for minutes', () { - final now = DateTime.now(); - final dt = now.subtract(const Duration(minutes: 2)); // 2 minutes - expect(age(dt), '2min '); - }); - - test('age function should return correct string for seconds', () { - final now = DateTime.now(); - final dt = now.subtract(const Duration(seconds: 2)); // 2 seconds - expect(age(dt), '2s '); - }); - - test('when function should return correct string for future dates', () { - final now = DateTime.now(); - final dt = now.add(const Duration(days: 2)); // 2 days from now - expect(when(dt), '1d '); - }); - - test( - 'difference function should return correct string for various durations', - () { - expect(difference(const Duration(days: 2 * 365)), '2y '); - expect(difference(const Duration(days: 2 * 30)), '2mo '); - expect(difference(const Duration(days: 2 * 7)), '2w '); - expect(difference(const Duration(days: 2)), '2d '); - expect(difference(const Duration(hours: 2)), '2h '); - expect(difference(const Duration(minutes: 2)), '2min '); - expect(difference(const Duration(seconds: 2)), '2s '); - - expect(difference(const Duration(days: -2)), '2d ago '); - expect(difference(const Duration(hours: -2)), '2h ago '); - expect(difference(const Duration(minutes: -2)), '2min ago '); - expect(difference(const Duration(seconds: -2)), '2s ago '); - }); - }); -} diff --git a/test/utils/taskfunctions/draft_test.dart b/test/utils/taskfunctions/draft_test.dart deleted file mode 100644 index 70ee6ece..00000000 --- a/test/utils/taskfunctions/draft_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/draft.dart'; - -void main() { - group('Draft', () { - late Task originalTask; - late Draft draft; - - setUp(() { - originalTask = Task((b) => b - ..uuid = '1' - ..description = 'Original Task' - ..status = 'pending' - ..entry = DateTime.now()); - draft = Draft(originalTask); - }); - - test('should initialize with original task', () { - expect(draft.original, originalTask); - expect(draft.draft, originalTask); - }); - - test('should update draft with new values', () { - draft.set('description', 'Updated Task'); - expect(draft.draft.description, 'Updated Task'); - }); - - test('should set start and end dates based on status', () { - final now = DateTime.now(); - - draft.set('status', 'completed'); - expect(draft.draft.status, 'completed'); - expect(draft.draft.start, originalTask.start); - expect(draft.draft.end?.isAfter(now), isTrue); - - draft.set('status', 'pending'); - expect(draft.draft.status, 'pending'); - expect(draft.draft.end, isNull); - }); - }); -} diff --git a/test/utils/taskfunctions/modify_test.dart b/test/utils/taskfunctions/modify_test.dart deleted file mode 100644 index 154a4072..00000000 --- a/test/utils/taskfunctions/modify_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/modify.dart'; - -void main() { - group('Modify', () { - late Task originalTask; - late Modify modify; - late Task Function(String) getTask; - late void Function(Task) mergeTask; - late String uuid; - - setUp(() { - uuid = '1'; - originalTask = Task((b) => b - ..uuid = uuid - ..description = 'Original Task' - ..status = 'pending' - ..entry = DateTime.now()); - - getTask = (String id) => originalTask; - mergeTask = (Task task) { - originalTask = task; - }; - - modify = Modify(getTask: getTask, mergeTask: mergeTask, uuid: uuid); - }); - - test('should initialize with original task', () { - expect(modify.draft, originalTask); - }); - - test('should update draft with new values', () { - modify.set('description', 'Updated Task'); - expect(modify.draft.description, 'Updated Task'); - }); - - test('should save changes correctly', () { - final now = DateTime.now(); - modify.set('description', 'Updated Task'); - modify.save(modified: () => now); - - expect(modify.draft.description, 'Updated Task'); - expect(modify.draft.modified, now); - }); - }); -} diff --git a/test/utils/taskfunctions/patch_test.dart b/test/utils/taskfunctions/patch_test.dart deleted file mode 100644 index 6f0d2cc3..00000000 --- a/test/utils/taskfunctions/patch_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/patch.dart'; -import 'package:built_collection/built_collection.dart'; - -void main() { - group('patch', () { - late Task originalTask; - - setUp(() { - originalTask = Task((b) => b - ..uuid = '1' - ..description = 'Original Task' - ..status = 'pending' - ..entry = DateTime.now() - ..tags = ListBuilder(['tag1', 'tag2'])); - }); - - test('should update description', () { - final updatedTask = patch(originalTask, {'description': 'Updated Task'}); - expect(updatedTask.description, 'Updated Task'); - }); - - test('should update status', () { - final updatedTask = patch(originalTask, {'status': 'completed'}); - expect(updatedTask.status, 'completed'); - }); - - test('should update start date', () { - final newStart = DateTime.now().add(const Duration(days: 1)); - final updatedTask = patch(originalTask, {'start': newStart}); - expect(updatedTask.start, newStart); - }); - - test('should update end date', () { - final newEnd = DateTime.now().add(const Duration(days: 1)); - final updatedTask = patch(originalTask, {'end': newEnd}); - expect(updatedTask.end, newEnd); - }); - - test('should update due date', () { - final newDue = DateTime.now().add(const Duration(days: 1)); - final updatedTask = patch(originalTask, {'due': newDue}); - expect(updatedTask.due, newDue); - }); - - test('should update wait date', () { - final newWait = DateTime.now().add(const Duration(days: 1)); - final updatedTask = patch(originalTask, {'wait': newWait}); - expect(updatedTask.wait, newWait); - }); - - test('should update until date', () { - final newUntil = DateTime.now().add(const Duration(days: 1)); - final updatedTask = patch(originalTask, {'until': newUntil}); - expect(updatedTask.until, newUntil); - }); - - test('should update modified date', () { - final newModified = DateTime.now().add(const Duration(days: 1)); - final updatedTask = patch(originalTask, {'modified': newModified}); - expect(updatedTask.modified, newModified); - }); - - test('should update priority', () { - final updatedTask = patch(originalTask, {'priority': 'H'}); - expect(updatedTask.priority, 'H'); - }); - - test('should update project', () { - final updatedTask = patch(originalTask, {'project': 'New Project'}); - expect(updatedTask.project, 'New Project'); - }); - - test('should update tags', () { - final newTags = ListBuilder(['tag3', 'tag4']); - final updatedTask = patch(originalTask, {'tags': newTags}); - expect(updatedTask.tags?.rebuild((b) => b).toList(), ['tag3', 'tag4']); - }); - }); -} diff --git a/test/utils/taskfunctions/profiles_test.dart b/test/utils/taskfunctions/profiles_test.dart deleted file mode 100644 index 4d0cc664..00000000 --- a/test/utils/taskfunctions/profiles_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/profiles.dart'; - -void main() { - late Directory baseDir; - late Profiles profiles; - - setUp(() { - baseDir = Directory.systemTemp.createTempSync(); - profiles = Profiles(baseDir); - }); - - tearDown(() { - baseDir.deleteSync(recursive: true); - }); - - test('addProfile creates a new profile with alias and creation date', () { - var profileId = profiles.addProfile(); - var profileDir = Directory('${baseDir.path}/profiles/$profileId'); - expect(profileDir.existsSync(), isTrue); - expect(File('${profileDir.path}/created').existsSync(), isTrue); - expect(File('${profileDir.path}/alias').readAsStringSync(), 'New Alias'); - }); - - test('copyConfigToNewProfile copies config files to new profile', () { - var originalProfile = profiles.addProfile(); - var configFiles = [ - '.taskrc', - '.task/ca.cert.pem', - '.task/first_last.cert.pem', - '.task/first_last.key.pem', - '.task/server.cert.pem', - 'taskd.ca', - 'taskd.certificate', - 'taskd.key', - ]; - - for (var file in configFiles) { - var filePath = '${baseDir.path}/profiles/$originalProfile/$file'; - File(filePath).createSync(recursive: true); - } - - profiles.copyConfigToNewProfile(originalProfile); - var newProfile = profiles.listProfiles().last; - - for (var file in configFiles) { - var filePath = '${baseDir.path}/profiles/$newProfile/$file'; - expect(File(filePath).existsSync(), isTrue); - } - }); - - test('listProfiles returns sorted list of profile IDs', () { - var profile1 = profiles.addProfile(); - var profile2 = profiles.addProfile(); - expect(profiles.listProfiles(), [profile1, profile2]); - }); - - test('deleteProfile removes profile directory', () { - var profile = profiles.addProfile(); - profiles.deleteProfile(profile); - expect( - Directory('${baseDir.path}/profiles/$profile').existsSync(), isFalse); - }); - - test('setAlias and getAlias set and get the alias for a profile', () { - var profile = profiles.addProfile(); - profiles.setAlias(profile: profile, alias: 'Test Alias'); - expect(profiles.getAlias(profile), 'Test Alias'); - }); - - test( - 'setCurrentProfile and getCurrentProfile set and get the current profile', - () { - var profile = profiles.addProfile(); - profiles.setCurrentProfile(profile); - expect(profiles.getCurrentProfile(), profile); - }); - - test('getCurrentStorage returns storage for current profile', () { - var profile = profiles.addProfile(); - profiles.setCurrentProfile(profile); - expect(profiles.getCurrentStorage()?.profile.path, - '${baseDir.path}/profiles/$profile'); - }); - - test('getStorage returns storage for specified profile', () { - var profile = profiles.addProfile(); - expect(profiles.getStorage(profile).profile.path, - '${baseDir.path}/profiles/$profile'); - }); -} diff --git a/test/utils/taskfunctions/projects_test.dart b/test/utils/taskfunctions/projects_test.dart deleted file mode 100644 index b518a9fc..00000000 --- a/test/utils/taskfunctions/projects_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/projects.dart'; - -void main() { - group('Project Utils', () { - test('projectPath returns correct path', () { - var project = 'a.b.c'; - var expectedPath = ['a.b.c', 'a.b', 'a']; - expect(projectPath(project), expectedPath); - }); - - test('ancestor returns correct ancestor', () { - expect(ancestor('a.b.c', 0), 'a.b.c'); - expect(ancestor('a.b.c', 1), 'a.b'); - expect(ancestor('a.b.c', 2), 'a'); - expect(ancestor('a.b.c', 3), null); - }); - - test('ProjectNode toMap returns correct map', () { - var node = ProjectNode(5) - ..parent = 'parent' - ..children = {'child1', 'child2'} - ..subtasks = 10; - var expectedMap = { - 'parent': 'parent', - 'children': ['child1', 'child2'], - 'tasks': 5, - 'subtasks': 10, - }; - expect(node.toMap(), expectedMap); - }); - - test('sparseDecoratedProjectTree returns correct tree', () { - var projects = {'a.b.c': 5, 'a.b.d': 3, 'a.e': 2}; - var tree = sparseDecoratedProjectTree(projects); - - expect(tree['a']!.tasks, 0); - expect(tree['a']!.subtasks, 10); - expect(tree['a']!.children, {'a.b', 'a.e'}); - - expect(tree['a.b']!.tasks, 0); - expect(tree['a.b']!.subtasks, 8); - expect(tree['a.b']!.children, {'a.b.c', 'a.b.d'}); - expect(tree['a.b']!.parent, 'a'); - - expect(tree['a.b.c']!.tasks, 5); - expect(tree['a.b.c']!.subtasks, 5); - expect(tree['a.b.c']!.children, []); - expect(tree['a.b.c']!.parent, 'a.b'); - - expect(tree['a.b.d']!.tasks, 3); - expect(tree['a.b.d']!.subtasks, 3); - expect(tree['a.b.d']!.children, []); - expect(tree['a.b.d']!.parent, 'a.b'); - - expect(tree['a.e']!.tasks, 2); - expect(tree['a.e']!.subtasks, 2); - expect(tree['a.e']!.children, []); - expect(tree['a.e']!.parent, 'a'); - }); - }); -} diff --git a/test/utils/taskfunctions/query_test.dart b/test/utils/taskfunctions/query_test.dart deleted file mode 100644 index 9c11e348..00000000 --- a/test/utils/taskfunctions/query_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/query.dart'; - -void main() { - late Directory queryStorage; - late Query query; - - setUp(() { - queryStorage = Directory.systemTemp.createTempSync(); - query = Query(queryStorage); - }); - - tearDown(() { - queryStorage.deleteSync(recursive: true); - }); - - test('setSelectedSort and getSelectedSort', () { - query.setSelectedSort('priority+'); - expect(query.getSelectedSort(), 'priority+'); - }); - - test('getSelectedSort default value', () { - expect(query.getSelectedSort(), 'urgency+'); - }); - - test('togglePendingFilter and getPendingFilter', () { - expect(query.getPendingFilter(), true); - query.togglePendingFilter(); - expect(query.getPendingFilter(), false); - query.togglePendingFilter(); - expect(query.getPendingFilter(), true); - }); - - test('toggleWaitingFilter and getWaitingFilter', () { - expect(query.getWaitingFilter(), true); - query.toggleWaitingFilter(); - expect(query.getWaitingFilter(), false); - query.toggleWaitingFilter(); - expect(query.getWaitingFilter(), true); - }); - - test('toggleProjectFilter and projectFilter', () { - expect(query.projectFilter(), ''); - query.toggleProjectFilter('Project1'); - expect(query.projectFilter(), 'Project1'); - query.toggleProjectFilter('Project1'); - expect(query.projectFilter(), ''); - }); - - test('toggleTagUnion and tagUnion', () { - expect(query.tagUnion(), false); - query.toggleTagUnion(); - expect(query.tagUnion(), true); - query.toggleTagUnion(); - expect(query.tagUnion(), false); - }); - - test('toggleTagFilter and getSelectedTags', () { - expect(query.getSelectedTags(), {}); - query.toggleTagFilter('tag1'); - expect(query.getSelectedTags(), {'+tag1'}); - query.toggleTagFilter('tag1'); - expect(query.getSelectedTags(), {'-tag1'}); - query.toggleTagFilter('tag2'); - expect(query.getSelectedTags(), {'-tag1', '+tag2'}); - query.toggleTagFilter('tag2'); - expect(query.getSelectedTags(), {'-tag1', '-tag2'}); - }); -} diff --git a/test/utils/taskfunctions/tags_test.dart b/test/utils/taskfunctions/tags_test.dart deleted file mode 100644 index 4e44c9c3..00000000 --- a/test/utils/taskfunctions/tags_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/tags.dart'; -import 'package:built_collection/built_collection.dart'; - -void main() { - group('Tags Utils', () { - late Task task1; - late Task task2; - late Task task3; - - setUp(() { - task1 = Task((b) => b - ..uuid = '1' - ..description = 'Task 1' - ..status = 'pending' - ..entry = DateTime.parse('2023-12-01T12:00:00Z') - ..tags = ListBuilder(['tag1', 'tag2']) - ..modified = DateTime.parse('2023-12-01T12:00:00Z')); - - task2 = Task((b) => b - ..uuid = '2' - ..description = 'Task 2' - ..status = 'pending' - ..entry = DateTime.parse('2023-12-01T12:00:00Z') - ..tags = ListBuilder(['tag2', 'tag3']) - ..modified = DateTime.parse('2023-12-02T12:00:00Z')); - - task3 = Task((b) => b - ..uuid = '3' - ..description = 'Task 3' - ..status = 'pending' - ..entry = DateTime.parse('2023-12-01T12:00:00Z') - ..tags = ListBuilder(['tag1', 'tag3']) - ..modified = DateTime.parse('2023-12-03T12:00:00Z')); - }); - - test('tagSet returns correct set of tags', () { - var tasks = [task1, task2, task3]; - var expectedTags = {'tag1', 'tag2', 'tag3'}; - expect(tagSet(tasks), expectedTags); - }); - - test('tagFrequencies returns correct tag frequencies', () { - var tasks = [task1, task2, task3]; - var expectedFrequencies = { - 'tag1': 2, - 'tag2': 2, - 'tag3': 2, - }; - expect(tagFrequencies(tasks), expectedFrequencies); - }); - - test('tagsLastModified returns correct last modified dates for tags', () { - var tasks = [task1, task2, task3]; - var expectedLastModified = { - 'tag1': DateTime.parse('2023-12-03T12:00:00Z'), - 'tag2': DateTime.parse('2023-12-02T12:00:00Z'), - 'tag3': DateTime.parse('2023-12-03T12:00:00Z'), - }; - expect(tagsLastModified(tasks), expectedLastModified); - }); - }); -} diff --git a/test/utils/taskfunctions/taskparser_test.dart b/test/utils/taskfunctions/taskparser_test.dart deleted file mode 100644 index 0c3b4768..00000000 --- a/test/utils/taskfunctions/taskparser_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/taskparser.dart'; - -void main() { - group('Task Parser', () { - test('taskParser correctly parses description', () { - var taskString = 'This is a task description'; - var task = taskParser(taskString); - expect(task.description, 'This is a task description'); - expect(task.status, 'pending'); - }); - - test('taskParser throws FormatException for empty description', () { - var taskString = '+tag1 +tag2'; - expect(() => taskParser(taskString), throwsFormatException); - }); - - test('taskParser correctly parses tags', () { - var taskString = '+tag1 +tag2 This is a task description'; - var task = taskParser(taskString); - expect(task.tags, containsAll(['tag1', 'tag2'])); - expect(task.description, 'This is a task description'); - }); - - test('taskParser correctly parses attributes', () { - var taskString = - 'status:completed project:Project1 priority:H due:2024-12-25 wait:2024-12-20 until:2024-12-30 This is a task description'; - var task = taskParser(taskString); - expect(task.status, 'completed'); - expect(task.project, 'Project1'); - expect(task.priority, 'H'); - expect(task.description, 'This is a task description'); - }); - - test('taskParser handles mixed input', () { - var taskString = - 'status:completed +tag1 +tag2 This is a task description project:Project1'; - var task = taskParser(taskString); - expect(task.status, 'completed'); - expect(task.tags, containsAll(['tag1', 'tag2'])); - expect(task.description, 'This is a task description'); - expect(task.project, 'Project1'); - }); - - test('taskParser handles single quotes in attributes', () { - var taskString = - "status:'completed' project:'Project1' This is a task description"; - var task = taskParser(taskString); - expect(task.status, 'completed'); - expect(task.project, 'Project1'); - expect(task.description, 'This is a task description'); - }); - - test('taskParser assigns unique UUID and timestamps', () { - var taskString = 'This is a task description'; - var task = taskParser(taskString); - expect(task.uuid, isNotEmpty); - expect(task.entry, isNotNull); - expect(task.start, isNotNull); - expect(task.modified, isNotNull); - }); - }); -} diff --git a/test/utils/taskfunctions/urgency_test.dart b/test/utils/taskfunctions/urgency_test.dart deleted file mode 100644 index f02adb31..00000000 --- a/test/utils/taskfunctions/urgency_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/models/models.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/urgency.dart'; -import 'package:built_collection/built_collection.dart'; - -void main() { - group('Urgency Utils', () { - late Task task; - - setUp(() { - task = Task((b) => b - ..uuid = '1' - ..description = 'Test Task' - ..entry = DateTime.now().subtract(const Duration(days: 30)) - ..modified = DateTime.now() - ..status = 'pending' - ..priority = 'M' - ..tags = ListBuilder(['next']) - ..due = DateTime.now().subtract( - const Duration(days: 8)) // Set due date to 8 days in the past - ..scheduled = DateTime.now().subtract(const Duration(days: 2)) - ..wait = DateTime.now().add(const Duration(days: 1)) - ..project = 'Project1'); - }); - - test('formatUrgency formats urgency correctly', () { - expect(formatUrgency(15.0), '15'); - expect(formatUrgency(15.12345), '15.1'); - expect(formatUrgency(15.100), '15.1'); - expect(formatUrgency(15.10), '15.1'); - }); - - test('urgencyProject calculates project urgency', () { - expect(urgencyProject(task), 1.0); - }); - - test('urgencyScheduled calculates scheduled urgency', () { - expect(urgencyScheduled(task), 1.0); - }); - - test('urgencyWaiting calculates waiting urgency', () { - expect(urgencyWaiting(task), 1.0); - task = task.rebuild( - (b) => b..wait = DateTime.now().subtract(const Duration(days: 1))); - expect(urgencyWaiting(task), 0.0); - }); - - test('urgencyTags calculates tags urgency', () { - expect(urgencyTags(task), 0.8); - task = task.rebuild((b) => b..tags = ListBuilder(['tag1'])); - expect(urgencyTags(task), 0.8); - task = - task.rebuild((b) => b..tags = ListBuilder(['tag1', 'tag2'])); - expect(urgencyTags(task), 0.9); - }); - - test('urgencyDue calculates due urgency', () { - expect(urgencyDue(task), 1); - task = task.rebuild( - (b) => b..due = DateTime.now().subtract(const Duration(days: 10))); - expect(urgencyDue(task), 1); - task = task.rebuild( - (b) => b..due = DateTime.now().add(const Duration(days: 10))); - expect(urgencyDue(task), 0.352); - }); - - test('urgencyAge calculates age urgency', () { - expect(urgencyAge(task), closeTo(0.082, 0.001)); - task = task.rebuild( - (b) => b..entry = DateTime.now().subtract(const Duration(days: 365))); - expect(urgencyAge(task), 1.0); - }); - - test('urgency calculates overall urgency', () { - expect(urgency(task), closeTo(36.1, 2)); - }); - }); -} diff --git a/test/utils/taskfunctions/validate_test.dart b/test/utils/taskfunctions/validate_test.dart deleted file mode 100644 index 2f6f7201..00000000 --- a/test/utils/taskfunctions/validate_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskfunctions/validate.dart'; - -void main() { - group('Validate Utils', () { - test('validateTaskDescription throws FormatException for empty description', - () { - expect(() => validateTaskDescription(''), throwsFormatException); - }); - - test( - 'validateTaskDescription throws FormatException for trailing backslash', - () { - expect(() => validateTaskDescription('Task description\\'), - throwsFormatException); - }); - - test('validateTaskDescription does not throw for valid description', () { - expect(() => validateTaskDescription('Valid task description'), - returnsNormally); - }); - - test('validateTaskProject throws FormatException for trailing backslash', - () { - expect(() => validateTaskProject('Project\\'), throwsFormatException); - }); - - test('validateTaskProject does not throw for valid project', () { - expect(() => validateTaskProject('ValidProject'), returnsNormally); - }); - - test('validateTaskTags throws FormatException for tag with space', () { - expect(() => validateTaskTags('invalid tag'), throwsFormatException); - }); - - test('validateTaskTags does not throw for valid tag', () { - expect(() => validateTaskTags('validTag'), returnsNormally); - }); - }); -} diff --git a/test/utils/taskserver/credentials_test.dart b/test/utils/taskserver/credentials_test.dart deleted file mode 100644 index 2278e3a5..00000000 --- a/test/utils/taskserver/credentials_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskserver/credentials.dart'; - -void main() { - group('Credentials', () { - test('Credentials constructor sets fields correctly', () { - const credentials = Credentials( - org: 'testOrg', - user: 'testUser', - key: 'testKey', - ); - - expect(credentials.org, 'testOrg'); - expect(credentials.user, 'testUser'); - expect(credentials.key, 'testKey'); - }); - - test('Credentials.fromString parses string correctly', () { - final credentials = Credentials.fromString('testOrg/testUser/testKey'); - - expect(credentials.org, 'testOrg'); - expect(credentials.user, 'testUser'); - expect(credentials.key, 'testKey'); - }); - - test('Credentials.fromString throws on invalid string format', () { - expect(() => Credentials.fromString('invalidString'), - throwsA(isA())); - expect(() => Credentials.fromString('invalid/String'), - throwsA(isA())); - }); - }); -} diff --git a/test/utils/taskserver/parse_taskrc_test.dart b/test/utils/taskserver/parse_taskrc_test.dart deleted file mode 100644 index b4bc7a95..00000000 --- a/test/utils/taskserver/parse_taskrc_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskserver/parse_taskrc.dart'; - -void main() { - group('parseTaskrc', () { - test('parses a taskrc file correctly', () { - const contents = ''' -# This is a comment -key1=value1 -key2 = value2 -key3=value3 -# Another comment -key4 = value4 -'''; - final result = parseTaskrc(contents); - - expect(result, { - 'key1': 'value1', - 'key2': 'value2', - 'key3': 'value3', - 'key4': 'value4', - }); - }); - - test('ignores comments and empty lines', () { - const contents = ''' -# This is a comment -key1=value1 - -key2 = value2 -# Another comment -'''; - final result = parseTaskrc(contents); - - expect(result, { - 'key1': 'value1', - 'key2': 'value2', - }); - }); - - test('handles lines with escaped slashes correctly', () { - const contents = ''' -key1=value\\/1 -key2 = value\\/2 -'''; - final result = parseTaskrc(contents); - - expect(result, { - 'key1': 'value/1', - 'key2': 'value/2', - }); - }); - - test('trims keys and values', () { - const contents = ''' -key1 = value1 - key2= value2 -key3 =value3 -'''; - final result = parseTaskrc(contents); - - expect(result, { - 'key1': 'value1', - 'key2': 'value2', - 'key3': 'value3', - }); - }); - - test('returns empty map for empty input', () { - const contents = ''; - final result = parseTaskrc(contents); - - expect(result, {}); - }); - }); -} diff --git a/test/utils/taskserver/pem_file_paths_test.dart b/test/utils/taskserver/pem_file_paths_test.dart deleted file mode 100644 index a0fa307d..00000000 --- a/test/utils/taskserver/pem_file_paths_test.dart +++ /dev/null @@ -1,135 +0,0 @@ -import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskserver/pem_file_paths.dart'; - -class MockX509Certificate implements X509Certificate { - @override - final String pem; - - MockX509Certificate(this.pem); - - @override - noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); -} - -void main() { - group('PemFilePaths', () { - setUp(() { - // Create test directory and files if they don't exist - Directory('test/fixtures').createSync(recursive: true); - File('test/fixtures/server.pem') - .writeAsStringSync('matching-pem-content'); - }); - - tearDown(() { - // Clean up test files - if (File('test/fixtures/server.pem').existsSync()) { - File('test/fixtures/server.pem').deleteSync(); - } - }); - - test('PemFilePaths constructor sets fields correctly', () { - const pemFilePaths = PemFilePaths( - ca: 'path/to/ca.pem', - certificate: 'path/to/cert.pem', - key: 'path/to/key.pem', - serverCert: 'path/to/server.pem', - ); - - expect(pemFilePaths.ca, 'path/to/ca.pem'); - expect(pemFilePaths.certificate, 'path/to/cert.pem'); - expect(pemFilePaths.key, 'path/to/key.pem'); - expect(pemFilePaths.serverCert, 'path/to/server.pem'); - }); - - test('PemFilePaths.fromTaskrc parses taskrc correctly', () { - final taskrc = { - 'taskd.ca': 'path/to/ca.pem', - 'taskd.certificate': 'path/to/cert.pem', - 'taskd.key': 'path/to/key.pem', - }; - final pemFilePaths = PemFilePaths.fromTaskrc(taskrc); - - expect(pemFilePaths.ca, 'path/to/ca.pem'); - expect(pemFilePaths.certificate, 'path/to/cert.pem'); - expect(pemFilePaths.key, 'path/to/key.pem'); - expect(pemFilePaths.serverCert, isNull); - }); - - test('PemFilePaths.securityContext creates SecurityContext correctly', () { - const pemFilePaths = PemFilePaths( - ca: 'test/fixtures/ca.pem', - certificate: 'test/fixtures/cert.pem', - key: 'test/fixtures/key.pem', - ); - - final context = pemFilePaths.securityContext(); - - expect(context, isA()); - }); - - test( - 'PemFilePaths.savedServerCertificateMatches returns true for matching certificates', - () { - const pemFilePaths = PemFilePaths( - serverCert: 'test/fixtures/server.pem', - ); - final badServerCert = MockX509Certificate('matching-pem-content'); - - final result = pemFilePaths.savedServerCertificateMatches(badServerCert); - - expect(result, true); - }); - - test( - 'PemFilePaths.savedServerCertificateMatches returns false for non-matching certificates', - () { - const pemFilePaths = PemFilePaths( - serverCert: 'test/fixtures/server.pem', - ); - final badServerCert = MockX509Certificate('non-matching-pem-content'); - - // Write the non-matching content to the server cert file for the test - File('test/fixtures/server.pem') - .writeAsStringSync('different-pem-content'); - - final result = pemFilePaths.savedServerCertificateMatches(badServerCert); - - expect(result, false); - }); - - test('PemFilePaths.map returns correct map representation', () { - const pemFilePaths = PemFilePaths( - ca: 'path/to/ca.pem', - certificate: 'path/to/cert.pem', - key: 'path/to/key.pem', - serverCert: 'path/to/server.pem', - ); - - final map = pemFilePaths.map; - - expect(map, { - 'taskd.ca': 'path/to/ca.pem', - 'taskd.certificate': 'path/to/cert.pem', - 'taskd.key': 'path/to/key.pem', - 'server.cert': 'path/to/server.pem', - }); - }); - - test('PemFilePaths.map omits null values', () { - const pemFilePaths = PemFilePaths( - ca: 'path/to/ca.pem', - certificate: 'path/to/cert.pem', - key: null, - serverCert: null, - ); - - final map = pemFilePaths.map; - - expect(map, { - 'taskd.ca': 'path/to/ca.pem', - 'taskd.certificate': 'path/to/cert.pem', - }); - }); - }); -} diff --git a/test/utils/taskserver/server_test.dart b/test/utils/taskserver/server_test.dart deleted file mode 100644 index e164c336..00000000 --- a/test/utils/taskserver/server_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskserver/server.dart'; -import 'package:taskwarrior/app/utils/taskserver/taskrc_exception.dart'; - -void main() { - group('Server', () { - test('Server constructor sets fields correctly', () { - const server = Server( - address: 'example.com', - port: 8080, - ); - - expect(server.address, 'example.com'); - expect(server.port, 8080); - }); - - test('Server.fromString parses valid server string', () { - final server = Server.fromString('example.com:8080'); - - expect(server.address, 'example.com'); - expect(server.port, 8080); - }); - - test( - 'Server.fromString throws TaskrcException for invalid format without colon', - () { - expect(() => Server.fromString('example.com8080'), - throwsA(isA())); - }); - - test('Server.fromString throws TaskrcException for invalid port', () { - expect(() => Server.fromString('example.com:invalid'), - throwsA(isA())); - }); - - test('Server.toString returns correct string representation', () { - const server = Server( - address: 'example.com', - port: 8080, - ); - - expect(server.toString(), 'example.com:8080'); - }); - }); -} diff --git a/test/utils/taskserver/taskrc_exception_test.dart b/test/utils/taskserver/taskrc_exception_test.dart deleted file mode 100644 index 3b562f89..00000000 --- a/test/utils/taskserver/taskrc_exception_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskserver/taskrc_exception.dart'; - -void main() { - group('TaskrcException', () { - test('TaskrcException constructor sets message correctly', () { - final exception = TaskrcException('An error occurred'); - - expect(exception.message, 'An error occurred'); - }); - - test('TaskrcException.toString returns correct message', () { - final exception = TaskrcException('An error occurred'); - - expect(exception.toString(), 'An error occurred'); - }); - }); -} diff --git a/test/utils/taskserver/taskrc_test.dart b/test/utils/taskserver/taskrc_test.dart deleted file mode 100644 index 6963d5a0..00000000 --- a/test/utils/taskserver/taskrc_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/taskserver/taskrc.dart'; -import 'package:taskwarrior/app/utils/taskserver/server.dart'; -import 'package:taskwarrior/app/utils/taskserver/credentials.dart'; -import 'package:taskwarrior/app/utils/taskserver/pem_file_paths.dart'; - -void main() { - group('Taskrc', () { - test('Taskrc constructor sets fields correctly', () { - const server = Server(address: 'example.com', port: 8080); - const credentials = Credentials(org: 'org', user: 'user', key: 'key'); - const pemFilePaths = PemFilePaths( - ca: 'path/to/ca.pem', - certificate: 'path/to/cert.pem', - key: 'path/to/key.pem', - ); - final taskrc = Taskrc( - server: server, - credentials: credentials, - pemFilePaths: pemFilePaths, - ); - - expect(taskrc.server, server); - expect(taskrc.credentials, credentials); - expect(taskrc.pemFilePaths, pemFilePaths); - }); - - test('Taskrc.fromString parses valid taskrc string', () { - const taskrcString = ''' -taskd.server=example.com:8080 -taskd.credentials=org/user/key -taskd.ca=path/to/ca.pem -taskd.certificate=path/to/cert.pem -taskd.key=path/to/key.pem -'''; - final taskrc = Taskrc.fromString(taskrcString); - - expect(taskrc.server, isA()); - expect(taskrc.credentials, isA()); - expect(taskrc.pemFilePaths, isA()); - }); - - test('Taskrc.fromMap parses valid taskrc map', () { - final taskrcMap = { - 'taskd.server': 'example.com:8080', - 'taskd.credentials': 'org/user/key', - 'taskd.ca': 'path/to/ca.pem', - 'taskd.certificate': 'path/to/cert.pem', - 'taskd.key': 'path/to/key.pem', - }; - final taskrc = Taskrc.fromMap(taskrcMap); - - expect(taskrc.server, isA()); - expect(taskrc.credentials, isA()); - expect(taskrc.pemFilePaths, isA()); - }); - - test('Taskrc.fromMap handles missing optional fields', () { - final taskrcMap = { - 'taskd.ca': 'path/to/ca.pem', - 'taskd.certificate': 'path/to/cert.pem', - 'taskd.key': 'path/to/key.pem', - }; - final taskrc = Taskrc.fromMap(taskrcMap); - - expect(taskrc.server, isNull); - expect(taskrc.credentials, isNull); - expect(taskrc.pemFilePaths, isA()); - }); - }); -} diff --git a/test/utils/themes/dark_theme_test.dart b/test/utils/themes/dark_theme_test.dart deleted file mode 100644 index 68f0bebf..00000000 --- a/test/utils/themes/dark_theme_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/themes/dark_theme.dart'; - -void main() { - group('darkTheme', () { - test('darkTheme has correct brightness', () { - expect(darkTheme.brightness, Brightness.dark); - }); - }); -} diff --git a/test/utils/themes/light_theme_test.dart b/test/utils/themes/light_theme_test.dart deleted file mode 100644 index dcfed347..00000000 --- a/test/utils/themes/light_theme_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:taskwarrior/app/utils/themes/light_theme.dart'; - -void main() { - group('lightTheme', () { - test('lightTheme has correct brightness', () { - expect(lightTheme.brightness, Brightness.light); - }); - }); -} diff --git a/web/favicon.png b/web/favicon.png deleted file mode 100644 index 8aaa46ac..00000000 Binary files a/web/favicon.png and /dev/null differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png deleted file mode 100644 index b749bfef..00000000 Binary files a/web/icons/Icon-192.png and /dev/null differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48d..00000000 Binary files a/web/icons/Icon-512.png and /dev/null differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d76..00000000 Binary files a/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c5669..00000000 Binary files a/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/web/index.html b/web/index.html deleted file mode 100644 index f53e96fa..00000000 --- a/web/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Codestin Search App - - - - - - diff --git a/web/manifest.json b/web/manifest.json deleted file mode 100644 index 3f675e88..00000000 --- a/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "taskwarrior", - "short_name": "taskwarrior", - "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" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -} diff --git a/windows/.gitignore b/windows/.gitignore deleted file mode 100644 index d492d0d9..00000000 --- a/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/windows/CMakeLists.txt b/windows/CMakeLists.txt deleted file mode 100644 index 4a18b3d6..00000000 --- a/windows/CMakeLists.txt +++ /dev/null @@ -1,108 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.14) -project(taskwarrior LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "taskwarrior") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(VERSION 3.14...3.25) - -# Define build configuration option. -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() -# Define settings for the Profile build mode. -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. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -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() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build; see runner/CMakeLists.txt. -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() - -# Copy the native assets provided by the build.dart from all packages. -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") -install(DIRECTORY "${NATIVE_ASSETS_DIR}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -# 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/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt deleted file mode 100644 index 903f4899..00000000 --- a/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,109 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.14) - -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") - -# Set fallback configurations for older versions of the flutter tool. -if (NOT DEFINED FLUTTER_TARGET_PLATFORM) - set(FLUTTER_TARGET_PLATFORM "windows-x64") -endif() - -# === 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" - ${FLUTTER_TARGET_PLATFORM} $ - 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/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 9d16245a..00000000 --- a/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,26 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include -#include -#include -#include -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - ConnectivityPlusWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); - FileSelectorWindowsRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FileSelectorWindows")); - FlutterTimezonePluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FlutterTimezonePluginCApi")); - PermissionHandlerWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); - UrlLauncherWindowsRegisterWithRegistrar( - registry->GetRegistrarForPlugin("UrlLauncherWindows")); -} diff --git a/windows/flutter/generated_plugin_registrant.h b/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d85..00000000 --- a/windows/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake deleted file mode 100644 index 50ed42d3..00000000 --- a/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - connectivity_plus - file_selector_windows - flutter_timezone - permission_handler_windows - url_launcher_windows -) - -list(APPEND FLUTTER_FFI_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) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/windows/runner/CMakeLists.txt b/windows/runner/CMakeLists.txt deleted file mode 100644 index 394917c0..00000000 --- a/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -# Define the application target. To change its name, change BINARY_NAME in the -# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer -# work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add preprocessor definitions for the build version. -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") - -# Disable Windows macros that collide with C++ standard library functions. -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") - -# Add dependency libraries and include directories. Add any application-specific -# dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc deleted file mode 100644 index a0ba3176..00000000 --- a/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 -// - -#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) -#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD -#else -#define VERSION_AS_NUMBER 1,0,0,0 -#endif - -#if defined(FLUTTER_VERSION) -#define VERSION_AS_STRING FLUTTER_VERSION -#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.ccextractor" "\0" - VALUE "FileDescription", "taskwarrior" "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "taskwarrior" "\0" - VALUE "LegalCopyright", "Copyright (C) 2024 com.ccextractor. All rights reserved." "\0" - VALUE "OriginalFilename", "taskwarrior.exe" "\0" - VALUE "ProductName", "taskwarrior" "\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/windows/runner/flutter_window.cpp b/windows/runner/flutter_window.cpp deleted file mode 100644 index 955ee303..00000000 --- a/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,71 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(const flutter::DartProject& project) - : 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()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - - flutter_controller_->engine()->SetNextFrameCallback([&]() { - this->Show(); - }); - - // Flutter can complete the first frame before the "show window" callback is - // registered. The following call ensures a frame is pending to ensure the - // window is shown. It is a no-op if the first frame hasn't completed yet. - flutter_controller_->ForceRedraw(); - - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - 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/windows/runner/flutter_window.h b/windows/runner/flutter_window.h deleted file mode 100644 index 6da0652f..00000000 --- a/windows/runner/flutter_window.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow hosting a Flutter view running |project|. - explicit FlutterWindow(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 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/windows/runner/main.cpp b/windows/runner/main.cpp deleted file mode 100644 index d06cb5a6..00000000 --- a/windows/runner/main.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -#include "flutter_window.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); - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.Create(L"taskwarrior", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - ::MSG msg; - while (::GetMessage(&msg, nullptr, 0, 0)) { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/windows/runner/resource.h b/windows/runner/resource.h deleted file mode 100644 index 66a65d1e..00000000 --- a/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/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20ca..00000000 Binary files a/windows/runner/resources/app_icon.ico and /dev/null differ diff --git a/windows/runner/runner.exe.manifest b/windows/runner/runner.exe.manifest deleted file mode 100644 index a42ea768..00000000 --- a/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,20 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - - - - - - - diff --git a/windows/runner/utils.cpp b/windows/runner/utils.cpp deleted file mode 100644 index 3a0b4651..00000000 --- a/windows/runner/utils.cpp +++ /dev/null @@ -1,65 +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(); - } - unsigned int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, nullptr, 0, nullptr, nullptr) - -1; // remove the trailing null character - int input_length = (int)wcslen(utf16_string); - std::string utf8_string; - if (target_length == 0 || target_length > utf8_string.max_size()) { - return utf8_string; - } - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - input_length, utf8_string.data(), target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/windows/runner/utils.h b/windows/runner/utils.h deleted file mode 100644 index 3879d547..00000000 --- a/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/windows/runner/win32_window.cpp b/windows/runner/win32_window.cpp deleted file mode 100644 index 60608d0f..00000000 --- a/windows/runner/win32_window.cpp +++ /dev/null @@ -1,288 +0,0 @@ -#include "win32_window.h" - -#include -#include - -#include "resource.h" - -namespace { - -/// Window attribute that enables dark mode window decorations. -/// -/// Redefined in case the developer's machine has a Windows SDK older than -/// version 10.0.22000.0. -/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute -#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE -#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 -#endif - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -/// Registry key for app theme preference. -/// -/// A value of 0 indicates apps should use dark mode. A non-zero or missing -/// value indicates apps should use light mode. -constexpr const wchar_t kGetPreferredBrightnessRegKey[] = - L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; -constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; - -// 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 registrar 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::Create(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, - 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; - } - - UpdateTheme(window); - - return OnCreate(); -} - -bool Win32Window::Show() { - return ShowWindow(window_handle_, SW_SHOWNORMAL); -} - -// 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; - - case WM_DWMCOLORIZATIONCOLORCHANGED: - UpdateTheme(hwnd); - 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. -} - -void Win32Window::UpdateTheme(HWND const window) { - DWORD light_mode; - DWORD light_mode_size = sizeof(light_mode); - LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, - kGetPreferredBrightnessRegValue, - RRF_RT_REG_DWORD, nullptr, &light_mode, - &light_mode_size); - - if (result == ERROR_SUCCESS) { - BOOL enable_dark_mode = light_mode == 0; - DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, - &enable_dark_mode, sizeof(enable_dark_mode)); - } -} diff --git a/windows/runner/win32_window.h b/windows/runner/win32_window.h deleted file mode 100644 index e901dde6..00000000 --- a/windows/runner/win32_window.h +++ /dev/null @@ -1,102 +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 a win32 window with |title| that is positioned and sized 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 this function will scale the inputted width and height as - // as appropriate for the default monitor. The window is invisible until - // |Show| is called. Returns true if the window was created successfully. - bool Create(const std::wstring& title, const Point& origin, const Size& size); - - // Show the current window. Returns true if the window was successfully shown. - bool Show(); - - // 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 - // responds 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; - - // Update the window frame's theme to match the system theme. - static void UpdateTheme(HWND const window); - - 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_