dart_json_mapper_flutter 2.0.1 copy "dart_json_mapper_flutter: ^2.0.1" to clipboard
dart_json_mapper_flutter: ^2.0.1 copied to clipboard

This is a dart-json-mapper complementary package provides support for https://github.com/flutter/flutter types in order to serialize / deserialize them from / to JSON.

example/example.dart

library json_mapper_flutter.example;

import 'dart:ui' show Color;

import 'package:dart_json_mapper/dart_json_mapper.dart'
    show JsonMapper, jsonSerializable;
import 'package:dart_json_mapper_flutter/dart_json_mapper_flutter.dart'
    show flutterAdapter;

import 'example.mapper.g.dart' show initializeJsonMapper;

@jsonSerializable
class FlutterClass {
  Color color;

  FlutterClass(this.color);
}

void main() {
  initializeJsonMapper(adapters: [flutterAdapter]);

  print(JsonMapper.serialize(FlutterClass(Color(0x003f4f5f))));
}
4
likes
140
pub points
83%
popularity

Publisher

verified publisheredensapple.com

This is a dart-json-mapper complementary package provides support for https://github.com/flutter/flutter types in order to serialize / deserialize them from / to JSON.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dart_json_mapper, flutter

More

Packages that depend on dart_json_mapper_flutter