nhExitApp2PressBack function
Widget
nhExitApp2PressBack(
{ - dynamic child,
- required bool condition,
- Function? onBack,
- String message = "برای خارج شدن دوباره بازگشت را بزنید",
- TextStyle textStyle = const TextStyle(fontSize: 14, color: Colors.white),
- Color background = const Color(0xAA000000),
- double backgroundRadius = 20,
})
Implementation
Widget nhExitApp2PressBack(
{child,
required bool condition,
Function? onBack,
/// default is "برای خارج شدن دوباره بازگشت را بزنید"
String message = "برای خارج شدن دوباره بازگشت را بزنید",
TextStyle textStyle = const TextStyle(fontSize: 14, color: Colors.white),
Color background = const Color(0xAA000000),
double backgroundRadius = 20}) {
return condition
? containerWithCondition(onBack, child)
: DoubleBack(
message: message,
child: child,
condition: true,
textStyle: textStyle,
background: background,
backgroundRadius: backgroundRadius,
);
}