-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c01cc56
commit dfae031
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class GlowNotificationWidget extends StatelessWidget { | ||
final Widget child; | ||
final bool showGlowLeading; | ||
|
||
const GlowNotificationWidget({ | ||
super.key, | ||
required this.child, | ||
this.showGlowLeading = true, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return NotificationListener<OverscrollIndicatorNotification>( | ||
onNotification: (OverscrollIndicatorNotification overscroll) { | ||
overscroll.disallowIndicator(); | ||
return true; | ||
}, | ||
child: child, | ||
); | ||
} | ||
} |