getDistanceToActualBaseline method
- TextBaseline baseline
Calls computeDistanceToActualBaseline and caches the result.
This function must only be called from getDistanceToBaseline and computeDistanceToActualBaseline. Do not call this function directly from outside those two methods.
Implementation
@protected
@mustCallSuper
double? getDistanceToActualBaseline(TextBaseline baseline) {
assert(_debugDoingBaseline, 'Please see the documentation for computeDistanceToActualBaseline for the required calling conventions of this method.');
_cachedBaselines ??= <TextBaseline, double?>{};
return _cachedBaselines!.putIfAbsent(baseline, () => computeDistanceToActualBaseline(baseline));
}