logcat
Flutter plugin to get system messages, stack traces etc and show them in app. Can also be used to get the app logs from a remote device with share plugin.
Call Logcat.exec() from anywhere to get logs as a Future String then use it in anyway within your app.
NOTE: This plugin fetches logs only on Android Devices presently.
Installation
Add package to pubspec.yaml
logcat: ^1.0.2
Add Import
import 'package:logcat/logcat.dart';
Use it anywhere
Future<void> _getLogs() async {
final String logs = await Logcat.execute();
setState(() {
// Update your UI
});
}
Libraries
Dart
- dart:ffi
- Foreign Function Interface for interoperability with the C programming language. [...]
- dart:html
- HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
- dart:js
- Low-level support for interoperating with JavaScript. [...]
- dart:js_util
- Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.