diff --git a/contact/pubspec.lock b/contact/pubspec.lock
index cbf82dd470..9b5c6e164a 100644
--- a/contact/pubspec.lock
+++ b/contact/pubspec.lock
@@ -304,6 +304,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
+ fk_user_agent:
+ dependency: transitive
+ description:
+ name: fk_user_agent
+ sha256: fd6c94e120786985a292d12f61422a581f4e851148d5940af38b819357b8ad0d
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
flex_color_picker:
dependency: transitive
description:
@@ -563,8 +571,8 @@ packages:
dependency: "direct main"
description:
path: "."
- ref: master
- resolved-ref: "21d15bc1a6a75e048ee1e3cd751dd0815492ce20"
+ ref: migrate_cnb_to_master_5Jun
+ resolved-ref: "49305a382ca77211a0668fd9fe196a3c057cdc8e"
url: "https://github.com/linagora/jmap-dart-client.git"
source: git
version: "0.0.1"
@@ -671,6 +679,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.0"
+ package_info_plus:
+ dependency: transitive
+ description:
+ name: package_info_plus
+ sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.2.0"
+ package_info_plus_platform_interface:
+ dependency: transitive
+ description:
+ name: package_info_plus_platform_interface
+ sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.1"
path:
dependency: transitive
description:
diff --git a/contact/pubspec.yaml b/contact/pubspec.yaml
index 97466ee95c..04932b60a9 100644
--- a/contact/pubspec.yaml
+++ b/contact/pubspec.yaml
@@ -15,10 +15,12 @@ dependencies:
path: ../model
### Dependencies from git ###
+ # TODO: We will change it when the PR in upstream repository will be merged
+ # https://github.com/linagora/jmap-dart-client/pull/87
jmap_dart_client:
git:
url: https://github.com/linagora/jmap-dart-client.git
- ref: master
+ ref: migrate_cnb_to_master_5Jun
### Dependencies from pub.dev ###
equatable: 2.0.5
diff --git a/core/lib/core.dart b/core/lib/core.dart
index 596285f9c5..9bc6ca3923 100644
--- a/core/lib/core.dart
+++ b/core/lib/core.dart
@@ -45,6 +45,9 @@ export 'utils/file_utils.dart';
export 'utils/option_param_mixin.dart';
export 'utils/print_utils.dart';
export 'utils/broadcast_channel/broadcast_channel.dart';
+export 'utils/list_utils.dart';
+export 'utils/mail/domain.dart';
+export 'utils/mail/mail_address.dart';
// Views
export 'presentation/views/text/slogan_builder.dart';
diff --git a/core/lib/data/constants/constant.dart b/core/lib/data/constants/constant.dart
index adf3581cbe..5540b0ac1c 100644
--- a/core/lib/data/constants/constant.dart
+++ b/core/lib/data/constants/constant.dart
@@ -2,6 +2,7 @@ class Constant {
static const acceptHeaderDefault = 'application/json';
static const contentTypeHeaderDefault = 'application/json';
static const pdfMimeType = 'application/pdf';
+ static const base64Charset = 'base64';
static const textHtmlMimeType = 'text/html';
static const octetStreamMimeType = 'application/octet-stream';
static const pdfExtension = '.pdf';
diff --git a/core/lib/data/network/download/download_client.dart b/core/lib/data/network/download/download_client.dart
index 781eeab111..8686739f1c 100644
--- a/core/lib/data/network/download/download_client.dart
+++ b/core/lib/data/network/download/download_client.dart
@@ -63,7 +63,8 @@ class DownloadClient {
'bytesData': bytesData,
'mimeType': 'image/$fileExtension',
'cid': cid,
- 'fileName': fileName
+ 'fileName': fileName,
+ 'maxWidth': maxWidth
});
return base64Uri;
@@ -77,7 +78,8 @@ class DownloadClient {
'bytesData': bytesDataCompressed,
'mimeType': 'image/$fileExtension',
'cid': cid,
- 'fileName': fileName
+ 'fileName': fileName,
+ 'maxWidth': maxWidth
});
return base64Uri;
@@ -86,7 +88,8 @@ class DownloadClient {
'bytesData': bytesData,
'mimeType': 'image/$fileExtension',
'cid': cid,
- 'fileName': fileName
+ 'fileName': fileName,
+ 'maxWidth': maxWidth
});
return base64Uri;
@@ -103,11 +106,14 @@ class DownloadClient {
var mimeType = entryParam['mimeType'];
final cid = entryParam['cid'];
var fileName = entryParam['fileName'];
+ var maxWidth = entryParam['maxWidth'] != null
+ ? '${entryParam['maxWidth']}px'
+ : '100%';
final base64Data = base64Encode(bytesData);
if (fileName.contains('.')) {
fileName = fileName.split('.').first;
}
- final base64Uri = '';
+ final base64Uri = '';
return base64Uri;
}
}
\ No newline at end of file
diff --git a/core/lib/domain/exceptions/address_exception.dart b/core/lib/domain/exceptions/address_exception.dart
new file mode 100644
index 0000000000..51889bbf76
--- /dev/null
+++ b/core/lib/domain/exceptions/address_exception.dart
@@ -0,0 +1,13 @@
+import 'package:equatable/equatable.dart';
+
+class AddressException with EquatableMixin implements Exception {
+ final String message;
+
+ AddressException(this.message);
+
+ @override
+ String toString() => message;
+
+ @override
+ List