Initial commit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'frosted_panel.dart';
|
||||
|
||||
|
||||
class CircleNavIconButton extends StatelessWidget {
|
||||
final IconData icon;
|
||||
|
||||
|
||||
final VoidCallback? onPressed;
|
||||
final double iconSize;
|
||||
|
||||
|
||||
final bool enabled;
|
||||
|
||||
const CircleNavIconButton({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.onPressed,
|
||||
this.iconSize = 26,
|
||||
this.enabled = true,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Opacity(
|
||||
opacity: enabled ? 1.0 : 0.35,
|
||||
child: FrostedPanel(
|
||||
radius: 999,
|
||||
enableBlur: false,
|
||||
padding: const EdgeInsets.all(8),
|
||||
color: Colors.black.withValues(alpha: 0.26),
|
||||
border: Border.all(color: Colors.white.withValues(alpha: 0.12)),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: onPressed,
|
||||
customBorder: const CircleBorder(),
|
||||
child: Icon(icon, color: Colors.white, size: iconSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user