Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/properties/account.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:io';

/// Account information, which is exposed for information and debugging purposes
/// and should be ignored in most cases.
///
Expand All @@ -18,6 +20,16 @@ class Account {
/// Android mimetypes provided by this account.
List<String> mimetypes;


/// On Android, the rawId isn't uniq
String getAccountId() {
if (Platform.isAndroid) {
return '$name|$type';
} else {
return rawId;
}
}

Account(this.rawId, this.type, this.name, this.mimetypes);

factory Account.fromJson(Map<String, dynamic> json) => Account(
Expand Down