nuntio_pluto 0.0.1 copy "nuntio_pluto: ^0.0.1" to clipboard
nuntio_pluto: ^0.0.1 copied to clipboard

unlistedoutdated

Nuntio Pluto is a simple to use logging tool.

example/lib/main.dart

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

void main() async {
  await Pluto.initialize();

  runApp(const MyApp());
}

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

  void throwError() {
    throw Exception("This is a test exception");
  }

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Example of Nuntio Pluto',
      home: Scaffold(
        body: Container(
          padding: const EdgeInsets.all(20),
          width: double.infinity,
          child: Column(
            children: [
              const Padding(
                padding: EdgeInsets.all(8.0),
                child: Text("Test the Pluto Logging Tool"),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: ElevatedButton(
                  onPressed: () => PlutoLogger.debug("Test debug"),
                  child: const Text("Test debug log"),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: ElevatedButton(
                  onPressed: () => PlutoLogger.info("Test info"),
                  child: const Text("Test info log"),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: ElevatedButton(
                  onPressed: () => PlutoLogger.warn("Test warning"),
                  child: const Text("Test warn log"),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: ElevatedButton(
                  onPressed: () => PlutoLogger.error("Test error"),
                  child: const Text("Test error log"),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: ElevatedButton(
                  onPressed: () => PlutoLogger.fatal("Test fatal"),
                  child: const Text("Test fatal log"),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: ElevatedButton(
                  onPressed: throwError,
                  child: const Text("Test throw exception"),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: ElevatedButton(
                  onPressed: () {
                    Pluto.instance.crash();
                  },
                  child: const Text("Test crash app"),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

verified publisherinfobits.dk

Nuntio Pluto is a simple to use logging tool.

Homepage

License

unknown (license)

Dependencies

flutter, grpc, nuntio_core, stack_trace

More

Packages that depend on nuntio_pluto