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

Simple and concise logs for Dart/Flutter built on top of developer package.

example/lib/main.dart

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

void main() {
  Log.d('Error log', error: ArgumentError(), name: 'main');
  runApp(ExampleApp());
}

class ExampleApp extends StatelessWidget with LogMixin {
  @override
  Widget build(BuildContext context) {
    log.d('Building widget', error: ArgumentError());
    log.t('Log with timestamp');
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('LogX')),
        body: Container(
          child: Column(
            children: <Widget>[
              ElevatedButton(
                onPressed: () {
                  log('Hello world');
                },
                child: Text('Log!'),
              ),
              SomeWidget(),
            ],
          ),
        ),
      ),
    );
  }
}

class SomeWidget extends StatelessWidget with LogMixin {
  @override
  Widget build(BuildContext context) {
    log.d('Build');
    return Container();
  }
}
3
likes
140
pub points
0%
popularity

Publisher

verified publishervojtech.net

Simple and concise logs for Dart/Flutter built on top of developer package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on logx