Actions (Widget of the Week)

Поделиться
HTML-код
  • Опубликовано: 7 окт 2024
  • Learn more about Actions → goo.gle/3dvrLQK
    Abstract: In this Widget of the Week, learn about the widget which complements Focus and Shortcuts to complete Flutter's keyboard shortcuts system.
    This video is also subtitled in Chinese, Indonesian, Italian, Japanese, Korean, Portuguese, Spanish, Arabic, and Vietnamese.
    Get more tips! → goo.gle/Flutte...
    Subscribe to Flutter! → goo.gle/FlutterYT
    #WidgetOfTheWeek #Widgets #Flutter

Комментарии • 24

  • @andrefreitas1980
    @andrefreitas1980 2 года назад +3

    Thanks, very good

  • @maanacademybd
    @maanacademybd Год назад

    Thanks

  • @lorrimang
    @lorrimang 2 года назад +51

    Is this wonderfully overcomplicated or am I just not understanding how Flutter makes things so fiddlesome?

    • @trevortrevose9124
      @trevortrevose9124 2 года назад +1

      probably both

    • @samuelkings9416
      @samuelkings9416 2 года назад +3

      Have you seen the video on focus nodes and shortcuts? This video is more of a continuation of that. You shouldn't have a hard time understanding it.
      Moreover, I bet you'll understand even better by practice. I oftentimes dedicate a whole day to learn new stuff such as this. You'll feel more powerful at the end. Trust me

    • @venir_dev
      @venir_dev 2 года назад

      I second this as I can't understand (as of now) why didn't Flutter expose a InheritedWidget for intents, actions, etc. I guess there's a precise reason for this not being the case

    • @brunodluka3337
      @brunodluka3337 2 года назад +3

      it is overcomplicated

    • @craiglabenz9147
      @craiglabenz9147 2 года назад +5

      For most simple use cases, you won't need any of this and should instead use the FocusableActionDetector widget. However, as is true with all software, the larger your app gets, the more abstractions like this start to transition out of "tedious boilerplate" territory and into "helpful organizational guides" territory.

  • @Rajkamal-vf2ef
    @Rajkamal-vf2ef 2 года назад +4

    I always wait for new video

  • @tanthien1793
    @tanthien1793 2 года назад +1

    Lovely widget

    • @flutterdev
      @flutterdev  2 года назад

      There's certainly beauty in variety! An important part of widgets is convenience and accessibility. We've got all of this for you right here 🙌↓
      goo.gle/3y4KfP8

  • @AndresPerezMelo
    @AndresPerezMelo 2 года назад

    Good 😍

  • @yukiyuki3881
    @yukiyuki3881 2 года назад +3

    Final?

  • @2005sty
    @2005sty Год назад

    So what is intent class about?

  • @medwincorreo3073
    @medwincorreo3073 2 года назад

    😍

  • @minabasnet884
    @minabasnet884 2 года назад +2

    Thats complex 😓

  • @danielchristianto306
    @danielchristianto306 Год назад +1

    tak remote control

  • @Ahmad_Gharbawy
    @Ahmad_Gharbawy 2 года назад +1

    Sorry, but background music distributes me.

  • @haike8780
    @haike8780 2 года назад +3

    First framework to reach 11.050 open issues, congratulations ...

    • @aldeywahyuputra5719
      @aldeywahyuputra5719 Год назад +13

      … and also with over 60k issues closed, while also providing platform support all across mobile and desktop.
      Truly this is all thanks to the amazing maintainers and the community that surrounds them - you’re right, that’s worth to be congratulated for 😉

    • @PrazereS11
      @PrazereS11 Год назад +1

      Millions by month of income and thousands of users, yet our bank app made with Flutter has none framework related problem.

  • @flutteringonvsc2766
    @flutteringonvsc2766 2 года назад +1

    Please help I just want want to show a star for 2 sec on list view item or something added or updated into it. For example in OutSystems when a file is updated at different folders then a shining star is appeared and disappeared just like that on list view.

    • @hylke45
      @hylke45 2 года назад +1

      I assume your issue is making it disappear after 2 seconds?
      Create a StatefulWidget with a timer you manage from the setter, don't forget to do timer.cancel() in the dispose.
      Something like this:
      /// Whether star indicator is visible
      bool _starIsVisible = false;
      bool get starIsVisible => _starIsVisible;
      /// Set starIsVisible to true for 1.5 seconds, after which it'll be false again
      set starIsVisible(bool value) {
      _starIsVisible = value;
      // Cancel if still visible so it doesn't disappear after remaining time
      _starVisibleTimer?.cancel();
      // Set timer to make widget disappear after 1500ms + animation of 500 ms
      _starVisibleTimer = Timer(
      const Duration(milliseconds: 1500),
      () => setState(() => _starIsVisible = false),
      );
      }

      /// Timer to automatically set [starIsVisible] to false to hide the widget,
      /// acts like a Future.delayed which can be cancelled
      Timer? _starVisibleTimer;

      @override
      void dispose() {
      super.dispose();
      _starVisibleTimer?.cancel();
      }


      Widget build(BuildContext context) {
      return AnimatedOpacity(
      // On enter ms:200, on leave ms:500
      duration: starIsVisible
      ? const Duration(milliseconds: 200)
      : const Duration(milliseconds: 500),
      opacity: starIsVisible ? 1.0 : 0.0,
      child: Text("Your star Widget/Icon here"),
      )
      }