DoubleBack constructor
const
DoubleBack({
- Key? key,
- required Widget child,
- String message = "Press back again to exit",
- int waitForSecondBackPress = 2,
- Function? onFirstBackPress,
- bool condition = true,
- VoidCallback? onConditionFail,
- TextStyle textStyle = const TextStyle(fontSize: 14, color: Colors.white),
- Color background = const Color(0xAA000000),
- double backgroundRadius = 20,
DoubleBack, wrap a widget to use it
Implementation
const DoubleBack({
Key? key,
required this.child,
this.message = "Press back again to exit",
this.waitForSecondBackPress = 2,
this.onFirstBackPress,
this.condition = true,
this.onConditionFail,
this.textStyle = const TextStyle(fontSize: 14, color: Colors.white),
this.background = const Color(0xAA000000),
this.backgroundRadius = 20,
}) : super(key: key);