Category: Flutter

Dart and Nginx

I’ve been enjoying Flutter a lot. I’ve written a couple of apps, and I’m getting a good handle on the dart language. Now, I’d like to use dart for the whole system rather than having half of my code in PHP and the other half in Dart/Flutter.

I found the solution in Dart Shelf. The code is hosted at GitHub, and it can easily be installed as any other Dart package.

The best use case is that I can have a shared package between the Flutter front-end and the Dart shelf back-end. So, I can create, for example, a Transaction class that represents a transaction in my system. I can give the class toJson() and fromJson() methods that will convert between a Json-formatted string. Then, I can easily send it from the Flutter front-end to the back-end and have the same code running on both sides. I only maintain it in one place.

So, I learned how to make all that work pretty quickly. The challenge is how do I push that out onto a server already setup as a website. The server is using Nginx, and I don’t want to replace all the other stuff that Nginx is already doing.

Read More

Video in Flutter

I started a quick app to try to organize a group of photos, which I intend to turn into a video. The problem is that I have a bunch of videos in the batch as well that I need to review. I thought I could get the video to work inside my app, but long story short, I wasn’t able to figure it out. I don’t think video is supported on the Linux platform. Maybe if I was working on Android, it would be a different story.

Anyway, maybe some of my notes will be helpful if you are trying things similar.

Read More