Introducing: DashBot the Chatbot! | Learning to Fly

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 พ.ย. 2024

ความคิดเห็น • 54

  • @dushes_botalov
    @dushes_botalov 2 ปีที่แล้ว +25

    I've been working with flutter since 2018, but I constantly feel like I'm writing the code wrong and I'm a bad developer if it has a lot of conditions in build method, like in your bubble example. Thank you for reminding people that sometimes this is normal 🙂

    • @_chappie_
      @_chappie_ 2 ปีที่แล้ว

      Use something like Stacked framework from filled stack. Allows you to separate your UI from the business logic look them up on TH-cam. I hate having to put logic into the build method too.

    • @dushes_botalov
      @dushes_botalov 2 ปีที่แล้ว +2

      @@_chappie_ I meant that sometimes u think that there is a more elegant and simple solution for writing code, but in reality your solution can be normal and working, even if it has a lot of conditions and code at all. It's like imposter syndrome maybe

    • @_chappie_
      @_chappie_ 2 ปีที่แล้ว

      @@dushes_botalov ohhh gotcha gotcha. I get that feeling a lot to

    • @suranjithnishalaka7395
      @suranjithnishalaka7395 2 ปีที่แล้ว

      I have the same problem 😵‍💫 however, thanks Crag, your advice ❤️

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว +5

      Admitting that I'm not confident in my code to an audience is scary, but knowing that you found it to be a helpful reminder makes that scary leap it all worth it. Thank you for taking the time to write such a kind comment. It really means a lot to me! 💙

  • @AJFlutterTutorials
    @AJFlutterTutorials 2 ปีที่แล้ว +3

    You are the best Flutter Team. We, your fans are always with you 🤩

    • @flutterdev
      @flutterdev  2 ปีที่แล้ว +3

      Thank you for the support 😎

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว +1

      Thank you! 💙

  • @redbaron007-e5p
    @redbaron007-e5p 2 ปีที่แล้ว +1

    Feature suggestion: A response from Dash chatbot that displays a horizontally scrollable list of fan images (maybe use Cards). Since now we're talking about lists within a list, you may have to use CustomScrollView instead of ListView.

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว +1

      There are a lot of Dash fan images out there, plus I haven't used a CustomScrollView in the app yet. Great idea!

  • @darttutorial
    @darttutorial 2 ปีที่แล้ว +2

    Great to see the progress of flutter

    • @flutterdev
      @flutterdev  2 ปีที่แล้ว +1

      Thank you for your continued support 😀

  • @suranjithnishalaka7395
    @suranjithnishalaka7395 2 ปีที่แล้ว +1

    Craig and Khanh, one thing to say, I ❤️ u both. bcz of your valuable contents

    • @flutterdev
      @flutterdev  2 ปีที่แล้ว

      Thank you for your kind words, Suranjith 😎

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว

      💙!!

  • @jeanmartinpachasvilla6640
    @jeanmartinpachasvilla6640 2 ปีที่แล้ว +1

    one feature I would add is the history of the whole chat.... because as we know, in a chat we cannot load all the messages in a single request, so it would be good to add that part... something like pull refresh but showing more old messages...

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว

      That's a really good one!

  • @sivaprasadnk123
    @sivaprasadnk123 2 ปีที่แล้ว +1

    I would like to suggest to customize the DashBot icon(image) with a list of Dash images the user can select and set in their chat

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว +1

      Oooh that would be a fun one! There's a ton of cute Dash images out there too...

  • @ningbuxiangjian
    @ningbuxiangjian 2 ปีที่แล้ว +1

    new for flutter, it's quit good

    • @flutterdev
      @flutterdev  2 ปีที่แล้ว

      Thank you for the kind words, Smith. We're glad that you're enjoying Flutter 😁

  • @harshgupta-ud9di
    @harshgupta-ud9di 2 ปีที่แล้ว +1

    Great video pls make more videos

  • @mamaefit8084
    @mamaefit8084 2 ปีที่แล้ว +1

    Thank you for sharing this tutorial

    • @flutterdev
      @flutterdev  2 ปีที่แล้ว

      We're glad you enjoyed the tutorial 😄
      Be sure to check out more Learning to Fly videos here:
      goo.gle/LearningToFly

  • @lemidiriba3878
    @lemidiriba3878 2 ปีที่แล้ว +2

    love to watch you guys. your Awsome!

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว

      Thank you for sticking around and watching!! 💙

    • @flutterdev
      @flutterdev  2 ปีที่แล้ว

      Thanks for your support! We're happy to have you onboard 😄

  • @verticrow
    @verticrow 2 ปีที่แล้ว

    Thanks for another great episode!

    • @flutterdev
      @flutterdev  2 ปีที่แล้ว

      You are very welcome! Thank you for joining us 😄

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว

      Thank you for watching :)

  • @santatrahasitiana7223
    @santatrahasitiana7223 2 ปีที่แล้ว +2

    Good episode :)

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว +1

      Thanks for watching! :)

  • @nifhanif
    @nifhanif 2 ปีที่แล้ว +1

    nice information 👍

    • @flutterdev
      @flutterdev  2 ปีที่แล้ว

      Thanks, Nif! We're glad you enjoyed the video 🙂

  • @TungNguyen-lt5ej
    @TungNguyen-lt5ej 2 ปีที่แล้ว +1

    From Viet Nam with lov3!

  • @webdeveloper9826
    @webdeveloper9826 2 ปีที่แล้ว

    about 1.5 year ago i developed a chat app using flutter.At that time Webrtc are not stable as much the only problem i face is for calling VOIP and how to do background things work when app is get killed ? is their any better solution now a days for that. #background custom method processing and receiving calls
    Thanks

  • @albertoazinar1209
    @albertoazinar1209 2 ปีที่แล้ว +1

    Awesome

  • @khurshidddbek
    @khurshidddbek 2 ปีที่แล้ว

    One of the most important features is the notification.

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว

      Hmm, I considered notifications for a regular chat app but didn't think about with a chatbot. Good callout!

  • @nidalbakir4720
    @nidalbakir4720 2 ปีที่แล้ว

    For question 2:
    Please use Chain of responsibility design pattern

    • @KhanhFlutter
      @KhanhFlutter 2 ปีที่แล้ว

      Hmm, so I broke out a lot of the original widget into separate widgets that had a single responsibility. Would you break it down even more?

    • @nidalbakir4720
      @nidalbakir4720 2 ปีที่แล้ว +1

      ​@@KhanhFlutter
      Sure, so we will call one function to return a Widget, that Widget will be our message.
      We have a chain of knots, And every chain knot will check if it can handle the message
      - if yes then the chain knot will call the build method and return our message widget.
      - if the chain knot can't handle the message it will pass the message to the next chain knot.
      and so on, until we reach the last knot in our chain, the _(unsupported_message_type)_ that will call the build method and return a widget to tell the user that the message he received is not supported and the user should update the app.
      With this design pattern, we can introduce new types of messages like voice and video messages without any problem at all.
      And everything is separated from each other.
      Here I will provide you with a code snippet I'm using in my current project.
      *_message_builder.dart_*
      /// Chain of Responsibility design pattern
      ///
      /// This is the BaseBuilder
      abstract class MessageBuilder {
      final MessageBuilder? nextMessageBuilderHandler;
      MessageBuilder(this.nextMessageBuilderHandler);
      Widget build(LocalChatMessage message);
      }
      class MessageBuilderWidget {
      static MessageBuilderWidget? _instance;
      late final TextMessageBuilder _textMessageBuilder;
      late final ImageMessageBuilder _imageMessageBuilder;
      late final UnsupportedMessageTypeBuilder _unsupportedMessageTypeBuilder;
      MessageBuilderWidget._() {
      _unsupportedMessageTypeBuilder = UnsupportedMessageTypeBuilder();
      _imageMessageBuilder = ImageMessageBuilder(_unsupportedMessageTypeBuilder);
      _textMessageBuilder = TextMessageBuilder(_imageMessageBuilder);
      }
      static Widget buildMessage(LocalChatMessage message) {
      _instance ??= MessageBuilderWidget._();
      return _instance!._build(message);
      }
      Widget _build(LocalChatMessage message) {
      return _textMessageBuilder.build(message);
      }
      }
      ______________________________________________________________________________
      *_text_message_builder.dart_*
      class TextMessageBuilder extends MessageBuilder {
      TextMessageBuilder(MessageBuilder nextMessageBuilderHandler)
      : super(nextMessageBuilderHandler);
      @override
      Widget build(LocalChatMessage message) {
      if (message.messageType != MessageType.text.name) {
      return super.nextMessageBuilderHandler!.build(message);
      }
      return _TextMessageBuilderWidget(
      key: Key(message.localMessageId.toString()),
      message: message,
      );
      }
      }
      ______________________________________________________________________________
      *_image_message_builder.dart_*
      class ImageMessageBuilder extends MessageBuilder {
      ImageMessageBuilder(MessageBuilder nextMessageBuilderHandler)
      : super(nextMessageBuilderHandler);
      @override
      Widget build(LocalChatMessage message) {
      if (message.messageType != MessageType.image.name) {
      return super.nextMessageBuilderHandler!.build(message);
      }
      return _ImageMessageBuilderWidget(
      key: Key(message.localMessageId.toString()),
      message: message,
      );
      }
      }
      ______________________________________________________________________________
      *_unsupported_message_type_builder.dart_*
      class UnsupportedMessageTypeBuilder extends MessageBuilder {
      UnsupportedMessageTypeBuilder() : super(null);
      @override
      Widget build(LocalChatMessage message) {
      return _UnsupportedMessageTypeBuilderWidget(
      key: Key(message.localMessageId.toString()),
      message: message,
      );
      }
      }
      ______________________________________________________________________________
      And simply We call the (MessageBuilderWidget.buildMessage) like this:
      ListView.builder(
      itemCount: _chatMessages.length,
      itemBuilder: (context, index) {
      return MessageBuilderWidget.buildMessage(_chatMessages[index]);
      }),
      Have a good day ☕

  • @sixtusagbo
    @sixtusagbo 2 ปีที่แล้ว +2

    Flutterful, 🤩!

    • @flutterdev
      @flutterdev  2 ปีที่แล้ว +1

      Thanks for the love, Sixtus! We're glad you enjoyed the video😎

  • @azkadev
    @azkadev 2 ปีที่แล้ว

    can you make a tutorial how to play video on cross platform?

  • @jasonfox13
    @jasonfox13 2 ปีที่แล้ว

    I think it’s will be cool to see AI in chat bot)

  • @minhmantv18
    @minhmantv18 2 ปีที่แล้ว +2

    Xin chào Khanh Nguyen :)

  • @ilyasarafath7585
    @ilyasarafath7585 2 ปีที่แล้ว

    Cool👍🏻

  • @etcworld3660
    @etcworld3660 2 ปีที่แล้ว

    Subscribers done🇧🇩🇧🇩🇧🇩🇧🇩