add exports, minor refactoring

This commit is contained in:
Salvatore Giordano
2022-04-29 15:25:35 +02:00
parent eac9d096e8
commit 6048d61862
10 changed files with 20 additions and 47 deletions
@@ -1,5 +1,6 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
part of 'attachment_file.dart';
@@ -324,13 +325,15 @@ class _$InProgress implements InProgress {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is InProgress &&
(identical(other.uploaded, uploaded) ||
other.uploaded == uploaded) &&
(identical(other.total, total) || other.total == total));
const DeepCollectionEquality().equals(other.uploaded, uploaded) &&
const DeepCollectionEquality().equals(other.total, total));
}
@override
int get hashCode => Object.hash(runtimeType, uploaded, total);
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(uploaded),
const DeepCollectionEquality().hash(total));
@JsonKey(ignore: true)
@override
@@ -612,11 +615,12 @@ class _$Failed implements Failed {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is Failed &&
(identical(other.error, error) || other.error == error));
const DeepCollectionEquality().equals(other.error, error));
}
@override
int get hashCode => Object.hash(runtimeType, error);
int get hashCode =>
Object.hash(runtimeType, const DeepCollectionEquality().hash(error));
@JsonKey(ignore: true)
@override
@@ -13,7 +13,7 @@ class ChannelModel {
String? id,
String? type,
String? cid,
this.ownCapabilities = const [],
this.ownCapabilities,
ChannelConfig? config,
this.createdBy,
this.frozen = false,
@@ -54,7 +54,7 @@ class ChannelModel {
/// List of user permissions on this channel
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly)
final List<String> ownCapabilities;
final List<String>? ownCapabilities;
/// The channel configuration data
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly)
@@ -11,9 +11,8 @@ ChannelModel _$ChannelModelFromJson(Map<String, dynamic> json) => ChannelModel(
type: json['type'] as String?,
cid: json['cid'] as String?,
ownCapabilities: (json['own_capabilities'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
const [],
?.map((e) => e as String)
.toList(),
config: json['config'] == null
? null
: ChannelConfig.fromJson(json['config'] as Map<String, dynamic>),