Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building with Flutter

Building with Flutter

Flutter is Google’s portable UI toolkit for building beautiful, natively-compiled applications for mobile, web, and desktop from a single codebase. This presentation took the audience through a journey on building applications with Flutter and provided answers to what, how and when to use flutter.

It highlighted the advantages of adopting flutter, the Dos and Don'ts and How to get your way around when building with Flutter

Shuaib Afegbua

June 22, 2019
Tweet

More Decks by Shuaib Afegbua

Other Decks in Programming

Transcript

  1. ABOUT ME Technology enthusiast |> Software craftsman |> Loves building

    stuff Long love affair with Java. Also writes Elixir, Scala and some others • Computer Science major (FUTMINNA and ABU) • Worked at Mott Macdonald/Cambridge Education for a long time and some other places • Got tired, quit and stayed at home. • Built some stuff later
  2. Flutter is Google’s portable UI toolkit for building beautiful, natively-compiled

    applications for mobile, web, and desktop from a single codebase. - flutter.dev
  3. Awesome UI Library EVERYTHING IS A WIDGET • Excellent look

    and feel • Performs very fast • Extensible and customisable
  4. Write once, deploy cross platform SINGLE CODE BASE • One

    language for UI and Backend • Bundled Framework • Mobile • Web • Desktop • Embedded devices
  5. Amazing toolsets • Excellent build tools and IDE intellisense •

    Growing community • Pub Packages • Cool documentation
  6. Dart is a language optimized for client-side development for web

    and mobile. Dart helps you craft beautiful, high-quality experiences across all screens. A client-optimized language Rich, powerful frameworks Delightful, flexible tooling
  7. Dart • Data Types • Collections • Functions • Anonymous

    and first class functions • Classes • Asynchronous programming • HTTP Programming • Mixins • Isolates
  8. AVOID FAT CLASSES WIDGETS • Widgets are easily composable •

    Avoid the the temptation of long nested widgets • Abstract common functionalities to custom widgets • Many files has never broken an app • Care about maintainabilty
  9. SMALL FUNCTIONS NEVER KILLED ANYONE • Single responsibility principle •

    Easily testable • Use ⇒ for short functions and methods
  10. ADOPT A PATTERN • Take for example state management “madness”

    • Good old setState() and StatefulWidgets • ScopedModel, Redux, MobX , BLoC • New school - Provider
  11. ENSURE CODE CONSISTENCY • Use code formatters – dartformat •

    Don’t forget to test and test always • Do code reviews
  12. TEST OR DIE • Ensures app quality • Unit test

    your function, method, or class • Carry out component test • Verify app behaviours with Integration tests • Tools: Package test, mockito
  13. DOCUMENTATION • Dartdoc exist • They got you a guide

    - https://dart.dev/guides/language/effective- dart/documentation#doc-comments • Avoid useless documentation • Just save the unfortunate developer that will inherit your code
  14. A GOOD NAME IS BETTER ? • Meaningful names •

    Spell words in identifiers and comments correctly
  15. PACKAGES • Maybe that package exist • Growing number of

    packages • https://pub.dev is your friend. 2,636 and counting • We need more. Start building • Think 3rd party packages before use
  16. GETTING HELP • Google is your friend • Don’t we

    all love stackoverflow • Flutter docs, YouTube, reddit, medium • Just let it crash