takePendingCrashes method
Return and clear native crashes persisted since the last launch. Each map:
{ type, message, stack (frames or string), platform, timestamp }.
Implementation
@override
Future<List<Map<String, Object?>>> takePendingCrashes() async {
try {
final res = await methodChannel.invokeMethod<List<dynamic>>(
'takePendingCrashes',
);
return (res ?? const [])
.whereType<Map>()
.map((m) => m.map((k, v) => MapEntry(k.toString(), v as Object?)))
.toList();
} catch (_) {
return const [];
}
}