mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 07:28:14 -07:00
Init repo
This commit is contained in:
commit
764b6034e3
566 changed files with 212335 additions and 0 deletions
22
lib/util/absorb_events.dart
Normal file
22
lib/util/absorb_events.dart
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
class AbsorbEvents extends ConsumerWidget {
|
||||
final bool absorb;
|
||||
final Widget child;
|
||||
const AbsorbEvents({super.key, required this.child, this.absorb = false});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
if (absorb) {
|
||||
return GestureDetector(
|
||||
onDoubleTap: () {},
|
||||
onTap: () {},
|
||||
onLongPress: () {},
|
||||
child: Container(color: Colors.black.withOpacity(0), child: child),
|
||||
);
|
||||
} else {
|
||||
return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue