flutter_class_parser 0.1.5 copy "flutter_class_parser: ^0.1.5" to clipboard
flutter_class_parser: ^0.1.5 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. EdgeInsetsGeometry
  23. MainAxisAlignment
  24. CrossAxisAlignment
  25. WrapAlignment
  26. WrapCrossAlignment
  27. MainAxisSize
  28. VerticalDirection
  29. BorderStyle
  30. StrokeJoin
  31. StrokeCap
  32. Offset
  33. Size
  34. Rect
  35. Radius
  36. BorderRadius
  37. Matrix4
  38. SystemMouseCursor
  39. Gradient
  40. ImageFilter
  41. ColorFilter
  42. DecorationImage
  43. BoxDecoration
  44. 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