2022-12-30 05:18:18 +03:00

31 lines
934 B
Dart

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../controller/bottom_sheet_controller.dart';
class TappableAppbar extends StatelessWidget {
final BottomSheetController? controller;
final Widget child;
const TappableAppbar(
{super.key, required this.controller, required this.child});
@override
Widget build(BuildContext context) {
return GetInstance().isRegistered<BottomSheetController>()
? GestureDetector(
onLongPressEnd: (a) {
if (GetInstance().isRegistered<BottomSheetController>()) {
controller!.tapingStatus(false);
}
},
onPanCancel: () {},
onPanDown: (a) {
if (GetInstance().isRegistered<BottomSheetController>()) {
controller!.tapingStatus(true);
}
},
child: child,
)
: child;
}
}