Тёмный

How to use PopScope Widget in Flutter with Example 

AI with Flutter
Подписаться 8 тыс.
Просмотров 6 тыс.
50% 1

In this video, you will learn how handle system navigation using flutter popscope. Flutter PopScope class manages system back gestures. WillPopScope is deprecated and PopScope will be replacing it's functionality. System navigation bar comes from device itself rather than from your flutter app, hence in some cases, it's important to handle it to make sure the app don't dispose or remove important state without user confirmation. Watch the video for more implementation details !
Subscribe to our channel 👉 shorturl.at/uCET4
If you enjoyed this video be sure to give it a like and subscribe for more!
ChatGPT: Here's how to get a job at Google, Meta, Tesla ...
• 5 Tips to get a job at...
ChatGPT generates NFTs ! New Passive Income With ChatGPT !
• How to generate images...
I Lost $XXX after OpenAI's Secret Key LEAKED !!
• I Lost $XXX after Open...
Web Scraping using ChatGPT | Coded by ChatGPT
• How to create a Web Sc...
Flutter ChatGPT using OpenAI's GPT-3 | Flutter Chatbot
• Flutter ChatGPT using ...
How to Manage State Using Flutter GetX | Flutter State Management • GetX State Management ...
How to Manage State Using Flutter Provider | Flutter State Management • Flutter Provider State...
How to Solve Vertical viewport was given unbounded height | Flutter Common Error
• How to Solve Vertical ...
Installation & Configuration | Flutter Firebase Tutorial #1
• Installation & Configu...
Firebase RealTime Database (CRUD) | Flutter Firebase Tutorial #3
• Firebase RealTime Data...
How To Create A Flutter Table Calendar In Just 5 Minutes!
• How To Create A Flutte...
Dropdown in Flutter for creating flexible, reusable user interfaces
• Dropdown in Flutter fo...
Object-oriented Programming in Dart
• OOP Tutorials
Flutter Project Ideas
• Flutter Project Ideas
Flutter Package Tutorials
• Flutter Package Tutorials
#flutterpopscope

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@jasmeetsingh-o8r
@jasmeetsingh-o8r 4 месяца назад
Thanks it helped me a lot i was passing the can pop as true and it was directly exiting the app
@AIWithFlutter
@AIWithFlutter 4 месяца назад
Glad it helped !
@hush53-p2w
@hush53-p2w 4 месяца назад
Thank you alot .. you helped me ❤❤
@AIWithFlutter
@AIWithFlutter 4 месяца назад
Welcome ! Appreciate that 🙏
@ilyeskesri6524
@ilyeskesri6524 5 месяцев назад
Thank you !
@AIWithFlutter
@AIWithFlutter 5 месяцев назад
You're welcome!
@hisamsikder9555
@hisamsikder9555 5 месяцев назад
thank you bro
@AIWithFlutter
@AIWithFlutter 5 месяцев назад
Welcome bro
@acornerofherheart-jr9pl
@acornerofherheart-jr9pl 3 месяца назад
finally i understood ...it ... thanks
@AIWithFlutter
@AIWithFlutter 3 месяца назад
Welcome ! Appreciate that 🙏
@sanimsikder4176
@sanimsikder4176 5 месяцев назад
Bro it work fine in page but when i exit from.app. Using this same code it show black screen......
@aliemphizia
@aliemphizia 2 месяца назад
import 'package:flutter/material.dart'; import 'package:lawyer_agenda/views/App%20Navigator/widgets/bottom_nav_bar_items.dart'; import 'package:lawyer_agenda/widgets/custom_alert_dialog.dart'; import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; class CustomBottomNavBar extends StatelessWidget { const CustomBottomNavBar({ super.key, }); @override Widget build(BuildContext context) { final theme = Theme.of(context); return PopScope( canPop: false, onPopInvoked: ((didPop) { if (didPop) { return; } showDialog( context: context, builder: (BuildContext context) { return CustomAlertDialog( title: 'هل تريد الخروج من التطبيق؟', textBtn1: 'نعم', textBtn2: 'لا', onPressedBtn1: () { Navigator.of(context).pop(true); }, onPressedBtn2: () { Navigator.of(context).pop(false); // User does not want to exit }, ); }, ); }), child: PersistentTabView( popAllScreensOnTapAnyTabs: false, popAllScreensOnTapOfSelectedTab: false, tabs: bottomNavBarItems(context), navBarBuilder: (navBarConfig) => Style6BottomNavBar( navBarDecoration: NavBarDecoration( color: theme.colorScheme.surface, ), navBarConfig: navBarConfig, ), backgroundColor: theme.colorScheme.surface, navBarHeight: 60, ), ); } } iam trying to making on this and it always make the pop and not show the alert dialog ? can you help me in this please ?
Далее
Top 10 Widgets every Flutter Developer should know!
10:18
Handsoms😍💕
00:15
Просмотров 4,8 млн
I tricked MrBeast into giving me his channel
00:58
Просмотров 3,5 млн
Flutter Route and Navigation
8:13
Просмотров 6 тыс.
Intrinsic widgets | Decoding Flutter
8:11
Просмотров 48 тыс.
Flutter PopScope
7:17
Просмотров 2 тыс.
Every Flutter App needs this!
10:15
Просмотров 57 тыс.
📱DOPE Animations • Flutter Tutorial ♡
5:25
Просмотров 104 тыс.
Flutter WillPopScope Widget
1:14
Просмотров 19 тыс.