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 Stack(
      children: [
        SizedBox(
          width: double.infinity,
            child: Image.asset(
              'assets/images/read_bg.png',fit: BoxFit.contain,
              width: double.infinity,
              // height: 96,
            )
        ),
        Positioned(
          // top: 10.w,
          left: 0,
          right: 0,
          top: 0,
          bottom: 0,
          child: Container(
            padding: EdgeInsets.symmetric(vertical: 16.5.w,horizontal: 8),
            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 Expanded(
                  child: GestureDetector(
                    behavior: HitTestBehavior.opaque,
                    onTap: (){
                      if (onTap !=null) onTap!(model);
                    },
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Text(model.value,style: TextStyle(fontSize: 18.w,height: 1.5.w,fontWeight: Fonts.medium,color: Colours.c3),),
                        Text(model.name,style: TextStyle(fontSize: 13.w,height:1.5.w,color: Colours.c6))
                      ],
                    ),
                  ),
                );
              }).toList(),
            ),
          ),
        )
      ],
    );
  }
}
