Enhance close button in PublicFileViewer: add custom button style to remove splash effect
This commit is contained in:
@@ -229,6 +229,17 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
|
|||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.close, color: AppTheme.primaryText),
|
icon: const Icon(Icons.close, color: AppTheme.primaryText),
|
||||||
|
style: ButtonStyle(
|
||||||
|
splashFactory: NoSplash.splashFactory,
|
||||||
|
overlayColor: WidgetStateProperty.resolveWith<Color?>((
|
||||||
|
Set<WidgetState> states,
|
||||||
|
) {
|
||||||
|
if (states.contains(WidgetState.pressed)) {
|
||||||
|
return Colors.transparent;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
onPressed: () => context.go('/'),
|
onPressed: () => context.go('/'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user