SP-1492-landing_page_analytics_button_design.

This commit is contained in:
Faris Armoush
2025-05-25 10:57:23 +03:00
parent 7aa9e7e5dc
commit 92abcdc4f9
4 changed files with 16 additions and 152 deletions

View File

@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:syncrow_web/utils/color_manager.dart';
class HomeCard extends StatelessWidget {
final bool active;
@ -8,6 +7,7 @@ class HomeCard extends StatelessWidget {
final int index;
final String name;
final Function()? onTap;
final Color? color;
const HomeCard({
super.key,
required this.name,
@ -15,28 +15,16 @@ class HomeCard extends StatelessWidget {
this.active = false,
required this.img,
required this.onTap,
required this.color,
});
@override
Widget build(BuildContext context) {
// bool evenNumbers = index % 2 == 0;
return InkWell(
onTap: active ? onTap : null,
child: Container(
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10),
decoration: BoxDecoration(
color: index == 0 && active
? ColorsManager.blue1.withOpacity(0.9)
: index == 1 && active
? ColorsManager.blue2.withOpacity(0.9)
: index == 2 && active
? ColorsManager.blue3
: index == 4 && active == false
? ColorsManager.blue4.withOpacity(0.2)
: index == 7 && active == false
? ColorsManager.blue4.withOpacity(0.2)
: ColorsManager.blueColor.withOpacity(0.2),
// (active ?ColorsManager.blueColor
// : ColorsManager.blueColor.withOpacity(0.2)),
color: color,
borderRadius: BorderRadius.circular(30),
),
child: Column(
@ -64,15 +52,9 @@ class HomeCard extends StatelessWidget {
),
const SizedBox(height: 10),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
SizedBox(
child: SvgPicture.asset(
img,
),
),
],
child: Align(
alignment: AlignmentDirectional.bottomEnd,
child: SvgPicture.asset(img),
),
),
],