Google has been working on a new operating system called Fuchsia OS which has been remoted to be a potential future replacement for the Android OS.
The growth of the framework's adoption is directly related to the new Fuchsia OS. As it gets closer to launch. It's importance to Google to have apps targeting the new system. For example Google announced that Android apps will be compatible with the new OS, making the transition to, and adoption of Flutter significantly easier.
- Flutter owns the pixels: Flutter renders the application pixel by pixel, interacting directly with the Skia Graphics engine.
- No extra layers or additional OS API calls: As Flutter owns the app rendering, It does not need additional calls to use the OEM widgets, no no bottleneck.
- Flutter is compiled to native code: Flutter uses the Dart AOT compiler to produce native code. That means there's no over head in setting up an environment to interpret Dart code on the fly. and it runs just like a native app. Starting more quickly than frameworks that need some kind of interpreter.
- Ruling all the pixels on the device
- Platform UI kit
- Achievable UI deisn requirement
- Smoother look and feel
- Debug mode
- Release mode
Skia graphics library. Skia is an open source library that provides APIs for 2D graphics. It is used in Flutter as well as Google Chrome, Android, Firefox, and many others. It is also backed by Google, like Dart and Flutter.
- Profile mode
The execution of Dart code in operates in two modes (Just In Time) JIT compilation or (Ahead of Time) AOT compilation.
- a JIT compilation is where the source code is compiled as it is needed - just in time. The Dart VM loads and compiles the source code to native machine code on the fly. This approach is used to run code on the command line or during mobile application develop to allow the use of features such as debugging and hot reload.
- An AOT compilation is where the Dart VM and your code are precompiled and the VM works more like a Dart runtime system, providing a garbage collector and the various native methods from the Dart software development kit (SDK) to the application. This approach has huge performance benefits over JIT compilations but other features such as debugging and hot reload are not available.
- ?
late
- Null aware methods
int
double
Key differences between JS and Dart:
- Variables: Unlike JS, Dart is a type safe languages, so variables must be declared with a type or the type system can infer the type.
- Dart has no concept of undefined. Either a variable of true or it is null.
- Dart has no concept of truthy. Only the Boolean value of true is treated as a true value.
- The JS Promise is represented by Dart Future object. The async and await operator act on Futures like the do on Promise in JS.
- Printing to the console uses the print method insteads console.log()
- Field
- Accessors
- Constructor
- Methods
- Named constructors
- Factory constructors
Must have, if it did not, the class would itself be abstract and therefore could not be instantiated.
Dart has implicit interfaces
class SeniorDeveloper extends Person with ProgrammingSkills,
ManagementSkills
enum PersonType { student, employee }
<>
The use of generics can help a developer to maintain and keep collection behavior under control.
When we use a collection without specifying the allowed element types, it is our responsibility to correctly insert elements of the expected type. This can lead to bugs when data of an incorrect type is placed in a collection or incorrect assumptions are made about the contents of a collection.
Dart is a single-threaded programming language.
sleep
delayed
Isolates allow the main function runs ahead of the function.
The key property allows you to preserve the state of a widget between rebuilds
Benefit of plugin
- Code reuse
- Many eyes
- Low lovel integration
Drawbacks
- Version manager
- Difficult to diagnose bugs
- Break changes
You have also specified the version of the plugin using the plugin's semantic version. This locks your app to a specific version of the plugin, allowing you to test and release without dependency changes sneaking in. You may have noticed the ^ character before the version number. This specifies that you are happy to receive any patch version updates to the plugin.
Common Issue
- Plugin break change
- Plugin not working
- PR not merged
- Inconsistent dependencies
- Missing Plugin Exception