What I learned by creating a Appwrite + Flutter demo 
Tags: flutter, beginners, hacktoberfest, appwrite
Published: 2021-10-30 21:59:55

# Appwrite & Hackoberfest


I learned about Appwrite from the intro to this year's Hacktoberfest.  Still in my learn phase of programing I wanted to learn more about this project and what I could do for Hacktoberfest.  Last Hacktoberfest, the requirments of ciricleci's orb happened to be too much for me to accompish as a greenback.  This year I hope to build a demo app for Appwrite, knowing nothing about flutter and still in the basics of React and Django.  

### Dart and the wonders of syntax
Dart happend to be a wonderful language - a mix of syntax I had seen on my voyage of trying to decide what language to learn and Youtube rabbitholes of tutorials. The one thing I encountered for the first time was that Appwrite is new and changing fast, and syntax that had been rendered redundent.  This meant having to navigate and search the docs and forms to understand why the syntax in the tutorial was no longer useful and what to replace it with. With this I was able to see the progresson of Appwrite and how language evolves.

### The whole I was lost in ...
this `res.data` a getter for account.get had been made redundant. Being new to programing it took me days of Googling to understand and finally going for help on the Appwrite discord where I was helped to understand enough to fix the code. 
`
Future<User> getUser() async {
    final res = await account.get();
    return User.fromMap(res.data);
  }`
to this:

 ` Future<User?> getUser() async {
    try {
      return await account.get();
    } on AppwriteException catch (e) {
      debugPrint(e.message);
      return null;
    }
  }`

# The App and where I ended up

### Appwrite demo app count to quit

The app I decided to write was based on an old technique to quit smoking, where you initially start by counting the amount of cigarettes that you smoke. I also added in a cost element as incentive to decrease the count.  It seemed simple and would have been for someone more experienced.  I followed and learned a lot from  [React Bits (Damodar Lohani)](https://www.youtube.com/c/ReactBits) and learned a lot by Frankenstein'n bits from his tutorials.

### The App

Here are some screeen shots from the app. Only having a month I didn't do much in the design.

### Login Page
![login page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2q4werk6f4yvn1lk4vx.jpg)

### Sign up page
![signin page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4bhvmyh5lfpa6jf8w25u.jpg)

### The home page without data entered
![home page no data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2uz10vys359htjubixda.jpg)

### The home page after data has been added an the appwrite datadase updated
![home page data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uytgr1byh9yt2qtfkg68.jpg)

#### Keep on plugging away

There is a lot of refactoring and design to do within this project and I'm excited to continue with it.  Learning from Appwrite and Hactoberfest this October has shown me I have a long way to go but I am progressing, and that I do enjoy working on these projects.  I would implore anyone looking to learn more about Appwrite to follow [React Bits (Damodar Lohani)](https://www.youtube.com/c/ReactBits).