搜尋套件、儲存庫與 APP 分類

套件詳情v1.0.2

flutter_json_widget

用於 Flutter 的 JSON 查看器組件。以可擴展清單形式顯示 JSON 資料,讓手機上的資料輕鬆閱讀。

近 30 天下載
102
喜歡數
30
Pub 分數
40

安裝套件

flutter pub add flutter_json_widget

套件介紹

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

一個 Flutter 小部件,以可讀且可擴展的清單格式顯示 JSON 數據。專為在行動裝置上輕鬆視覺化 JSON 而設計,有助於在開發或除錯過程中檢查資料。該小部件支援巢狀結構,並提供清晰的階層式檢視 JSON 內容。對於需要在應用介面內快速檢視 API 回應或設定檔的開發者尤為實用。秉持簡潔與易用的理念建構,可無縫整合至 Flutter 應用中。

適用情境

  • 除錯 API 回應
  • 檢查設定檔
  • 查看嵌套的 JSON 資料
  • 增強開發者工具
  • 在應用程式中顯示原始 JSON

主要特色

  • 階層式 JSON 顯示
  • 可擴展的清單結構
  • 行動裝置友善設計
  • 與 Flutter 的輕鬆整合
  • 支援巢狀的 JSON 物件

適合對象

  • Flutter 開發者
  • 應用除錯工具
  • API 測試人員
  • 行動UI建構器
  • 設定檢視器

使用建議

  • 僅限 JSON 數據
  • 無編輯功能
  • 未針對非常大的 JSON 檔案進行優化
  • 需要手動設定以支援動態資料
  • 無內建搜尋或篩選

原始 README

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

flutter_json_widget

A Json viewer widget for flutter.

Using the library

The /example/ folder in the GitHub repo contains a full Flutter app with demo examples.

Use this package as a library on Dart dev

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_json_widget: ^1.0.3
2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_json_widget/flutter_json_widget.dart';
4. Show it
@override
Widget build(BuildContext context) {
    var testString = '''{
        "I": "How are you?",
        "You": "Excellent!"}
        ''';
    Map<String, dynamic> jsonObj = jsonDecode(testString);
    return SafeArea(
        child: SingleChildScrollView(
            child: JsonViewerWidget(jsonObj)
        ),
    );
}

Demo

Demo

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。