flutter_basics 0.0.3 copy "flutter_basics: ^0.0.3" to clipboard
flutter_basics: ^0.0.3 copied to clipboard

A lightweight Flutter package providing production-safe logging and in-app update utilities.

example/main.dart

import 'package:flutter_basics/flutter_basics.dart';

void main() {
  /// -----------------------------
  /// Console Logging
  /// -----------------------------
  MobigicLogger.debug("Debug message");
  MobigicLogger.info("Info message");
  MobigicLogger.warning("Warning message");
  MobigicLogger.error("Error message");

  /// -----------------------------
  /// Object / Map Logging
  /// -----------------------------
  MobigicLogger.info({
    "status": "success",
    "version": 1,
  });

  /// -----------------------------
  /// Fatal Error Logging
  /// -----------------------------
  try {
    throw Exception("Something went wrong");
  } catch (error, stackTrace) {
    MobigicLogger.error(
      "Fatal error occurred",
      error: error,
      stackTrace: stackTrace,
    );
  }

  /// -----------------------------
  /// File write & upload
  /// (Handled internally by flutter_basics)
  /// -----------------------------
  MobigicLogger.info("Logs are automatically written and can be uploaded later");
}
0
likes
160
points
181
downloads

Publisher

verified publishermobigic.com

Weekly Downloads

A lightweight Flutter package providing production-safe logging and in-app update utilities.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter, flutter_logs, flutter_upgrade_version, logger, open_file, path, path_provider

More

Packages that depend on flutter_basics