pro_pretty_logging 1.0.0 copy "pro_pretty_logging: ^1.0.0" to clipboard
pro_pretty_logging: ^1.0.0 copied to clipboard

The pretty logging library.

example/lib/main.dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:pro_pretty_logging/pretty_logging.dart';

void main() {
  prettyLogging(enable: kDebugMode, ignoredLoggers: ['GoRouter']);
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) => const MaterialApp(
        home: MyHomePage(),
      );
}

final _logger = Logger('MyHomePage');

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) => Scaffold(
        appBar: AppBar(),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              OutlinedButton(
                child: const Text('LogIn'),
                onPressed: () {
                  _logger
                    ..info('info example')
                    ..fine('fine example')
                    ..severe('severe example')
                    ..shout('shout example')
                    ..warning('warning example');
                },
              ),
            ],
          ),
        ),
      );
}
1
likes
0
points
50
downloads

Publisher

verified publisherpro100.dev

Weekly Downloads

The pretty logging library.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

intl, logging

More

Packages that depend on pro_pretty_logging