Posts

Showing posts with the label Flutter

How to avoid opening kotlin/java files automatically in Flutter

Image
  Starting wizard from Android Studio's landing page In one of my "Learn Flutter together" sessions, one participant encountered an annoying issue. Instead of opening main.dart file, Android Studio always opens the MainActivity.java or MainActivity.kt. I didn't know how to solve that issue. Until I got an idea today. Today I happened to run the wizard from the landing page of Android Studio (AS) (see the picture above), not from inside an opened Flutter project through File, New, New Flutter project. It seems that starting the wizard from AS landing page, will show the page where various languages/frameworks can be selected (see the picture below). When starting a new Flutter project, a beginner could have accidentally clicked on Android or Java instead. That creates the issue with the Flutter project. At least this, I believe, was the cause. Therefore please make sure to select Flutter (see no 1 in the picture above) before continuing to the next page!  BTW please a...

Solve the Flutter Outline shows "Nothing to show" in Android Studio

Image
  Solution: Click on the red recycle icon of the Dart Analysis windows Have you wondered why the Flutter Outline doesn't show anything? I googled it and found many answers. Strangely the accepted answer on stackoverflow.com, which has got 144 helpful votes, doesn't actually solve the issue, especially in my case. Therefore I wrote about it here to help other people. As you can see in that link above, there are 9 answers to that particular questions. In my case, only two actually work i.e. clicking on red recycle icon in the Dart Analysis window.  Here we are folks. As a programmer you wasted a lot of time googling and try any solution written, which most of the time don't work. Only after trying many things you may hit the correct one! Cheers!

Kotlin, Flutter and the rest

Image
St. George's Parish Church, Beckenham UK Note: The magnificent view of the St. George's above is yours if you sit in one of the cafes opposite. I know, it's become a trend recently that coders like going into a cafe to accomplish their work. And what is more delight than writing some codes while enjoying the wonderful sight of the St. George's Church above? Time is precious and limited. So it's high time to be more organised with the time for programming First of all, it's good to know that Googlers are heavily promoting Kotlin. So I think the best way forward is to switch to Kotlin. As a beginner I don't have the priviledge to master many languages in the same time. But then a friend of mine raised my attention to multi-platform language. One language to rule them all: Android, iOS, web, desktop. Hmmm.... Kotlin has been also trying to do exactly the same although it is still in early stages. Should I concentrate more on this and spend less ti...