├── .github └── ISSUE_TEMPLATE │ ├── bug.yaml │ ├── documentation.yaml │ └── feature.yaml ├── .gitignore ├── LICENSE ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── io │ │ │ │ └── appwrite │ │ │ │ └── flappwrite_water_tracker │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── flappwrite_water_tracker_android.iml ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── built-with-appwrite-hr.svg └── built-with-appwrite.svg ├── flappwrite_water_tracker.iml ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── data │ ├── model │ │ └── water_intake.dart │ └── service │ │ └── api_service.dart ├── main.dart ├── pages │ ├── history.dart │ ├── home.dart │ ├── login.dart │ ├── signup.dart │ └── splash.dart ├── res │ └── app_constants.dart └── widgets │ └── built_with_appwrite.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── pubspec.lock ├── pubspec.yaml ├── scripts ├── .gitignore ├── create_collections.dart ├── pubspec.lock └── pubspec.yaml ├── test └── widget_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png └── Icon-512.png ├── index.html └── manifest.json /.github/ISSUE_TEMPLATE/bug.yaml: -------------------------------------------------------------------------------- 1 | name: "🐛 Bug Report" 2 | description: "Submit a bug report to help us improve" 3 | title: "🐛 Bug Report: " 4 | labels: [bug] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to fill out our bug report form 🙏 10 | - type: textarea 11 | id: steps-to-reproduce 12 | validations: 13 | required: true 14 | attributes: 15 | label: "👟 Reproduction steps" 16 | description: "How do you trigger this bug? Please walk us through it step by step." 17 | placeholder: "When I ..." 18 | - type: textarea 19 | id: expected-behavior 20 | validations: 21 | required: true 22 | attributes: 23 | label: "👍 Expected behavior" 24 | description: "What did you think would happen?" 25 | placeholder: "It should ..." 26 | - type: textarea 27 | id: actual-behavior 28 | validations: 29 | required: true 30 | attributes: 31 | label: "👎 Actual Behavior" 32 | description: "What did actually happen? Add screenshots, if applicable." 33 | placeholder: "It actually ..." 34 | - type: dropdown 35 | id: appwrite-version 36 | attributes: 37 | label: "🎲 Appwrite version" 38 | description: "What version of Appwrite are you running?" 39 | options: 40 | - Version 0.10.x 41 | - Version 0.9.x 42 | - Version 0.8.x 43 | - Version 0.7.x 44 | - Version 0.6.x 45 | - Different version (specify in environment) 46 | validations: 47 | required: true 48 | - type: dropdown 49 | id: operating-system 50 | attributes: 51 | label: "💻 Operating system" 52 | description: "What OS is your server / device running on?" 53 | options: 54 | - Linux 55 | - MacOS 56 | - Windows 57 | - Something else 58 | validations: 59 | required: true 60 | - type: textarea 61 | id: enviromnemt 62 | validations: 63 | required: false 64 | attributes: 65 | label: "🧱 Your Environment" 66 | description: "Is your environment customized in any way?" 67 | placeholder: "I use Cloudflare for ..." 68 | - type: checkboxes 69 | id: no-duplicate-issues 70 | attributes: 71 | label: "👀 Have you spent some time to check if this issue has been raised before?" 72 | description: "Have you Googled for a similar issue or checked our older issues for a similar bug?" 73 | options: 74 | - label: "I checked and didn't find similar issue" 75 | required: true 76 | - type: checkboxes 77 | id: read-code-of-conduct 78 | attributes: 79 | label: "🏢 Have you read the Code of Conduct?" 80 | options: 81 | - label: "I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)" 82 | required: true 83 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.yaml: -------------------------------------------------------------------------------- 1 | name: "📚 Documentation" 2 | description: "Report an issue related to documentation" 3 | title: "📚 Documentation: " 4 | labels: [documentation] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to make our documentation better 🙏 10 | - type: textarea 11 | id: issue-description 12 | validations: 13 | required: true 14 | attributes: 15 | label: "💭 Description" 16 | description: "A clear and concise description of what the issue is." 17 | placeholder: "Documentation should not ..." 18 | - type: checkboxes 19 | id: no-duplicate-issues 20 | attributes: 21 | label: "👀 Have you spent some time to check if this issue has been raised before?" 22 | description: "Have you Googled for a similar issue or checked our older issues for a similar bug?" 23 | options: 24 | - label: "I checked and didn't find similar issue" 25 | required: true 26 | - type: checkboxes 27 | id: read-code-of-conduct 28 | attributes: 29 | label: "🏢 Have you read the Code of Conduct?" 30 | options: 31 | - label: "I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)" 32 | required: true 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.yaml: -------------------------------------------------------------------------------- 1 | name: 🚀 Feature 2 | description: "Submit a proposal for a new feature" 3 | title: "🚀 Feature: " 4 | labels: [feature] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to fill out our feature request form 🙏 10 | - type: textarea 11 | id: feature-description 12 | validations: 13 | required: true 14 | attributes: 15 | label: "🔖 Feature description" 16 | description: "A clear and concise description of what the feature is." 17 | placeholder: "You should add ..." 18 | - type: textarea 19 | id: pitch 20 | validations: 21 | required: true 22 | attributes: 23 | label: "🎤 Pitch" 24 | description: "Please explain why this feature should be implemented and how it would be used. Add examples, if applicable." 25 | placeholder: "In my use-case, ..." 26 | - type: checkboxes 27 | id: no-duplicate-issues 28 | attributes: 29 | label: "👀 Have you spent some time to check if this issue has been raised before?" 30 | description: "Have you Googled for a similar issue or checked our older issues for a similar bug?" 31 | options: 32 | - label: "I checked and didn't find similar issue" 33 | required: true 34 | - type: checkboxes 35 | id: read-code-of-conduct 36 | attributes: 37 | label: "🏢 Have you read the Code of Conduct?" 38 | options: 39 | - label: "I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)" 40 | required: true 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | # “One: Demonstrations always crash. And two: The probability of them crashing goes up exponentially with the number of people watching.” 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Web related 36 | lib/generated_plugin_registrant.dart 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release 48 | lib/generated_plugin_registrant.dart 49 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Appwrite 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🔖 Demo Water Intake Tracker with Flutter 2 | 3 | ![Easter Eggs Claimed](https://img.shields.io/github/issues-pr-closed-raw/appwrite/demo-watertracker-with-flutter/easter-egg?label=Easter%20Eggs%20Claimed&style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAA7AAAAOwBeShxvQAAABJ0RVh0U29mdHdhcmUAZXpnaWYuY29toMOzWAAAB/xJREFUWIWtl3lw1OUZxz+/Y+/dZHPtJk1CCCEhB8cEKhgkQMBypAnaFDt4odASD6xWbWewop1Wx2vs1B42IqAgxSkMOBxSxSrGA7EqjuUKKOFq2CSQbJZNNrvZ6+kfqUFDEon2+fP5Pe/z/f6e631eGL6MTk0w1KUnm8+bDGrUatYimamWVrfT8Acgd7jOlGHY6ulJpj+FY7LsrqUlek3VKApGJSICxxp9bN7WyJqNDRFNU55t9fasAHr+nwRs2WmWd8qucE+se3qGkuw0DWjUej7IHb96Vz78pOVws7dnKtD5TY61ywC3ZKWYGxYvKiz661PTFatFH9TQbjPwk2tGK2dbAi5va+AH7Z2R1d+ZwJjvWV+dP3fkpN//biqKAl2BCDveOE3jaT+jR/amYNdbZzjY4GVEph2TUWPerBEsrhmdnkrkwBuftB0dyv+QKbCZtcWFoxJf3PdajWowqFzwhylbsBvVOI7uQCs5GX5A4XSLA6vVhUQO88H2OSQmGAGYde326EcH2m4NhGIbB8NQh8B3mI3amg11V6sGQ69Z3UvHUE3TmF35ItXX7aIjOImO4CSqF+5iduU6jLYynt94rM/BM4+X6zaLvgqwDZtArsvy+I0/zjcU5Tv7dP9pDqObixEBUJhW8RTTKp7ky0A6nONoOR/qsx9flMyia/KsKU7DY8MlkHIhGL19xd2leH09xGICwNwZqbQ0vYbXFwNA001o+sWOOHvqFSrK3ABEInE8rd2suGeiEo1wO2AfCGjAkjap3ByNiXblvK2EglE0g8Zfnijn2vkjSXjkKEcPb2H8hOtwOC7ybzi0CZu5ncrZU3hl10nuW7mXnlAUg0kDMBg0bojEeL4/1oBFmGHTziwZm5hdVWhjlNNAQ1uYJbvbeOQ3ZUyZ6GJy5ZuMm1xHfkEZdptK05l9vPvPZezbOZc3323isac+Zv38NIpTjZzwRdjbFOTR970NF3rixZdDIM9hVD/fd0O2mpp4sUtbAjH87kSm3TGF9z9upfLmvUycugqbVWVf/RJ2rpvBWU+A+x58jy0L3IxyGvrOxgQK6k6FApF4MXDyq2CX1IAKV1+ZblYspq9/SrdpFHR1Me7Kjfg7e3h1/VQ++7CWvXt+xra102n3hrjngffYVPV1cABNgYociwDlA+B9XbIc+oKyDItiHGTgPX1VEkvu2sPZ5i4O7ZnHoT3zaPJ0cdu99ayfn0Z+smHAc/PybBanWZvTX38JTE9MJo9ONKBrA8+o0nQTWxa4ufuJf/GESSceBz0cZXO1izEpxoFZA4UpRkRk+jcSaA/Fk11WjeV72jlwPsyKKxKoyuudI62BGMvfbscXivN0eRIGTUEFQlFh+dtekswqz85KwWXtrZ0dxwM8+fEFSt0mflvmpDsq7v54/VPgMGmKbDrVjZLpZP3qOazc66OxI4IA99Z7mVWdz0MPTeXOt9rJSdDJTtC5c087Dz88lRk/zOfeei8CHO+I8PAHPjasnUs8w8mqA53oCnHAMmiYgByTpsQz3WbxNtwi4qmV9c/MlDFuiywsSZCZV7gl1rRMxFMrd99aLNNzbVKea5NfLC0R8dRKrGmZTJ/kkutKEqTAbZGX/jhTxFMr7Udukcw0ixg1JQJkfxWwf6KLMtLMR3aum0xJUT7HTviYUJzClldP0HjKz22LiwmFooR6YmSm21jzcgOKovDT6ws52xLAYtYxGlVWvXSEgjwnNZW5HD/lJynRSMeFMOXV22It7aGxQN8N2b8GOmwWTXKzLIrPH+TTg21MKE5hYdWoPoNPTl7A3xlhZLaDO24p6dMfP+Un2Wli4rhUVvy8tE//eaOPEZl2xhYmYzZpMcA7VAqMqqrIL2vzJHzyZhFPrZw7uFhKxyRJgk2Xzc/NFvHUinhqZf/uGslKs0i2yyL7d9f06TfVzZYEmy4TC5Pk3MHFffpfL58gmqrEgYH79EtxGNVgsl2XV1ZPE/HUSnVFltxfliz1N2WJ22mU4x8skkDjUikYYZcXqtzyQpVb8rPtEmhcKo37FonbaZT6m7LkvrJkqa7IEvHUyj/+Nl9S7LrYDIqvP94lzZ7t0N+vyLJe9XpLD1NK0zjX2MHWBS50VWHjkU6eOxokLcXCGDXK4+VJAKx4z8sXYujdCYss3FjsICZQs70VV14SH316noV5Fl4+3PlaRyhWOSQBFZb/KN/+52ty7UpLOEpNkR278WK3vnMmiC8UoyrfzpezKiaw84sukswaM0Zc7LLOcJxdxwOUpBlZ++/O7r8f9t8PPDckASAj0aSe3l6VaUg0q6SnqCjKcLb3SyUQiTN+9ZnuQCSeB7T0++FLpNmkKTu2negiHBV8XfKdwAHWH/BHNYWt/cFh8KU0L9GkHtkwJ8PotmqkOjVs5m8XhabOKDM3NHV1ReITgBP9vw+2lncoSNP+cz1Vc3KsaiTcy9RsHB6JrnCcmq2errZQbHlcqB/IZtB3QVT4TFXI2dscGj8tw6IqcYVQWNA1ZdCb8qvS7I9y/faWUHt37GV/WB4dzG7Ih0kgIjuCMQluOxGocFl0LdtmoDskBHvixOIgAiK9ZGJxiESFzqCw+VCn1O4+F/WHYivbQvEHhsK43JiOzbDpa1UonTvSZvi+y0SOw0Di/7YmX0+c0/4I+8+FeP10d0Tgs+ZAdClw6DL9X7YUW3V1ZZZDP5Zq0XxGTYkaNSWaatF8WQ79qFlXHwQuWTyHkv8CtnU5f+IJ/WQAAAA1dEVYdENvbW1lbnQAQ29udmVydGVkIHdpdGggZXpnaWYuY29tIFNWRyB0byBQTkcgY29udmVydGVyLCnjIwAAAABJRU5ErkJggg==) 4 | 5 | A water intake tracker app built with Flutter and Appwrite 6 | 7 | 8 | ## 🎬 Getting Started 9 | 10 | ### 🤘 Install Appwrite 11 | Follow our simple [Installation Guide](https://appwrite.io/docs/installation) to get Appwrite up and running in no time. You can either deploy Appwrite on your local machine or, on any cloud provider of your choice. 12 | 13 | We need to make a few configuration changes to your Appwrite server. 14 | 15 | 1. Add a new Flutter App (Android or iOS or both) in Appwrite and enter application id of your application (`io.appwrite.quiz` etc) 16 | ![Add Flutter App](https://user-images.githubusercontent.com/20852629/113019434-3c27c900-919f-11eb-997c-1da5a8303ceb.png) 17 | 18 | 2. Create a new API Key from Api Keys section 19 | 20 | 3. Update `scripts/create_collections.dart` with your own `endpoint`, `project id` and `api key`. 21 | 22 | 4. Run `flutter pub get` to get the dependencies and then run `scripts/create_collections.dart` using `dart /create_collections.dart` 23 | 24 | 5. In the appwrite console in your project, it will create new collection, get the id of that collection and replace update `lib/res/app_constants.dart` with your own `ednpoint`, `project id` and `collection id` 25 | 26 | ### 🚀 Run the Application 27 | First get the dependencies by running `flutter pub get`. Then you can run the application simply using `flutter run` command. It works on **Android**, **iOS** and **Web** platforms. 28 | 29 | ## 🤕 Support 30 | 31 | If you get stuck anywhere, hop onto one of our [support channels in discord](https://appwrite.io/discord) and we'd be delighted to help you out 🤝 32 | 33 | ## 😧 Help Wanted 34 | Our access credentials were recently compromised and someone tried to ruin these demos. They decided to leave behind 15 easter eggs 🥚 for you to discover. If you find them, submit a PR cleaning up that section of the code (One PR per person across all the repos). You can track the number of claimed Easter Eggs using the badge at the top. 35 | 36 | The first 15 people to get their PRs merged will receive some Appwrite Swags 🤩 . Just head over to our [Discord channel](https://appwrite.io/discord) and share your PR link with us. -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 30 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | defaultConfig { 36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 37 | applicationId "io.appwrite.flappwrite_water_tracker" 38 | minSdkVersion 16 39 | targetSdkVersion 30 40 | versionCode flutterVersionCode.toInteger() 41 | versionName flutterVersionName 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 59 | } 60 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/io/appwrite/flappwrite_water_tracker/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.flappwrite_water_tracker 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | // “C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows your whole leg off.” 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/flappwrite_water_tracker_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/built-with-appwrite-hr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /assets/built-with-appwrite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /flappwrite_water_tracker.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1020; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 294 | PRODUCT_BUNDLE_IDENTIFIER = io.appwrite.flappwriteWaterTracker; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 297 | SWIFT_VERSION = 5.0; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | }; 300 | name = Profile; 301 | }; 302 | 97C147031CF9000F007C117D /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 350 | MTL_ENABLE_DEBUG_INFO = YES; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 97C147041CF9000F007C117D /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SUPPORTED_PLATFORMS = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | VALIDATE_PRODUCT = YES; 405 | }; 406 | name = Release; 407 | }; 408 | 97C147061CF9000F007C117D /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CLANG_ENABLE_MODULES = YES; 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = Runner/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 418 | PRODUCT_BUNDLE_IDENTIFIER = io.appwrite.flappwriteWaterTracker; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 5.0; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | }; 425 | name = Debug; 426 | }; 427 | 97C147071CF9000F007C117D /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | INFOPLIST_FILE = Runner/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = io.appwrite.flappwriteWaterTracker; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 440 | SWIFT_VERSION = 5.0; 441 | VERSIONING_SYSTEM = "apple-generic"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 97C147031CF9000F007C117D /* Debug */, 452 | 97C147041CF9000F007C117D /* Release */, 453 | 249021D3217E4FDB00AE95B9 /* Profile */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147061CF9000F007C117D /* Debug */, 462 | 97C147071CF9000F007C117D /* Release */, 463 | 249021D4217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 471 | } 472 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | //“If you put a million monkeys at a million keyboards, one of them will eventually write a Java program. The rest of them will write Perl programs.” 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | 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. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flappwrite_water_tracker 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/data/model/water_intake.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | class WaterIntake { 4 | final int amount; 5 | final DateTime date; 6 | final String userId; 7 | final String id; 8 | WaterIntake({ 9 | required this.amount, 10 | required this.date, 11 | required this.userId, 12 | required this.id, 13 | }); 14 | 15 | WaterIntake copyWith({ 16 | int? amount, 17 | DateTime? date, 18 | String? userId, 19 | String? id, 20 | }) { 21 | return WaterIntake( 22 | amount: amount ?? this.amount, 23 | date: date ?? this.date, 24 | userId: userId ?? this.userId, 25 | id: id ?? this.id, 26 | ); 27 | } 28 | 29 | Map toMap() { 30 | return { 31 | 'date': date.millisecondsSinceEpoch, 32 | 'amount': amount, 33 | 'userId': userId, 34 | }; 35 | } 36 | 37 | factory WaterIntake.fromMap(Map map) { 38 | return WaterIntake( 39 | amount: map['amount'], 40 | date: DateTime.fromMillisecondsSinceEpoch(map['date']), 41 | userId: map['userId'], 42 | id: map['\$id'], 43 | ); 44 | } 45 | 46 | String toJson() => json.encode(toMap()); 47 | 48 | factory WaterIntake.fromJson(String source) => WaterIntake.fromMap(json.decode(source)); 49 | 50 | @override 51 | String toString() { 52 | return 'WaterIntake(amount: $amount, date: $date, userId: $userId, id: $id)'; 53 | } 54 | 55 | @override 56 | bool operator ==(Object other) { 57 | if (identical(this, other)) return true; 58 | 59 | return other is WaterIntake && 60 | other.amount == amount && 61 | other.date == date && 62 | other.userId == userId && 63 | other.id == id; 64 | } 65 | 66 | @override 67 | int get hashCode { 68 | return amount.hashCode ^ 69 | date.hashCode ^ 70 | userId.hashCode ^ 71 | id.hashCode; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/data/service/api_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:appwrite/appwrite.dart'; 2 | import 'package:appwrite/models.dart'; 3 | import 'package:flappwrite_water_tracker/data/model/water_intake.dart'; 4 | import 'package:flappwrite_water_tracker/res/app_constants.dart'; 5 | 6 | class ApiService { 7 | static ApiService? _instance; 8 | late final Client _client; 9 | late final Account _account; 10 | late final Database _db; 11 | 12 | ApiService._internal() { 13 | _client = 14 | Client(endPoint: AppConstant.endpoint).setProject(AppConstant.project); 15 | _account = Account(_client); 16 | _db = Database(_client); 17 | } 18 | 19 | static ApiService get instance { 20 | if (_instance == null) { 21 | _instance = ApiService._internal(); 22 | } 23 | return _instance!; 24 | } 25 | 26 | Future signup( 27 | {String? name, required String email, required String password}) async { 28 | return _account.create( 29 | userId: 'unique()', name: name ?? "", email: email, password: password); 30 | } 31 | 32 | Future login({required String email, required String password}) async { 33 | return _account.createSession(email: email, password: password); 34 | } 35 | 36 | Future anonymousLogin() async { 37 | return _account.createAnonymousSession(); 38 | } 39 | 40 | Future logout() async { 41 | try { 42 | await _account.deleteSession(sessionId: 'current'); 43 | return true; 44 | } on AppwriteException catch (e) { 45 | print(e.message); 46 | return false; 47 | } 48 | } 49 | 50 | Future getUser() async { 51 | return await _account.get(); 52 | } 53 | 54 | Future getPrefs() async { 55 | return _account.getPrefs(); 56 | } 57 | 58 | Future updatePrefs(Map prefs) { 59 | return _account.updatePrefs(prefs: prefs); 60 | } 61 | 62 | Future addIntake( 63 | {required WaterIntake intake, 64 | required List read, 65 | required List write}) async { 66 | final res = await _db.createDocument( 67 | documentId: 'unique()', 68 | collectionId: AppConstant.entriesCollection, 69 | data: intake.toMap(), 70 | read: read, 71 | write: write); 72 | return WaterIntake.fromMap(res.data); 73 | } 74 | 75 | Future removeIntake(String id) async { 76 | return _db.deleteDocument( 77 | collectionId: AppConstant.entriesCollection, documentId: id); 78 | } 79 | 80 | Future> getIntakes({DateTime? date}) async { 81 | date = date ?? DateTime.now(); 82 | final from = DateTime(date.year, date.month, date.day, 0); 83 | final to = DateTime(date.year, date.month, date.day, 23, 59, 59); 84 | //“What’s the object-oriented way to get wealthy? Inheritance.” 85 | final res = await _db 86 | .listDocuments(collectionId: AppConstant.entriesCollection, queries: [ 87 | Query.greaterEqual('date', from.millisecondsSinceEpoch), 88 | Query.lesserEqual('date', to.millisecondsSinceEpoch), 89 | ]); 90 | return res.convertTo( 91 | (p0) => WaterIntake.fromMap(Map.from(p0))); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:appwrite/models.dart'; 2 | import 'package:flappwrite_water_tracker/data/service/api_service.dart'; 3 | import 'package:flappwrite_water_tracker/pages/home.dart'; 4 | import 'package:flappwrite_water_tracker/pages/login.dart'; 5 | import 'package:flappwrite_water_tracker/pages/splash.dart'; 6 | import 'package:flappwrite_water_tracker/widgets/built_with_appwrite.dart'; 7 | import 'package:flutter/material.dart'; 8 | 9 | void main() { 10 | runApp(MyApp()); 11 | } 12 | 13 | class MyApp extends StatelessWidget { 14 | @override 15 | Widget build(BuildContext context) { 16 | //“There are only two kinds of programming languages out there. The ones people complain about and the ones no one uses.” 17 | return MaterialApp( 18 | title: 'FlAppwirte Water Tracker', 19 | debugShowCheckedModeBanner: false, 20 | theme: ThemeData( 21 | primarySwatch: Colors.blue, 22 | appBarTheme: AppBarTheme( 23 | elevation: 0, 24 | color: Colors.transparent, 25 | iconTheme: IconThemeData(color: Colors.blue), 26 | actionsIconTheme: IconThemeData(color: Colors.blue), 27 | titleTextStyle: TextStyle( 28 | fontWeight: FontWeight.bold, 29 | color: Colors.blue, 30 | ), 31 | ), 32 | ), 33 | home: BuiltWithAppwriteWrapper(child: MainScreen()), 34 | ); 35 | } 36 | } 37 | 38 | class MainScreen extends StatefulWidget { 39 | @override 40 | _MainScreenState createState() => _MainScreenState(); 41 | } 42 | 43 | class _MainScreenState extends State { 44 | @override 45 | Widget build(BuildContext context) { 46 | return FutureBuilder( 47 | future: ApiService.instance.getUser(), 48 | builder: (context, snapshot) { 49 | if (snapshot.connectionState == ConnectionState.waiting) 50 | return SplashPage(); 51 | if (snapshot.hasData) 52 | return HomePage( 53 | user: snapshot.data!, 54 | ); 55 | return LoginPage(); 56 | }, 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/pages/history.dart: -------------------------------------------------------------------------------- 1 | import 'package:flappwrite_water_tracker/data/model/water_intake.dart'; 2 | import 'package:flappwrite_water_tracker/data/service/api_service.dart'; 3 | import 'package:flappwrite_water_tracker/widgets/built_with_appwrite.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:intl/intl.dart'; 6 | 7 | class HistoryPage extends StatefulWidget { 8 | @override 9 | _HistoryPageState createState() => _HistoryPageState(); 10 | } 11 | 12 | class _HistoryPageState extends State { 13 | int todaysIntake = 0; 14 | List intakes = []; 15 | bool loading = true; 16 | 17 | @override 18 | void initState() { 19 | super.initState(); 20 | _getIntakes(); 21 | } 22 | 23 | _getIntakes() async { 24 | intakes = await ApiService.instance.getIntakes(); 25 | todaysIntake = 0; 26 | intakes.forEach((element) { 27 | todaysIntake += element.amount; 28 | }); 29 | loading = false; 30 | if (mounted) setState(() {}); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return BuiltWithAppwriteWrapper( 36 | child: Scaffold( 37 | appBar: AppBar( 38 | title: Text( 39 | DateFormat.yMMMEd().format( 40 | DateTime.now(), 41 | ), 42 | ), 43 | ), 44 | body: loading 45 | ? Center( 46 | child: CircularProgressIndicator(), 47 | ) 48 | : ListView( 49 | padding: const EdgeInsets.all(16.0), 50 | children: [ 51 | ...intakes.map((intake) { 52 | //“Software undergoes beta testing shortly before it’s released. Beta is Latin for still doesn’t work.” 53 | return ListTile( 54 | title: Text("${intake.amount} ml"), 55 | subtitle: Text( 56 | "${DateFormat.yMMMMd().format(intake.date)} ${DateFormat.jm().format(intake.date)}"), 57 | trailing: IconButton( 58 | icon: Icon(Icons.delete), 59 | onPressed: () async { 60 | //delete 61 | await ApiService.instance.removeIntake(intake.id); 62 | _getIntakes(); 63 | }, 64 | ), 65 | ); 66 | }) 67 | ], 68 | ), 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lib/pages/home.dart: -------------------------------------------------------------------------------- 1 | import 'package:appwrite/appwrite.dart'; 2 | import 'package:appwrite/models.dart'; 3 | import 'package:carousel_slider/carousel_slider.dart'; 4 | import 'package:flappwrite_water_tracker/data/model/water_intake.dart'; 5 | import 'package:flappwrite_water_tracker/data/service/api_service.dart'; 6 | import 'package:flappwrite_water_tracker/main.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 9 | import 'package:intl/intl.dart'; 10 | import 'package:liquid_progress_indicator_ns/liquid_progress_indicator.dart'; 11 | 12 | import 'history.dart'; 13 | 14 | class HomePage extends StatefulWidget { 15 | final User user; 16 | 17 | const HomePage({Key? key, required this.user}) : super(key: key); 18 | @override 19 | _HomePageState createState() => _HomePageState(); 20 | } 21 | 22 | class _HomePageState extends State { 23 | late CarouselController _controller; 24 | int _page = 0; 25 | final int goal = 2500; 26 | int todaysIntake = 0; 27 | List intakes = []; 28 | 29 | @override 30 | void initState() { 31 | super.initState(); 32 | _controller = CarouselController(); 33 | _getIntakes(); 34 | } 35 | 36 | _getIntakes() async { 37 | intakes = await ApiService.instance.getIntakes(); 38 | todaysIntake = 0; 39 | intakes.forEach((element) { 40 | todaysIntake += element.amount; 41 | }); 42 | if (mounted) setState(() {}); 43 | // “Measurng programming progress by lines of code is like measuring aircraft building progress by weight.” 44 | } 45 | 46 | @override 47 | Widget build(BuildContext context) { 48 | return Scaffold( 49 | appBar: AppBar( 50 | title: Text('FlAppwrite Water Tracker'), 51 | elevation: 0, 52 | actions: [ 53 | IconButton( 54 | icon: Icon(Icons.exit_to_app), 55 | onPressed: () async { 56 | await ApiService.instance.logout(); 57 | Navigator.pushReplacement( 58 | context, 59 | MaterialPageRoute(builder: (_) => MainScreen()), 60 | ); 61 | }, 62 | ), 63 | ], 64 | ), 65 | body: Padding( 66 | padding: const EdgeInsets.all(16.0), 67 | child: Column( 68 | crossAxisAlignment: CrossAxisAlignment.stretch, 69 | children: [ 70 | ListTile( 71 | title: Text( 72 | DateFormat.yMMMEd().format(DateTime.now()), 73 | textAlign: TextAlign.center, 74 | style: Theme.of(context) 75 | .textTheme 76 | .headline5 77 | ?.copyWith(fontWeight: FontWeight.bold), 78 | ), 79 | trailing: IconButton( 80 | icon: Icon(Icons.history), 81 | onPressed: () async { 82 | await Navigator.push( 83 | context, 84 | MaterialPageRoute( 85 | builder: (_) => HistoryPage(), 86 | ), 87 | ); 88 | _getIntakes(); 89 | }, 90 | ), 91 | ), 92 | Expanded( 93 | child: Center( 94 | child: AspectRatio( 95 | aspectRatio: 1.0, 96 | child: LiquidCircularProgressIndicator( 97 | direction: Axis.vertical, 98 | borderWidth: 1, 99 | borderColor: Colors.blue, 100 | value: todaysIntake / goal, 101 | center: Text( 102 | "$todaysIntake / $goal ml", 103 | style: TextStyle( 104 | fontSize: 20, 105 | fontWeight: FontWeight.bold, 106 | ), 107 | ), 108 | backgroundColor: Colors.grey.shade200, 109 | valueColor: AlwaysStoppedAnimation(Colors.blue), 110 | ), 111 | ), 112 | ), 113 | ), 114 | const SizedBox(height: 20.0), 115 | Text( 116 | "Drink water,\nstay healthy,\nstay fit.".toUpperCase(), 117 | textAlign: TextAlign.center, 118 | style: Theme.of(context).textTheme.headline6, 119 | ), 120 | const SizedBox(height: 20.0), 121 | Row( 122 | children: [ 123 | IconButton( 124 | onPressed: () { 125 | _controller.jumpToPage(--_page); 126 | }, 127 | icon: Icon(Icons.keyboard_arrow_left), 128 | ), 129 | Expanded( 130 | child: CarouselSlider( 131 | carouselController: _controller, 132 | options: CarouselOptions( 133 | height: 70, 134 | viewportFraction: 0.8, 135 | initialPage: 0, 136 | enableInfiniteScroll: true, 137 | reverse: false, 138 | autoPlay: false, 139 | enlargeCenterPage: false, 140 | scrollDirection: Axis.horizontal, 141 | onPageChanged: (page, _) { 142 | setState(() { 143 | _page = page; 144 | }); 145 | }), 146 | items: [ 147 | WaterIntakeButton( 148 | label: "100 ml", 149 | onPressed: () => _waterIntake(100), 150 | ), 151 | WaterIntakeButton( 152 | label: "200 ml", 153 | onPressed: () => _waterIntake(200), 154 | ), 155 | WaterIntakeButton( 156 | label: "300 ml", 157 | onPressed: () => _waterIntake(300), 158 | ), 159 | WaterIntakeButton( 160 | label: "400 ml", 161 | onPressed: () => _waterIntake(400), 162 | ), 163 | WaterIntakeButton( 164 | label: "500 ml", 165 | onPressed: () => _waterIntake(500), 166 | ), 167 | ], 168 | ), 169 | ), 170 | IconButton( 171 | onPressed: () { 172 | _controller.jumpToPage(++_page); 173 | }, 174 | icon: Icon(Icons.keyboard_arrow_right), 175 | ), 176 | ], 177 | ), 178 | ], 179 | ), 180 | ), 181 | ); 182 | } 183 | 184 | void _waterIntake(int amount) async { 185 | setState(() { 186 | todaysIntake += amount; 187 | }); 188 | final data = WaterIntake( 189 | amount: amount, 190 | date: DateTime.now(), 191 | userId: widget.user.$id, 192 | id: "", 193 | ); 194 | try { 195 | await ApiService.instance.addIntake( 196 | intake: data, 197 | read: ['user:${widget.user.$id}'], 198 | write: ['user:${widget.user.$id}'], 199 | ); 200 | _getIntakes(); 201 | } on AppwriteException catch (e) { 202 | print(e.message); 203 | } catch (e) { 204 | print(e); 205 | } 206 | } 207 | } 208 | 209 | class WaterIntakeButton extends StatelessWidget { 210 | final String label; 211 | final IconData icon; 212 | final void Function()? onPressed; 213 | 214 | const WaterIntakeButton({ 215 | Key? key, 216 | required this.label, 217 | this.onPressed, 218 | this.icon = FontAwesomeIcons.coffee, 219 | }) : super(key: key); 220 | 221 | @override 222 | Widget build(BuildContext context) { 223 | return Padding( 224 | padding: const EdgeInsets.all(8.0), 225 | child: ElevatedButton.icon( 226 | onPressed: onPressed, 227 | label: Text(label), 228 | icon: Icon(icon), 229 | style: ElevatedButton.styleFrom( 230 | primary: Colors.white, 231 | onPrimary: Theme.of(context).primaryColor, 232 | shape: RoundedRectangleBorder( 233 | borderRadius: BorderRadius.circular(30.0), 234 | ), 235 | ), 236 | ), 237 | ); 238 | } 239 | } 240 | -------------------------------------------------------------------------------- /lib/pages/login.dart: -------------------------------------------------------------------------------- 1 | import 'package:appwrite/appwrite.dart'; 2 | import 'package:flappwrite_water_tracker/data/service/api_service.dart'; 3 | import 'package:flappwrite_water_tracker/main.dart'; 4 | import 'package:flutter/material.dart'; 5 | import './signup.dart'; 6 | 7 | class LoginPage extends StatefulWidget { 8 | @override 9 | _LoginPageState createState() => _LoginPageState(); 10 | } 11 | 12 | class _LoginPageState extends State { 13 | late TextEditingController _email; 14 | late TextEditingController _password; 15 | 16 | @override 17 | void initState() { 18 | super.initState(); 19 | _email = TextEditingController(); 20 | _password = TextEditingController(); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Scaffold( 26 | body: SafeArea( 27 | child: ListView( 28 | padding: const EdgeInsets.all(16.0), 29 | children: [ 30 | Text( 31 | "Login", 32 | textAlign: TextAlign.center, 33 | style: Theme.of(context).textTheme.headline3, 34 | ), 35 | const SizedBox(height: 30.0), 36 | TextField( 37 | controller: _email, 38 | decoration: InputDecoration( 39 | border: OutlineInputBorder( 40 | borderRadius: BorderRadius.circular(8.0), 41 | ), 42 | hintText: "email"), 43 | ), 44 | const SizedBox(height: 10.0), 45 | TextField( 46 | controller: _password, 47 | decoration: InputDecoration( 48 | border: OutlineInputBorder( 49 | borderRadius: BorderRadius.circular(8.0), 50 | ), 51 | hintText: "password", 52 | ), 53 | obscureText: true, 54 | ), 55 | const SizedBox(height: 20.0), 56 | ElevatedButton( 57 | onPressed: () async { 58 | //login user 59 | try { 60 | await ApiService.instance 61 | .login(email: _email.text, password: _password.text); 62 | Navigator.pushReplacement( 63 | context, 64 | MaterialPageRoute(builder: (_) => MainScreen()), 65 | ); 66 | } on AppwriteException catch (e) { 67 | //“One of the main causes of the fall of the Roman Empire was that lacking zero, they had no way to indicate successful termination of their C programs.” 68 | ScaffoldMessenger.of(context).showSnackBar( 69 | SnackBar( 70 | content: Text(e.message ?? "Error unknown"), 71 | ), 72 | ); 73 | } 74 | }, 75 | child: Text("Login"), 76 | ), 77 | const SizedBox(height: 10.0), 78 | ElevatedButton( 79 | style: ElevatedButton.styleFrom( 80 | primary: Colors.grey.shade300, 81 | onPrimary: Colors.black, 82 | ), 83 | onPressed: () async { 84 | //login user 85 | try { 86 | await ApiService.instance.anonymousLogin(); 87 | Navigator.pushReplacement( 88 | context, 89 | MaterialPageRoute(builder: (_) => MainScreen()), 90 | ); 91 | } on AppwriteException catch (e) { 92 | //“One of the main causes of the fall of the Roman Empire was that lacking zero, they had no way to indicate successful termination of their C programs.” 93 | ScaffoldMessenger.of(context).showSnackBar( 94 | SnackBar( 95 | content: Text(e.message ?? "Error unknown"), 96 | ), 97 | ); 98 | } 99 | }, 100 | child: Text("Login Anonymously"), 101 | ), 102 | const SizedBox(height: 10.0), 103 | TextButton( 104 | onPressed: () { 105 | Navigator.push( 106 | context, 107 | MaterialPageRoute( 108 | builder: (_) => SignupPage(), 109 | ), 110 | ); 111 | }, 112 | child: Text("Not registered? Sign up."), 113 | ), 114 | ], 115 | ), 116 | ), 117 | ); 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /lib/pages/signup.dart: -------------------------------------------------------------------------------- 1 | import 'package:appwrite/appwrite.dart'; 2 | import 'package:flappwrite_water_tracker/data/service/api_service.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class SignupPage extends StatefulWidget { 6 | @override 7 | _SignupPageState createState() => _SignupPageState(); 8 | } 9 | 10 | class _SignupPageState extends State { 11 | late TextEditingController _email; 12 | late TextEditingController _password; 13 | late TextEditingController _name; 14 | 15 | @override 16 | void initState() { 17 | super.initState(); 18 | _email = TextEditingController(); 19 | _password = TextEditingController(); 20 | _name = TextEditingController(); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Scaffold( 26 | body: SafeArea( 27 | child: ListView( 28 | padding: const EdgeInsets.all(16.0), 29 | children: [ 30 | Text( 31 | "Sign Up", 32 | textAlign: TextAlign.center, 33 | style: Theme.of(context).textTheme.headline3, 34 | ), 35 | const SizedBox(height: 30.0), 36 | const SizedBox(height: 10.0), 37 | TextField( 38 | controller: _name, 39 | decoration: InputDecoration( 40 | border: OutlineInputBorder( 41 | borderRadius: BorderRadius.circular(8.0), 42 | ), 43 | hintText: "name", 44 | ), 45 | ), 46 | const SizedBox(height: 10.0), 47 | TextField( 48 | controller: _email, 49 | decoration: InputDecoration( 50 | border: OutlineInputBorder( 51 | borderRadius: BorderRadius.circular(8.0), 52 | ), 53 | hintText: "email"), 54 | ), 55 | const SizedBox(height: 20.0), 56 | TextField( 57 | controller: _password, 58 | decoration: InputDecoration( 59 | border: OutlineInputBorder( 60 | borderRadius: BorderRadius.circular(8.0), 61 | ), 62 | hintText: "password", 63 | ), 64 | obscureText: true, 65 | ), 66 | const SizedBox(height: 20.0), 67 | ElevatedButton( 68 | onPressed: () async { 69 | //login user 70 | try { 71 | await ApiService.instance.signup( 72 | name: _name.text, 73 | email: _email.text, 74 | password: _password.text, 75 | ); 76 | ScaffoldMessenger.of(context).showSnackBar( 77 | SnackBar( 78 | content: Text("Successfully signed up. Login to access."), 79 | ), 80 | ); 81 | Navigator.pop(context); 82 | } on AppwriteException catch (e) { 83 | ScaffoldMessenger.of(context).showSnackBar( 84 | SnackBar( 85 | content: Text(e.message ?? "Error unknown"), 86 | ), 87 | ); 88 | } 89 | }, 90 | child: Text("Signup"), 91 | ), 92 | const SizedBox(height: 10.0), 93 | TextButton( 94 | onPressed: () { 95 | Navigator.pop(context); 96 | }, 97 | child: Text("Already registered? Login."), 98 | ), 99 | ], 100 | ), 101 | ), 102 | ); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /lib/pages/splash.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:liquid_progress_indicator_ns/liquid_progress_indicator.dart'; 3 | 4 | //"A bug reproduced is a bug half solved." 5 | class SplashPage extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | backgroundColor: Colors.blue.shade100, 10 | body: Column( 11 | crossAxisAlignment: CrossAxisAlignment.stretch, 12 | mainAxisAlignment: MainAxisAlignment.center, 13 | children: [ 14 | Center( 15 | child: Container( 16 | height: 100, 17 | width: 100, 18 | child: LiquidCircularProgressIndicator( 19 | borderWidth: 1.0, 20 | borderColor: Colors.blue, 21 | value: 0.5, 22 | ), 23 | ), 24 | ), 25 | const SizedBox(height: 10.0), 26 | Text( 27 | "Stay healthy,\nstay fit".toUpperCase(), 28 | textAlign: TextAlign.center, 29 | style: Theme.of(context).textTheme.headline6, 30 | ), 31 | ], 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/res/app_constants.dart: -------------------------------------------------------------------------------- 1 | class AppConstant { 2 | static const String endpoint = 'https://demo.appwrite.io/v1'; 3 | //“In C we had to code our own bugs. In C++ we can inherit them.” 4 | static const String project = '607b7f4a080c8'; 5 | static const String entriesCollection = 'intakes'; 6 | } 7 | -------------------------------------------------------------------------------- /lib/widgets/built_with_appwrite.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | import 'package:url_launcher/url_launcher.dart'; 4 | 5 | class BuiltWithAppwriteWrapper extends StatelessWidget { 6 | const BuiltWithAppwriteWrapper({Key? key, required this.child}) 7 | : super(key: key); 8 | final Widget child; 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | body: Column( 13 | children: [ 14 | Expanded( 15 | child: child, 16 | ), 17 | const SizedBox(height: 10.0), 18 | GestureDetector( 19 | onTap: () { 20 | try { 21 | launchUrl(Uri.parse('https://appwrite.io')); 22 | } catch (e) {} 23 | }, 24 | child: SvgPicture.asset('assets/built-with-appwrite-hr.svg')), 25 | const SizedBox(height: 10.0), 26 | ], 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | project(runner LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "flappwrite_water_tracker") 5 | set(APPLICATION_ID "io.appwrite.flappwrite_water_tracker") 6 | 7 | cmake_policy(SET CMP0063 NEW) 8 | 9 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 10 | 11 | # Configure build options. 12 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 13 | set(CMAKE_BUILD_TYPE "Debug" CACHE 14 | STRING "Flutter build mode" FORCE) 15 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 16 | "Debug" "Profile" "Release") 17 | endif() 18 | 19 | # Compilation settings that should be applied to most targets. 20 | function(APPLY_STANDARD_SETTINGS TARGET) 21 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 22 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 23 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 24 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 25 | endfunction() 26 | 27 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 28 | 29 | # Flutter library and tool build rules. 30 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 31 | 32 | # System-level dependencies. 33 | find_package(PkgConfig REQUIRED) 34 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 35 | 36 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 37 | 38 | # Application build 39 | add_executable(${BINARY_NAME} 40 | "main.cc" 41 | "my_application.cc" 42 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 43 | ) 44 | apply_standard_settings(${BINARY_NAME}) 45 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 46 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 47 | add_dependencies(${BINARY_NAME} flutter_assemble) 48 | # Only the install-generated bundle's copy of the executable will launch 49 | # correctly, since the resources must in the right relative locations. To avoid 50 | # people trying to run the unbundled copy, put it in a subdirectory instead of 51 | # the default top-level location. 52 | set_target_properties(${BINARY_NAME} 53 | PROPERTIES 54 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" 55 | ) 56 | 57 | # Generated plugin build rules, which manage building the plugins and adding 58 | # them to the application. 59 | include(flutter/generated_plugins.cmake) 60 | 61 | 62 | # === Installation === 63 | # By default, "installing" just makes a relocatable bundle in the build 64 | # directory. 65 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 66 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 67 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 68 | endif() 69 | 70 | # Start with a clean build bundle directory every time. 71 | install(CODE " 72 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 73 | " COMPONENT Runtime) 74 | 75 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 76 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 77 | 78 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 79 | COMPONENT Runtime) 80 | 81 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 82 | COMPONENT Runtime) 83 | 84 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 85 | COMPONENT Runtime) 86 | 87 | if(PLUGIN_BUNDLED_LIBRARIES) 88 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 89 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 90 | COMPONENT Runtime) 91 | endif() 92 | 93 | # Fully re-copy the assets directory on each build to avoid having stale files 94 | # from a previous install. 95 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 96 | install(CODE " 97 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 98 | " COMPONENT Runtime) 99 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 100 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 101 | 102 | # Install the AOT library on non-Debug builds only. 103 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 104 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 105 | COMPONENT Runtime) 106 | endif() 107 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 4 | 5 | # Configuration provided via flutter tool. 6 | include(${EPHEMERAL_DIR}/generated_config.cmake) 7 | 8 | # TODO: Move the rest of this into files in ephemeral. See 9 | # https://github.com/flutter/flutter/issues/57146. 10 | 11 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 12 | # which isn't available in 3.10. 13 | function(list_prepend LIST_NAME PREFIX) 14 | set(NEW_LIST "") 15 | foreach(element ${${LIST_NAME}}) 16 | list(APPEND NEW_LIST "${PREFIX}${element}") 17 | endforeach(element) 18 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 19 | endfunction() 20 | 21 | # === Flutter Library === 22 | # System-level dependencies. 23 | find_package(PkgConfig REQUIRED) 24 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 25 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 26 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 27 | pkg_check_modules(BLKID REQUIRED IMPORTED_TARGET blkid) 28 | pkg_check_modules(LZMA REQUIRED IMPORTED_TARGET liblzma) 29 | 30 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 31 | 32 | # Published to parent scope for install step. 33 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 34 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 35 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 36 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 37 | 38 | list(APPEND FLUTTER_LIBRARY_HEADERS 39 | "fl_basic_message_channel.h" 40 | "fl_binary_codec.h" 41 | "fl_binary_messenger.h" 42 | "fl_dart_project.h" 43 | "fl_engine.h" 44 | "fl_json_message_codec.h" 45 | "fl_json_method_codec.h" 46 | "fl_message_codec.h" 47 | "fl_method_call.h" 48 | "fl_method_channel.h" 49 | "fl_method_codec.h" 50 | "fl_method_response.h" 51 | "fl_plugin_registrar.h" 52 | "fl_plugin_registry.h" 53 | "fl_standard_message_codec.h" 54 | "fl_standard_method_codec.h" 55 | "fl_string_codec.h" 56 | "fl_value.h" 57 | "fl_view.h" 58 | "flutter_linux.h" 59 | ) 60 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 61 | add_library(flutter INTERFACE) 62 | target_include_directories(flutter INTERFACE 63 | "${EPHEMERAL_DIR}" 64 | ) 65 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 66 | target_link_libraries(flutter INTERFACE 67 | PkgConfig::GTK 68 | PkgConfig::GLIB 69 | PkgConfig::GIO 70 | PkgConfig::BLKID 71 | PkgConfig::LZMA 72 | ) 73 | add_dependencies(flutter flutter_assemble) 74 | 75 | # === Flutter tool backend === 76 | # _phony_ is a non-existent file to force this command to run every time, 77 | # since currently there's no way to get a full input/output list from the 78 | # flutter tool. 79 | add_custom_command( 80 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 81 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 82 | COMMAND ${CMAKE_COMMAND} -E env 83 | ${FLUTTER_TOOL_ENVIRONMENT} 84 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 85 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 86 | VERBATIM 87 | ) 88 | add_custom_target(flutter_assemble DEPENDS 89 | "${FLUTTER_LIBRARY}" 90 | ${FLUTTER_LIBRARY_HEADERS} 91 | ) 92 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 7 | ) 8 | 9 | set(PLUGIN_BUNDLED_LIBRARIES) 10 | 11 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 12 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 13 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 14 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 15 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 16 | endforeach(plugin) 17 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | // “Without C we only have Obol, Pasal, and BASI.” -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen *screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "flappwrite_water_tracker"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } 47 | else { 48 | gtk_window_set_title(window, "flappwrite_water_tracker"); 49 | } 50 | 51 | gtk_window_set_default_size(window, 1280, 720); 52 | gtk_widget_show(GTK_WIDGET(window)); 53 | 54 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 55 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 56 | 57 | FlView* view = fl_view_new(project); 58 | gtk_widget_show(GTK_WIDGET(view)); 59 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 60 | 61 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 62 | 63 | gtk_widget_grab_focus(GTK_WIDGET(view)); 64 | } 65 | 66 | // Implements GApplication::local_command_line. 67 | static gboolean my_application_local_command_line(GApplication* application, gchar ***arguments, int *exit_status) { 68 | MyApplication* self = MY_APPLICATION(application); 69 | // Strip out the first argument as it is the binary name. 70 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 71 | 72 | g_autoptr(GError) error = nullptr; 73 | if (!g_application_register(application, nullptr, &error)) { 74 | g_warning("Failed to register: %s", error->message); 75 | *exit_status = 1; 76 | return TRUE; 77 | } 78 | 79 | g_application_activate(application); 80 | *exit_status = 0; 81 | 82 | return TRUE; 83 | } 84 | 85 | // Implements GObject::dispose. 86 | static void my_application_dispose(GObject *object) { 87 | MyApplication* self = MY_APPLICATION(object); 88 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 89 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 90 | } 91 | 92 | static void my_application_class_init(MyApplicationClass* klass) { 93 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 94 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 95 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 96 | } 97 | 98 | static void my_application_init(MyApplication* self) {} 99 | 100 | MyApplication* my_application_new() { 101 | return MY_APPLICATION(g_object_new(my_application_get_type(), 102 | "application-id", APPLICATION_ID, 103 | nullptr)); 104 | } 105 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | appwrite: 5 | dependency: "direct main" 6 | description: 7 | name: appwrite 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "4.0.2" 11 | async: 12 | dependency: transitive 13 | description: 14 | name: async 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.8.2" 18 | boolean_selector: 19 | dependency: transitive 20 | description: 21 | name: boolean_selector 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.1.0" 25 | carousel_slider: 26 | dependency: "direct main" 27 | description: 28 | name: carousel_slider 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "4.0.0" 32 | characters: 33 | dependency: transitive 34 | description: 35 | name: characters 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.2.0" 39 | charcode: 40 | dependency: transitive 41 | description: 42 | name: charcode 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.3.1" 46 | clock: 47 | dependency: transitive 48 | description: 49 | name: clock 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.1.0" 53 | collection: 54 | dependency: transitive 55 | description: 56 | name: collection 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.15.0" 60 | cookie_jar: 61 | dependency: transitive 62 | description: 63 | name: cookie_jar 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "3.0.1" 67 | crypto: 68 | dependency: transitive 69 | description: 70 | name: crypto 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "3.0.1" 74 | device_info_plus: 75 | dependency: transitive 76 | description: 77 | name: device_info_plus 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "3.2.3" 81 | device_info_plus_linux: 82 | dependency: transitive 83 | description: 84 | name: device_info_plus_linux 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "2.1.1" 88 | device_info_plus_macos: 89 | dependency: transitive 90 | description: 91 | name: device_info_plus_macos 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "2.2.3" 95 | device_info_plus_platform_interface: 96 | dependency: transitive 97 | description: 98 | name: device_info_plus_platform_interface 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "2.3.0+1" 102 | device_info_plus_web: 103 | dependency: transitive 104 | description: 105 | name: device_info_plus_web 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "2.1.0" 109 | device_info_plus_windows: 110 | dependency: transitive 111 | description: 112 | name: device_info_plus_windows 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "2.1.1" 116 | fake_async: 117 | dependency: transitive 118 | description: 119 | name: fake_async 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "1.2.0" 123 | ffi: 124 | dependency: transitive 125 | description: 126 | name: ffi 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.1.2" 130 | file: 131 | dependency: transitive 132 | description: 133 | name: file 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "6.1.2" 137 | flutter: 138 | dependency: "direct main" 139 | description: flutter 140 | source: sdk 141 | version: "0.0.0" 142 | flutter_svg: 143 | dependency: "direct main" 144 | description: 145 | name: flutter_svg 146 | url: "https://pub.dartlang.org" 147 | source: hosted 148 | version: "1.0.3" 149 | flutter_test: 150 | dependency: "direct dev" 151 | description: flutter 152 | source: sdk 153 | version: "0.0.0" 154 | flutter_web_auth: 155 | dependency: transitive 156 | description: 157 | name: flutter_web_auth 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "0.4.1" 161 | flutter_web_plugins: 162 | dependency: transitive 163 | description: flutter 164 | source: sdk 165 | version: "0.0.0" 166 | font_awesome_flutter: 167 | dependency: "direct main" 168 | description: 169 | name: font_awesome_flutter 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "10.1.0" 173 | http: 174 | dependency: transitive 175 | description: 176 | name: http 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "0.13.4" 180 | http_parser: 181 | dependency: transitive 182 | description: 183 | name: http_parser 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "4.0.0" 187 | intl: 188 | dependency: "direct main" 189 | description: 190 | name: intl 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "0.17.0" 194 | js: 195 | dependency: transitive 196 | description: 197 | name: js 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "0.6.3" 201 | liquid_progress_indicator_ns: 202 | dependency: "direct main" 203 | description: 204 | name: liquid_progress_indicator_ns 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "1.0.0" 208 | matcher: 209 | dependency: transitive 210 | description: 211 | name: matcher 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "0.12.11" 215 | material_color_utilities: 216 | dependency: transitive 217 | description: 218 | name: material_color_utilities 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "0.1.3" 222 | meta: 223 | dependency: transitive 224 | description: 225 | name: meta 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.7.0" 229 | package_info_plus: 230 | dependency: transitive 231 | description: 232 | name: package_info_plus 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "1.4.2" 236 | package_info_plus_linux: 237 | dependency: transitive 238 | description: 239 | name: package_info_plus_linux 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "1.0.5" 243 | package_info_plus_macos: 244 | dependency: transitive 245 | description: 246 | name: package_info_plus_macos 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "1.3.0" 250 | package_info_plus_platform_interface: 251 | dependency: transitive 252 | description: 253 | name: package_info_plus_platform_interface 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "1.0.2" 257 | package_info_plus_web: 258 | dependency: transitive 259 | description: 260 | name: package_info_plus_web 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "1.0.5" 264 | package_info_plus_windows: 265 | dependency: transitive 266 | description: 267 | name: package_info_plus_windows 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "1.0.5" 271 | path: 272 | dependency: transitive 273 | description: 274 | name: path 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "1.8.0" 278 | path_drawing: 279 | dependency: transitive 280 | description: 281 | name: path_drawing 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "1.0.0" 285 | path_parsing: 286 | dependency: transitive 287 | description: 288 | name: path_parsing 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "1.0.0" 292 | path_provider: 293 | dependency: transitive 294 | description: 295 | name: path_provider 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "2.0.9" 299 | path_provider_android: 300 | dependency: transitive 301 | description: 302 | name: path_provider_android 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "2.0.12" 306 | path_provider_ios: 307 | dependency: transitive 308 | description: 309 | name: path_provider_ios 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "2.0.8" 313 | path_provider_linux: 314 | dependency: transitive 315 | description: 316 | name: path_provider_linux 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "2.1.5" 320 | path_provider_macos: 321 | dependency: transitive 322 | description: 323 | name: path_provider_macos 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "2.0.5" 327 | path_provider_platform_interface: 328 | dependency: transitive 329 | description: 330 | name: path_provider_platform_interface 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "2.0.3" 334 | path_provider_windows: 335 | dependency: transitive 336 | description: 337 | name: path_provider_windows 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "2.0.5" 341 | petitparser: 342 | dependency: transitive 343 | description: 344 | name: petitparser 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "4.4.0" 348 | platform: 349 | dependency: transitive 350 | description: 351 | name: platform 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "3.1.0" 355 | plugin_platform_interface: 356 | dependency: transitive 357 | description: 358 | name: plugin_platform_interface 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "2.1.2" 362 | process: 363 | dependency: transitive 364 | description: 365 | name: process 366 | url: "https://pub.dartlang.org" 367 | source: hosted 368 | version: "4.2.4" 369 | sky_engine: 370 | dependency: transitive 371 | description: flutter 372 | source: sdk 373 | version: "0.0.99" 374 | source_span: 375 | dependency: transitive 376 | description: 377 | name: source_span 378 | url: "https://pub.dartlang.org" 379 | source: hosted 380 | version: "1.8.1" 381 | stack_trace: 382 | dependency: transitive 383 | description: 384 | name: stack_trace 385 | url: "https://pub.dartlang.org" 386 | source: hosted 387 | version: "1.10.0" 388 | stream_channel: 389 | dependency: transitive 390 | description: 391 | name: stream_channel 392 | url: "https://pub.dartlang.org" 393 | source: hosted 394 | version: "2.1.0" 395 | string_scanner: 396 | dependency: transitive 397 | description: 398 | name: string_scanner 399 | url: "https://pub.dartlang.org" 400 | source: hosted 401 | version: "1.1.0" 402 | term_glyph: 403 | dependency: transitive 404 | description: 405 | name: term_glyph 406 | url: "https://pub.dartlang.org" 407 | source: hosted 408 | version: "1.2.0" 409 | test_api: 410 | dependency: transitive 411 | description: 412 | name: test_api 413 | url: "https://pub.dartlang.org" 414 | source: hosted 415 | version: "0.4.8" 416 | typed_data: 417 | dependency: transitive 418 | description: 419 | name: typed_data 420 | url: "https://pub.dartlang.org" 421 | source: hosted 422 | version: "1.3.0" 423 | url_launcher: 424 | dependency: "direct main" 425 | description: 426 | name: url_launcher 427 | url: "https://pub.dartlang.org" 428 | source: hosted 429 | version: "6.1.0" 430 | url_launcher_android: 431 | dependency: transitive 432 | description: 433 | name: url_launcher_android 434 | url: "https://pub.dartlang.org" 435 | source: hosted 436 | version: "6.0.15" 437 | url_launcher_ios: 438 | dependency: transitive 439 | description: 440 | name: url_launcher_ios 441 | url: "https://pub.dartlang.org" 442 | source: hosted 443 | version: "6.0.15" 444 | url_launcher_linux: 445 | dependency: transitive 446 | description: 447 | name: url_launcher_linux 448 | url: "https://pub.dartlang.org" 449 | source: hosted 450 | version: "3.0.0" 451 | url_launcher_macos: 452 | dependency: transitive 453 | description: 454 | name: url_launcher_macos 455 | url: "https://pub.dartlang.org" 456 | source: hosted 457 | version: "3.0.0" 458 | url_launcher_platform_interface: 459 | dependency: transitive 460 | description: 461 | name: url_launcher_platform_interface 462 | url: "https://pub.dartlang.org" 463 | source: hosted 464 | version: "2.0.5" 465 | url_launcher_web: 466 | dependency: transitive 467 | description: 468 | name: url_launcher_web 469 | url: "https://pub.dartlang.org" 470 | source: hosted 471 | version: "2.0.9" 472 | url_launcher_windows: 473 | dependency: transitive 474 | description: 475 | name: url_launcher_windows 476 | url: "https://pub.dartlang.org" 477 | source: hosted 478 | version: "3.0.0" 479 | vector_math: 480 | dependency: transitive 481 | description: 482 | name: vector_math 483 | url: "https://pub.dartlang.org" 484 | source: hosted 485 | version: "2.1.1" 486 | web_socket_channel: 487 | dependency: transitive 488 | description: 489 | name: web_socket_channel 490 | url: "https://pub.dartlang.org" 491 | source: hosted 492 | version: "2.1.0" 493 | win32: 494 | dependency: transitive 495 | description: 496 | name: win32 497 | url: "https://pub.dartlang.org" 498 | source: hosted 499 | version: "2.5.1" 500 | xdg_directories: 501 | dependency: transitive 502 | description: 503 | name: xdg_directories 504 | url: "https://pub.dartlang.org" 505 | source: hosted 506 | version: "0.2.0+1" 507 | xml: 508 | dependency: transitive 509 | description: 510 | name: xml 511 | url: "https://pub.dartlang.org" 512 | source: hosted 513 | version: "5.3.1" 514 | sdks: 515 | dart: ">=2.15.0 <3.0.0" 516 | flutter: ">=2.10.0" 517 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flappwrite_water_tracker 2 | description: A new Flutter project. 3 | publish_to: 'none' 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: ">=2.12.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | appwrite: ^4.0.2 13 | carousel_slider: ^4.0.0-nullsafety.0 14 | font_awesome_flutter: ^10.1.0 15 | intl: ^0.17.0 16 | liquid_progress_indicator_ns: ^1.0.0 17 | flutter_svg: ^1.0.3 18 | url_launcher: ^6.1.0 19 | 20 | dev_dependencies: 21 | flutter_test: 22 | sdk: flutter 23 | 24 | flutter: 25 | uses-material-design: true 26 | assets: 27 | - assets/ 28 | -------------------------------------------------------------------------------- /scripts/.gitignore: -------------------------------------------------------------------------------- 1 | .dart_tool/ 2 | .packages -------------------------------------------------------------------------------- /scripts/create_collections.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_appwrite/dart_appwrite.dart'; 2 | import 'package:dart_appwrite/models.dart'; 3 | 4 | Client client = Client(endPoint: "https://demo.appwrite.io/v1") 5 | .setProject('607b7f4a080c8') 6 | .setKey( 7 | "f3a2ee0a40d4ae49e629bf96e4af6dba0343c16a69bf3dca5a123530da1f104ead1057cf33f2a4e21813d3e89a7bfd75de634c82da55925726f3b905fb9b16d60d39b80b0d09c6542c893586644640a111acbf8cf3803549fb30e1d8acfdde3f41afd2ddbd045891fc0ffb45120a54864c65886b8dd6f71e5eddc3e4f4fe510d"); 8 | Database db = Database(client); 9 | final collectionId = 'intakes'; 10 | void main() async { 11 | //create entries collection 12 | Collection collection; 13 | try { 14 | collection = await getCollection(collectionId); 15 | } on AppwriteException catch (e) { 16 | print(e.message); 17 | } 18 | if (collection == null) { 19 | await createCollection(); 20 | } else { 21 | print("Collection Entries Already exists"); 22 | } 23 | } 24 | 25 | createCollection() async { 26 | final res = await db.createCollection( 27 | collectionId: collectionId, 28 | name: 'Intakes', 29 | permission: 'document', 30 | read: ['role:member'], 31 | write: ['role:member'], 32 | ); 33 | await db.createStringAttribute( 34 | collectionId: collectionId, key: 'userId', size: 36, xrequired: true); 35 | await db.createIntegerAttribute( 36 | collectionId: collectionId, key: 'date', xrequired: true); 37 | await db.createIntegerAttribute( 38 | collectionId: collectionId, key: 'amount', xrequired: true); 39 | 40 | // to make sure that attributes are ready 41 | await Future.delayed(Duration(seconds: 5)); 42 | await db.createIndex( 43 | key: 'date_index', 44 | attributes: ['date'], 45 | collectionId: collectionId, 46 | type: 'key', 47 | orders: ['asc']); 48 | print(res.toMap()); 49 | print("Collection Entries created"); 50 | } 51 | 52 | Future getCollection(String collectionId) async { 53 | try { 54 | final res = await db.getCollection(collectionId: collectionId); 55 | return res; 56 | } on AppwriteException catch (e) { 57 | print(e); 58 | return null; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /scripts/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.9.0" 11 | charcode: 12 | dependency: transitive 13 | description: 14 | name: charcode 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.2.0" 18 | collection: 19 | dependency: transitive 20 | description: 21 | name: collection 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.15.0" 25 | dart_appwrite: 26 | dependency: "direct main" 27 | description: 28 | name: dart_appwrite 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "4.0.2" 32 | http: 33 | dependency: transitive 34 | description: 35 | name: http 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "0.13.4" 39 | http_parser: 40 | dependency: transitive 41 | description: 42 | name: http_parser 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "4.0.0" 46 | meta: 47 | dependency: transitive 48 | description: 49 | name: meta 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.3.0" 53 | path: 54 | dependency: transitive 55 | description: 56 | name: path 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.8.0" 60 | source_span: 61 | dependency: transitive 62 | description: 63 | name: source_span 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.8.1" 67 | string_scanner: 68 | dependency: transitive 69 | description: 70 | name: string_scanner 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.1.0" 74 | term_glyph: 75 | dependency: transitive 76 | description: 77 | name: term_glyph 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.2.0" 81 | typed_data: 82 | dependency: transitive 83 | description: 84 | name: typed_data 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "1.3.0" 88 | sdks: 89 | dart: ">=2.14.0 <3.0.0" 90 | -------------------------------------------------------------------------------- /scripts/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flappwrite_water_tracker_scripts 2 | description: Script to create collections 3 | publish_to: 'none' 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: ">=2.7.0 <3.0.0" 8 | 9 | dependencies: 10 | dart_appwrite: ^4.0.2 11 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | // “C++: An octopus made by nailing extra legs onto a dog.” 8 | 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_test/flutter_test.dart'; 11 | 12 | import 'package:flappwrite_water_tracker/main.dart'; 13 | 14 | void main() { 15 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 16 | // Build our app and trigger a frame. 17 | await tester.pumpWidget(MyApp()); 18 | 19 | // Verify that our counter starts at 0. 20 | expect(find.text('0'), findsOneWidget); 21 | expect(find.text('1'), findsNothing); 22 | 23 | // Tap the '+' icon and trigger a frame. 24 | await tester.tap(find.byIcon(Icons.add)); 25 | await tester.pump(); 26 | 27 | // Verify that our counter has incremented. 28 | expect(find.text('0'), findsNothing); 29 | expect(find.text('1'), findsOneWidget); 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/demo-watertracker-with-flutter/56397f0d37a0c39a25a3f1c83bdc0ce7c0ab86d8/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | flappwrite_water_tracker 32 | 33 | 34 | 35 | 38 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flappwrite_water_tracker", 3 | "short_name": "flappwrite_water_tracker", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | --------------------------------------------------------------------------------