flutter_class_parser 0.1.6 copy "flutter_class_parser: ^0.1.6" to clipboard
flutter_class_parser: ^0.1.6 copied to clipboard

outdated

A package for serialize and deserialize common UI data classes in Flutter.

flutter_class_parser #

A package for serialize and deserialize common UI data classes in Flutter.

Getting Started #

To serialize/deserialize a supported class, use:

var gradient=LinearGradient(colors:[Colors.red, Colors.blue]);
String gradientJson=json.encode(gradient.toJson());
var gradient2=parseGradient(json.decode(gradientJson));

Serializaton of built in classes is done using extension methods. Deserializaion, on the other hand, is done with funtions.

Current Supported Classes #

  1. Color
  2. BlendMode
  3. TileMode
  4. Alignment
  5. BoxFit
  6. ImageRepeat
  7. FilterQuality
  8. StackFit
  9. FontWeight
  10. FontStyle
  11. Axis
  12. AxisDirection
  13. TextDecoration
  14. TextDecorationStyle
  15. Clip
  16. Curve
  17. TextOverflow
  18. TextDirection
  19. TextAlign
  20. TextBaseline
  21. FontWeight
  22. MainAxisAlignment
  23. CrossAxisAlignment
  24. WrapAlignment
  25. WrapCrossAlignment
  26. MainAxisSize
  27. VerticalDirection
  28. BorderStyle
  29. StrokeJoin
  30. StrokeCap
  31. Offset
  32. Size
  33. Rect
  34. EdgeInsets
  35. Radius
  36. BorderRadius
  37. Matrix4
  38. SystemMouseCursor
  39. Gradient
  40. Shadow
  41. ImageFilter
  42. ColorFilter
  43. DecorationImage
  44. BoxDecoration
  45. TextStyle

Some class parsing are not fully supported yet. For example, the Curve class parsing only supports the predefined curves.

You are more than welcomed to contribute and add more classes to the collection.

5
likes
0
pub points
43%
popularity

Publisher

verified publisherwenkaifan.com

A package for serialize and deserialize common UI data classes in Flutter.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_class_parser