part of mine;



class BuildRead extends StatelessWidget {
  final void Function(ReadModel model)? onTap;
  final List <ReadModel>items;
  const BuildRead ({
    super.key,
    this.onTap,
    this.items = const [],
  });

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Stack(
        children: [
          Container(
            width: double.infinity,
              child: Image.asset('assets/images/read_bg.png',fit: BoxFit.cover,)
          ),
          Container(
            padding: const EdgeInsets.symmetric(vertical: 16.5),
            color: Colors.transparent,
            // decoration: BoxDecoration(
            //   borderRadius: BorderRadius.circular(8),
            //   color: Colors.transparent,
            //   boxShadow: [
            //     BoxShadow(
            //       color: const Color(0xFFC7C7C7).withOpacity(0.5),
            //       offset: const Offset(3, 0),
            //       blurRadius: 10.w,
            //       spreadRadius: 0.w,
            //     ),
            //   ],
            // ),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: items.map((model){
                return GestureDetector(
                  behavior: HitTestBehavior.opaque,
                  onTap: (){
                    if (model.link != null){
                      if (model.link != Routes.love){
                        context.pushNamed(model.link!);
                      }
                      else{
                        if (onTap !=null) onTap!(model);
                      }
                    }
                  },
                  child: Column(
                    children: [
                      Text(model.value,style: const TextStyle(fontSize: 18,height: 1.6,fontWeight: Fonts.medium,color: Colours.c3),),
                      Gaps.vGaps5,
                      Text(model.name,style: const TextStyle(fontSize: 13,height:1.6,color: Colours.c6))
                    ],
                  ),
                );
              }).toList(),
            ),
          )
        ],
      ),
    );
  }
}
