October 15, 2020

Flutter: Making Health Apps the Fun Way

In medicine, creating and enacting technological change is about as easy as moving a mountain with your teeth. Processes often exist through long standing tradition, perhaps beginning from some billing or legislative requirement and optimized for no one. Customization is usually so prohibitive that we typically just learn the workaround that everyone else learned and deal with it. User centered design is out the window. Nielsen’s usability heuristics1 don’t seem to apply. The tech is frustrating. The burnout is real.

As a subspecialty slated to help “transform healthcare”,2 clinical informaticians may be disheartened by an overall lack of tools available to ideate, prototype, and test said transformation. I’d like to introduce a tool that may serve as one of the change agents we’ve been waiting for. Designed by Google and specifically focused on developer happiness,3 Flutter is an open source UI toolkit for building Android, iOS, desktop, and web applications via a single code base.4

Flutter has four tenants:3,5

  1. Beautiful - you have full control over every pixel on your screen. You use a declarative style of programming via “widgets” that focus on the result...not the steps to get there.6 In essence, this eases the learning curve for new developers, gives consistency among designers’ and developers’ works, and generates more readable code.
  2. Fast - with its Skia engine, apps run at 60+ frames per second even on older phones/hardware.
  3. Productive - saving your code while the app is running on an emulator/phone triggers a “stateful hot reload” action, which updates the UI in less than a second and keeps the “state” of the app. By avoiding the need to recompile your code every time a change is made (which can take minutes), developers are much happier and more efficient.
  4. Open - the entire toolkit is well-documented and open source.

In my time as a developer and early adopter, I’ve never seen anything like Flutter or its base language Dart. Flutter was first released in December 2018, and by the end of 2019 it had propelled Dart into the fastest growing programming language on GitHub.7 This toolkit has since expanded to include desktop and the web.

I mention all of this as a physician who has given multiple live-coding sessions creating and updating health apps in real-time using Flutter. At AMIA’s 2019 Clinical Informatics Conference, for example, we created part of the conference’s app in real-time during a 2-hour workshop. This was later converted into an asynchronous video series for CME. For this year’s conference, six physicians gave a 4-hour workshop and went into far more detail on advanced layouts.

More recently, I’ve had the pleasure of working with Dr. Grey Faulkenberry (med/peds clinical informatics fellow from Children’s Hospital of Philadelphia) on a package that allows for FHIR integration with Dart/Flutter.8 We also created a demo video (bit.ly/FHIRdemo) that showcases his pediatric immunizations app. This app uses a locally run FHIR server and syncs to the cloud, which is optimal for global health settings with limited internet connectivity.

If any of you are interested in learning more about Flutter and its potential use in a health setting, please feel free to contact me. I am happy to collaborate, to create instructional/demo videos, or to help troubleshoot in any way I can. This really is an excellent tool. If we continue to build a health informatics community around Flutter, then the possibilities are limitless.


References

  1. Nielsen J. Usability Engineering. Elsevier; 1994. https://play.google.com/store/books/details?id=DBOowF7LqIQC
  2. Accreditation Council for Graduate Medical Education. ACGME Program Requirements for Graduate Medical Education in Clinical Informatics. ACGME; 2017. Accessed November 10, 2017. 
  3. Hoolehan M, Aguinis M. Flutter Talks Podcast: Fast, Beautiful, Productive, Open. Flutter Talks; 2019. Accessed September 11, 2020. https://blog.codemagic.io/flutter-talks-podcast-fast-beautiful-productive-open/
  4. Google. Flutter - Beautiful native apps in record time. Flutter. Accessed December 3, 2019. https://flutter.dev/
  5. Rybak M. Flutter Live ’18 Recap with Martin Aguinis. Flutter NYC. Published December 28, 2018. Accessed September 11, 2020. https://medium.com/flutter-nyc/flutter-live-18-recap-with-martin-aguinis-428df6a5b664
  6. Biswas S. Why iOS Developers should pay attention to Flutter in 2020. Codemagic. Published December 30, 2019. Accessed September 11, 2020. https://blog.codemagic.io/why-ios-devs-should-pay-attention-to-flutter-in-2020/
  7. Detwiler B. Google Dart tops GitHub’s list of fastest growing languages in 2019. LinkedIn. Published November 11, 2019. Accessed September 11, 2020. https://www.linkedin.com/pulse/google-dart-tops-githubs-list-fastest-growing-2019-bill-detwiler/
  8. Faulkenberry G, Manning J. FHIR, A Dart/Flutter Package for Working with FHIR Resources. Github Accessed September 11, 2020. https://github.com/Dokotela/fhir

John Manning, MD
Councilor, ACEP EM Informatics Section
Atrium Health’s Carolinas Medical Center
Department of Emergency Medicine
Assistant Professor, Director of Clinical Informatics
MayJuun, Co-founder