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

Flutter error, navigation and HTTP telemetry for the MyLogger collector.

example/mylogger_flutter_example.dart

// Minimal integration example. Replace the collector URL and project key.
import 'package:flutter/material.dart';
import 'package:mylogger_flutter/mylogger_flutter.dart';

late final MyLogger logger;
late final MyLoggerHttpClient api;

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  logger = await MyLogger.init(
    apiKey: 'pk_YOUR_PROJECT_KEY',
    endpoint: Uri.parse('https://YOUR_COLLECTOR/api/telemetry/collect'),
    environment: 'production',
    release: '1.0.0+12', // Supply your actual app version + build.
    tracePropagationOrigins: {'https://api.your-app.com'},
  );
  api = MyLoggerHttpClient(logger);
  runApp(
    MaterialApp(
      navigatorObservers: [MyLoggerNavigatorObserver(logger)],
      routes: {'/': (_) => const Scaffold(body: Text('Home'))},
    ),
  );
}
0
likes
150
points
27
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter error, navigation and HTTP telemetry for the MyLogger collector.

Repository (GitHub)
View/report issues

Topics

#monitoring #error-tracking #observability

License

MIT (license)

Dependencies

flutter, http, path_provider

More

Packages that depend on mylogger_flutter