Friday, September 18, 2020

Flutter, Hallo World!

Flutter...

What is Flutter??.. Flutter is i don't know maybe about framework or something.. Flutter is based by Dart Language. And my first experience with Dart language its pretty similar with Javascript in my opinion. Other said Dart is like Java, Javascript and Python. Flutter and dart it self is developed by Google.

And this afternoon i try to install Flutter in my computer.

My Programming language Background is PHP and Javascript. I ever Try build some apps with Angular, but someone said there's problem in performance when deliver the apps that build with angular. So Flutter is the Solution for that. because Flutter has its own engine maybe like java with JRE. maybe you can search more deeper about it..

So this afternoon I have installed Flutter on my computer (actually on my office computer), and i think Flutter is cool. I try developing and running my apps on my phone (Xiaomi) and it runs well with hot reload. These are some documentation about what I've done when installed flutter..

  1. Download Flutter (https://flutter.dev/docs/get-started/install)
  2. After Download extract the rar/zip file and copy to drive C, so it become C:/flutter, in some documentation said that don't put flutter on Program File folder (in windows OS).
  3. After that we need to add the flutter path to environment variable path, so it can be called any where in windows terminal, so add the path of flutter bin (C/:flutter/bin/) to environment variable. You can Search by typing environment variable in windows search and after you find it hit enter.


  4. In system properties click environment variable.
  5. In Environment Variable find variable path on user variable and edit.
  6. Add the flutter bin path to variable path, with new button and paste flutter bin path on that.
  7. hit oke

For now you can run flutter command on any path on your terminal. after that you need to install android studio, after you install android studio you need to add some plugin (fultter and dart plugin). For me, I'm Using Visual Studio Code to code flutter, so I just need to install flutter and dart plugin on that IDE, and you can create flutter project on terminal, this the steps:
  1. Open a new folder for your project in VSCode.
  2. open the VSCode terminal and type: flutter create myfirstapp.
  3. flutter will create flutter demo project for you, so you ar ready to code now.



By the way how to run the code? you can use emulator for that or you can use real android device.
just type flutter run. I'm using real android device to run my code, coz when run in emulator it slowing down computer speed. so these are what I've done setting up my xiomi device maybe it will be vary in another device.
  1. We need to enable developer option. With go to settings, and chose About phone.
  2. And then hit couple time in MIUI version until you get a "You are now a Developer" notificaition or something.
  3. When the "developer" notification is shown, you can go to Additional Settings to enter in Developer Option menu.
  4. Search for USB debuging, set it on,
  5. Install via USB, set it on, and
  6. MIUI optimization, set it on
Now you can run your flutter code on your device by connecting it with usb cable. You just hit F5 button to run and hit reload it.

If you cant run your apps, try run flutter doctor -v to check

Thats all Thanks, God Bless u..

Thursday, July 16, 2020

Lyrics Generator dengan PHP

Halo Oke gaes lama gak update blog nih, karena lagi pada ibadah dari rumah, kali ini aku mau share aplikasi buat auto generate lirik buat di tempel di video, ama auto generate ayat alkitab sama buat di tempel di video juga.. karena berdasarkan pengalaman pribadi agak sedikit menyita waktu ya gaes kalo mau buat liriknya 1 persatu pake inkscape awalnya. emang bisa sih langsung dari Easy worship trus dikonek ke OBS tapi karena kebutuhan kita yang harus ngedit untuk disiarkan ke TV cable lewat USB jadi mau tidak mau harus buat liriknya satu persatu.

Okeh jadi dalam aplikasi ini hasilnya itu nanti, setiap penggalan-penggalan lirik akan di generate file png nya satu persatu, nah untuk setiap file itu hanya 2 baris lirik bisa di lihat di contoh berikut, sedangkan untuk menu yang lain ada verse generator fungsinya sama dengan lirik membuat file png untuk setiap ayat yang ingin di generate.

okeh... cara penggunaannya itu bisa dilihat di tutorial dibawah ini..

sedangkan untuk aplikasinya bisa di download disini.

tapi nih, aplikasi sederhana ini dibuat dari bahasa pemrograman PHP, nah untuk saat ini interfacenya itu pake web browser. jadi teman-teman harus install terlebih dahulu yang namanya XAMPP, bisa di download disini.

nah setelah selesai install.. kita jalankan dulu xampp, trus jalankan service apachenya, cobah deh buka browser (chrome, firefox, opera, ms edge dll) trus ketikan http://localhost/ nah kalau udah muncul tampilan berarti service apachenya itu udah jalan... sekarang kita tinggal copy dan extract file yang kita download tadi.

cari dimana folder xampp terinstall, biasanya sih langsung di C:/xampp/ nah setelah itu cari folder "htdocs", nah setelah di klik pastekan di folder tersebut file zipnya, setelah itu di extract. nah biasanya akan foldernya namanya "img_lirik", sekarang kita tinggal akses lewat browser (chrome, firefox, opera, ms edge dll), ketikan http://localhost/img_lirik/ jika sudah maka akan muncul tampilan seperti pada tutorial berikut.. selamat mencoba. Tuhan Yesus Memberkati.