nhExitApp2PressBack function

Widget nhExitApp2PressBack({
  1. dynamic child,
  2. required bool condition,
  3. Function? onBack,
  4. String message = "برای خارج شدن دوباره بازگشت را بزنید",
  5. TextStyle textStyle = const TextStyle(fontSize: 14, color: Colors.white),
  6. Color background = const Color(0xAA000000),
  7. 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,
        );
}