fix: revert null-aware map entries; disable use_null_aware_elements lint

The ? operator on map entries applies to the key, not the value.
String literal keys can never be null, so ?'key': value was flagged as
invalid_null_aware_operator. Reverted to if (x != null) 'key': x form
and disabled the lint project-wide since it doesn't apply here.
This commit is contained in:
2026-03-12 00:44:04 -04:00
parent f39b8ddb30
commit c8becd6afd
4 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ class ProjectsApi {
if (description != null && description.isNotEmpty)
'description': description,
if (goal != null && goal.isNotEmpty) 'goal': goal,
?'color': color,
if (color != null) 'color': color,
});
return Project.fromJson(response.data as Map<String, dynamic>);
} on DioException catch (e) {