π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
mixed snow
AmanRajSinghMouryacc3b8fa83afc
diff --git a/mobile/apps/photos/lib/ui/home/christmas/snow_fall_overlay.dart b/mobile/apps/photos/lib/ui/home/christmas/snow_fall_overlay.dartindex b5ba0f31e4..1cd09dbf3c 100644--- a/mobile/apps/photos/lib/ui/home/christmas/snow_fall_overlay.dart+++ b/mobile/apps/photos/lib/ui/home/christmas/snow_fall_overlay.dart@@ -3,19 +3,12 @@ import 'dart:ui';import 'package:flutter/material.dart';-/// Visual style for snowflakesenum SnowflakeStyle {- /// Simple circles - best performancecircles,-- /// Multi-pointed star shapesstars,-- /// Random mix of circles and starsmixed,}-/// Represents a single snowflake particleclass _Snowflake {double x;double y;@@ -39,11 +32,10 @@ class _Snowflake {required this.isStar,});- /// Factory to create a random snowflakefactory _Snowflake.random(Random random, SnowflakeStyle style) {return _Snowflake(x: random.nextDouble(),- y: -random.nextDouble() * 0.5, // Start above screen, staggered+ y: -random.nextDouble() * 0.5,radius: 1.0 + random.nextDouble() * 3.0,speed: 0.3 + random.nextDouble() * 0.7,drift: 0.02 + random.nextDouble() * 0.04,@@ -56,7 +48,6 @@ class _Snowflake {}}-/// Paints snowflakes on canvas with style-aware renderingclass _SnowPainter extends CustomPainter {final List<_Snowflake> snowflakes;final SnowflakeStyle style;@@ -65,7 +56,6 @@ class _SnowPainter extends CustomPainter {final double baseSpeed;final Random _random = Random();- // Pre-built star path for efficiencystatic final Path _starPath = _buildStarPath();_SnowPainter({@@ -233,21 +223,15 @@ class _SnowPainter extends CustomPainter {bool shouldRepaint(covariant _SnowPainter oldDelegate) => false;}-/// A performant snow falling animation overlay widgetclass SnowFallOverlay extends StatefulWidget {- /// Number of snowflakes (default: 80)final int snowflakeCount;- /// Visual style of snowflakesfinal SnowflakeStyle style;- /// Color of snowflakes (defaults to white)final Color? color;- /// Opacity of snowflakes (0.0 - 1.0, default: 0.7)final double opacity;- /// Speed multiplier (default: 1.0)final double speedMultiplier;const SnowFallOverlay({@@ -326,7 +310,6 @@ class _SnowFallOverlayState extends State<SnowFallOverlay>}}-/// Wrapper that shows snow overlay with fade animation based on pull offsetclass FadingSnowOverlay extends StatefulWidget {final ValueNotifier<double> pullOffsetNotifier;@@ -406,6 +389,7 @@ class _FadingSnowOverlayState extends State<FadingSnowOverlay>opacity: _fadeAnimation,child: const SnowFallOverlay(snowflakeCount: 50,+ style: SnowflakeStyle.mixed,opacity: 0.8,speedMultiplier: 0.6,),