Flutter + Django + Rest Framework

So a few days ago I made Yet Another Flutter Login (YAFL) which is a nice little starter for working with Firebase login. Sometimes though I like to fall back to good ol’ Django and Python so I did a little refactoring of YAFL, threw together a django server and made Flutter DRF. The only real changes from YAFL is how it connects using the excellent http and retry packages.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
final resp = await retry(
() async {
final response = await client
.post('$baseUrl$loginUrl', body: loginToJson(login), headers: {}..addAll(jsonHeader()))
.timeout(Duration(seconds: 5));
return response;
},
retryIf: (e) => e is SocketException || e is TimeoutException,
);
if (resp.statusCode == 200) {
var jsonResponse = json.decode(resp.body);
_token = jsonResponse['key'];
await storage.write(key: 'token', value: _token);
_isSignedIn = true;
prefs.setString('email', email);
} else {
caughtExc(resp.body.toString());
signout();
}

On the server side there is quite a lot of boilerplate to write so I opted to get up and running quickly with cookiecutter-django and django-rest-auth the result of which you can find at flutter_drf_django.

Hope it’s useful to someone else and if you have any feedback, please let me know :)

YAFL - Yet Another Flutter Login starterkit

Have you played around with Flutter yet? If not, you should. I have never been too keen on frameworks claiming to make it easy to write both Android and iOS apps from a single codebase, but Flutter seems to get it right. The biggest benefit for me is how easy it was to setup and the integration with Android Studio/Emulator/iOS Emulator. Granted, it is still fairly new just like the Dart language it is built upon (OK, Dart is 7 years old but still it is kind of new!) but if it keeps on its current trajectory it is likely to be the default goto for building apps.

Anyway, I digress. I always find the best way to start learning a new framework/language is to jump straight in. Pick something that you know you are going to need and build it. Many apps require a login of some sort so I figured I would have a crack at a simple login/registration form integrated with Firebase. I started by downloading all the ones I could find (https://startflutter.com is helpful for that and of course https://github.com) and then took it from there.

https://gitlab.com/buzzcat/yafl

https://github.com/buzzcat-com/YAFL

Check it out, see what you think. Hopefully it’s helpful to someone besides me. Be aware that I haven’t spent a hell of a lot of time caressing it and getting all the small Dart and flutter nuances under control so don’t be surprised if you find some small bugs (but please report them through gitlab)!

Jotter notepad/text editor for Samsung watches

Are you looking for a massive, expensive, feature packed text editor for your watch?

No? Me neither. I needed a simple text editor for adding API keys to my OptiClick watchface so I made one. It’s VERY basic but gets the job done.

https://galaxy.store/jotter

It’s open source so feel free to jump in:

https://gitlab.com/buzzcat/jotter

If you aren’t a coder but have ideas about what you would like in a little note taker add your suggestions and me (or anyone else) can see whether it can be done:

https://gitlab.com/buzzcat/jotter/issues

Hexo + Netlify CMS + Optimisations

There are a lot of good static site generators that have come about in the last few years (Jekyll, Hugo and Gatsby are fantastic). But if you are really looking for one to set up a clean and easy blog as quickly as possible, I can highly recommend Hexo on top of Netlify + Netlify CMS. It really is a match made in heaven for simplicity and cost (=free).

The basic workflow is set up a github/gitlab repo, put together all the pieces of the puzzle in a local install, push to your repo and watch your blog come alive on Netlify. Normally you would then write a blog post locally then do a new push to put it live, but with Netlify CMS you can hook up your repo to Netlify and write your posts/pages straight through the browser.

Its very easy to set up but I decided I would make the first part of the workflow even easier by building a ready made git repo with some optimal plugins.

Click here to go to the repo

Click here to check out a demo (try running chrome lighthouse audit. You should get a 98+ performance score)

What do you get

OptiClick

UPDATE: Check out the video!

I am really pleased to announce my first Tizen based app. After getting a Samsung Galaxy Watch just before Christmas, I thought I should have a go at a watch face for it.

I decided to go for brain over looks and being a ‘smart’ watch, it made sense to get as much functionality into the screen as possible so that every function you want is only a click away (hence the name OptiClick!).

OptiClick is a Tizen based watch face for use on Galaxy Watch, Gear Sport, Gear S3 and Gear S2. Take a look through the image gallery below to see what it’s capable of and feel free to comment any suggestions for improvements below.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×