Google sign in and hourglass improved

This commit is contained in:
Sewmina
2022-03-24 05:05:18 +05:30
parent 9f976b1e33
commit 2fe29dcbb8
13 changed files with 560 additions and 307 deletions

View File

@@ -69,7 +69,7 @@ class HourglassPainter extends CustomPainter{
topContent.close();
final bottomContent = Path();
double bottomStartHeight = size.height-hourglassInset;
double bottomStartHeight = size.height-12;
double bottomEndHeight = size.height * (0.95 - (fillAmount * 0.32));
double bottomContentStartWidthOffset = getBottomContentWidthOffset(size.width, bottomStartHeight, hourglassHalfHeight, hourglassInset);
double bottomContentEndWidthOffset = getBottomContentWidthOffset(size.width, bottomEndHeight, hourglassHalfHeight, hourglassInset);
@@ -92,16 +92,18 @@ class HourglassPainter extends CustomPainter{
fallingSand.close();
final gradient = ui.Gradient.linear(
Offset(size.width/2, size.height * 0.9),
Offset(size.width/2, bottomEndHeight + size.height *0.07),
Offset(size.width/2, bottomStartHeight - 1),
Offset(size.width/2, bottomEndHeight),
colors,
colorStops);
colorStops,
TileMode.clamp);
final bottomContentPainter = Paint()
..shader=gradient
..style=PaintingStyle.fill
..strokeCap=StrokeCap.round
..strokeWidth=1;
print('bottom: $bottomStartHeight, top: $bottomEndHeight');
canvas.drawPath(fallingSand, contentPainter);
canvas.drawPath(topContent, contentPainter);