pikapika/lib/screens/components/RightClickPop.dart

20 lines
455 B
Dart
Raw Normal View History

2022-03-19 04:12:27 +00:00
import 'package:flutter/material.dart';
2022-03-25 14:57:30 +00:00
import '../../basic/config/UsingRightClickPop.dart';
2022-03-19 04:12:27 +00:00
2022-03-25 14:57:30 +00:00
Widget rightClickPop({
required Widget child,
required BuildContext context,
bool canPop = true,
}) =>
currentUsingRightClickPop()
? GestureDetector(
onSecondaryTap: () {
if (canPop) {
Navigator.of(context).pop();
}
},
child: child,
)
: child;