late top-level constant

_Late const late

Mark a getter as safe to cache.

Getters marked with late will be called at most once per instane of the object.
Only getters using the => syntax are supported. Getters with {} are not.

This makes the getter behave similarly to the upcoming late keyword:

@late
String get fullName => '$firstName $lastName';

is the equivalent to the upcoming:

late final fullName = '$firstName $lastName';

Implementation

const late = _Late._();