Skip to content

Instantly share code, notes, and snippets.

@RahmiTufanoglu
Created February 24, 2023 13:58
Show Gist options
  • Save RahmiTufanoglu/b4f4f0e01b5bb8246c6d6dd27164b4d0 to your computer and use it in GitHub Desktop.
Save RahmiTufanoglu/b4f4f0e01b5bb8246c6d6dd27164b4d0 to your computer and use it in GitHub Desktop.
Disallow indicator
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