Milad-Akarie / skeletonizer

MIT License
325 stars 20 forks source link

Can't skeletonize svg widget #21

Closed 3kdeveloper closed 8 months ago

3kdeveloper commented 8 months ago

Simulator Screen Shot - iPhone 14 Pro - 2024-01-05 at 19 18 48

3kdeveloper commented 8 months ago

SvgPicture.asset( AppImages.callIcon, width: 30, height: 30, ),

KetanSatani-TheOneTech commented 4 months ago

@3kdeveloper Not sure why did you closed this issue. It's still there.

SvgPicture.network(model.image ?? '')

If we take this it's not working.

3kdeveloper commented 4 months ago

@KetanSatani-TheOneTech Check out the solution

Widget applyShimmer({ double? width = double.maxFinite, double? height, BorderRadius? borderRadius, }) => Skeleton.replace( replacement: Container( width: width, height: height, decoration: BoxDecoration( borderRadius: borderRadius, color: Colors.transparent), child: const ColoredBox(color: Colors.black), ), child: this, );

add this inside your widget extension.

seragsabrysakr commented 3 weeks ago

could you give an example to how to add apply shimmer

3kdeveloper commented 2 weeks ago

@seragsabrysakr

YourWidget( ... ).applyShimmer(width: 40.w, height: 40.h)