3
头图

What is AnyInspect?

AnyInspect is a tool for debugging your Flutter application, written in Dart / Flatter. Currently, you can use AnyInspect to check outgoing network requests in the application or view SharedPreferences data. In the future, you can even view and modify application database data in AnyInspect.

download

You can release page download AnyInspect desktop. Please also check website for other installation methods.

Quick start

After downloading and installing the AnyInspect desktop, integrate anyinspect and supporting plug-ins into your project and re-run your application.

You can also install the integration example directly to see the effect: anyinspect_integrate_example

Install

Add this to the project's pubspec.yaml file:

dependencies:
  anyinspect: ^0.1.0
  # 已支持的插件,请根据你的需求进行添加。
  anyinspect_plugin_network: ^0.1.0
  anyinspect_plugin_shared_preferences: ^0.1.0

usage

import 'package:anyinspect/anyinspect.dart';
import 'package:anyinspect_plugin_network/anyinspect_plugin_network.dart';
import 'package:anyinspect_plugin_shared_preferences/anyinspect_plugin_shared_preferences.dart';

Future<void> main(List<String> args) async {
  AnyInspect anyInspect = AnyInspect.instance;
  anyInspect.addPlugin(AnyInspectPluginNetwork());
  anyInspect.addPlugin(AnyInspectPluginSharedPreferences());
  anyInspect.start();
  
  // ...
}

Show assist ball

The auxiliary ball can display the connection status with the desktop, and can manually reconnect after disconnecting.

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

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  void initState() {
    super.initState();
    // 在您的首页显示辅助球。
    AnyInspect.instance.assistiveBall.show(context);
  }

  @override
  Widget build(BuildContext context) {
    // ...
  }
}

Plug-in

These are the available plugins.

PluginPub
anyinspect_plugin_network
anyinspect_plugin_shared_preferences

Discussion group

Welcome to join the discussion group to share your suggestions and ideas with me.

Related Links


lijy91
535 声望14 粉丝