Meaning of the "patch" keyword in a .dart file

Issue

Here is sample in Dart language:

patch class List<E> {
}

This is not patch file because it has extension .dart and contains regular source code written in Dart language except for patch keyword.

Will be this keyword standardized in future in TC52 – Dart – Ecma International?

Solution

patch classes are a VM/compiler feature that are not accessible to normal developers. It is used to share code between the VM and dart2js implementation.

There is no need to standardize the keyword in TC52.

Answered By – Florian Loitsch

Answer Checked By – Gilberto Lyons (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.