Skip to content

Commit 909a787

Browse files
minor refactoring (#334)
1 parent ec51577 commit 909a787

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

Diff for: lib/services/connection/api_manager/connection_information.dart

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import 'package:meta/meta.dart';
2+
13
/// Connection information for a single connection.
4+
@immutable
25
class ConnectionInformation {
36
/// Initializes a new instance of the [ConnectionInformation] class.
4-
ConnectionInformation({
7+
const ConnectionInformation({
58
required this.appId,
69
required this.brand,
710
required this.endpoint,
@@ -23,4 +26,23 @@ class ConnectionInformation {
2326

2427
/// API language.
2528
final String language;
29+
30+
@override
31+
bool operator ==(Object other) =>
32+
identical(this, other) ||
33+
other is ConnectionInformation &&
34+
runtimeType == other.runtimeType &&
35+
appId == other.appId &&
36+
brand == other.brand &&
37+
endpoint == other.endpoint &&
38+
authEndpoint == other.authEndpoint &&
39+
language == other.language;
40+
41+
@override
42+
int get hashCode =>
43+
appId.hashCode ^
44+
brand.hashCode ^
45+
endpoint.hashCode ^
46+
authEndpoint.hashCode ^
47+
language.hashCode;
2648
}

0 commit comments

Comments
 (0)