Milad-Akarie / skeletonizer

MIT License
367 stars 24 forks source link

Can't change color #32

Closed martinpelli closed 6 months ago

martinpelli commented 6 months ago

When I use skeletonizer above this

Image.asset(
            'assets/placeholders/some_image_default.jpg',
            width: double.infinity,
            height: isLongScreenHeight ? 280 : 200,
            fit: BoxFit.cover,
            ),

I get a fully grey square with shader, I want exactly that but with my custom color, but I tried everything and is not changing it

For example this

Skeletonizer.of(context).enabled
             ? Container(
                      width: double.infinity,
                      height: 200,
                      color: Colors.red,
                    )
               : Image.asset(
                      'assets/placeholders/${ImageNameMapper.getDefaultImageFromSportId(sportId)}_default.jpg',
                      width: double.infinity,
                      height: isLongScreenHeight ? 280 : 200,
                      fit: BoxFit.cover,
                    ),

is still grey, also tried with containersColor and is not working the darker grey is the Image.asset, no matter if I change it to a container or whatever is still that grey

image
martinpelli commented 6 months ago

Never mind, I was using ColorFiltered some widgets above for some effects and that was causing the problem