Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chililabs/chili_debug_view
https://github.com/chililabs/chili_debug_view
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/chililabs/chili_debug_view
- Owner: ChiliLabs
- License: bsd-3-clause
- Created: 2024-01-02T08:16:52.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-30T12:55:41.000Z (4 months ago)
- Last Synced: 2024-07-31T13:30:01.345Z (3 months ago)
- Language: Dart
- Size: 6.04 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Chili Debug view
This package allows to see network logs from mobile device.
This can help QA engineers to better debug your app features# Get started
Package uses dio (https://pub.dev/packages/dio) starting from version 5.5.0 to provide network logs,
so in order to use this package your requests must go through dio.For sharing it uses share_plus (https://pub.dev/packages/share_plus)
and path_provider (https://pub.dev/packages/path_provider)## Install
Add `chili_debug_view` to your `pubspec.yaml`:
```
dependencies:
chili_debug_view: ^1.1.0
```## Usage
1. Wrap your app via DebugView providing navigation key
```
import 'package:chili_debug_view/chili_debug_view.dart';...
class _AppState extends State {
final rootKey = GlobalKey();@override
Widget build(BuildContext context) {
return MaterialApp(
navigatorKey: rootKey,
builder: (_, app) {
return DebugView(
navigatorKey: rootKey,
showDebugViewButton: true,
app: app,
);
},
...
);
}
...
```2. To see network logs you need to add interceptor to your dio
```
import 'package:chili_debug_view/chili_debug_view.dart';dio.interceptors.add(NetworkLoggerInterceptor());
```# Sample Project
There is an [example app](https://github.com/ChiliLabs/chili_debug_view/tree/main/example) with simple request and app wrapping.
![example.gif](doc/assets/example.gif)