json_editor_flutter 1.4.2 copy "json_editor_flutter: ^1.4.2" to clipboard
json_editor_flutter: ^1.4.2 copied to clipboard

Edit your JSON object with the help of this package. Create and delete objects using this user friendly widget.

example/lib/main.dart

import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:json_editor_flutter/json_editor_flutter.dart';

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'JSON Editor Example',
      home: JsonEditorExample(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Padding(
        padding: const EdgeInsets.all(20),
        child: JsonEditor(
          onChanged: (value) {
            // Do something
          },
          json: jsonEncode({
            "name": "John Doe",
            "age": 24,
            "hobbies": ["Reading", "Coding"],
            "address": {
              "street": "Main Street",
              "number": 1234567890,
              "city": "New York"
            }
          }),
        ),
      ),
    );
  }
}
22
likes
150
points
3.24k
downloads

Publisher

verified publishermakecv.in

Weekly Downloads

Edit your JSON object with the help of this package. Create and delete objects using this user friendly widget.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on json_editor_flutter