core.Map<core.String, core.dynamic> toJson() => { if (keyName != null) 'keyName': keyName!, if (state != null) 'state': state!, };