asMap method Null safety

Map<String, dynamic> asMap()

Implementation

Map<String, dynamic> asMap() {
  return <String, dynamic>{'indexName': indexName, 'fields': fields};
}