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

Build_your_First_App_with_Flutter.pdf

 Build_your_First_App_with_Flutter.pdf

A basic Introduction, what is Flutter and how it works, the architecture of Flutter. What are the pain points of Android Developers and how it is been resolved in Flutter? And a live code demo.

Talk delivered at GDG Bangalore on 3rd March 2019

Google Slides with Animation & Gif: https://docs.google.com/presentation/d/1SyvPNgTxdCl59SEKx_zN6ws1Q8DCM2cMKP-DlCdeUws/edit?usp=sharing

Dhrumil Shah

March 03, 2019
Tweet

More Decks by Dhrumil Shah

Other Decks in Programming

Transcript

  1. What is Flutter? • An SDK which helps to build

    high-performing, modern and beautiful apps • Works for both Android and iOS • An open-source toolkit, developed by Google • 100+ contributions from the open source community
  2. Compiled to native MVC/ MVVM View Reactive Views Interpreted (JavaScript)

    iOS SDK Android SDK Titanium, Cordova, PhoneGap, Ionic, ... Technology: WebViews
  3. Compiled to native MVC/ MVVM View Reactive Views Interpreted (JavaScript)

    iOS SDK Android SDK Titanium, Cordova, PhoneGap, Ionic, ... Flutter React Native Technology: Reactive Views
  4. Who is Flutter for? • Designers converge on a brand-driven

    experience on Android and iOS • Prototypers get a high-fidelity and fast way to build working prototypes. • Developers benefit from fantastic developer tools, an easy-to-use language, a rich set of widgets and great IDE support. Flutter frees up valuable time for working on features and delightful experiences.
  5. Diagram the Layout - Look for rows and columns -

    Is there a grid? - Any overlapping elements? - Do we need tabs? - Padding, alignment or borders needed?
  6. A Widget can defined as • A structural element (like

    a Button or Menu) • A design element (like a Font or Color scheme) • A layout element (like a Margin or Padding) • It can be a business logic
  7. Hot Reload • Injecting updated source code files into the

    running Dart VM • Stateful: App state is retained after a reload. • Quickly iterate on a screen deeply nested in your app
  8. Skia Dart Text Foundation Animation Painting Rendering Widgets Material Gestures

    Engine (C++) Framework (Dart) Cupertino Each layer builds upon the previous layer
  9. Flutter’s new architecture Flutter provides its own widgets • Compiles

    to native Code • No reliance on OEM widgets • No bridge needed • Turns layout on its head! • Widgets are simple and fast • Full customisation and extensibility
  10. Tooling $ flutter doctor Checks your environment and displays a

    report on terminal $ flutter upgrade Updates both the Flutter SDK and your packages
  11. Stateless Widget • Dumb Widget • It doesn’t know anything

    • Gets render only once or • When the parent widget changes the configuration
  12. Stateful Widget • Dynamic which has its own Properties •

    Those property is know as state of the widget • The state of the widget can be changed by user input, any operation or other widget’s state change. • setState() method is used to change the state. • Each time widget gets rebuild when setState() method gets called.
  13. Customizing and extending Widgets Flutter’s Widget system was designed to

    be easily customizable Composition: Widgets are built out of smaller widgets that you can reuse and combine in novel ways to make custom widgets class RaisedButton extends StatelessWidget { ... }
  14. References • Awesome Flutter - Wm Leler • The Magic

    of Flutter - Tim Messerschmidt • Flutter.dev • Github.com/flutter