logcat 1.0.2 copy "logcat: ^1.0.2" to clipboard
logcat: ^1.0.2 copied to clipboard

Flutter plugin to get the system messages, stack traces etc using logcat command-line tool.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:logcat/logcat.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _logs = 'Nothing yet';

  @override
  void initState() {
    super.initState();
    _getLogs();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Logcat Plugin example app'),
        ),
        body: SingleChildScrollView(
          child: Text(_logs),
        ),
      ),
    );
  }

  Future<void> _getLogs() async {
    final String logs = await Logcat.execute();
    setState(() {
      _logs = logs;
    });
  }
}
3
likes
40
pub points
52%
popularity

Publisher

unverified uploader

Flutter plugin to get the system messages, stack traces etc using logcat command-line tool.

Repository (GitHub)
View/report issues

License

BSD-2-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on logcat