Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't get chat branch working #1

Open
jtkeyva opened this issue Feb 11, 2021 · 5 comments
Open

can't get chat branch working #1

jtkeyva opened this issue Feb 11, 2021 · 5 comments

Comments

@jtkeyva
Copy link

jtkeyva commented Feb 11, 2021

Thanks for the nice sample app! I got the main branch working fairly quickly. But when I switched to the chat branch, I had no luck. Any help greatly appreciated. Thanks!

Issue 1:
the pubspec.yaml file references:

fireflutter:
path: packages/fireflutter

but that path doesn't exist.

Issue 2:
I tried just referencing the package directly with:
fireflutter: ^0.0.48

When I try to run I get several errors such as:

The getter 'userChange' isn't defined for the type 'FireFlutter'.
Try importing the library that defines 'userChange', correcting the name to the name of an existing getter, or defining a getter or field named 'userChange'.

A value of type 'ChatPrivateRoom' can't be assigned to a variable of type 'Map<String, dynamic>'.
Try changing the type of the variable, or casting the right-hand type to 'Map<String, dynamic>'.

The getter 'info' isn't defined for the type 'ChatRoom'.
Try importing the library that defines 'info', correcting the name to the name of an existing getter, or defining a getter or field named 'info'.

The getter 'userChange' isn't defined for the type 'FireFlutter'.
Try importing the library that defines 'userChange', correcting the name to the name of an existing getter, or defining a getter or field named 'userChange'.

and several others.

@jtkeyva
Copy link
Author

jtkeyva commented Feb 12, 2021

I figured it out. I referenced the chat branch date (Nov 20-30) and so package version 0.0.35 works. I also had to put firestore into test mode because adding users to chatroom threw firestore authentication error.

There are breaking changes to the latest package and I don't quite understand what to do. Would be great to update the demo to use the latest package and specify the updated firestore rules.

Thanks again for your work :)

@jtkeyva jtkeyva closed this as completed Feb 12, 2021
@jtkeyva
Copy link
Author

jtkeyva commented Feb 24, 2021

@thruthesky
I'm opening this back up because I would like to try chat functionality with the latest version of flutter fire. there are so many deprecated things and changes that I can't keep up.

Updating this chat example with fireflutter 0.0.48 would be very useful.
Thanks!

@jtkeyva jtkeyva reopened this Feb 24, 2021
@jtkeyva
Copy link
Author

jtkeyva commented Feb 28, 2021

@thruthesky
Thanks again for the hard work.

I'm still having trouble getting chat to work with this sample_app (chat branch) and fireflutter 0.0.48

I also took some guesses onUserChange etc. Can you please try the demo and update the deprecated code to work with 0.0.48? I think it's just a few variable changes but here are some issues I'm having.

chat.room.screen.dart
await ff.chatSendMessage(info: chat.info, text: _text);

'chatSendMessage' is deprecated and shouldn't be used. User ChatRoom.
Try replacing the use of the deprecated member with the replacement.

chat.enterance.screen.dart
Map<String, dynamic> room = myRoomList.rooms[i];

A value of type 'ChatPrivateRoom' can't be assigned to a variable of type 'Map<String, dynamic>'.
Try changing the type of the variable, or casting the right-hand type to 'Map<String, dynamic>'.dartinvalid_assignment

'userIsLoggedIn' is deprecated and shouldn't be used.
Try replacing the use of the deprecated member with the replacement.

Map<String, dynamic> userPublicData
package:fireflutter/fireflutter.dart
The expression doesn't evaluate to a function, so it can't be invoked.

@thruthesky
Copy link
Owner

Good morning.

It's very hard to catch what is causing problems.

Can you share your git repo if possible? So, that I can clone and test your code.

@jtkeyva
Copy link
Author

jtkeyva commented Feb 28, 2021

@thruthesky
yes, thank you. please check at:
https://github.com/jtkeyva/fireflutter_sample_app/tree/chat

i simply added fireflutter 0.0.48 to pubspec.yaml in the "chat" branch. you will see when running several deprecated issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants