json property

Map<String, int> json
override

JSON-encodable representation of object which can be encoded with json.encode()

Allowed types:

Implementation

@override
Map<String, int> get json => {
      'red': red,
      'green': green,
      'blue': blue,
      'white': white,
      'alpha': alpha
    }..removeWhere((key, val) => val == null);