Google sign in and hourglass improved
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user