feat: add depth to game
This commit is contained in:
@@ -195,13 +195,59 @@ class _MenuButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// رنگِ تیرهترِ پایه برای بِوِل (لبهی پایینیِ برجسته).
|
||||
final dark = Color.lerp(color, Colors.black, 0.45)!;
|
||||
final light = Color.lerp(color, Colors.white, 0.12)!;
|
||||
return SizedBox(
|
||||
width: 280,
|
||||
child: ElevatedButton.icon(
|
||||
style: ElevatedButton.styleFrom(backgroundColor: color),
|
||||
onPressed: onTap,
|
||||
icon: Icon(icon, color: AppColors.gold),
|
||||
label: Text(label),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: InkWell(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 15),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [light, color, dark],
|
||||
stops: const [0, 0.5, 1],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(color: AppColors.gold, width: 1.6),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.55),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 5),
|
||||
),
|
||||
// هایلایتِ بالا برای حسِ شیشهای/برجسته.
|
||||
BoxShadow(
|
||||
color: Colors.white.withValues(alpha: 0.12),
|
||||
blurRadius: 1,
|
||||
offset: const Offset(0, 1),
|
||||
spreadRadius: -1,
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(icon, color: AppColors.gold),
|
||||
const SizedBox(width: 10),
|
||||
Text(label,
|
||||
style: const TextStyle(
|
||||
color: AppColors.text,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
shadows: [Shadow(color: Colors.black54, blurRadius: 3)],
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user