feat: update home ui
This commit is contained in:
@@ -7,15 +7,21 @@ class HomeFeatureTile extends StatelessWidget {
|
||||
final String title;
|
||||
final String iconPath;
|
||||
final Function() onTap;
|
||||
final bool isHighlighted;
|
||||
|
||||
const HomeFeatureTile({
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.iconPath,
|
||||
required this.onTap,
|
||||
this.isHighlighted = false,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final double iconSize = isHighlighted ? 72 : 56;
|
||||
final double borderRadius = isHighlighted ? 20 : 16;
|
||||
|
||||
return Expanded(
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
@@ -26,24 +32,29 @@ class HomeFeatureTile extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
width: 56,
|
||||
height: 56,
|
||||
width: iconSize,
|
||||
height: iconSize,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [AppColor.primary.withOpacity(0.1), AppColor.primary.withOpacity(0.05)],
|
||||
colors: [
|
||||
AppColor.primary.withOpacity(0.1),
|
||||
AppColor.primary.withOpacity(0.05),
|
||||
],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
borderRadius: BorderRadius.circular(borderRadius),
|
||||
),
|
||||
child: Image.asset(iconPath),
|
||||
),
|
||||
const SpaceHeight(12),
|
||||
Text(
|
||||
title,
|
||||
style: AppStyle.sm.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColor.textPrimary,
|
||||
style: AppStyle.xs.copyWith(
|
||||
fontWeight: isHighlighted ? FontWeight.w700 : FontWeight.w600,
|
||||
color: isHighlighted
|
||||
? const Color(0xFF388E3C)
|
||||
: AppColor.textPrimary,
|
||||
letterSpacing: -0.2,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
|
||||
Reference in New Issue
Block a user