android_util_log 0.1.0 copy "android_util_log: ^0.1.0" to clipboard
android_util_log: ^0.1.0 copied to clipboard

PlatformAndroid

A utility library for Android log. Built with dart's experimental jni

example/lib/main.dart

import 'package:android_util_log/android_util_log.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Android Log')),
        body: ListView(
          children: [
            Text('[TAG] is loggable: ${Log.isLoggable('TAG', Log.info)}'),
            FilledButton(
              onPressed: () {
                Log.i('TAG', 'INFO_MESSAGE');
              },
              child: Text('INFO'),
            ),
            FilledButton(
              onPressed: () {
                print(Log.w('TAG', 'WARN_MESSAGE'));
              },
              child: Text('WARN'),
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
160
points
12
downloads

Publisher

verified publisherlaihz.dev

Weekly Downloads

A utility library for Android log. Built with dart's experimental jni

Repository (GitHub)
View/report issues

Topics

#android #jni #utils

Documentation

API reference

License

MIT (license)

Dependencies

flutter, jni

More

Packages that depend on android_util_log

Packages that implement android_util_log