mirror of
https://github.com/appwrite/sdk-for-flutter.git
synced 2026-06-06 19:37:52 +00:00
fix realtime timestamp to int
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
## 1.0.2
|
||||
- Fix timestamp in Realtime Response to Integer
|
||||
|
||||
## 1.0.1
|
||||
- Fix null pointer exception while creating OAuth2 session
|
||||
- Export RealtimeMessage
|
||||
|
||||
@@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file:
|
||||
|
||||
```yml
|
||||
dependencies:
|
||||
appwrite: ^1.0.1
|
||||
appwrite: ^1.0.2
|
||||
```
|
||||
|
||||
You can install packages from the command line:
|
||||
|
||||
@@ -33,7 +33,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
|
||||
.replaceFirst('http://', 'ws://');
|
||||
_headers = {
|
||||
'content-type': 'application/json',
|
||||
'x-sdk-version': 'appwrite:flutter:1.0.1',
|
||||
'x-sdk-version': 'appwrite:flutter:1.0.2',
|
||||
'X-Appwrite-Response-Format' : '0.10.0',
|
||||
};
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class ClientIO extends ClientBase with ClientMixin {
|
||||
.replaceFirst('http://', 'ws://');
|
||||
this._headers = {
|
||||
'content-type': 'application/json',
|
||||
'x-sdk-version': 'appwrite:flutter:1.0.1',
|
||||
'x-sdk-version': 'appwrite:flutter:1.0.2',
|
||||
'X-Appwrite-Response-Format' : '0.10.0',
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class RealtimeMessage {
|
||||
final String event;
|
||||
final Map<String, dynamic> payload;
|
||||
final List<String> channels;
|
||||
final DateTime timestamp;
|
||||
final int timestamp;
|
||||
RealtimeMessage({
|
||||
required this.event,
|
||||
required this.payload,
|
||||
@@ -17,7 +17,7 @@ class RealtimeMessage {
|
||||
String? event,
|
||||
Map<String, dynamic>? payload,
|
||||
List<String>? channels,
|
||||
DateTime? timestamp,
|
||||
int? timestamp,
|
||||
}) {
|
||||
return RealtimeMessage(
|
||||
event: event ?? this.event,
|
||||
@@ -32,7 +32,7 @@ class RealtimeMessage {
|
||||
'event': event,
|
||||
'payload': payload,
|
||||
'channels': channels,
|
||||
'timestamp': timestamp.millisecondsSinceEpoch,
|
||||
'timestamp': timestamp,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class RealtimeMessage {
|
||||
event: map['event'],
|
||||
payload: Map<String, dynamic>.from(map['payload'] ?? <String, dynamic>{}),
|
||||
channels: List<String>.from(map['channels'] ?? []),
|
||||
timestamp: DateTime.fromMillisecondsSinceEpoch(map['timestamp']),
|
||||
timestamp: map['timestamp'],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
name: appwrite
|
||||
version: 1.0.1
|
||||
version: 1.0.2
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user