flyerhq / flutter_firebase_chat_core

Actively maintained, community-driven Firebase BaaS for chat applications with an optional chat UI.
https://flyer.chat
Apache License 2.0
268 stars 211 forks source link

Embed in another App #94

Open gwbischof opened 1 year ago

gwbischof commented 1 year ago

I have read through the docs, and example code. The example code seems like a collection of independent Scaffolds, like Rooms, ChatPage, LoginPage. Scaffolds don't seem like the best Widget type to plug it into another App, because the Parent app probably already has a scaffold, with AppBar. I think that it is not recommended to put Scaffolds inside of Scaffolds. I think there are some other Issues with putting the example code into another App, like the Routing.

Would it make sense to make a single Container, without an AppBar that has all of the parts from the Example code? Maybe this code could be considered a second example? This might make it easier for people to add this to their app. And it might be nice to have an example of how to put the chat into your app.

Would this be useful? Is there some reason that it should be done differently?

I'd be happy to write this code.

gwbischof commented 1 year ago

I've been messing around with the code more, and I think I answered my own question.

The RoomsPage is that Object that I had in mind, to embed into my app. When you open a Chat it opens over your app, I thought this was strange at first, but now I think that's the right behavior. I think if you are embedding the chat into your App then maybe you should convert the RoomsPage Scaffold to a Container, and probably get rid of the AppBar. And use your App's AppBar.

demchenkoalex commented 1 year ago

Hi! But Example is just an app for.. an example. It is not supposed to be included in any other app. As you can see in the lib itself - it contains nothing UI wise.