搜尋分類、套件與程式碼儲存庫

inspector 封面
套件詳情v4.0.0

inspector

一個用於檢查小部件的 Flutter 套件。適用於快速除錯或 QA 測試。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
51.2萬
喜歡數
87
Pub 分數
150

安裝套件

flutter pub add inspector

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

inspectors 套件是一個專為 Flutter 設計的工具,用於即時檢視 widget,讓開發者與測試人員能快速調試 UI 問題或執行品質保證檢查。它提供一個互動式覆蓋層,可直接在裝置或模擬器上檢視 widget 樹、其屬性和佈局行為。非常適合開發過程中的快速反饋,無需複雜設定即可提升對 UI 結構的可見性。該套件支援所有主要平台,使其在各種環境中皆具備多功能性。

適用情境

  • 快速UI調試
  • QA測試
  • 即時小工具分析
  • 開發反饋迴圈
  • 跨平台 UI 驗證

主要特色

  • 互動式小部件覆蓋層
  • 即時屬性檢查
  • 支援所有 Flutter 平台
  • 所需的設定最少
  • 面向非開發人員的直覺式使用者介面

適合對象

  • Developers
  • QA 測試人員
  • UI 設計師
  • 快速原型團隊

使用建議

  • 不適用於生產建構
  • 可能影響大型應用的效能
  • 疊加層可能會在測試期間干擾使用者介面
  • 需要手動啟用
  • 僅限視覺檢查

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

inspector

Pub Version GitHub Workflow Status Coverage Status GitHub Repo stars

A Flutter package for inspecting widgets. Also comes with an eyedropper and a magnifying glass. Useful for debugging widgets and for QA testing.

Supports keyboard shortcuts if you're using a physical keyboard.

Check out the example web app!

Inspired by inspx.

WIP

Warning, the development of this package is still in progress and some things may break your app.

Features

  • [x] Color picker
  • [x] Size inspection
  • [x] Padding inspection
  • [x] Keyboard shortcuts
  • [x] Zooming
  • [ ] BorderRadius inspection
  • [x] TextStyle inspection

Installing

Add the dependency:

$ flutter pub add inspector

Import the package:

import 'package:inspector/inspector.dart';

Wrap MaterialApp.builder or WidgetsApp.builder with Inspector:

MaterialApp(
  home: ExampleApp(),
  builder: (context, child) => Inspector(child: child!), // Wrap [child] with [Inspector]
),

Optionally, you can pass isEnabled to the Inspector to disable it. By default, the inspector is disabled when kReleaseMode == true.

Usage

If the inspector is enabled, then a panel appears on the right side of the screen, with buttons to toggle size inspection and the color picker.

It's quite straightforward to use, just tap on the widget that you want to measure or tap on the pixel to get its color.

You can also use keyboard shortcuts - Shift will toggle the color picker, Z will toggle the zoom, and Alt or Cmd will toggle the widget inspector.

Examples

Contact me

Feel free to contact me at:

E-mail: kk.erzhan@gmail.com

所屬分類

原始碼儲存庫

使用此套件的專案