Pakete, Repositories und App-Kategorien suchen

Cover von colored_json
Paketdetailsv1.1.2

colored_json

Ein Paket, das eine JSON-Zeichenfolge in ein anpassbares Flutter-Widget konvertiert.

AndroidiOSWebmacOSWindowsLinux
30-Tage-Downloads
3510
Likes
27
Pub-Punkte
160

Paket installieren

flutter pub add colored_json

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Ein Flutter-Paket, das JSON-Zeichenfolgen in visuell verbesserte, anpassbare Widgets mit Syntax-Highlighting umwandelt. Es ermöglicht Entwicklern, strukturierte JSON-Daten in ihren Apps in einer lesbaren und ästhetisch ansprechenden Form darzustellen. Das Widget unterstützt die Farbanpassung für verschiedene JSON-Elemente wie Schlüssel, Werte und Klammern, wodurch die Lesbarkeit bei der Fehlersuche oder Datenpräsentation verbessert wird. Ideal für Entwicklungstools, Dashboards oder jede Benutzeroberfläche, die formatierten JSON-Ausgabe erfordert.

Anwendungsfälle

  • Debugging von JSON-Antworten
  • API-Daten in Apps anzeigen
  • Verbesserung von Entwickler-Tool-Oberflächen
  • Konfigurationsdateien visualisieren
  • Echtzeit-Datenüberprüfung
  • Anzeige von Bildungsinhalten in einer App

Hauptmerkmale

  • Syntax-Highlighting für JSON
  • Anpassbare Farben und Stile
  • Einfache Integration mit Flutter-Widgets
  • Unterstützt alle wichtigen Plattformen
  • Leichte und schnelle Darstellung
  • Konfigurierbare Einrückung und Abstände

Geeignet für

  • Flutter-Entwickler
  • Debugging-Tools
  • API-Test-Schnittstellen
  • Lernanwendungen
  • UI-Designer, die mit strukturierten Daten arbeiten

Hinweise

  • Kann die Leistung bei sehr großen JSON beeinträchtigen
  • Beschränkt auf statische JSON-Anzeige
  • Benötigt manuelle Zeichenfolgeneingabe oder Analyse
  • Nicht für die dynamische JSON-Editierung vorgesehen
  • Farbthemen müssen explizit eingerichtet werden
  • Am besten in nicht-produktiven Debug-Ansichten verwendet

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

Colored JSON

Convert JSON string into customizable widget.

Getting Started

ColoredJson is a stateless widget that produces a structured view of JSON string provided. It can be used like any other flutter widget. It's fully customizable where you can set different colors to different datatypes including colon, comma and brackets. Set indent length. Use text style of your choice. You can also change the background color.

Defaut View Customised View 1 Customised View 2
Default View Customized View 1 Customized View 2

Usage

  • Pass a JSON string to the data parameter of ColoredJson Widget
Simple Usage
const String responseBody = '''
{
  'id' : 1,
  'name' : 'Colored Json',
  'isFlutterAwesome' : true,
}
''';

ColoredJson(
 data: responseBody,
)

Full Usage
final dartMap = {
  "id": 24,
  "name": "Manthan Khandale",
  "score": 7.6,
  "socials": null,
  "hobbies": [
    "Music",
    "Filmmaking",
  ],
  "isFlutterCool": true,
};

ColoredJson(
 data: jsonEncode(dartMap),
 indentLength: 5,
 keyColor: Colors.green,
 backgroundColor: Colors.black,
 boolColor: Colors.white,
 nullColor: Colors.redAccent,
 stringColor: Colors.cyan,
 curlyBracketColor: Colors.yellow,
 doubleColor: Colors.deepOrange,
 squareBracketColor: Colors.amber,
 commaColor: Colors.yellow,
 colonColor: Colors.purple,
 intColor: Colors.lime,
 textStyle: const TextStyle(
  fontSize: 20,
  letterSpacing: 2,
  ),
 )
Parameter Info
data (required) A JSON string to be formatted
keyColor Color of Json Key
intColor Color of integer type value
doubleColor Color of decimal type value
stringColor Color of string type value
boolColor Color of boolean type value
nullColor Color of null type value
curlyBracketColor Color of curly brackets {}
squareBracketColor Color of square brackets []
commaColor Color of comma ( , )
colonColor Color of colon ( : )
backgroundColor Background color of widget
textStyle Textstyle of texts in the widget
indentLength Indent length

Upcoming Tasks

  • Code shrink feature
  • Add Inner Spacing parameter
  • Add tests

Kategorien

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.