theme_json_converter 0.3.0 copy "theme_json_converter: ^0.3.0" to clipboard
theme_json_converter: ^0.3.0 copied to clipboard

Package that implements JsonConverters from `json_serializable` to material theme classes

Set of JsonConverters that help to process material theme types.

Motivation #

Main goal of this package is to provide json_serializable ability to serialize theme types without manualy serialization.

Other packages with similar functionality

Tip #

All converter has same name convention and two version plain {MaterialThemeType}Converter and nullable Nullable{MaterialThemeType}Converter

Right now all converter code auto generated from json_theme package

Getting started #

Install like other packages, nothing new, just add to deps.

Usage #

Just put it above your model yep

import 'package:theme_json_converter/theme_json_converter.dart';

@JsonSerializable()
@ColorConverter()
@NullableTextStyleConverter()
class Model{
    final Color color;
    final TextStyle? style;
}

0
likes
70
pub points
70%
popularity

Publisher

unverified uploader

Package that implements JsonConverters from `json_serializable` to material theme classes

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, json_annotation

More

Packages that depend on theme_json_converter