flutter_json_view 1.1.5 copy "flutter_json_view: ^1.1.5" to clipboard
flutter_json_view: ^1.1.5 copied to clipboard

Displaying json models in a Flutter widget with customization.

Displaying json models in a Flutter widget

😎 Cool solution for viewing models in debug working
Show some ❤️ and star the repo to support the project!


Pub License: MIT Repository views Pub

Pub likes Pub popularity Pub points


Image Image Image

Getting Started #

Add dependency #

dependencies:
  flutter_json_view: ^1.1.5
copied to clipboard

Add import package #

import 'package:flutter_json_view/flutter_json_view.dart';
copied to clipboard

Easy to use #

Add one of the constructors in your code

String constructor

JsonView.string('{"key":"value"}'),
copied to clipboard

Asset file constructor

JsonView.asset('assets/data.json'),
copied to clipboard

Map constructor

JsonView.map({"key":"value"}),
copied to clipboard

Customization #

🎨 The package was created in order to be able to customize your json view

drawing
JsonView.string(
    '{"key":"value"}',
    theme: JsonViewTheme(
      keyStyle: TextStyle(
        color: Colors.black54,
        fontSize: 16,
        fontWeight: FontWeight.w600,
      ),
      doubleStyle: TextStyle(
        color: Colors.green,
        fontSize: 16,
      ),
      intStyle: TextStyle(
        color: Colors.green,
        fontSize: 16,
      ),
      stringStyle: TextStyle(
        color: Colors.green,
        fontSize: 16,
      ),
      boolStyle: TextStyle(
        color: Colors.green,
        fontSize: 16,
      ),
      closeIcon: Icon(
        Icons.close,
        color: Colors.green,
        size: 20,
      ),
      openIcon: Icon(
        Icons.add,
        color: Colors.green,
        size: 20,
      ),
      separator: Padding(
        padding: EdgeInsets.symmetric(horizontal: 8.0),
        child: Icon(
          Icons.arrow_right_alt_outlined,
          size: 20,
          color: Colors.green,
        ),
      ),
    ),
  ),
copied to clipboard

More examples you can see here


Thanks to all contributors of this package


For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

133
likes
160
points
14.2k
downloads

Publisher

verified publisherfrezycode.com

Weekly Downloads

2024.09.12 - 2025.03.27

Displaying json models in a Flutter widget with customization.

Repository (GitHub)

Topics

#widget #ui #json #debug #inspector

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_json_view