mirror of
https://github.com/appwrite/sdk-for-flutter.git
synced 2026-04-07 19:27:41 +00:00
fix oauth2 back navigation
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
## 8.3.0
|
||||
|
||||
* Fix: back navigation bringing back web browser after OAuth session creation
|
||||
* Update: Deprecated `InputFile` default constructor and introduced `InputFile.fromPath` and `InputFile.fromBytes` for consistency with other SDKs
|
||||
|
||||
## 8.2.2
|
||||
|
||||
* Fix: notify callback when websocket closes [#604](https://github.com/appwrite/sdk-generator/pull/604)
|
||||
|
||||
@@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file:
|
||||
|
||||
```yml
|
||||
dependencies:
|
||||
appwrite: ^8.2.2
|
||||
appwrite: ^8.3.0
|
||||
```
|
||||
|
||||
You can install packages from the command line:
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
name: appwrite_example
|
||||
environment:
|
||||
sdk: '>=2.6.0 <3.0.0'
|
||||
sdk: '>=2.17.0 <3.0.0'
|
||||
@@ -43,7 +43,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
|
||||
'x-sdk-name': 'Flutter',
|
||||
'x-sdk-platform': 'client',
|
||||
'x-sdk-language': 'flutter',
|
||||
'x-sdk-version': '8.2.2',
|
||||
'x-sdk-version': '8.3.0',
|
||||
'X-Appwrite-Response-Format' : '1.0.0',
|
||||
};
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class ClientIO extends ClientBase with ClientMixin {
|
||||
'x-sdk-name': 'Flutter',
|
||||
'x-sdk-platform': 'client',
|
||||
'x-sdk-language': 'flutter',
|
||||
'x-sdk-version': '8.2.2',
|
||||
'x-sdk-version': '8.3.0',
|
||||
'X-Appwrite-Response-Format' : '1.0.0',
|
||||
};
|
||||
|
||||
@@ -317,6 +317,7 @@ class ClientIO extends ClientBase with ClientMixin {
|
||||
return FlutterWebAuth2.authenticate(
|
||||
url: url.toString(),
|
||||
callbackUrlScheme: callbackUrlScheme != null && Platform.isWindows ? callbackUrlScheme : "appwrite-callback-" + config['project']!,
|
||||
preferEphemeral: true,
|
||||
).then((value) async {
|
||||
Uri url = Uri.parse(value);
|
||||
final key = url.queryParameters['key'];
|
||||
|
||||
+33
-2
@@ -6,11 +6,42 @@ class InputFile {
|
||||
final String? filename;
|
||||
final String? contentType;
|
||||
|
||||
/// Provide a file, use `path` for IO platforms
|
||||
/// and provide `bytes` for web platform
|
||||
@Deprecated('Use `InputFile.fromPath` or `InputFile.fromBytes` instead.')
|
||||
InputFile({this.path, this.filename, this.contentType, this.bytes}) {
|
||||
if (path == null && bytes == null) {
|
||||
throw AppwriteException('One of `path` or `bytes` is required');
|
||||
}
|
||||
}
|
||||
|
||||
InputFile._({this.path, this.filename, this.contentType, this.bytes}) {
|
||||
if (path == null && bytes == null) {
|
||||
throw AppwriteException('One of `path` or `bytes` is required');
|
||||
}
|
||||
}
|
||||
|
||||
/// Provide a file using `path`
|
||||
factory InputFile.fromPath({
|
||||
required String path,
|
||||
String? filename,
|
||||
String? contentType,
|
||||
}) {
|
||||
return InputFile._(
|
||||
path: path,
|
||||
filename: filename,
|
||||
contentType: contentType,
|
||||
);
|
||||
}
|
||||
|
||||
/// Provide a file using `bytes`
|
||||
factory InputFile.fromBytes({
|
||||
required List<int> bytes,
|
||||
required String filename,
|
||||
String? contentType,
|
||||
}) {
|
||||
return InputFile._(
|
||||
bytes: bytes,
|
||||
filename: filename,
|
||||
contentType: contentType,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
name: appwrite
|
||||
version: 8.2.2
|
||||
version: 8.3.0
|
||||
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
|
||||
homepage: https://appwrite.io
|
||||
repository: https://github.com/appwrite/sdk-for-flutter
|
||||
@@ -12,13 +12,13 @@ dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
cookie_jar: ^3.0.1
|
||||
device_info_plus: ^8.0.0
|
||||
flutter_web_auth_2: ^2.0.2
|
||||
device_info_plus: ^8.1.0
|
||||
flutter_web_auth_2: ^2.0.4
|
||||
http: ^0.13.5
|
||||
package_info_plus: ^3.0.2
|
||||
path_provider: ^2.0.12
|
||||
web_socket_channel: ^2.2.0
|
||||
universal_html: ^2.0.8
|
||||
package_info_plus: ^3.0.3
|
||||
path_provider: ^2.0.13
|
||||
web_socket_channel: ^2.3.0
|
||||
universal_html: ^2.0.9
|
||||
|
||||
dev_dependencies:
|
||||
path_provider_platform_interface: ^2.0.5
|
||||
|
||||
Reference in New Issue
Block a user