tiny_logger 0.0.1+1
tiny_logger: ^0.0.1+1 copied to clipboard
A tiny logger tool to print different levels of log entries. Also provides a widget to show a log within a Flutter app.
ICNH Logging Tool #
A logging tool for Flutter projects.
Usage #
To log a message:
import 'package:icnh_logger/icnh_logger.dart';
log.debug('...');
log.warn('...');
log.error('...');
Best used with avoid_print in your analysis_options.yaml.
linter:
rules:
- avoid_print
To show the InApp-Logger use the LogView Widget:
bool _showLog = false;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('ICNH Logger Example')),
body: Stack(
children: [
Center(child: Text('Hello World!')),
if (_showLog)
LogView(
onClose: () => setState(() => _showLog = false),
),
],
),
);
}
Example #
