Code Monkey home page Code Monkey logo

Comments (7)

demchenkoalex avatar demchenkoalex commented on June 25, 2024 1

ok there was no easy way to not break the api with it, so I just removed it. I guess if someone will want it they will use previous release. Need to push v2 asap, cause now it is going wild :D released in v1.6.12

from flutter_chat_ui.

demchenkoalex avatar demchenkoalex commented on June 25, 2024 1

Given state of v1 your code was fine @asoap, I didn't realise it was a breaking change since people actually needed to add 1 line and also ignore the warning. I didn't want to release 1.7.0 cause the plan is to start from a clean sheet with 2.0.0, that will take into consideration this problem as well. Everything will be more modular, more widgets, less huge build functions.

from flutter_chat_ui.

mulderpf avatar mulderpf commented on June 25, 2024 1

Thanks both. I appreciate the change and that it would be useful (I'm not sure I understand still how to convert my own code, but I guess for now it doesn't matter). I'm more than likely to need this functionality soon, so please don't take my initial comment as a complaint about the functionality it adds.

Also, I really appreciate this package and it was a lifesaver when I discovered it about six month ago (following on from my own really terrible implementation of this functionality which was almost unusable to my end-users). Thanks to this, this part of my app is flourishing!

Thank you!!!

from flutter_chat_ui.

demchenkoalex avatar demchenkoalex commented on June 25, 2024

yeah.. I just now merge everything people add, but not really testing, cause code is a mess. Let me try to fix and release this.

from flutter_chat_ui.

asoap avatar asoap commented on June 25, 2024

I'm the one that made the pull request. The defaultBubbleMessage is the message that is created by the package. So you can wrap it with whatever you want. If you want to add anything that goes beside each message wihtout, it's really difficult. The package normally references a ton of stuff so it's hard to re-create the message outside of package. If all you want to do is add emojis or something beside the message you can then return the defaultBubbleMessage with the emojis added inside of a widget.

If you want the bubbleBuilder to do nothing you can just return the defaultBubbleMessage.

Here is the link to the pull request in case you're curious:
#553

from flutter_chat_ui.

asoap avatar asoap commented on June 25, 2024

It's all good. I just wanted to provide information to the person that asked for it. I'm looking forward to v2.0.0.

from flutter_chat_ui.

asoap avatar asoap commented on June 25, 2024

Here is a sample:

When you setup the Chat() widget library you can include this:

            bubbleBuilder: ((
              Widget child, {
              required types.Message message,
              required bool nextMessageInGroup,
              required Widget defaultBubbleMessage,
            }) {
              return defaultBubbleMessage;
            }),

This essentially does nothing. The package creates the defaultBubbleMessage, what it would normally do without the bubbleBuilder() function. It renders the message like normal.

If you want it to do something else then you can do something like

return Stack(
        alignment: Alignment.bottomRight,
        children: [
          defaultBubbleMessage,
          Text('On top of the message'), 
        ],
      );

Also if you want to use this, you need to use the one specific package where this exists and have that set in your pubspec.yaml.

from flutter_chat_ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.