NetLens

pub package pub package pub package pub package pub package pub package platform melos

NetLens is an in-app HTTP inspector for Flutter. It catches the requests and responses your app makes and lets you look through them, filter them, export them and send them again, right on the device.

Calls list with quick filters, status and GraphQL badges Response body in the collapsible JSON viewer Request with the API key and password hidden
Editing a call before sending it again Timeline of calls as a waterfall Statistics with the slowest endpoints

Supported HTTP clients:

Client Package
Dio netlens_dio
http netlens_http
HttpClient from dart:io netlens_http_client
Chopper netlens_chopper
Any other client NetLensAdapter from netlens

Calls are kept in memory by default, or in a database with netlens_objectbox.

Features:

  • Detailed request and response logs for every call
  • Inspector UI with statistics, notifications and shake to open
  • Search in URLs, headers and bodies, with quick filters by status, method and host
  • Sensitive headers, cookies and fields hidden in the inspector and masked in exports
  • Edit and resend a call (Dio, http and HttpClient)
  • Record calls as mock endpoints and replay them offline, in the app or from a local mock server
  • Collapsible JSON viewer with search
  • Export to a log file or to HAR for Chrome DevTools, Proxyman or Charles
  • GraphQL operation names and errors
  • Timeline of calls and slowest endpoints
  • Flutter and Android logs

Quick start

dependencies:
  netlens: ^1.1.0
  netlens_dio: ^1.1.0
import 'package:dio/dio.dart';
import 'package:netlens/netlens.dart';
import 'package:netlens/model/netlens_configuration.dart';
import 'package:netlens_dio/netlens_dio.dart';

final netLens = NetLens(
  configuration: NetLensConfiguration(showInspectorOnShake: true),
);
final dioAdapter = NetLensDioAdapter();
netLens.addAdapter(dioAdapter);

final dio = Dio()..interceptors.add(dioAdapter);

MaterialApp(
  navigatorKey: netLens.getNavigatorKey(),
  // ...
);

Documentation

You can find the documentation here.

Credits

NetLens is a fork of Alice by Jakub Homlala and its contributors, licensed under the Apache License 2.0. See NOTICE for details. Alice itself was inspired by Chuck and Chucker.

Libraries

core/netlens_adapter
core/netlens_call_replayer
core/netlens_core
core/netlens_http_status
core/netlens_logger
core/netlens_memory_storage
core/netlens_notification
core/netlens_storage
core/netlens_translations
core/netlens_utils
helper/netlens_call_filter
helper/netlens_call_redactor
helper/netlens_call_statistics
helper/netlens_conversion_helper
helper/netlens_endpoint_statistics
helper/netlens_export_helper
helper/netlens_graphql
helper/netlens_har_builder
helper/netlens_issue_analyzer
helper/netlens_json_tree
helper/netlens_log_classifier
helper/netlens_timeline
helper/netlens_url_validator
helper/netlens_watcher
helper/operating_system
mock/application/netlens_mock_recorder
mock/application/netlens_mocks
mock/data/netlens_call_mock_mapper
mock/data/netlens_file_mock_repository
mock/data/netlens_har_mock_importer
mock/data/netlens_memory_mock_repository
mock/data/netlens_mock_headers
mock/data/netlens_mock_importer
mock/data/netlens_mock_json_codec
mock/domain/netlens_mock
mock/domain/netlens_mock_matcher
mock/domain/netlens_mock_mode
mock/domain/netlens_mock_repository
mock/domain/netlens_mock_request
mock/domain/netlens_mock_resolver
mock/domain/netlens_mock_response
mock/server/netlens_mock_server
model/netlens_configuration
model/netlens_export_result
model/netlens_form_data_file
model/netlens_from_data_field
model/netlens_http_call
model/netlens_http_call_copy
model/netlens_http_error
model/netlens_http_request
model/netlens_http_response
model/netlens_log
model/netlens_redaction
model/netlens_replay_request
model/netlens_translation
netlens
netlens_mocks
Records HTTP calls as mock endpoints and replays them offline.
ui/call_details/model/netlens_call_details_tab
ui/call_details/model/netlens_menu_item
ui/call_details/page/netlens_call_details_page
ui/call_details/widget/netlens_call_error_screen
ui/call_details/widget/netlens_call_overview_screen
ui/call_details/widget/netlens_call_request_screen
ui/call_details/widget/netlens_call_response_screen
ui/calls_list/model/netlens_calls_list_sort_option
ui/calls_list/model/netlens_calls_list_tab_item
ui/calls_list/page/netlens_calls_list_page
ui/calls_list/widget/netlens_call_filter_bar
ui/calls_list/widget/netlens_call_list_item_widget
ui/calls_list/widget/netlens_calls_list_screen
ui/calls_list/widget/netlens_empty_logs_widget
ui/calls_list/widget/netlens_empty_state_widget
ui/calls_list/widget/netlens_error_logs_widget
ui/calls_list/widget/netlens_inspector_screen
ui/calls_list/widget/netlens_log_list_widget
ui/calls_list/widget/netlens_logs_screen
ui/calls_list/widget/netlens_raw_log_list_widger
ui/calls_list/widget/netlens_sort_dialog
ui/common/netlens_app_bar
ui/common/netlens_call_badges
ui/common/netlens_context_ext
ui/common/netlens_detail_widgets
ui/common/netlens_dialog
ui/common/netlens_issue_widgets
ui/common/netlens_json_viewer
ui/common/netlens_language
ui/common/netlens_navigation
ui/common/netlens_page
ui/common/netlens_scroll_behavior
ui/common/netlens_settings
ui/common/netlens_status_info_sheet
ui/common/netlens_theme
ui/common/netlens_url_issue_banner
ui/common/netlens_watcher_widgets
ui/mocks/netlens_mocks_page
ui/replay/netlens_replay_page
ui/stats/netlens_stats_page
ui/timeline/netlens_timeline_page
ui/watcher/netlens_watcher_page
utils/curl
utils/netlens_parser
utils/num_comparison
utils/shake_detector