Flutter Reactive Framework


Flutter includes a modern reactive framework and a 2D rendering engine. 
With Flutter reactive framework a view is built as an immutable tree of widgets.

Widgets 


  1. foundation of Flutter apps. A widget is a description of part of a user interface. Nearly everything is  widget, written in dart. There are no separate files for layout customization or text alignment. 
  2. all the code for you widget is defined in one Flutter widget. 
  3. When the widget state changes such as due to user input or animations, the widget rebuilds itself according to the new state. This saves developer's time becouse the UI can be described as function of state. We don't have to write extra code for solely updating the UI when state changes. 


Ex: RaisedButton Widget


Flutter Rending Engine 


Notably, the rendering engine itself is part of your app. We don't need to bridge the UI rendering code to the native platform.
Layout and rendering calls happen much more frequently than platform-specific calls, such as those to the device camera.
By doing all rendering call to app side, flutter can quickly render and re-render your widget tree allowing rich motion and smooth scrolling. This rendering engiene is built in Skia. A 2D graphics rendering library and Dart, it displays widgets for both iOS and Android.



The IOS and Android platforms just have to provide a canvas for us to place our widgets on and rendering engine inside.

This is where it's useful to have ahead of time compilation to native code. As long as someone and it could be you, has written their required device plug-ins for your app, such as camera and Wi-Fi and as long as your platform returns to canvas, your flutter app can be compiled down to run on your target platform of choice.






















Comments

Popular Posts