Created
February 24, 2023 13:58
-
-
Save RahmiTufanoglu/b4f4f0e01b5bb8246c6d6dd27164b4d0 to your computer and use it in GitHub Desktop.
Disallow indicator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class DisallowIndicator extends StatelessWidget { | |
const DisallowIndicator({super.key, required this.child}); | |
final Widget child; | |
@override | |
Widget build(BuildContext context) { | |
return NotificationListener<OverscrollIndicatorNotification>( | |
onNotification: (overScroll) { | |
overScroll.disallowIndicator(); | |
return false; | |
}, | |
child: child, | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment