Skip to content

Commit

Permalink
migrate datatype froom from int timestamp to dateTime
Browse files Browse the repository at this point in the history
  • Loading branch information
amsyary committed Jan 2, 2024
1 parent 385585f commit 8191125
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies:
flutter_chat_ui:
path: ../
image_picker: ^0.8.4+9
intl: ^0.19.0
intl: ^0.18.1
mime: ^1.0.1
open_file: ^3.2.1
uuid: ^3.0.5
Expand Down
3 changes: 3 additions & 0 deletions example/windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
#include "generated_plugin_registrant.h"

#include <cloud_firestore/cloud_firestore_plugin_c_api.h>
#include <file_selector_windows/file_selector_windows.h>
#include <firebase_auth/firebase_auth_plugin_c_api.h>
#include <firebase_core/firebase_core_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
CloudFirestorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("CloudFirestorePluginCApi"));
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
FirebaseAuthPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi"));
FirebaseCorePluginCApiRegisterWithRegistrar(
Expand Down
1 change: 1 addition & 0 deletions example/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

list(APPEND FLUTTER_PLUGIN_LIST
cloud_firestore
file_selector_windows
firebase_auth
firebase_core
url_launcher_windows
Expand Down
1 change: 1 addition & 0 deletions lib/src/core/firebase_chat_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class FirebaseChatCore {
.collection(config.roomsCollectionName)
.where('userIds', arrayContains: fu.uid)
.get();
print('room length : ' + query.docs.length.toString());

final rooms = await processRoomsQuery(
fu,
Expand Down
4 changes: 2 additions & 2 deletions lib/src/core/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ Future<types.Room> processRoomDocument(
) async {
final data = doc.data()!;

data['createdAt'] = data['createdAt']?.millisecondsSinceEpoch;
data['createdAt'] = data['createdAt'];
data['id'] = doc.id;
data['updatedAt'] = data['updatedAt']?.millisecondsSinceEpoch;
data['updatedAt'] = data['updatedAt'];

var imageUrl = data['imageUrl'] as String?;
var name = data['name'] as String?;
Expand Down

0 comments on commit 8191125

Please sign in to comment.