fix: attachment borders

This commit is contained in:
Deven Joshi
2021-05-18 14:39:01 +05:30
parent 8d6af7a7c2
commit 5155940ddd
5 changed files with 22 additions and 4 deletions
@@ -104,3 +104,15 @@ extension BuildContextX on BuildContext {
double get textScaleFactor =>
MediaQuery.maybeOf(this)?.textScaleFactor ?? 1.0;
}
/// Extension on [BorderRadius]
extension FlipBorder on BorderRadius {
/// Flips borders (Y)
BorderRadius mirrorBorderIfReversed({bool reverse = true}) => reverse
? BorderRadius.only(
topLeft: topRight,
topRight: topLeft,
bottomLeft: bottomRight,
bottomRight: bottomLeft)
: this;
}