added null safety for llc
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user