isInMobileLayer function
Implementation
@pragma('vm:prefer-inline')
bool isInMobileLayer(BuildContext context) {
final cached = _inMobileLayerCache[context];
if (cached != null) return cached;
bool found = false;
context.visitAncestorElements((el) {
if (el.widget.runtimeType.toString() == 'MobileLayerTransformer') {
found = true;
return false;
}
return true;
});
_inMobileLayerCache[context] = found;
return found;
}