Flutter first impressions

888 views
Skip to first unread message

Rockvole

unread,
Feb 1, 2018, 12:23:00 PM2/1/18
to Flutter Dev
Link to my android page :

I originally wrote an app in Android, but now want to make it available to ios users. I wanted to learn a cross-platform development environment and found that Dart looked familiar to me due to my Java experience - so I decided to rewrite the app in Flutter. You can see both apps in the play store.

-------------------------- Difficulties
Pdf Viewing
Unfortunately I am not able to complete the ios version due to a missing pdf view plugin. I ended up writing a flutter plugin and implemented the android part :

Preferences
In Android we can store preferences and specify filenames. My app uses that to store multiple questionnaires. I needed to write a library to provide that functionality :

Text Markup
It is useful to load an xml file containing embedded markup, e.g. bold, italic, list items etc. 
And then display that text inside a page e.g. adding flutter controlled navigation around it etc. I could find no way to do this. This led to extra work, like creating an xml structure for a list and parsing each item, instead of just reading and displaying markup as in the original app.

Bullet Points
I wanted to just display bullet points such as by displaying a list, or adding •
I couldn't find a simple way to do this, I looked through the standard Icons but couldn't find a bullet point - so I just used a *

Color Transitions
On the questions pages, the viewpager on the original has a nice color transformation between each page where it transitions to the next page color as you swipe towards it. I Couldn't find how to do that in flutter.

Stability
The app looks to be stable, maybe more stable than the original ! In the original if the app is in the background and you re-open it later it will often crash. The flutter version doesn't do that.

-------------------------- Differences

Install Size
Flutter : 8.2mb
Original : 1.2mb

Lines of code
Flutter : 1357 dart
Original : 1051 java, 598 xml

-------------------------- Thoughts

Desktop Flutter
If the standard development environment used flutter on the desktop, it would be the most seamless development environment. No waiting for emulators - just run your app instantly, then test later on phones. This would allow integrating the desktop flutter inside the IDE - I can never seem to get the emulator in the right position on my laptop screen.
Alternatively Flutter apps running in the browser in WebAssembley could achieve the same thing.

IDE
Write an IDE (in Flutter) for the Chromebook/android/fuschia. This would allow a complete development environment on a $300 Chromebook. Pretty neat to be able to develop for 10 hours off battery.

Name
Flutter should have been called Nest :)

-------------------------- Conclusion

I think that flutter is an excellent way to develop cross platform apps. It reduces the complexity a lot compared to native android app development. I like the Dart language and it feels like modernized Java.

Michael Tawiah Sowah

unread,
Feb 1, 2018, 10:43:48 PM2/1/18
to Flutter Dev
very interesting review but this bit is quite a lot of difference right there
Install Size
Flutter : 8.2mb
Original : 1.2mb

if the flutter team could do something about it it will be great but not show stopper either.
Great review by the way

pix...@gmail.com

unread,
Feb 2, 2018, 3:35:35 PM2/2/18
to Flutter Dev
I don't think a lot can be done about that.

A trivial Java app does not ship with any graphical engine or widget, everything is provided by the Android Runtime, even most of the standard Java libraries.

A Flutter app has to ship with pretty much everything: engine, widgets, standard libraries, etc ...

The size is, IMO, the only downside.
On the upside, we don't depend on the Android Runtime to be updated to get new features and updates to the host system are less likely to break your app.

omard...@gmail.com

unread,
Feb 2, 2018, 3:35:35 PM2/2/18
to Flutter Dev
Probably the size difference is less significant in bigger apps.

Seth Ladd

unread,
Feb 6, 2018, 3:08:29 PM2/6/18
to Rockvole, Flutter Dev
Thanks for your feedback on Flutter!

A comment inline below...

On Thu, Feb 1, 2018 at 9:23 AM Rockvole <rock...@gmail.com> wrote:
Link to my android page :

I originally wrote an app in Android, but now want to make it available to ios users. I wanted to learn a cross-platform development environment and found that Dart looked familiar to me due to my Java experience - so I decided to rewrite the app in Flutter. You can see both apps in the play store.

-------------------------- Difficulties
Pdf Viewing
Unfortunately I am not able to complete the ios version due to a missing pdf view plugin. I ended up writing a flutter plugin and implemented the android part :

Preferences
In Android we can store preferences and specify filenames. My app uses that to store multiple questionnaires. I needed to write a library to provide that functionality :


Would something like that work?
 

Text Markup
It is useful to load an xml file containing embedded markup, e.g. bold, italic, list items etc. 
And then display that text inside a page e.g. adding flutter controlled navigation around it etc. I could find no way to do this. This led to extra work, like creating an xml structure for a list and parsing each item, instead of just reading and displaying markup as in the original app.

Bullet Points
I wanted to just display bullet points such as by displaying a list, or adding &bull;
I couldn't find a simple way to do this, I looked through the standard Icons but couldn't find a bullet point - so I just used a *

For "text markup" and bullet points, would a markdown processor for Flutter work for you?


Hope that helps!
 

Color Transitions
On the questions pages, the viewpager on the original has a nice color transformation between each page where it transitions to the next page color as you swipe towards it. I Couldn't find how to do that in flutter.

Stability
The app looks to be stable, maybe more stable than the original ! In the original if the app is in the background and you re-open it later it will often crash. The flutter version doesn't do that.

:) That's cool to hear!
 

-------------------------- Differences

Install Size
Flutter : 8.2mb
Original : 1.2mb

Lines of code
Flutter : 1357 dart
Original : 1051 java, 598 xml

-------------------------- Thoughts

Desktop Flutter
If the standard development environment used flutter on the desktop, it would be the most seamless development environment. No waiting for emulators - just run your app instantly, then test later on phones. This would allow integrating the desktop flutter inside the IDE - I can never seem to get the emulator in the right position on my laptop screen.
Alternatively Flutter apps running in the browser in WebAssembley could achieve the same thing.

IDE
Write an IDE (in Flutter) for the Chromebook/android/fuschia. This would allow a complete development environment on a $300 Chromebook. Pretty neat to be able to develop for 10 hours off battery.

Name
Flutter should have been called Nest :)

-------------------------- Conclusion

I think that flutter is an excellent way to develop cross platform apps. It reduces the complexity a lot compared to native android app development. I like the Dart language and it feels like modernized Java.

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rockvole

unread,
Feb 6, 2018, 5:07:30 PM2/6/18
to Flutter Dev
Hi Seth,
Thank-you for the response.

The shared_preferences plugin does not allow storing multiple preference files by filename. In my questionnaire app I store each questionnaire in a separate file. The idea is to compare previous questionnaire scores to track progress over time. In my android food app I store each of the preference page settings in a different preferences file.

For the markup I originally searched for "html display in flutter" - unfortunately I never saw that package since I didn't search for markdown, looks like it would fit my requirements.

I just tried the markdown package now but couldn't get it to work, i filed a bug :

Seth Ladd

unread,
Feb 6, 2018, 5:41:59 PM2/6/18
to Rockvole, Flutter Dev
On Tue, Feb 6, 2018 at 2:07 PM Rockvole <rock...@gmail.com> wrote:
Hi Seth,
Thank-you for the response.

The shared_preferences plugin does not allow storing multiple preference files by filename. In my questionnaire app I store each questionnaire in a separate file. The idea is to compare previous questionnaire scores to track progress over time. In my android food app I store each of the preference page settings in a different preferences file.

Ah. Would simply storing info as JSON into plain-text files work OK? See https://flutter.io/reading-writing-files/
 

For the markup I originally searched for "html display in flutter" - unfortunately I never saw that package since I didn't search for markdown, looks like it would fit my requirements.

I can see why you didn't find markdown. No worries.
 

I just tried the markdown package now but couldn't get it to work, i filed a bug :


I commented on the bug, but what happens if you simply say:

flutter_markdown: any

in your pubspec.yaml?

Rockvole

unread,
Feb 6, 2018, 7:12:53 PM2/6/18
to Flutter Dev
That is effectively what I did - I created a library to read and write xml in the same format as android preferences.

These preferences files can be read simply in android using the standard android preferences routines, which is quite a bit less work than parsing XML / JSON. If, for example you needed to send preferences to the android system, or if you replaced an android app with a flutter app and wanted to keep user preferences during the transition.

It would be possible to extend the existing shared_preferences plugin to accept filenames, but I believe it wont work in IOS because I have not found a library to store preferences by filename.
Reply all
Reply to author
Forward
0 new messages