### Create PlainLogarteEntry Example Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/types.md Example demonstrating how to instantiate a PlainLogarteEntry with a message and an optional source. ```dart final entry = PlainLogarteEntry( 'User tapped login button', source: 'LoginScreen', ); ``` -------------------------------- ### Integration Examples Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Code examples demonstrating how to integrate Logarte with popular libraries like Dio and Flutter's MaterialApp. ```APIDOC ## Integration ### Dio ```dart dio.interceptors.add(LogarteDioInterceptor(logarte)); ``` ### Navigator ```dart MaterialApp( navigatorObservers: [LogarteNavigatorObserver(logarte)] ) ``` ``` -------------------------------- ### String Clipboard Usage Example Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/extensions.md A concise example demonstrating how to copy the string representation of the first log entry to the clipboard using the `copyToClipboard` extension. ```dart import 'package:logarte/src/extensions/string_extensions.dart'; final log = logarte.logs.value.first.toString(); await log.copyToClipboard(context); // Shows "Copied" snackbar and sets clipboard ``` -------------------------------- ### Run Flutter Pub Get Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/getting-started.md After adding the dependency, run this command to fetch the package. ```bash flutter pub get ``` -------------------------------- ### Global Logarte Setup Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Demonstrates how to initialize and use the Logarte instance globally in a Dart application. ```dart // globals.dart final logarte = Logarte( password: '1234', ignorePassword: kDebugMode, onShare: (data) => Share.share(data), onExport: (data) => sendToServer(data), ); // main.dart void main() { runApp(const MyApp()); } // Use anywhere logarte.log('message'); ``` -------------------------------- ### Direct Usage Example Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/console-widgets.md Demonstrates how to directly navigate to the LogarteDashboardScreen within a Flutter application. ```dart import 'package:logarte/logarte.dart'; Navigator.of(context).push( MaterialPageRoute( builder: (_) => LogarteDashboardScreen(logarte), ), ); ``` -------------------------------- ### Logarte Storage Example Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/state-management.md An example illustrating the structure of the 'logarte.logs' ValueNotifier, which holds a list of LogarteEntry objects. Newest entries are typically at the beginning of the list. ```dart logarte.logs.value = [ NetworkLogarteEntry(...), // Newest PlainLogarteEntry(...), DatabaseLogarteEntry(...), // ... more entries ... ] ``` -------------------------------- ### Instantiate NetworkRequestLogarteEntry Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/types.md Example of creating a NetworkRequestLogarteEntry instance with common request details. ```dart final request = NetworkRequestLogarteEntry( url: 'https://api.example.com/users', method: 'POST', headers: {'Content-Type': 'application/json'}, body: {'name': 'John'}, sentAt: DateTime.now(), ); ``` -------------------------------- ### Typical Logarte Setup Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Demonstrates the essential steps to initialize and integrate Logarte into a Flutter application. This includes creating an instance, attaching the floating button, adding a navigation observer, and optionally adding a Dio interceptor. ```dart final logarte = Logarte( password: '1234', ignorePassword: kDebugMode, ); logarte.attach(context: context, visible: kDebugMode); MaterialApp( navigatorObservers: [LogarteNavigatorObserver(logarte)], ) dio.interceptors.add(LogarteDioInterceptor(logarte)); logarte.log('Event happened'); logarte.database(target: 'key', value: 'val', source: 'SharedPreferences'); ``` -------------------------------- ### Flutter Library Configuration Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/windows/flutter/CMakeLists.txt Sets up the Flutter library path and headers. Published to the parent scope for the install step. ```cmake cmake_minimum_required(VERSION 3.14) set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") # Configuration provided via flutter tool. include(${EPHEMERAL_DIR}/generated_config.cmake) # TODO: Move the rest of this into files in ephemeral. See # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") # Published to parent scope for install step. set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) list(APPEND FLUTTER_LIBRARY_HEADERS "flutter_export.h" "flutter_windows.h" "flutter_messenger.h" "flutter_plugin_registrar.h" "flutter_texture_registrar.h" ) list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") add_library(flutter INTERFACE) target_include_directories(flutter INTERFACE "${EPHEMERAL_DIR}" ) target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") add_dependencies(flutter flutter_assemble) ``` -------------------------------- ### Instantiate and Use NetworkLogarteEntry Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/types.md Example of creating a NetworkLogarteEntry instance and accessing its formatted duration and curl command extensions. ```dart final entry = NetworkLogarteEntry( request: NetworkRequestLogarteEntry(...), response: NetworkResponseLogarteEntry(...), ); print(entry.asReadableDuration); // "250 ms" print(entry.toCurlCommand()); // "curl -X GET ..." ``` -------------------------------- ### Complete Network Logging Example Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/extensions.md Demonstrates comprehensive network logging with Logarte, including logging requests and responses, and accessing various entry extensions for duration, size, and cURL command generation. Also shows pretty-printing JSON responses. ```dart import 'package:logarte/logarte.dart'; import 'package:logarte/src/extensions/entry_extensions.dart'; import 'package:logarte/src/extensions/object_extensions.dart'; // Log network request logarte.network( request: NetworkRequestLogarteEntry( url: 'https://api.example.com/users', method: 'POST', headers: {'Content-Type': 'application/json'}, body: {'name': 'John'}, sentAt: DateTime.now(), ), response: NetworkResponseLogarteEntry( statusCode: 201, headers: {'Content-Type': 'application/json'}, body: {'id': 1, 'name': 'John'}, receivedAt: DateTime.now(), ), ); // Access extensions final entry = logarte.logs.value.first as NetworkLogarteEntry; print('Duration: ${entry.asReadableDuration}'); // "245 ms" print('Response size: ${entry.response.body?.toString().asReadableSize}'); // "0.02 kb" print('Curl: ${entry.toCurlCommand()}'); // Full curl command // Pretty print response print('Response: ${entry.response.body.prettyJson}'); ``` -------------------------------- ### Create Database Operation Logarte Entry Instance Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/types.md Example of how to instantiate a DatabaseLogarteEntry for logging a storage operation. Demonstrates setting the target key, value, and source. ```dart final entry = DatabaseLogarteEntry( target: 'theme_mode', value: 'dark', source: 'SharedPreferences', ); ``` -------------------------------- ### Create Network Response Logarte Entry Instance Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/types.md Example of how to instantiate a NetworkResponseLogarteEntry with sample data. Useful for testing or manual logging. ```dart final response = NetworkResponseLogarteEntry( statusCode: 200, headers: {'Content-Type': 'application/json'}, body: {'id': 1, 'name': 'John'}, receivedAt: DateTime.now(), ); ``` -------------------------------- ### Install Flutter Assets Directory Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/linux/CMakeLists.txt Ensures the Flutter assets directory is completely re-copied on each build to prevent stale files. This is crucial for maintaining up-to-date assets. ```cmake set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install( CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Advanced Configuration with Custom Callbacks and Tab Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/getting-started.md Advanced Logarte setup with custom callbacks for sharing, exporting, and specific UI interactions (long press, double tap). Also includes a custom tab for the developer console. ```dart final logarte = Logarte( password: '1234', ignorePassword: kDebugMode, logBufferLength: 3000, // Callbacks onShare: (data) => Share.share(data), onExport: (data) => sendLogsToServer(data), onRocketLongPressed: (context) => openSettings(context), onRocketDoubleTapped: (context) => showThemeDialog(context), // Custom tab customTab: MyCustomDevToolsTab(), ); ``` -------------------------------- ### Install AOT Library Conditionally Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/linux/CMakeLists.txt Installs the AOT (Ahead-Of-Time compilation) library only on non-Debug builds. This optimizes performance for release versions by including pre-compiled code. ```cmake if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() ``` -------------------------------- ### LogarteMagicalTap Usage Example Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/console-widgets.md Demonstrates how to integrate LogarteMagicalTap into a Flutter widget tree. Ensure the Logarte instance is initialized and passed to the widget along with the desired child widget. ```dart import 'package:logarte/logarte.dart'; final logarte = Logarte(password: '1234'); @override Widget build(BuildContext context) { return LogarteMagicalTap( logarte: logarte, child: Text('App Version 1.0.0'), ); } ``` -------------------------------- ### Set Minimum CMake Version and Project Name Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/linux/CMakeLists.txt Specifies the minimum required CMake version and the project name. This is a standard starting point for CMake projects. ```cmake cmake_minimum_required(VERSION 3.10) project(runner LANGUAGES CXX) ``` -------------------------------- ### Add Logarte Dependency Source: https://github.com/kamranbekirovyz/logarte/blob/main/README.md Add the logarte dependency to your pubspec.yaml file and run `flutter pub get`. ```yaml dependencies: logarte: ^0.2.1 ``` -------------------------------- ### Set Installation RPATH Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/linux/CMakeLists.txt Configures the RPATH for loading bundled libraries from the 'lib/' directory relative to the binary. This is important for ensuring dynamic libraries are found at runtime. ```cmake set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") ``` -------------------------------- ### Setup Global Error Handling in Dart Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/getting-started.md Configure Logarte to capture and log Flutter and platform errors globally. Ensure Logarte is initialized before calling this function. ```dart void setupGlobalErrorHandling() { FlutterError.onError = (FlutterErrorDetails details) { logarte.log( 'Flutter Error: ${details.exception}', stackTrace: details.stack, source: 'ErrorHandler', ); }; PlatformDispatcher.instance.onError = (error, stack) { logarte.log( 'Platform Error: $error', stackTrace: stack, source: 'PlatformDispatcher', ); return true; }; } ``` -------------------------------- ### Logarte Overlay and State Methods Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Methods for managing the Logarte overlay and accessing its state. Use `attach` and `detachOverlay` to control the floating button's visibility and `openConsole` to manually open the console. Access `isOverlayAttached`, `logs.value` to get current state. ```dart logarte.attach({required context, required visible}); logarte.detachOverlay(); logarte.openConsole(context); bool isAttached = logarte.isOverlayAttached; List entries = logarte.logs.value; ``` -------------------------------- ### LogarteNavigatorObserver Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/integration-channels.md Initializes the LogarteNavigatorObserver with a Logarte instance to capture navigation events. ```dart LogarteNavigatorObserver(Logarte _logarte) ``` -------------------------------- ### NetworkLogarteEntry Extension Methods Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Provides methods to get a readable duration or a cURL command representation from a NetworkLogarteEntry. ```dart entry.asReadableDuration // "245 ms" entry.toCurlCommand() // curl command ``` -------------------------------- ### Logarte Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/configuration.md Reference for all initialization options available when creating a new Logarte instance. ```APIDOC ## Logarte Constructor ### Description Initializes the Logarte logger with various configuration options to customize its behavior, such as security, callbacks, and logging preferences. ### Parameters #### Constructor Parameters - **password** (`String?`) - Optional - An optional password for accessing the debug console. If set, users must enter the correct password before viewing logs. If `null`, the console is accessible without authentication. - **ignorePassword** (`bool`) - Optional - Defaults to `!kReleaseMode`. Whether to bypass password authentication. Useful for requiring password only in production. Recommended: Set to `kDebugMode` to skip authentication during development. - **onShare** (`Function(String data)?`) - Optional - Callback when user taps "Share" button in network details screen. Receives formatted network request/response as a string. - **onExport** (`Function(String data)?`) - Optional - Callback when user taps "Export All Logs" button in dashboard. Receives all logs formatted with header, timestamps, and entry counts. - **onRocketLongPressed** (`Function(BuildContext context)?`) - Optional - Callback when the floating action button is long-pressed. Receives the current `BuildContext`. - **onRocketDoubleTapped** (`Function(BuildContext context)?`) - Optional - Callback when the floating action button is double-tapped. Receives the current `BuildContext`. - **logBufferLength** (`int`) - Optional - Defaults to `2500`. The maximum number of log entries to keep in memory. When the buffer is full and a new entry is added, the oldest entry is removed. - **disableDebugConsoleLogs** (`bool`) - Optional - Defaults to `false`. Whether to suppress logs from appearing in the IDE debug console. If `true`, logs only appear in the Logarte UI. ### Example ```dart import 'package:logarte/logarte.dart'; import 'package:flutter/foundation.dart'; final logarte = Logarte( password: kDebugMode ? null : 'prod_secret', ignorePassword: kDebugMode, onShare: (String content) { // Implement sharing logic }, onExport: (String content) { // Implement export logic }, logBufferLength: 5000, disableDebugConsoleLogs: kReleaseMode, ); ``` ``` -------------------------------- ### Initialize Logarte Instance Source: https://github.com/kamranbekirovyz/logarte/blob/main/README.md Create a global Logarte instance with optional configurations like password, debug mode handling, network sharing, and shortcut actions. ```dart final Logarte logarte = Logarte( // Protect with password password: '1234', // Skip password in debug mode ignorePassword: kDebugMode, // Share network request onShare: (String content) { Share.share(content); }, // To have logs in IDE's debug console (default is false) disableDebugConsoleLogs: false, // Add shortcut actions (optional) onRocketLongPressed: (context) { // e.g: toggle theme mode } onRocketDoubleTapped: (context) { // e.g: change language } ); ``` -------------------------------- ### Manual Network Logging with Logarte Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Demonstrates how to manually log network requests and responses using Logarte when automatic logging is not feasible. ```dart final response = await http.get(url); logarte.network( request: NetworkRequestLogarteEntry(...), response: NetworkResponseLogarteEntry(...), ); ``` -------------------------------- ### Get Current Logarte Overlay Entry Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/console-widgets.md Retrieves the current `OverlayEntry` for the floating button if it is attached. Returns null if the overlay is not currently in the widget tree. ```dart static OverlayEntry? get currentEntry ``` -------------------------------- ### LogarteFabState Methods Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/state-management.md Allows programmatic control over the FAB's visibility state. ```APIDOC ## LogarteFabState Methods ### Description Methods to programmatically control the FAB's state. #### open() ##### Description Mark FAB as opened (dashboard visible). ##### Signature ```dart void open() ``` ##### Behavior - Sets internal state to `true` - Triggers `fabStateListener` updates - Deferred until next frame via `SchedulerBinding.instance.addPostFrameCallback` - Prevents state conflicts during build cycles ##### Example ```dart LogarteFabState.instance.open(); ``` #### close() ##### Description Mark FAB as closed (dashboard hidden). ##### Signature ```dart void close() ``` ##### Behavior - Sets internal state to `false` - Triggers `fabStateListener` updates - Deferred until next frame ##### Example ```dart LogarteFabState.instance.close(); ``` ``` -------------------------------- ### Logarte Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Initializes the Logarte class with various configuration options. ```APIDOC ## Logarte Constructor ### Description Initializes the Logarte class with optional parameters for password protection, sharing, exporting, gesture handling, log buffer size, debug console logs, and custom tabs. ### Parameters - **password** (String?) - Optional - Password for authentication. - **ignorePassword** (bool) - Optional - If true, skips password authentication. Defaults to `!kReleaseMode`. - **onShare** (Function(String)?) - Optional - Callback function when data is shared. - **onExport** (Function(String)?) - Optional - Callback function when data is exported. - **onRocketLongPressed** (Function(BuildContext)?) - Optional - Callback for long-pressing the rocket icon. - **onRocketDoubleTapped** (Function(BuildContext)?) - Optional - Callback for double-tapping the rocket icon. - **logBufferLength** (int) - Optional - Maximum number of log entries to buffer. Defaults to 2500. - **disableDebugConsoleLogs** (bool) - Optional - If true, disables IDE debug console logs. Defaults to false. - **customTab** (Widget?) - Optional - A custom widget to be displayed as an additional tab. ``` -------------------------------- ### Setup Crash Reporting with Firebase in Dart Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/getting-started.md Configure Logarte to export all collected logs to Firebase Crashlytics when a fatal Flutter error occurs. Ensure FirebaseCrashlytics is properly initialized. ```dart void setupCrashReporting() { FirebaseCrashlytics.instance.recordFlutterFatalError((errorDetails) { final allLogs = logarte.logs.value.map((e) => e.toString()).join(' '); FirebaseCrashlytics.instance.setCustomKey('logarte_logs', allLogs); }); } ``` -------------------------------- ### Console and Overlay Management Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Methods for managing the console and overlay. ```APIDOC ## Console and Overlay Management ### attach Attaches the overlay to the provided context. - **context** (BuildContext) - The build context to attach the overlay to. - **visible** (bool) - Whether the overlay should be initially visible. ### detachOverlay Detaches the overlay from the UI. ### openConsole Opens the debug console. - **context** (BuildContext) - The build context to open the console in. ### clear Clears all log entries. ``` -------------------------------- ### Filter Logs within a Widget State Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/state-management.md Filter log entries within a generic widget state based on type and search query. This example demonstrates dynamic filtering within a UI component. ```dart class _ListState { @override Widget build(BuildContext context) { final List logs = T == LogarteEntry ? widget.instance.logs.value : widget.instance.logs.value.whereType().toList(); final String search = widget.controller.text.toLowerCase(); final List filtered = logs.where((log) { return log.contents.any( (content) => content.toLowerCase().contains(search), ); }).toList(); } } ``` -------------------------------- ### Minimal Logarte Configuration Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/configuration.md Initialize Logarte with default settings. This configuration uses no password, a buffer of 2500 entries, and has IDE logs enabled. ```dart final logarte = Logarte(); // Uses all defaults // Password: none // Buffer: 2500 entries // IDE logs: enabled ``` -------------------------------- ### Apply Standard Compiler Settings Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/linux/CMakeLists.txt Configures C++ standard, warning levels, optimization, and NDEBUG definition for a target. Use this to enforce consistent build settings across targets. ```cmake function(APPLY_STANDARD_SETTINGS TARGET) target_compile_features(${TARGET} PUBLIC cxx_std_14) target_compile_options(${TARGET} PRIVATE -Wall -Werror) target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") endfunction() ``` -------------------------------- ### Get Readable Duration for Network Entry Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/extensions.md Calculates and formats the request duration in milliseconds. Returns 'N/A ms' if timestamps are missing. Handles null timestamps and calculates the difference between request sent and response received times. ```dart extension LogarteNetworkEntryXs on NetworkLogarteEntry { String get asReadableDuration } ``` ```dart final entry = networkEntry; print(entry.asReadableDuration); // "245 ms" ``` -------------------------------- ### Apply Standard Build Settings Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/windows/runner/CMakeLists.txt Applies a predefined set of standard build settings to the specified target. This is a convenience function that can be removed if custom build settings are required. ```cmake apply_standard_settings(${BINARY_NAME}) ``` -------------------------------- ### Dio HTTP Client Integration with LogarteDioInterceptor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/integration-channels.md Demonstrates how to add the LogarteDioInterceptor to a Dio HTTP client instance to automatically log all requests and responses. Ensure Logarte and Dio are imported. ```dart import 'package:dio/dio.dart'; import 'package:logarte/logarte.dart'; final logarte = Logarte(); final dio = Dio(); // Add interceptor dio.interceptors.add(LogarteDioInterceptor(logarte)); // All requests now automatically logged final response = await dio.get('https://api.example.com/data'); ``` -------------------------------- ### Configure Cross-Building Root Path Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/linux/CMakeLists.txt Sets up the sysroot and find root path for cross-compiling. This is used when building for a different architecture or operating system than the host. ```cmake if(FLUTTER_TARGET_PLATFORM_SYSROOT) set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) endif() ``` -------------------------------- ### String Extension Methods Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Enables copying text to the clipboard and formatting text size into a readable format. ```dart await text.copyToClipboard(context) text.asReadableSize // "0.02 kb" ``` -------------------------------- ### NetworkLogEntryDetailsScreen Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/console-widgets.md Constructor for the NetworkLogEntryDetailsScreen widget. Requires a `NetworkLogarteEntry` and the `Logarte` instance for callbacks. ```dart const NetworkLogEntryDetailsScreen( NetworkLogarteEntry entry, { Key? key, required Logarte instance, } ) ``` -------------------------------- ### Link Libraries and Include Directories Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/windows/runner/CMakeLists.txt Links necessary libraries (flutter, flutter_wrapper_app, dwmapi.lib) and sets include directories for the application target. Add any application-specific dependencies here. ```cmake target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) ``` ```cmake target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") ``` ```cmake target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") ``` -------------------------------- ### LogarteFabState Singleton Access Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/state-management.md Provides access to the global FAB state instance. This is the primary way to interact with the FAB's state management. ```APIDOC ## LogarteFabState Singleton Access ### Description Access the global FAB state instance. ### Singleton Access ```dart static LogarteFabState get instance => _instance ``` ### Usage Example ```dart import 'package:logarte/src/console/logarte_fab_state.dart'; final fabState = LogarteFabState.instance; ``` ``` -------------------------------- ### Reactive Log Listening with ValueListenableBuilder Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/state-management.md Demonstrates how to listen to log changes reactively using ValueListenableBuilder to display log entries in a ListView. Ensure Logarte is initialized and accessible as 'logarte'. ```dart ValueListenableBuilder>( valueListenable: logarte.logs, builder: (context, entries, _) { return ListView( children: entries.map((e) => Text(e.toString())), ); }, ) ``` -------------------------------- ### PlainLogarteEntry Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Represents a simple log entry with a message and an optional source. ```APIDOC ## PlainLogarteEntry ### Description Represents a simple log entry with a message and an optional source. ### Constructor ```dart PlainLogarteEntry(String message, {String? source}) ``` ### Properties - **message** (String) - Log text - **source** (String?) - Source identifier ``` -------------------------------- ### Initialize Logarte with Password Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/configuration.md Set an optional password for accessing the debug console. If set, users must enter the correct password before viewing logs. This comparison is case-sensitive. ```dart final logarte = Logarte(password: 'debug1234'); ``` -------------------------------- ### Creating Logarte Entries Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/state-management.md Illustrates the creation of different types of log entries using Logarte's logging methods. 'log' creates a 'PlainLogarteEntry', while 'network' creates a 'NetworkLogarteEntry'. ```dart logarte.log('message'); // Creates PlainLogarteEntry logarte.network(request: ..., response: ...); // Creates NetworkLogarteEntry ``` -------------------------------- ### Logarte Constructor Parameters Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/logarte-core.md Configure the Logarte instance with various options including password protection, callbacks for sharing and exporting logs, gestures for the floating button, log buffer size, debug console disabling, and custom UI tabs. ```dart Logarte({ String? password, bool ignorePassword = !kReleaseMode, Function(String data)? onShare, Function(String data)? onExport, Function(BuildContext context)? onRocketLongPressed, Function(BuildContext context)? onRocketDoubleTapped, int logBufferLength = 2500, bool disableDebugConsoleLogs = false, Widget? customTab, }) ``` -------------------------------- ### NavigatorLogarteEntry Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Instantiate this entry for navigation events, capturing the current route, previous route, and action type. ```dart NavigatorLogarteEntry({ required Route? route, required Route? previousRoute, required NavigationAction action, }) ``` -------------------------------- ### LogarteDioInterceptor Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/integration-channels.md Initializes the LogarteDioInterceptor with a Logarte instance. ```dart LogarteDioInterceptor(Logarte _logarte) ``` -------------------------------- ### Global Instance Pattern for Logarte Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/configuration.md Provides the recommended approach for using Logarte by creating a single global instance. This pattern simplifies access to the logger throughout the application without needing to pass the instance manually. ```dart // global.dart final logarte = Logarte( password: '1234', ignorePassword: kDebugMode, onShare: (data) => Share.share(data), ); // main.dart void main() { runApp(MyApp()); } // anywhere in app logarte.log('Event happened'); logarte.attach(context: context, visible: kDebugMode); ``` -------------------------------- ### Logarte Methods Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Reference for the core methods provided by the Logarte SDK for logging, overlay management, and state access. ```APIDOC ## Logarte Methods ### Logging - `logarte.log(message, {stackTrace, source})` - `logarte.network({required request, required response})` - `logarte.database({required target, required value, required source})` - `logarte.navigation({required route, required previousRoute, required action})` ### Overlay - `logarte.attach({required context, required visible})` - `logarte.detachOverlay()` - `logarte.openConsole(context)` ### State - `logarte.clear()` - `bool isAttached = logarte.isOverlayAttached` - `List entries = logarte.logs.value` ``` -------------------------------- ### NetworkResponseLogarteEntry Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Details of an incoming network response. ```APIDOC ## NetworkResponseLogarteEntry ### Description Contains detailed information about a network response, including the status code, headers, and body. ### Constructor ```dart NetworkResponseLogarteEntry({required int? statusCode, required Map? headers, required Object? body, DateTime? receivedAt}) ``` ### Properties - **statusCode** (int?) - HTTP status code - **headers** (Map?) - Response headers - **body** (Object?) - Response body - **receivedAt** (DateTime?) - Timestamp when the response was received ``` -------------------------------- ### Logarte Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/logarte-core.md Initializes the Logarte class with various configuration options for the debug console and logging. ```APIDOC ## Logarte Constructor ### Description Initializes the Logarte class with options for password protection, callbacks for sharing and exporting logs, callbacks for floating button interactions, log buffer size, disabling IDE console logs, and a custom tab widget. ### Parameters #### Constructor Parameters - **password** (String?) - Optional - Optional password for accessing the debug console - **ignorePassword** (bool) - Optional - If true, bypasses password check (useful for debug mode). Default: !kReleaseMode - **onShare** (Function(String)?) - Optional - Callback invoked when user shares network request content - **onExport** (Function(String)?) - Optional - Callback invoked when user exports all logs - **onRocketLongPressed** (Function(BuildContext)?) - Optional - Callback when floating button is long-pressed - **onRocketDoubleTapped** (Function(BuildContext)?) - Optional - Callback when floating button is double-tapped - **logBufferLength** (int) - Optional - Maximum number of log entries to keep in memory. Default: 2500 - **disableDebugConsoleLogs** (bool) - Optional - If true, prevents logs from appearing in IDE debug console. Default: false - **customTab** (Widget?) - Optional - Custom widget to display as additional tab in dashboard ``` -------------------------------- ### NetworkLogarteEntry Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Instantiate this entry for network-related logs, requiring both request and response details. ```dart NetworkLogarteEntry({ required NetworkRequestLogarteEntry request, required NetworkResponseLogarteEntry response, }) ``` -------------------------------- ### NavigatorLogarteEntry Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Represents a log entry for navigation events. ```APIDOC ## NavigatorLogarteEntry ### Description Represents a log entry for navigation events within the application, tracking current and previous routes, and the action taken. ### Constructor ```dart NavigatorLogarteEntry({required Route? route, required Route? previousRoute, required NavigationAction action}) ``` ### Properties - **route** (Route?) - The current route - **previousRoute** (Route?) - The previous route - **action** (NavigationAction) - The type of navigation action performed ``` -------------------------------- ### LogarteFabState Properties Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/state-management.md Exposes reactive listeners and synchronous getters for the FAB's current state. ```APIDOC ## LogarteFabState Properties ### Description Provides reactive listener for FAB state changes and a synchronous getter for the current state. #### fabStateListener ##### Description Provides reactive listener for FAB state changes. ##### Signature ```dart ValueListenable get fabStateListener ``` ##### Returns - `true` when console is open/dashboard is visible - `false` when console is closed ##### Usage Pattern ```dart ValueListenableBuilder( valueListenable: LogarteFabState.instance.fabStateListener, builder: (context, isOpened, child) { return Text(isOpened ? 'Console Open' : 'Console Closed'); }, ) ``` #### isOpened ##### Description Current FAB state (synchronous getter). ##### Signature ```dart bool get isOpened ``` ##### Returns - `true` if dashboard is open, `false` otherwise ##### Note For reactive updates, use `fabStateListener` instead. ``` -------------------------------- ### LogarteDashboardScreen Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/console-widgets.md Defines the constructor for the LogarteDashboardScreen, requiring a Logarte instance. ```dart const LogarteDashboardScreen( Logarte instance, { Key? key, } ) ``` -------------------------------- ### Error Handling with Logarte Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Shows how to log errors and their stack traces using Logarte within a try-catch block. ```dart try { await riskySomething(); } catch (e, st) { logarte.log('Error: $e', stackTrace: st); } ``` -------------------------------- ### openConsole() Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/logarte-core.md Programmatically opens the debug console. If configured, it may present a password screen first. ```APIDOC ## openConsole() ### Description Programmatically open the debug console (with password screen if configured). ### Method Signature ```dart Future openConsole(BuildContext context) ``` ### Parameters #### Required Parameters - **context** (BuildContext) - Navigation context. ### Throws May throw if context is invalid or NavigatorState is unavailable. ### Example ```dart logarte.openConsole(context); ``` ``` -------------------------------- ### LogarteDashboardScreen Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Constructor for the LogarteDashboardScreen widget, which provides a visual dashboard for viewing logs. It takes a Logarte instance as a parameter and supports various log tabs. ```dart const LogarteDashboardScreen( Logarte instance, { Key? key, } ) ``` -------------------------------- ### Logarte Properties Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Exposes reactive log entries, overlay visibility, and configuration states. ```APIDOC ## Logarte Properties ### Description Provides access to the current state and configuration of the Logarte instance. ### Properties - **logs** (ValueNotifier>) - Reactive list of log entries. - **isOverlayAttached** (bool) - Indicates if the overlay is currently attached and visible. - **password** (String?) - The configured password for authentication. - **ignorePassword** (bool) - Flag to bypass password authentication. - **onShare** (Function(String)?) - Callback for sharing functionality. - **onExport** (Function(String)?) - Callback for exporting functionality. - **onRocketLongPressed** (Function(BuildContext)?) - Handler for long-press events on the rocket icon. - **onRocketDoubleTapped** (Function(BuildContext)?) - Handler for double-tap events on the rocket icon. - **logBufferLength** (int) - The maximum capacity of the log buffer. - **disableDebugConsoleLogs** (bool) - Controls whether debug logs are written to the IDE console. - **customTab** (Widget?) - A custom widget to be displayed in the dashboard. ``` -------------------------------- ### Implement OnShare Callback Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/configuration.md Integrate with the OS share sheet to send formatted network request/response data when the user taps the 'Share' button. Requires the 'share_plus' package. ```dart import 'package:share_plus/share_plus.dart'; final logarte = Logarte( onShare: (String content) { Share.share(content); }, ); ``` -------------------------------- ### PlainLogarteEntry Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Use this constructor to create a simple log entry with a message and an optional source identifier. ```dart PlainLogarteEntry( String message, { String? source, } ) ``` -------------------------------- ### Import and Access FAB State Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/state-management.md Import the LogarteFabState class and access its singleton instance to interact with the FAB's state. ```dart import 'package:logarte/src/console/logarte_fab_state.dart'; final fabState = LogarteFabState.instance; ``` -------------------------------- ### Create Global Logarte Instance Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/getting-started.md Create a global instance of Logarte for easy access throughout your application. It's recommended to ignore the password in debug mode. ```dart // globals.dart import 'package:logarte/logarte.dart'; final logarte = Logarte( password: '1234', ignorePassword: kDebugMode, ); ``` -------------------------------- ### Enable Modern CMake Behaviors Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/linux/CMakeLists.txt Explicitly opts into modern CMake behaviors to avoid warnings with recent CMake versions. This ensures compatibility and adherence to current best practices. ```cmake cmake_policy(SET CMP0063 NEW) ``` -------------------------------- ### Production Logarte Configuration Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/configuration.md Set up Logarte for production with a specific password, disabling password ignorance, setting a production log buffer size, and disabling debug console logs. Includes custom handlers for sharing and exporting data. ```dart final logarte = Logarte( password: 'prod_secret_123', ignorePassword: false, logBufferLength: 2000, disableDebugConsoleLogs: true, onShare: (data) => Share.share(data), onExport: (data) => sendToServer(data), ); ``` -------------------------------- ### Add LogarteNavigatorObserver to MaterialApp Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/getting-started.md Wrap your MaterialApp with LogarteNavigatorObserver to enable navigation logging. ```dart MaterialApp( home: MyApp(), navigatorObservers: [LogarteNavigatorObserver(logarte)], ) ``` -------------------------------- ### NetworkResponseLogarteEntry Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Create a network response log entry including status code, headers, body, and receive timestamp. ```dart NetworkResponseLogarteEntry({ required int? statusCode, required Map? headers, required Object? body, DateTime? receivedAt, }) ``` -------------------------------- ### LogarteFabState Management Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Manages the state of the Floating Action Button (FAB) for the Logarte console. ```APIDOC ## State Management: LogarteFabState ### Description Manages the open/close state of the Logarte console FAB. ### Singleton `static LogarteFabState get instance => _instance` ### Properties - `ValueListenable fabStateListener` — FAB state listener - `bool isOpened` — Current state ### Methods - `void open()` — Open console - `void close()` — Close console ``` -------------------------------- ### LogarteOverlay Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/console-widgets.md Manages the static overlay for the floating button, allowing attachment and detachment from the widget tree. ```APIDOC ## LogarteOverlay Static overlay management for floating button. ### Static Methods #### attach() Inserts floating button overlay into widget tree. ##### Parameters - **context** (BuildContext) - Required - The build context to attach the overlay to. - **instance** (Logarte) - Required - The Logarte instance to use for callbacks. ### Static Properties #### isAttached Returns true if overlay is currently in widget tree. #### currentEntry Returns the current `OverlayEntry` if attached, null otherwise. ``` -------------------------------- ### NetworkRequestLogarteEntry Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Details of an outgoing network request. ```APIDOC ## NetworkRequestLogarteEntry ### Description Contains detailed information about a network request, including the URL, method, headers, and body. ### Constructor ```dart const NetworkRequestLogarteEntry({required String url, required String method, Map? headers, Object? body, DateTime? sentAt}) ``` ### Properties - **url** (String) - Request URL - **method** (String) - HTTP method - **headers** (Map?) - Request headers - **body** (Object?) - Request body - **sentAt** (DateTime?) - Timestamp when the request was sent ``` -------------------------------- ### Link Application Dependencies Source: https://github.com/kamranbekirovyz/logarte/blob/main/example/linux/CMakeLists.txt Links the application target against necessary libraries like 'flutter' and GTK. Add any other application-specific libraries here. ```cmake target_link_libraries(${BINARY_NAME} PRIVATE flutter) target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) ``` -------------------------------- ### Flutter MaterialApp Integration with LogarteNavigatorObserver Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/integration-channels.md Shows how to integrate LogarteNavigatorObserver into a Flutter MaterialApp by adding it to the navigatorObservers list. Ensure Logarte and Flutter material are imported. ```dart import 'package:flutter/material.dart'; import 'package:logarte/logarte.dart'; final logarte = Logarte(); MaterialApp( home: MyApp(), navigatorObservers: [LogarteNavigatorObserver(logarte)], ) ``` -------------------------------- ### Open FAB Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/state-management.md Call the open() method to programmatically set the FAB state to opened. This action is deferred until the next frame to prevent state conflicts during build cycles. ```dart LogarteFabState.instance.open(); ``` -------------------------------- ### Accessing Logarte Configuration Properties Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/configuration.md Demonstrates how to access various configuration properties of the Logarte instance after it has been created. These properties are public and can be read directly. ```dart final logarte = Logarte(password: '1234'); print(logarte.password); // '1234' print(logarte.ignorePassword); // true/false print(logarte.logBufferLength); // 2500 print(logarte.disableDebugConsoleLogs); // false print(logarte.onShare); // Function reference or null ``` -------------------------------- ### Copy String to Clipboard Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/extensions.md Copies the string content to the device's clipboard and displays a confirmation snackbar. Requires a BuildContext to show the snackbar and access clipboard services. ```dart extension LogarteStringXs on String { Future copyToClipboard(BuildContext context) } ``` ```dart final message = "Debug data"; await message.copyToClipboard(context); // Shows snackbar: "Copied" ``` -------------------------------- ### Full-Featured Logarte Configuration Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/configuration.md A comprehensive Logarte configuration including password, buffer settings, custom share and export handlers, and specific callbacks for rocket icon interactions (long press for settings, double tap to clear logs). Also includes a custom tab. ```dart final logarte = Logarte( password: '1234', ignorePassword: kDebugMode, logBufferLength: 3000, disableDebugConsoleLogs: false, onShare: (content) { Share.share(content); }, onExport: (content) { debugPrint('Export: $content'); }, onRocketLongPressed: (context) { Navigator.of(context).push( MaterialPageRoute(builder: (_) => SettingsScreen()), ); }, onRocketDoubleTapped: (context) { showDialog( context: context, builder: (_) => AlertDialog( title: Text('Clear Logs?'), actions: [ TextButton( onPressed: () => logarte.clear(), child: Text('Clear'), ), ], ), ); }, customTab: DevToolsTab(), ); ``` -------------------------------- ### Logarte Widgets Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Information on using Logarte's provided widgets for UI integration. ```APIDOC ## Widgets ### Floating button with search ```dart logarte.attach(context: context, visible: true); ``` ### Dashboard ```dart LogarteDashboardScreen(logarte) ``` ### Magic tap trigger ```dart LogarteMagicalTap(logarte: logarte, child: widget) ``` ``` -------------------------------- ### Logarte Logging Methods Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/README.md Quick reference for various logging methods provided by Logarte. Use these to log different types of information such as general messages, network requests/responses, database operations, and navigation events. ```dart logarte.log(message, {stackTrace, source}); logarte.network({required request, required response}); logarte.database({required target, required value, required source}); logarte.navigation({required route, required previousRoute, required action}); ``` -------------------------------- ### NetworkLogarteEntry Constructor Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Represents a log entry for network requests and responses. ```APIDOC ## NetworkLogarteEntry ### Description Represents a log entry for network requests and responses, including details about the request and the response received. ### Constructor ```dart NetworkLogarteEntry({required NetworkRequestLogarteEntry request, required NetworkResponseLogarteEntry response}) ``` ### Properties - **request** (NetworkRequestLogarteEntry) - HTTP request details - **response** (NetworkResponseLogarteEntry) - HTTP response details ### Extensions - **asReadableDuration** (String) - Formats the request duration into a readable string. - **toCurlCommand()** (String) - Converts the network request into a cURL command string. ``` -------------------------------- ### Open Debug Console Programmatically Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/logarte-core.md Programmatically opens the debug console. If a password is configured, it will display the password screen first. Requires a BuildContext. ```dart Future openConsole(BuildContext context) ``` ```dart logarte.openConsole(context); ``` -------------------------------- ### navigation() Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/logarte-core.md Logs navigation events within the application. This is typically called automatically by LogarteNavigatorObserver. ```APIDOC ## navigation() ### Description Logs navigation events. Called automatically by `LogarteNavigatorObserver`. ### Method Signature ```dart void navigation({ required Route? route, required Route? previousRoute, required NavigationAction action, }) ``` ### Parameters #### Required Parameters - **route** (Route?) - Current route being navigated to. - **previousRoute** (Route?) - Previous route being navigated from. - **action** (NavigationAction) - Navigation action (push, pop, replace, remove). ``` -------------------------------- ### String Extensions Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md Provides extension methods for strings to copy to clipboard and format file sizes. ```APIDOC ## On String ### Description Provides extension methods for strings to interact with the clipboard and format size information. ### Methods - `Future copyToClipboard(BuildContext context)` — Copy to clipboard - `String get asReadableSize` — Size in kilobytes ``` -------------------------------- ### database() Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/logarte-core.md Logs local storage or database operations, including the target key/identifier, the value being stored, and the source of the operation. ```APIDOC ## database() ### Description Logs local storage/database operations. ### Method Signature ```dart void database({ required String target, required Object? value, required String source, }) ``` ### Parameters #### Required Parameters - **target** (String) - Key or identifier being stored. - **value** (Object?) - Value being stored (can be null). - **source** (String) - Storage source name (e.g., 'SharedPreferences', 'SQLite'). ### Example ```dart logarte.database( target: 'user_theme', value: 'dark', source: 'SharedPreferences', ); ``` ``` -------------------------------- ### Manual Network Request Logging with Logarte Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/integration-channels.md Provides a pattern for manually logging network requests and responses using the Logarte instance when not using an automatic interceptor like LogarteDioInterceptor. This requires constructing NetworkRequestLogarteEntry and NetworkResponseLogarteEntry objects. ```dart import 'package:logarte/logarte.dart'; import 'package:http/http.dart' as http; final logarte = Logarte(); // Make request final response = await http.get(Uri.parse('https://api.example.com/data')); // Manually log to Logarte logarte.network( request: NetworkRequestLogarteEntry( method: 'GET', url: 'https://api.example.com/data', headers: response.request!.headers, body: null, sentAt: DateTime.now(), ), response: NetworkResponseLogarteEntry( statusCode: response.statusCode, headers: response.headers, body: response.body, receivedAt: DateTime.now(), ), ); ``` -------------------------------- ### Logarte Deprecated Info Method Source: https://github.com/kamranbekirovyz/logarte/blob/main/_autodocs/api-summary.md This method is deprecated and should not be used. Use the `log` method instead. ```dart void info(Object? message, {bool write = true, String? source}) ```