Skip to content

Commit 85f4432

Browse files
Merge pull request #128 from appwrite/dev1
2 parents 6fecb9b + e81c97e commit 85f4432

File tree

7 files changed

+50
-13
lines changed

7 files changed

+50
-13
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 8.3.0
2+
3+
* Fix: back navigation bringing back web browser after OAuth session creation
4+
* Update: Deprecated `InputFile` default constructor and introduced `InputFile.fromPath` and `InputFile.fromBytes` for consistency with other SDKs
5+
16
## 8.2.2
27

38
* Fix: notify callback when websocket closes [#604](https://github.com/appwrite/sdk-generator/pull/604)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file:
2121

2222
```yml
2323
dependencies:
24-
appwrite: ^8.2.2
24+
appwrite: ^8.3.0
2525
```
2626
2727
You can install packages from the command line:

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
name: appwrite_example
22
environment:
3-
sdk: '>=2.6.0 <3.0.0'
3+
sdk: '>=2.17.0 <3.0.0'

lib/src/client_browser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
4343
'x-sdk-name': 'Flutter',
4444
'x-sdk-platform': 'client',
4545
'x-sdk-language': 'flutter',
46-
'x-sdk-version': '8.2.2',
46+
'x-sdk-version': '8.3.0',
4747
'X-Appwrite-Response-Format' : '1.0.0',
4848
};
4949

lib/src/client_io.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ClientIO extends ClientBase with ClientMixin {
6464
'x-sdk-name': 'Flutter',
6565
'x-sdk-platform': 'client',
6666
'x-sdk-language': 'flutter',
67-
'x-sdk-version': '8.2.2',
67+
'x-sdk-version': '8.3.0',
6868
'X-Appwrite-Response-Format' : '1.0.0',
6969
};
7070

@@ -317,6 +317,7 @@ class ClientIO extends ClientBase with ClientMixin {
317317
return FlutterWebAuth2.authenticate(
318318
url: url.toString(),
319319
callbackUrlScheme: callbackUrlScheme != null && Platform.isWindows ? callbackUrlScheme : "appwrite-callback-" + config['project']!,
320+
preferEphemeral: true,
320321
).then((value) async {
321322
Uri url = Uri.parse(value);
322323
final key = url.queryParameters['key'];

lib/src/input_file.dart

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,42 @@ class InputFile {
66
final String? filename;
77
final String? contentType;
88

9-
/// Provide a file, use `path` for IO platforms
10-
/// and provide `bytes` for web platform
9+
@Deprecated('Use `InputFile.fromPath` or `InputFile.fromBytes` instead.')
1110
InputFile({this.path, this.filename, this.contentType, this.bytes}) {
1211
if (path == null && bytes == null) {
1312
throw AppwriteException('One of `path` or `bytes` is required');
1413
}
1514
}
15+
16+
InputFile._({this.path, this.filename, this.contentType, this.bytes}) {
17+
if (path == null && bytes == null) {
18+
throw AppwriteException('One of `path` or `bytes` is required');
19+
}
20+
}
21+
22+
/// Provide a file using `path`
23+
factory InputFile.fromPath({
24+
required String path,
25+
String? filename,
26+
String? contentType,
27+
}) {
28+
return InputFile._(
29+
path: path,
30+
filename: filename,
31+
contentType: contentType,
32+
);
33+
}
34+
35+
/// Provide a file using `bytes`
36+
factory InputFile.fromBytes({
37+
required List<int> bytes,
38+
required String filename,
39+
String? contentType,
40+
}) {
41+
return InputFile._(
42+
bytes: bytes,
43+
filename: filename,
44+
contentType: contentType,
45+
);
46+
}
1647
}

pubspec.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: appwrite
2-
version: 8.2.2
2+
version: 8.3.0
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-flutter
@@ -12,13 +12,13 @@ dependencies:
1212
flutter:
1313
sdk: flutter
1414
cookie_jar: ^3.0.1
15-
device_info_plus: ^8.0.0
16-
flutter_web_auth_2: ^2.0.2
15+
device_info_plus: ^8.1.0
16+
flutter_web_auth_2: ^2.0.4
1717
http: ^0.13.5
18-
package_info_plus: ^3.0.2
19-
path_provider: ^2.0.12
20-
web_socket_channel: ^2.2.0
21-
universal_html: ^2.0.8
18+
package_info_plus: ^3.0.3
19+
path_provider: ^2.0.13
20+
web_socket_channel: ^2.3.0
21+
universal_html: ^2.0.9
2222

2323
dev_dependencies:
2424
path_provider_platform_interface: ^2.0.5

0 commit comments

Comments
 (0)