dump 0.1.3 copy "dump: ^0.1.3" to clipboard
dump: ^0.1.3 copied to clipboard

Dumps any objects to structures of maps, lists, and scalars using mirrors.

example/main.dart

import 'package:dump/dump.dart';

class Foo {
  Foo({
    required this.b,
    required this.d,
    required this.n,
    required this.s,
    this.nn,
  });

  bool b;
  final double d;
  int n;
  int? nn;
  String s;
  final _private = 'private'; // ignore: unused_field

  void method() {}
}

final toDump = [
  1,
  'string',
  Foo(
    b: false,
    d: 3.1415926,
    n: 456,
    s: 'def',
  ),
];

final dumped = dumpJson(toDump);
// Result:
// [
//   1,
//   'string',
//   {
//     '': 'Foo',
//     'b': false,
//     'd': 3.1415926,
//     'n': 456,
//     'nn': null,
//     's': 'def',
//     '_private': 'private',
//   },
// ]
5
likes
0
pub points
7%
popularity

Publisher

verified publisherainkin.com

Dumps any objects to structures of maps, lists, and scalars using mirrors.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on dump