Download apk here
Jsonserver was used for the database of this app. Follow the steps to setup the database on your local network and over the internet through ngrok.
Setup your project. Navigate to your project folder and paste in
npm init
Then install jsonserver
npm install --save jsonserver
Edit package.json and modify the scripts field
...
"scripts":{
"json:server": "json-server --watch db.json"
},
...
Create a new file db.json and paste in text below.
{
"todos": [
{
"id": "1",
"title": "Walk the dogs",
"description": "walk lil Aki and do 5 laps",
"done": "true",
"expanded": "false"
},
{
"id": "2",
"title": "Study for Calculus exam",
"description": "Study limits, infinite series, limits at infinity.",
"done": "true",
"expanded": "true"
}
]
}
To run your server type in
npm run json:server
To make your database available beyound your local server, download ngrok. Unzip it to install
unzip /path/to/ngrok.zip
Create an ngrok account and get your auth token then connect your account
ngrok authtoken YOUR_AUTH_TOKEN_HERE
Now do the command to expose your localhost and port. Remember that this has underlying risks.
ngrok http 3000
Your rest api can now be accessed anywhere through the outputted url. Copy and save this url, we will use this in the app later.
Flutter is used for this app, to setup Flutter, follow the instructions here. Then clone this repository
git clone https://github.com/jamescasia/toodoo.git
Navigate to lib\services and create a file called Env.dart. Paste in the following:
class Environment {
static String URL = "DATABASE_URL_FROM_PREVIOUS_STEPS";
}
Then on the terminal
flutter build apk --release
This will build the apk. When it’s done, navigate to toodoo\build\app\outputs\apk\release and copy the app-release.apk on your device or emulator.
Enjoy and be more productive with Toodoo
To run the tests, enter the command
flutter test