encode method Null safety

Object encode()

Implementation

Object encode() {
  return <Object?>[
    feature,
    source,
    sourceLayer,
    state,
  ];
}