nex_common_logs 0.0.7 copy "nex_common_logs: ^0.0.7" to clipboard
nex_common_logs: ^0.0.7 copied to clipboard

nex_common_logs is a Dart package providing a utility for logging messages with different severity levels. It supports customizable log message formatting, including colors and file name integration, [...]

example/lib/main.dart

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

void main() {
  AppLogs.settings(true);
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'nex_common_logs Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('nex_common_logs Example'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              onPressed: () {

              logMessage(text: 'This is a simple log message');
              },
              child: Text('Log Message'),
            ),
            ElevatedButton(
              onPressed: () {
                logError('This is an error log message',
                    error: 'Error details here');
              },
              child: Text('Log Error'),
            ),
            ElevatedButton(
              onPressed: () {
                logWarning('This is a warning log message',
                    error: 'Warning details here');
              },
              child: Text('Log Warning'),
            ),
            ElevatedButton(
              onPressed: () {
                logSuccess( 'This is a success log message');
              },
              child: Text('Log Success'),
            ),
          ],
        ),
      ),
    );
  }
}

class Tetes {
  dfdf() {
    logError("This is test", error: "erererer");
  }
}
0
likes
140
points
53
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

nex_common_logs is a Dart package providing a utility for logging messages with different severity levels. It supports customizable log message formatting, including colors and file name integration, making it ideal for developers who want structured and easily distinguishable logs in their Flutter applications.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on nex_common_logs