Sunday, March 21, 2021

Automatic Backup Firestore Using Cloud Scheduler Every Day

Doesn't feel it's been a month since I posted last article regarding print using printer bluetooth. The app has been used over one month and It's fine. I haven't had problem but maybe the alignment that doesn't fit right and left doesn't sync. But overrall it's good for my sister business.

If you've firebase firestore for a long time. Maybe you wonder if your data is lost and there's something upredictable happened. We want our data save, but we believe firebase can handle it right. But for the best you need to backup your data to prevent something bad happened. Fortunely firebase supports it with Google Cloud Platform it's possible. 

There are many article that talks about it, even firebase has documentation about it that I'm gonna the link below. It's not hard to do but remember you need to pay to do it. In my case It doesn't cost much because my DB is small I think. It's a few hundreds Kb. So it's still acceptable in my wallet lol. For now I do backup for 24 hours following practice in firebase.

Saturday, February 20, 2021

Printing Receipt with Blutetooth Using Flutter

Recently, I bought the bluetooth printer for my sister business. She wants to have receipt everytime clients have done treatment. It's beauty care business. So She needs the customer database and transactions as well. So I made the app first to record all of it. The problem I have is I have never used bluetooth printer before for my projects. Because I don't have one to try.

Fortunately I got one to test the printer. First I need to search the plugin that supports printer bluetooth on Flutter. Because I made the app for iOS and Android. So I need the cross platform framework that is flutter. That I think it's powerful. OK the plugin that I used is esc_pos_bluetooth. It's not easy acuallty to use. Because I have problem using android that I need to fork the repository.

The issue related to android permissions on newest android phone. That the library haven't updated yet, but many people have known the issues. So there are two packages that I fork. It's esc_pos_bluetooth and flutter_bluetooth_basic. I explain what I need these two packages. First with flutter_bluetooth_basic I added two permissions.

Sunday, January 17, 2021

Show searchable_dropdown Widget Without Using Dropdown But Button

Hello guys, My first post for this year and today I'm gonna show you how to use searchable_dropdown package when they only show the searchble_dropdown through dropdown, but actually if you look closer inside the package you can find DropdownDialog which is you can implement ShowDialog to show it without using Dropdown.

In this useful package, you don't need to implement your own search because it's provided by the package. You only need to provide the data to the widget. That's what I like about this plugin or package. It's very useful because I used this for my app Food Today where the use can search food categories using this plugin and there's textfield where you can type the category you want to show.

As you can see on the video above where I click search button then showing searchable dialog. It's not hard to do luckily. First of course you need to install the package searchble_dropdown in pubspec.yaml and don't forget to do "flutter pub get" in terminal before using the package in your code. 

Saturday, December 19, 2020

Sharing Experience Reading Symbolicate Crash Log Error Food Today App From App Store iOS

Hi all, it's been a last month of the year. And there are lot things happened in this year. Hope you have a best year. This month I got weird error reported from App Store that I can't find it in debug mode. It happened only on release mode that I need to figure it ou by myself. It's almost three times I got rejected because of the same crash when opening food diary tab.

So until now I don't know why the error happened, I just assume the error. Ok I finally found the error as apple reviewer did. The error happened when I open food diary tab. First I need to figure it out why the error but what I got on error message console is "Lost connection to device". It gave me headache ahaha. BTW it only happened on iOS. I used flutter to create this food today app mobile.

My assumption is out of memory when opening food diary tab. Because my first tab is "food camera" and it takes a lot of memory I guess so I try make when opening tab it will destroy another tab. So that will make the memory is enough to do another thing.

Wednesday, November 18, 2020

I change IDE Android Studio to Visual Code on Mac Big Sur

Visual Code on Mac Big Sur

It's been a month since I used Visual Code as new editor to create or develop flutter apps. I really like it because of the lightweight that I feel mostly. I haven't had a problem so far, but some little issue where I can't add widget using shortcut key like Android Studio does using alt+enter. So I need to do it manually with clicking hint lamp symbol then I choose adding parent widget or stream builder or removing it from parent tree. It's a little bit annoying but for me the performence is more important. I haven't searched the way Android did but later maybe.

And the second thing is about Mac Big Sur that I've installed on my macbook air '17. Before I run Mac OS Catalina of course. There's one headache issue about NVRM SSD. It's when my mac will restart randomly when doing heavy things like compiling or opening many tab browser. It's so weird I tried to reinstall my mac many times. And the result is the same, I think I need to replace the SSD with old one because Now the SSD is updated 256GB and different type I forget the name. But the old one that this macbook own is Samsung SSD. but It's already solved with removing RAM and inserting again.

BTW I still installed Android Studio because I need it for Android testing purpose and emulator. What I feel when upgrading Mac Big Sur is the compile time a little bit more fast. I don't install games or editor video or photo. So the size space only for development and it doesn't take much space so far.