fixed tests, null errors
This commit is contained in:
@@ -87,7 +87,7 @@ class AttachmentFile {
|
||||
final int? size;
|
||||
|
||||
/// File extension for this file.
|
||||
String? get extension => name?.split('.')?.last;
|
||||
String? get extension => name?.split('.').last;
|
||||
|
||||
/// Serialize to json
|
||||
Map<String, dynamic> toJson() => _$AttachmentFileToJson(this);
|
||||
|
||||
@@ -43,8 +43,8 @@ class ChannelState {
|
||||
final List<Read>? read;
|
||||
|
||||
/// Create a new instance from a json
|
||||
static ChannelState fromJson(Map<String, dynamic>? json) =>
|
||||
_$ChannelStateFromJson(json!);
|
||||
static ChannelState fromJson(Map<String, dynamic> json) =>
|
||||
_$ChannelStateFromJson(json);
|
||||
|
||||
/// Serialize to json
|
||||
Map<String, dynamic> toJson() => _$ChannelStateToJson(this);
|
||||
|
||||
@@ -11,7 +11,7 @@ class Serialization {
|
||||
|
||||
/// List of users to list of userIds
|
||||
static List<String?>? userIds(List<User>? users) =>
|
||||
users?.map((u) => u.id)?.toList();
|
||||
users?.map((u) => u.id).toList();
|
||||
|
||||
/// Takes unknown json keys and puts them in the `extra_data` key
|
||||
static Map<String, dynamic>? moveToExtraDataFromRoot(
|
||||
|
||||
Reference in New Issue
Block a user