added null safety for llc

This commit is contained in:
Deven Joshi
2021-04-08 15:03:16 +05:30
parent 3a5308a9c0
commit c80fc0a6b4
41 changed files with 1222 additions and 1202 deletions
@@ -10,12 +10,12 @@ class Serialization {
static const Function readOnly = readonly;
/// List of users to list of userIds
static List<String> userIds(List<User> users) =>
static List<String?>? userIds(List<User>? users) =>
users?.map((u) => u.id)?.toList();
/// Takes unknown json keys and puts them in the `extra_data` key
static Map<String, dynamic> moveToExtraDataFromRoot(
Map<String, dynamic> json,
static Map<String, dynamic>? moveToExtraDataFromRoot(
Map<String, dynamic>? json,
List<String> topLevelFields,
) {
if (json == null) return null;