Skip to content

Commit e29166b

Browse files
Merge pull request #53 from appwrite/dev
Dev
2 parents 397de91 + 8f12fc8 commit e29166b

17 files changed

+21
-21
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2024 Appwrite (https://appwrite.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:
2323

2424
```yml
2525
dependencies:
26-
dart_appwrite: ^10.1.0
26+
dart_appwrite: ^10.1.1
2727
```
2828
2929
You can install packages from the command line:

lib/src/client_browser.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
3333
'x-sdk-name': 'Dart',
3434
'x-sdk-platform': 'server',
3535
'x-sdk-language': 'dart',
36-
'x-sdk-version': '10.1.0',
36+
'x-sdk-version': '10.1.1',
3737
'X-Appwrite-Response-Format' : '1.4.0',
3838
};
3939

lib/src/client_io.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class ClientIO extends ClientBase with ClientMixin {
4242
'x-sdk-name': 'Dart',
4343
'x-sdk-platform': 'server',
4444
'x-sdk-language': 'dart',
45-
'x-sdk-version': '10.1.0',
46-
'user-agent' : 'AppwriteDartSDK/10.1.0 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
45+
'x-sdk-version': '10.1.1',
46+
'user-agent' : 'AppwriteDartSDK/10.1.1 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
4747
'X-Appwrite-Response-Format' : '1.4.0',
4848
};
4949

lib/src/models/attribute_enum.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AttributeEnum implements Model {
4141
error: map['error'].toString(),
4242
xrequired: map['required'],
4343
array: map['array'],
44-
elements: map['elements'],
44+
elements: map['elements'] ?? [],
4545
format: map['format'].toString(),
4646
xdefault: map['default']?.toString(),
4747
);

lib/src/models/attribute_list.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AttributeList implements Model {
1515
factory AttributeList.fromMap(Map<String, dynamic> map) {
1616
return AttributeList(
1717
total: map['total'],
18-
attributes: map['attributes'],
18+
attributes: map['attributes'] ?? [],
1919
);
2020
}
2121

lib/src/models/bucket.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ class Bucket implements Model {
4747
$id: map['\$id'].toString(),
4848
$createdAt: map['\$createdAt'].toString(),
4949
$updatedAt: map['\$updatedAt'].toString(),
50-
$permissions: map['\$permissions'],
50+
$permissions: map['\$permissions'] ?? [],
5151
fileSecurity: map['fileSecurity'],
5252
name: map['name'].toString(),
5353
enabled: map['enabled'],
5454
maximumFileSize: map['maximumFileSize'],
55-
allowedFileExtensions: map['allowedFileExtensions'],
55+
allowedFileExtensions: map['allowedFileExtensions'] ?? [],
5656
compression: map['compression'].toString(),
5757
encryption: map['encryption'],
5858
antivirus: map['antivirus'],

lib/src/models/collection.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ class Collection implements Model {
4141
$id: map['\$id'].toString(),
4242
$createdAt: map['\$createdAt'].toString(),
4343
$updatedAt: map['\$updatedAt'].toString(),
44-
$permissions: map['\$permissions'],
44+
$permissions: map['\$permissions'] ?? [],
4545
databaseId: map['databaseId'].toString(),
4646
name: map['name'].toString(),
4747
enabled: map['enabled'],
4848
documentSecurity: map['documentSecurity'],
49-
attributes: map['attributes'],
49+
attributes: map['attributes'] ?? [],
5050
indexes: List<Index>.from(map['indexes'].map((p) => Index.fromMap(p))),
5151
);
5252
}

lib/src/models/document.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Document implements Model {
3333
$databaseId: map['\$databaseId'].toString(),
3434
$createdAt: map['\$createdAt'].toString(),
3535
$updatedAt: map['\$updatedAt'].toString(),
36-
$permissions: map['\$permissions'],
36+
$permissions: map['\$permissions'] ?? [],
3737
data: map,
3838
);
3939
}

lib/src/models/execution.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Execution implements Model {
5959
$id: map['\$id'].toString(),
6060
$createdAt: map['\$createdAt'].toString(),
6161
$updatedAt: map['\$updatedAt'].toString(),
62-
$permissions: map['\$permissions'],
62+
$permissions: map['\$permissions'] ?? [],
6363
functionId: map['functionId'].toString(),
6464
trigger: map['trigger'].toString(),
6565
status: map['status'].toString(),

lib/src/models/file.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class File implements Model {
4545
bucketId: map['bucketId'].toString(),
4646
$createdAt: map['\$createdAt'].toString(),
4747
$updatedAt: map['\$updatedAt'].toString(),
48-
$permissions: map['\$permissions'],
48+
$permissions: map['\$permissions'] ?? [],
4949
name: map['name'].toString(),
5050
signature: map['signature'].toString(),
5151
mimeType: map['mimeType'].toString(),

lib/src/models/function.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ class Func implements Model {
7777
$id: map['\$id'].toString(),
7878
$createdAt: map['\$createdAt'].toString(),
7979
$updatedAt: map['\$updatedAt'].toString(),
80-
execute: map['execute'],
80+
execute: map['execute'] ?? [],
8181
name: map['name'].toString(),
8282
enabled: map['enabled'],
8383
live: map['live'],
8484
logging: map['logging'],
8585
runtime: map['runtime'].toString(),
8686
deployment: map['deployment'].toString(),
8787
vars: List<Variable>.from(map['vars'].map((p) => Variable.fromMap(p))),
88-
events: map['events'],
88+
events: map['events'] ?? [],
8989
schedule: map['schedule'].toString(),
9090
timeout: map['timeout'],
9191
entrypoint: map['entrypoint'].toString(),

lib/src/models/index.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Index implements Model {
3030
type: map['type'].toString(),
3131
status: map['status'].toString(),
3232
error: map['error'].toString(),
33-
attributes: map['attributes'],
33+
attributes: map['attributes'] ?? [],
3434
orders: map['orders'],
3535
);
3636
}

lib/src/models/membership.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Membership implements Model {
5555
invited: map['invited'].toString(),
5656
joined: map['joined'].toString(),
5757
confirm: map['confirm'],
58-
roles: map['roles'],
58+
roles: map['roles'] ?? [],
5959
);
6060
}
6161

lib/src/models/runtime.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Runtime implements Model {
3535
base: map['base'].toString(),
3636
image: map['image'].toString(),
3737
logo: map['logo'].toString(),
38-
supports: map['supports'],
38+
supports: map['supports'] ?? [],
3939
);
4040
}
4141

lib/src/models/user.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class User implements Model {
6868
hashOptions: map['hashOptions'],
6969
registration: map['registration'].toString(),
7070
status: map['status'],
71-
labels: map['labels'],
71+
labels: map['labels'] ?? [],
7272
passwordUpdate: map['passwordUpdate'].toString(),
7373
email: map['email'].toString(),
7474
phone: map['phone'].toString(),

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: dart_appwrite
2-
version: 10.1.0
2+
version: 10.1.1
33
description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
44
homepage: https://appwrite.io
55
repository: https://github.com/appwrite/sdk-for-dart

0 commit comments

Comments
 (0)