handleANR method
Handles ANR (Application Not Responding) events.
This method is called when a frame takes longer than the ANR threshold to render. It should report the ANR information to the APM backend.
Implementation
void handleANR(APMFrameTiming frameTiming) {
// In a real implementation, this would send data to the APM backend
Map<String, Object?> param = {};
if (_stackInfo != null) {
param['stack'] = _stackInfo.toString();
} else {
param['stack'] = StackTrace.current.toString();
}
param['kind'] = 'LooperANR';
param['summary'] = 'Flutter ANR';
APMFlutterPluginPlatform.instance.reportANRInfo(param);
}