toJson method

  1. @override
dynamic toJson()
override

toJson returns a json compatible object.

Descendants must override this method to expose custom properties.

Implementation

@override
toJson() {
  return super.toJson()..addAll(<String, dynamic>{
    'alignment': alignment.toJson(),
    'clipBehavior': clipBehavior.name,
    'fit': fit.name,
    if (textDirection != null) 'textDirection': textDirection?.name,
  });
}