Flutter ModalBarrier Widget

Поділитися
Вставка
  • Опубліковано 10 січ 2023
  • This Tutorial will show you how to use the ModalBarrier with flutter. To learn more about every flutter widgets, you can check our flutter playlist about all flutter widgets here: • Flutter AboutDialog Wi...
    This was how to make and use the ModalBarrier widget within your Flutter app
    COURSES
    Flutter courses (Beginner & Advanced): fluttermapp.com/
    OVERVIEW
    0:00​ ModalBarrier Flutter
    MISSION
    Our mission at Flutter Mapp (Flutter Mobile App) is to help purpose driven Flutter developers go full-time doing what they love and making an impact through coding. We achieve this with useful Flutter tips and straight to the point Flutter videos.
    RECOMMENDED VIDEOS
    Playlist of more than 200 Flutter tips: • 35 Flutter Tips That W...
    Learn Flutter in 1 hour: • Flutter Tutorial For B...
    Zero to Hero Flutter Course (Beginners): • Video
    Hero to Pro Flutter Course (Advanced): • Video
    EDITOR
    Amaan Ansari: / amaan_0605
    SOCIAL MEDIA:
    Instagram : fluttermapp
    Twitter : FlutterMapp
    Website: www.fluttermapp.com
    Discord Invite: / discord
    CONTACT
    For business inquiries email me here: info@fluttermapp.com
    Website: fluttermapp.com
    #FlutterMapp
    #Flutter

КОМЕНТАРІ • 12

  • @codewithroman8180
    @codewithroman8180 Рік тому

    Fantastic tutorial

  • @LMrc534
    @LMrc534 Рік тому +5

    What is his utility?

    • @alihusseinalissa25
      @alihusseinalissa25 Рік тому +3

      It is actually used inside the AlertDialog widget to dismiss it when click outside the dialog, or to prevent clicks outside if dismissable is set to false.

  • @souhailmarghabi4113
    @souhailmarghabi4113 Рік тому

    Do u happen to know a way to prevent the iOS swipe to pop gesture when using a modal barrier?

    • @lemmerelassal2795
      @lemmerelassal2795 Рік тому

      AbsorbPointer?

    • @souhailmarghabi4113
      @souhailmarghabi4113 Рік тому

      @@lemmerelassal2795 not really. I show a modal barrier when loading things from the backend, but the user can still swipe to the left to pop the current widget. I tried many things to prevent that, but could not. It's an iOS specific behaviour.

    • @lemmerelassal2795
      @lemmerelassal2795 Рік тому

      @@souhailmarghabi4113 But have you tried AbsorbPointer?

    • @souhailmarghabi4113
      @souhailmarghabi4113 Рік тому

      @@lemmerelassal2795 the back action is a system behaviour not a custom widget in the tree so no use for an AbsorbePointer in this scenario.

    • @unusuariodeprueba
      @unusuariodeprueba Рік тому

      I think you are looking for the widget WillPopScope, I can't test it on iOS rn but this widget blocks the "pop" action when the "onWillPop" parameter returns false.

  • @itsahmed-dev
    @itsahmed-dev Рік тому

    What's the use case for such a widget?

    • @Eternal600
      @Eternal600 Рік тому +1

      It can be used to prevent any background interaction with the UI in case of an asynchronous process. For example when a user is loggin in and you do not want them to press some other buttons after the login.

    • @itsahmed-dev
      @itsahmed-dev Рік тому

      @@Eternal600 That's cool. Thanks