style: Update for team lint (#297)
* Update for team lint * fix tests * remove pedantic and sort deps * remove jiffy from system message Co-authored-by: Salvatore Giordano <[email protected]>
This commit is contained in:
co-authored by
Salvatore Giordano
parent
e13ce930a6
commit
c5252ab4d4
@@ -1,6 +1,7 @@
|
||||
import 'user.dart';
|
||||
import 'package:stream_chat/src/models/user.dart';
|
||||
|
||||
/// Used to avoid to serialize properties to json
|
||||
// ignore: prefer_void_to_null
|
||||
Null readonly(_) => null;
|
||||
|
||||
/// Helper class for serialization to and from json
|
||||
@@ -9,9 +10,8 @@ class Serialization {
|
||||
static const Function readOnly = readonly;
|
||||
|
||||
/// List of users to list of userIds
|
||||
static List<String> userIds(List<User> users) {
|
||||
return users?.map((u) => u.id)?.toList();
|
||||
}
|
||||
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(
|
||||
@@ -34,7 +34,8 @@ class Serialization {
|
||||
});
|
||||
}
|
||||
|
||||
/// Takes values in `extra_data` key and puts them on the root level of the json map
|
||||
/// Takes values in `extra_data` key and puts them on the root level of
|
||||
/// the json map
|
||||
static Map<String, dynamic> moveFromExtraDataToRoot(
|
||||
Map<String, dynamic> json,
|
||||
List<String> topLevelFields,
|
||||
|
||||
Reference in New Issue
Block a user