Map<String, Object?> serializeAsMap() => { if (options != null) 'options': options!.serializeAsMap(), 'key': key, };