logmate 0.0.7-beta copy "logmate: ^0.0.7-beta" to clipboard
logmate: ^0.0.7-beta copied to clipboard

LogMate is a Flutter package that helps developers track and monitor logs remotely from their apps. It's perfect for debugging, monitoring, or error reporting.

example/example.dart

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

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize LogMate with your app's API key
  await LogMate.instance.initialize(apiKey: 'YOUR_API_KEY');

  runApp(MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(title: 'LogMate Example', home: HomeScreen());
  }
}

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

  void _sendTestLog() async {
    final success = await LogMate.instance.sendLog(
      message: "Test log message",
      severity: LogSeverity.info, //Optional
      source: "HomeScreen", //Optional
      customData: {'screen': 'home', 'action': 'tap'}, //Optional
    );

    if (success) {
      debugPrint("Log sent successfully.");
    } else {
      debugPrint("Failed to send log.");
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('LogMate Example')),
      body: Center(
        child: ElevatedButton(
          onPressed: _sendTestLog,
          child: const Text("Send Log"),
        ),
      ),
    );
  }
}
1
likes
160
points
226
downloads

Publisher

verified publisherbhoominn.com

Weekly Downloads

LogMate is a Flutter package that helps developers track and monitor logs remotely from their apps. It's perfect for debugging, monitoring, or error reporting.

Repository (GitHub)
View/report issues

Topics

#remotelog #logging

Documentation

API reference

Funding

Consider supporting this project:

www.github.com

License

MIT (license)

Dependencies

flutter, supabase_flutter

More

Packages that depend on logmate