Skip to content
pubscout

interactive_json_preview

0.1.0, released 2 years ago by an unverified publisher

An interactive JSON viewer widget with collapsible and expandable sections.

WASM-ready
$ flutter pub add interactive_json_preview
Source repository

What it does

Provides a pretty UI widget to view JSON data hierarchically. Allows users to collapse and expand complex JSON objects and lists at a glance to improve readability.

AI-written summary of version 0.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display debug or API JSON data inside your Flutter application.
  • You want users or developers to easily navigate nested JSON structures.

Skip it when

  • You need a backend data serialization layer or codegen tool.
  • You are looking for state management or local storage solutions.

Strengths

  • Simple integration as a standard Flutter widget.
  • Supports collapsible sections for better readability of complex payloads.

Weaknesses

  • Limited to visualization and does not provide advanced editing capabilities out of the box.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:flutter/material.dart';
import 'package:interactive_json_preview/interactive_json_preview.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: InteractiveJsonPreview(data: {'name': 'Yeikel', 'age': 24}),
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace interactive_json_preview.