hnvn / flutter_shimmer

A package provides an easy way to add shimmer effect in Flutter project
BSD 3-Clause "New" or "Revised" License
1.77k stars 200 forks source link

[Feature Request] Shimmer Direction at ANY angle #35

Closed RyanRamchandar closed 3 years ago

RyanRamchandar commented 3 years ago

Add support for shimmer direction at any angle. Shimmer currently supports the following four directions:

shimmer.dart

///
/// An enum defines all supported directions of shimmer effect
///
/// * [ShimmerDirection.ltr] left to right direction
/// * [ShimmerDirection.rtl] right to left direction
/// * [ShimmerDirection.ttb] top to bottom direction
/// * [ShimmerDirection.btt] bottom to top direction
///
enum ShimmerDirection { ltr, rtl, ttb, btt }

Proposal: Change Shimmer direction to accept a double which represents degrees (or radians). Static constants can be used for the existing directions of ltr, rtl, ttb, btt for minimal changes to existing clients.

hnvn commented 3 years ago

You can use gradient parameter of Shimmer constructor to customize your gradient angle.