Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Implement todo app like other demos
Browse files Browse the repository at this point in the history
  • Loading branch information
stnguyen90 committed Dec 8, 2022
1 parent edda73c commit 7f56bee
Show file tree
Hide file tree
Showing 53 changed files with 1,555 additions and 146 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release

constants.dart
58 changes: 48 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,54 @@
# demo_todo_with_flutter
# 🔖 Todo With Flutter

A new Flutter project.
A simple todo app built with Flutter and Appwrite

## Getting Started
## 🎬 Getting Started

This project is a starting point for a Flutter application.
Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster.

A few resources to get you started if this is your first Flutter project:
### 🤘 Install Appwrite

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
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.

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
```
Note: If you setup Appwrite on your local machine, you will need to create a public IP so that your hosted frontend can access it.
```

We need to make a few configuration changes to your Appwrite server.

1. Add a new Flutter App (Android or iOS or both) in Appwrite:

![Console - Add platform](docs/Console%20-%20Add%20platform.png)

1. Android - `io.appwrite.demo_todo_with_flutter`
2. iOS/Mac OS - `io.appwrite.demoTodoWithFlutter`

2. Create a project in the Appwrite Console with id `demo-todos`.

3. Use the [Appwrite CLI](https://appwrite.io/docs/command-line) to deploy the required collections.

```shell
appwrite deploy collections
```

### 🚀 Run locally

Follow these instructions to run the demo app locally.

```shell
git clone https://github.com/appwrite/demo-todo-with-flutter.git
cd demo-todo-with-flutter
```

Make `lib/constant.dart` using `lib/constants.dart.example` as a template.

Now run the following commands and you should be good to go 💪🏼

```shell
flutter pub get
flutter run
```

## 🤕 Support

If you get stuck anywhere, hop onto one of our [support channels in discord](https://discord.com/invite/GSeTUeA) and we'd be delighted to help you out 🤝
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.demo_todo_with_flutter"
applicationId "io.appwrite.demo_todo_with_flutter"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion flutter.minSdkVersion
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.demo_todo_with_flutter">
package="io.appwrite.demo_todo_with_flutter">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.demo_todo_with_flutter">
package="io.appwrite.demo_todo_with_flutter">
<application
android:label="demo_todo_with_flutter"
android:name="${applicationName}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.demo_todo_with_flutter
package io.appwrite.demo_todo_with_flutter

import io.flutter.embedding.android.FlutterActivity

Expand Down
2 changes: 1 addition & 1 deletion android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.demo_todo_with_flutter">
package="io.appwrite.demo_todo_with_flutter">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
38 changes: 38 additions & 0 deletions appwrite.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"projectId": "demo-todo",
"projectName": "Demo Todo",
"collections": [
{
"$id": "todos",
"$createdAt": "",
"$updatedAt": "2022-10-20T21:25:50.163+00:00",
"$permissions": [
"create(\"users\")"
],
"databaseId": "default",
"name": "Todos",
"enabled": true,
"documentSecurity": true,
"attributes": [
{
"key": "content",
"type": "string",
"status": "available",
"required": true,
"array": false,
"size": 65535,
"default": null
},
{
"key": "isComplete",
"type": "boolean",
"status": "available",
"required": false,
"array": false,
"default": false
}
],
"indexes": []
}
]
}
3 changes: 3 additions & 0 deletions assets/appwrite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/flutter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7f56bee

Please sign in to comment.